/* Shared visual system from the approved demos.
   Loaded after each page's own CSS. Does not rename ids or change controls. */

:root {
    --ink: #002933;
    --ink-90: #0d3a44;
    --muted: #4f6970;
    --subtle: #80959a;
    --mint: #83D7CA;
    --mint-600: #2b8f81;
    --mint-700: #1f6f64;
    --mint-100: #e8f8f5;
    --mint-50: #f3fbf9;
    --coral: #FD7899;
    --coral-700: #c23a61;
    --coral-50: #fff1f5;
    --amber: #d98a16;
    --amber-50: #fff6e8;
    --bg: #f6f9f9;
    --surface: #ffffff;
    --line: rgba(0, 41, 51, .09);
    --line-strong: rgba(0, 41, 51, .16);
    --sans: "Noto Sans HK", "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
    --display: "Noto Serif HK", "Noto Serif TC", "PingFang TC", serif;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(0, 41, 51, .05), 0 1px 1px rgba(0, 41, 51, .03);
}

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.6;
}

h1, h2, h3, .page-title {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: .01em;
    text-wrap: balance;
}

p, li, label, .lead, .page-sub, .subtitle, .summary, .eyebrow {
    text-wrap: pretty;
}

button, input, select, textarea { font-family: inherit; }

.button.primary,
a.button.primary,
button.primary,
button.btn-primary,
.nav-btn.register,
.nihao-public-nav-btn.register {
    background: var(--ink);
    color: #fff;
    border-radius: var(--r-pill);
}

.button.secondary,
a.button.secondary,
button.secondary,
.nav-btn.login {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
}

.card,
.login-card,
.auth-card,
.sec-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.eyebrow, .kicker {
    color: var(--mint-700);
    font-weight: 800;
    letter-spacing: .16em;
}

/* Public page header */
header.header,
header.site-header {
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

header.header .brand img,
header.site-header .brand img { height: 34px; width: auto; }

/* ---------- Logged-out auth column ---------- */
body:not(.has-portal-header):not(.trial-page) main.shell {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
body:not(.has-portal-header) > .container,
#loginView.login-card,
#loginView.auth-card,
body:not(.has-portal-header) main.shell > #loginView {
    width: min(440px, calc(100vw - 32px)) !important;
    max-width: 440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

body:not(.has-portal-header) > .container {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 28px 0 80px !important;
}

#authView,
#loginView.login-card,
#loginView.auth-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

#authView .logo-container,
#authView > .brand-logo,
#loginView > .logo,
#loginView > .nihao-mascot,
#loginView > .auth-mascot,
#authView > .nihao-mascot {
    align-self: flex-start;
}

#authView h1,
#authView .subtitle,
#loginView h1,
#loginView > p,
#loginView .eyebrow {
    text-align: left;
    max-width: none;
}

#authView .nihao-mascot,
#loginView .nihao-mascot,
#loginView .auth-mascot {
    width: 72px !important;
    max-width: 72px !important;
    max-height: 88px !important;
    margin: 8px 0 10px !important;
}

#authView .auth-card,
#loginView.login-card,
#loginView.auth-card {
    width: 100% !important;
    max-width: none !important;
    margin: 16px 0 0 !important;
    padding: 18px 16px 16px;
    text-align: left;
}

#authView .auth-card .btn-primary,
#loginView .primary,
#loginView .button {
    border-radius: var(--r-pill);
}

#loginView .primary,
#authView button.btn-primary:not([style*="background:#fff"]):not([style*="background: #fff"]) {
    background: var(--ink);
    color: #fff;
}

