/* ============================================
   NihaoNext — Main Stylesheet
   Design: Vermilion ink on parchment meets
   modern editorial. Noto Serif SC for
   Chinese characters, Inter for UI.
   ============================================ */

/* --- Tokens --- */
:root {
    --red:      #C0392B;   /* Vermilion — Chinese seal colour */
    --red-dark: #962D22;
    --red-pale: #FAE9E7;
    --ink:      #1A1412;   /* Warm near-black like brushed ink */
    --ink-mid:  #4A3F3B;
    --ink-soft: #8C7B76;
    --parch:    #FBF7F2;   /* Parchment background */
    --parch-2:  #F5EFE8;
    --white:    #FFFFFF;
    --gold:     #B8922A;   /* Restrained accent */
    --border:   rgba(26,20,18,0.1);

    --font-serif:  'Noto Serif SC', Georgia, serif;
    --font-body:   'Inter', system-ui, sans-serif;
    --font-zh:     'Noto Sans SC', sans-serif;

    --radius:   4px;
    --radius-lg: 8px;
    --shadow:   0 2px 16px rgba(26,20,18,0.08);
    --shadow-lg: 0 8px 40px rgba(26,20,18,0.12);

    --max-w: 1280px;
    --nav-h: 64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--parch);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.2;
    font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; font-weight: 600; font-family: var(--font-body); }
p  { color: var(--ink-mid); }

/* ============================================
   HEADER & NAV — CLEAN REWRITE
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: var(--white);
    border-bottom: 2px solid var(--red);
    box-shadow: var(--shadow);
    overflow: visible;
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0;
    overflow: visible;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-right: 1rem;
}
.logo-char {
    font-family: var(--font-zh);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    background: var(--red);
    color: var(--white);
    padding: 0.22em 0.32em;
    border-radius: var(--radius);
}
.logo-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

/* Main nav — takes remaining space */
.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

/* Nav list */
.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0; padding: 0;
    flex: 1;
    min-width: 0;
}
.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ink-mid);
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}
.nav-link:hover, .nav-link.active {
    color: var(--red);
    background: var(--red-pale);
}
.nav-link.active { font-weight: 600; }
.chev {
    flex-shrink: 0;
    opacity: 0.45;
    transition: transform 0.22s, opacity 0.22s;
}
.nav-item:hover .chev, .nav-link.active .chev {
    transform: rotate(180deg);
    opacity: 1;
}

/* Right cluster */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Search */
.nav-search {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--parch-2);
    overflow: hidden;
    transition: border-color 0.2s;
}
.nav-search:focus-within { border-color: var(--red); }
.nav-search-input {
    border: none;
    background: transparent;
    padding: 0.28rem 0.6rem;
    font-size: 0.78rem;
    width: 100px;
    outline: none;
    font-family: var(--font-body);
    color: var(--ink);
}
.nav-search-btn {
    background: none; border: none;
    padding: 0.28rem 0.55rem;
    cursor: pointer; color: var(--ink-soft);
    display: flex; align-items: center;
}
.nav-search-btn:hover { color: var(--red); }

/* Sign in / CTA */
.nav-signin {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-mid);
    border-radius: var(--radius);
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}
.nav-signin:hover { color: var(--red); background: var(--red-pale); }
.nav-cta {
    padding: 0.45rem 0.9rem;
    background: var(--red);
    color: var(--white) !important;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--red-dark); }

/* Avatar */
.nav-account-wrap { position: relative; }
.nav-avatar-btn { display: flex; align-items: center; }
.nav-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-weight: 700; font-size: 0.82rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none; border: none;
    padding: 4px;
    margin-left: auto;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--ink); border-radius: 2px;
    transition: all 0.3s;
}

/* ---- DROPDOWNS ---- */
/* ---- DROPDOWNS — JS controlled via .is-open class ---- */
.dd {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border: 1.5px solid rgba(26,20,18,0.11);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px rgba(26,20,18,0.15);
    z-index: 9999;
    min-width: 460px;
    animation: ddIn 0.15s ease;
}
.dd-narrow { min-width: 300px; }
.dd-right  { left: auto; right: 0; transform: none; }

@keyframes ddIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.dd-right.is-open { animation: ddInRight 0.15s ease; }
@keyframes ddInRight {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Only show when JS adds .is-open */
.nav-item.is-open > .dd,
.nav-account-wrap.is-open > .dd { display: block; }

/* Arrow tip */
.dd::before {
    content: '';
    position: absolute;
    top: -7px; left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(26,20,18,0.11);
    border-top: none;
}
.dd::after {
    content: '';
    position: absolute;
    top: -5px; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--white);
    border-top: none;
}
.dd-right::before, .dd-right::after { left: auto; right: 18px; transform: none; }

.dd-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 1.1rem;
    gap: 0;
}
.dd-single { grid-template-columns: 1fr; }
.dd-col { padding: 0 0.6rem; }
.dd-col + .dd-col { border-left: 1px solid var(--border); }

.dd-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    padding-bottom: 0.4rem;
    margin-bottom: 0.2rem;
    border-bottom: 1px solid var(--border);
}
.dd-link {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.4rem;
    border-radius: var(--radius);
    color: inherit;
    transition: background 0.14s;
}
.dd-link:hover { background: var(--parch-2); }
.dd-link:hover strong { color: var(--red); }
.ddi { font-size: 1rem; line-height: 1.45; flex-shrink: 0; width: 22px; text-align: center; }
.dd-link span { display: flex; flex-direction: column; gap: 0.08rem; }
.dd-link strong { font-size: 0.85rem; font-weight: 600; color: var(--ink); display: block; transition: color 0.14s; }
.dd-link em { font-style: normal; font-size: 0.75rem; color: var(--ink-soft); display: block; }

/* ============================================
   MOBILE NAV
   ============================================ */
@media (max-width: 960px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--white);
        border-bottom: 2px solid var(--red);
        padding: 0.75rem 1.25rem 1.25rem;
        box-shadow: var(--shadow-lg);
        max-height: 80vh;
        overflow-y: auto;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
    }
    .main-nav.open { display: flex; }
    .nav-list { flex-direction: column; width: 100%; }
    .nav-item { width: 100%; }
    .nav-link {
        padding: 0.7rem 0.5rem;
        font-size: 0.92rem;
        justify-content: space-between;
        width: 100%;
    }
    .chev { margin-left: auto; }
    /* Mobile: hidden by default, JS adds .is-open to parent */
    .dd {
        display: none !important;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-top: 1px solid var(--border) !important;
        border-radius: 0 !important;
        min-width: 100% !important;
        animation: none !important;
        background: var(--parch) !important;
    }
    .dd::before, .dd::after { display: none; }
    .nav-item.is-open > .dd,
    .nav-account-wrap.is-open > .dd { display: block !important; }
    .dd-inner { grid-template-columns: 1fr; }
    .dd-col + .dd-col { border-left: none; border-top: 1px solid var(--border); }
    .nav-right {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-left: 0;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
        width: 100%;
    }
    .nav-search { width: 100%; border-radius: var(--radius); }
    .nav-search-input { flex: 1; width: auto; }
    .nav-signin, .nav-cta {
        display: block;
        text-align: center;
        padding: 0.8rem;
        width: 100%;
    }
    .nav-account-wrap { width: 100%; }
    .nav-account-wrap .dd { position: static !important; transform: none !important; }
}

@media (max-width: 480px) {
    .logo-text { display: none; }
}



/* ============================================
   HOMEPAGE HERO
   ============================================ */
.hero {
    min-height: calc(90vh - var(--nav-h));
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 4rem 1.5rem;
    gap: 4rem;
}
.hero-content { max-width: 580px; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-zh);
    font-size: 0.85rem;
    color: var(--red);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.hero-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--red);
}
.hero h1 {
    margin-bottom: 1.25rem;
    color: var(--ink);
}
.hero h1 em {
    font-style: normal;
    color: var(--red);
}
.hero-desc {
    font-size: 1.1rem;
    color: var(--ink-mid);
    margin-bottom: 2.25rem;
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.btn-primary {
    padding: 0.85rem 1.75rem;
    background: var(--red);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    display: inline-block;
}
.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192,57,43,0.3);
}
.btn-secondary {
    padding: 0.85rem 1.75rem;
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    transition: border-color 0.2s, color 0.2s;
    display: inline-block;
}
.btn-secondary:hover {
    border-color: var(--ink-mid);
    color: var(--ink);
}
.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.stat-num {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero visual — large decorative Chinese character */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.hero-character {
    font-family: var(--font-zh);
    font-size: clamp(10rem, 18vw, 18rem);
    color: transparent;
    -webkit-text-stroke: 2px var(--border);
    position: relative;
    z-index: 1;
    line-height: 1;
    user-select: none;
}
.hero-character::after {
    content: attr(data-char);
    position: absolute;
    inset: 0;
    color: var(--red);
    opacity: 0.07;
    -webkit-text-stroke: 0;
}
.hero-card {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    border-left: 3px solid var(--red);
}
.hero-card.card-1 { top: 10%; right: 0; }
.hero-card.card-2 { bottom: 15%; left: 0; }
.hero-card .zh { font-family: var(--font-zh); font-size: 1.4rem; color: var(--red); display: block; }
.hero-card .py { color: var(--ink-soft); font-size: 0.78rem; }
.hero-card .en { color: var(--ink); font-weight: 500; }

/* ============================================
   SECTION SHARED
   ============================================ */
.section {
    padding: 5rem 1.5rem;
}
.section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    margin-bottom: 0.75rem;
}
.section-header {
    max-width: 600px;
    margin-bottom: 3rem;
}
.section-header p {
    margin-top: 0.75rem;
    font-size: 1.05rem;
}
.section-alt { background: var(--parch-2); }

