/* ==========================================================================
   优益思达学习中心 (YYSD Learning Center)
   Global stylesheet — design system (Phase ① visual foundation)
   Playfair Display loaded via <link> in shell pages (not @import — blocks render).
   ========================================================================== */

:root {
  /* Brand palette */
  --brand-red: #c7a45d;
  --brand-red-dark: #a98234;
  --brand-red-soft: #f6eedf;          /* tint for hover/selected surfaces */
  --brand-navy: #07192f;
  --brand-navy-soft: #102a4c;
  --brand-gold: #c7a45d;
  --brand-gold-light: #f1d38a;
  --brand-ivory: #f7f3ea;

  /* Neutrals */
  --bg: #f6f3ec;
  --bg-soft: #fbf8f1;
  --surface: #ffffff;
  --border: #e6dfd0;
  --border-strong: #d8cbb5;
  --text: #101827;
  --text-muted: #5f6673;
  --text-faint: #9a927f;

  /* Skill colours (used for badges/accents) */
  --c-listening: #102a4c;
  --c-reading: #c7a45d;
  --c-writing: #8a6a2f;
  --c-speaking: #6c7a89;
  --c-full: #07192f;

  /* Subject colours */
  --c-ielts: #c7a45d;
  --c-pte: #102a4c;
  --c-toefl: #6c7a89;
  --c-grammar: #8a6a2f;
  --c-vocab: #c7a45d;
  --c-cambridge: #102a4c;
  --c-cambridge-listening: #102a4c;
  --c-cambridge-reading: #c7a45d;

  /* Zone accents */
  --c-zone-mock: #102a4c;
  --c-zone-study: #c7a45d;
  --c-zone-practice: #6c7a89;

  /* Effects */
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --space-section: 96px;
  --space-block: 32px;
  --space-inline: 16px;
  --surface-paper: #fffcf7;
  --shadow-sm: 0 1px 2px rgba(7, 25, 47, .04), 0 1px 3px rgba(7, 25, 47, .05);
  --shadow-paper: 0 1px 0 rgba(255,255,255,.85) inset, 0 14px 34px -18px rgba(7,25,47,.10);
  --shadow-md: 0 14px 34px -18px rgba(7, 25, 47, .28), 0 2px 8px -4px rgba(7, 25, 47, .10);
  --shadow-lg: 0 30px 70px -28px rgba(7, 25, 47, .34);
  /* ponytail: inline SVG noise — no extra asset file */
  --paper-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-premium: cubic-bezier(.16, 1, .3, 1);

  /* Motion tokens (Phase A) */
  --motion-fast: 180ms;
  --motion-base: 320ms;
  --motion-slow: 480ms;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Playfair Display", "Songti SC", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
html { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  letter-spacing: .01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Site-wide paper grain (skipped in exam viewer) */
body:not(.viewer)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: var(--paper-noise);
  background-size: 180px 180px;
}
body:not(.viewer) > header,
body:not(.viewer) > main,
body:not(.viewer) > footer,
body:not(.viewer) > .viewer-bar {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* Text selection + focus + scrollbar polish */
::selection { background: var(--brand-red); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 3px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }

/* Subtle entrance for primary content blocks */
@keyframes yysd-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.section, .hero__inner, .zone-head__inner, .minimal-page-head, .minimal-main { animation: yysd-fade-up .5s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Top navigation bar ---------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,248,241,.97);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.brand__mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color: #fff;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800; letter-spacing: .5px;
  box-shadow: var(--shadow-sm);
}
.brand__logo { height: 38px; width: auto; display: block; filter: drop-shadow(0 8px 15px rgba(7,25,47,.14)); }
.brand__name { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name b { font-size: 16px; font-weight: 800; color: var(--brand-navy); white-space: nowrap; }
.brand__name span { font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: .5px; white-space: nowrap; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.is-active { color: var(--brand-red); }
.nav a.is-active::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--brand-red);
}

/* ---------- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s var(--ease), box-shadow .2s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--brand-navy); color: #fff;
  box-shadow: 0 12px 24px -14px rgba(7, 25, 47, .55);
}
.btn--primary:hover {
  background: var(--brand-navy-soft);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(7, 25, 47, .55), 0 0 0 1px rgba(199,164,93,.22);
}
.btn--primary:active { transform: translateY(0) scale(0.98); transition-duration: var(--motion-fast); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--brand-red); color: var(--brand-red); transform: translateY(-1px); }
.btn--gold {
  background: transparent;
  color: var(--brand-navy);
  border: 1px solid rgba(199,164,93,.72);
  box-shadow: inset 0 0 0 1px rgba(241,211,138,.25);
}
.btn--gold:hover {
  background: rgba(199,164,93,.12);
  border-color: var(--brand-gold);
  color: var(--brand-navy-soft);
  transform: translateY(-1px);
}
.btn--block { width: 100%; }
.btn--sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }

/* ---------- Hero ------------------------------------------------------ */
.hero {
  position: relative;
  background:
    radial-gradient(900px 360px at 88% -25%, rgba(199,164,93,.18), transparent 62%),
    radial-gradient(700px 320px at 5% 0%, rgba(16,42,76,.10), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero__inner { padding: 60px 0 50px; }
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(29px, 4.2vw, 44px);
  line-height: 1.16;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -.6px;
}
.hero h1 .accent { color: var(--brand-red); }
.hero p { margin: 0 0 28px; font-size: 17px; line-height: 1.7; color: var(--text-muted); max-width: 640px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__stats { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.stat {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 22px 12px;
}
.stat b { display: block; font-size: 27px; color: var(--brand-navy); font-weight: 800; letter-spacing: -.5px; }
.stat span { font-size: 13px; color: var(--text-muted); }

/* ---------- Section --------------------------------------------------- */
.section { padding: 44px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.section__head h2 { margin: 0; font-size: 24px; color: var(--brand-navy); letter-spacing: -.3px; }
.section__head p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }

/* ---------- Filter chips --------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .12s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.chip.is-active { background: #17181c; border-color: #17181c; color: #fff; }
.chip.is-active:hover { background: #2a2c33; }

/* ---------- Exam grid & cards ---------------------------------------- */
.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.exam-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
/* coloured accent strip that grows in on hover */
.exam-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-red);
  transform: scaleY(0); transform-origin: top;
  transition: transform .25s var(--ease-out);
}
.exam-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.exam-card:hover::before { transform: scaleY(1); }
.exam-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  color: #fff;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.85); }
.badge--listening { background: var(--c-listening); }
.badge--reading   { background: var(--c-reading); }
.badge--writing   { background: var(--c-writing); }
.badge--speaking  { background: var(--c-speaking); }
.badge--full      { background: var(--c-full); }
.badge--other     { background: var(--text-muted); }
/* subject badges */
.badge--ielts   { background: var(--c-ielts); }
.badge--pte     { background: var(--c-pte); }
.badge--toefl   { background: var(--c-toefl); }
.badge--grammar { background: var(--c-grammar); }
.badge--vocab   { background: var(--c-vocab); }
.badge--vocab-special-listening { background: var(--c-cambridge-listening); }
.badge--vocab-special-reading   { background: var(--c-cambridge-reading); }
.badge--vocab-special-writing   { background: var(--c-cambridge-reading); }
.badge--cambridge { background: var(--c-cambridge); }
.badge--cambridge-listening { background: var(--c-cambridge-listening); }
.badge--cambridge-reading   { background: var(--c-cambridge-reading); }

.tag-cat {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  padding: 3px 9px; border: 1px solid var(--border); border-radius: 6px;
}
.exam-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); line-height: 1.35; }
.exam-card p { margin: 0 0 18px; font-size: 13.5px; color: var(--text-muted); flex: 1; }
.exam-card__meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 16px; }
.exam-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-card__foot { display: flex; align-items: center; gap: 10px; }

