/* ============================================================
   中文学堂 — App Styles  v3.0 (Học tiếng Trung theme)
   Palette: Đỏ son #D0312D · Trắng · Pastel xanh lam #EDF4FB
   ============================================================ */

/* ── Design tokens ────────────────────────────────────────── */
:root {
  /* Palette chính */
  --red:        #D0312D;
  --red-soft:   #F9E8E8;
  --red-mid:    #B92826;
  --red-dim:    rgba(208,49,45,.10);

  --bg:         #F5F7FA;
  --surface:    #FFFFFF;
  --surface-2:  #EDF4FB;       /* pastel xanh nhạt */
  --surface-3:  #F0F8FF;

  --txt:        #1A1A2E;
  --muted:      #6B7A99;
  --line:       #DDE4EE;

  /* Semantic */
  --brand:      var(--red);
  --brand-dim:  var(--red-dim);
  --brand-600:  var(--red-mid);
  --ring:       #D0312D;

  /* Badge */
  --chip-bg:    #EDF4FB;
  --chip-ink:   #1565C0;
  --badge-bg:   #FFF3E0;
  --badge-ink:  #E65100;

  /* Spacing / shape */
  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --shadow-sm:  0 2px 8px rgba(26,26,46,.06);
  --shadow:     0 6px 24px rgba(26,26,46,.10);
  --shadow-lg:  0 16px 48px rgba(26,26,46,.14);
  --transition: .18s ease;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0E1320;
    --surface:    #151C2E;
    --surface-2:  #1A2540;
    --surface-3:  #1E2A48;
    --txt:        #E4EAF6;
    --muted:      #8A9BBC;
    --line:       #253050;
    --red:        #E53935;
    --red-soft:   #2A1515;
    --red-mid:    #EF5350;
    --red-dim:    rgba(229,57,53,.14);
    --chip-bg:    #1A2540;
    --chip-ink:   #90CAF9;
    --badge-bg:   #2A1F0A;
    --badge-ink:  #FFB74D;
  }
}
[data-theme="light"] {
  --bg:#F5F7FA; --surface:#FFFFFF; --surface-2:#EDF4FB; --surface-3:#F0F8FF;
  --txt:#1A1A2E; --muted:#6B7A99; --line:#DDE4EE;
  --red:#D0312D; --red-soft:#F9E8E8; --red-mid:#B92826; --red-dim:rgba(208,49,45,.10);
  --chip-bg:#EDF4FB; --chip-ink:#1565C0; --badge-bg:#FFF3E0; --badge-ink:#E65100;
}
[data-theme="dark"] {
  --bg:#0E1320; --surface:#151C2E; --surface-2:#1A2540; --surface-3:#1E2A48;
  --txt:#E4EAF6; --muted:#8A9BBC; --line:#253050;
  --red:#E53935; --red-soft:#2A1515; --red-mid:#EF5350; --red-dim:rgba(229,57,53,.14);
  --chip-bg:#1A2540; --chip-ink:#90CAF9; --badge-bg:#2A1F0A; --badge-ink:#FFB74D;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  color: var(--txt);
  background: var(--bg);
  font-family: "Inter", "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--ring) 50%, transparent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* ── Utilities ────────────────────────────────────────────── */
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.site-main--full { max-width: none; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ico { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
@media (max-width: 900px) { .container-wide { padding: 0 20px; } }

/* ── Skip link ────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: static; width: auto; height: auto;
  padding: 8px 14px; background: var(--txt); color: var(--bg);
  border-radius: 0 0 8px 8px; z-index: 999;
}

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

/* ── Site header (v3.1) ───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  max-width: 1440px;
  padding: 0 32px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo / Brand */
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}
.site-brand .brand-mark,
.brand-logo-default {
  width: 48px; height: 48px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
}
.brand-logo-default {
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px color-mix(in oklab, var(--red) 30%, transparent);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name-zh {
  font-size: 22px;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: .04em;
  line-height: 1.15;
}
.brand-name-vn {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}

/* Nav */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-self: stretch;
}
.main-nav .menu {
  display: flex;
  align-items: stretch;
  gap: clamp(10px, 2.4vw, 38px);
  list-style: none;
  margin: 0; padding: 0;
}
.main-nav .menu li { display: flex; }
.main-nav .menu a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: var(--txt);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color var(--transition);
}
.main-nav .menu a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.main-nav .menu a:hover { color: var(--red); }
.main-nav .menu a:hover::after { transform: scaleX(.5); }
.main-nav .menu .current-menu-item > a,
.main-nav .menu .current_page_item > a,
.main-nav .menu .current-menu-ancestor > a,
.main-nav .menu a[aria-current="page"] { color: var(--red); font-weight: 700; }
.main-nav .menu .current-menu-item > a::after,
.main-nav .menu .current_page_item > a::after,
.main-nav .menu .current-menu-ancestor > a::after,
.main-nav .menu a[aria-current="page"]::after { transform: scaleX(1); }

/* Tools: search + theme + avatar */
.header-tools { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(220px, 22vw, 270px);
  height: 40px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-search:focus-within {
  border-color: color-mix(in oklab, var(--red) 35%, var(--line));
  box-shadow: 0 0 0 3px var(--red-dim);
}
.nav-search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nav-search input {
  border: 0; background: transparent; outline: none;
  width: 100%; min-width: 0;
  font: inherit; font-size: 12.5px; color: var(--txt);
}
.nav-search input::placeholder { color: var(--muted); }

#theme-toggle,
.nav-avatar {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--txt);
  cursor: pointer;
  font-size: 16px;
  transition: background var(--transition), border-color var(--transition), transform .06s ease;
}
#theme-toggle:hover,
.nav-avatar:hover { background: var(--red-dim); }
#theme-toggle:active { transform: scale(.94); }
.nav-avatar svg { width: 22px; height: 22px; }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--txt);
  transition: background var(--transition);
}
.menu-toggle:hover { background: var(--surface-2); }