/* ============================================
   NAV PILLARS / CATEGORY CARDS
   ============================================ */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.pillar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pillar-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.pillar-icon {
    font-size: 2rem;
    line-height: 1;
}
.pillar-zh {
    font-family: var(--font-zh);
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 500;
}
.pillar-card h3 {
    color: var(--ink);
}
.pillar-card p {
    font-size: 0.9rem;
    flex-grow: 1;
}
.pillar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--red);
    margin-top: 0.5rem;
}
.pillar-link:hover { gap: 0.5rem; }

/* ============================================
   LESSON CARDS
   ============================================ */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.lesson-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1.5px solid var(--border);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.lesson-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.lesson-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-beginner    { background: #e8f5e9; color: #2e7d32; }
.badge-intermediate { background: #fff3e0; color: #e65100; }
.badge-advanced    { background: #fce4ec; color: #c62828; }
.duration {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-left: auto;
}
.lesson-card h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.lesson-card .zh-sub {
    font-family: var(--font-zh);
    font-size: 0.85rem;
    color: var(--red);
    margin-bottom: 0.75rem;
}
.lesson-card p { font-size: 0.88rem; flex-grow: 1; }
.lesson-card a.card-link {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--red);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.lesson-card a.card-link:hover { gap: 0.5rem; }

/* ============================================
   VOCABULARY STRIP
   ============================================ */
.vocab-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.vocab-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s;
}
.vocab-card:hover { border-color: var(--red); }
.vocab-zh {
    font-family: var(--font-zh);
    font-size: 2rem;
    color: var(--red);
    display: block;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.vocab-py {
    font-size: 0.8rem;
    color: var(--ink-soft);
    display: block;
    margin-bottom: 0.35rem;
}
.vocab-en {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink);
}

/* ============================================
   EXAM CARDS
   ============================================ */
.exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.exam-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    border: 1.5px solid var(--border);
    transition: box-shadow 0.2s, transform 0.2s;
}
.exam-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.exam-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.exam-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--red);
    font-weight: 700;
}
.exam-full { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 1rem; }
.exam-card p { font-size: 0.9rem; margin-bottom: 1rem; }
.exam-levels {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--ink-soft);
    background: var(--parch-2);
    padding: 0.3em 0.75em;
    border-radius: 20px;
}
.exam-levels strong { color: var(--ink); }

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1.5px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.testimonial-quote {
    font-size: 0.95rem;
    color: var(--ink-mid);
    line-height: 1.7;
    flex-grow: 1;
    position: relative;
    padding-left: 1rem;
}
.testimonial-quote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--red);
    border-radius: 2px;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.author-name { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.author-country { font-size: 0.78rem; color: var(--ink-soft); }
.stars { color: var(--gold); font-size: 0.85rem; }

/* ============================================
   PAGE HERO (inner pages)
   ============================================ */
.page-hero {
    background: var(--ink);
    color: var(--white);
    padding: 4rem 1.5rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: attr(data-char);
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-zh);
    font-size: clamp(8rem, 15vw, 14rem);
    color: rgba(255,255,255,0.04);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.page-hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.page-hero .section-label { color: var(--red); opacity: 1; }
.page-hero h1 { color: var(--white); margin-bottom: 1rem; }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 560px; }
.page-hero .zh-accent {
    font-family: var(--font-zh);
    font-size: 1rem;
    color: rgba(255,255,255,0.4);
    margin-top: 1.5rem;
    display: block;
}

/* ============================================
   INFO BOX
   ============================================ */
.info-box {
    background: var(--red-pale);
    border-left: 4px solid var(--red);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.info-box p { color: var(--ink-mid); font-size: 0.92rem; }
.info-box strong { color: var(--red); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.7);
    padding: 4rem 1.5rem 0;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo-char { background: var(--red); }
.footer-brand .logo-text { color: var(--white); }
.footer-brand p {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
}
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.footer-col h4 {
    color: var(--white);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.3);
}
.footer-zh { font-family: var(--font-zh); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 3rem 1.5rem;
        text-align: center;
    }
    .hero-stats { justify-content: center; }
    .hero-actions { justify-content: center; }
    .hero-visual { display: none; }
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--white);
        border-bottom: 2px solid var(--red);
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: var(--shadow-lg);
        max-height: 85vh;
        overflow-y: auto;
        z-index: 999;
    }
    .main-nav.open { display: block; }
    .nav-list { flex-direction: column; gap: 0; width: 100%; }
    .nav-item { width: 100%; }
    .nav-link { flex-direction: row; gap: 0.75rem; padding: 0.75rem; align-items: center; width: 100%; justify-content: flex-start; font-size: 0.92rem; }
    .nav-chevron { margin-left: auto; }
    /* Mobile dropdowns — static */
    .dropdown {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-top: 1px solid var(--border) !important;
        border-radius: 0 !important;
        min-width: 100% !important;
        transition: none !important;
        background: var(--parch) !important;
        display: none;
    }
    .nav-item:hover > .dropdown,
    .nav-item:focus-within > .dropdown { display: block; }
    .dropdown::before, .dropdown::after { display: none; }
    .dropdown-inner { grid-template-columns: 1fr; }
    .dropdown-group + .dropdown-group { border-left: none; border-top: 1px solid var(--border); }
    .nav-search { margin: 0.75rem 0 0; width: 100%; border-radius: var(--radius); }
    .nav-search-input { width: 100%; flex: 1; }
    .nav-signin, .nav-cta { display: block; text-align: center; margin: 0.5rem 0 0; padding: 0.85rem; width: 100%; }
    .nav-account { width: 100%; }
    .nav-account-btn { padding: 0.75rem 0; display: block; }
    .footer-nav { grid-template-columns: 1fr; }
    .section { padding: 3.5rem 1.25rem; }
}

/* old mobile block removed — see MOBILE NAV above */

/* ============================================
   ARTICLE BODY & CONTENT PAGES
   ============================================ */
.article-body {
    max-width: 820px;
}
.article-body h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    color: var(--ink);
}
.article-body h2:first-child { margin-top: 0; }
.article-body p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.1rem;
    color: var(--ink-mid);
}
.article-body p strong { color: var(--ink); }

/* Content grid (2-col cards) */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}
.content-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.cc-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.content-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.content-card p { font-size: 0.9rem; }

/* Steps */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0 2rem;
    border-left: 2px solid var(--red);
    padding-left: 0;
}
.step {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    min-width: 70px;
    padding-top: 0.15rem;
}
.step-body strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 0.35rem; }
.step-body p { font-size: 0.92rem; margin-bottom: 0; }

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0 2rem;
}
.timeline-item {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.tl-marker {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--red);
    min-width: 90px;
    font-size: 0.9rem;
    padding-top: 0.1rem;
}
.tl-body { font-size: 0.92rem; color: var(--ink-mid); }

/* Phrase lists */
.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0 2rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.phrase-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.phrase-item:last-child { border-bottom: none; }
.phrase-item:hover { background: var(--parch-2); }
.phrase-zh {
    font-family: var(--font-zh);
    font-size: 1.15rem;
    color: var(--ink);
    font-weight: 500;
}
.phrase-py {
    font-size: 0.82rem;
    color: var(--red);
}
.phrase-en {
    font-size: 0.88rem;
    color: var(--ink-soft);
}