.done-flag {
  position: absolute; top: 16px; right: 16px;
  display: none;
  font-size: 11px; font-weight: 700; color: var(--c-reading);
  background: rgba(30,158,106,.1); padding: 3px 9px; border-radius: 999px;
}
.exam-card.is-done .done-flag { display: inline-block; }

/* ---------- Empty / loading states ----------------------------------- */
.state {
  text-align: center; padding: 70px 20px; color: var(--text-muted);
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}
.state h3 { margin: 12px 0 6px; color: var(--text); }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border: 3px solid var(--border); border-top-color: var(--brand-red);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Feature row (homepage) ----------------------------------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 20px;
  background: var(--brand-red-soft); color: var(--brand-red); margin-bottom: 15px;
  transition: transform .25s var(--ease-out);
}
.feature:hover .ico { transform: scale(1.06) rotate(-3deg); }
.feature h4 { margin: 0 0 6px; font-size: 16px; color: var(--brand-navy); }
.feature p { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* ---------- Zone portals (landing) ----------------------------------- */
.zone-portals { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.zone-portal {
  position: relative; display: block; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.zone-portal:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.zone-portal .zp-go { transition: transform .2s var(--ease); display: inline-block; }
.zone-portal:hover .zp-go { transform: translateX(4px); }
.zone-portal::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--zc, var(--brand-red)); }
.zone-portal--mock     { --zc: var(--c-zone-mock); }
.zone-portal--study    { --zc: var(--c-zone-study); }
.zone-portal--practice { --zc: var(--c-zone-practice); }
.zone-portal .zp-ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--zc) 12%, white); color: var(--zc);
}
.zone-portal h3 { margin: 0 0 4px; font-size: 20px; color: var(--brand-navy); }
.zone-portal .zp-en { font-size: 12px; color: var(--text-faint); letter-spacing: .5px; text-transform: uppercase; }
.zone-portal p { margin: 12px 0 16px; font-size: 14px; color: var(--text-muted); }
.zp-subjects { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.zp-subject {
  font-size: 12.5px; font-weight: 600; color: var(--text); padding: 5px 11px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
}
.zp-subject b { color: var(--zc); margin-left: 4px; }
.zone-portal .zp-foot { display: flex; align-items: center; justify-content: space-between; }
.zone-portal .zp-count { font-size: 13px; color: var(--text-muted); }
.zone-portal .zp-count b { color: var(--brand-navy); font-size: 17px; }
.zone-portal .zp-go { font-size: 14px; font-weight: 700; color: var(--zc); }

/* ---------- Homepage zone panels (course tree) ----------------------- */
.zone-portals--tree { display: flex; flex-direction: column; gap: 22px; }
.zpanel {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.zpanel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--zc, var(--brand-red)); }
.zpanel--study    { --zc: var(--c-zone-study); }
.zpanel--practice { --zc: var(--c-zone-practice); }
.zpanel--mock     { --zc: var(--c-zone-mock); }
.zpanel__head { display: flex; align-items: center; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--border); }
.zpanel__ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0;
  background: color-mix(in srgb, var(--zc) 13%, white); color: var(--zc);
}
.zpanel__title { flex: 1; min-width: 0; }
.zpanel__title h3 { margin: 0; font-size: 21px; color: var(--brand-navy); }
.zpanel__en { font-size: 12px; color: var(--text-faint); letter-spacing: .5px; text-transform: uppercase; font-weight: 600; }
.zpanel__title p { margin: 3px 0 0; font-size: 13.5px; color: var(--text-muted); }
.zpanel__enter { font-size: 14px; font-weight: 700; color: var(--zc); white-space: nowrap; }
.zpanel__cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 22px 26px; }
.navcat {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg);
}
.navcat__title { font-size: 14px; font-weight: 800; color: var(--brand-navy); margin-bottom: 10px; }
.navcat__leaves { display: flex; flex-direction: column; gap: 7px; }
.navcat--leaf { padding: 0; border: none; background: none; }
.navcat--leaf .navleaf { border: 1px solid var(--border); background: var(--bg); padding: 13px 16px; }
.navleaf {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 8px;
  font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid transparent;
  transition: border-color .15s var(--ease), transform .15s var(--ease), background .15s var(--ease);
}
.navleaf .nl-label { flex: 1; font-weight: 600; }
.navleaf .nl-n {
  font-size: 12px; min-width: 22px; text-align: center; color: #fff; background: var(--zc, var(--brand-red));
  border-radius: 999px; padding: 1px 8px; font-weight: 700;
}
.navleaf .nl-soon { font-size: 11.5px; color: var(--text-faint); border: 1px dashed var(--border-strong); border-radius: 999px; padding: 1px 8px; }
a.navleaf { cursor: pointer; }
a.navleaf:hover { border-color: var(--zc, var(--brand-red)); transform: translateX(2px); background: color-mix(in srgb, var(--zc) 6%, white); }
.navleaf.is-empty { opacity: .72; }
@media (max-width: 640px) {
  .zpanel__head { flex-wrap: wrap; }
  .zpanel__cats { grid-template-columns: 1fr; }
}