@media (max-width: 1100px) {
  .nav-search { width: 190px; }
}
@media (max-width: 900px) {
  .site-header .container { gap: 12px; padding: 0 20px; position: relative; }
  .site-brand { order: 1; }
  .header-tools { order: 2; margin-left: auto; }
  .menu-toggle { order: 3; display: flex; align-items: center; }
  .nav-search { display: none; }
  .main-nav {
    order: 4;
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
    box-shadow: var(--shadow);
    align-self: auto;
  }
  .main-nav.active { display: block; }
  .main-nav .menu { flex-direction: column; gap: 0; }
  .main-nav .menu a { padding: 12px 8px; width: 100%; }
  .main-nav .menu a::after { display: none; }
}

/* ── Hero / Banner ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #EDF4FB 0%, #F5F7FA 60%);
  border-radius: var(--radius-xl);
  padding: 42px 36px 42px 40px;
  margin: 12px 0 32px;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  border: 1.5px solid #D6E8F7;
}
.hero::after {
  content: '';
  position: absolute;
  inset-block-start: -30px; inset-inline-end: 160px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(208,49,45,.08), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 10px;
  letter-spacing: -.5px;
  line-height: 1.15;
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
}
.hero p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
  max-width: 52ch;
}
/* Stats strip */
.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.hero-stat svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--red); }