/* Tone cards */
.tone-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0 2.5rem;
}
.tone-card {
    display: grid;
    grid-template-columns: 120px 80px 1fr;
    align-items: center;
    gap: 1.5rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
}
.tone-header { display: flex; flex-direction: column; gap: 0.2rem; }
.tone-num { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.tone-mark { font-size: 2.5rem; font-family: var(--font-serif); color: var(--red); line-height: 1; }
.tone-zh { font-family: var(--font-zh); font-size: 0.8rem; color: var(--ink-soft); }
.tone-svg { width: 80px; height: 50px; }
.tone-desc strong { display: block; color: var(--ink); font-size: 0.95rem; margin-bottom: 0.35rem; }
.tone-desc p { font-size: 0.88rem; margin-bottom: 0.5rem; }
.tone-examples { font-size: 0.82rem; color: var(--ink-soft); }
.tone-examples .zh { font-family: var(--font-zh); color: var(--red); font-size: 1rem; }

/* Exam overview stats */
.exam-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 2.5rem;
    background: var(--parch-2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.exam-stat { text-align: center; }
.es-num {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--red);
    line-height: 1;
}
.es-label {
    font-size: 0.78rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
    display: block;
}

/* Vocab categories */
.vocab-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}
.vocab-cat h4 {
    font-size: 0.88rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.vocab-strip-sm {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.vocab-card-sm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    color: var(--ink-mid);
}
.vocab-card-sm .zh {
    font-family: var(--font-zh);
    font-size: 1.05rem;
    color: var(--red);
}

/* CTA block */
.cta-block {
    background: var(--parch-2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 3rem;
    border-left: 4px solid var(--red);
}
.cta-block h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.cta-block p { margin-bottom: 1.25rem; }

/* Responsive tone cards */
@media (max-width: 700px) {
    .tone-card { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
    .tone-shape { display: none; }
    .exam-overview { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   DIALOGUE BLOCKS
   ============================================ */
.dialogue-block {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1.5rem 0 2.5rem;
}
.dialogue-line {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.dialogue-line:last-child { border-bottom: none; }
.dialogue-line.speaker-a { background: var(--white); }
.dialogue-line.speaker-b { background: var(--parch-2); }
.speaker-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
    background: var(--red-pale);
    padding: 0.25em 0.5em;
    border-radius: var(--radius);
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 0.3rem;
    min-width: 42px;
    text-align: center;
    font-family: var(--font-zh);
}
.dl-content { flex: 1; }
.dl-content .phrase-zh { font-family: var(--font-zh); font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.dl-content .phrase-py { font-size: 0.8rem; color: var(--red); margin: 0.15rem 0; }
.dl-content .phrase-en { font-size: 0.85rem; color: var(--ink-soft); }

/* Character grid */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
}
.char-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    transition: border-color 0.2s, transform 0.15s;
}
.char-card:hover { border-color: var(--red); transform: translateY(-2px); }
.char-big {
    font-family: var(--font-zh);
    font-size: 2rem;
    color: var(--red);
    line-height: 1;
    display: block;
}
.char-py { font-size: 0.72rem; color: var(--ink-soft); display: block; }
.char-en { font-size: 0.72rem; color: var(--ink-mid); display: block; }

/* ============================================
   DICTIONARY
   ============================================ */
.dict-search-form { max-width: 700px; margin: 0 auto 2rem; }
.dict-search-bar { display: flex; gap: 0; box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); overflow: hidden; }
.dict-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    background: var(--white);
    color: var(--ink);
}
.dict-input:focus { border-color: var(--red); }
.dict-btn {
    padding: 1rem 1.5rem;
    background: var(--red);
    color: var(--white);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-family: var(--font-body);
    transition: background 0.2s;
    white-space: nowrap;
}
.dict-btn:hover { background: var(--red-dark); }
.dict-hints { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; font-size: 0.82rem; color: var(--ink-soft); }
.dict-hint {
    padding: 0.25em 0.75em;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--ink-mid);
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
}
.dict-hint:hover { border-color: var(--red); color: var(--red); }

.dict-results-header { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 1rem; }
.dict-results { display: flex; flex-direction: column; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.dict-entry {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
    transition: background 0.15s;
}
.dict-entry:last-child { border-bottom: none; }
.dict-entry:hover { background: var(--parch-2); }
.dict-chinese { font-family: var(--font-zh); font-size: 2rem; color: var(--red); line-height: 1; display: block; margin-bottom: 0.35rem; }
.dict-info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.dict-pinyin { font-size: 0.88rem; color: var(--red); font-weight: 500; }
.dict-pos { font-size: 0.72rem; color: var(--white); background: var(--ink-soft); padding: 0.15em 0.5em; border-radius: 3px; }
.dict-hsk { font-size: 0.72rem; color: var(--red); background: var(--red-pale); padding: 0.15em 0.5em; border-radius: 3px; font-weight: 600; }
.dict-english { font-size: 1rem; color: var(--ink); font-weight: 500; }
.dict-example { border-left: 3px solid var(--border); padding-left: 1rem; }
.dict-ex-zh { font-family: var(--font-zh); font-size: 0.95rem; color: var(--ink); }
.dict-ex-py { font-size: 0.78rem; color: var(--red); margin: 0.2rem 0; }
.dict-ex-en { font-size: 0.82rem; color: var(--ink-soft); }
.dict-no-results { text-align: center; padding: 4rem 2rem; color: var(--ink-mid); }
.dict-cats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.dict-cat-pill {
    padding: 0.5em 1em;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--ink-mid);
    transition: all 0.15s;
    text-decoration: none;
}
.dict-cat-pill:hover { border-color: var(--red); color: var(--red); background: var(--red-pale); }

@media(max-width:600px) {
    .dict-entry { grid-template-columns: 1fr; }
}

/* ============================================
   FLASHCARDS
   ============================================ */
.fc-study-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.fc-back { font-size: 0.88rem; color: var(--red); text-decoration: none; font-weight: 500; }
.fc-back:hover { text-decoration: underline; }
.fc-progress-bar { height: 6px; background: var(--parch-2); border-radius: 3px; margin-bottom: 0.5rem; overflow: hidden; }
.fc-progress-fill { height: 100%; background: var(--red); border-radius: 3px; transition: width 0.4s ease; width: 0%; }
.fc-counter { text-align: center; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 2rem; }

.fc-card-area { perspective: 1000px; margin: 0 auto 1.5rem; max-width: 560px; }
.fc-card {
    width: 100%;
    height: 260px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
    border-radius: var(--radius-lg);
}
.fc-card.is-flipped { transform: rotateY(180deg); }
.fc-card.fc-flash-correct { animation: flashGreen 0.35s ease; }
.fc-card.fc-flash-wrong  { animation: flashRed  0.35s ease; }
@keyframes flashGreen { 0%,100%{} 50%{box-shadow:0 0 0 4px #27ae60;} }
@keyframes flashRed   { 0%,100%{} 50%{box-shadow:0 0 0 4px #c0392b;} }

.fc-front, .fc-back {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2rem;
    border: 1.5px solid var(--border);
    text-align: center;
}
.fc-front { background: var(--white); }
.fc-back { background: var(--parch-2); transform: rotateY(180deg); }
.fc-hint { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 1rem; }
.fc-zh { font-family: var(--font-zh); font-size: clamp(3rem, 10vw, 5rem); color: var(--red); line-height: 1; }
.fc-zh-small { font-family: var(--font-zh); font-size: 1.8rem; color: var(--red); margin-bottom: 0.5rem; }
.fc-py { font-size: 1rem; color: var(--ink-mid); margin-bottom: 0.35rem; }
.fc-en { font-size: 1.25rem; font-weight: 600; color: var(--ink); margin-bottom: 0.75rem; }
.fc-example { font-size: 0.78rem; color: var(--ink-soft); max-width: 380px; }

.fc-controls { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.fc-btn {
    padding: 0.7rem 1.75rem; border: none; border-radius: var(--radius);
    font-size: 0.92rem; font-weight: 600; cursor: pointer; font-family: var(--font-body);
    transition: transform 0.15s, opacity 0.15s;
}
.fc-btn:hover { transform: translateY(-2px); }
.fc-wrong  { background: #fce4ec; color: #c62828; }
.fc-skip   { background: var(--parch-2); color: var(--ink-mid); border: 1.5px solid var(--border); }
.fc-correct{ background: #e8f5e9; color: #2e7d32; }
.fc-stats  { text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
.fc-stats span { font-weight: 600; color: var(--ink); }
.fc-complete { text-align: center; padding: 3rem 1rem; }
.fc-complete h3 { font-size: 1.75rem; margin: 1rem 0 0.5rem; }

/* Flashcard set selection */
.fc-sets-grid { display: flex; flex-direction: column; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.fc-set-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.fc-set-card:last-child { border-bottom: none; }
.fc-set-card:hover { background: var(--parch-2); }
.fc-set-icon { font-size: 1.8rem; flex-shrink: 0; width: 40px; text-align: center; }
.fc-set-info { flex: 1; }
.fc-set-info h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.fc-set-info p { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.fc-set-meta { display: flex; align-items: center; gap: 0.5rem; }
.fc-card-count { font-size: 0.78rem; color: var(--ink-soft); }
.fc-set-arrow { font-size: 1.2rem; color: var(--red); flex-shrink: 0; }

/* ============================================
   PHRASEBOOK
   ============================================ */
.pb-tabs {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem;
    border-bottom: 2px solid var(--border); padding-bottom: 0;
}
.pb-tab {
    padding: 0.6rem 1.1rem; font-size: 0.88rem; font-weight: 500;
    color: var(--ink-mid); text-decoration: none; border-radius: var(--radius) var(--radius) 0 0;
    transition: background 0.15s, color 0.15s;
    border: 1.5px solid transparent; border-bottom: none; margin-bottom: -2px;
}
.pb-tab:hover { color: var(--red); background: var(--red-pale); }
.pb-tab-active { color: var(--red); background: var(--white); border-color: var(--border); border-bottom-color: var(--white); font-weight: 600; }

.pb-subheading {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ink-soft); margin: 1.75rem 0 0.75rem; padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.pb-subheading:first-child { margin-top: 0; }
.pb-phrases { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; }
.pb-phrase {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem; cursor: pointer; transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.pb-phrase:hover { border-color: var(--red); }
.pb-phrase.pb-highlighted { background: var(--red-pale); border-color: var(--red); }
.pb-phrase-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; }
.pb-zh { font-family: var(--font-zh); font-size: 1.2rem; color: var(--ink); font-weight: 500; }
.pb-py { font-size: 0.8rem; color: var(--red); margin-bottom: 0.2rem; }
.pb-en { font-size: 0.9rem; color: var(--ink-mid); }
.pb-note { font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }

/* ============================================
   WORD OF THE DAY
   ============================================ */
.wod-section {
    background: var(--ink);
    padding: 1.75rem 1.5rem;
}
.wod-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.wod-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    flex-shrink: 0;
}
.wod-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    flex-wrap: wrap;
}
.wod-char {
    font-family: var(--font-zh);
    font-size: 2.5rem;
    color: var(--red);
    line-height: 1;
    flex-shrink: 0;
}
.wod-detail { flex: 1; min-width: 160px; }
.wod-pinyin { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 0.15rem; }
.wod-english { font-size: 1.05rem; font-weight: 600; color: var(--white); }
.wod-example { margin-top: 0.35rem; }
.wod-ex-zh { font-family: var(--font-zh); font-size: 0.82rem; color: rgba(255,255,255,0.5); display: block; }
.wod-ex-en { font-size: 0.78rem; color: rgba(255,255,255,0.35); display: block; }
.wod-hsk {
    background: var(--red);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    flex-shrink: 0;
}
.wod-link {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    transition: color 0.2s;
    flex-shrink: 0;
}
.wod-link:hover { color: var(--white); }

/* ============================================
   TOOLS STRIP (homepage)
   ============================================ */
.tools-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.tool-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tool-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.tool-icon { font-size: 2rem; line-height: 1; }
.tool-card h3 { font-size: 1.1rem; color: var(--ink); }
.tool-card p { font-size: 0.88rem; color: var(--ink-soft); flex-grow: 1; }
.tool-link { font-size: 0.85rem; font-weight: 600; color: var(--red); margin-top: 0.5rem; }

/* ============================================
   BLOG
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.blog-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.blog-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.blog-cat {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
}
.blog-card h2 {
    font-size: 1.2rem;
    color: var(--ink);
    line-height: 1.35;
}
.blog-card p {
    font-size: 0.9rem;
    color: var(--ink-soft);
    flex-grow: 1;
    line-height: 1.65;
}
.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.blog-read-link { color: var(--red); font-weight: 600; }

/* ============================================
   QUIZ
   ============================================ */
.quiz-setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}
.quiz-setup-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.quiz-setup-card h3 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--ink); }
.quiz-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quiz-opt-btn {
    padding: 0.45em 0.9em;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.15s;
    color: var(--ink-mid);
}
.quiz-opt-btn.active { background: var(--red); border-color: var(--red); color: var(--white); font-weight: 600; }
.quiz-opt-btn:hover:not(.active) { border-color: var(--red); color: var(--red); }

.quiz-header { margin-bottom: 1.5rem; }
.quiz-question-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.quiz-q-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 1rem; }
.quiz-q-word { font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: 700; color: var(--ink); margin-bottom: 0.35rem; line-height: 1.2; }
.quiz-q-sub { font-size: 0.9rem; color: var(--red); }
.quiz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.quiz-answer-btn {
    padding: 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    font-size: 0.95rem;
    cursor: pointer;
    font-family: var(--font-body);
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    color: var(--ink);
    min-height: 64px;
}
.quiz-answer-btn:hover:not(:disabled) { border-color: var(--red); background: var(--red-pale); }
.quiz-answer-btn.qa-correct { border-color: #27ae60; background: #e8f5e9; color: #1a5c30; }
.quiz-answer-btn.qa-wrong  { border-color: #c0392b; background: #fce4ec; color: #7b1a1a; }
.quiz-feedback {
    background: var(--parch-2);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    text-align: center;
    margin-top: 0.5rem;
}
.quiz-score-circle {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: var(--red);
    margin: 1rem 0;
}
.quiz-wrong-list {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}
@media(max-width:500px) {
    .quiz-answers { grid-template-columns: 1fr; }
}

/* ============================================
   AUTH / ACCOUNT
   ============================================ */
.auth-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 1rem; }
.auth-error {
    background: #fce4ec;
    border-left: 4px solid #c0392b;
    color: #7b1a1a;
    padding: 0.75rem 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
}
.auth-form input, .auth-form select {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.15s;
}
.auth-form input:focus, .auth-form select:focus { border-color: var(--red); }

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.dash-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}
.dash-card h3 { margin-bottom: 0.5rem; }
.dash-card p { font-size: 0.9rem; }

/* nav search, account, signin — defined in HEADER & NAV section above */

/* Pinyin chart */
.pinyin-table { display: flex; flex-direction: column; gap: 1.5rem; margin: 1.5rem 0 2rem; }
.py-group { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.py-group-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--white); background: var(--ink); padding: 0.5rem 1rem; }
.py-cells { display: flex; flex-wrap: wrap; gap: 0; }
.py-cell { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 200px; flex: 1; }
.py-char { font-family: var(--font-zh); font-size: 1.4rem; color: var(--red); font-weight: 700; flex-shrink: 0; min-width: 28px; }
.py-note { font-size: 0.8rem; color: var(--ink-soft); }
.common-syllables { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 2rem; }
.syl-chip { font-size: 0.88rem; padding: 0.3em 0.7em; background: var(--white); border: 1px solid var(--border); border-radius: 4px; color: var(--ink-mid); font-family: var(--font-zh); }

/* Dictionary category enhancements */
.dict-cat-count {
    display: inline-block;
    background: rgba(26,20,18,0.08);
    border-radius: 20px;
    font-size: 0.68rem;
    padding: 0.1em 0.45em;
    margin-left: 0.25rem;
    color: var(--ink-soft);
}
.dict-cat-active { background: var(--red) !important; color: var(--white) !important; border-color: var(--red) !important; }
.dict-cat-active .dict-cat-count { background: rgba(255,255,255,0.25); color: var(--white); }
.dict-cat-tag {
    font-size: 0.7rem;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    background: var(--parch-2);
    color: var(--ink-soft);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.dict-cat-tag:hover { background: var(--red-pale); color: var(--red); }

/* ============================================
   SPEAK / TTS BUTTONS
   ============================================ */
.speak-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--ink-soft);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    padding: 0;
}
.speak-btn:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-pale);
    transform: scale(1.1);
}
.speak-btn.speaking {
    border-color: var(--red);
    background: var(--red);
    color: var(--white);
    animation: speakPulse 0.6s ease infinite alternate;
}
@keyframes speakPulse {
    from { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
    to   { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}
.speak-btn-sm {
    width: 28px; height: 28px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.2rem;
}

/* Dict word row — chinese + speak button side by side */
.dict-word-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}
/* Example row — text + speak button */
.dict-ex-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    justify-content: space-between;
}

/* TTS status banner */
.tts-banner {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.88rem;
}
.tts-banner-warn { background: #fff3e0; color: #e65100; border-left: 4px solid #e65100; }
.tts-banner-info { background: var(--parch-2); color: var(--ink-mid); border-left: 4px solid var(--border); }

.tts-hint {
    font-size: 0.78rem;
    margin-left: 1rem;
}

/* Make dict-chinese show pointer cursor */
.dict-chinese { cursor: pointer; }
.dict-chinese:hover { color: var(--red-dark); }

/* Phrasebook speak button */
.pb-speak-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-soft);
    flex-shrink: 0;
    transition: all 0.2s;
    padding: 0;
}
.pb-speak-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-pale); }
.pb-speak-btn.speaking { background: var(--red); color: var(--white); border-color: var(--red); animation: speakPulse 0.6s ease infinite alternate; }