/* ---------- Zone page header ----------------------------------------- */
.zone-head {
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.zone-head__inner { padding: 40px 0 32px; }
.zone-head .crumb { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.zone-head .crumb a { color: var(--brand-red); font-weight: 600; }
.zone-head h1 { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: #17181c; display: flex; align-items: center; gap: 12px; }
.zone-head h1 .zh-ico { font-size: 26px; }
.zone-head p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- Subject group (zone page) -------------------------------- */
.subject-group { margin-bottom: 38px; }
.subject-group__head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.subject-group__head h2 { margin: 0; font-size: 19px; color: var(--brand-navy); }
.subject-dot { width: 11px; height: 11px; border-radius: 50%; }
.subject-group__head .cnt { font-size: 13px; color: var(--text-faint); font-weight: 600; }
/* sub-skill blocks inside a category (e.g. 雅思真题 → 听力/阅读/口语/写作) */
.leaf-wrap { display: flex; flex-direction: column; gap: 22px; }
.leaf-block { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; background: var(--surface); }
.leaf-block__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.leaf-block__head h4 { margin: 0; font-size: 16px; color: var(--brand-navy); }
.leaf-block__head .cnt { font-size: 12.5px; color: var(--text-faint); font-weight: 600; }
.leaf-block--group { background: var(--surface-2, #fafafa); }
.leaf-nest { display: flex; flex-direction: column; gap: 14px; padding-left: 4px; }
.leaf-nest > .leaf-block { background: #fff; }
.soon-box {
  text-align: center; padding: 30px 20px; color: var(--text-muted); font-size: 14px;
  background: var(--bg); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
}

/* ---------- Cambridge volume cards (剑桥真题系列) ---------------------- */
.vol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.vol-card {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 16px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.vol-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d8dade; }
.vol-card__top { display: flex; align-items: center; justify-content: space-between; }
.vol-card__vol { font-size: 12px; font-weight: 800; letter-spacing: .8px; color: var(--text-faint); }
.vol-card__tag { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.vol-card__tag--new  { color: #1d4ed8; background: #dbeafe; }
.vol-card__tag--mid  { color: #5b3fd6; background: #ede9fe; }
.vol-card__tag--base { color: #5f6a7d; background: #eef1f5; }
.vol-card__body { display: flex; align-items: center; gap: 14px; }
.vol-card__ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: #eef2ff; flex-shrink: 0; }
.vol-card__body h3 { margin: 0; font-size: 19px; color: var(--brand-navy); }
.vol-card__cnt { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.vol-card__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 13px; }
.vol-card__skills { display: flex; gap: 4px; font-size: 15px; }
.vol-card__skills .vc-skill { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; border: 1px solid var(--border); }
.vol-card__go { font-size: 14px; font-weight: 700; color: var(--brand-red); }
.vol-card:hover .vol-card__go { color: #a00d24; }

/* ---------- Cambridge volume detail (per-Test, skill panels) ---------- */
.cam-hero {
  display: flex; align-items: center; gap: 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.cam-hero__badge { background: #17181c; border-radius: 12px; padding: 14px 26px; text-align: center; min-width: 150px; }
.cam-hero__badge .lbl { font-size: 10.5px; letter-spacing: 1.5px; color: rgba(255,255,255,.6); font-weight: 600; }
.cam-hero__badge .num { font-size: 46px; font-weight: 800; color: #fff; line-height: 1; margin-top: 2px; }
.cam-hero h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: #17181c; }
.cam-hero .meta { margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.test-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.test-block > h2 { margin: 0 0 16px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: #17181c; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.skill-panel {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px;
  text-align: center;
  overflow: hidden;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.skill-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8dade; }
/* thin functional skill accent along the top edge */
.skill-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.skill-panel--listening::before { background: var(--c-cambridge-listening); }
.skill-panel--reading::before   { background: var(--c-cambridge-reading); }
.skill-panel--writing::before   { background: var(--c-writing); }
.skill-panel__ico { font-size: 24px; }
.skill-panel__name { font-size: 17px; font-weight: 700; margin: 8px 0 4px; color: #17181c; letter-spacing: -.01em; }
.skill-panel__meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; }
.skill-panel__btn {
  display: block; width: 100%; border: none; border-radius: 9px;
  padding: 11px; font-size: 14.5px; font-weight: 600; color: #fff;
  background: #17181c; cursor: pointer;
  transition: background .18s var(--ease);
}
.skill-panel__btn:hover { background: var(--brand-red); }
@media (max-width: 640px) { .cam-hero { flex-direction: column; text-align: center; } }

/* ---------- Vocabulary book hub (vocab.html) --------------------------- */
.vocab-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.vocab-range-wrap { margin-top: 8px; }
.vocab-range-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vocab-range-panel { display: none; }
.vocab-range-panel.is-active { display: block; }
.vocab-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.vocab-list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .18s var(--ease), transform .18s var(--ease-out);
}
.vocab-list-row.is-done::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #f1d38a, var(--brand-gold, #c7a45d));
}
.vocab-list-row:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.vocab-list-row.is-done { background: #f8faf8; border-color: #d4e8d9; }
.vocab-list-row__no {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--text-faint);
  min-width: 52px;
}
.vocab-list-row__title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.35;
}
.vocab-list-row__go { font-size: 13px; font-weight: 700; color: var(--brand-red); flex-shrink: 0; }
.vocab-list-row__badge {
  font-size: 11px;
  font-weight: 700;
  color: #2d6a4a;
  background: #e8f5ee;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.vol-card--vocab .vol-card__ico--vocab { background: #f0f4ff; color: var(--brand-navy); }
.exam-grid--compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.test-block > h2 .cnt { font-size: 13px; font-weight: 600; color: var(--text-faint); margin-left: 8px; }

/* ---------- Footer ---------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 40px;
}
.site-footer__inner {
  padding: 26px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
}
.site-footer a { color: var(--brand-red); font-weight: 600; }

/* ==========================================================================
   Exam viewer page (exam.html)
   ========================================================================== */
body.viewer { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #fff; }
.viewer-bar {
  display: flex; align-items: center; gap: 14px;
  height: 56px; padding: 0 18px;
  background: linear-gradient(90deg, #061427, #102a4c); color: #fff; flex: none;
  border-bottom: 1px solid rgba(199,164,93,.38);
}
.viewer-bar a.back { display: inline-flex; align-items: center; gap: 7px; color: #e8dcc1; font-weight: 600; font-size: 14px; }
.viewer-bar a.back:hover { color: #fff; }
.viewer-bar .v-title { font-weight: 700; font-size: 15px; }
.viewer-bar .v-sep { width: 1px; height: 22px; background: rgba(255,255,255,.18); }
.viewer-bar .v-meta { font-size: 13px; color: #d4c7ad; }
.viewer-bar .v-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 15px;
  padding: 6px 13px; border-radius: 8px;
  background: rgba(255,255,255,.10);
}
.timer.is-low { background: rgba(200,16,46,.9); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.viewer-frame { flex: 1; border: 0; width: 100%; background: #fff; }

/* ==========================================================================
   Admin page
   ========================================================================== */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.panel h3 { margin: 0 0 6px; color: var(--brand-navy); font-size: 18px; }
.panel > p.sub { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 0 18px 46px; }
.steps li:not(:last-child)::after { content:""; position:absolute; left:15px; top:30px; bottom:0; width:2px; background:var(--border); }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-red); color: #fff; font-weight: 700; font-size: 14px;
  display: grid; place-items: center;
}
.steps li b { color: var(--text); }
.steps li code, code.inline {
  background: var(--bg); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-size: 12.5px; color: var(--brand-red-dark);
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; font-family: inherit; color: var(--text); background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(200,16,46,.25); border-color: var(--brand-red); }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--text-muted);
  cursor: pointer; transition: all .15s; background: var(--bg);
}
.dropzone.is-over { border-color: var(--brand-red); background: rgba(200,16,46,.04); color: var(--text); }
.codeblock {
  background: #0f1424; color: #e6e9f2; border-radius: 10px; padding: 16px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: auto; white-space: pre; line-height: 1.55;
}
.note { background: #fff8e6; border: 1px solid #ffe1a3; color: #8a6300; border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }

/* ---------- Admin upload category grid ------------------------------- */
.cat-zone { margin-bottom: 26px; }
.cat-zone__head { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; }
.cat-zone__head h3 { margin: 0; font-size: 17px; color: var(--brand-navy); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.cat-card h4 { margin: 8px 0 4px; font-size: 15.5px; color: var(--text); }
.cat-card .path {
  font-size: 11.5px; color: var(--text-faint); font-family: ui-monospace, Menlo, monospace;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; margin-bottom: 13px; word-break: break-all;
}
.cat-card .cnt { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.cat-card .acts { display: flex; gap: 8px; margin-top: auto; }
.cat-card .acts .btn { flex: 1; }
.cat-card__top { display: flex; align-items: center; }

/* ---------- Results table -------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
table.data th { background: var(--bg); font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
table.data tr:last-child td { border-bottom: 0; }
.score-pill { display:inline-block; padding:3px 11px; border-radius:999px; font-weight:700; font-size:13px; background:rgba(30,158,106,.12); color:var(--c-reading); }

/* ==========================================================================
   Minimal homepage redesign
   ========================================================================== */
.home-minimal {
  --minimal-ink: #07192f;
  --minimal-muted: #5f6673;
  --minimal-faint: #9a927f;
  --minimal-line: #e6dfd0;
  --minimal-accent: var(--brand-gold);
  background:
    radial-gradient(760px 360px at 82% -120px, rgba(199,164,93,.18), transparent 64%),
    radial-gradient(780px 380px at 8% 0%, rgba(16,42,76,.08), transparent 58%),
    radial-gradient(520px 280px at 50% 0%, rgba(255,252,245,.55), transparent 70%),
    linear-gradient(180deg, #fbf8f1 0%, #f6f3ec 48%, #f8f6f0 100%);
  color: var(--minimal-ink);
  overflow-x: hidden;
  letter-spacing: -.005em;
}
.minimal-shell {
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
}
.minimal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251,248,241,.97);
  border-bottom: 1px solid var(--minimal-line);
}
.minimal-topbar__inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.minimal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--minimal-ink);
  flex: 0 0 auto;
}
.minimal-brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  filter: drop-shadow(0 10px 18px rgba(7,25,47,.16));
}
.minimal-brand__text b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--minimal-ink);
  letter-spacing: 0;
}
.minimal-brand__text span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--minimal-faint);
  letter-spacing: .02em;
}
.minimal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.minimal-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--minimal-muted);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.minimal-nav a:hover {
  background: rgba(16,42,76,.07);
  color: var(--minimal-ink);
}
.minimal-nav a.is-active {
  background: #07192f;
  border: 1px solid rgba(199,164,93,.42);
  color: #fff;
}
.minimal-page-head {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--minimal-line);
  margin-bottom: 28px;
}
.minimal-crumb {
  font-size: 13px;
  color: var(--minimal-muted);
  margin-bottom: 14px;
}
.minimal-crumb a {
  color: var(--minimal-accent);
  font-weight: 600;
}
.minimal-page-head h1 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--minimal-ink);
  line-height: 1.15;
}
.minimal-page-desc {
  margin: 0;
  font-size: 15px;
  color: var(--minimal-muted);
  line-height: 1.6;
  max-width: 560px;
}
.minimal-main {
  padding-bottom: 64px;
}
.minimal-back {
  padding-top: 24px;
  margin-bottom: 4px;
}
.minimal-back__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--minimal-muted);
  transition: color .15s var(--ease);
}
.minimal-back__link:hover { color: var(--minimal-accent); }
.home-minimal .subject-group { margin-bottom: 44px; }
.home-minimal .subject-group__head h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--minimal-ink);
}
.home-minimal .leaf-block {
  border-color: var(--minimal-line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.home-minimal .cam-hero,
.home-minimal .test-block,
.home-minimal .state {
  border-color: var(--minimal-line);
}
.home-minimal .cam-hero,
.home-minimal .test-block {
  border-radius: 18px;
  box-shadow: 0 18px 52px rgba(16,24,40,.06);
}
.home-minimal .section__head h2 {
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--minimal-ink);
}
.home-minimal .section__head p { color: var(--minimal-muted); }
.home-minimal .section__head--actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 22px;
}
.home-minimal .filters { margin-bottom: 26px; }
.minimal-hero {
  position: relative;
}
.minimal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--minimal-faint);
}
.minimal-eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--brand-navy), var(--brand-gold));
}
.minimal-hero h1 {
  max-width: 920px;
  margin: 22px 0 0;
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--minimal-ink);
  letter-spacing: -.03em;
}
.minimal-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.minimal-entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 26px 26px 22px;
  border: 1px solid rgba(230,223,208,.92);
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  box-shadow: var(--shadow-paper);
  transition: transform var(--motion-base) var(--ease-premium),
              box-shadow var(--motion-base) var(--ease-premium),
              border-color var(--motion-base) var(--ease-premium);
}
.minimal-entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199,164,93,.62);
  box-shadow: 0 28px 72px rgba(7,25,47,.13);
}
.minimal-entry-card:active {
  transform: translateY(-1px) scale(0.985);
  transition-duration: var(--motion-fast);
}
.minimal-entry-card:hover h2 {
  color: var(--brand-navy-soft);
}
.minimal-entry-card__kicker {
  color: var(--brand-gold);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .12em;
}
.minimal-entry-card h2 {
  margin: 16px 0 8px;
  color: var(--minimal-ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.minimal-entry-card p {
  margin: 0;
  color: var(--minimal-muted);
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: 0;
}
.minimal-entry-card__go {
  margin-top: auto;
  padding-top: 18px;
  font-size: 18px;
  font-weight: 600;
  color: var(--minimal-faint);
  transition: color .18s var(--ease), transform .18s var(--ease-out);
}
.minimal-entry-card:hover .minimal-entry-card__go {
  color: var(--minimal-accent);
  transform: translateX(4px);
}
.minimal-section {
  padding: var(--space-block) 0 var(--space-section);
  border-top: 1px solid var(--minimal-line);
}
.minimal-section__head {
  margin-bottom: 30px;
}
.minimal-section__head h2 {
  margin: 0;
  color: var(--minimal-ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.minimal-section__head p {
  margin: 8px 0 0;
  color: var(--minimal-muted);
  font-size: 14.5px;
  letter-spacing: 0;
}
.minimal-vol-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
/* ponytail: nested .vol-grid from catalog helper must not shrink to one column */
.minimal-vol-grid > .vol-grid {
  display: contents;
}
.minimal-footer {
  padding: 36px 0 48px;
  color: var(--minimal-faint);
  font-size: 12.5px;
  letter-spacing: 0;
  border-top: 1px solid var(--minimal-line);
}
@media (max-width: 820px) {
  .minimal-entry-grid { grid-template-columns: 1fr; }
  .minimal-vol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minimal-brand__text span { display: none; }
}

/* Course-volume cards used by the minimal homepage and Cambridge group views. */
.vol-card {
  min-height: 230px;
  gap: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  border-color: rgba(230,223,208,.92);
  box-shadow: var(--shadow-paper);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.vol-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  min-height: 230px;
}
.vol-card:hover {
  transform: translateY(-4px);
  border-color: rgba(199,164,93,.64);
  box-shadow: 0 24px 56px rgba(7,25,47,.14);
}
.vol-card__top {
  margin-bottom: 28px;
}
.vol-card__vol {
  color: #9a927f;
  font-size: 15px;
  letter-spacing: .09em;
}
.vol-card__tag {
  min-width: 46px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
}
.vol-card__tag--new { color: #07192f; background: #f1dca7; }
.vol-card__tag--mid { color: #5a4521; background: #f6eedf; }
.vol-card__tag--base { color: #4d5664; background: #ece7dd; }
.vol-card__body {
  gap: 16px;
}
.vol-card__ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #07192f;
  color: var(--brand-gold);
  font-size: 0;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.vol-card:hover .vol-card__ico {
  background: #102a4c;
  color: #f1d38a;
}
.vol-card__ico svg {
  width: 32px;
  height: 32px;
}
.vol-card__body h3 {
  margin: 0;
  color: var(--minimal-ink, var(--brand-navy));
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.vol-card__cnt {
  margin-top: 6px;
  color: var(--minimal-muted, #6b7280);
  font-size: 13.5px;
  font-weight: 500;
}
.vol-card__foot {
  margin-top: auto;
  padding-top: 20px;
}
.vol-card__skills {
  display: flex;
  align-items: center;
  gap: 0;
}
.vol-card__skills .vc-skill {
  width: 28px;
  height: 28px;
  margin-right: -7px;
  border: 2px solid #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.vc-skill--a { background: #d9bd79 !important; }
.vc-skill--b { background: #102a4c !important; }
.vc-skill--u { background: #6c7a89 !important; }
.vol-card__go {
  color: var(--minimal-faint, #9aa0aa);
  font-size: 15px;
  font-weight: 600;
  transition: color .18s var(--ease);
}
.vol-card:hover .vol-card__go {
  color: var(--brand-gold);
}

/* ---------- Responsive ----------------------------------------------- */
@media (max-width: 820px) {
  /* Header becomes a single row with a horizontally-scrollable nav */
  .site-header__inner { gap: 10px; height: 60px; }
  .brand { gap: 9px; }
  .brand__mark { width: 34px; height: 34px; font-size: 15px; }
  .brand__logo { height: 28px; }
  .brand__name b { font-size: 14px; }
  .brand__name span { display: none; }
  .nav {
    gap: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 10px; font-size: 13px; }

  .minimal-shell { width: min(100% - 32px, 720px); }
  .minimal-topbar__inner { min-height: 62px; gap: 12px; }
  .minimal-nav {
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .minimal-nav::-webkit-scrollbar { display: none; }
  .minimal-nav a { padding: 8px 11px; font-size: 14px; }
  .minimal-entry-grid {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }
  .minimal-entry-card { min-height: auto; }
  .minimal-section { padding: 48px 0 56px; }
}
@media (max-width: 640px) {
  .brand__name { display: none; }        /* phones: show logo only, free up space for nav */
  .brand__logo { height: 30px; }
  .hero__inner { padding: 38px 0 32px; }
  .hero h1 { font-size: 27px; }
  .zone-head h1 { font-size: 24px; }
  .viewer-bar .v-meta, .viewer-bar .v-sep { display: none; }

  .minimal-brand__text { display: none; }
  .minimal-brand__logo { width: 48px; height: 48px; }
  .minimal-entry-card h2 { font-size: 34px; }
  .vol-card__body h3 { font-size: 21px; }
}

/* ==========================================================================
   Premium brand layer — logo theme, motion, zone accents (Phase 1–3)
   ========================================================================== */

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sticky nav — scrolled state */
.minimal-topbar {
  transition: background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.minimal-topbar.is-scrolled {
  background: rgba(251,248,241,.96);
  box-shadow: 0 10px 30px rgba(7,25,47,.08);
  border-bottom-color: rgba(199,164,93,.28);
}

/* Hero — logo watermark + serif headline */
.minimal-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.minimal-hero__inner {
  position: relative;
  z-index: 1;
  padding: 86px 0 64px;
}
.hero-watermark,
.hero-motifs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-watermark img { display: none; }

.hero-motif {
  position: absolute;
  display: block;
}
.hero-motif--shield {
  top: 6%;
  right: max(2%, calc((100% - 1180px) / 2 + 20px));
  width: min(240px, 28vw);
  opacity: .85;
  animation: motif-enter 1.2s var(--ease-premium) both;
}
.hero-motif--star {
  color: var(--brand-gold);
}
.hero-motif--star-lg {
  top: 14%;
  right: 22%;
  width: 22px;
  opacity: .22;
}
.hero-motif--star-sm {
  top: 38%;
  right: 10%;
  width: 14px;
  opacity: .14;
}
.hero-motif--arc {
  top: 28%;
  right: -2%;
  width: min(340px, 38vw);
  height: 120px;
  opacity: .85;
  animation: motif-enter 1.4s var(--ease-premium) .1s both;
}

@keyframes motif-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: .85; transform: none; }
}

.minimal-star {
  width: 14px;
  height: 14px;
  color: var(--brand-gold);
  flex-shrink: 0;
}
.minimal-eyebrow {
  gap: 10px;
}
.minimal-eyebrow::before {
  display: none;
}

.minimal-hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
}
.minimal-hero h1 .dot {
  color: var(--brand-gold);
  font-weight: 600;
}

.minimal-hero__desc {
  max-width: 640px;
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--minimal-muted, var(--text-muted));
}
.minimal-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-path {
  display: block;
  width: min(520px, 100%);
  height: 28px;
  margin-top: 36px;
  overflow: visible;
}
.hero-path__line {
  animation: hero-path-draw 1.6s var(--ease-out) .35s forwards;
}
@keyframes hero-path-draw {
  to { stroke-dashoffset: 0; }
}

/* Stats trust bar */
.minimal-stats {
  padding: 8px 0 48px;
}
.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid rgba(199,164,93,.34);
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  box-shadow: var(--shadow-paper);
}
.stat-bar__item {
  text-align: center;
  padding: 8px 10px;
  border-right: 1px solid rgba(230,223,208,.85);
}
.stat-bar__item:last-child { border-right: 0; }
.stat-bar__item b {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-bar__item span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Rich footer */
.minimal-footer--rich {
  padding: 44px 0 52px;
  border-top: 1px solid var(--minimal-line, var(--border));
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(247,243,234,.55));
}
.minimal-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.minimal-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.minimal-footer__logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 8px 16px rgba(7,25,47,.12));
}
.minimal-footer__brand b {
  display: block;
  font-size: 15px;
  color: var(--brand-navy);
}
.minimal-footer__brand span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: .04em;
}
.minimal-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}
.minimal-footer__links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .15s var(--ease);
}
.minimal-footer__links a:hover { color: var(--brand-gold); }
.minimal-footer__copy {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint);
}
.minimal-footer--rich::after {
  content: "★";
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--brand-gold);
  opacity: .55;
  letter-spacing: .3em;
}

/* Breadcrumb star separator */
.crumb-sep {
  color: var(--brand-gold);
  font-size: 9px;
  vertical-align: middle;
  margin: 0 4px;
  opacity: .75;
}

/* Branded loading state */
.state--brand {
  border-style: solid;
  border-color: rgba(199,164,93,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,243,234,.65));
}
.spinner--brand {
  position: relative;
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-top-color: var(--brand-gold);
  border-right-color: rgba(16,42,76,.35);
}
.spinner--brand::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: url("../img/logo.svg") center / contain no-repeat;
  opacity: .9;
}

/* Volume cards — shield badge + book hover */
.vol-card {
  position: relative;
  overflow: hidden;
}
.vol-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-gold-light), var(--brand-gold));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .28s var(--ease-out);
  border-radius: 24px 0 0 24px;
}
.vol-card:hover::after { transform: scaleY(1); }
.vol-card__vol {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vol-card__shield {
  width: 12px;
  height: 14px;
  color: var(--brand-gold);
  flex-shrink: 0;
}
.vol-card__book {
  transition: transform .35s var(--ease-out);
  transform-origin: center bottom;
}
.vol-card:hover .vol-card__book {
  transform: scale(1.06) rotate(-2deg);
}
.vol-card:hover .vol-card__book-l {
  transform-origin: 30% 80%;
}
.vol-card:hover .vol-card__book-r {
  transform-origin: 70% 80%;
}

/* Zone pages — accent bar + chip restyle */
.zone-page .minimal-page-head {
  position: relative;
  padding: 18px 0 16px;
  margin-bottom: 16px;
}
.zone-page .minimal-page-head::before {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-bottom: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--zone-accent, var(--brand-gold)), var(--brand-gold-light));
}
.zone-page .minimal-crumb { margin-bottom: 8px; }
.zone-page .minimal-page-head h1 { margin: 6px 0 4px; }
.zone-page .catalog-toolbar {
  gap: 10px;
  margin-bottom: 12px;
}
.zone-page .subject-group:first-child { margin-top: 0; }
.zone-page .subject-group__head { margin-bottom: 12px; }
.zone-page .home-dashboard { margin-bottom: 16px; }
.zone-page--study    { --zone-accent: var(--c-zone-study); }
.zone-page--practice { --zone-accent: var(--c-zone-practice); }
.zone-page--mock     { --zone-accent: var(--c-zone-mock); }

