/* ==========================================================================
   优益思达学习中心 (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;

  /* Tenant white-label: tenant-boot.js hides body until auth.js applies brand */
  html.tenant-brand-ready body {
    visibility: visible;
  }

  /* 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); }
.cam-hero--listening,
.cam-hero--reading,
.cam-hero--writing,
.cam-hero--mock {
  position: relative;
  overflow: hidden;
}
.cam-hero--listening::before,
.cam-hero--reading::before,
.cam-hero--writing::before,
.cam-hero--mock::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.cam-hero--listening::before { background: #102a4c; }
.cam-hero--reading::before { background: #2f6f78; }
.cam-hero--writing::before { background: #8a6a2f; }
.cam-hero--mock::before { background: linear-gradient(180deg, #102a4c 50%, #c7a45d 50%); }
.cam-hero--listening { background: linear-gradient(165deg, #f5f8fb, var(--surface)); }
.cam-hero--reading { background: linear-gradient(165deg, #f2f8f9, var(--surface)); }
.cam-hero--writing { background: linear-gradient(165deg, #faf6f0, var(--surface)); }
.cam-hero--mock { background: linear-gradient(165deg, #f3f5f8, var(--surface)); }
@media (max-width: 640px) { .cam-hero { flex-direction: column; text-align: center; } }

/* ---------- Vocabulary book hub (vocab.html) — Canvas-like modules ------ */
.vocab-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.vocab-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  max-width: 420px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.vocab-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-paper);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.vocab-search input:focus {
  outline: none;
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 3px rgba(199, 164, 93, .18);
}
.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: flex;
  flex-direction: column;
  gap: 0;
  max-width: 920px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: visible;
  background: var(--surface);
}
.vocab-list-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface-paper);
  text-decoration: none;
  color: inherit;
  overflow: visible;
  transition: background .15s var(--ease);
  z-index: 0;
}
.vocab-list-row:last-child { border-bottom: 0; }
.vocab-list-row:first-child { border-radius: 10px 10px 0 0; }
.vocab-list-row:last-child { border-radius: 0 0 10px 10px; }
.vocab-list-row:only-child { border-radius: 10px; }
.vocab-list-row.is-done::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-gold);
}
.vocab-list-row:hover { border-color: transparent; transform: none; background: #fff; z-index: 2; }
.vocab-list-row.is-done { background: #fbf8f1; border-color: transparent; }
.vocab-list-row__no {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--brand-navy-soft);
  min-width: 58px;
  text-transform: uppercase;
}
.vocab-list-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vocab-list-row__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-navy);
  line-height: 1.35;
}
.vocab-list-row__topic {
  font-size: 12.5px;
  color: var(--text-muted);
}
.vocab-list-row__trail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.vocab-list-row__go {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-gold);
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  font-family: inherit;
}
.vocab-list-row__enter {
  position: relative;
  flex-shrink: 0;
}
.vocab-list-flyout {
  display: none;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  min-width: 7.5rem;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(26, 40, 68, 0.14);
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}
.vocab-list-row__enter:hover .vocab-list-flyout,
.vocab-list-row__enter.is-open .vocab-list-flyout {
  display: flex;
}
.vocab-list-flyout__item {
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-navy);
  text-decoration: none;
  white-space: nowrap;
}
.vocab-list-flyout__item:hover {
  background: #f4f0e6;
  color: var(--brand-navy);
}
@media (max-width: 720px) {
  .vocab-list-flyout {
    left: auto;
    right: 0;
    top: calc(100% + 6px);
    transform: none;
  }
}
.vocab-list-row__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-navy);
  background: var(--brand-red-soft);
  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(1280px, 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-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--compact { max-width: 920px; }

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

.test-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.cam-pick-hint {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.test-tabs--pick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.test-tabs--pick .test-tab {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 118px;
  padding: 16px 18px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--brand-navy);
  background:
    linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border: 1px solid rgba(7, 25, 47, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 22px rgba(7, 25, 47, 0.05);
  overflow: hidden;
  transition:
    transform .2s var(--ease),
    border-color .2s var(--ease),
    box-shadow .2s var(--ease),
    background .2s var(--ease);
}
.test-tabs--pick .test-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand-gold);
  opacity: .85;
}
.cam-page--listening .test-tabs--pick .test-tab::before { background: #102a4c; }
.cam-page--reading .test-tabs--pick .test-tab::before { background: #2f6f78; }
.cam-page--writing .test-tabs--pick .test-tab::before { background: #8a6a2f; }
.cam-page--mock .test-tabs--pick .test-tab::before {
  background: linear-gradient(180deg, #102a4c 45%, #c7a45d 45%);
}
.test-tabs--pick .test-tab__kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(7, 25, 47, 0.42);
}
.test-tabs--pick .test-tab__num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-navy);
}
.test-tabs--pick .test-tab__status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: auto;
}
.test-tabs--pick .test-tab__go {
  font-size: 12px;
  font-weight: 700;
  color: rgba(7, 25, 47, 0.45);
  letter-spacing: 0.02em;
}
.test-tabs--pick .test-tab__part {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(7, 25, 47, 0.05);
  color: rgba(7, 25, 47, 0.62);
  font-size: 11px;
  font-weight: 700;
  opacity: 1;
}
.test-tabs--pick .test-tab__done {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #f1d38a, #c7a45d);
  color: var(--brand-navy);
  box-shadow: 0 2px 8px rgba(199, 164, 93, 0.35);
}
.test-tabs--pick .test-tab--complete {
  background: linear-gradient(165deg, #fffdf7 0%, #f7f1e3 100%);
  border-color: rgba(199, 164, 93, 0.35);
}
.test-tabs--pick .test-tab:hover {
  transform: translateY(-2px);
  border-color: rgba(199, 164, 93, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 28px rgba(7, 25, 47, 0.09);
  background: #fff;
  color: var(--brand-navy);
}
.test-tabs--pick .test-tab:hover .test-tab__go { color: var(--brand-gold); }
.cam-page--listening .test-tabs--pick .test-tab:hover { border-color: rgba(16, 42, 76, 0.35); }
.cam-page--reading .test-tabs--pick .test-tab:hover { border-color: rgba(47, 111, 120, 0.4); }
.cam-page--writing .test-tabs--pick .test-tab:hover { border-color: rgba(138, 106, 47, 0.4); }
.test-tabs--pick .test-tab:active {
  transform: translateY(0) scale(0.985);
}
@media (max-width: 720px) {
  .test-tabs--pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .test-tabs--pick { grid-template-columns: 1fr; }
  .test-tabs--pick .test-tab { min-height: 96px; }
}
.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-host.is-reveal {
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  width: auto;
  transform: none;
  display: grid;
  place-items: center;
  background: rgba(7, 25, 47, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.score-reveal {
  position: relative;
  width: min(420px, calc(100% - 32px));
}
.score-reveal__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #07192f;
  color: #f1d38a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.score-reveal__veil.is-done {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}
.score-reveal__card {
  position: relative;
  padding: 28px 24px 22px;
  border-radius: 20px;
  border: 1px solid rgba(199, 164, 93, 0.45);
  background: linear-gradient(160deg, #07192f, #102a4c 70%);
  box-shadow: 0 28px 64px rgba(7, 25, 47, 0.4);
  color: #fff;
  text-align: center;
  animation: toast-pop 0.45s var(--ease-premium) both;
}
.score-reveal__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241, 211, 138, 0.85);
}
.score-reveal__num {
  font-size: clamp(3rem, 10vw, 4rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #f1d38a;
}
.score-reveal__denom {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}
.score-reveal__delta {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #9be7b0;
}
.score-reveal__sub {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
}
.score-reveal__acts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.score-reveal__acts .btn--ghost {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
}
.score-reveal__x {
  position: absolute;
  top: 10px;
  right: 10px;
}
.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-alevel-showcase {
  margin: 0 auto var(--space-block);
}

/* —— Marketing homepage: Bento Grid (便当盒) —— */
.home-market-page,
.home-bento-page {
  --bento-ink: #18181b;
  --bento-muted: #52525b;
  --bento-border: #f4f4f5;
  --bento-border-strong: #e4e4e7;
  --bento-surface: #ffffff;
  --bento-soft: #fafafa;
  --bento-accent: #c7a45d;
  --bento-navy: #102a4c;
  --bento-radius: 16px;
  --bento-gap: 16px;
  --bento-shadow: 0 1px 2px rgba(24, 24, 27, .05), 0 1px 3px rgba(24, 24, 27, .06);
  --bento-shadow-md: 0 4px 12px -2px rgba(24, 24, 27, .10), 0 2px 6px -2px rgba(24, 24, 27, .06);
  background:
    radial-gradient(640px 320px at 88% 8%, rgba(16, 42, 76, .06), transparent 60%),
    radial-gradient(520px 280px at 12% 0%, rgba(199, 164, 93, .08), transparent 55%),
    linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
}

.home-bento {
  padding: 48px 0 64px;
}
.home-bento__shell {
  width: min(1120px, calc(100% - 32px));
}
.home-bento__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(140px, auto);
  gap: var(--bento-gap);
}

.bento-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 24px;
  border-radius: var(--bento-radius);
  border: 1px solid var(--bento-border);
  background: var(--bento-surface);
  box-shadow: var(--bento-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
@media (hover: hover) {
  a.bento-tile:hover,
  .bento-tile--visual:hover {
    box-shadow: var(--bento-shadow-md);
    transform: translateY(-2px);
  }
}
a.bento-tile:active {
  transform: scale(0.98);
}
a.bento-tile:focus-visible {
  outline: none;
  box-shadow: var(--bento-shadow-md), 0 0 0 3px rgba(59, 130, 246, .2);
}

.bento-tile--hero {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
  justify-content: center;
  padding: 28px 28px 32px;
  border-color: #eadfce;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(199, 164, 93, .18), transparent 60%),
    linear-gradient(165deg, #fffcf7 0%, #f7f1e6 100%);
}
.bento-tile--hero::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -50px;
  border-radius: 50%;
  background: rgba(199, 164, 93, .12);
  pointer-events: none;
}
.bento-tile__kicker {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: #8a6a2f;
  background: rgba(199, 164, 93, .18);
}
.bento-tile--hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--bento-ink);
}
.bento-tile__line { display: block; }
.bento-tile__line--accent { color: var(--bento-accent); }
.bento-tile__lead {
  margin: 0 0 28px;
  max-width: 36ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--bento-muted);
}
.bento-tile__cta,
.home-market__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
@media (min-width: 768px) {
  .home-btn {
    padding: 12px 24px;
    min-height: 48px;
  }
}
.home-btn--primary {
  background: var(--bento-navy);
  color: #fff;
}
@media (hover: hover) {
  .home-btn--primary:hover {
    background: #07192f;
    transform: translateY(-1px);
  }
}
.home-btn--primary:active { transform: scale(0.95); }
.home-btn--ghost {
  background: var(--bento-soft);
  color: var(--bento-ink);
  border-color: var(--bento-border-strong);
}
@media (hover: hover) {
  .home-btn--ghost:hover {
    border-color: var(--bento-navy);
    color: var(--bento-navy);
  }
}
.home-btn--ghost:active { transform: scale(0.95); }
.home-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
}

.bento-tile--visual {
  grid-column: 3 / span 2;
  grid-row: 1 / span 2;
  padding: 0;
  border-color: #d6c4a0;
  background: #e8dfd0;
  box-shadow: var(--bento-shadow), inset 0 0 0 1px rgba(255, 252, 247, .35);
}
.bento-tile--visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transition: transform .6s ease;
}
@media (hover: hover) {
  .bento-tile--visual:hover img {
    transform: scale(1.03);
  }
}

/* Feature tiles: each gets its own tint + tag chip + soft orb */
.bento-tile--feature::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -36px;
  top: -48px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .9;
}
.bento-tile__tag {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.bento-tile__title {
  position: relative;
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--bento-ink);
}
.bento-tile__desc {
  position: relative;
  margin: 0;
  max-width: 32ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--bento-muted);
  flex: 1;
}
.bento-tile__go {
  position: relative;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 650;
  color: var(--bento-navy);
  transition: transform .2s ease;
}
@media (hover: hover) {
  a.bento-tile:hover .bento-tile__go {
    transform: translateX(3px);
  }
}

.bento-tile--wide {
  grid-column: 1 / span 2;
  border-color: #c9d4e4;
  background:
    linear-gradient(145deg, #e8eef7 0%, #f4f7fb 70%);
}
.bento-tile--wide::before {
  background: rgba(16, 42, 76, .10);
}
.bento-tile--wide .bento-tile__tag {
  color: #102a4c;
  background: rgba(16, 42, 76, .10);
}
.bento-tile--wide .bento-tile__go { color: #102a4c; }

.bento-tile--vocab {
  border-color: #e5d3a8;
  background:
    linear-gradient(160deg, #f8f0de 0%, #fbf7ee 72%);
}
.bento-tile--vocab::before {
  background: rgba(199, 164, 93, .22);
}
.bento-tile--vocab .bento-tile__tag {
  color: #8a6a2f;
  background: rgba(199, 164, 93, .22);
}
.bento-tile--vocab .bento-tile__go { color: #8a6a2f; }

.bento-tile--alevel {
  border-color: #b8c2cf;
  background:
    linear-gradient(160deg, #cfd8e6 0%, #e8edf4 68%);
}
.bento-tile--alevel::before {
  background: rgba(7, 25, 47, .14);
  right: auto;
  left: -40px;
  top: auto;
  bottom: -50px;
}
.bento-tile--alevel .bento-tile__tag {
  color: #07192f;
  background: rgba(7, 25, 47, .12);
}
.bento-tile--alevel .bento-tile__go { color: #07192f; }

.bento-tile--rank {
  border-color: #b9d5cc;
  background:
    linear-gradient(155deg, #dff0e9 0%, #eff8f4 68%);
}
.bento-tile--rank::before {
  background: rgba(47, 107, 92, .14);
}
.bento-tile--rank .bento-tile__tag {
  color: #2f6b5c;
  background: rgba(47, 107, 92, .12);
}
.bento-tile--rank .bento-tile__go { color: #2f6b5c; }

.bento-tile--ai {
  background:
    radial-gradient(280px 160px at 100% 0%, rgba(199, 164, 93, .22), transparent 55%),
    linear-gradient(165deg, #16345c 0%, #07192f 100%);
  color: #fafafa;
  border-color: #0c2340;
}
.bento-tile--ai::before {
  background: rgba(199, 164, 93, .16);
  width: 160px;
  height: 160px;
}
.bento-tile--ai .bento-tile__tag {
  color: #f1d38a;
  background: rgba(241, 211, 138, .14);
}
.bento-tile--ai .bento-tile__title { color: #fafafa; }
.bento-tile--ai .bento-tile__desc { color: rgba(250, 250, 250, .74); }
.bento-tile--ai .bento-tile__go { color: #f1d38a; }

.bento-tile--speak {
  grid-column: span 2;
  border-color: #c8ced6;
  background:
    linear-gradient(155deg, #e6e9ee 0%, #f3f5f7 70%);
}
.bento-tile--speak::before {
  background: rgba(108, 122, 137, .16);
  right: 12%;
  top: -60px;
  width: 200px;
  height: 200px;
}
.bento-tile--speak .bento-tile__tag {
  color: #4d5a68;
  background: rgba(108, 122, 137, .16);
}
.bento-tile--speak .bento-tile__go { color: #4d5a68; }

@media (max-width: 960px) {
  .home-bento { padding: 32px 0 56px; }
  .home-bento__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .bento-tile--hero {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .bento-tile--visual {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 220px;
    aspect-ratio: 16 / 10;
  }
  .bento-tile--wide { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .home-bento { padding: 24px 0 48px; }
  .home-bento__shell { width: min(1120px, calc(100% - 24px)); }
  .home-bento__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bento-tile,
  .bento-tile--wide,
  .bento-tile--hero,
  .bento-tile--visual {
    grid-column: 1;
  }
  .bento-tile { padding: 20px; }
  .bento-tile__cta,
  .home-market__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .home-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bento-tile,
  .home-btn,
  .bento-tile--visual img,
  .bento-tile__go {
    transition: none;
  }
  a.bento-tile:hover,
  .bento-tile--visual:hover,
  .bento-tile--visual:hover img,
  a.bento-tile:hover .bento-tile__go {
    transform: none;
  }
}

.home-dual {
  padding: 0 0 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-hero-deco .minimal-hero__inner {
  padding: 56px 0 8px;
}
.home-hero-deco .minimal-hero__desc {
  margin-bottom: 0;
}
.home-hero-deco .hero-path {
  margin-top: 28px;
  margin-bottom: 4px;
}
#home-ielts {
  margin: 0 auto;
}

.home-ielts {
  margin: 0;
}
.home-ielts__inner {
  padding: 32px 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  border: 1px solid rgba(199,164,93,.32);
  box-shadow: var(--shadow-paper);
  color: var(--brand-navy);
}
.home-ielts__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--brand-gold);
  margin-bottom: 8px;
}
.home-ielts__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.home-ielts__head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--brand-navy);
}
.home-ielts__head p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}
.home-ielts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 4px;
}
.home-ielts__zones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.home-ielts__zone {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  color: var(--brand-navy);
  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-ielts__zone:hover {
  border-color: rgba(199,164,93,.55);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.home-ielts__zone-step {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.home-ielts__zone b {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-navy);
}
.home-ielts__zone-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.home-ielts__zone-go {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(7,25,47,.35);
  align-self: flex-end;
}

.home-gate {
  margin-top: 8px;
}
.home-gate__inner {
  padding: 48px 40px;
  border-radius: 20px;
  border: 1px solid rgba(16, 42, 76, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(247, 244, 236, 0.95));
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.home-gate__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold, #c7a45d);
  margin-bottom: 12px;
}
.home-gate__inner h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy, #102a4c);
}
.home-gate__inner p {
  margin: 0 auto 28px;
  max-width: 36em;
  color: rgba(16, 42, 76, 0.72);
  line-height: 1.7;
}
.home-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 900px) {
  .home-ielts__zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .home-ielts__head {
    flex-direction: column;
  }
  .home-ielts__zones {
    grid-template-columns: 1fr;
  }
  .home-ielts__inner,
  .home-alevel__inner {
    padding: 24px 20px 22px;
  }
  .home-dual {
    padding: 0 0 40px;
  }
  .home-hero-deco .minimal-hero__inner {
    padding: 40px 0 4px;
  }
}

.home-alevel {
  margin: 0;
}
.home-alevel__inner {
  padding: 32px 32px 28px;
  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-alevel--empty .home-alevel__inner {
  text-align: center;
  padding: 40px 32px 36px;
}
.home-alevel__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--brand-gold-light);
  margin-bottom: 8px;
}
.home-alevel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.home-alevel__head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
.home-alevel__head p {
  margin: 10px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,.68);
  line-height: 1.6;
  max-width: 520px;
}
.home-alevel__cta {
  flex-shrink: 0;
  margin-top: 4px;
  background: rgba(241,211,138,.14);
  color: var(--brand-gold-light);
  border-color: rgba(241,211,138,.55);
}
.home-alevel__cta:hover {
  background: rgba(241,211,138,.28);
  color: #fff;
  border-color: var(--brand-gold-light);
}
.home-alevel__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.home-alevel__metric {
  min-width: 88px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  text-align: center;
}
.home-alevel__metric b {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  color: var(--brand-gold-light);
  line-height: 1.1;
}
.home-alevel__metric span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 600;
}
.home-alevel__boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.home-alevel__board {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  transition: background var(--motion-fast) var(--ease-premium),
              border-color var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium);
}
.home-alevel__board:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(241,211,138,.35);
  transform: translateY(-2px);
}
.home-alevel__board.is-soon {
  opacity: .55;
  cursor: default;
}
.home-alevel__board.is-soon:hover {
  transform: none;
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}
.home-alevel__board-label {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--brand-gold-light);
}
.home-alevel__board-zh {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.72);
}
.home-alevel__board-meta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(241,211,138,.85);
}
.home-alevel__board-go {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  align-self: flex-end;
}
.home-alevel__subjects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.home-alevel__subjects-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,.88);
}
.section-link--light {
  color: var(--brand-gold-light);
  font-size: 13px;
  font-weight: 700;
}
.section-link--light:hover { color: #fff; }
.home-alevel__subjects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.home-alevel__subject {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  transition: background var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium);
}
.home-alevel__subject:hover {
  background: rgba(255,255,255,.1);
  transform: translateX(3px);
}
.home-alevel__subject-ico {
  font-size: 22px;
  line-height: 1;
}
.home-alevel__subject-body {
  min-width: 0;
}
.home-alevel__subject-body b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}
.home-alevel__subject-en {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255,255,255,.5);
}
.home-alevel__subject-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-gold-light);
  white-space: nowrap;
}
.home-alevel__subject-go {
  font-size: 14px;
  color: rgba(255,255,255,.35);
  font-weight: 700;
}