/* Flashcard speak button */
.fc-speak-btn {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--ink-soft);
    transition: all 0.2s;
    padding: 0;
}
.fc-speak-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-pale); }
.fc-speak-btn.speaking { background: var(--red); color: var(--white); border-color: var(--red); }

/* ============================================
   PINYIN CHART
   ============================================ */
.py-tone-selector { margin-bottom:2rem; }
.py-tone-label { font-size:0.82rem;font-weight:600;color:var(--ink-soft);text-transform:uppercase;letter-spacing:0.08em;display:block;margin-bottom:0.75rem; }
.py-tone-btns { display:flex;gap:0.5rem;flex-wrap:wrap; }
.py-tone-btn {
    padding:0.5rem 1rem;border:1.5px solid var(--border);border-radius:var(--radius);
    background:var(--white);font-family:var(--font-body);font-size:0.85rem;cursor:pointer;
    display:flex;align-items:center;gap:0.5rem;transition:all 0.15s;color:var(--ink-mid);
}
.py-tone-btn em { font-style:normal;font-size:0.75rem;color:var(--ink-soft); }
.py-tone-mark { font-family:var(--font-zh);font-size:1.2rem;color:var(--red);line-height:1; }
.py-tone-btn.active { border-color:var(--red);background:var(--red-pale);color:var(--red); }
.py-tone-btn.active em { color:var(--red); }
.py-tone-btn:hover:not(.active) { border-color:var(--red);color:var(--red); }