.zone-page .minimal-page-head h1 {
  font-family: var(--font-serif);
}
.home-minimal .chip.is-active {
  background: var(--brand-navy);
  border-color: rgba(199,164,93,.42);
  color: #fff;
}
.home-minimal .chip.is-active:hover {
  background: var(--brand-navy-soft);
}

/* Exam viewer — logo in bar */
.viewer-bar__logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  opacity: .92;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}
.viewer-bar {
  gap: 12px;
}

@media (max-width: 820px) {
  .hero-motif--shield {
    width: min(160px, 36vw);
    right: -4%;
    top: 4%;
    opacity: .85;
  }
  .hero-motif--star-lg { right: 18%; opacity: .18; }
  .hero-motif--arc { display: none; }
  .minimal-hero__inner { padding: 52px 0 48px; }
  .stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-bar__item:nth-child(2) { border-right: 0; }
  .stat-bar__item:nth-child(1),
  .stat-bar__item:nth-child(2) {
    border-bottom: 1px solid rgba(230,223,208,.85);
    padding-bottom: 14px;
  }
}
@media (max-width: 640px) {
  .minimal-footer__brand { flex-direction: column; }
  .hero-path { width: 100%; margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-path__line { animation: none; stroke-dashoffset: 0; }
}

/* ==========================================================================
   Scalable catalog — search, filters, collapse, tabs, compact lists
   ========================================================================== */
.minimal-section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-gold);
  white-space: nowrap;
  transition: color .15s var(--ease);
}
.section-link:hover { color: var(--brand-navy-soft); }