@media (max-width: 900px) {
  .home-alevel__boards,
  .home-alevel__subjects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .home-alevel__head {
    flex-direction: column;
  }
  .home-alevel__cta { align-self: flex-start; }
  .home-alevel__boards,
  .home-alevel__subjects {
    grid-template-columns: 1fr;
  }
  .home-alevel__inner { padding: 24px 20px 22px; }
}

#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; }
}

/* —— Login / profile / legal —— */
.auth-main { padding-top: 24px; padding-bottom: 64px; }
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: 28px;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
}
.auth-aside {
  padding: 28px 26px;
  border: 1px solid rgba(199,164,93,.34);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #07192f, #102a4c);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.auth-aside__logo img { width: 56px; height: 56px; border-radius: 14px; }
.auth-aside__eyebrow {
  display: block;
  margin-top: 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--brand-gold-light);
}
.auth-aside__title {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
}
.auth-aside__desc {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,.78);
}
.auth-aside__points {
  margin: 18px 0 0;
  padding-left: 18px;
  color: rgba(241,211,138,.92);
  font-size: 14px;
  line-height: 1.8;
}
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px 28px;
  background: var(--card-bg, #fff);
  border: 1px solid #ece7df;
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 39, 0.05), 0 12px 32px -12px rgba(16, 24, 39, 0.1);
}
.auth-card__title { margin: 8px 0 12px; font-size: 1.75rem; font-family: "Playfair Display", Georgia, serif; }
.auth-card__desc { color: var(--text-muted, #5a6472); font-size: .92rem; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.auth-field[hidden] { display: none !important; }
.auth-field span { color: var(--text-muted, #5a6472); }
.auth-field input {
  padding: 12px 14px;
  border: 1px solid #e6dfd0;
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus-visible {
  border-color: #e8913a;
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, #e8913a 22%, transparent);
}
.auth-form .btn--primary {
  background: #e8913a;
  border-color: #e8913a;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(232, 145, 58, 0.55);
}
.auth-form .btn--primary:hover {
  background: #c77828;
  border-color: #c77828;
  color: #fff;
}
.auth-field--row { position: relative; }
.auth-field--row input { padding-right: 120px; }
.auth-field--row .btn { position: absolute; right: 4px; bottom: 4px; }
.auth-msg { min-height: 1.25em; font-size: .88rem; margin: 0; }
.auth-msg--ok { color: #1a7f4b; }
.auth-msg--err { color: #b42318; }
.auth-legal { margin-top: 20px; font-size: .82rem; color: var(--text-faint, #8a929e); text-align: center; }
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tabs__item {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .9rem;
  color: var(--text-muted, #5a6472);
  text-decoration: none;
  border: 1px solid var(--border, #e8e4dc);
  background: transparent;
}
.auth-tabs__item.is-active {
  color: var(--navy, #102a4c);
  border-color: var(--navy, #102a4c);
  font-weight: 600;
  background: rgba(16, 42, 76, .04);
}
.btn--block { width: 100%; justify-content: center; }
.profile-dl { display: grid; grid-template-columns: 100px 1fr; gap: 12px 16px; margin: 0 0 20px; }
.profile-dl dt { color: var(--text-muted); margin: 0; }
.profile-dl dd { margin: 0; font-weight: 600; }
.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 22px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-navy, #102a4c);
  color: var(--brand-gold-light, #f0d78c);
  font-size: 18px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  letter-spacing: 0;
}
.profile-avatar.has-img { background: transparent; }
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar__meta { min-width: 0; }
.profile-avatar__btn { cursor: pointer; margin: 0; }
.teacher-head-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.teacher-head-avatar {
  width: 64px;
  height: 64px;
  margin-top: 6px;
  font-size: 16px;
}
.teacher-head-row h1 { margin-top: 0; }
.teacher-head-row .minimal-page-desc { margin-bottom: 10px; }
.profile-name-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.profile-name-form input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e2db);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
}
.auth-forgot {
  margin: -4px 0 0;
  text-align: right;
  font-size: .85rem;
}
.auth-forgot a { color: var(--text-muted, #5a6472); }
.profile-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 42, 76, 0.08);
}
.profile-section__title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: var(--brand-navy, #102a4c);
}
.profile-hint {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted, #5a6472);
}
.legal-page { padding: 48px 0 80px; max-width: 720px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-meta { color: var(--text-muted); font-size: .9rem; margin-bottom: 32px; }
.legal-block { margin-bottom: 28px; }
.legal-block h2 { font-size: 1.1rem; margin-bottom: 8px; }
.legal-block p { line-height: 1.7; color: var(--text, #2a3140); }
.site-icp,
.site-report,
.site-mps { display: block; margin-top: 6px; font-size: .78rem; color: var(--text-faint); }
.site-icp:not(:empty)::before,
.site-report::before,
.site-mps::before { content: "· "; }
a.site-icp,
a.site-report,
a.site-mps { text-decoration: none; }
a.site-icp:hover,
a.site-report:hover,
a.site-mps:hover { text-decoration: underline; color: var(--text-muted); }
.site-mps img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ==========================================================================
   P0 — Exam viewer bar enhancements
   ========================================================================== */
.viewer-bar .v-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.viewer-bar .v-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.v-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.4;
}
.v-badge--vol { background: rgba(199,164,93,.22); color: #f1d38a; }
.v-badge--test { background: rgba(255,255,255,.12); color: #e8dcc1; }
.v-badge--skill { background: rgba(255,255,255,.18); color: #fff; }
.viewer-bar .v-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewer-bar .v-meta {
  font-size: 12px;
  color: #d4c7ad;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v-hint {
  font-size: 12px;
  font-weight: 600;
  color: #f1d38a;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(199,164,93,.14);
  border: 1px solid rgba(199,164,93,.28);
  white-space: nowrap;
}
.viewer-bar .timer {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 15px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.viewer-bar .timer.is-warn {
  background: rgba(199,164,93,.35);
  border-color: rgba(241,211,138,.45);
  color: #fff;
}
.viewer-bar .timer.is-low {
  background: rgba(180, 90, 20, .85);
  border-color: rgba(255,200,120,.4);
  animation: pulse 1.2s infinite;
}
.viewer-bar .timer.is-danger {
  background: rgba(160, 24, 24, .92);
  border-color: rgba(255,120,120,.45);
  animation: pulse .8s infinite;
}

@media (max-width: 820px) {
  .viewer-bar {
    flex-wrap: wrap;
    height: auto;
    min-height: 56px;
    padding: 10px 14px;
    gap: 8px 12px;
  }
  .viewer-bar .v-info { order: 3; flex: 1 1 100%; }
  .viewer-bar .v-meta { display: block; }
  .viewer-bar .v-sep { display: none; }
  .v-hint {
    font-size: 11px;
    padding: 4px 8px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 480px) {
  .v-hint { display: none; }
  .viewer-bar a.back { font-size: 13px; }
}

/* Mock exam lock — parent shell (exam.html) */
body.viewer.is-exam-locked .viewer-bar a.back {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}
#yysd-parent-exam-lock {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(7, 25, 47, .97);
  color: #fff;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
#yysd-parent-exam-lock.is-visible { display: flex; }
#yysd-parent-exam-lock h2,
#yysd-parent-exam-lock p,
#yysd-parent-exam-lock button {
  text-shadow: none;
}
#yysd-parent-exam-lock h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; }
#yysd-parent-exam-lock p { margin: 0 0 20px; opacity: .92; line-height: 1.65; max-width: 440px; font-size: 15px; }
#yysd-parent-exam-lock button {
  background: #c7a45d; color: #07192f; border: none; padding: 12px 28px;
  border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer;
  box-shadow: none;
}
#yysd-parent-exam-lock .yysd-exam-lock-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
#yysd-parent-exam-lock .yysd-exam-lock-exit {
  background: #fff; color: #07192f; border: 1px solid #cbd5e1;
}
#yysd-parent-exam-lock .yysd-exam-lock-restart {
  background: #27ae60; color: #fff; border: none;
}
#yysd-parent-exam-lock .yysd-exam-lock-restart:hover {
  background: #2ecc71;
}

/* ==========================================================================
   P0 — Mobile navigation (drawer + bottom tabs)
   ========================================================================== */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--minimal-line, #e6dfd0);
  border-radius: 10px;
  background: var(--surface-paper, #fffcf7);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-menu-btn__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--brand-navy, #07192f);
  border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-auth.is-logged-in {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-auth__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-navy);
  color: var(--brand-gold-light);
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  letter-spacing: 0;
  overflow: hidden;
  object-fit: cover;
  flex: 0 0 auto;
}
.nav-auth__avatar--img {
  padding: 0;
  background: transparent;
}
.nav-auth__label { font-size: 14px; }

.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(7, 25, 47, .42);
  backdrop-filter: blur(2px);
}
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(300px, 88vw);
  height: 100%;
  background: var(--surface-paper);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  padding: 0;
  transform: translateX(100%);
  transition: transform .28s var(--ease-out);
}
.nav-drawer:not([hidden]) { transform: translateX(0); }
.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  color: var(--brand-navy);
}
.nav-drawer__close {
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.nav-drawer__links {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 4px;
  flex: 1;
}
.nav-drawer__links a {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text);
}
.nav-drawer__links a:hover { background: rgba(16,42,76,.06); }
.nav-drawer__links a.is-active {
  background: var(--brand-navy);
  color: #fff;
}
.nav-drawer__foot {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}
.nav-drawer__foot a {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.mobile-tabs {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  height: 58px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(7,25,47,.08);
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}
.mobile-tabs__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 4px;
  border-radius: 10px;
  margin: 4px 2px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.mobile-tabs__item.is-active {
  color: var(--brand-navy);
  background: color-mix(in srgb, var(--brand-gold) 14%, transparent);
}
.mobile-tabs__ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(16,42,76,.06);
}
.mobile-tabs__item.is-active .mobile-tabs__ico {
  background: var(--brand-navy);
  color: var(--brand-gold-light);
}

body.nav-drawer-open { overflow: hidden; }
body.has-mobile-tabs { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }

@media (max-width: 820px) {
  .nav-menu-btn { display: inline-flex; }
  .minimal-nav { display: none; }
  .mobile-tabs { display: grid; }
}
@media (min-width: 821px) {
  .nav-drawer,
  .nav-drawer-overlay,
  .mobile-tabs { display: none !important; }
  body.has-mobile-tabs { padding-bottom: 0; }
}

/* ==========================================================================
   P1 — results hero, login layout (成绩页 / 登录页)
   ========================================================================== */
.results-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  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);
}
.results-hero__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--brand-gold);
}
.results-hero h2 {
  margin: 8px 0 0;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--brand-navy);
}
.results-hero__meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.results-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.results-hero__soon {
  opacity: .72;
  cursor: not-allowed;
}
.results-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: stretch;
}
.results-hero__stat {
  padding: 14px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  text-align: center;
}
.results-hero__stat b {
  display: block;
  font-size: 22px;
  color: var(--brand-navy);
}
.results-hero__stat--band b { color: var(--brand-gold); }
.results-hero__stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.results-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.btn.is-disabled {
  opacity: .55;
  pointer-events: none;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { order: 2; }
  .results-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .results-hero__stats { grid-template-columns: 1fr; }
}

/* ==========================================================================
   AI word lookup (学习区 · 单词)
   ========================================================================== */
.ai-word {
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, #fff 0%, #f4f7fb 100%);
  box-shadow: var(--shadow-paper);
}
.ai-word__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 6px;
}
.ai-word__head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--brand-navy);
}
.ai-word__quota {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}
.ai-word__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.ai-word__form,
.ai-word__follow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.ai-word__search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.ai-word__search:focus-within {
  border-color: rgba(30, 58, 95, 0.35);
}
.ai-word__search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--brand-navy);
  min-width: 0;
}
.ai-word__panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(30, 58, 95, 0.08);
}
.ai-word__msgs {
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.ai-word__msg {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}
.ai-word__msg--user {
  background: rgba(30, 58, 95, 0.06);
  border-color: transparent;
}
.ai-word__msg pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: var(--brand-navy);
}
.ai-word__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.ai-word__follow input {
  flex: 1;
  min-width: 160px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  background: #fff;
}
.ai-word__status {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.ai-word__status.is-ok { color: #1f7a4d; }
.ai-word__status.is-warn { color: #9a6b00; }
.ai-word__status.is-err { color: var(--brand-red, #c8102e); }

/* ==========================================================================
   Wrong-word notebook (单词错题本)
   ========================================================================== */
.wrong-notebook-strip {
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(199,164,93,.32);
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
  box-shadow: var(--shadow-paper);
}
.wrong-notebook-strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.wrong-notebook-strip__head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--brand-navy);
}
.wrong-notebook-strip__hint {
  font-size: 13px;
  color: var(--text-muted);
}
.wrong-notebook-strip__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.wrong-notebook-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--motion-fast) var(--ease-premium),
              transform var(--motion-fast) var(--ease-premium),
              box-shadow var(--motion-fast) var(--ease-premium);
}
a.wrong-notebook-card:hover {
  border-color: rgba(199,164,93,.5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.wrong-notebook-card.has-items {
  border-color: rgba(200, 48, 48, .22);
  background: linear-gradient(135deg, #fff 0%, #fef9f8 100%);
}
.wrong-notebook-card.is-soon {
  opacity: .62;
  cursor: not-allowed;
}
.wrong-notebook-card__ico { font-size: 22px; flex-shrink: 0; }
.wrong-notebook-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.wrong-notebook-card__body b {
  font-size: 14px;
  color: var(--brand-navy);
}
.wrong-notebook-card__body span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.wrong-notebook-card__badge {
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-red, #c8102e);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.wrong-notebook-card__go {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-red);
}

.wrong-words-hero { margin-bottom: 20px; }
.wrong-words-toolbar { margin-bottom: 18px; }
.wrong-words-search { max-width: 360px; }

.wrong-words-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wrong-word-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.wrong-word-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.wrong-word-card__head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--brand-navy);
}
.wrong-word-card__ipa {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.wrong-word-card__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-red);
  white-space: nowrap;
}
.wrong-word-card__meaning {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text);
}
.wrong-word-card__attempt {
  margin: 6px 0 0;
  font-size: 13px;
  color: #9a3b32;
}
.wrong-word-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.wrong-word-card__src {
  font-weight: 600;
  color: var(--brand-red);
}
.wrong-word-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.wrong-retest {
  margin-top: 8px;
  padding: 20px 22px;
  border: 1px solid rgba(199,164,93,.32);
  border-radius: var(--radius-lg);
  background: var(--surface-paper);
}
.wrong-retest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 16px;
}
.wrong-retest__head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--brand-navy);
}
.wrong-retest__head p {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
}
.wrong-retest__progress {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.wrong-retest__card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.wrong-retest__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.wrong-retest__field input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
}
.wrong-retest__feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
}
.wrong-retest__feedback.is-correct {
  background: #eaf5ee;
  border: 1px solid #c8e6d4;
  color: #2d5a40;
}
.wrong-retest__feedback.is-wrong {
  background: #fdf0ee;
  border: 1px solid #f5c6cb;
  color: #6b2020;
}
.wrong-retest__btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.wrong-retest__done {
  text-align: center;
  padding: 12px 0;
}
.wrong-retest__done h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--brand-navy);
}
.wrong-retest__score {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-gold);
  margin: 0 0 10px;
}
.wrong-retest__done .btn { margin: 6px; }