.py-chart-wrap { overflow-x:auto;margin-bottom:2rem; }
.py-chart { border-collapse:collapse;font-size:0.82rem;width:100%; }
.py-th-corner { background:var(--ink);color:var(--white);padding:0.5rem 0.75rem;font-size:0.72rem;white-space:nowrap;position:sticky;left:0;z-index:2; }
.py-th-final { background:var(--ink);color:var(--white);padding:0.4rem 0.5rem;text-align:center;white-space:nowrap;font-weight:700;font-size:0.78rem; }
.py-th-initial { background:var(--parch-2);padding:0.4rem 0.75rem;font-weight:700;color:var(--ink);white-space:nowrap;position:sticky;left:0;border-right:1px solid var(--border); }
.py-cell { padding:0.25rem;text-align:center;border:1px solid rgba(26,20,18,0.06); }
.py-cell-valid { cursor:pointer;transition:background 0.12s; }
.py-cell-valid:hover,.py-cell-valid.py-active { background:var(--red-pale); }
.py-cell-valid.py-active .py-syl { color:var(--red);font-weight:700; }
.py-syl { font-size:0.78rem;color:var(--ink-mid);display:block;padding:0.2rem 0.3rem;border-radius:3px;transition:color 0.12s; }
.py-cell-valid .py-syl:hover { color:var(--red); }
.py-dash { color:rgba(26,20,18,0.15);font-size:0.7rem; }
.py-row:nth-child(even) .py-cell-empty { background:rgba(26,20,18,0.01); }
.py-playing {
    position:fixed;bottom:2rem;left:50%;transform:translateX(-50%);
    background:var(--ink);color:var(--white);padding:1rem 2rem;
    border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);
    display:flex;align-items:center;gap:1.25rem;z-index:500;
    animation:slideUp 0.2s ease;
}
@keyframes slideUp { from{opacity:0;transform:translateX(-50%) translateY(10px);} to{opacity:1;transform:translateX(-50%) translateY(0);} }
.py-playing-char { font-family:var(--font-zh);font-size:2rem;color:var(--red);line-height:1; }
.py-playing-tone { font-size:0.82rem;color:rgba(255,255,255,0.6); }

/* ============================================
   TONE TRAINER
   ============================================ */
.tt-play-area { text-align:center;margin-bottom:2rem; }
.tt-syllable { font-family:var(--font-zh);font-size:3.5rem;color:var(--ink);margin-bottom:1.5rem;line-height:1; }
.tt-play-btn {
    display:inline-flex;align-items:center;gap:0.6rem;
    padding:0.9rem 2rem;background:var(--red);color:var(--white);
    border:none;border-radius:var(--radius-lg);font-size:1rem;font-weight:600;
    cursor:pointer;font-family:var(--font-body);transition:all 0.2s;
}
.tt-play-btn:hover { background:var(--red-dark);transform:scale(1.03); }
.tt-play-btn.speaking { animation:speakPulse 0.6s ease infinite alternate; }
.tt-choices { display:grid;grid-template-columns:1fr 1fr;gap:0.75rem;margin-bottom:1rem; }
.tt-choice {
    padding:1.25rem 1rem;border:1.5px solid var(--border);border-radius:var(--radius-lg);
    background:var(--white);cursor:pointer;font-family:var(--font-body);
    display:flex;flex-direction:column;align-items:center;gap:0.25rem;
    transition:border-color 0.15s,background 0.15s;
}
.tt-choice:hover:not(:disabled) { border-color:var(--red);background:var(--red-pale); }
.tt-choice:disabled { cursor:default; }
.tt-choice-mark { font-family:var(--font-zh);font-size:1.8rem;color:var(--red);line-height:1; }
.tt-choice-name { font-weight:700;font-size:0.9rem;color:var(--ink); }
.tt-choice-desc { font-size:0.75rem;color:var(--ink-soft); }
.tt-choice.tt-correct { border-color:#27ae60;background:#e8f5e9; }
.tt-choice.tt-wrong   { border-color:#c0392b;background:#fce4ec; }
.tt-feedback { padding:1rem 1.25rem;background:var(--parch-2);border-radius:var(--radius-lg);font-size:0.92rem;text-align:center; }

/* ============================================
   SENTENCE BUILDER
   ============================================ */
.sb-layout { display:grid;grid-template-columns:300px 1fr;gap:1.5rem;align-items:start; }
.sb-patterns { background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius-lg);overflow:hidden; }
.sb-patterns-title { font-size:0.7rem;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;color:var(--ink-soft);padding:0.75rem 1rem;border-bottom:1px solid var(--border); }
.sb-pattern-btn {
    display:flex;align-items:center;justify-content:space-between;gap:0.5rem;
    width:100%;padding:0.85rem 1rem;background:none;border:none;border-bottom:1px solid var(--border);
    cursor:pointer;font-family:var(--font-body);text-align:left;transition:background 0.15s;
}
.sb-pattern-btn:last-child { border-bottom:none; }
.sb-pattern-btn:hover { background:var(--parch-2); }
.sb-pattern-btn.active { background:var(--red-pale);border-right:3px solid var(--red); }
.sb-pattern-name { font-size:0.82rem;font-weight:500;color:var(--ink);flex:1; }
.sb-builder { background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius-lg);padding:1.75rem; }
.sb-placeholder { text-align:center;padding:3rem 1rem;color:var(--ink-soft); }
.sb-pattern-header { margin-bottom:1.5rem; }
.sb-pattern-header h3 { font-size:1.1rem;margin-bottom:0.5rem; }
.sb-example { background:var(--parch-2);border-radius:var(--radius);padding:0.75rem 1rem;display:flex;flex-direction:column;gap:0.2rem; }
.sb-ex-zh { font-family:var(--font-zh);font-size:1.1rem;color:var(--ink); }
.sb-ex-en { font-size:0.82rem;color:var(--ink-soft); }
.sb-slots { display:flex;flex-direction:column;gap:1rem;margin-bottom:1.5rem; }
.sb-slot label.sb-slot-label { font-size:0.85rem;font-weight:600;color:var(--ink);display:flex;flex-direction:column;gap:0.3rem; }
.sb-slot-hint { font-size:0.75rem;color:var(--ink-soft);font-weight:400; }
.sb-slot-input {
    padding:0.65rem 0.9rem;border:1.5px solid var(--border);border-radius:var(--radius);
    font-size:1.1rem;font-family:var(--font-zh);outline:none;width:100%;transition:border-color 0.15s;
}
.sb-slot-input:focus { border-color:var(--red); }
.sb-result { background:var(--parch-2);border-radius:var(--radius-lg);padding:1.25rem;margin-bottom:1.25rem;min-height:56px;display:flex;align-items:center; }
.sb-result-placeholder { color:var(--ink-soft);font-size:0.88rem; }
.sb-result-text { font-family:var(--font-zh);font-size:1.3rem;color:var(--ink-mid);line-height:1.5; }
.sb-result-complete { color:var(--ink); }
.sb-actions { display:flex;gap:0.5rem;flex-wrap:wrap; }
.sb-history { display:flex;flex-direction:column;gap:0.5rem; }
.sb-hist-item { display:flex;align-items:center;gap:1rem;padding:0.75rem 1rem;background:var(--white);border:1px solid var(--border);border-radius:var(--radius); }
.sb-hist-zh { font-family:var(--font-zh);font-size:1rem;flex:1; }
.sb-hist-meta { font-size:0.75rem;color:var(--ink-soft);white-space:nowrap; }
@media(max-width:700px) { .sb-layout{grid-template-columns:1fr;} .tt-choices{grid-template-columns:1fr 1fr;} }