.continue-strip {
  margin-bottom: 32px;
  padding: 20px 22px;
  border: 1px solid rgba(199,164,93,.34);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(247,243,234,.7));
  box-shadow: var(--shadow-sm);
}
.continue-strip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.continue-strip__head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-navy);
}
.continue-strip__head a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.continue-strip__head a:hover { color: var(--brand-gold); }
.continue-strip__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.continue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .15s var(--ease), transform .15s var(--ease-out);
}
.continue-row:hover {
  border-color: rgba(199,164,93,.55);
  transform: translateX(3px);
}
.continue-row__title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.35;
}
.continue-row__meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-gold);
  flex-shrink: 0;
}

.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}
.catalog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.catalog-search:focus-within {
  border-color: rgba(199,164,93,.62);
  box-shadow: 0 0 0 3px rgba(199,164,93,.12);
}
.catalog-search__ico {
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
}
.catalog-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.catalog-search input::placeholder { color: var(--text-faint); }

.filters--sub {
  margin-bottom: 0;
  padding-top: 2px;
}
.chip--sub {
  font-size: 12.5px;
  padding: 7px 13px;
}

.catalog-search-meta {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.catalog-section {
  margin-bottom: 28px;
}
.catalog-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.catalog-section__head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--brand-navy);
}
.catalog-section__head .cnt,
.subject-group__head .cnt {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}