@media (max-width: 640px) {
  .wrong-word-card {
    flex-direction: column;
  }
  .wrong-word-card__actions {
    flex-direction: row;
    width: 100%;
  }
}

/* ---------- A-Level module (Phase 1) ----------------------------------- */
.alevel-hero__badge { background: linear-gradient(145deg, #1a2744, #2d4a7a); }
.alevel-hero__badge .num { font-size: 36px; }
.alevel-hero__en { font-size: .62em; font-weight: 600; color: var(--text-muted); margin-left: 8px; }

.alevel-board-tabs {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 20px;
}
.alevel-board-tab {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 9px 18px; font-size: 14px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.alevel-board-tab.is-active {
  border-color: var(--brand-navy); background: var(--brand-navy); color: #fff;
}
.alevel-board-tab.is-soon { opacity: .45; cursor: not-allowed; }

.alevel-subject-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.alevel-subject-grid--compact { gap: 14px; }
.alevel-subject-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease), border-color .2s;
}
.alevel-subject-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong);
}
.alevel-subject-card__ico { font-size: 28px; line-height: 1; }
.alevel-subject-card b { display: block; font-size: 16px; color: var(--brand-navy); }
.alevel-subject-card__en { display: block; font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.alevel-subject-card__meta {
  grid-column: 2 / -1; font-size: 12.5px; color: var(--text-muted); margin-top: -6px;
}
.alevel-subject-card__go { font-size: 18px; color: var(--c-pte); font-weight: 700; }

.alevel-filters { margin: 24px 0 16px; }
.alevel-type-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.alevel-type-tab {
  border: 1px solid var(--border); background: var(--bg); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--text-muted); cursor: pointer;
}
.alevel-type-tab.is-active { border-color: var(--brand-navy); color: var(--brand-navy); background: #fff; }
.alevel-type-tab.is-locked { opacity: .5; cursor: not-allowed; }
.alevel-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.alevel-filter-row--paper { margin-top: 10px; align-items: flex-start; }
.alevel-filter-label {
  flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--text-muted); padding-top: 6px;
}
.alevel-year-select { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.alevel-year-select select {
  margin-left: 8px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border);
  font: inherit; background: var(--surface);
}
.alevel-season-filters { flex: 1; min-width: 200px; }
.alevel-results-meta { font-size: 13px; color: var(--text-faint); margin-bottom: 10px; font-weight: 600; }