/* ============================================
   HSK WORD LIST
   ============================================ */
.hsk-level-tabs { display:flex;gap:0;flex-wrap:wrap;margin-bottom:1.5rem;border-bottom:2px solid var(--border); }
.hsk-level-tab {
    padding:0.6rem 1rem;font-size:0.85rem;font-weight:500;color:var(--ink-mid);
    text-decoration:none;border-radius:var(--radius) var(--radius) 0 0;
    border:1.5px solid transparent;border-bottom:none;margin-bottom:-2px;
    display:flex;flex-direction:column;align-items:center;gap:0.1rem;transition:all 0.15s;
}
.hsk-level-tab:hover { color:var(--red);background:var(--red-pale); }
.hsk-level-tab.active { color:var(--red);background:var(--white);border-color:var(--border);border-bottom-color:var(--white);font-weight:700; }
.hsk-tab-sub { font-size:0.65rem;color:inherit;opacity:0.7; }
.hsk-stats-bar { display:flex;align-items:center;gap:1.5rem;padding:1rem 1.25rem;background:var(--parch-2);border-radius:var(--radius-lg);margin-bottom:1.5rem;flex-wrap:wrap; }
.hsk-stat { text-align:center; }
.hsk-stat-num { display:block;font-family:var(--font-serif);font-size:1.5rem;font-weight:700;color:var(--red);line-height:1; }
.hsk-stat-label { font-size:0.72rem;color:var(--ink-soft);text-transform:uppercase;letter-spacing:0.06em; }
.hsk-word-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:0.75rem; }
.hsk-word-card {
    background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius-lg);
    padding:0.9rem;cursor:pointer;transition:border-color 0.15s,transform 0.15s,box-shadow 0.15s;
}
.hsk-word-card:hover { border-color:var(--red);transform:translateY(-2px);box-shadow:var(--shadow); }
.hsk-word-top { display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:0.3rem; }
.hsk-zh { font-family:var(--font-zh);font-size:1.6rem;color:var(--red);line-height:1; }
.hsk-py { font-size:0.75rem;color:var(--ink-soft);margin-bottom:0.25rem; }
.hsk-en { font-size:0.82rem;font-weight:500;color:var(--ink); }
.hsk-pos { font-size:0.68rem;color:var(--ink-soft);margin-top:0.2rem;font-style:italic; }

/* ============================================
   DASHBOARD — STREAK & PROGRESS
   ============================================ */
.dash-stats-row { display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem;margin-bottom:0.5rem; }
.dash-stat-card {
    background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius-lg);
    padding:1.5rem;text-align:center;
}
.dash-stat-card.dash-stat-hot { border-color:var(--red);background:var(--red-pale); }
.dash-stat-icon { font-size:1.8rem;margin-bottom:0.4rem; }
.dash-stat-num { font-family:var(--font-serif);font-size:2.2rem;font-weight:700;color:var(--red);line-height:1;margin-bottom:0.2rem; }
.dash-stat-label { font-size:0.8rem;color:var(--ink-soft);text-transform:uppercase;letter-spacing:0.06em; }
.dash-stat-sub { font-size:0.78rem;color:var(--ink-soft);margin-top:0.4rem; }

.hsk-progress-list { display:flex;flex-direction:column;gap:0.75rem; }
.hsk-prog-item { background:var(--white);border:1.5px solid var(--border);border-radius:var(--radius-lg);padding:1rem 1.25rem; }
.hsk-prog-item.hsk-prog-goal { border-color:var(--red);background:var(--red-pale); }
.hsk-prog-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:0.5rem;gap:0.5rem;flex-wrap:wrap; }
.hsk-prog-label { font-weight:600;font-size:0.9rem;display:flex;align-items:center;gap:0.5rem; }
.hsk-prog-count { font-size:0.82rem;color:var(--ink-soft); }
.hsk-prog-bar { height:8px;background:var(--parch-2);border-radius:4px;overflow:hidden; }
.hsk-prog-fill { height:100%;background:var(--red);border-radius:4px;transition:width 0.6s ease; }

.dash-card-link { text-decoration:none;color:inherit;display:block;transition:border-color 0.2s,transform 0.2s,box-shadow 0.2s; }
.dash-card-link:hover { border-color:var(--red);transform:translateY(-2px);box-shadow:var(--shadow-lg); }

.activity-list { display:flex;flex-direction:column;gap:0;border:1.5px solid var(--border);border-radius:var(--radius-lg);overflow:hidden; }
.activity-item { display:flex;align-items:center;gap:0.75rem;padding:0.75rem 1rem;border-bottom:1px solid var(--border);font-size:0.88rem; }
.activity-item:last-child { border-bottom:none; }
.act-icon { font-size:1.1rem;flex-shrink:0;width:24px;text-align:center; }
.act-type { font-weight:500;color:var(--ink);flex:1; }
.act-score { color:var(--red);font-weight:600; }
.act-date { color:var(--ink-soft);font-size:0.78rem;margin-left:auto; }

/* Save word button */
.save-word-btn {
    background:none;border:1.5px solid var(--border);border-radius:50%;
    width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;
    cursor:pointer;font-size:1rem;transition:all 0.2s;flex-shrink:0;
}
.save-word-btn:hover { border-color:var(--red);transform:scale(1.1); }
.save-word-btn.saved { border-color:#e91e63;background:#fce4ec; }

/* Nav streak badge */
.nav-streak {
    font-size:0.72rem;font-weight:700;color:var(--red);
    background:var(--red-pale);padding:0.2em 0.5em;
    border-radius:20px;white-space:nowrap;margin-right:0.25rem;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
    background: var(--ink);
    padding: 5rem 1.5rem;
}
.newsletter-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.nl-zh {
    font-family: var(--font-zh);
    font-size: 0.82rem;
    color: var(--red);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.newsletter-inner h2 {
    color: var(--white);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 0.75rem;
}
.nl-content p {
    color: rgba(255,255,255,0.65);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}
.nl-benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.nl-benefits li {
    color: rgba(255,255,255,0.75);
    font-size: 0.92rem;
}
.nl-form-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.nl-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
}
.nl-input {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.08);
    color: var(--white);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
.nl-input::placeholder { color: rgba(255,255,255,0.35); }
.nl-input:focus { border-color: var(--red); }
.nl-btn { width: 100%; padding: 0.9rem; font-size: 0.95rem; margin-top: 0.25rem; }
.nl-fine { font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-top: 0.75rem; line-height: 1.5; }
.nl-msg { padding: 0.9rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.nl-msg-success { background: rgba(39,174,96,0.2); color: #a8f0c6; border: 1px solid rgba(39,174,96,0.3); }
.nl-msg-error   { background: rgba(192,57,43,0.2); color: #f5a19a; border: 1px solid rgba(192,57,43,0.3); }
@media(max-width:800px) {
    .newsletter-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-form label {
    display: flex; flex-direction: column; gap: 0.35rem;
    font-size: 0.85rem; font-weight: 500; color: var(--ink);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.15s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--red); }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.req { color: var(--red); }
.contact-success {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
}
.contact-success h2 { margin-bottom: 1rem; }
.contact-info-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.contact-info-card h3 { font-size: 1rem; margin-bottom: 1.1rem; }
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--ink-mid);
}
.contact-info-item:last-child { border-bottom: none; }
.ci-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }
.contact-faq-link {
    display: block;
    font-size: 0.88rem;
    color: var(--red);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}
.contact-faq-link:last-child { border-bottom: none; }
.contact-faq-link:hover { color: var(--red-dark); }
@media(max-width:800px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-form-row { grid-template-columns: 1fr; }
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}
.about-stat-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.about-stat {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.about-stat:last-child { border-bottom: none; }
.about-stat-num { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--red); line-height: 1; }
.about-stat-label { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.about-values { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.about-value-item { font-size: 0.88rem; color: var(--ink-mid); padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.about-value-item:last-child { border-bottom: none; }
@media(max-width:800px) { .about-layout { grid-template-columns: 1fr; } }

/* ============================================
   PRIVACY / LEGAL PAGE
   ============================================ */
.legal-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem;
    align-items: start;
}
.legal-toc {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.legal-toc-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); padding-bottom: 0.5rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.legal-toc-link { font-size: 0.82rem; color: var(--ink-mid); padding: 0.35rem 0; border-bottom: 1px solid rgba(26,20,18,0.05); transition: color 0.15s; }
.legal-toc-link:last-child { border-bottom: none; }
.legal-toc-link:hover { color: var(--red); }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.88rem; }
.legal-table th { background: var(--parch-2); padding: 0.6rem 0.9rem; text-align: left; font-weight: 600; color: var(--ink); border: 1px solid var(--border); }
.legal-table td { padding: 0.6rem 0.9rem; color: var(--ink-mid); border: 1px solid var(--border); vertical-align: top; }
@media(max-width:800px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { position: static; }
}

/* ============================================
   SITE SEARCH
   ============================================ */
.search-group { margin-bottom: 2.5rem; }
.search-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--parch-2);
    padding: 0.1em 0.55em;
    border-radius: 20px;
}
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}
.search-result-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}
.search-result-card:hover { border-color: var(--red); transform: translateY(-2px); }
.src-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.3; }
.src-title { font-size: 0.92rem; font-weight: 600; color: var(--ink); margin-bottom: 0.2rem; }
.src-desc { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: 0.3rem; }
.src-section { font-size: 0.7rem; color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.search-view-all {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--red);
}