.catalog-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.catalog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .15s var(--ease), transform .15s var(--ease-out);
}
.catalog-row:hover {
  border-color: rgba(199,164,93,.55);
  transform: translateX(2px);
}
.catalog-row.is-done {
  background: rgba(247,243,234,.55);
  border-color: rgba(199,164,93,.28);
}
.catalog-row__badge { flex-shrink: 0; }
.catalog-row__title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.35;
}
.catalog-row__status {
  font-size: 11px;
  font-weight: 700;
  color: #2d6a4a;
  background: #e8f5ee;
  padding: 3px 8px;
  border-radius: 999px;
}
.catalog-row__go {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-gold);
  flex-shrink: 0;
}

.catalog-collapse {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.55);
  overflow: hidden;
}
.catalog-collapse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--brand-navy);
  transition: background .15s var(--ease);
}
.catalog-collapse summary::-webkit-details-marker { display: none; }
.catalog-collapse summary:hover { background: rgba(199,164,93,.08); }
.catalog-collapse__label { font-size: 15px; }
.catalog-collapse__meta {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.catalog-collapse .vol-grid {
  padding: 0 16px 18px;
}

.vol-card--done {
  border-color: rgba(199,164,93,.45);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,243,234,.78));
}

.vocab-list-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}
.vocab-list-grid--compact { max-width: 920px; }