.alevel-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.alevel-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.alevel-table th, .alevel-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.alevel-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); background: var(--bg); }
.alevel-table tr:last-child td { border-bottom: none; }
.alevel-paper-row__actions { display: flex; flex-wrap: wrap; gap: 8px; white-space: nowrap; }
.alevel-season-badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
}
.alevel-season-badge--s { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.alevel-season-badge--w { color: #1d4ed8; border-color: #93c5fd; background: #eff6ff; }
.alevel-season-badge--m { color: #047857; border-color: #6ee7b7; background: #ecfdf5; }

.alevel-board-heading {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 18px;
}
.alevel-board-heading h2 { margin: 0; font-size: 18px; color: var(--brand-navy); }
.alevel-board-heading .subject-dot {
  width: 8px; height: 8px; border-radius: 2px; background: var(--c-pte);
}
.alevel-preview-board { margin-bottom: 28px; }
.alevel-preview-board__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.alevel-preview-board__head h3 { margin: 0; font-size: 17px; color: var(--brand-navy); }

.alevel-footnote { margin-top: 24px; font-size: 13px; color: var(--text-faint); line-height: 1.6; }

/* --- Paper groups (CAIE P1 / S1 / M) --- */
.alevel-component-filters { margin-top: 10px; gap: 6px; }
.alevel-component-filters .chip--paper { min-width: 44px; font-weight: 700; }
.alevel-paper-hint {
  margin: 10px 0 0; font-size: 12px; color: var(--text-faint); line-height: 1.5;
}

.alevel-paper-list-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.alevel-paper-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.alevel-paper-list--disi thead th {
  padding: 11px 16px; text-align: left; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #ea580c, #f97316); border-bottom: none;
}
.alevel-paper-list--disi thead th:last-child { width: 140px; text-align: right; }
.alevel-paper-list thead th {
  padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 700;
  color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border);
}
.alevel-paper-list tbody td {
  padding: 12px 16px; border-bottom: 1px dotted #d1d5db; vertical-align: middle;
}
.alevel-paper-list tbody tr:last-child td { border-bottom: none; }
.alevel-paper-row:hover { background: #fafbfd; }

.alevel-paper-section td {
  padding: 14px 16px 10px; background: #f8fafc; border-bottom: 1px solid var(--border);
}
.alevel-paper-section__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.alevel-paper-section__title strong { font-size: 15px; color: var(--brand-navy); }
.alevel-paper-section__tag {
  display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 800; color: #c2410c;
  background: #fff7ed; border-radius: 4px;
}
.alevel-paper-section__lvl { font-size: 12px; font-weight: 600; color: var(--text-faint); }
.alevel-paper-section__desc {
  margin: 6px 0 0; padding-left: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5;
}

.alevel-paper-cell-q { min-width: 0; }
.alevel-paper-cell-a { text-align: right; white-space: nowrap; vertical-align: middle; }
.alevel-paper-title {
  display: block; font-size: 15px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--brand-navy); text-decoration: none; line-height: 1.45;
}
a.alevel-paper-title:hover { color: var(--c-pte); text-decoration: underline; }
.alevel-paper-meta {
  display: block; margin-top: 4px; font-size: 12px; color: var(--text-faint); line-height: 1.4;
}
.alevel-paper-meta a { font-weight: 600; color: var(--text-muted); text-decoration: none; }
.alevel-paper-meta a:hover { color: var(--c-pte); text-decoration: underline; }
.alevel-see-answers { font-weight: 600; color: var(--brand-navy); text-decoration: none; }
.alevel-see-answers:hover { color: var(--c-pte); text-decoration: underline; }

.alevel-paper-official strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; color: var(--brand-navy);
}
.alevel-paper-links { font-size: 13px; white-space: nowrap; }
.alevel-paper-links a { font-weight: 600; color: var(--brand-navy); text-decoration: none; }
.alevel-paper-links a:hover { text-decoration: underline; color: var(--c-pte); }
.alevel-link-sep { margin: 0 4px; color: var(--text-faint); }
.alevel-paper-missing { color: var(--text-faint); }

/* --- 学为贵-style accordion (真题资料) --- */
.alevel-hero--compact { margin-bottom: 8px; }
.alevel-hero--compact h1 { font-size: 22px; }
.alevel-xwg {
  margin-top: 8px; padding: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.alevel-xwg__title {
  margin: 0; padding: 16px 18px 12px; font-size: 17px; font-weight: 800; color: var(--brand-navy);
  border-bottom: 1px solid var(--border); background: #fff;
}
.alevel-xwg-filters { padding: 12px 18px 4px; background: #fff; }
.alevel-xwg-filter-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.alevel-xwg-filter-row--scroll {
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 2px; scrollbar-width: none;
}
.alevel-xwg-filter-row--scroll::-webkit-scrollbar { display: none; }
.alevel-xwg-filter-row--scroll .chip { flex-shrink: 0; }
.alevel-xwg .chip.chip--paper { min-width: 44px; text-align: center; }
.alevel-xwg .chip {
  border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  border: 1px solid #e5e7eb; background: #f3f4f6; color: #374151;
}
.alevel-xwg .chip.is-active {
  background: #fff; border-color: #7c3aed; color: #7c3aed; box-shadow: inset 0 0 0 1px #7c3aed;
}
.alevel-xwg-meta {
  padding: 0 18px 10px; font-size: 12px; color: var(--text-faint); font-weight: 600;
}
.alevel-xwg-list { border-top: 1px solid var(--border); }
.alevel-xwg-item { border-bottom: 1px solid var(--border); background: #fff; }
.alevel-xwg-item:last-child { border-bottom: none; }
.alevel-xwg-item__summary {
  list-style: none; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer; user-select: none;
}
.alevel-xwg-item__summary::-webkit-details-marker { display: none; }
.alevel-xwg-item__text { flex: 1; min-width: 0; }
.alevel-xwg-item__name {
  display: block; font-size: 14px; font-weight: 700; color: #111827; line-height: 1.4;
  word-break: break-all;
}
.alevel-xwg-item__sub {
  display: block; margin-top: 3px; font-size: 12px; color: var(--text-faint); line-height: 1.35;
}
.alevel-xwg-item__chev {
  flex-shrink: 0; width: 10px; height: 10px;
  border-right: 2px solid #9ca3af; border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px;
}
.alevel-xwg-item[open] .alevel-xwg-item__chev { transform: rotate(-135deg); margin-top: 4px; }
.alevel-xwg-panel { border-top: 1px dashed #e5e7eb; background: #fafafa; }
.alevel-xwg-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid #eee;
}
.alevel-xwg-row:last-child { border-bottom: none; }
.alevel-xwg-row__ico { font-size: 18px; line-height: 1; flex-shrink: 0; }
.alevel-xwg-row__label { flex: 1; font-size: 14px; font-weight: 600; color: #374151; }
.alevel-xwg-row__acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.alevel-xwg-btn {
  display: inline-block; padding: 5px 12px; font-size: 12px; font-weight: 600;
  border-radius: 999px; border: 1px solid #d1d5db; background: #fff; color: #374151;
  text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.3;
}
.alevel-xwg-btn:hover { border-color: #7c3aed; color: #7c3aed; }
.alevel-xwg-missing { font-size: 12px; color: var(--text-faint); }

.alevel-zone-intro { margin: 0 0 16px; font-size: 14px; color: var(--text-muted); }
.alevel-zone-more { margin-top: 20px; }

.alevel-view-page .minimal-main { padding-bottom: 24px; }
.alevel-view-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.alevel-view-head h1 { margin: 0; font-size: 22px; color: var(--brand-navy); }
.alevel-view-meta { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }
.alevel-pdf-frame-wrap {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: #525659; min-height: 70vh; box-shadow: var(--shadow-sm);
}
.alevel-pdf-frame { display: block; width: 100%; height: 78vh; border: 0; background: #525659; }

.alevel-hub-card {
  display: block; padding: 24px 26px; border-radius: var(--radius);
  border: 1px solid var(--border); background: linear-gradient(135deg, #f8fafc 0%, #fff 55%, #f5f3ff 100%);
  box-shadow: var(--shadow-sm); transition: transform .22s var(--ease-out), box-shadow .22s;
}
.alevel-hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.alevel-hub-card__kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--c-pte); }
.alevel-hub-card h2 { margin: 8px 0 6px; font-size: 24px; color: var(--brand-navy); }
.alevel-hub-card p { margin: 0 0 16px; font-size: 14px; color: var(--text-muted); }
.alevel-hub-card__stat { font-size: 13px; font-weight: 700; color: var(--brand-navy); }

@media (max-width: 640px) {
  .alevel-subject-card { grid-template-columns: auto 1fr; }
  .alevel-subject-card__go { display: none; }
  .alevel-subject-card__meta { grid-column: 1 / -1; margin-top: 0; }
  .alevel-pdf-frame { height: 65vh; }
  .alevel-paper-cell-a { text-align: left; }
  .alevel-xwg-row { flex-wrap: wrap; }
  .alevel-xwg-row__acts { width: 100%; justify-content: flex-start; padding-left: 28px; }
}

.teacher-auth-page .reveal,
.teacher-page .reveal {
  opacity: 1;
  transform: none;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.teacher-page .reveal {
  opacity: 1;
  transform: none;
}

.teacher-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.teacher-search {
  flex: 1 1 220px;
  max-width: 320px;
}
.teacher-search input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(16, 42, 76, 0.12);
  border-radius: 10px;
  font-size: 14px;
}
.teacher-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.teacher-filter {
  border: 1px solid rgba(16, 42, 76, 0.12);
  background: #fff;
  color: var(--brand-navy, #102a4c);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
.teacher-filter.is-active {
  background: var(--brand-navy, #102a4c);
  color: #fff;
  border-color: var(--brand-navy, #102a4c);
}
.teacher-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.teacher-stat {
  padding: 18px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(16, 42, 76, 0.08);
  text-align: center;
}
.teacher-stat b {
  display: block;
  font-size: 1.6rem;
  color: var(--brand-navy, #102a4c);
  margin-bottom: 4px;
}
.teacher-stat span {
  font-size: 12px;
  color: var(--text-muted, #5a6472);
}
.teacher-students {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.teacher-card {
  background: #fff;
  border: 1px solid rgba(16, 42, 76, 0.08);
  border-radius: 16px;
  overflow: hidden;
}
.teacher-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(16, 42, 76, 0.06);
  flex-wrap: wrap;
}
.teacher-card__meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted, #5a6472);
}
.teacher-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.teacher-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 42, 76, 0.06);
  color: var(--brand-navy, #102a4c);
}
.teacher-badge--mock {
  background: rgba(199, 164, 93, 0.18);
  color: #8a6a1f;
}
.teacher-table th,
.teacher-table td {
  font-size: 13px;
}
.teacher-empty-row {
  text-align: center;
  color: var(--text-muted, #5a6472);
  padding: 24px !important;
}
.teacher-empty h3 {
  margin-bottom: 8px;
}
.teacher-attempt-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted, #5a6472);
}
.teacher-wrong-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.teacher-wrong-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 42, 76, 0.08);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}
.teacher-wrong-list li b {
  color: var(--brand-navy, #102a4c);
}
.teacher-wrong-list li span {
  color: var(--text-muted, #5a6472);
}
.teacher-essay {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.teacher-essay section {
  padding: 14px 16px;
  border: 1px solid rgba(16, 42, 76, 0.08);
  border-radius: 10px;
  background: #fff;
}
.teacher-essay h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--brand-navy, #102a4c);
}
.teacher-essay pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: #243044;
}
@media (max-width: 768px) {
  .teacher-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Teacher calendar admin ---- */
.cal-toolbar__acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-view { margin-top: 8px; }
.cal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.cal-card {
  background: var(--surface-paper, #fffcf7);
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-paper);
}
.cal-card__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.cal-card__top h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand-navy, #102a4c);
}
.cal-card__meta,
.cal-card__sum {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted, #5a6472);
}
.cal-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.cal-tag--assignment { background: rgba(199, 164, 93, 0.2); color: #8a6a2f; }
.cal-tag--lesson { background: rgba(7, 25, 47, 0.1); color: #07192f; }
.cal-tag--announce { background: rgba(95, 102, 115, 0.12); color: #5f6673; }

.cal-month {
  background: var(--surface-paper, #fffcf7);
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 12px;
  padding: 14px;
}
.cal-month__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-month__weekdays,
.cal-month__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-month__weekdays span {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted, #5a6472);
  padding: 4px 0;
}
.cal-month__cell {
  min-height: 96px;
  border: 1px solid rgba(230, 223, 208, 0.95);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}
.cal-month__cell.is-empty { background: transparent; border-color: transparent; }
.cal-month__day {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-navy, #102a4c);
  margin-bottom: 4px;
}
.cal-month__chip {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 4px;
  padding: 3px 6px;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-month__chip.cal-tag--assignment { background: rgba(199, 164, 93, 0.22); color: #8a6a2f; }
.cal-month__chip.cal-tag--lesson { background: rgba(7, 25, 47, 0.12); color: #07192f; }
.cal-month__chip.cal-tag--announce { background: rgba(95, 102, 115, 0.14); color: #5f6673; }
.cal-month__more { font-size: 11px; color: var(--text-muted); }

.cal-modal[hidden] { display: none !important; }
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
}
.cal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 25, 47, 0.45);
}
.cal-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 20px 50px rgba(7, 25, 47, 0.2);
}
.cal-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cal-modal__head h2 { margin: 0; font-size: 1.25rem; }
.cal-modal__x {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}
.cal-form .auth-field { margin-bottom: 12px; }
.cal-form textarea,
.cal-form select,
.cal-form input[type="text"],
.cal-form input[type="search"],
.cal-form input[type="datetime-local"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e2db);
  border-radius: 10px;
  font: inherit;
}
.cal-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cal-form__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.cal-fieldset {
  border: 1px solid rgba(16, 42, 76, 0.1);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 14px;
}
.cal-fieldset legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--brand-navy, #102a4c);
}
.cal-ex-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.cal-ex-cats .chip {
  border: 1px solid rgba(7, 25, 47, .12);
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.cal-ex-cats .chip.is-active {
  background: #07192f;
  border-color: #07192f;
  color: #fff;
}
.cal-ex-cats .chip:hover:not(.is-active) {
  border-color: rgba(7, 25, 47, .28);
  background: #f8fafc;
}
.cal-ex-browse {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid rgba(7, 25, 47, .08);
  border-radius: 10px;
}
.cal-ex-cats--sub {
  margin: 0;
  gap: 6px;
}
.cal-ex-cats--sub .chip {
  font-size: 12px;
  padding: 5px 10px;
  font-weight: 500;
}
.cal-picker-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.cal-picker-toolbar input[type="search"],
.cal-picker-toolbar select {
  flex: 1 1 160px;
  min-width: 0;
}
.cal-check-list {
  max-height: 160px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cal-check-list--tall { max-height: 220px; }
.admin-assign .cal-check-list--tall { max-height: min(50vh, 420px); }
.admin-assign { max-width: 640px; }
.cal-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f7f8fa;
}
.cal-check small {
  display: block;
  color: var(--text-muted);
  font-weight: 400;
}
.cal-detail h3 { margin: 16px 0 8px; font-size: 1rem; }
.cal-detail ul { margin: 0 0 12px; padding-left: 18px; }

@media (max-width: 640px) {
  .cal-form__row { grid-template-columns: 1fr; }
  .cal-month__cell { min-height: 64px; }
}

/* ---- Student calendar extras ---- */
.cal-status-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(16, 42, 76, 0.08);
  color: var(--brand-navy, #102a4c);
}
.cal-status--done .cal-status-pill,
.cal-status-pill.cal-status--done {
  background: rgba(7, 25, 47, 0.1);
  color: #07192f;
}
.cal-status--overdue .cal-status-pill,
.cal-status-pill.cal-status--overdue {
  background: rgba(139, 58, 58, 0.12);
  color: #8b3a3a;
}
.cal-status--pending .cal-status-pill,
.cal-status-pill.cal-status--pending {
  background: rgba(199, 164, 93, 0.22);
  color: #8a6a2f;
}
.cal-card--student.is-overdue,
.cal-month__chip.is-overdue {
  box-shadow: inset 3px 0 0 #8b3a3a;
}
.cal-month__chip.is-done {
  opacity: 0.65;
  text-decoration: line-through;
}
.cal-week {
  background: var(--surface-paper, #fffcf7);
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 12px;
  padding: 14px;
}
.cal-week__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.cal-week__day {
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 8px;
  padding: 8px;
  min-height: 140px;
  background: #fff;
}
.cal-week__head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}
.cal-week__head span { color: var(--text-muted); }
.cal-week__list { display: flex; flex-direction: column; gap: 4px; }
.cal-ex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-ex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fbf8f1;
  border: 1px solid var(--border, #e6dfd0);
  font-size: 14px;
}
.teacher-page .teacher-stats,
.cal-view .teacher-stats {
  gap: 10px;
}
.teacher-page .teacher-stat {
  background: var(--surface-paper, #fffcf7);
  border: 1px solid var(--border, #e6dfd0);
  border-radius: 10px;
}
@media (max-width: 800px) {
  .cal-week__grid {
    grid-template-columns: 1fr;
  }
  .cal-week__day { min-height: 0; }
}

/* ---- Canvas-like teacher shell (left nav) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.teacher-layout .minimal-footer { margin-top: 0; }
.teacher-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
  border-top: 1px solid var(--border);
}
.teacher-side {
  padding: 28px 18px 40px;
  border-right: 1px solid var(--border);
  background: #fffcf7;
}
.teacher-side__label {
  margin: 0 10px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--text-faint);
}
.teacher-side__link {
  display: block;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--brand-navy);
  font-weight: 600;
  font-size: 14px;
}
.teacher-side__link:hover { background: rgba(199, 164, 93, .12); }
.teacher-side__link.is-active {
  background: var(--brand-navy);
  color: #fff;
}
.teacher-side__link--muted { color: var(--text-muted); font-weight: 500; }

.teacher-mode-switch {
  display: flex;
  gap: 6px;
  padding: 0 4px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.teacher-mode-switch__btn {
  flex: 1;
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-navy);
  cursor: pointer;
  line-height: 1.35;
}
.teacher-mode-switch__btn.is-active {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
}
.teacher-site-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: #102a4c;
  color: #fff;
  border-bottom: 2px solid #c7a45d;
}
body.has-teacher-site-banner .minimal-topbar {
  top: 52px;
}
body.has-teacher-site-banner .ha-text-link[href="teacher-login.html"],
body.has-teacher-site-banner a[href="teacher-login.html"] {
  display: none;
}
.teacher-site-banner .teacher-mode-switch {
  border-bottom: 0;
  margin: 0;
  padding: 0;
}
.teacher-site-banner .teacher-mode-switch__btn {
  font-size: 12px;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
}
.teacher-site-banner .teacher-mode-switch__btn.is-active {
  background: #c7a45d;
  border-color: #c7a45d;
  color: #102a4c;
}
.teacher-site-banner__hint {
  font-size: 12px;
  opacity: .85;
}
.teacher-mode-picker {
  max-width: 560px;
  margin: 0 auto;
}
.teacher-mode-picker__choices {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.teacher-mode-picker__btn {
  display: block;
  width: 100%;
  padding: 24px 20px;
  text-align: left;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface-paper);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.teacher-mode-picker__btn:hover {
  border-color: var(--brand-gold, #c7a45d);
  box-shadow: 0 4px 20px rgba(16, 42, 76, .08);
}
.teacher-mode-picker__btn strong {
  display: block;
  font-size: 1.15rem;
  color: var(--brand-navy);
  margin-bottom: 6px;
}
.teacher-mode-picker__btn span {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.teacher-content {
  padding: 8px 28px 48px;
  min-width: 0;
}
.teacher-layout .minimal-page-head {
  padding-left: 0;
  padding-right: 0;
}
.teacher-layout .minimal-main {
  padding-left: 0;
  padding-right: 0;
}

.cal-todo-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.cal-todo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-paper);
  margin: 0;
  border-radius: 0;
}
.cal-todo-row:last-child { border-bottom: 0; }
.cal-todo-row__main { flex: 1; min-width: 0; }
.cal-todo-row__main h3 {
  margin: 6px 0 4px;
  font-size: 1.05rem;
  color: var(--brand-navy);
}
.cal-todo-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cal-todo-row__act { flex-shrink: 0; }
.cal-card__sum-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.cal-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cal-progress__track {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: #ece7dd;
  overflow: hidden;
}
.cal-progress__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #102a4c, #c7a45d);
  border-radius: 999px;
}
.cal-progress__txt {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.cal-detail__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 8px;
}
.cal-status-table td small.cal-phone,
.cal-phone {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}
.cal-modal__panel--wide { width: min(860px, 100%); }
.cal-ex-row.is-done { opacity: .85; }
.cal-ex-done {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-navy);
}

@media (max-width: 900px) {
  .teacher-shell {
    grid-template-columns: 1fr;
  }
  .teacher-side {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
  }
  .teacher-side__label { width: 100%; margin: 0 0 4px; }
  .teacher-side__link { margin: 0; }
  .teacher-content { padding: 8px 16px 40px; }
  .cal-todo-row { flex-direction: column; align-items: flex-start; }
}

/* ---- Student shell retired: top nav only ---- */
/* ponytail: kill-switch if cached old auth.js still injects .student-side */
.student-side { display: none !important; }
.student-shell {
  display: block;
  max-width: none;
  margin: 0;
  min-height: 0;
  border-top: 0;
}
.student-content {
  padding: 0;
  min-width: 0;
}
.student-layout .minimal-page-head,
.student-layout .minimal-main,
.student-content > .minimal-shell {
  max-width: none;
}
.shell-compact-nav .minimal-nav > a:not(.nav-persist):not(#nav-auth),
.shell-compact-nav .minimal-nav > .nav-mobile-only {
  display: inline-flex;
}
.shell-compact-nav .minimal-nav > #nav-auth,
.shell-compact-nav .minimal-nav > .nav-persist,
.shell-compact-nav .minimal-nav > #logout-btn,
.shell-compact-nav .minimal-nav > #nav-logout {
  display: inline-flex;
  align-items: center;
}

/* ---- Dashboard workbench ---- */
.dash-main { display: flex; flex-direction: column; gap: 28px; }
.dash-section {
  background: var(--surface-paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
}
.dash-section__head {
  margin-bottom: 16px;
}
.dash-section__head h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--brand-navy);
}
.dash-section__head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.dash-modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.dash-module {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.dash-module:hover {
  border-color: var(--brand-gold);
  transform: translateY(-2px);
}
.dash-module__en {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.dash-module b {
  font-size: 1.15rem;
  color: var(--brand-navy);
}
.dash-module span { font-size: 13px; color: var(--text-muted); }
.dash-module__go {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-gold);
}
.dash-todo-list,
.dash-continue,
.dash-announce {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-todo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.dash-todo:last-child { border-bottom: 0; }
.dash-todo__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dash-todo__main b { color: var(--brand-navy); }
.dash-todo__meta {
  width: 100%;
  font-size: 12.5px;
  color: var(--text-muted);
}
.dash-continue li a,
.dash-announce li {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.dash-continue li:last-child a,
.dash-announce li:last-child { border-bottom: 0; }
.dash-continue b { color: var(--brand-navy); display: block; }
.dash-continue span { font-size: 12.5px; color: var(--text-muted); }
.dash-announce p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.dash-empty {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 14px;
}
.dash-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-navy);
  text-decoration: none;
}
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.dash-metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  text-align: center;
}
.dash-metric b {
  display: block;
  font-size: 1.5rem;
  color: var(--brand-navy);
}
.dash-metric span {
  font-size: 12px;
  color: var(--text-muted);
}
@media (max-width: 800px) {
  .dash-modules { grid-template-columns: 1fr; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   I-006 / Phase 0 — product-line topbar + white/orange IELTS mega
   ========================================================================== */
:root {
  --mega-accent: #e8913a;
  --mega-soft: #fff6ec;
  --mega-text: #07192f;
  --mega-muted: #5f6673;
}
.minimal-topbar.reme-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  overflow: visible;
}
.minimal-topbar.reme-topbar.is-scrolled {
  background: transparent;
  border-bottom: none;
}
.minimal-topbar.reme-topbar .minimal-topbar__inner {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 2;
}
.minimal-topbar.reme-topbar.is-mega-open .minimal-topbar__inner {
  border-radius: 0;
  box-shadow: none;
}
.minimal-topbar.reme-topbar .minimal-brand__logo {
  filter: none;
}
.minimal-topbar.reme-topbar .minimal-brand__text span {
  color: #94a3b8;
}
.reme-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
}
.reme-nav::-webkit-scrollbar { display: none; }
.reme-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--mega-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
  position: relative;
}
.reme-nav a:hover {
  color: var(--mega-text);
  background: var(--mega-soft);
}
.reme-nav a.is-active,
.reme-nav a.reme-nav__ielts[aria-expanded="true"] {
  color: var(--mega-accent);
  font-weight: 700;
  background: var(--mega-soft);
}
.reme-nav a.is-active::after {
  content: none;
}
/* 全球大学排行榜 — teal accent (between 国际课程 and AI升学顾问) */
.reme-nav a.nav-rankings,
.nav-drawer__links a.nav-rankings {
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(13, 148, 136, 0.07);
}
.reme-nav a.nav-rankings:hover,
.nav-drawer__links a.nav-rankings:hover {
  background: rgba(13, 148, 136, 0.14);
}
.reme-nav a.nav-rankings.is-active,
.nav-drawer__links a.nav-rankings.is-active {
  background: rgba(13, 148, 136, 0.16);
  color: inherit;
  font-weight: 700;
}
.nav-rankings__text {
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  background-image: linear-gradient(115deg, #2dd4bf 0%, #0d9488 48%, #0f766e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* AI 升学顾问 — gradient accent in top nav */
.reme-nav a.nav-ai-admit,
.nav-drawer__links a.nav-ai-admit {
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(37, 99, 235, 0.06);
}
.reme-nav a.nav-ai-admit:hover,
.nav-drawer__links a.nav-ai-admit:hover {
  background: rgba(37, 99, 235, 0.12);
}
.reme-nav a.nav-ai-admit.is-active,
.nav-drawer__links a.nav-ai-admit.is-active {
  background: rgba(37, 99, 235, 0.14);
  color: inherit;
  font-weight: 700;
}
.nav-ai-admit__text {
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  background-image: linear-gradient(115deg, #38bdf8 0%, #3b82f6 42%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.reme-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.reme-tool {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.reme-tool:hover {
  background: var(--mega-soft);
  color: var(--mega-accent);
}
.reme-tool svg {
  width: 18px;
  height: 18px;
}
.reme-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mega-soft);
  color: var(--mega-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* White/orange mega panel under topbar */
.mega-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1;
  background: #fff;
  border-top: 1px solid rgba(7, 25, 47, 0.06);
  box-shadow: 0 12px 40px rgba(16, 24, 39, 0.08);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.35s ease, opacity 0.2s ease;
}
.mega-panel.is-open {
  max-height: 320px;
  opacity: 1;
  pointer-events: auto;
}
.mega-panel__inner {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
/* IELTS hub — skill path cards (listening / reading / speaking / writing / mock) */
body.is-ielts-hub .catalog-toolbar,
body.is-vocab-hub .catalog-toolbar {
  display: none !important;
}
.ielts-hub {
  --mega-text: #07192f;
  --mega-muted: #5f6673;
  padding: 4px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ielts-hub__intro {
  max-width: 40rem;
}
.ielts-hub__kicker {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a98234;
}
.ielts-hub__intro h2 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--mega-text);
  line-height: 1.2;
}
.ielts-hub__intro > p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mega-muted);
}
.ielts-hub__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.ielts-hub__card {
  --hub-accent: #c7a45d;
  --hub-tint: rgba(199, 164, 93, .08);
  --hub-ink: #07192f;
  position: relative;
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(165deg, #fffcf7 0%, #fff 55%);
  border: 1px solid rgba(7, 25, 47, .08);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 14px 36px -22px rgba(7, 25, 47, .18);
  overflow: hidden;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease, border-color .22s ease;
}
.ielts-hub__card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--hub-accent);
}
.ielts-hub__card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--hub-accent) 42%, transparent);
  box-shadow: 0 22px 48px -24px rgba(7, 25, 47, .28);
}
.ielts-hub__card--listening {
  --hub-accent: #102a4c;
  --hub-tint: rgba(16, 42, 76, .07);
  background: linear-gradient(165deg, #f5f8fb 0%, #fffcf7 58%);
}
.ielts-hub__card--reading {
  --hub-accent: #2f6f78;
  --hub-tint: rgba(47, 111, 120, .09);
  background: linear-gradient(165deg, #f2f8f9 0%, #fffcf7 58%);
}
.ielts-hub__card--speaking {
  --hub-accent: #6c7a89;
  --hub-tint: rgba(108, 122, 137, .1);
  background: linear-gradient(165deg, #f6f7f9 0%, #fffcf7 58%);
}
.ielts-hub__card--writing {
  --hub-accent: #8a6a2f;
  --hub-tint: rgba(138, 106, 47, .1);
  background: linear-gradient(165deg, #faf6f0 0%, #fffcf7 58%);
}
.ielts-hub__card--mock {
  --hub-accent: #07192f;
  --hub-tint: rgba(7, 25, 47, .07);
  background: linear-gradient(165deg, #f3f5f8 0%, #fffcf7 52%);
}
.ielts-hub__card--mock::before {
  background: linear-gradient(90deg, #102a4c 0 50%, #c7a45d 50% 100%);
}
.ielts-hub__hit {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}
.ielts-hub__ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: var(--hub-accent);
  color: #f7f3ea;
  box-shadow: 0 10px 22px -14px var(--hub-accent);
}
.ielts-hub__card--reading .ielts-hub__ico,
.ielts-hub__card--writing .ielts-hub__ico {
  color: #fffcf7;
}
.ielts-hub__ico svg {
  width: 22px;
  height: 22px;
  display: block;
}
.ielts-hub__eyebrow {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hub-accent);
}
.ielts-hub__hit h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--hub-ink);
  line-height: 1.15;
}
.ielts-hub__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--mega-muted);
}
.ielts-hub__links {
  list-style: none;
  margin: 0 0 16px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(7, 25, 47, .07);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.ielts-hub__links a {
  display: block;
  color: #4d5664;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.ielts-hub__links a:hover {
  color: var(--hub-accent);
  background: var(--hub-tint);
}
.ielts-hub__go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
  color: var(--hub-accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.01em;
  transition: transform .18s ease, color .18s ease;
}
.ielts-hub__go span {
  transition: transform .18s ease;
}
.ielts-hub__card:hover .ielts-hub__go span {
  transform: translateX(3px);
}
@media (max-width: 1100px) {
  .ielts-hub__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ielts-hub__card--mock {
    grid-column: span 2;
  }
}
@media (max-width: 760px) {
  .ielts-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .ielts-hub__card--mock {
    grid-column: span 2;
  }
}
@media (max-width: 520px) {
  .ielts-hub__grid {
    grid-template-columns: 1fr;
  }
  .ielts-hub__card--mock {
    grid-column: auto;
  }
  .ielts-hub__hit h3 { font-size: 20px; }
}
.mega-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 14px;
  margin: 0 0 14px;
  border-bottom: 2px solid var(--mega-accent);
  color: var(--mega-text);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mega-col__arrow {
  color: var(--mega-accent);
  font-weight: 500;
}
.mega-col__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mega-col__list a {
  color: var(--mega-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s ease;
}
.mega-col__list a:hover {
  color: var(--mega-accent);
}
.nav-drawer__sub {
  padding-left: 28px !important;
  font-size: 13px !important;
  color: var(--mega-muted) !important;
  font-weight: 500 !important;
}
.reme-user {
  position: relative;
}
.reme-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease;
}
.reme-avatar:hover {
  background: #f1f5f9;
}
.reme-avatar.is-logged-in {
  padding-right: 10px;
}
.reme-avatar .nav-auth__avatar,
.reme-avatar .nav-auth__avatar--img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-grid;
  place-items: center;
  background: var(--mega-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.reme-avatar .nav-auth__avatar--img {
  background: transparent;
}
.reme-avatar .nav-auth__label {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.reme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f5f9;
  padding: 8px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.reme-dropdown[hidden] {
  display: none !important;
}
.reme-dropdown a,
.reme-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
  font-size: 14px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 500;
  font-family: inherit;
}
.reme-dropdown a:hover,
.reme-dropdown button:hover {
  background: var(--mega-soft);
}
.reme-topbar.is-scrolled .minimal-topbar__inner {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.nav-drawer__links a.is-active {
  background: var(--mega-soft);
  color: var(--mega-accent);
}

@media (max-width: 820px) {
  .minimal-topbar.reme-topbar .minimal-topbar__inner {
    width: 100%;
    border-radius: 0;
    padding: 0 16px;
    gap: 12px;
  }
  .reme-nav {
    display: none;
  }
  .mega-panel {
    display: none !important;
  }
  .reme-badge {
    display: none;
  }
  .reme-avatar .nav-auth__label {
    display: none;
  }
  .nav-menu-btn {
    background: #f8fafc;
    border-color: #f1f5f9;
  }
  .nav-menu-btn__bar {
    background: #64748b;
  }
  .mobile-tabs {
    grid-template-columns: repeat(5, 1fr);
  }
  .mega-panel__inner {
    width: 100%;
    padding: 20px 16px;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}



/* Wave S5: home bento + mega polish */
.bento-tile--hero .bento-tile__kicker {
  animation: home-bento-in 0.6s cubic-bezier(.22, 1, .36, 1) both;
}
.bento-tile--hero h1 {
  animation: home-bento-in 0.7s cubic-bezier(.22, 1, .36, 1) 0.05s both;
}
.bento-tile--hero .bento-tile__lead {
  animation: home-bento-in 0.7s cubic-bezier(.22, 1, .36, 1) 0.1s both;
}
.bento-tile--hero .home-market__cta {
  animation: home-bento-in 0.7s cubic-bezier(.22, 1, .36, 1) 0.16s both;
}
.bento-tile--visual {
  animation: home-bento-in 0.8s cubic-bezier(.22, 1, .36, 1) 0.08s both;
}
.bento-tile--feature {
  animation: home-bento-in 0.65s cubic-bezier(.22, 1, .36, 1) both;
}
.bento-tile--wide { animation-delay: 0.12s; }
.bento-tile--vocab { animation-delay: 0.16s; }
.bento-tile--alevel { animation-delay: 0.2s; }
.bento-tile--rank { animation-delay: 0.24s; }
.bento-tile--ai { animation-delay: 0.28s; }
.bento-tile--speak { animation-delay: 0.32s; }
@keyframes home-bento-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bento-tile--hero .bento-tile__kicker,
  .bento-tile--hero h1,
  .bento-tile--hero .bento-tile__lead,
  .bento-tile--hero .home-market__cta,
  .bento-tile--visual,
  .bento-tile--feature,
  .mega-panel.is-open { animation: none !important; }
}
.mega-panel {
  box-shadow: 0 16px 48px rgba(16, 24, 39, 0.1);
}
.home-btn--primary:active {
  transform: scale(0.95);
}

/* ==========================================================================
   Home Apple product narrative (2026-08)
   White / navy / orange CTA / gold decorative. One navy accent band.
   ========================================================================== */
.home-apple-page {
  --ha-bg: #f5f5f7;
  --ha-surface: #ffffff;
  --ha-ink: #1d1d1f;
  --ha-muted: #6e6e73;
  --ha-faint: #86868b;
  --ha-navy: #07192f;
  --ha-navy-soft: #102a4c;
  --ha-orange: #e8913a;
  --ha-orange-dark: #c77828;
  --ha-gold: #c7a45d;
  --ha-line: rgba(0, 0, 0, .08);
  --ha-radius: 18px;
  background: var(--ha-bg);
  color: var(--ha-ink);
  letter-spacing: -.01em;
}

/* Chrome: frosted topbar + quieter footer (scoped to home) */
.home-apple-page .home-chrome-bar {
  background: rgba(245, 245, 247, .72);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.home-apple-page .home-chrome-bar.is-scrolled {
  background: rgba(245, 245, 247, .86);
  border-bottom-color: var(--ha-line);
  box-shadow: none;
}
.home-apple-page .minimal-brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  filter: none;
}
.home-apple-page .minimal-nav a,
.home-apple-page .reme-nav a {
  color: var(--ha-muted);
  font-weight: 500;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 980px;
}
.home-apple-page .minimal-nav a:hover,
.home-apple-page .reme-nav a:hover {
  background: rgba(0, 0, 0, .04);
  color: var(--ha-ink);
}
.home-apple-page .minimal-nav a.is-active,
.home-apple-page .reme-nav a.is-active {
  background: rgba(0, 0, 0, .06);
  border: 0;
  color: var(--ha-ink);
}
/* Soften marketing nav accents on Apple home chrome */
.home-apple-page .minimal-nav a.nav-rankings,
.home-apple-page .minimal-nav a.nav-ai-admit,
.home-apple-page .reme-nav a.nav-rankings,
.home-apple-page .reme-nav a.nav-ai-admit {
  background: transparent;
  font-weight: 500;
}
.home-apple-page .minimal-nav a.nav-rankings:hover,
.home-apple-page .minimal-nav a.nav-ai-admit:hover,
.home-apple-page .reme-nav a.nav-rankings:hover,
.home-apple-page .reme-nav a.nav-ai-admit:hover {
  background: rgba(0, 0, 0, .04);
}
.home-apple-page .nav-rankings__text,
.home-apple-page .nav-ai-admit__text {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--ha-muted);
  -webkit-text-fill-color: var(--ha-muted);
  font-weight: 500;
  letter-spacing: -.01em;
}
.home-apple-page .home-chrome-footer {
  background: var(--ha-bg);
  border-top: 1px solid var(--ha-line);
  margin-top: 0;
}
.home-apple-page .home-chrome-footer::after { display: none; }
.home-apple-page .minimal-footer__links a:hover { color: var(--ha-orange); }

.home-apple-page .home-btn {
  border-radius: 980px;
  font-weight: 600;
  letter-spacing: -.01em;
  min-height: 48px;
  padding: 12px 26px;
  transition: background-color .2s var(--ease), color .2s var(--ease),
    border-color .2s var(--ease), transform .1s var(--ease), box-shadow .2s var(--ease);
}
.home-apple-page .home-btn--primary {
  background: var(--ha-orange);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(232, 145, 58, .65);
}
@media (hover: hover) {
  .home-apple-page .home-btn--primary:hover {
    background: var(--ha-orange-dark);
    transform: translateY(-1px);
  }
}
.home-apple-page .home-btn--primary:active { transform: scale(0.97); }
.home-apple-page .home-btn--ghost {
  background: transparent;
  color: var(--ha-ink);
  border-color: rgba(0, 0, 0, .12);
}
@media (hover: hover) {
  .home-apple-page .home-btn--ghost:hover {
    background: rgba(0, 0, 0, .04);
    border-color: rgba(0, 0, 0, .18);
    color: var(--ha-ink);
  }
}
.home-apple-page .home-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ha-orange) 28%, transparent);
}
.home-apple-page .ha-feature--dark .home-btn--ghost {
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, .28);
}
@media (hover: hover) {
  .home-apple-page .ha-feature--dark .home-btn--ghost:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
  }
}

.ha-eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ha-orange);
}
.ha-hero .ha-eyebrow {
  font-size: 17px;
  letter-spacing: .04em;
}
.ha-accent { color: var(--ha-orange); }
.ha-line {
  display: block;
  white-space: nowrap;
}
.ha-lead {
  margin: 0;
  max-width: 36em;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--ha-muted);
  text-wrap: pretty;
}
.ha-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ha-orange);
  text-decoration: none;
}
.ha-text-link::after { content: "›"; font-size: 1.15em; line-height: 1; }
@media (hover: hover) {
  .ha-text-link:hover { color: var(--ha-orange-dark); }
}
.ha-feature--dark .ha-eyebrow {
  color: #f1d38a;
  font-size: 17px;
  letter-spacing: .04em;
}
.ha-feature--dark .ha-text-link { color: #f1d38a; }
@media (hover: hover) {
  .ha-feature--dark .ha-text-link:hover { color: #fff; }
}
.ha-cta { margin-top: 28px; }

/* Hero */
.ha-hero {
  padding: clamp(48px, 8vw, 88px) 0 clamp(56px, 9vw, 100px);
  overflow: hidden;
}
.ha-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
}
.ha-hero h1 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--ha-navy);
  font-optical-sizing: auto;
}
.ha-hero .ha-lead { font-size: 19px; max-width: 34ch; color: #5c5c62; }

/* Feature bands */
.ha-feature {
  padding: clamp(72px, 10vw, 120px) 0;
  background: var(--ha-surface);
}
.ha-feature:nth-of-type(even):not(.ha-feature--dark) {
  background: var(--ha-bg);
}
.ha-feature__inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(20px, 2.8vw, 40px);
  align-items: center;
}
.ha-feature--flip .ha-feature__inner {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
}
.ha-feature--flip .ha-feature__copy { order: 2; }
.ha-feature--flip .ha-feature__stage { order: 1; }
.ha-feature__copy { justify-self: end; max-width: 22em; }
.ha-feature__stage { justify-self: start; min-width: 0; }
.ha-feature--flip .ha-feature__copy { justify-self: start; }
.ha-feature--flip .ha-feature__stage { justify-self: end; }
.ha-feature h2 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--ha-navy);
  font-optical-sizing: auto;
}
.ha-feature h2 .ha-line:nth-child(even) {
  color: var(--ha-orange);
}
.ha-feature .ha-lead { font-size: 19px; max-width: 34ch; color: #5c5c62; }
.ha-feature--dark {
  background:
    radial-gradient(640px 320px at 88% 12%, rgba(232, 145, 58, .16), transparent 60%),
    linear-gradient(165deg, #102a4c 0%, #07192f 100%);
  color: #f5f5f7;
}
.ha-feature--dark .ha-lead { color: rgba(245, 245, 247, .72); }
.ha-feature--dark h2 { color: #fff; }
.ha-feature--dark h2 .ha-line:nth-child(even) { color: #f1d38a; }

/* IELTS section: full CDT mock exam desk (matches exam-cdt chrome) */
.ha-feature--cdt {
  position: relative;
  isolation: isolate;
  background: #d9e1ec;
  overflow: hidden;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
}
.ha-cdt-app {
  --cdt-font: Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --cdt-serif: "Noto Serif SC", "Libre Baskerville", "Songti SC", Georgia, serif;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #d9e1ec;
  font-family: var(--cdt-font);
  color: #0b1f3a;
}
.ha-cdt-app__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 14px 0 16px;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #fff;
  flex: none;
}
.ha-cdt-app__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 15px;
}
.ha-cdt-app__logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.ha-cdt-app__timer {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #f5c542;
  font-variant-numeric: tabular-nums;
}
.ha-cdt-app__timer::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-sizing: border-box;
  background:
    linear-gradient(currentColor, currentColor) center 4px / 2px 5px no-repeat,
    linear-gradient(currentColor, currentColor) center center / 5px 2px no-repeat;
}
.ha-cdt-app__finish {
  border: 0;
  border-radius: 3px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #0b1f3a;
  background: linear-gradient(180deg, #7ec0ef 0%, #4a9ed9 100%);
  pointer-events: none;
}
.ha-cdt-app__rail {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 12px;
  background: #3a3a3a;
  flex: none;
}
.ha-cdt-app__rail b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  color: #e8eef4;
  background: #505050;
}
.ha-cdt-app__rail b.is-on {
  background: #8ec5ef;
  color: #0b1f3a;
}
.ha-cdt-app__body {
  flex: 1;
  min-height: 0;
  display: grid;
  /* Slightly narrower copy rail — paper stays the hero */
  grid-template-columns: minmax(260px, 0.88fr) minmax(0, 1.22fr);
  gap: 0;
  background: #d9e1ec;
}
.ha-cdt-app__copy {
  /* Optical upper-middle: more bottom air than top */
  padding:
    clamp(48px, 9vh, 88px)
    clamp(28px, 3.8vw, 48px)
    clamp(72px, 14vh, 120px);
  border-right: 1px solid #c8d2e0;
  background: linear-gradient(180deg, #eef3f8 0%, #e4ebf3 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
}
/* Centered measure, left-aligned type — Apple editorial pattern */
.ha-cdt-app__stack {
  width: min(100%, 22rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.ha-cdt-app__eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #4a9ed9;
  font-family: var(--cdt-font);
}
.ha-cdt-app__copy h2 {
  margin: 0 0 18px;
  font-family: var(--cdt-serif);
  font-size: clamp(1.7rem, 2.8vw, 2.45rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: .01em;
  color: #0b1f3a;
}
.ha-cdt-app__copy h2 .ha-line { display: block; }
.ha-cdt-app__copy h2 .ha-line + .ha-line { margin-top: 0.06em; }
.ha-cdt-app__copy h2 .ha-line:nth-child(even) {
  color: #1e5a8a;
}
.ha-cdt-app__lead {
  margin: 0 0 26px;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.65;
  color: #3d4f66;
  font-family: var(--cdt-font);
  text-wrap: pretty;
}
.ha-cdt-app__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin-top: 2px;
  padding: 10px 16px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #0b1f3a;
  background: linear-gradient(180deg, #7ec0ef 0%, #4a9ed9 100%);
  border: 1px solid #3b82c4;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset;
}
.ha-cdt-app__link::after { content: "›"; font-size: 1.2em; line-height: 1; }
@media (hover: hover) {
  .ha-cdt-app__link:hover { filter: brightness(1.05); }
}
.ha-cdt-app__paper {
  padding: clamp(18px, 2.5vw, 28px) clamp(18px, 3vw, 36px) 24px;
  overflow: auto;
  background:
    linear-gradient(180deg, #f4f6f9 0%, #e8eef4 100%);
}
.ha-cdt-app__qhead {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #c8d2e0;
}
.ha-cdt-app__qhead strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
}
.ha-cdt-app__qhead span {
  font-size: 14px;
  color: #3d4f66;
}
.ha-cdt-app__qhead b { font-weight: 700; color: #0b1f3a; }
.ha-cdt-app__q {
  margin-bottom: 22px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #c8d2e0;
  border-radius: 2px;
}
.ha-cdt-app__q h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.ha-cdt-app__q > p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.5;
}
.ha-cdt-app__opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ha-cdt-app__opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #c8d2e0;
  border-radius: 2px;
  background: #fff;
  cursor: default;
}
.ha-cdt-app__opt i {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid #7a8aa0;
  flex: none;
  box-sizing: border-box;
}
.ha-cdt-app__opt span {
  font-size: 14px;
  line-height: 1.4;
  color: #0b1f3a;
}
.ha-cdt-app__opt span b {
  display: inline-block;
  min-width: 1.1em;
  margin-right: 4px;
}
.ha-cdt-app__opt.is-on {
  border-color: #1e3a5f;
  background: #f3f8fd;
  box-shadow: inset 0 0 0 1px #1e3a5f;
}
.ha-cdt-app__opt.is-on i {
  border-color: #1e3a5f;
  background:
    radial-gradient(circle at center, #1e3a5f 0 45%, transparent 46%);
}
.ha-cdt-app__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  height: 56px;
  padding: 0 16px;
  align-items: center;
  background: linear-gradient(180deg, #f7f7f7 0%, #e4e4e4 100%);
  border-top: 1px solid #c8d2e0;
  flex: none;
}
.ha-cdt-app__navbtn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
  color: #0b1f3a;
  background: linear-gradient(180deg, #f7f7f7 0%, #e6e6e6 100%);
  border: 1px solid #b0b8c4;
}
.ha-cdt-app__navbtn.is-primary {
  background: linear-gradient(180deg, #7ec0ef 0%, #4a9ed9 100%);
  border-color: #3b82c4;
}
@media (max-width: 900px) {
  .ha-cdt-app__body { grid-template-columns: 1fr; }
  .ha-cdt-app__copy {
    border-right: 0;
    border-bottom: 1px solid #c8d2e0;
    padding:
      clamp(28px, 5vh, 40px)
      clamp(20px, 5vw, 32px)
      clamp(36px, 6vh, 48px);
  }
  .ha-cdt-app__stack {
    width: min(100%, 26rem);
  }
}
.home-apple-keynote .ha-feature--cdt {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  justify-content: stretch;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  margin: 0;
}

/* Teacher intro + finale */
.ha-teacher {
  /* Book-page cream — intentional, not generic cream+terracotta kit */
  background:
    radial-gradient(ellipse 90% 60% at 12% 8%, rgba(255, 252, 247, .7), transparent 55%),
    radial-gradient(ellipse 70% 50% at 92% 88%, rgba(210, 180, 140, .12), transparent 50%),
    repeating-linear-gradient(
      180deg,
      rgba(120, 90, 50, .018) 0 1px,
      transparent 1px 7px
    ),
    linear-gradient(165deg, #f4ebe0 0%, #efe3d3 48%, #f7f0e6 100%);
  color: #1d1d1f;
  text-align: left;
}
.ha-teacher__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.52fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  width: 100%;
}
.ha-teacher__copy {
  max-width: min(22rem, 100%);
  justify-self: start;
}
.ha-teacher h2 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.12;
  color: var(--ha-navy);
  font-optical-sizing: auto;
}
.ha-teacher .ha-eyebrow {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ha-navy);
  font-optical-sizing: auto;
}
.ha-teacher h2 .ha-line:nth-child(even) {
  color: var(--ha-orange);
}
.ha-teacher .ha-lead {
  margin: 0 0 18px;
  max-width: 34ch;
  color: #5c5348;
}
.ha-teacher__stage {
  min-width: 0;
  justify-self: stretch;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
/* Physical teacher folder — open cover, flip pages */
.ha-folder {
  perspective: 1800px;
  --folder-manila: #d7b07a;
  --folder-manila-deep: #b8894f;
  --folder-paper: #fffaf3;
}
.ha-folder__body {
  position: relative;
  transform-style: preserve-3d;
  border-radius: 6px 18px 16px 6px;
  min-height: 520px;
}
.ha-folder__back {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(90, 55, 20, .22) 0 10px, transparent 28px),
    linear-gradient(145deg, #c99555 0%, var(--folder-manila) 42%, var(--folder-manila-deep) 100%);
  box-shadow:
    0 1px 0 rgba(255, 240, 210, .35) inset,
    0 22px 44px rgba(70, 45, 15, .22);
}
.ha-folder__back::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 7px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #8a6230, #6e4a22);
  opacity: .55;
}
.ha-folder__pocket {
  position: relative;
  z-index: 1;
  margin: 12px 12px 12px 18px;
  padding: clamp(14px, 1.8vw, 20px);
  border-radius: 2px 12px 12px 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), transparent 28%),
    var(--folder-paper);
  border: 1px solid rgba(120, 90, 50, .12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .8) inset,
    0 10px 28px rgba(70, 45, 15, .08);
  min-height: calc(100% - 24px);
}
.ha-folder__cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  transform-origin: left center;
  transform: rotateY(0deg) translateZ(0);
  transition: transform 1.2s cubic-bezier(.22, .9, .18, 1);
  border-radius: inherit;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 28px 28px 32px 36px;
  color: #3a2a14;
  background:
    linear-gradient(90deg, rgba(90, 55, 20, .28) 0 12px, transparent 36px),
    linear-gradient(118deg, #e8c896 0%, #d4a86a 38%, #c48f4a 100%);
  box-shadow:
    8px 0 28px rgba(40, 25, 8, .18),
    0 1px 0 rgba(255, 245, 220, .4) inset;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ha-folder__cover::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px dashed rgba(90, 55, 20, .28);
  opacity: .7;
}
.ha-folder.is-open .ha-folder__cover {
  transform: rotateY(-118deg);
}
.ha-folder:not(.is-open) .ha-folder__pocket {
  pointer-events: none;
}
.ha-folder__tag {
  position: absolute;
  top: 18px;
  left: 36px;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
  color: rgba(58, 42, 20, .55);
}
.ha-folder__cover b {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.ha-folder__cover em {
  font-style: normal;
  font-size: 14px;
  color: rgba(58, 42, 20, .62);
}
.ha-tflow__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -6px 0 16px;
}
.ha-tflow__tab {
  border: 1px solid rgba(16, 42, 76, .14);
  background: rgba(255, 255, 255, .92);
  color: var(--ha-navy);
  border-radius: 10px 10px 4px 4px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ha-tflow__tab.is-on {
  background: var(--ha-navy);
  color: #fff;
  border-color: var(--ha-navy);
  box-shadow: 0 8px 18px rgba(16, 42, 76, .18);
}
.ha-tflow__viewport {
  position: relative;
  min-height: 420px;
  perspective: 2000px;
  perspective-origin: 50% 45%;
  transform-style: preserve-3d;
  overflow: hidden;
  border-radius: 8px;
}
.ha-tflow__slide {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  transform-origin: left center;
  transform: rotateY(0deg) translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--folder-paper, #fffaf3);
  /* Apple-ish settle: soft start, long ease-out */
  transition:
    transform .92s cubic-bezier(.22, .9, .2, 1),
    box-shadow .92s cubic-bezier(.22, .9, .2, 1),
    filter .92s cubic-bezier(.22, .9, .2, 1);
  will-change: transform;
}
.ha-tflow__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    90deg,
    rgba(40, 25, 8, .16) 0%,
    rgba(40, 25, 8, .04) 28%,
    rgba(255, 255, 255, .12) 62%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: opacity .92s cubic-bezier(.22, .9, .2, 1);
}
.ha-tflow__slide.is-on {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
  filter: none;
}
.ha-tflow__slide.is-under {
  opacity: 1;
  z-index: 1;
  filter: brightness(.97) saturate(.96);
  pointer-events: none;
}
.ha-tflow__slide.is-leaving {
  opacity: 1;
  z-index: 4;
  pointer-events: none;
  transform: rotateY(-128deg) translateZ(2px);
  box-shadow:
    -18px 8px 36px rgba(40, 25, 8, .2),
    -2px 0 0 rgba(255, 255, 255, .35) inset;
}
.ha-tflow__slide.is-leaving::after {
  opacity: 1;
}
.ha-tflow__slide.is-leaving.is-back {
  transform-origin: right center;
  transform: rotateY(128deg) translateZ(2px);
  box-shadow:
    18px 8px 36px rgba(40, 25, 8, .2),
    2px 0 0 rgba(255, 255, 255, .35) inset;
}
.ha-tflow__slide.is-leaving.is-back::after {
  background: linear-gradient(
    270deg,
    rgba(40, 25, 8, .16) 0%,
    rgba(40, 25, 8, .04) 28%,
    rgba(255, 255, 255, .12) 62%,
    rgba(255, 255, 255, 0) 100%
  );
}
@media (prefers-reduced-motion: reduce) {
  .ha-folder__cover,
  .ha-tflow__slide,
  .ha-tflow__slide::after { transition: none; }
  .ha-folder.is-open .ha-folder__cover { transform: none; opacity: 0; }
}
/* Mini teacher UI — larger, clearer, more premium */
.ha-tui { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.ha-tui__shell {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  min-height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(16, 42, 76, .1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 18px 40px rgba(70, 50, 20, .1);
}
.ha-tui__side {
  padding: 18px 12px;
  background:
    linear-gradient(180deg, #faf6ef 0%, #f3ebe0 100%);
  border-right: 1px solid rgba(16, 42, 76, .08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ha-tui__side p {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #9a9084;
}
.ha-tui__side span {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #5c5348;
  line-height: 1.25;
}
.ha-tui__side span.is-on {
  background: var(--ha-navy);
  color: #fff;
  box-shadow: 0 8px 16px rgba(16, 42, 76, .16);
}
.ha-tui__main {
  padding: 18px 20px 20px;
  min-width: 0;
  background: linear-gradient(180deg, #fffcf7 0%, #fff 42%);
}
.ha-tui__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ha-tui__head b {
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--ha-navy);
}
.ha-tui__head em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: #9a9084;
}
.ha-tui__cta {
  padding: 7px 14px !important;
  border-radius: 999px;
  background: var(--ha-navy) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(16, 42, 76, .18);
}
.ha-tui__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.ha-tui__filters i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 42, 76, .12);
  background: #fff;
  color: var(--ha-navy);
}
.ha-tui__filters i.is-on {
  background: var(--ha-navy);
  color: #fff;
  border-color: var(--ha-navy);
}
.ha-tui__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ha-tui__stats div {
  padding: 12px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(16, 42, 76, .08);
}
.ha-tui__stats b {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--ha-navy);
}
.ha-tui__stats span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #8a8176;
}
.ha-tui__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ha-tui__row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(16, 42, 76, .08);
}
.ha-tui__row.is-focus {
  border-color: rgba(232, 145, 58, .5);
  box-shadow: 0 0 0 1px rgba(232, 145, 58, .14), 0 10px 22px rgba(70, 50, 20, .06);
}
.ha-tui__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #102a4c;
}
.ha-tui__meta b {
  display: block;
  font-size: 15px;
  color: var(--ha-navy);
}
.ha-tui__meta span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #8a8176;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ha-tui__bar {
  margin-top: 7px;
  height: 5px;
  border-radius: 999px;
  background: rgba(16, 42, 76, .08);
  overflow: hidden;
}
.ha-tui__bar i {
  display: block;
  height: 100%;
  background: var(--ha-orange);
  border-radius: inherit;
}
.ha-tui__pill {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.ha-tui__pill.is-done { background: rgba(46, 125, 80, .12); color: #2e7d50; }
.ha-tui__pill.is-pending { background: rgba(232, 145, 58, .16); color: #b56a1c; }
.ha-tui__pill.is-wait { background: rgba(95, 102, 115, .12); color: #5f6673; }
.ha-tui__week {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.ha-tui__day {
  min-height: 118px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border, #e6dfd0);
}
.ha-tui__day.is-hot {
  border-color: #102a4c;
  box-shadow: 0 10px 22px rgba(7, 25, 47, .12);
  transform: translateY(-1px);
}
.ha-tui__day > b {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--ha-navy);
}
.ha-tui__day > b span { color: #9a9084; font-weight: 500; font-size: 12px; }
.ha-tui__day .cal-month__chip {
  font-size: 12px;
  padding: 5px 7px;
  border-radius: 6px;
  pointer-events: none;
}
.ha-tui__note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid rgba(199, 164, 93, .4);
  font-size: 13px;
  color: #5c5348;
}
.ha-tui__note .cal-tag {
  font-size: 11px;
  padding: 3px 9px;
}
.ha-tui__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 14px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(16, 42, 76, .08);
}
.ha-tui__table th,
.ha-tui__table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(16, 42, 76, .06);
}
.ha-tui__table th {
  font-size: 12px;
  color: #8a8176;
  font-weight: 600;
  background: #f7f4ee;
}
.ha-tui__table td { color: var(--ha-navy); font-weight: 500; }
.ha-tui__table tr.is-warn td { background: rgba(185, 60, 40, .06); }
.ha-tui__table tr.is-warn td:nth-child(2) {
  color: #b93c28;
  font-weight: 700;
}
.ha-tui__table tr:last-child td { border-bottom: 0; }
.ha-tui__hot b {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ha-navy);
}
.ha-tui__hot div { display: flex; flex-wrap: wrap; gap: 8px; }
.ha-tui__hot em {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(199, 164, 93, .18);
  color: #8a6a2f;
}
.ha-tui__cap {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #6a6258;
  text-align: center;
}
@media (max-width: 720px) {
  .ha-folder__body { min-height: 560px; }
  .ha-folder.is-open .ha-folder__cover { transform: rotateY(-105deg); }
  .ha-tflow__viewport { min-height: 460px; }
  .ha-tflow__tab { font-size: 13px; padding: 9px 8px; }
  .ha-tui__shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .ha-tui__side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(16, 42, 76, .08);
  }
  .ha-tui__side p { margin: 0 8px 0 0; }
  .ha-tui__week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ha-tui__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ha-tui__head b { font-size: 16px; }
}
.ha-finale h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ha-navy);
  font-optical-sizing: auto;
}
.ha-finale h2 .ha-line:nth-child(even) {
  color: var(--ha-orange);
}
.ha-finale .ha-lead {
  margin: 0 auto;
  max-width: 42ch;
  color: #5c5c62;
}
.ha-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 48px auto 0;
  max-width: 720px;
}
.ha-stats strong {
  display: block;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ha-navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ha-stats span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ha-muted);
}
.ha-finale {
  padding: clamp(64px, 9vw, 100px) 0 clamp(80px, 11vw, 120px);
  background: var(--ha-surface);
  text-align: center;
}
.ha-finale .ha-cta { justify-content: center; }

