/* EzyESG theme: farm green + solar amber, matching the EzyESG infographic */
:root {
    --brand: #1C7A4A;
    --brand-dark: #123824;
    --brand-deep: #0B2618;
    --brand-tint: #E3EFE6;
    --teal: #1D5F7A;
    --amber: #F2B233;
    --ink: #142A1E;
    --muted: #4A5D52;
    --ground: #F5F7F2;
    --line: #D5DFD7;
    --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--ground);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: 28, 122, 74;
    --bs-link-hover-color: var(--brand-dark);
    --bs-border-color: var(--line);
}

h1, h2, h3, .display-font, .brand-word {
    font-family: "Space Grotesk", Inter, sans-serif;
    letter-spacing: -0.01em;
}

.brand-word { font-weight: 700; font-size: 1.35rem; color: var(--brand-dark); }
.text-muted-brand { color: var(--muted) !important; }
.skip-link { position: absolute; left: 1rem; top: 1rem; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* Navigation */
.site-nav { background: #fff; border-bottom: 1px solid var(--line); }
.site-nav .nav-link { color: var(--ink); font-weight: 500; }
.site-nav .nav-link:hover { color: var(--brand); }

/* Buttons */
.btn-brand { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); font-weight: 600; }
.btn-outline-brand { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--brand); font-weight: 600; }
.btn-amber { --bs-btn-bg: var(--amber); --bs-btn-border-color: var(--amber); --bs-btn-color: var(--ink);
    --bs-btn-hover-bg: #E0A21F; --bs-btn-hover-border-color: #E0A21F; --bs-btn-hover-color: var(--ink); font-weight: 600; }

/* Hero */
.hero { background: var(--brand-dark); color: #fff; padding: 5rem 0 4rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.05; }
.hero .lead { color: #E4EFE7; max-width: 46rem; }
.hero .eyebrow { color: var(--amber); }
.hero-stat { background: #1E4A31; border-radius: 1rem; padding: 1.25rem; height: 100%; }
.hero-stat strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; color: var(--amber); }
.hero-stat span { color: #E4EFE7; font-size: .95rem; }

.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .35rem; }
.section { padding: 4rem 0 0; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; }

/* Cards */
.card-brand { background: #fff; border: 1px solid var(--line); border-radius: 1rem; height: 100%; }
.card-brand .card-body { padding: 1.5rem; }
.card-featured { border: 2px solid var(--brand); }
.icon-tile { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-tint); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; font-family: "Space Grotesk", sans-serif; }
.price { font-family: "Space Grotesk", sans-serif; font-size: 2rem; font-weight: 700; }
.check-list { list-style: none; padding-left: 0; }
.check-list li { padding-left: 1.6rem; position: relative; margin-bottom: .45rem; }
.check-list li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--brand); }
.stream-card { border-top: 4px solid var(--brand); }
.stream-card.teal { border-top-color: var(--teal); }
.stream-card.amber { border-top-color: var(--amber); }
.band-strip { background: var(--brand-tint); border-radius: 1rem; padding: 1.5rem; }
.cta { background: var(--brand-dark); color: #fff; border-radius: 1.25rem; padding: 3rem; }
.cta p { color: #E4EFE7; }

/* Portal */
.portal-nav { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: .75rem; position: sticky; top: 1rem; }
.portal-nav .portal-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: .25rem .5rem .5rem; }
.portal-nav a { display: block; padding: .55rem .75rem; border-radius: .6rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.portal-nav a:hover { background: var(--ground); }
.portal-nav a.active { background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; }
.portal-nav a i { margin-right: .4rem; color: var(--brand); }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; height: 100%; }
.metric .value { font-family: "Space Grotesk", sans-serif; font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.metric .label { color: var(--muted); font-size: .9rem; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.table-card .table { margin-bottom: 0; }
.table-card .table thead th { background: var(--ground); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; }

/* ESG bands */
.band { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: .6rem;
    font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.3rem; }
.band-a { background: #1C7A4A; color: #fff; }
.band-b { background: #5FA67E; color: #0E2216; }
.band-c { background: #F2D27A; color: var(--ink); }
.band-d { background: #E39A5B; color: var(--ink); }
.band-e { background: #8C3B2A; color: #fff; }

/* Footer */
.site-footer { background: var(--brand-deep); color: #CFE3D6; }
.site-footer a { color: #CFE3D6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* Auth */
.auth-card { max-width: 480px; margin: 3rem auto; }

/* Package cards and green-loan highlight */
.green-loan-band { background: var(--brand-dark); color: #fff; border-radius: 1rem; padding: 1.25rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.green-loan-band .small { color: #E4EFE7; }
.green-loan-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--amber); color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.package-card { overflow: hidden; position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.package-card:hover, .package-card:focus-within { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(18, 56, 36, .12); }
.package-card.is-green { border-color: #9CC9AE; }
.package-media { position: relative; aspect-ratio: 16 / 10; background: var(--brand-tint); }
.package-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.green-flag { position: absolute; left: .75rem; top: .75rem; background: var(--brand); color: #fff; font-size: .78rem;
    font-weight: 600; padding: .3rem .6rem; border-radius: 999px; }
.category-chip { position: absolute; right: .75rem; bottom: .75rem; }
.green-monthly { background: var(--brand-tint); color: var(--brand-dark); border-radius: .6rem; padding: .35rem .6rem; }
.package-hero-media { position: relative; border-radius: 1rem; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--brand-tint); }
.package-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.package-hero-media .green-flag { font-size: .9rem; }
.package-buy-box { position: sticky; top: 1rem; }
.green-offer { background: var(--brand-tint); border: 1px solid #9CC9AE; border-radius: .8rem; padding: 1rem; color: var(--brand-dark); }

/* Language switcher and Chinese font */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-right: .25rem; }
.lang-switch a { padding: .2rem .6rem; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-switch a + a { border-left: 1px solid var(--line); }
.lang-switch a.active { background: var(--brand); color: #fff; }
html:lang(zh-Hans) body, html:lang(zh-Hans) h1, html:lang(zh-Hans) h2, html:lang(zh-Hans) h3, html:lang(zh-Hans) .brand-word {
    font-family: Inter, "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
.translation-fields { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: .5rem; }
.translation-box { background: var(--ground); border: 1px solid var(--line); border-radius: .75rem; padding: .9rem; height: 100%; }

/* Floating AI assistant (Junie) */
.assistant { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.assistant-fab { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(18, 56, 36, .3);
    cursor: pointer; transition: transform .15s ease, background .15s ease; text-decoration: none; }
.assistant-fab:hover { background: var(--brand-dark); color: #fff; transform: scale(1.05); }
.assistant-fab:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.assistant-fab img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.assistant-dot { position: absolute; top: 4px; right: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--amber); border: 2px solid #fff; }
.assistant.open .assistant-dot { display: none; }
.assistant-hint { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 1rem 1rem .25rem 1rem; padding: .55rem .9rem;
    font-size: .9rem; font-weight: 500; box-shadow: 0 6px 18px rgba(18, 56, 36, .12); max-width: 240px;
    opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.assistant-hint.show, .assistant:hover .assistant-hint { opacity: 1; transform: none; }
.assistant.open .assistant-hint { display: none; }
.assistant-panel { width: min(380px, calc(100vw - 2.5rem)); height: min(600px, calc(100vh - 7rem)); background: #fff; border: 1px solid var(--line);
    border-radius: 1rem; box-shadow: 0 16px 40px rgba(18, 56, 36, .22); overflow: hidden; display: flex; flex-direction: column; order: -1; }
.assistant-panel[hidden] { display: none; }
.assistant-panel-head { background: var(--brand-dark); color: #fff; padding: .75rem .9rem; display: flex; justify-content: space-between; align-items: center; }
.assistant-panel-head .small { color: #CFE3D6; }
.assistant-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--amber); color: var(--ink); font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.assistant-avatar img { width: 100%; height: 100%; object-fit: cover; }
.assistant-icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; }
.assistant-icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.assistant-frame { flex: 1; width: 100%; border: 0; background: var(--ground); }
@media (prefers-reduced-motion: reduce) { .assistant-fab, .assistant-hint { transition: none; } }