.cam-crumb { margin-bottom: 18px; }

.test-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.test-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.test-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.test-tab.is-active {
  background: var(--brand-navy);
  border-color: rgba(199,164,93,.42);
  color: #fff;
}
.test-tab__done {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(199,164,93,.25);
  color: var(--brand-gold-light);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.test-tab--complete .test-tab__done {
  background: linear-gradient(135deg, #f1d38a, #c7a45d);
  color: var(--brand-navy);
  box-shadow: 0 2px 8px rgba(199,164,93,.35);
}
.test-tab.is-active .test-tab__done {
  background: rgba(255,255,255,.18);
  color: #fff;
  box-shadow: none;
}
.test-tab--complete.is-active .test-tab__done {
  background: linear-gradient(135deg, #f1d38a, #c7a45d);
  color: var(--brand-navy);
}
.test-tab__part {
  font-size: 11px;
  font-weight: 700;
  opacity: .75;
}
.test-panels { margin-bottom: 24px; }
.test-panels {
  transition: opacity var(--motion-base) var(--ease-premium),
              transform var(--motion-base) var(--ease-premium);
}
.test-panels.is-swapping {
  opacity: 0;
  transform: translateY(8px);
}
.test-panel { display: none; }
.test-panel.is-active { display: block; }
.test-panel.is-entering .skill-panel {
  animation: panel-in var(--motion-base) var(--ease-premium) both;
  animation-delay: calc(var(--panel-i, 0) * 55ms);
}
.skill-panel.is-done {
  border-color: rgba(199,164,93,.35);
  background: rgba(247,243,234,.45);
}
.skill-panel.is-done::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1d38a, #c7a45d);
  color: var(--brand-navy);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

@media (max-width: 640px) {
  .catalog-toolbar .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .catalog-toolbar .filters::-webkit-scrollbar { display: none; }
  .continue-row { flex-direction: column; align-items: flex-start; }
  .score-toast { flex-wrap: wrap; }
  .score-toast__link { width: 100%; margin-top: 4px; }
}

/* ==========================================================================
   Phase C/D — score toast + vocab LIST transitions
   ========================================================================== */
.score-toast-host {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  transform: translateX(-50%) translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--motion-base) var(--ease-premium),
              opacity var(--motion-base) var(--ease-premium);
  width: min(520px, calc(100% - 32px));
}
.score-toast-host.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.score-toast {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(199,164,93,.45);
  background: linear-gradient(135deg, #07192f, #102a4c);
  box-shadow: 0 24px 60px rgba(7,25,47,.35);
  color: #fff;
}
.score-toast__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-navy);
  background: linear-gradient(135deg, #f1d38a, #c7a45d);
  animation: toast-pop var(--motion-slow) var(--ease-premium) both;
}
@keyframes toast-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.score-toast__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.score-toast__body b {
  font-size: 15px;
  letter-spacing: .01em;
}
.score-toast__score {
  font-size: 14px;
  font-weight: 700;
  color: #f1d38a;
  font-variant-numeric: tabular-nums;
}
.score-toast__sub {
  font-size: 12px;
  color: rgba(255,255,255,.62);
}
.score-toast__link {
  font-size: 13px;
  font-weight: 700;
  color: #f1d38a;
  white-space: nowrap;
  flex-shrink: 0;
}
.score-toast__link:hover { color: #fff; }
.score-toast__close {
  border: 0;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.75);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.score-toast__close:hover { background: rgba(255,255,255,.18); color: #fff; }

.vocab-range-panels {
  transition: opacity var(--motion-base) var(--ease-premium),
              transform var(--motion-base) var(--ease-premium);
}
.vocab-range-panels.is-swapping {
  opacity: 0;
  transform: translateY(8px);
}
.vocab-range-panel { display: none; }
.vocab-range-panel.is-active { display: block; }
.vocab-range-panel.is-entering .vocab-list-row {
  animation: panel-in var(--motion-base) var(--ease-premium) both;
  animation-delay: calc(var(--row-i, 0) * 45ms);
}
.vocab-range-chip {
  transition: transform var(--motion-fast) var(--ease-premium),
              background var(--motion-fast) var(--ease-premium),
              border-color var(--motion-fast) var(--ease-premium);
}
.vocab-range-chip:active { transform: scale(0.97); }
.vocab-list-row {
  transition: border-color var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium);
}
.vocab-list-row:active { transform: scale(0.99); }

@media (prefers-reduced-motion: reduce) {
  .score-toast-host { transition: none; }
  .score-toast__icon { animation: none; }
  .vocab-range-panels { transition: none; }
  .vocab-range-panel.is-entering .vocab-list-row { animation: none; }
}

/* ==========================================================================
   Premium motion layer (Phase A + B)
   ========================================================================== */
@keyframes stagger-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes footer-star-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .65; transform: scale(1.08); }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.stagger-in {
  animation: stagger-up var(--motion-slow) var(--ease-premium) both;
  animation-delay: calc(var(--stagger-i, 0) * 80ms + 80ms);
}

.minimal-star {
  transition: transform var(--motion-base) var(--ease-premium);
}
.minimal-eyebrow:hover .minimal-star {
  transform: rotate(18deg) scale(1.08);
}

.reveal {
  transition-duration: var(--motion-slow);
  transition-timing-function: var(--ease-premium);
}

/* Skeleton cards */
.vol-card--skeleton {
  pointer-events: none;
  border-color: var(--border);
  background: rgba(255,255,255,.72);
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
}
.sk {
  display: block;
  border-radius: 8px;
  background: #ece7dd;
}
.minimal-vol-grid.is-loading .sk {
  background: linear-gradient(90deg, #e8e2d6 0%, #f3eee4 45%, #e8e2d6 90%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.sk--vol { width: 72px; height: 14px; }
.sk--tag { width: 46px; height: 26px; margin-left: auto; border-radius: 8px; }
.sk--ico { width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0; }
.sk-col { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sk--title { width: 72%; height: 20px; }
.sk--sub { width: 48%; height: 14px; }
.sk--foot { width: 40%; height: 14px; margin-top: auto; }
.vol-card--skeleton .vol-card__top { display: flex; align-items: center; }
.vol-card--skeleton .vol-card__body { display: flex; gap: 16px; margin-top: 28px; }
.vol-card--skeleton .vol-card__foot { margin-top: auto; padding-top: 20px; }

.minimal-vol-grid.is-loaded .vol-card:not(.vol-card--skeleton) {
  animation: panel-in var(--motion-base) var(--ease-premium) both;
  animation-delay: var(--reveal-delay, 0ms);
}

/* Press feedback */
.vol-card:active:not(.vol-card--skeleton) {
  transform: translateY(-2px) scale(0.985);
  transition-duration: var(--motion-fast);
}
.btn--gold:active { transform: translateY(0) scale(0.98); transition-duration: var(--motion-fast); }
.continue-row:active { transform: translateX(2px) scale(0.99); }

.vol-card:hover .vol-card__body h3 {
  color: var(--brand-navy-soft);
  transition: color var(--motion-base) var(--ease-premium);
}

/* Zone content crossfade */
#content {
  transition: opacity var(--motion-base) var(--ease-premium),
              transform var(--motion-base) var(--ease-premium);
}
#content.is-swapping {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

/* Test panel switch */
.test-panel.is-entering {
  animation: panel-in var(--motion-base) var(--ease-premium) both;
}
.test-tab {
  transition: background var(--motion-fast) var(--ease-premium),
              border-color var(--motion-fast) var(--ease-premium),
              color var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium);
}
.test-tab:active { transform: scale(0.97); }

.minimal-footer--rich::after {
  opacity: .45;
}

@media (prefers-reduced-motion: reduce) {
  .stagger-in { opacity: 1; animation: none !important; }
  .hero-motif--shield,
  .hero-motif--star-lg,
  .hero-motif--star-sm,
  .hero-motif--arc { animation: none; }
  .sk { animation: none; background: #ece7dd; }
  .minimal-vol-grid.is-loaded .vol-card { animation: none; }
  .test-panel.is-entering { animation: none; }
  .minimal-footer--rich::after { animation: none; }
  #content.is-swapping { opacity: 1; transform: none; }
}

/* ==========================================================================
   P0 — paper surfaces, journey path, home dashboard
   ========================================================================== */
.minimal-entry-grid--path {
  position: relative;
}
@media (min-width: 900px) {
  .minimal-entry-grid--path::before {
    content: "";
    position: absolute;
    top: 54%;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, rgba(7,25,47,.12), rgba(199,164,93,.35), rgba(241,211,138,.25));
    z-index: 0;
    pointer-events: none;
  }
  .minimal-entry-grid--path .minimal-entry-card {
    z-index: 1;
  }
}
.minimal-entry-card[data-path-step]::after {
  content: attr(data-path-step);
  position: absolute;
  top: 18px;
  right: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(199,164,93,.45);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-gold);
  background: rgba(255,255,255,.85);
}

#home-journey {
  margin: 8px auto var(--space-block);
}

.home-journey {
  padding: 28px 28px 26px;
  border: 1px solid rgba(199,164,93,.32);
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  box-shadow: var(--shadow-paper);
}
.home-journey__head {
  margin-bottom: 22px;
}
.home-journey__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--brand-gold);
  margin-bottom: 8px;
}
.home-journey__head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 28px);
  color: var(--brand-navy);
}
.home-journey__head p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}
.home-journey__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  position: relative;
}
.home-journey__track::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-navy-soft), var(--brand-gold), var(--brand-gold-light));
  opacity: .22;
  z-index: 0;
}
.home-journey__node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 18px 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.72);
  transition: border-color var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium),
              box-shadow var(--motion-fast) var(--ease-premium);
}
.home-journey__node:hover {
  border-color: rgba(199,164,93,.55);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.home-journey__step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  margin-bottom: 4px;
}
.home-journey__node.is-done .home-journey__step {
  color: var(--brand-navy);
  border-color: rgba(199,164,93,.5);
  background: rgba(241,211,138,.25);
}
.home-journey__node.is-current .home-journey__step {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-navy-soft), var(--brand-navy));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(7,25,47,.22);
}
.home-journey__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-navy);
}
.home-journey__sub {
  font-size: 12px;
  color: var(--text-muted);
}
.home-journey__count {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-gold);
}