/* Rank Desk feature panel — mirrors /rankings homepage */
.ha-rank {
  background:
    linear-gradient(rgba(7, 25, 47, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 25, 47, .045) 1px, transparent 1px),
    #e8edf2;
  background-size: 28px 28px, 28px 28px, auto;
  color: #07192f;
  text-align: left;
}
.ha-rank__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.58fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  width: 100%;
}
.ha-rank__copy {
  max-width: min(22rem, 100%);
  justify-self: start;
}
.ha-rank .ha-eyebrow {
  font-size: 17px;
  letter-spacing: .04em;
}
.ha-rank h2 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.12;
  color: var(--ha-navy);
}
.ha-rank h2 .ha-line:nth-child(even) { color: var(--ha-orange); }
.ha-rank .ha-lead {
  margin: 0 0 18px;
  max-width: 34ch;
  color: #5c6470;
}
.ha-rank__stage { min-width: 0; justify-self: stretch; }
.ha-rd {
  --rd-ink: #07192f;
  --rd-muted: #64748b;
  --rd-line: #c5d0dc;
  --rd-panel: #f4f7fa;
  --rd-gold: #c7a45d;
  border: 1px solid var(--rd-line);
  background: #e8edf2;
  box-shadow: 4px 4px 0 rgba(7, 25, 47, .06);
  overflow: hidden;
}
.ha-rd__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  background: #07192f;
  color: #e8edf2;
}
.ha-rd__top b { font-size: 14px; font-weight: 700; }
.ha-rd__top > em {
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rd-gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ha-rd__top nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  font-size: 12px;
}
.ha-rd__top nav span {
  padding: 4px 8px;
  color: rgba(232, 237, 242, .72);
}
.ha-rd__top nav span.is-on {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.ha-rd__live {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #07192f;
  color: #e8edf2;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.ha-rd__live strong {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--rd-gold);
  font-family: ui-monospace, Menlo, monospace;
}
.ha-rd__live > em {
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 255, 255, .4);
  font-family: ui-monospace, Menlo, monospace;
  white-space: nowrap;
}
.ha-rd__ticker {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.ha-rd__track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: ha-rd-ticker 28s linear infinite;
  font-size: 12px;
  font-family: ui-monospace, Menlo, monospace;
  color: rgba(232, 237, 242, .85);
}
.ha-rd__track span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.ha-rd__track i {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  flex-shrink: 0;
}
@keyframes ha-rd-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ha-rd__track { animation: none; }
}
.ha-rd__desk {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: 12px;
  padding: 12px;
}
.ha-rd__panel {
  background: var(--rd-panel);
  border: 1px solid var(--rd-line);
  box-shadow: 2px 2px 0 rgba(7, 25, 47, .06);
  min-width: 0;
}
.ha-rd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rd-line);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rd-muted);
}
.ha-rd__head em {
  font-style: normal;
  color: var(--rd-gold);
  font-family: ui-monospace, Menlo, monospace;
}
.ha-rd__search-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.ha-rd__search-body h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--rd-ink);
}
.ha-rd__search-body > p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--rd-muted);
}
.ha-rd__input {
  border: 1px solid var(--rd-ink);
  background: #fff;
  padding: 12px 14px;
  font-size: 13px;
  color: #94a3b8;
}
.ha-rd__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ha-rd__btn,
.ha-rd__ghost {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
}
.ha-rd__btn {
  background: var(--rd-ink);
  color: #fff;
  border: 1px solid var(--rd-ink);
}
.ha-rd__ghost {
  background: transparent;
  color: var(--rd-ink);
  border: 1px solid var(--rd-ink);
}
.ha-rd__hots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--rd-muted);
}
.ha-rd__hots b {
  color: var(--rd-gold);
  font-family: ui-monospace, Menlo, monospace;
  margin-right: 4px;
}
.ha-rd__tracks { position: relative; overflow: hidden; }
.ha-rd__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ha-rd__tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rd-line);
}
.ha-rd__tabs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rd-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.ha-rd__tabs label i {
  width: 8px;
  height: 8px;
  border-radius: 1px;
}
.ha-rd__tabs em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rd-muted);
  font-family: ui-monospace, Menlo, monospace;
  padding: 0 6px;
}
.ha-rd__pane { display: none; }
.ha-rd__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(7, 25, 47, .06);
  font-size: 11px;
  color: var(--rd-muted);
  font-family: ui-monospace, Menlo, monospace;
}
.ha-rd__row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(7, 25, 47, .06);
  font-size: 13px;
}
.ha-rd__row:last-child { border-bottom: 0; }
.ha-rd__row b {
  color: var(--rd-gold);
  font-family: ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}