/* Hero illustration slot */
.hero-art {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
/* Hanzi decorative character */
.hero-hanzi {
  font-size: 120px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px color-mix(in oklab, var(--red) 18%, var(--line));
  user-select: none;
  pointer-events: none;
  opacity: .35;
  letter-spacing: -.05em;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .hero-art { display: none; }
}

/* ── Section headers ──────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 24px);
  letter-spacing: -.2px;
  font-weight: 800;
}
.section-head .see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: gap var(--transition);
}
.section-head .see-all:hover { gap: 6px; }

/* ── Topic filter chips ───────────────────────────────────── */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  list-style: none;
  padding: 0;
}
.chip {
  text-decoration: none;
  background: var(--surface);
  color: var(--txt);
  border: 1.5px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.chip:hover { background: var(--red-dim); border-color: color-mix(in oklab, var(--red) 25%, var(--line)); color: var(--red); }
.chip[aria-current="page"] { background: var(--red); color: #fff; border-color: transparent; font-weight: 700; }
.chip .count {
  background: var(--badge-bg);
  color: var(--badge-ink);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}
.chip[aria-current="page"] .count { background: rgba(255,255,255,.22); color: #fff; }

/* ── Cards grid ───────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  content-visibility: auto;
  contain: content;
  text-decoration: none;
  color: inherit;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: color-mix(in oklab, var(--red) 20%, var(--line));
}
.card:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--ring) 40%, transparent);
  outline-offset: 2px;
}

.thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  display: block;
  overflow: hidden;
  position: relative;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .thumb img { transform: scale(1.04); }

/* Card number badge */
.thumb-num {
  position: absolute;
  top: 10px; left: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-title {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  line-height: 1.4;
  color: var(--txt);
}
.card-title a {
  text-decoration: none;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a:hover { color: var(--red); }

.card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-meta svg { width: 12px; height: 12px; }

/* Card arrow link */
.card-arrow {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.card-arrow a {
  width: 28px; height: 28px;
  background: var(--red-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  text-decoration: none;
  font-size: 13px;
  transition: background var(--transition), transform var(--transition);
}
.card-arrow a:hover { background: var(--red); color: #fff; transform: translateX(2px); }

/* ── Vocab table ──────────────────────────────────────────── */
.vocab-table-wrap { overflow-x: auto; border-radius: var(--radius); }
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.vocab-table thead th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid var(--line);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  background: var(--surface-2);
}
.vocab-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.vocab-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.vocab-table tbody tr {
  border-bottom: 1px solid color-mix(in oklab, var(--line) 65%, transparent);
  transition: background var(--transition);
}
.vocab-table tbody tr:hover { background: var(--red-dim); }
.vocab-table tbody td { padding: 11px 14px; vertical-align: middle; }
.vocab-table .td-hanzi  { font-size: 22px; font-weight: 800; }
.vocab-table .td-pinyin { font-style: italic; color: var(--muted); }
.vocab-table .td-meaning{ color: var(--txt); }

/* ── Featured vocab strip (home) ──────────────────────────── */
.vocab-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.vocab-card {
  flex: 0 0 140px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 12px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: default;
}
.vocab-card:hover { border-color: color-mix(in oklab, var(--red) 25%, var(--line)); box-shadow: var(--shadow-sm); }
.vocab-card .vc-hanzi {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--txt);
}
.vocab-card .vc-pinyin {
  font-size: 13px;
  font-style: italic;
  color: var(--red);
  font-weight: 500;
}
.vocab-card .vc-viet {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.vocab-card .vc-audio {
  margin-top: 6px;
  width: 26px; height: 26px;
  background: var(--red-dim);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  font-size: 12px;
  color: var(--red);
  transition: background var(--transition);
}
.vocab-card .vc-audio:hover { background: var(--red); color: #fff; }

/* ── 2-col info panels ────────────────────────────────────── */
.info-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
@media (max-width: 640px) { .info-panels { grid-template-columns: 1fr; } }

.info-panel {
  background: var(--surface-2);
  border: 1.5px solid #D6E8F7;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.info-panel-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: #fff;
}
.info-panel h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.info-panel p  { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  background: var(--badge-bg);
  color: var(--badge-ink);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-red { background: var(--red-soft); color: var(--red); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  border: 0;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
  transition: filter var(--transition), transform .06s ease, box-shadow var(--transition);
  box-shadow: 0 4px 14px color-mix(in oklab, var(--red) 28%, transparent);
}
.btn:hover { filter: brightness(1.06); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-ghost {
  background: transparent;
  color: var(--red);
  border: 1.5px solid color-mix(in oklab, var(--red) 30%, var(--line));
  box-shadow: none;
}
.btn-ghost:hover { background: var(--red-dim); box-shadow: none; filter: none; }

/* Load more */
.lm-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
}
#load-more { min-width: 150px; }

.btn-brand {
  --btn-bg: var(--red);
  background: linear-gradient(180deg, color-mix(in srgb, var(--btn-bg) 95%, #fff 5%), var(--btn-bg));
  border-color: color-mix(in srgb, var(--btn-bg) 70%, #000 30%);
  box-shadow: 0 2px 0 0 color-mix(in srgb, var(--btn-bg) 60%, #000 40%), 0 4px 14px color-mix(in oklab, var(--btn-bg) 22%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, filter .15s ease;
}
.btn-brand:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-brand:active { transform: translateY(0); }
.btn-brand.is-loading { position: relative; }
.btn-brand.is-loading::after {
  content: "";
  width: 1em; height: 1em;
  margin-left: .5em;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5);
  border-right-color: #fff;
  display: inline-block;
  vertical-align: middle;
  animation: tto-spin .75s linear infinite;
}
@keyframes tto-spin { to { transform: rotate(360deg); } }

/* ── Vocab expand (CSS-only) ──────────────────────────────── */
.vocab-radio {
  position: fixed !important;
  top: -10000px; left: -10000px;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.gvp-toggle-more {
  display: none;
  margin-top: 14px;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--txt);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  gap: 6px;
  align-items: center;
}
.gvp-toggle-more:hover { background: var(--red-dim); border-color: color-mix(in oklab, var(--red) 25%, var(--line)); box-shadow: var(--shadow-sm); }
.vocab-section .more-row { display: none; }
.vocab-section input[id$="-1"]:checked ~ .vocab-table-wrap .more-b1,
.vocab-section input[id$="-2"]:checked ~ .vocab-table-wrap .more-b1,
.vocab-section input[id$="-3"]:checked ~ .vocab-table-wrap .more-b1,
.vocab-section input[id$="-4"]:checked ~ .vocab-table-wrap .more-b1,
.vocab-section input[id$="-5"]:checked ~ .vocab-table-wrap .more-b1,
.vocab-section input[id$="-2"]:checked ~ .vocab-table-wrap .more-b2,
.vocab-section input[id$="-3"]:checked ~ .vocab-table-wrap .more-b2,
.vocab-section input[id$="-4"]:checked ~ .vocab-table-wrap .more-b2,
.vocab-section input[id$="-5"]:checked ~ .vocab-table-wrap .more-b2,
.vocab-section input[id$="-3"]:checked ~ .vocab-table-wrap .more-b3,
.vocab-section input[id$="-4"]:checked ~ .vocab-table-wrap .more-b3,
.vocab-section input[id$="-5"]:checked ~ .vocab-table-wrap .more-b3,
.vocab-section input[id$="-4"]:checked ~ .vocab-table-wrap .more-b4,
.vocab-section input[id$="-5"]:checked ~ .vocab-table-wrap .more-b4,
.vocab-section input[id$="-5"]:checked ~ .vocab-table-wrap .more-b5 { display: table-row; }
.vocab-section .vocab-toggle-row .gvp-toggle-more { display: none; }
.vocab-section input[id$="-0"]:checked ~ .vocab-toggle-row .btn-next-b1,
.vocab-section input[id$="-1"]:checked ~ .vocab-toggle-row .btn-next-b2,
.vocab-section input[id$="-2"]:checked ~ .vocab-toggle-row .btn-next-b3,
.vocab-section input[id$="-3"]:checked ~ .vocab-toggle-row .btn-next-b4,
.vocab-section input[id$="-4"]:checked ~ .vocab-toggle-row .btn-next-b5 { display: inline-flex; }
.vocab-section input[id$="-1"]:checked ~ .vocab-toggle-row .btn-collapse,
.vocab-section input[id$="-2"]:checked ~ .vocab-toggle-row .btn-collapse,
.vocab-section input[id$="-3"]:checked ~ .vocab-toggle-row .btn-collapse,
.vocab-section input[id$="-4"]:checked ~ .vocab-toggle-row .btn-collapse,
.vocab-section input[id$="-5"]:checked ~ .vocab-toggle-row .btn-collapse { display: inline-flex; }
.vocab-section { margin-top: 28px; }
.vocab-toggle-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ── Content area ─────────────────────────────────────────── */
.content {
  max-width: 74ch;
  margin: 0 auto;
  padding: 8px 0 24px;
  font-size: clamp(15px, 1.6vw, 16.5px);
  line-height: 1.78;
}
.content h2 { font-size: clamp(20px, 2.5vw, 26px); margin: 1.5em 0 .5em; letter-spacing: -.2px; }
.content h3 { font-size: clamp(17px, 2vw, 21px); margin: 1.3em 0 .4em; }
.content p  { margin: 0 0 1em; }
.content ul, .content ol { padding-left: 1.4em; margin: 0 0 1em; }
.content li { margin-bottom: .35em; }
.content a:not(.btn):not(.chip) {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: .15em;
  text-decoration-color: color-mix(in oklab, var(--red) 40%, transparent);
}
.content a:not(.btn):not(.chip):hover { color: var(--red-mid); text-decoration-color: var(--red-mid); }

/* ── Quote / proverb block ────────────────────────────────── */
.proverb-block {
  background: var(--red-soft);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.proverb-block .zh { font-size: 18px; font-weight: 700; color: var(--red); letter-spacing: .04em; }
.proverb-block .vn { font-size: 14px; color: var(--muted); margin-top: 4px; font-style: italic; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1.5px solid var(--line);
  background: var(--surface);
  padding: 32px 0 24px;
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { font-weight: 800; font-size: 15px; color: var(--txt); margin-bottom: 4px; }
.footer-desc  { color: var(--muted); font-size: 13px; max-width: 30ch; }
.footer-copy  { margin-top: 8px; font-size: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--red); }
.footer-nav .main-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.dmca-badge img { height: 24px; width: auto; opacity: .6; transition: opacity var(--transition); }
.dmca-badge img:hover { opacity: 1; }

/* Footer proverb */
.footer-proverb {
  background: var(--surface-2);
  border: 1.5px solid #D6E8F7;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 24px;
}
.footer-proverb .zh { font-size: 15px; font-weight: 700; color: var(--red); }
.footer-proverb .vn { font-size: 12px; color: var(--muted); margin-top: 3px; font-style: italic; }
.footer-proverb .source { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Pagination ───────────────────────────────────────────── */
.navigation.pagination {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}
.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition);
}
.nav-links .page-numbers:hover { background: var(--red-dim); border-color: color-mix(in oklab, var(--red) 22%, var(--line)); color: var(--red); }
.nav-links .page-numbers.current { background: var(--red); color: #fff; border-color: transparent; }
.nav-links .dots { background: none; border-color: transparent; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { opacity: .4; font-size: 11px; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .lm-wrap, .chips, #theme-toggle, .menu-toggle { display: none !important; }
  .hero { box-shadow: none; border: 1px solid #ccc; }
  .card { box-shadow: none; }
}