/* ---------- Candidate application shell (top tabs, no left rail) ---------- */
@media (min-width: 901px) {
    body.has-portal-header:has(#dashboardView) {
        min-height: 100vh;
        background: var(--bg);
    }
    body.has-portal-header:has(#dashboardView) > #candidatePublicHeader { display: none; }
    body.has-portal-header:has(#dashboardView) > .portal-site-header {
        position: sticky;
        top: 0;
        z-index: 80;
        background: #fff;
        border-bottom: 1px solid var(--line);
    }
    body.has-portal-header:has(#dashboardView) .portal-nav-wrap {
        background: #fff;
        border: 0;
    }
    body.has-portal-header:has(#dashboardView) .portal-nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: min(1120px, calc(100% - 48px));
        min-height: 0;
        margin: 0 auto;
        padding: 12px 0 10px;
    }
    body.has-portal-header:has(#dashboardView) .portal-nav-brand img { height: 34px; width: auto; }
    body.has-portal-header:has(#dashboardView) .portal-nav-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 0;
    }
    body.has-portal-header:has(#dashboardView) .portal-nav-menu { display: none; }
    body.has-portal-header:has(#dashboardView) .portal-nav-actions .portal-nav-btn.register {
        position: static;
        width: auto;
        left: auto;
        bottom: auto;
    }
    body.has-portal-header:has(#dashboardView) .portal-nav-actions .notification-bell {
        position: relative;
        overflow: visible;
        width: 40px;
        height: 40px;
    }
    body.has-portal-header:has(#dashboardView) .portal-nav-actions .portal-lang-wrap,
    body.has-portal-header:has(#dashboardView) .portal-nav-actions .nihao-lang {
        position: static;
    }
    body.has-portal-header:has(#dashboardView) .cand-side-card { display: none; }
    body.has-portal-header:has(#dashboardView) .portal-identity {
        background: linear-gradient(180deg, #f7fcfb 0%, #edf6f6 100%);
        border-top: 1px solid rgba(0, 41, 51, .06);
    }
    body.has-portal-header:has(#dashboardView) .portal-identity-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: min(1120px, calc(100% - 48px));
        max-width: none;
        height: auto;
        margin: 0 auto;
        padding: 10px 0 12px;
        box-sizing: border-box;
    }
    body.has-portal-header:has(#dashboardView) .portal-identity-wrap .nihao-crumb {
        margin: 0;
    }
    body.has-portal-header:has(#dashboardView) > .container {
        width: min(1120px, calc(100% - 48px));
        max-width: none;
        margin: 16px auto 0;
        padding: 0 0 48px;
        background: transparent;
        border: 0;
        box-shadow: none;
    }
}

.cand-faq-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.cand-faq-link:hover,
.cand-faq-link:focus-visible {
    border-color: var(--mint);
    background: var(--mint-50);
    color: var(--mint-700);
    outline: 0;
}
.cand-faq-link.is-on {
    border-color: var(--mint);
    background: var(--mint-100);
    color: var(--mint-700);
}
.cand-side-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--mint-50);
    text-align: left;
}
.cand-side-card > div { min-width: 0; }
.cand-side-card b,
.cand-side-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cand-side-card b { font-size: 14.5px; }
.cand-side-card small { color: var(--muted); font-size: 12px; }
.cand-side-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--mint-100);
    color: var(--mint-700);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.cand-side-avatar img,
.nihao-userchip-av img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}
.cand-side-avatar img.is-panda,
.nihao-userchip-av img.is-panda {
    object-fit: contain;
    background: #fff;
    transform: none;
}
.cand-side-avatar img.is-photo,
.nihao-userchip-av img.is-photo {
    object-fit: cover;
    object-position: center;
    transform: none;
}

.cand-page-head { margin: 0 0 12px; text-align: left; }
.cand-page-head .page-title { margin: 0; font-size: clamp(26px, 3vw, 32px); text-align: left; }
.cand-page-head .page-sub { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; text-align: left; }

body.has-portal-header .student-id-card {
    border-radius: 22px;
}
body.has-portal-header .progress-container {
    margin-bottom: 14px;
    padding: 12px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
body.has-portal-header .step { font-size: 13px; }
body.has-portal-header .step small { display: block; color: var(--subtle); font-size: 11.5px; font-weight: 600; }
body.has-portal-header .step.active .step-circle {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(131, 215, 202, .4);
}
body.has-portal-header .step.done .step-circle {
    background: var(--mint-600);
    border-color: var(--mint-600);
    color: transparent;
}
body.has-portal-header .step.done .step-circle::after {
    content: "✓";
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.cand-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .cand-layout,
    .cand-layout:has(#candidateStartNotice[hidden]) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .cand-main,
    .cand-locks,
    .cand-notice,
    .cand-lock {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .cand-notice > div { min-width: 0; flex: 1 1 auto; }
}
.cand-main { display: grid; gap: 14px; align-content: start; }
.cand-check,
.cand-lock {
    padding: 22px 22px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: left;
}
.cand-check-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cand-check-head b { font-size: 15px; }
.cand-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--mint-100);
    color: var(--mint-700);
    font-size: 12px;
    font-weight: 700;
}
.cand-progress { height: 8px; margin-top: 10px; border-radius: 999px; background: #edf2f3; overflow: hidden; }
.cand-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--mint-600)); }
.cand-list { display: grid; margin-top: 8px; }
.cand-list div { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; font-weight: 600; }
.cand-list .mark {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px dashed #c3d0d2;
}
.cand-list .mark.ok { border: 0; background: var(--mint-600); color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.cand-list .mark.ok::before { content: "✓"; }
.cand-lock h3::before { content: "🔒 "; font-size: 14px; }
.cand-list .mark.part { border: 0; background: conic-gradient(var(--mint-600) 0 60%, #e3eaeb 60% 100%); box-shadow: inset 0 0 0 5px #fff; }
.cand-list .r { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.cand-check a.btn-primary,
.cand-check .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
}
.cand-check a.btn-primary:hover,
.cand-check a.btn-primary:focus,
.cand-check a.btn-primary:visited {
    color: #fff;
    text-decoration: none;
}
.cand-locks { display: grid; gap: 16px; }
.cand-lock h3 { margin: 0 0 6px; font-size: 16px; }
.cand-lock p { margin: 0; color: var(--muted); font-size: 13.5px; }
.cand-notice {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #cdeee8;
    border-radius: 16px;
    background: var(--mint-50);
    text-align: left;
    font-size: 14px;
}
.cand-notice > span {
    display: grid;
    place-items: center;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mint-100);
    color: var(--mint-700);
    font-size: 12px;
    font-weight: 800;
}
.cand-notice b { display: block; margin-bottom: 4px; }
.cand-notice p { margin: 0; color: var(--muted); font-size: 13.5px; }

#stage1InterviewSection,
#stage2OnboardingSection,
#faqAccordionContainer {
    text-align: left;
}
#stage1InterviewSection,
#stage2OnboardingSection {
    padding: 8px 0 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
#formFieldsContainer .form-group,
#stage2OnboardingSection .form-group {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
#interviewVideoBlock .form-group {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
#formFieldsContainer input[type="file"],
#interviewVideoBlock input[type="file"],
#stage2OnboardingSection input[type="file"] {
    width: 100%;
    padding: 14px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 12px;
    background: #fff;
}
.checkbox-group label,
.radio-group label {
    border-radius: 999px;
    background: #fff;
}

.cand-bottom-nav { display: none !important; }

/* ---------- Portal shell polish ---------- */
body.nihao-sidebar {
    background: var(--bg);
}
body.nihao-sidebar .client-tab.active,
body.nihao-sidebar .teacher-tab.active {
    background: var(--mint-100) !important;
    color: var(--ink) !important;
}
body.nihao-sidebar .course-section-header h2,
body.nihao-sidebar .lessons-head h2,
body.nihao-sidebar .booking-head h2,
body.nihao-sidebar #portalView h2 {
    font-family: var(--display);
    font-size: clamp(26px, 3vw, 32px);
    text-align: left;
}
body.nihao-sidebar .portal-nav-actions .notification-bell {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}
body.nihao-sidebar #portalView .card,
body.nihao-sidebar .teacher-panel .card,
body.nihao-sidebar .client-tab-panel {
    border-radius: 16px;
}