.ha-rd__row span {
  font-weight: 500;
  color: var(--rd-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ha-rd__row em {
  font-style: normal;
  font-size: 10px;
  color: var(--rd-muted);
  font-family: ui-monospace, Menlo, monospace;
}
#ha-track-qs:checked ~ .ha-rd__tabs label[for="ha-track-qs"],
#ha-track-the:checked ~ .ha-rd__tabs label[for="ha-track-the"],
#ha-track-arwu:checked ~ .ha-rd__tabs label[for="ha-track-arwu"],
#ha-track-usnews:checked ~ .ha-rd__tabs label[for="ha-track-usnews"] {
  color: var(--rd-ink);
  border-bottom-color: var(--rd-ink);
}
#ha-track-qs:checked ~ .ha-rd__pane--qs,
#ha-track-the:checked ~ .ha-rd__pane--the,
#ha-track-arwu:checked ~ .ha-rd__pane--arwu,
#ha-track-usnews:checked ~ .ha-rd__pane--usnews {
  display: block;
}
@media (max-width: 960px) {
  .ha-rank__inner { grid-template-columns: 1fr; }
  .ha-rank__copy {
    max-width: 100%;
    text-align: center;
    margin-inline: auto;
  }
  .ha-rank .ha-lead { margin-inline: auto; }
  .ha-rd__desk { grid-template-columns: 1fr; }
  .ha-rd__live > em { display: none; }
}