/* ============================================
   SITEMAP PAGE
   ============================================ */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}
.sitemap-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}
.sitemap-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.sitemap-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-mid);
    padding: 0.25rem 0;
    transition: color 0.15s;
}
.sitemap-list a:hover { color: var(--red); }
.sm-icon { font-size: 0.95rem; flex-shrink: 0; width: 20px; text-align: center; }

/* ============================================
   COURSE SALES PAGE
   ============================================ */
.course-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}
.course-hero-image { margin-bottom: 2rem; }
.course-cover-mock {
    background: linear-gradient(135deg, #1A1412 0%, #2a1f1c 100%);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--white);
}
.ccm-char { font-family: var(--font-zh); font-size: 4rem; color: var(--red); display: block; margin-bottom: 1rem; }
.ccm-title { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
.ccm-sub { font-size: 0.82rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; }

.section-h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.section-h3 { font-size: 1.15rem; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.lead-text { font-size: 0.98rem; color: var(--ink-mid); line-height: 1.75; margin-bottom: 1rem; }

.course-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.course-feature {
    display: flex;
    gap: 0.85rem;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
}
.cf-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.4; }
.course-feature strong { display: block; font-size: 0.92rem; margin-bottom: 0.2rem; }
.course-feature p { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }

.course-days { display: flex; flex-direction: column; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.course-day { display: flex; align-items: center; gap: 1.25rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.course-day:last-child { border-bottom: none; }
.cd-num { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--red); flex-shrink: 0; width: 36px; }
.course-day strong { display: block; font-size: 0.95rem; }
.course-day p { font-size: 0.85rem; color: var(--ink-soft); margin: 0.15rem 0 0; }

.course-faq { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.1rem;
}
.faq-item summary { font-weight: 600; font-size: 0.92rem; cursor: pointer; color: var(--ink); }
.faq-item p { font-size: 0.88rem; color: var(--ink-mid); margin: 0.6rem 0 0; line-height: 1.6; }

/* Sidebar buy card */
.course-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.course-buy-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.25rem;
}
.cbc-price-row { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.25rem; }
.cbc-price { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; color: var(--red); }
.cbc-compare { font-size: 1.1rem; color: var(--ink-soft); text-decoration: line-through; }
.cbc-sub { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
.cbc-buy-btn { display: block; text-align: center; width: 100%; padding: 1rem; font-size: 1rem; margin-bottom: 1.25rem; box-sizing: border-box; }
.cbc-features { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.cbc-feature { font-size: 0.85rem; color: var(--ink-mid); }
.cbc-secure { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--ink-soft); justify-content: center; padding-top: 1rem; border-top: 1px solid var(--border); }
.cbc-also {
    background: var(--parch-2);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.cbc-also h4 { font-size: 0.92rem; margin-bottom: 0.5rem; }
.cbc-also p { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 1rem; }

@media(max-width:900px) {
    .course-layout { grid-template-columns: 1fr; }
    .course-sidebar { position: static; }
}

/* Homepage premium guide promo */
.promo-card {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}
.promo-content h2 { font-size: 1.6rem; margin: 0.5rem 0 0.75rem; }
.promo-content p { color: var(--ink-mid); margin-bottom: 1.25rem; line-height: 1.7; }
.promo-cover {
    background: linear-gradient(135deg, #1A1412 0%, #2a1f1c 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--white);
}
.pc-char { font-family: var(--font-zh); font-size: 3rem; color: var(--red); display: block; margin-bottom: 0.5rem; }
.pc-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.pc-sub { font-size: 0.7rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.4rem; }
@media(max-width:800px) { .promo-card { grid-template-columns: 1fr; } }

/* Homepage shop grid (replaces single promo card) */
.shop-header { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.shop-header h2 { font-size: 1.6rem; margin: 0.5rem 0 0.5rem; }
.shop-header p { color: var(--ink-mid); }
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.shop-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.shop-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shop-cover {
    background: linear-gradient(135deg, #1A1412 0%, #2a1f1c 100%);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--white);
}
.shop-card-body { padding: 1.25rem 1.5rem; }
.shop-card-body h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.shop-card-body p { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 0.85rem; line-height: 1.6; }
.shop-price { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; color: var(--red); }
.shop-compare { font-size: 0.95rem; color: var(--ink-soft); text-decoration: line-through; font-weight: 400; margin-left: 0.4rem; }

/* ============================================
   HSK MOCK EXAM ENGINE
   ============================================ */
.exam-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

/* Intro screen */
.exam-info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; margin: 1.25rem 0; }
.exam-info-item { background: var(--parch); border-radius: var(--radius); padding: 1rem; text-align: center; }
.eii-num { display: block; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--red); }
.eii-label { font-size: 0.75rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.exam-section-row { display: flex; gap: 0.85rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.exam-section-row:last-child { border-bottom: none; }
.esr-icon { font-size: 1.6rem; flex-shrink: 0; }
.exam-section-row p { font-size: 0.85rem; color: var(--ink-soft); margin: 0.25rem 0 0; }

/* Test screen topbar */
.exam-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.exam-timer { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; color: var(--ink); background: var(--parch); padding: 0.3rem 0.85rem; border-radius: 20px; }
.exam-timer-low { color: var(--white); background: var(--red); animation: examPulse 1s infinite; }
@keyframes examPulse { 0%,100%{opacity:1;} 50%{opacity:0.6;} }
.exam-section-tag { font-size: 0.85rem; font-weight: 600; color: var(--ink-mid); }
.exam-qcount { font-size: 0.85rem; color: var(--ink-soft); }
.exam-progress-track { height: 6px; background: var(--parch); border-radius: 4px; overflow: hidden; margin-bottom: 1.5rem; }
.exam-progress-fill { height: 100%; background: var(--red); transition: width 0.3s; }

/* Audio row */
.exam-audio-row { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.exam-audio-btn {
    background: var(--ink); color: var(--white); border: none; border-radius: 24px;
    padding: 0.75rem 1.5rem; font-size: 0.95rem; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 0.5rem; transition: background 0.15s;
}
.exam-audio-btn:hover { background: var(--red); }
.exam-audio-hint { font-size: 0.82rem; color: var(--ink-soft); }

/* Judge statement card */
.exam-statement-card { background: var(--parch); border-radius: var(--radius); padding: 1.25rem; text-align: center; margin-bottom: 1.25rem; }
.esc-zh { font-family: var(--font-zh); font-size: 1.6rem; color: var(--ink); margin-bottom: 0.35rem; }
.esc-py { font-size: 0.95rem; color: var(--red); margin-bottom: 0.35rem; }
.esc-en { font-size: 0.9rem; color: var(--ink-soft); }

/* Reading question */
.exam-reading-q { background: var(--parch); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.erq-zh { font-family: var(--font-zh); font-size: 1.35rem; color: var(--ink); margin-bottom: 0.5rem; line-height: 1.6; }
.erq-en { font-size: 0.88rem; color: var(--ink-soft); }

/* Options */
.exam-options { display: flex; flex-direction: column; gap: 0.6rem; }
.exam-options-judge { flex-direction: row; gap: 1rem; }
.exam-options-judge .exam-opt-btn { flex: 1; text-align: center; font-weight: 700; padding: 1rem; }
.exam-options-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.6rem; }
.exam-opt-btn {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 0.85rem 1rem; font-size: 0.95rem; cursor: pointer; text-align: left;
    transition: border-color 0.15s, background 0.15s; font-family: inherit;
}
.exam-opt-btn:hover { border-color: var(--red); }
.exam-opt-btn.selected { border-color: var(--red); background: var(--red-pale); }
.exam-opt-rich { display: flex; flex-direction: column; gap: 0.15rem; }
.exam-opt-grid-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.eor-zh { font-family: var(--font-zh); font-size: 1.15rem; color: var(--ink); }
.eor-py { font-size: 0.82rem; color: var(--red); }
.eor-en { font-size: 0.85rem; color: var(--ink-mid); }

/* Word order */
.exam-wo-chosen { min-height: 56px; background: var(--parch); border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.85rem; }
.wo-placeholder { color: var(--ink-soft); font-size: 0.85rem; }
.exam-wo-pool { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.85rem; min-height: 56px; }
.exam-wo-tile {
    background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 0.5rem 0.85rem; cursor: pointer; display: flex; flex-direction: column; align-items: center;
    transition: border-color 0.15s, transform 0.1s;
}
.exam-wo-tile:hover { border-color: var(--red); transform: translateY(-2px); }
.exam-wo-tile.chosen { background: var(--red-pale); border-color: var(--red); }
.wo-zh { font-family: var(--font-zh); font-size: 1.1rem; color: var(--ink); }
.wo-py { font-size: 0.7rem; color: var(--red); }
.exam-wo-clear { width: auto; padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* Nav row */
.exam-nav-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.exam-nav-row button { flex: 1; }

/* Palette */
.exam-palette { margin-top: 1.5rem; }
.exam-palette-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin: 0.85rem 0 0.4rem; }
.exam-palette-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.exam-palette-item {
    width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--white);
    font-size: 0.78rem; cursor: pointer; font-weight: 600; color: var(--ink-mid); transition: all 0.15s;
}
.exam-palette-item.answered { background: var(--parch); border-color: var(--ink-soft); }
.exam-palette-item.current { border-color: var(--red); background: var(--red); color: var(--white); }

/* Results */
.exam-score-hero { text-align: center; padding: 1.75rem; border-radius: var(--radius-lg); margin-bottom: 1.25rem; }
.exam-score-hero.pass { background: #e8f5e9; }
.exam-score-hero.fail { background: var(--red-pale); }
.esh-percent { font-family: var(--font-serif); font-size: 3rem; font-weight: 700; color: var(--ink); line-height: 1; }
.esh-frac { font-size: 1rem; color: var(--ink-mid); margin: 0.35rem 0; }
.esh-badge { font-weight: 700; font-size: 0.95rem; }
.exam-score-hero.pass .esh-badge { color: #1e7e3a; }
.exam-score-hero.fail .esh-badge { color: var(--red); }

.exam-section-results { display: flex; flex-direction: column; gap: 0.75rem; }
.esr-item { display: flex; align-items: center; gap: 0.85rem; background: var(--parch); border-radius: var(--radius); padding: 0.85rem 1rem; }
.esr-icon2 { font-size: 1.4rem; }
.esr-body { flex: 1; }
.esr-body strong { font-size: 0.9rem; display: block; margin-bottom: 0.3rem; }
.esr-bar-track { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.esr-bar-fill { height: 100%; background: var(--red); }
.esr-frac { font-weight: 700; font-size: 0.9rem; color: var(--ink-mid); }

/* Review */
.exam-review-item { border: 1.5px solid var(--border); border-left: 4px solid var(--ink-soft); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; }
.exam-review-item.correct { border-left-color: #27ae60; }
.exam-review-item.incorrect { border-left-color: var(--red); }
.eri-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.eri-num { font-weight: 700; font-size: 0.85rem; }
.eri-tag { font-size: 0.78rem; color: var(--ink-soft); background: var(--parch); padding: 0.15rem 0.6rem; border-radius: 12px; }
.eri-status { margin-left: auto; font-weight: 700; font-size: 0.82rem; }
.exam-review-item.correct .eri-status { color: #27ae60; }
.exam-review-item.incorrect .eri-status { color: var(--red); }
.eri-transcript, .eri-statement, .eri-answers { font-size: 0.88rem; margin-bottom: 0.4rem; line-height: 1.6; }
.eri-transcript { font-family: var(--font-zh); font-size: 1.05rem; }
.eri-statement { font-family: var(--font-zh); font-size: 1.05rem; }
.eri-py { font-family: var(--font-body); color: var(--red); font-size: 0.85rem; }
.eri-en { font-family: var(--font-body); color: var(--ink-soft); font-size: 0.85rem; }
.eri-answers { font-family: var(--font-body); background: var(--parch); border-radius: var(--radius); padding: 0.6rem 0.85rem; }

@media (max-width: 600px) {
    .exam-info-grid { grid-template-columns: 1fr; }
    .exam-options-grid { grid-template-columns: 1fr; }
    .exam-options-judge { flex-direction: column; }
}

/* Exam promo card on HSK guide pages */
.exam-promo-card {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    background: linear-gradient(135deg, var(--ink) 0%, #2a1f1c 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}
.exam-promo-card h3 { color: var(--white); }
.exam-promo-card p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.exam-promo-card .epc-text { flex: 1; min-width: 240px; }

/* ============================================
   BLOG — FILTERS & PAGINATION
   ============================================ */
.blog-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}
.blog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--ink-mid);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}
.blog-filter-pill:hover { border-color: var(--red); color: var(--red); }
.blog-filter-pill.active { background: var(--red); border-color: var(--red); color: var(--white); }
.bfp-count {
    font-size: 0.72rem;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 0.05em 0.5em;
}
.blog-filter-pill.active .bfp-count { background: rgba(255,255,255,0.25); }

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.bp-numbers { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.bp-num, .bp-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.85rem;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--ink-mid);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}
.bp-num { min-width: 38px; padding: 0; }
.bp-num:hover, .bp-link:hover { border-color: var(--red); color: var(--red); }
.bp-current { background: var(--red); border-color: var(--red); color: var(--white); }
.bp-disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.blog-pagination-info {
    text-align: center;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 0.85rem;
}

@media (max-width: 640px) {
    .blog-pagination { gap: 0.6rem; }
    .bp-numbers { order: 3; width: 100%; }
}

/* ============================================
   BLOG — RELATED POSTS
   ============================================ */
.related-posts {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}
.related-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.related-card h3 {
    font-size: 1.05rem;
    color: var(--ink);
    line-height: 1.35;
}
.related-card p {
    font-size: 0.85rem;
    color: var(--ink-soft);
    flex-grow: 1;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   NEWSLETTER ARCHIVE
   ============================================ */
.nl-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.nl-archive-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.nl-archive-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.nla-word-zh {
    font-family: var(--font-zh);
    font-size: 2.5rem;
    color: var(--ink);
    line-height: 1;
}
.nla-word-py {
    font-size: 0.88rem;
    color: var(--red);
    font-weight: 600;
    margin-top: 0.35rem;
}
.nla-divider {
    height: 1px;
    background: var(--border);
    margin: 0.85rem 0;
}
.nla-subject {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}
.nla-tip {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
}
.nla-date {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Subscribe CTA box */
.nl-archive-cta {
    text-align: center;
    background: var(--parch);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin-top: 1rem;
}

/* Issue page */
.nl-issue-word-card {
    background: var(--parch);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--red);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.nliw-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
}
.nliw-zh {
    font-family: var(--font-zh);
    font-size: 3.5rem;
    color: var(--ink);
    line-height: 1.1;
    margin: 0.5rem 0;
}
.nliw-py {
    font-size: 1rem;
    color: var(--ink-mid);
    font-weight: 600;
}
.nliw-example {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.nliw-ex-zh { font-family: var(--font-zh); font-size: 1.3rem; color: var(--ink); margin-bottom: 0.25rem; }
.nliw-ex-py { font-size: 0.9rem; color: var(--red); margin-bottom: 0.25rem; }
.nliw-ex-en { font-size: 0.9rem; color: var(--ink-soft); }

.nl-issue-section { margin-bottom: 1.75rem; }
.nl-issue-section h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.nl-issue-section p { color: var(--ink-mid); line-height: 1.7; }

.nl-issue-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.nlin-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    padding: 0.85rem 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
    flex: 1;
    max-width: 48%;
}
.nlin-next { text-align: right; align-items: flex-end; }
.nlin-link:hover { border-color: var(--red); }
.nlin-label { font-size: 0.78rem; color: var(--ink-soft); }
.nlin-word { font-family: var(--font-zh); font-size: 1.3rem; color: var(--ink); margin-top: 0.25rem; }

@media (max-width: 600px) {
    .nliw-zh { font-size: 2.5rem; }
    .nla-word-zh { font-size: 2rem; }
}