#nihaoTopbar { display: none; }
.nihao-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
}
.nihao-userchip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.nihao-userchip-av {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--mint-100);
    color: var(--mint-700);
    font-size: 13px;
    font-weight: 800;
}
.nihao-side-name,
.nihao-side-role { display: none; }
.nihao-userchip > span:last-child { min-width: 0; max-width: 200px; }
.nihao-userchip b { display: block; overflow: hidden; font-size: 13px; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis; }
.nihao-userchip small { display: block; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }

#dashboardView .student-id-card {
    margin: 0 0 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 78%, rgba(253, 120, 153, .16), transparent 28%),
        linear-gradient(180deg, #fff 0%, #e7f8f4 100%) !important;
}
#dashboardView .student-id-head {
    display: flex;
    padding: 12px 20px 0;
    background: transparent !important;
}
#dashboardView .student-id-stripe { display: none; }
#dashboardView .student-id-badge {
    height: 26px;
    padding: 0 10px;
    letter-spacing: 0;
    font-size: 12px;
    line-height: 26px;
}
#dashboardView .student-id-email { color: var(--mint-700); font-size: 13px; }
#dashboardView .student-id-body {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 6px 20px 12px;
}
#dashboardView .student-id-photo-btn { display: none; }
#dashboardView .student-id-copy h1 {
    font-family: var(--display);
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 700;
}
#dashboardView .student-id-meta { font-size: 14px; }
#dashboardView .student-id-status {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff4d6;
    color: #9a6412;
    font-weight: 800;
}
#dashboardView .student-id-panda { display: block; width: 88px; max-width: 88px; }
@media (max-width: 900px) {
    body.has-portal-header .cand-faq-link { display: none; }
    body.has-portal-header .portal-identity-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: min(100% - 20px, 880px);
        margin: 0 auto;
        padding: 8px 0 10px;
    }
    body.has-portal-header .portal-nav {
        width: auto;
        margin: 0;
        padding: 10px 12px;
    }
    body.has-portal-header .cand-side-card { display: none; }
    body.has-portal-header > .container {
        width: min(100% - 20px, 880px);
        margin-top: 8px;
    }
}
@media (min-width: 901px) and (max-width: 1079px) {
    body.has-portal-header .cand-side-card { display: none; }
    body.has-portal-header .portal-nav {
        width: min(1120px, calc(100% - 28px));
        margin: 0 auto;
        padding: 10px 0;
    }
    body.has-portal-header .portal-nav-menu { display: none; }
}
@media (max-width: 900px) {
    #dashboardView .student-id-photo-btn { display: grid; }
    #dashboardView .student-id-head {
        gap: 8px;
        padding: 10px 12px 0;
    }
    #dashboardView .student-id-email {
        flex: 1;
        min-width: 0;
        font-size: 12px;
    }
    #dashboardView .student-id-body {
        position: relative;
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 6px 56px 12px 12px;
    }
    #dashboardView .student-id-panda {
        position: absolute;
        right: 6px;
        bottom: 4px;
        width: 44px;
        max-width: 44px;
        max-height: 52px;
        z-index: 0;
    }
    #dashboardView .student-id-copy { position: relative; z-index: 1; }
}
.cand-side-card { background: var(--mint-50); }