/* AI capability matrix — tech blue + silver type */
.ha-ai {
  text-align: center;
  color: #e8eef7;
  background:
    radial-gradient(720px 360px at 18% 12%, rgba(56, 189, 248, .22), transparent 58%),
    radial-gradient(640px 320px at 88% 78%, rgba(99, 102, 241, .2), transparent 55%),
    linear-gradient(165deg, #061428 0%, #0a1f3d 42%, #0c2748 100%);
}
.ha-ai__inner {
  width: min(980px, 100%);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}
.ha-ai__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #7dd3fc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ha-ai h2 {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.12;
  color: #f4f7fb;
}
.ha-ai h2 .ha-line:nth-child(even) {
  color: #c7d7ea;
}
.ha-ai__lead {
  margin: 0 auto 36px;
  max-width: 40ch;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(226, 232, 240, .78);
}
.ha-ai__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}
.ha-ai__card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 20px 18px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid rgba(186, 210, 235, .28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .12) inset,
    0 16px 32px rgba(0, 0, 0, .18);
  transition: transform .28s var(--ease-out, ease), border-color .28s ease, background .28s ease;
}
.ha-ai__card:nth-child(4) { grid-column: 2 / span 2; }
.ha-ai__card:nth-child(5) { grid-column: 4 / span 2; }
.ha-ai__card em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #7dd3fc;
  font-family: ui-monospace, Menlo, monospace;
}
.ha-ai__card b {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #f8fafc;
}
.ha-ai__card span {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(203, 213, 225, .82);
}
@media (hover: hover) {
  .ha-ai__card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 211, 252, .55);
    background: linear-gradient(165deg, rgba(255, 255, 255, .14), rgba(125, 211, 252, .08));
  }
}
.ha-ai__note {
  margin: 28px auto 0;
  max-width: 36ch;
  font-size: 14px;
  color: rgba(186, 210, 235, .72);
}
.ha-ai__cta {
  justify-content: center;
  margin-top: 22px;
}
.ha-ai .home-btn--primary {
  background: linear-gradient(180deg, #e8f1fb 0%, #c7d7ea 100%);
  color: #061428;
  border: 0;
  box-shadow: 0 10px 24px rgba(125, 211, 252, .22);
}
.ha-ai .home-btn--ghost {
  background: transparent;
  color: #e8eef7;
  border-color: rgba(186, 210, 235, .4);
}
@media (hover: hover) {
  .ha-ai .home-btn--primary:hover {
    background: #fff;
    color: #061428;
  }
  .ha-ai .home-btn--ghost:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(226, 232, 240, .7);
  }
}
@media (max-width: 860px) {
  .ha-ai__grid { grid-template-columns: 1fr; }
  .ha-ai__card,
  .ha-ai__card:nth-child(4),
  .ha-ai__card:nth-child(5) {
    grid-column: auto;
    min-height: 0;
  }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .ha-ai__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* MacBook frame */
.ha-mbp {
  position: relative;
  width: min(100%, 640px);
  margin: 0 auto;
  filter: drop-shadow(0 32px 56px rgba(7, 25, 47, .22));
}
.ha-mbp--md { width: min(100%, 640px); }
.ha-mbp__lid {
  position: relative;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #4a4a4c 0%, #2a2a2c 40%, #1a1a1c 100%);
  padding: 12px 12px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.ha-mbp__bezel {
  position: relative;
  border-radius: 10px 10px 0 0;
  background: #0a0a0b;
  padding: 14px 11px 11px;
  overflow: hidden;
}
.ha-mbp__camera {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3a3a3c, #111 70%);
  box-shadow: 0 0 0 1px #000;
}
.ha-mbp__chin {
  height: 14px;
  background: linear-gradient(180deg, #2f2f31, #171719);
  border-radius: 0 0 3px 3px;
  position: relative;
}
.ha-mbp__chin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 18%;
  height: 4px;
  margin-left: -9%;
  border-radius: 2px;
  background: #0c0c0d;
}
.ha-mbp__base {
  height: 14px;
  margin: 0 -3.5%;
  border-radius: 0 0 12px 12px;
  background:
    linear-gradient(180deg, #d8d8dc 0%, #b4b4b8 42%, #9a9a9f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 8px 18px -10px rgba(0, 0, 0, .35);
  position: relative;
}
.ha-mbp__base::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: rgba(0, 0, 0, .12);
}
.ha-mbp--on-dark {
  filter: drop-shadow(0 32px 64px rgba(0, 0, 0, .5));
}

.ha-screen {
  border-radius: 6px;
  background: #f5f5f7;
  min-height: 280px;
  overflow: hidden;
  color: var(--ha-ink);
}
.ha-screen__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  font-size: 11px;
  font-weight: 600;
  color: var(--ha-muted);
}
.ha-screen__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d2d2d7;
}
.ha-screen__bar span:nth-child(1) { background: #ff5f57; }
.ha-screen__bar span:nth-child(2) { background: #febc2e; }
.ha-screen__bar span:nth-child(3) { background: #28c840; }
.ha-screen__bar b { margin-left: 8px; font-weight: 600; color: var(--ha-ink); }
.ha-screen__bar--dark {
  background: rgba(16, 42, 76, .92);
  border-bottom-color: rgba(255, 255, 255, .08);
  color: rgba(245, 245, 247, .7);
}
.ha-screen__bar--dark b { color: #f5f5f7; }

.ha-screen--hub { min-height: 320px; }
.ha-screen__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}
.ha-chip {
  border-radius: 14px;
  padding: 14px 14px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .05);
  min-height: 108px;
}
.ha-chip em {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ha-faint);
  margin-bottom: 8px;
}
.ha-chip strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.ha-chip small {
  font-size: 11px;
  color: var(--ha-muted);
}
.ha-chip--navy {
  background: linear-gradient(160deg, #16345c, #07192f);
  color: #f5f5f7;
  border: 0;
}
.ha-chip--navy em { color: rgba(241, 211, 138, .85); }
.ha-chip--navy small { color: rgba(245, 245, 247, .7); }
.ha-chip--warm {
  background: linear-gradient(160deg, #fff8ef, #f7ead3);
  border-color: rgba(199, 164, 93, .28);
}
.ha-chip--warm em { color: #8a6a2f; }
.ha-chip--soft { background: #fff; }

.ha-screen--ielts {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  background: #e8eef4;
}
.ha-mix {
  display: grid;
  grid-template-columns: minmax(108px, 0.34fr) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.ha-mix__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 8px 10px;
  background: #f3f5f8;
  border-right: 1px solid #c9d4e2;
  overflow: hidden;
}
.ha-mix__sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #102a4c;
  letter-spacing: -.01em;
}
.ha-mix__sec-h em {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #8a93a3;
  border-bottom: 1.5px solid #8a93a3;
  transform: rotate(-45deg);
  font-style: normal;
  margin-right: 2px;
}
.ha-mix__sec.is-open .ha-mix__sec-h {
  background: #fff;
  color: #07192f;
  box-shadow: 0 0 0 1px rgba(7, 25, 47, .06);
}
.ha-mix__sec.is-open .ha-mix__sec-h em {
  transform: rotate(45deg);
  border-color: var(--ha-orange);
}
.ha-mix__parts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px 8px 6px;
}
.ha-mix__part {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  color: #5f6673;
}
.ha-mix__part i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1.5px solid #b7c4d6;
  background: #fff;
  flex: none;
  position: relative;
}
.ha-mix__part.is-on {
  background: rgba(232, 145, 58, .12);
  color: #07192f;
}
.ha-mix__part.is-on i {
  border-color: var(--ha-orange);
  background: var(--ha-orange);
}
.ha-mix__part.is-on i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(40deg);
}
.ha-mix__hint {
  margin: auto 4px 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: #07192f;
  color: #f1d38a;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.3;
}
.ha-mix__exam {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #e8eef4;
}
.ha-mix__exam .ha-exam__q {
  margin: 8px;
  flex: 1;
}

.ha-screen--vocab {
  display: flex;
  flex-direction: column;
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  position: relative;
  overflow: hidden;
  background: #f5f5f7;
}
.ha-vocab-list {
  padding: 10px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ha-vocab-list > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  margin-bottom: 4px;
  background: #fff;
  border: 1px solid transparent;
}
.ha-vocab-list b { font-size: 13px; letter-spacing: -.01em; }
.ha-vocab-list span { font-size: 12px; color: var(--ha-muted); }
.ha-vocab-list em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #34c759;
  width: 16px;
  text-align: center;
}
.ha-vocab-list .is-now {
  border-color: rgba(232, 145, 58, .35);
  background: #fff8ef;
  box-shadow: 0 0 0 1px rgba(232, 145, 58, .12);
}
.ha-vocab-list .is-now em { color: var(--ha-orange); }
.ha-vocab-list .is-done em { color: #34c759; }

/* —— Vocab feature tour (no cursor) —— */
.ha-vtour {
  position: relative;
  width: 100%;
}
.ha-feature__stage {
  overflow: visible;
}
.ha-vscene {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.ha-vlib {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px 10px 0;
}
.ha-vlib__tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}
.ha-vlib__tags em {
  flex: none;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 980px;
  background: #fff;
  color: #5f6673;
  border: 1px solid rgba(0, 0, 0, .06);
}
.ha-vlib__tags em.is-on {
  background: var(--ha-navy);
  color: #fff;
  border-color: transparent;
}
.ha-vlib__rail {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 88%, transparent);
}
.ha-vlib__track {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ha-vlib__track > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .05);
}
.ha-vlib__track b { font-size: 12px; color: #1d1d1f; }
.ha-vlib__track span { font-size: 11px; color: #6e6e73; }
.ha-vtour.is-scrolling .ha-vlib__track {
  animation: ha-vlib-scroll 9s linear infinite;
}
@keyframes ha-vlib-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ha-vtour.is-scrolling .ha-vlib__track { animation: none; }
}

.ha-screen--cal {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 380px;
  max-height: none;
  overflow: hidden;
  background: transparent;
  color: #1d1d1f;
  position: relative;
}
/* Physical desk planner (no Mac) */
.ha-planner {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding-top: 18px;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, .35));
}
.ha-planner__rings {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.ha-planner__rings i {
  width: 14px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a9099 0%, #d7dbe2 35%, #f3f5f7 50%, #b7bec7 70%, #6e757e 100%);
  box-shadow:
    0 2px 3px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .55);
}
.ha-planner__cover {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 22px 22px 14px;
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(255, 255, 255, .08), transparent 50%),
    linear-gradient(165deg, #1f334d 0%, #102a4c 55%, #0a1c33 100%);
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 0;
}
.ha-planner__cover span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(241, 211, 138, .85);
  font-family: ui-monospace, Menlo, monospace;
}
.ha-planner__cover b {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: .02em;
}
.ha-planner__cover em {
  margin-left: auto;
  font-style: normal;
  font-size: 13px;
  color: rgba(245, 245, 247, .7);
}
.ha-planner__page.ha-screen--cal {
  position: relative;
  z-index: 2;
  border-radius: 0 0 10px 10px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(120, 90, 50, .03) 0 1px,
      transparent 1px 28px
    ),
    linear-gradient(180deg, #fffcf7 0%, #f4ebe0 100%);
  border: 1px solid rgba(120, 90, 50, .18);
  border-top: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    0 1px 0 rgba(255, 255, 255, .2);
}
.ha-feature--dark .ha-planner__page.ha-screen--cal {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    0 18px 40px rgba(0, 0, 0, .28);
}
/* Compact real calendar chrome inside Mac — same classes as dashboard */
.ha-screen--cal .ha-cal-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  overflow: hidden;
}
.ha-screen--cal .cal-toolbar {
  margin: 0 0 10px;
  gap: 8px;
  align-items: center;
}
.ha-screen--cal .teacher-filters { gap: 6px; }
.ha-screen--cal .teacher-filter {
  pointer-events: none;
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 999px;
}
.ha-screen--cal .cal-toolbar__acts .btn {
  pointer-events: none;
  min-height: 0;
  padding: 4px 10px;
  font-size: 12px;
}
.ha-screen--cal .ha-cal-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.ha-screen--cal .ha-cal-stats .teacher-stat {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}
.ha-screen--cal .ha-cal-stats .teacher-stat b {
  font-size: 20px;
  line-height: 1.1;
  color: #102a4c;
}
.ha-screen--cal .ha-cal-stats .teacher-stat span {
  font-size: 11px;
  color: #5f6673;
}
.ha-screen--cal .cal-view {
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.ha-screen--cal .ha-cal-week {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 252, 247, .92);
  border: 1px solid var(--border, #e6dfd0);
}
.ha-screen--cal .cal-month__nav {
  margin-bottom: 10px;
}
.ha-screen--cal .cal-month__nav strong {
  font-size: 14px;
  color: #102a4c;
}
.ha-screen--cal .cal-month__nav .btn {
  min-height: 0;
  padding: 4px 10px;
  font-size: 13px;
  pointer-events: none;
}
.ha-screen--cal .cal-week__grid {
  flex: 1;
  min-height: 0;
  gap: 8px;
}
.ha-screen--cal .cal-week__day {
  min-height: 0;
  padding: 8px 7px;
  border-radius: 10px;
  transition:
    transform .28s var(--ease-out),
    border-color .28s ease,
    box-shadow .28s ease,
    background-color .28s ease;
}
.ha-screen--cal .cal-week__head {
  margin-bottom: 6px;
  font-size: 11px;
}
.ha-screen--cal .cal-week__head b {
  font-size: 13px;
  color: #102a4c;
}
.ha-screen--cal .profile-hint {
  margin: 0;
  font-size: 11px;
  color: #9aa3b2;
}
.ha-screen--cal .cal-month__chip {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 5px;
  pointer-events: none;
}
.ha-screen--cal .cal-week__day.is-scan {
  border-color: rgba(199, 164, 93, .55);
  background: #fffdf8;
  box-shadow: 0 0 0 1px rgba(199, 164, 93, .2);
}
.ha-screen--cal .cal-week__day.is-pick {
  border-color: #102a4c;
  background: #fff;
  transform: scale(1.04);
  box-shadow: 0 8px 18px rgba(7, 25, 47, .16);
  z-index: 2;
}
.ha-cal-pop {
  position: absolute;
  inset: 52px 16px 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  pointer-events: none;
  background: transparent;
  border-radius: 0;
  transition:
    opacity .45s cubic-bezier(.22, 1, .36, 1),
    transform .5s cubic-bezier(.22, 1, .36, 1);
}
.ha-cal-pop.is-on {
  opacity: 1;
  transform: none;
}
.ha-cal-pop .cal-modal__panel {
  width: min(92%, 360px);
  max-height: min(100%, 280px);
  overflow: auto;
  padding: 14px 16px 16px;
  border-radius: 10px;
  background: #fffcf7;
  border: 1px solid rgba(120, 90, 50, .2);
  box-shadow: 0 16px 36px rgba(7, 25, 47, .22);
}
.ha-cal-pop .cal-modal__head {
  margin-bottom: 8px;
  gap: 6px;
}
/* Beat .ha-feature h2 / keynote clamp so mock title stays UI-sized */
.ha-feature .ha-cal-pop .cal-modal__head h2,
.home-apple-keynote .ha-feature .ha-cal-pop .cal-modal__head h2 {
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: #102a4c;
}
.ha-cal-pop .cal-modal__x {
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}
.ha-cal-pop .cal-detail p {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.45;
}
.ha-cal-pop .cal-tag,
.ha-cal-pop .cal-status-pill {
  font-size: 10px;
  padding: 2px 8px;
}
.ha-cal-pop .cal-detail h3 {
  margin: 8px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #102a4c;
}
.ha-cal-pop .cal-card__meta {
  color: #5f6673;
}
.ha-cal-pop .cal-ex-list { gap: 6px; }
.ha-cal-pop .cal-ex-row {
  padding: 8px 10px;
  font-size: 12px;
  gap: 8px;
  border-radius: 8px;
}
.ha-cal-pop .cal-ex-row b { font-size: 12px; }
.ha-cal-pop .btn {
  pointer-events: none;
  min-height: 0;
  padding: 6px 10px;
  font-size: 11px;
}
@media (prefers-reduced-motion: reduce) {
  .ha-screen--cal .cal-week__day,
  .ha-cal-pop { transition: none; }
  .ha-cal-pop { opacity: 1; transform: none; }
  .ha-screen--cal .cal-week__day[data-cal-day="3"] {
    border-color: #102a4c;
    box-shadow: 0 8px 18px rgba(7, 25, 47, .16);
  }
}

/* Motion: slightly richer reveal on home */
.home-apple-page .reveal {
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.home-apple-page .reveal.is-visible {
  transform: none;
}
.home-apple-page .ha-hero__stage.reveal {
  transform: translateY(36px) scale(.98);
}
.home-apple-page .ha-hero__stage.reveal.is-visible {
  transform: none;
}
@media (prefers-reduced-transparency: reduce) {
  .home-apple-page .home-chrome-bar {
    background: #f5f5f7;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-apple-page .reveal,
  .home-apple-page .ha-hero__stage.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 960px) {
  .ha-hero__inner,
  .ha-feature__inner,
  .ha-feature--flip .ha-feature__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .ha-feature--flip .ha-feature__copy,
  .ha-feature--flip .ha-feature__stage { order: unset; }
  .ha-hero { text-align: center; }
  .ha-hero .ha-lead { margin-left: auto; margin-right: auto; }
  .ha-hero .ha-cta { justify-content: center; }
  .ha-feature__copy {
    text-align: center;
    justify-self: center;
    max-width: 28em;
  }
  .ha-feature__stage,
  .ha-feature--flip .ha-feature__stage {
    justify-self: center;
  }
  .ha-feature--flip .ha-feature__copy { justify-self: center; }
  .ha-feature .ha-lead { margin-left: auto; margin-right: auto; }
  .ha-mbp, .ha-mbp--md { width: min(100%, 480px); }
  .ha-screen--hub { min-height: 260px; }
}
@media (max-width: 640px) {
  .ha-stats { grid-template-columns: 1fr; gap: 28px; }
  .ha-screen__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ha-chip { min-height: 96px; padding: 12px; }
  .ha-chip strong { font-size: 13px; }
  .home-apple-page .ha-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .home-apple-page .home-btn { width: 100%; }
}

/* —— Auth pages on Apple home chrome —— */
.home-apple-page .auth-main {
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 96px);
}
.home-apple-page .auth-layout {
  max-width: 960px;
  gap: clamp(24px, 4vw, 40px);
  align-items: stretch;
}
.home-apple-page .auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 40px);
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(420px 240px at 88% 8%, rgba(232, 145, 58, .16), transparent 60%),
    linear-gradient(165deg, #102a4c 0%, #07192f 100%);
  box-shadow: 0 24px 48px -28px rgba(7, 25, 47, .45);
}
.home-apple-page .auth-aside__logo { display: none; }
.home-apple-page .auth-aside__eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #f1d38a;
}
.home-apple-page .auth-aside__title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.12;
  color: #fff;
}
.home-apple-page .auth-aside__desc {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(245, 245, 247, .72);
  max-width: 32ch;
}
.home-apple-page .auth-aside__points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(245, 245, 247, .88);
  font-size: 14px;
  line-height: 1.35;
}
.home-apple-page .auth-aside__points li {
  position: relative;
  padding: 10px 0 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.home-apple-page .auth-aside__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--ha-orange, #e8913a);
}
.home-apple-page .auth-card {
  max-width: none;
  margin: 0;
  padding: clamp(28px, 4vw, 36px);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(7, 25, 47, .18);
}
.home-apple-page .auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 980px;
  background: rgba(0, 0, 0, .04);
  border: 0;
}
.home-apple-page .auth-tabs__item {
  border: 0;
  border-radius: 980px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ha-muted, #6e6e73);
  background: transparent;
}
.home-apple-page .auth-tabs__item.is-active {
  color: var(--ha-ink, #1d1d1f);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.home-apple-page .auth-card__title {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: clamp(1.6rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ha-ink, #1d1d1f);
}
.home-apple-page .auth-card__desc {
  color: var(--ha-muted, #6e6e73);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 22px;
}
.home-apple-page .auth-field span {
  font-size: 13px;
  font-weight: 500;
  color: var(--ha-muted, #6e6e73);
}
.home-apple-page .auth-field input {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  background: #fafafa;
  color: var(--ha-ink, #1d1d1f);
}
.home-apple-page .auth-field input:focus-visible {
  background: #fff;
  border-color: var(--ha-orange, #e8913a);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ha-orange, #e8913a) 22%, transparent);
}
.home-apple-page .auth-form .btn--primary {
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 980px;
  background: var(--ha-orange, #e8913a);
  color: #fff;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 8px 20px -10px rgba(232, 145, 58, .65);
}
.home-apple-page .auth-form .btn--primary:hover {
  background: var(--ha-orange-dark, #c77828);
  border-color: transparent;
}
.home-apple-page .auth-form .btn--primary:active {
  transform: scale(0.98);
}
.home-apple-page .auth-field--row .btn--ghost {
  border-radius: 980px;
  border-color: rgba(0, 0, 0, .12);
  color: var(--ha-ink, #1d1d1f);
  background: #fff;
  font-weight: 600;
}
.home-apple-page .auth-field--row .btn--ghost:hover {
  border-color: rgba(0, 0, 0, .2);
  color: var(--ha-ink, #1d1d1f);
  background: #fff;
}
.home-apple-page .auth-forgot a,
.home-apple-page .auth-legal a {
  color: var(--ha-orange, #e8913a);
  font-weight: 500;
  text-decoration: none;
}
.home-apple-page .auth-forgot a:hover,
.home-apple-page .auth-legal a:hover {
  color: var(--ha-orange-dark, #c77828);
}
.home-apple-page .auth-legal {
  color: var(--ha-faint, #86868b);
}
@media (max-width: 720px) {
  .home-apple-page .auth-layout { grid-template-columns: 1fr; }
  .home-apple-page .auth-aside { order: 0; min-height: auto; }
  .home-apple-page .auth-card { order: 1; }
}

/* —— Home keynote: full-viewport panels + snap —— */
html:has(.home-apple-keynote) {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
}
.home-apple-keynote {
  --ha-top: 62px;
}
/* More side air so copy isn't glued to the viewport edge */
.home-apple-keynote .home-apple .minimal-shell,
.home-apple-keynote .ha-panel > .minimal-shell {
  width: min(1080px, calc(100% - clamp(48px, 10vw, 160px)));
}
.home-apple-keynote .ha-panel {
  position: relative;
  box-sizing: border-box;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--ha-top) + 28px) 0 48px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
/* ponytail: let AI panel pass through so footer (备案/投诉) can rest in view */
.home-apple-keynote .ha-ai.ha-panel {
  scroll-snap-stop: normal;
}
.home-apple-keynote .home-chrome-footer {
  scroll-snap-align: end;
  scroll-snap-stop: always;
}
.home-apple-keynote .ha-hero,
.home-apple-keynote .ha-feature:not(.ha-feature--cdt),
.home-apple-keynote .ha-teacher,
.home-apple-keynote .ha-rank,
.home-apple-keynote .ha-ai {
  padding-top: calc(var(--ha-top) + 28px);
  padding-bottom: 48px;
}
.home-apple-keynote .ha-hero__inner,
.home-apple-keynote .ha-feature__inner {
  width: 100%;
  align-items: center;
  gap: clamp(20px, 2.8vw, 40px);
  padding-inline: clamp(4px, 1vw, 12px);
  /* Give Mac the same visual weight as hero */
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.38fr);
}
.home-apple-keynote .ha-feature--flip .ha-feature__inner {
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 0.82fr);
}
.home-apple-keynote .ha-teacher__inner {
  width: 100%;
  padding-inline: clamp(8px, 2vw, 24px);
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.58fr);
}
.home-apple-keynote .ha-rank__inner {
  width: 100%;
  padding-inline: clamp(8px, 2vw, 24px);
}
.home-apple-keynote .ha-hero__copy,
.home-apple-keynote .ha-feature__copy {
  max-width: min(22rem, 100%);
}
.home-apple-keynote .ha-feature__copy {
  justify-self: start;
}
.home-apple-keynote .ha-feature--flip .ha-feature__copy {
  justify-self: end;
}
.home-apple-keynote .ha-feature__stage,
.home-apple-keynote .ha-hero__stage {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}
.home-apple-keynote .ha-hero h1,
.home-apple-keynote .ha-feature h2 {
  /* Match hero scale so feature panels feel like the first screen */
  font-size: clamp(2rem, 7.2vw, 4.6rem);
  line-height: 1.08;
}
/* Longer vocab lines: keep serif rhythm, shrink so 8-char line stays one row */
.home-apple-keynote .ha-feature__copy--vocab {
  max-width: min(28rem, 100%);
}
.ha-feature__copy--vocab .ha-eyebrow {
  font-size: 17px;
  letter-spacing: .04em;
}
.home-apple-keynote #ha-vocab-title {
  font-size: clamp(1.55rem, 3.6vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -.015em;
}
.home-apple-keynote .ha-teacher h2,
.home-apple-keynote .ha-rank h2,
.home-apple-keynote .ha-ai h2 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
}
.home-apple-keynote .ha-feature .ha-lead {
  font-size: 19px;
  max-width: 34ch;
}
.home-apple-keynote .ha-lead {
  max-width: 34ch;
}
.home-apple-keynote .ha-mbp,
.home-apple-keynote .ha-mbp--md {
  width: 100%;
  max-width: 760px;
  margin-inline: 0;
}
.home-apple-keynote .ha-feature__stage .ha-mbp {
  max-width: none;
}
.home-apple-keynote .ha-screen--hub,
.home-apple-keynote .ha-screen--demo,
.home-apple-keynote .ha-screen--ielts,
.home-apple-keynote .ha-screen--tasks {
  min-height: 360px;
}
.home-apple-keynote .ha-screen--vocab {
  height: 360px;
  min-height: 360px;
  max-height: 360px;
}
.home-apple-keynote .ha-screen--cal,
.home-apple-keynote .ha-planner__page.ha-screen--cal {
  height: auto;
  min-height: 420px;
  max-height: none;
}
.home-apple-keynote .ha-planner {
  max-width: none;
}

/* Stronger keynote entrance */
.home-apple-keynote .reveal {
  opacity: 0;
  transform: translateY(48px) scale(.985);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.home-apple-keynote .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.home-apple-keynote .ha-feature__stage.reveal,
.home-apple-keynote .ha-hero__stage.reveal {
  transform: translateY(56px) scale(.94);
  transition: opacity 1s var(--ease-out), transform 1.05s var(--ease-out);
}
.home-apple-keynote .ha-feature__stage.reveal.is-visible,
.home-apple-keynote .ha-hero__stage.reveal.is-visible {
  transform: none;
}

.ha-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .04);
  color: var(--ha-muted, #6e6e73);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.ha-scroll-cue span {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  animation: ha-cue-bob 1.6s var(--ease-out) infinite;
}
@media (hover: hover) {
  .ha-scroll-cue:hover {
    background: rgba(0, 0, 0, .08);
    transform: translateY(2px);
  }
}
.ha-scroll-cue:active { transform: scale(.96); }
@keyframes ha-cue-bob {
  0%, 100% { transform: rotate(45deg) translate(-2px, -4px); opacity: .55; }
  50% { transform: rotate(45deg) translate(-2px, 2px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.home-apple-keynote) { scroll-snap-type: none; }
  .home-apple-keynote .reveal,
  .home-apple-keynote .ha-feature__stage.reveal,
  .home-apple-keynote .ha-hero__stage.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ha-scroll-cue span { animation: none; }
}
@media (max-width: 960px) {
  .home-apple-keynote .ha-panel {
    min-height: 100dvh;
    justify-content: center;
    padding-top: calc(var(--ha-top) + 24px);
    padding-bottom: 64px;
  }
  .home-apple-keynote .ha-hero__inner,
  .home-apple-keynote .ha-feature__inner,
  .home-apple-keynote .ha-teacher__inner,
  .home-apple-keynote .ha-rank__inner {
    padding-inline: clamp(16px, 5vw, 32px);
    gap: 28px;
  }
  .home-apple-keynote .ha-teacher__inner {
    grid-template-columns: 1fr;
  }
  .home-apple-keynote .ha-teacher__copy {
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
    justify-self: center;
  }
  .home-apple-keynote .ha-teacher .ha-lead {
    margin-inline: auto;
  }
  .home-apple-keynote .ha-teacher .ha-text-link {
    justify-content: center;
  }
  .home-apple-keynote .ha-tflow__tabs {
    justify-content: center;
  }
  .home-apple-keynote .ha-hero__copy,
  .home-apple-keynote .ha-feature__copy {
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
    justify-self: center;
  }
  .home-apple-keynote .ha-lead {
    margin-inline: auto;
    max-width: 28em;
  }
  .home-apple-keynote .ha-cta {
    justify-content: center;
  }
  .home-apple-keynote .ha-hero h1,
  .home-apple-keynote .ha-feature h2 {
    font-size: clamp(2rem, 9.5vw, 2.75rem);
  }
  .home-apple-keynote #ha-vocab-title {
    font-size: clamp(1.35rem, 6.2vw, 2rem);
  }
  .home-apple-keynote .ha-teacher h2,
  .home-apple-keynote .ha-rank h2,
  .home-apple-keynote .ha-ai h2 {
    font-size: clamp(1.5rem, 6.5vw, 2.2rem);
  }
  .home-apple-keynote .ha-mbp,
  .home-apple-keynote .ha-mbp--md {
    width: min(100%, 380px);
  }
  .home-apple-keynote .ha-screen,
  .home-apple-keynote .ha-screen--hub,
  .home-apple-keynote .ha-screen--tasks {
    min-height: 200px;
  }
  /* ponytail: tall forms on small screens — snap still helps, content can grow */
  .home-apple-keynote .ha-panel {
    scroll-snap-stop: normal;
  }
}

/* —— Hero product tour (JS-driven, ~60s) —— */
.ha-screen--demo {
  position: relative;
  min-height: 320px;
  background: #f5f5f7;
  overflow: hidden;
}
.home-apple-keynote .ha-screen--demo { min-height: 360px; }
.ha-demo {
  position: relative;
  height: 100%;
  min-height: inherit;
}
.ha-demo__scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(.985);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
  pointer-events: none;
  overflow: hidden;
}
.ha-demo__scene.is-active {
  opacity: 1;
  transform: none;
  z-index: 1;
}
.ha-demo__scene[data-scene="hub"] .ha-screen__grid {
  height: calc(100% - 36px);
}
.ha-chip.is-hot,
.ha-menu__item.is-hot {
  box-shadow: 0 0 0 2px rgba(232, 145, 58, .55);
  transform: scale(1.02);
  z-index: 2;
}
.ha-chip {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.ha-menu {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f5f5f7;
}
.ha-menu__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px 8px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.ha-menu__bar b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #1d1d1f;
}
.ha-menu__bar em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #e8913a;
}
.ha-menu__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  flex: 1;
  align-content: start;
}
.ha-menu__list--5 { grid-template-columns: 1fr; }
.ha-menu__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.ha-menu__list--5 .ha-menu__item {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
}
.ha-menu__item b {
  font-size: 12px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -.01em;
}
.ha-menu__item span {
  font-size: 10px;
  color: #6e6e73;
}
.ha-menu__item--feature {
  background: linear-gradient(145deg, #16345c, #07192f);
  border-color: transparent;
}
.ha-menu__item--feature b { color: #fff; }
.ha-menu__item--feature span { color: #f1d38a; }
.ha-menu__item--feature.is-hot {
  box-shadow: 0 0 0 2px rgba(241, 211, 138, .7);
}

.ha-exam {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-size: 11px;
  color: #102a4c;
  background: #e8eef4;
}
.ha-exam__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #07192f;
  color: #f5f5f7;
  font-size: 10px;
}
.ha-exam__top b { font-weight: 650; }
.ha-exam__top em { font-style: normal; color: #f1d38a; font-variant-numeric: tabular-nums; }
.ha-exam__nums {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #dfe7f0;
  border-bottom: 1px solid #c9d4e2;
}
.ha-exam__nums i {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  background: #fff;
  color: #102a4c;
  border: 1px solid #b7c4d6;
}
.ha-exam__nums i.is-now {
  background: #07192f;
  color: #fff;
  border-color: #07192f;
}
.ha-exam__q {
  flex: 1;
  padding: 10px 12px 12px;
  background: #fff;
  margin: 8px;
  border-radius: 8px;
  border: 1px solid #c9d4e2;
}
.ha-exam__q strong {
  display: block;
  font-size: 10px;
  color: #5f6673;
  margin-bottom: 4px;
}
.ha-exam__q p {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  color: #07192f;
}
.ha-exam__opts { display: flex; flex-direction: column; gap: 5px; }
.ha-exam__opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #f3f6fa;
  font-size: 11px;
  line-height: 1.3;
  transition: background .2s ease, border-color .2s ease;
}
.ha-exam__opt i {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  border-radius: 50%;
  border: 1.5px solid #7a8798;
  flex-shrink: 0;
  background: #fff;
}
.ha-exam__opt.is-picked {
  background: #e8eef6;
  border-color: #07192f;
}
.ha-exam__opt.is-picked i {
  background: #07192f;
  border-color: #07192f;
  box-shadow: inset 0 0 0 2px #fff;
}

.ha-daily {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f5f5f7;
}
.ha-daily__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.ha-daily__top b { font-size: 13px; font-weight: 700; }
.ha-daily__top em { font-style: normal; font-size: 11px; color: #e8913a; font-weight: 700; }
.ha-daily__card {
  margin: 12px;
  padding: 16px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  flex: 1;
}
.ha-daily__word {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #1d1d1f;
}
.ha-daily__phon {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #6e6e73;
}
.ha-daily__opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.ha-daily__opts button {
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fafafa;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  color: #1d1d1f;
  transition: border-color .2s ease, background .2s ease;
}
.ha-daily__opts button.is-picked {
  border-color: #e8913a;
  background: #fff6ec;
}
.ha-daily__ok {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1a7f4b;
}
.ha-daily__acts {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.ha-daily__acts span {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 650;
  border: 1px solid rgba(0, 0, 0, .1);
  background: #fff;
  color: #1d1d1f;
}
.ha-daily__acts .is-primary {
  background: #e8913a;
  border-color: #e8913a;
  color: #fff;
}
.ha-daily__card[hidden] { display: none !important; }

.ha-demo__caption {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 6;
  max-width: 86%;
  padding: 6px 10px;
  border-radius: 980px;
  background: rgba(7, 25, 47, .88);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}
.ha-demo__caption.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ha-demo__cursor {
  position: absolute;
  top: 70%;
  left: 70%;
  width: 16px;
  height: 22px;
  z-index: 7;
  background: #e8913a;
  clip-path: polygon(0 0, 0 100%, 35% 70%, 55% 100%, 68% 92%, 45% 62%, 100% 58%);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .28));
  opacity: 0;
  transition: left .7s var(--ease-out), top .7s var(--ease-out), opacity .25s ease, transform .12s ease;
  will-change: left, top;
  pointer-events: none;
}
.ha-demo.is-ready .ha-demo__cursor { opacity: 1; }
.ha-demo.is-clicking .ha-demo__cursor {
  transform: scale(.86);
}
.ha-demo__ripple {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid rgba(232, 145, 58, .75);
  opacity: 0;
  z-index: 6;
  pointer-events: none;
  transform: scale(.4);
}
.ha-demo.is-ripping .ha-demo__ripple {
  left: var(--rx, 0);
  top: var(--ry, 0);
  animation: ha-tour-rip .45s var(--ease-out) forwards;
}
@keyframes ha-tour-rip {
  from { opacity: .9; transform: scale(.45); }
  to { opacity: 0; transform: scale(1.55); }
}

@media (max-width: 960px) {
  .home-apple-keynote .ha-screen--demo { min-height: 220px; }
  .ha-menu__item b { font-size: 11px; }
  .ha-exam__q p { font-size: 11px; }
  .ha-daily__word { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ha-demo__scene { transition: none; }
  .ha-demo__scene[data-scene="hub"] { opacity: 1 !important; transform: none !important; }
  .ha-demo__scene:not([data-scene="hub"]) { opacity: 0 !important; }
  .ha-demo__cursor,
  .ha-demo__caption,
  .ha-demo__ripple { display: none !important; }
}