#home-continue {
  margin-bottom: var(--space-block);
}

.home-dashboard__inner {
  padding: 28px 28px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #07192f 0%, #102a4c 58%, #0d2240 100%);
  border: 1px solid rgba(199,164,93,.38);
  box-shadow: 0 28px 64px rgba(7,25,47,.28);
  color: #fff;
}
.home-dashboard--empty .home-dashboard__inner {
  text-align: center;
  padding: 36px 28px 32px;
}
.home-dashboard__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--brand-gold-light);
  margin-bottom: 8px;
}
.home-dashboard__inner h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
}
.home-dashboard__inner p {
  margin: 10px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,.68);
  line-height: 1.6;
}
.home-dashboard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.home-dashboard__metrics {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.home-dashboard__metric {
  min-width: 56px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  text-align: center;
}
.home-dashboard__metric b {
  display: block;
  font-family: var(--font-serif);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--brand-gold-light);
  line-height: 1.1;
}
.home-dashboard__metric span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
}
.home-dashboard__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-dashboard__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  transition: background var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium);
}
.home-dashboard__row:hover {
  background: rgba(255,255,255,.1);
  transform: translateX(3px);
}
.home-dashboard__row-zone {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--brand-gold-light);
  white-space: nowrap;
}
.home-dashboard__row-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  min-width: 0;
}
.home-dashboard__row-meta {
  font-size: 12px;
  font-weight: 700;
  color: rgba(241,211,138,.9);
  white-space: nowrap;
}
.home-dashboard__all {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-gold-light);
}
.home-dashboard__all:hover { color: #fff; }
.home-dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.btn--ghost-dark {
  background: transparent;
  color: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.28);
}
.btn--ghost-dark:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(241,211,138,.45);
  color: #fff;
}

@media (max-width: 820px) {
  .home-journey__track {
    grid-template-columns: 1fr;
  }
  .home-journey__track::before { display: none; }
  .home-dashboard__top {
    flex-direction: column;
  }
  .home-dashboard__metrics { width: 100%; }
  .home-dashboard__metric { flex: 1; }
  .home-dashboard__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ==========================================================================
   P1 — book spine vol cards, test tabs, Band timeline
   ========================================================================== */
.band-timeline {
  margin-bottom: var(--space-block);
  padding: 24px 26px 22px;
  border: 1px solid rgba(199,164,93,.32);
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  box-shadow: var(--shadow-paper);
}
.band-timeline__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--brand-gold);
  margin-bottom: 6px;
}
.band-timeline__head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--brand-navy);
}
.band-timeline__head p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.band-timeline__chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 140px;
  margin-top: 20px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.band-timeline__chart::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 1px;
  background: rgba(199,164,93,.2);
  pointer-events: none;
}
.band-timeline__item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: panel-in var(--motion-base) var(--ease-premium) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.band-timeline__bar-wrap {
  width: 100%;
  height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.band-timeline__bar {
  display: block;
  width: min(36px, 80%);
  height: var(--h, 40%);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #f1d38a, #c7a45d);
  box-shadow: 0 6px 16px rgba(199,164,93,.28);
}
.band-timeline__val {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-navy);
  font-variant-numeric: tabular-nums;
}
.band-timeline__date {
  font-size: 10px;
  color: var(--text-faint);
}

@media (prefers-reduced-motion: reduce) {
  .band-timeline__item { animation: none; }
  .test-panels.is-swapping { opacity: 1; transform: none; }
  .test-panel.is-entering .skill-panel { animation: none; }
}