.nihao-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
}
.nihao-page-head h2 { margin: 0; font-size: clamp(28px, 3vw, 36px); }
.nihao-page-head p { margin: 6px 0 0; color: var(--muted); }
.nihao-page-head img { width: 84px; height: auto; }
.nihao-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, .7fr);
    gap: 16px;
    align-items: stretch;
}
.nihao-next {
    position: relative;
    min-height: 210px;
    padding: 22px 22px 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 92% 80%, rgba(253, 120, 153, .18), transparent 30%),
        linear-gradient(180deg, #fff 0%, #e7f8f4 100%);
    text-align: left;
    overflow: hidden;
}
.nihao-next .nihao-kicker {
    margin: 0 0 8px;
    color: var(--mint-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}
.nihao-next h3 { margin: 0 0 8px; font-size: 28px; text-wrap: balance; }
.nihao-next p { margin: 0; max-width: 28em; color: var(--muted); }
.nihao-next img {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 0;
    width: 84px;
    height: auto;
    pointer-events: none;
}
.nihao-next-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: calc(100% - 96px);
    margin-top: 16px;
}
.nihao-next-actions .primary,
.nihao-next-actions button,
.nihao-home-list article .ghost,
.cand-check a.btn-primary,
.cand-lock h3,
.nihao-stat span,
.nihao-page-head h2,
.cand-page-head .page-title {
    white-space: nowrap;
}
.nihao-next-actions .primary,
.nihao-next-actions button {
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    flex: 0 0 auto;
}
.nihao-next-actions .ghost,
.nihao-home-list .ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}
.nihao-next-meta { margin: 0 0 6px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.nihao-home-teacher { grid-template-columns: 1fr; }
.nihao-home-teacher .nihao-stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nihao-home-split {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, .7fr);
    gap: 16px;
    align-items: start;
}
.nihao-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 0;
}
.nihao-list-head h3 { margin: 0; padding: 0; }
.nihao-home-list h3 { margin: 0; padding: 16px 16px 0; font-size: 16px; text-align: left; }
.nihao-home-list .nihao-list-head h3 { padding: 0; }
.nihao-datechip {
    display: grid;
    place-items: center;
    width: 52px;
    min-height: 52px;
    border-radius: 14px;
    background: var(--mint-50);
    text-align: center;
}
.nihao-datechip b { font-size: 18px; line-height: 1; }
.nihao-datechip small { color: var(--muted); font-size: 11px; font-weight: 700; }
.nihao-timechip {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 14px;
    background: var(--mint-50, #f7f6f3);
    color: var(--ink, #1c2b2e);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    text-align: center;
}
.nihao-stat-row { grid-template-columns: 1fr; }
.nihao-stat strong { font-family: var(--display); font-size: 28px; }

.nihao-home-dash { display: grid; gap: 16px; margin-bottom: 20px; text-align: left; }
.nihao-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background:
        radial-gradient(circle at 94% 78%, rgba(253, 120, 153, .14), transparent 26%),
        linear-gradient(180deg, #fffdf9 0%, #e8f8f5 100%);
}
.nihao-stat-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.nihao-home-grid .nihao-stat-row { align-content: start; }
.nihao-stat {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}
.nihao-stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.nihao-stat strong { display: block; margin-top: 4px; font-size: 26px; }
.nihao-home-list { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.nihao-home-list article {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    text-align: left;
}
.nihao-home-list article div { display: grid; gap: 2px; min-width: 0; }
.nihao-home-list article div span { color: var(--muted); font-size: 13px; }
.nihao-home-list article .ghost {
    margin-left: auto;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}
.nihao-stat small { display: block; margin-top: 4px; color: var(--subtle); font-size: 12px; font-weight: 600; }
.nihao-home-list article:first-child { border-top: 0; }
.nihao-home-list article.is-old-site,
.nihao-next.is-old-site { background: #f3f4f6; }
.nihao-home-list article.is-old-site strong,
.nihao-next.is-old-site h3,
.nihao-next.is-old-site p { color: #6b7280; }
.nihao-old-site-tag { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #e5e7eb; color: #4b5563; font-style: normal; font-size: .62rem; font-weight: 800; }
.nihao-empty-note { margin: 0; padding: 22px 16px; color: var(--muted); text-align: left; }

@media (max-width: 900px) {
    .nihao-home-grid { grid-template-columns: 1fr; }
    .nihao-stat-row,
    .nihao-home-grid .nihao-stat-row,
    .nihao-home-teacher .nihao-stat-row { grid-template-columns: 1fr 1fr; }
    .nihao-home-split { grid-template-columns: 1fr; }
    .nihao-home-hero,
    .nihao-page-head { grid-template-columns: 1fr; align-items: flex-start; }
}
@media (min-width: 1080px) {
    body.nihao-sidebar .portal-site-header {
        box-sizing: border-box;
        height: 100vh;
        padding-bottom: 78px;
        overflow: hidden;
    }
    body.nihao-sidebar .client-tabs,
    body.nihao-sidebar #teacherTabs,
    body.nihao-sidebar .teacher-tabs {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }
    body.nihao-sidebar.is-home-tab #portalIdentity,
    body.nihao-sidebar.is-settings-tab #portalIdentity {
        display: block !important;
    }
    body.nihao-sidebar #nihaoTopbar {
        display: flex;
        position: fixed;
        top: 0;
        left: 252px;
        right: 0;
        z-index: 44;
        height: 64px;
        padding: 0 168px 0 32px;
        background: linear-gradient(180deg, var(--bg) 78%, rgba(246, 249, 249, 0));
        pointer-events: none;
    }
    body.nihao-sidebar #nihaoTopbar:has(.notification-bell) { padding-right: 32px; }
    body.nihao-sidebar #nihaoTopbar .nihao-userchip { pointer-events: auto; margin-left: auto; }
    body.nihao-sidebar #nihaoTopbar .nihao-topbar-end {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
        pointer-events: auto;
    }
    body.nihao-sidebar #nihaoTopbar .nihao-topbar-end .nihao-userchip { margin-left: 0; }
    body.nihao-sidebar #nihaoTopbar .notification-bell {
        position: relative;
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        overflow: visible;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        color: var(--ink);
        cursor: pointer;
        pointer-events: auto;
        box-shadow: var(--shadow-sm);
    }
    body.nihao-sidebar #nihaoTopbar .notification-bell:hover,
    body.nihao-sidebar #nihaoTopbar .notification-bell:focus-visible,
    body.nihao-sidebar #nihaoTopbar .notification-bell.is-open {
        border-color: var(--mint-500, #1f6f64);
        background: var(--mint-50, #f3fbf9);
        outline: 0;
    }
    body.nihao-sidebar .student-id-card { background: var(--mint-50) !important; }
    body.nihao-sidebar #clientGreeting { display: none; }
    body.nihao-sidebar #teacherGreeting {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal;
        font-size: 14.5px;
        font-weight: 800;
        line-height: 1.3;
    }
    body.nihao-sidebar .nihao-side-name,
    body.nihao-sidebar .nihao-side-role,
    body.nihao-sidebar .student-id-meta {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.nihao-sidebar .nihao-side-name {
        font-size: 14.5px;
        font-weight: 800;
        line-height: 1.25;
    }
    body.nihao-sidebar .nihao-side-role,
    body.nihao-sidebar .student-id-meta {
        margin: 2px 0 0;
        color: var(--muted);
        font-size: 12px;
        font-weight: 600;
    }
    body.nihao-sidebar .nihao-side-role:empty { display: none; }
    body.nihao-sidebar .portal-nav-actions #logoutButton,
    body.nihao-sidebar .portal-nav-actions #teacherLogoutButton {
        position: fixed !important;
        top: auto !important;
        right: auto !important;
        left: 14px !important;
        bottom: 18px !important;
        width: 224px !important;
        z-index: 46;
    }
    body.nihao-sidebar main.shell { padding-top: 76px !important; }
}

/* Classroom join card stays in the design system; the Zoom root is untouched. */
#zmmtg-root, #zmmtg-root * { font-family: inherit; }

/* Guides and legal pages pick up the same type and page ground. */
body.nihao-doc,
body:has(.legal-doc),
body:has(.doc-shell) {
    background: var(--bg);
}
body.nihao-doc h1, body.nihao-doc h2 { font-family: var(--display); }

.nihao-crumb {
    margin: 0 0 8px;
    color: var(--mint-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: left;
}

body:not(.has-portal-header) .logo-container,
body:not(.has-portal-header) .logo-container img,
#loginView > .logo {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}
#loginView > .logo { display: block; height: 36px; width: auto; }
#loginView .button:not(.secondary),
#loginForm > .button:not(.secondary) {
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: var(--r-pill);
}

/* Homepage matches the approved home demo. Real data stays; the demo pill does not. */
.page .hero {
    width: min(1120px, calc(100% - 48px)) !important;
    margin: 20px auto 0 !important;
    padding: 28px 24px 40px 36px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, .88fr) !important;
    align-items: center !important;
    gap: 28px !important;
    background:
        radial-gradient(circle at 86% 28%, rgba(131, 215, 202, .32), transparent 36%),
        radial-gradient(circle at 68% 96%, rgba(253, 120, 153, .14), transparent 28%),
        linear-gradient(180deg, #fff 0%, #f3fbf9 100%) !important;
}
.page .hero-copy { padding: 12px 0 8px !important; text-align: left; }
.page .hero-copy h1,
.page .hero h1 {
    max-width: 8em !important;
    margin: 0 0 14px !important;
    font-family: var(--display) !important;
    font-size: clamp(44px, 6vw, 76px) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    text-align: left;
}
.page .hero h1 em {
    font-style: normal;
    background: linear-gradient(180deg, transparent 64%, rgba(131, 215, 202, .72) 64%);
}
.page .hero-copy > p:not(.kicker) {
    max-width: 36em !important;
    margin: 0 0 22px !important;
    color: var(--muted) !important;
    font-size: 16.5px !important;
    line-height: 1.7 !important;
    text-align: left;
}
.page .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.page .hero-trust { justify-content: flex-start; }
.page .trust-bar { display: none !important; }
.page .hero-art {
    position: relative !important;
    min-height: 420px !important;
    height: auto !important;
}
.page .hero-art::before {
    display: block !important;
    content: "";
    position: absolute;
    left: 50%;
    top: 48%;
    width: min(380px, 92%);
    height: min(380px, 92%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, #fff 0%, #e8f8f5 58%, rgba(232, 248, 245, 0) 74%);
    z-index: 0;
}
.page .hero .hero-panda-wrap {
    position: absolute !important;
    inset: 10% 6% 14% !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 1;
}
.page .hero .hero-panda {
    width: min(280px, 100%) !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 auto !important;
}
.art-note-float {
    display: block !important;
    position: absolute;
    right: 0;
    bottom: 10%;
    z-index: 3;
    width: min(210px, 70%);
    padding: 14px 16px 12px;
    border: 1px solid rgba(0, 41, 51, .14);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf9, #e8f8f5);
    box-shadow: 0 18px 36px -24px rgba(0, 41, 51, .5);
    text-align: left;
    pointer-events: none;
}
.art-note-float strong {
    display: block;
    font-family: var(--display);
    font-size: 18px;
    line-height: 1.25;
}
.art-note-float span {
    display: block;
    margin-top: 6px;
    color: var(--mint-700);
    font-weight: 800;
}
.art-chip {
    position: absolute;
    left: 0;
    top: auto;
    bottom: 44%;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 220px;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-align: left;
}
.art-chip .avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mint-100);
    color: var(--mint-700);
    font-size: 12px;
    font-weight: 800;
}
.art-chip small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
html[lang="en"] .art-chip {
    left: 0;
    right: auto;
    bottom: 16%;
    max-width: 196px;
    line-height: 1.25;
}
.pricing-card {
    padding: 28px !important;
    border: 1px solid var(--line) !important;
    border-radius: 20px !important;
    background: #fff !important;
    text-align: left;
}
.pricing-card h2, .pricing-card .kicker, .pricing-lines { text-align: left; }
.nihao-404 {
    width: min(440px, calc(100% - 32px));
    margin: 48px auto 80px;
    text-align: left;
}
.nihao-404 h1 { margin: 8px 0; font-size: clamp(36px, 6vw, 52px); }
.nihao-404 p { color: var(--muted); }
.nihao-home-list article span { display: block; color: var(--muted); font-size: 13px; }

.page .nav-links > a { white-space: nowrap; }

.seo-page { background: var(--bg); color: var(--ink); }
.seo-page .seo-header { background: #fff; border-bottom: 1px solid var(--line); }
.seo-page .seo-nav, .seo-page .seo-main, .seo-page .seo-footer-inner {
    width: min(1120px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}
.seo-page .seo-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.seo-page .seo-nav .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.seo-page .seo-nav .brand img { height: 34px; width: auto; }
.seo-page .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; font-weight: 700; }
.seo-page .nav-links a { white-space: nowrap; text-decoration: none; }
.seo-page .seo-main { padding: 28px 0 72px; text-align: left; }
.seo-page .crumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; color: var(--muted); font-size: 13px; font-weight: 700; }
.seo-page .crumb a { color: var(--mint-700); text-decoration: none; }
.seo-page h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 48px); text-align: left; }
.seo-page .lead, .seo-page p, .seo-page li { text-align: left; text-wrap: pretty; }
.seo-page .lead { max-width: 40em; color: var(--muted); font-size: 16.5px; line-height: 1.7; }
.seo-page .subject-list, .seo-page .faq-list, .seo-page .contact-list { display: grid; gap: 12px; margin-top: 28px; }
.seo-page .subject-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seo-page article, .seo-page .contact-card {
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    text-align: left;
}
.seo-page article h2 { margin: 0 0 8px; font-size: 22px; text-align: left; }
.seo-page article p, .seo-page .contact-card p { margin: 0; color: var(--muted); }
.seo-page article a, .seo-page .contact-card a { color: var(--mint-700); font-weight: 700; }
.seo-page .faq-list details { padding: 4px 18px 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.seo-page .faq-list summary { padding: 12px 0; font-weight: 800; cursor: pointer; }
.seo-page .faq-list p { margin: 0 0 14px; }
.seo-page .seo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.seo-page .seo-footer { background: var(--ink); color: #fff; }
.seo-page .seo-footer-inner { display: flex; flex-wrap: wrap; gap: 18px 28px; padding: 28px 0; }
.seo-page .seo-footer a { color: #fff; text-decoration: none; font-weight: 700; }
.seo-page .seo-footer nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
@media (max-width: 780px) {
    .seo-page .seo-nav, .seo-page .seo-main, .seo-page .seo-footer-inner { width: min(100% - 28px, 640px); }
    .seo-page .nav-links > a { display: none; }
    .seo-page .subject-list { grid-template-columns: 1fr; }
    .pricing-card { padding: 22px 16px 20px !important; }
    .pricing-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .pricing-actions .button { width: 100%; min-height: 46px; white-space: normal; text-align: center; }
}

@media (max-width: 780px) {
    .page .hero {
        width: min(100% - 28px, 640px) !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        margin-top: 8px !important;
        padding: 20px 16px 16px !important;
    }
    .page .hero-copy h1,
    .page .hero h1 { font-size: clamp(40px, 11vw, 52px) !important; max-width: none !important; }
    .page .hero-art { min-height: 280px !important; }
    .page .hero .hero-panda { width: min(220px, 72%) !important; }
    .art-chip { display: none; }
    .art-note-float { right: 8px; bottom: 8px; width: min(180px, 58%); }
}
