/* ==========================================================================
   100MCQs — Premium Design System (UI-01 prototype)
   One shared stylesheet for the homepage, discovery, learning and search pages.
   No existing page uses this file. Tokens first, components after.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --navy: #14263F;          /* primary */
  --navy-deep: #0D1A2C;     /* footer / darkest surface */
  --navy-soft: #1E3660;
  --teal: #087F72;          /* secondary */
  --teal-dark: #066A5F;     /* teal for small text on light backgrounds */
  --gold: #E3B45C;          /* restrained accent (decoration, large text on navy) */

  /* Surfaces */
  --bg: #F6F8FC;            /* soft off-white page background */
  --card: #FFFFFF;
  --tint: #EDF2F9;          /* pale navy tint for quiet panels */
  --border: #DDE5EE;        /* soft neutral border */

  /* Text */
  --ink: #1D2B3F;           /* body text */
  --muted: #51637A;         /* secondary text (AA on --bg and white) */
  --on-navy: #F2F6FC;
  --on-navy-muted: #B9C8DC;

  /* Semantic states */
  --ok: #177245;   --ok-bg: #E7F6EE;
  --bad: #B3261E;  --bad-bg: #FDECEA;
  --warn: #8A5A19; --warn-bg: #FBF3DF;

  /* Typography — system stacks only, no font downloads */
  --font-en: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-ur: "Noto Nastaliq Urdu", "Segoe UI", system-ui, sans-serif;
  --font-sd: "Noto Naskh Arabic", "Scheherazade New", "Segoe UI", system-ui, sans-serif;
  --fs-hero: clamp(1.9rem, 4.5vw, 3rem);
  --fs-h1: clamp(1.55rem, 3.2vw, 2.2rem);
  --fs-h2: clamp(1.25rem, 2.4vw, 1.6rem);
  --fs-h3: 1.08rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --lh-body: 1.65;

  /* Spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* Shape + elevation */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --shadow-1: 0 1px 2px rgba(20, 38, 63, .06), 0 4px 14px rgba(20, 38, 63, .06);
  --shadow-2: 0 2px 4px rgba(20, 38, 63, .07), 0 10px 28px rgba(20, 38, 63, .10);

  /* Layout */
  --container: 1120px;
  --tap: 44px;              /* minimum touch target */

  /* Motion */
  --ease: 160ms ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-en); font-size: var(--fs-body); line-height: var(--lh-body);
}
[lang="ur"] { font-family: var(--font-ur); }
[lang="sd"], [lang="sd-Arab-PK"] { font-family: var(--font-sd); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 var(--sp-3); }
h1 { font-size: var(--fs-h1); } h2 { font-size: var(--fs-h2); } h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--sp-4); }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-4); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--on-navy);
  padding: var(--sp-3) var(--sp-4); z-index: 50; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ---------- Header + navigation ---------- */
.site-head { background: var(--navy); color: var(--on-navy); }
.site-head .sh-wrap { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.brand { display: flex; align-items: baseline; gap: var(--sp-3); text-decoration: none; color: var(--on-navy); }
.brand .mark {
  font-weight: 800; font-size: 1.45rem; letter-spacing: .2px; color: #fff;
}
.brand .mark b { color: var(--gold); font-weight: 800; }
.brand .tag { font-size: var(--fs-small); color: var(--on-navy-muted); }
.main-nav { margin-left: 0; }
.main-nav ul { display: flex; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  color: var(--on-navy); text-decoration: none; font-weight: 600;
}
.main-nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
.main-nav a[aria-current="page"] { background: rgba(227,180,92,.18); color: var(--gold); }
.proto-badge {
  display: inline-block; background: var(--gold); color: var(--navy-deep);
  font-size: .78rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: var(--on-navy); padding: var(--sp-7) 0 var(--sp-7); }
.hero h1 { color: #fff; font-size: var(--fs-hero); max-width: 18em; }
.hero h1 .accent { color: var(--gold); }
.hero .lede { font-size: 1.13rem; color: var(--on-navy-muted); max-width: 42em; }
.hero .cta-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: var(--sp-2) var(--sp-5); border-radius: var(--r-sm);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background var(--ease), border-color var(--ease);
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #D9A845; color: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-on-navy { background: transparent; color: var(--on-navy); border-color: rgba(255,255,255,.45); }
.btn-on-navy:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Sections + cards ---------- */
.section { padding: var(--sp-7) 0; }
.section-head { max-width: 46em; margin-bottom: var(--sp-5); }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
a.card { text-decoration: none; color: var(--ink); transition: box-shadow var(--ease), transform var(--ease); }
a.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.card h3 { margin-bottom: var(--sp-1); }
.card p { color: var(--muted); margin: 0; }
.card .meta { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-1); }
.card .foot { margin-top: auto; padding-top: var(--sp-3); font-weight: 700; color: var(--teal-dark); }

/* Chips + status labels */
.chip {
  display: inline-block; font-size: .8rem; font-weight: 700; line-height: 1.3;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--tint); color: var(--navy);
}
.chip-free { background: var(--ok-bg); border-color: #BFE6D2; color: var(--ok); }
.chip-part { background: var(--warn-bg); border-color: #EBD9A8; color: var(--warn); }
.chip-soon { background: #fff; color: var(--muted); }

/* ---------- Breadcrumbs ---------- */
.crumbs { padding: var(--sp-4) 0 0; font-size: var(--fs-small); color: var(--muted); }
.crumbs ol { display: flex; gap: var(--sp-2); flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: var(--sp-2); color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ---------- Learning tabs ---------- */
.tabs { margin-top: var(--sp-5); }
.tablist {
  display: flex; gap: var(--sp-1); flex-wrap: wrap;
  border-bottom: 2px solid var(--border); padding: 0 var(--sp-1);
}
.tab {
  font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  min-height: var(--tap); padding: var(--sp-2) var(--sp-4); cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tab:hover { color: var(--navy); background: var(--tint); }
.tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--gold); }
.tabpanel { padding: var(--sp-5) 0; }
.tabpanel[hidden] { display: none; }

/* ---------- Lesson / exercise / guide typography ---------- */
.lesson p, .guide p { max-width: 68ch; }
.keybox {
  background: var(--tint); border-left: 4px solid var(--gold); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0; max-width: 68ch;
}
.vocab { border-collapse: collapse; width: 100%; max-width: 720px; margin: var(--sp-3) 0 var(--sp-5); background: var(--card); }
.vocab th, .vocab td { border: 1px solid var(--border); padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: top; }
.vocab th { background: var(--tint); color: var(--navy); }
.exercise {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: var(--sp-5); margin-bottom: var(--sp-4); max-width: 860px;
}
.exercise .q { font-weight: 600; }
.reveal-btn { margin-top: var(--sp-3); }
.reveal {
  margin-top: var(--sp-4); border-top: 1px dashed var(--border); padding-top: var(--sp-4);
}
.reveal .ans { font-weight: 700; color: var(--navy); }
.free-note { display: flex; gap: var(--sp-2); align-items: center; color: var(--muted); font-size: var(--fs-small); }

/* ---------- Practice quiz ---------- */
.quiz-q {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: var(--sp-5); margin-bottom: var(--sp-4); max-width: 860px;
}
.quiz-q .stem { font-weight: 600; margin-bottom: var(--sp-3); }
.opts { display: grid; gap: var(--sp-2); }
.opt {
  display: flex; gap: var(--sp-3); align-items: flex-start; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--sp-3);
  min-height: var(--tap); background: #fff;
}
.opt:hover { border-color: var(--teal); }
.opt input { margin-top: 4px; accent-color: var(--teal); width: 18px; height: 18px; flex: none; }
.opt.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.feedback { margin-top: var(--sp-3); font-weight: 600; }
.feedback.ok { color: var(--ok); } .feedback.bad { color: var(--bad); }
.expl { margin-top: var(--sp-2); color: var(--muted); }
.quiz-score { font-weight: 700; color: var(--navy); margin-top: var(--sp-4); }

/* ---------- Discovery filter ---------- */
.filter-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.filter-btn {
  font: inherit; font-weight: 700; cursor: pointer; min-height: var(--tap);
  padding: var(--sp-2) var(--sp-4); border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--navy);
}
.filter-btn[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.unit-links { columns: 2; column-gap: var(--sp-6); margin: 0; padding-left: var(--sp-5); }
@media (min-width: 800px) { .unit-links { columns: 3; } }
.unit-links li { margin-bottom: var(--sp-2); break-inside: avoid; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy-deep); color: var(--on-navy-muted); margin-top: var(--sp-7); }
.site-foot .wrap { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }
.site-foot a { color: var(--on-navy); }
.site-foot .cols { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 800px) { .site-foot .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-foot h3 { color: #fff; font-size: 1rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }

/* ---------- Responsive figures/tables (prototype note pattern) ---------- */
.fig-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card); padding: var(--sp-3); }
.table-scroll { overflow-x: auto; }

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

/* ==========================================================================
   UI-01-FIX1 — focused refinements (appended; overrides above where noted)
   F01 reflow hardening · F03 compact mobile header · F04 visual hierarchy
   ========================================================================== */

/* ---- F01: 200% text-enlargement reflow hardening ---- */
.site-head .sh-wrap > *, .main-nav li, .crumbs li, .grid > *, .site-foot .cols > * { min-width: 0; }
.brand { flex-wrap: wrap; min-width: 0; }
.brand .tag { white-space: normal; }
.crumbs a, .crumbs [aria-current] { overflow-wrap: anywhere; }
.unit-links { column-width: 230px; }
.unit-links a { overflow-wrap: anywhere; }
.table-scroll { min-width: 0; max-width: 100%; }
.tabpanel { min-width: 0; }
.vocab td { overflow-wrap: anywhere; }
.opt > span { min-width: 0; overflow-wrap: anywhere; }
.exercise .q, .quiz-q .stem { overflow-wrap: anywhere; }
.tab { max-width: 100%; }

/* ---- F04: section heading accent + card icons ---- */
.section-head h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 44px; height: 3px; border-radius: 2px; background: var(--gold);
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: var(--tint); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.25rem;
}
.card .icon svg { width: 24px; height: 24px; }

/* ---- F04: hero learning-preview visual ---- */
@media (min-width: 1000px) {
  .hero .wrap { display: grid; grid-template-columns: 1.12fr .88fr; gap: var(--sp-6); align-items: center; }
}
.hero-preview {
  background: var(--card); color: var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); padding: var(--sp-5); margin-top: var(--sp-5);
}
@media (min-width: 1000px) { .hero-preview { margin-top: 0; } }
.hero-preview .hp-head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  border-bottom: 1px solid var(--border); padding-bottom: var(--sp-3); margin-bottom: var(--sp-3);
  font-size: var(--fs-small); color: var(--muted); font-weight: 700;
}
.hero-preview h3 { font-size: 1rem; margin-bottom: var(--sp-2); }
.hero-preview p { font-size: .94rem; margin-bottom: var(--sp-3); }
.hero-preview .hp-opts { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.hero-preview .hp-opt {
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3); font-size: .94rem;
}
.hero-preview .hp-opt.correct { border-color: var(--ok); background: var(--ok-bg); font-weight: 600; }
.hero-preview .hp-fb { color: var(--ok); font-weight: 700; font-size: .94rem; margin: 0; }
.hero-preview .hp-note { color: var(--muted); font-size: .8rem; margin: var(--sp-3) 0 0; }

/* ---- F05: separate skills-course treatment ---- */
.card-course { background: #EFF7F5; border-color: #CBE7E0; }
.card-course .icon { background: #DDF0EB; color: var(--teal-dark); }

/* ---- F02: quiz submitted state ---- */
.quiz-q.is-submitted .opt { cursor: default; }
.quiz-q.is-submitted .opt:hover { border-color: var(--border); }
.quiz-q.is-submitted .opt.is-correct:hover { border-color: var(--ok); }
.submitted-chip { margin-left: var(--sp-2); }

/* ---- F03: compact mobile header (320–640px) ---- */
@media (max-width: 640px) {
  .site-head .sh-wrap { gap: var(--sp-2) var(--sp-3); padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
  .brand .mark { font-size: 1.2rem; }
  .brand .tag { display: none; }
  .proto-badge { font-size: .66rem; padding: 2px 8px; letter-spacing: .3px; }
  .hero { padding: var(--sp-5) 0; }
}

/* ==========================================================================
   UI-01-FIX1 ADDENDUM — premium navigation, dropdowns, hamburger, tab icons
   ========================================================================== */
.ic { width: 19px; height: 19px; flex: none; }
.main-nav .nav-list { display: flex; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.main-nav a, .nav-drop-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: var(--tap);
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  color: var(--on-navy); font: inherit; font-weight: 600;
  background: none; border: 0; cursor: pointer; text-decoration: none;
}
.main-nav a:hover, .nav-drop-btn:hover { background: rgba(255,255,255,.10); color: #fff; }
.main-nav a[aria-current="page"], .nav-drop-btn[aria-current="page"] { background: rgba(227,180,92,.18); color: var(--gold); }
.nav-drop-btn .ic:last-child { width: 14px; height: 14px; transition: transform var(--ease); }
.has-drop.open .nav-drop-btn .ic:last-child { transform: rotate(180deg); }
.has-drop { position: relative; }
.drop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 320px; max-width: min(92vw, 360px);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-2); padding: var(--sp-3);
}
.has-drop.open .drop { display: block; }
.drop::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 6px; }
.drop ul { list-style: none; margin: 0 0 var(--sp-2); padding: 0; display: grid; gap: 2px; }
.drop ul:last-child { margin-bottom: 0; }
.drop a {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  color: var(--ink); padding: var(--sp-2); min-height: var(--tap); border-radius: var(--r-sm);
}
.drop a:hover { background: var(--tint); color: var(--navy); }
.drop a .ic { color: var(--teal-dark); margin-top: 2px; }
.drop a[aria-current="page"] { background: var(--tint); color: var(--navy); font-weight: 700; }
.drop-head {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: .78rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); margin: var(--sp-2) var(--sp-2) var(--sp-1);
}
.drop-head .ic { width: 15px; height: 15px; }
.drop-meta { display: block; font-size: .82rem; font-weight: 400; color: var(--muted); }
.nav-toggle { display: none; }
.tab { display: inline-flex; align-items: center; gap: var(--sp-2); }
.tab .ic { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .brand { order: 1; }
  .proto-badge { order: 2; }
  .nav-toggle {
    order: 3; display: inline-flex; align-items: center; gap: var(--sp-2);
    margin-left: auto; min-height: var(--tap); padding: var(--sp-2) var(--sp-3);
    background: rgba(255,255,255,.08); color: var(--on-navy);
    border: 1px solid rgba(255,255,255,.35); border-radius: var(--r-sm);
    font: inherit; font-weight: 700; cursor: pointer;
  }
  .nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
  .main-nav { display: none; width: 100%; margin-left: 0; order: 4; }
  .main-nav.open { display: block; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .nav-drop-btn { width: 100%; justify-content: flex-start; }
  .has-drop.open .drop {
    position: static; display: block; min-width: 0; max-width: none;
    background: rgba(255,255,255,.06); border: 0; box-shadow: none; padding: var(--sp-2);
  }
  .drop a { color: var(--on-navy); }
  .drop a:hover { background: rgba(255,255,255,.10); color: #fff; }
  .drop a .ic { color: var(--gold); }
  .drop a[aria-current="page"] { background: rgba(227,180,92,.18); color: var(--gold); }
  .drop-head { color: var(--on-navy-muted); }
  .drop-meta { color: var(--on-navy-muted); }
}

/* ==========================================================================
   UI-01-FIX2 — submitted-chip visibility + hamburger close icon
   ========================================================================== */
.submitted-chip[hidden] { display: none; }
.nav-toggle .ic-close { display: none; }
.nav-toggle[aria-expanded="true"] .ic-close { display: block; }
.nav-toggle[aria-expanded="true"] .ic-menu { display: none; }

/* ==========================================================================
   UI-01-IA01 — card structure (icon+name / meta / description / CTA),
   planned dropdown items, planned course cards
   ========================================================================== */
.grid .card { display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; gap: var(--sp-3); }
.card-head .icon { margin: 0; flex: none; }
.card-head h3 { margin: 0; }
.card-meta { margin: var(--sp-2) 0 0; color: var(--muted); font-weight: 600; font-size: .93rem; }
.card-desc { margin: var(--sp-2) 0 0; }
.card .cta { margin-top: auto; padding-top: var(--sp-4); color: var(--teal-dark); font-weight: 700; }
.card .cta-plan { color: var(--muted); }
.card-actions { margin-top: auto; padding-top: var(--sp-4); display: flex; gap: var(--sp-5); flex-wrap: wrap; align-items: center; }
.card-actions a { font-weight: 700; color: var(--teal-dark); }
.is-plan { border-style: dashed; background: var(--bg); }
.more-link { margin-top: var(--sp-4); font-weight: 700; }
.drop-plan { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-2); color: var(--muted); }
.drop-plan .ic { margin-top: 2px; color: var(--muted); }
.drop-note { margin: 0 var(--sp-2) var(--sp-2); font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) {
  .drop-plan { color: var(--on-navy-muted); }
  .drop-plan .ic { color: var(--on-navy-muted); }
  .drop-note { color: var(--on-navy-muted); }
}

/* ==========================================================================
   UI-01-HERO-01 — signature hero illustration (owner-selected Option 1,
   refined: open textbook, rising path, academic star; no tab circles)
   ========================================================================== */
.hero-art { margin: 0; width: 100%; max-width: 600px; justify-self: center; }
.hero-art svg { display: block; width: 100%; height: auto; }
.hero-art img { display: block; width: 100%; height: auto; }
.hero-art figcaption {
  margin-top: var(--sp-2); text-align: center;
  font-style: italic; font-size: 1.06rem; letter-spacing: .2px; color: #EBD193;
}
@media (max-width: 640px) {
  .hero-art { max-width: 440px; }
  .hero-art figcaption { font-size: 1rem; }
}

/* ==========================================================================
   UI-01-CARD-POLISH-01 — subject-card badges + highlighted key topics
   (icon + subject-name row intentionally untouched: owner PASS)
   ========================================================================== */
.badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.topics {
  margin: var(--sp-3) 0 0; padding: var(--sp-2) var(--sp-3);
  background: #EAF4F1; border: 1px solid #CBE3DC; border-radius: var(--r-sm);
  font-size: .93rem; color: var(--ink);
}
.topics-label {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--teal-dark); margin-bottom: 2px;
}

/* ==========================================================================
   UI-01-HERO-FIT-FIX1 — genuine full-bleed hero (supersedes the FINAL HERO
   block): full-width navy section; artwork as a right-aligned layer at
   natural aspect (never squashed, never vertically cropped) with its left
   sky masked into the navy; left-only text-protection gradient; real HTML
   copy above. isolation keeps every hero layer below the header dropdowns.
   ========================================================================== */
.hero-journey {
  position: relative; padding: 0; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, var(--navy) 0, #001C35 140px, #001C35 100%);
  min-height: clamp(540px, 66vh, 680px);
  display: flex; align-items: center;
}
.hero-journey::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(180deg, var(--navy), rgba(20, 38, 63, 0));
  z-index: 1; pointer-events: none;
}
.hero-journey::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* Layer 1: left text protection. Layer 2 (FIX4): right-edge dissolve into
     the matched navy #001E38 — gentle at the Success glow (~88% across),
     deepening only at the far edge. Layer 3 (FIX4): bottom-right grounding. */
  background:
    linear-gradient(90deg, rgba(0, 20, 38, .93) 0, rgba(0, 20, 38, .82) 36%, rgba(0, 20, 38, .45) 52%, rgba(0, 20, 38, 0) 68%),
    linear-gradient(90deg, rgba(0, 30, 56, 0) 84%, rgba(0, 30, 56, .34) 93%, rgba(0, 30, 56, .78) 100%),
    linear-gradient(0deg, rgba(0, 26, 48, .42) 0, rgba(0, 26, 48, 0) 130px);
  background-size: 100% 100%, 100% 100%, 62% 130px;
  background-position: 0 0, 0 0, right bottom;
  background-repeat: no-repeat;
}
.hj-media { position: absolute; top: 0; right: 0; bottom: 0; z-index: 0; }
.hj-media picture { display: block; height: 100%; }
.hj-media img {
  display: block; height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 320px);
  mask-image: linear-gradient(90deg, transparent 0, #000 320px);
}
.hj-wrap { position: relative; z-index: 2; width: 100%; }
.hj-copy { max-width: min(540px, 44%); padding: var(--sp-6) 0; }
.hj-copy h1 { text-shadow: 0 2px 18px rgba(0, 10, 25, .45); }
.hj-copy .lede { text-shadow: 0 1px 10px rgba(0, 10, 25, .5); }
@media (max-width: 900px) {
  .hero-journey { min-height: 0; display: flex; flex-direction: column; align-items: stretch; }
  .hero-journey::before { height: 72px; }
  .hero-journey::after { display: none; }
  .hj-wrap { order: 1; }
  .hj-copy { max-width: none; padding: var(--sp-6) 0 var(--sp-5); }
  .hj-media { position: static; order: 2; }
  .hj-media picture { height: auto; }
  .hj-media img { width: 100%; height: auto; max-width: 100%; -webkit-mask-image: none; mask-image: none; }
}

/* ==========================================================================
   UI-01-HERO-TEXT-WIDTH-FIX2 — owner-supplied, independently Chromium-tested:
   the legacy .hero .wrap two-column grid squeezed .hj-copy into ~260px;
   above 900px the hero wrap is a plain block and the copy gets its real
   width, so the headline breaks naturally.
   ========================================================================== */
@media (min-width: 901px) {
  .hero-journey > .hj-wrap {
    display: block;
  }

  .hero-journey .hj-copy {
    width: min(510px, 43vw);
    max-width: 100%;
  }

  .hero-journey .hj-copy h1 {
    max-width: 100%;
    font-size: clamp(2.1rem, 2.65vw, 3rem);
    line-height: 1.15;
  }

  .hero-journey .hj-copy .lede {
    max-width: 43ch;
  }
}

/* ==========================================================================
   UI-01-HERO-COMPOSITION-FIX3 — artwork nudged toward the headline with a
   clamped, responsive shift (desktop only). The layer stays right-anchored
   at natural aspect — nothing is cropped; the small right-edge mask fade
   blends the shifted layer's edge into the navy without touching the
   Success symbol (the flag ends at ~93.5% of the artwork's width, the
   fade starts beyond ~94%).
   ========================================================================== */
@media (min-width: 901px) {
  .hero-journey .hj-media {
    transform: translateX(clamp(-88px, -4.6vw, -52px));
  }

  .hero-journey .hj-media img {
    /* FIX4: the right feather is now the last 7% of the layer's width at
       every screen size — the Success flag (ends ~93.5%) stays effectively
       untouched while the edge itself dissolves. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 320px, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 320px, #000 93%, transparent 100%);
  }
}

/* ==========================================================================
   UI-01-HERO-ALIGNMENT-FIX5 — owner direction: the artwork's RIGHT edge
   aligns with the header's last menu item (Account), exactly as the
   headline aligns with the 100MCQs brand — both on the same .wrap line
   (content edge = centre + 544px). The artwork is slightly smaller (80%
   of the hero height) and vertically centred; the FIX3 left shift is
   retired (this alignment supersedes it). All FIX1/FIX4 blending stays,
   so the artwork still dissolves into the one continuous navy hero.
   ========================================================================== */
@media (min-width: 901px) {
  .hero-journey .hj-media {
    top: 50%; bottom: auto; height: 80%;
    right: max(16px, calc(50% - 544px));
    transform: translateY(-50%);
  }
}

/* ==========================================================================
   UI-01-HERO-BLEND-FIX6 — owner screenshot: size/alignment are right, but
   the artwork's lighter halo still meets the flat hero navy along a visible
   boundary on the right. Two gentle cures: (1) the hero background itself
   gains a soft radial ambience in the artwork's own halo tones, so the
   artwork sits inside a matching glow field instead of on flat navy;
   (2) the artwork mask gets a longer, softer right tail plus a light
   bottom feather (intersected masks), dissolving the remaining edges.
   Landmarks stay opaque: the fade's strong zone starts past the Success
   flag (~93.5%) and below the book's base (~94%).
   ========================================================================== */
@media (min-width: 901px) {
  .hero-journey {
    background:
      radial-gradient(ellipse 55% 85% at 74% 40%, rgba(16, 58, 102, .50), rgba(16, 58, 102, 0) 70%),
      linear-gradient(180deg, var(--navy) 0, #001C35 140px, #001C35 100%);
  }

  .hero-journey .hj-media img {
    -webkit-mask-image:
      linear-gradient(90deg, transparent 0, #000 320px, #000 93%, rgba(0, 0, 0, .5) 97.5%, transparent 100%),
      linear-gradient(180deg, #000 94%, transparent 100%);
    mask-image:
      linear-gradient(90deg, transparent 0, #000 320px, #000 93%, rgba(0, 0, 0, .5) 97.5%, transparent 100%),
      linear-gradient(180deg, #000 94%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
}

/* ==========================================================================
   UI-01-HERO-NEW-ARTWORK-01 — owner-approved Concept 03 integrated: the
   contained-island Learning Journey artwork (faint compass watermark,
   scene ends inside the frame on deep navy). Because the scene carries
   its own navy margins, the layer is set slightly taller (82%) so the
   island renders at a comparable visual scale; wrap alignment (FIX5)
   and all blending (FIX1/FIX4/FIX6) stay in force.
   ========================================================================== */
@media (min-width: 901px) {
  .hero-journey .hj-media { height: 82%; }
}

/* ==========================================================================
   UI-01-LOGO-INTEGRATION-01 — owner-selected premium logo: compact
   horizontal lockup (same icon + exact wordmark, transparent background)
   replaces the plain-text header wordmark on all three prototypes.
   One brand presentation only; the tagline stays as supporting text.
   ========================================================================== */
.brand { align-items: center; }
.brand-logo { display: block; height: 40px; width: auto; max-width: none; }
@media (max-width: 640px) {
  .brand-logo { height: 32px; }
}

/* ==========================================================================
   UI-01-LOGO-FIX2 — owner direction: STACKED brand (100MCQs wordmark
   BELOW the book icon, as in the original logo), aligned on the same
   row as the navigation; the slogan line sits small beneath the
   wordmark instead of beside it (hidden on small screens, as before).
   The narrow stacked brand also lets brand + nav + badge share one
   row again at desktop widths.
   ========================================================================== */
.brand { flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-logo { height: 66px; }
.brand .tag { font-size: .72rem; letter-spacing: .4px; white-space: nowrap; }
@media (max-width: 640px) {
  .brand-logo { height: 54px; }
}

/* ==========================================================================
   UI-01-LOGO-FIX3 — owner direction: clean, uncrowded header. The brand
   is now a single stacked mark (open book + 100MCQs, cap removed from
   the artwork at the owner's instruction); the slogan line and the
   prototype badges are removed, so the brand returns to a simple
   centred row and the header is one compact band.
   ========================================================================== */
.brand { flex-direction: row; align-items: center; gap: 0; }


/* UI-02A V3 source port (21 Nov 2026): prototype shares the compact premium header */
.site-head.site-head { background:#14263F; padding:0; margin:0; }
.site-head .sh-wrap.sh-wrap { max-width:1120px; width:100%; margin-inline:auto; padding:10px 24px;
  display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; gap:18px;
  box-sizing:border-box; min-height:76px; direction:ltr; }
.site-head .brand-logo {height:52px; width:auto;}
.site-head .main-nav {margin-left:0;}
@media (max-width:900px) {
  .site-head .sh-wrap.sh-wrap {flex-wrap:wrap; padding:8px 16px; gap:10px 12px; min-height:66px;}
  .site-head .brand-logo {height:46px;}
  .site-head .nav-toggle {margin-left:auto;}
  .site-head .main-nav {width:100%;}
}

html:has(.site-head) body { background:#F6F8FC; }

/* UI-02D: premium dropdown system — same design as the learning shell */
.site-head .drop { direction:ltr; text-align:left; width:340px; min-width:0; max-width:calc(100vw - 24px); padding:10px; border-radius:14px; box-shadow:0 18px 44px rgba(13,26,44,.20); }
.site-head .nav-list > li.has-drop:last-child .drop { left:auto; right:0; }
.site-head .drop-head { font-size:.72rem; letter-spacing:.07em; color:#44546C; margin:8px 10px 4px; }
.site-head .drop-head:first-child { margin-top:2px; }
.site-head .drop ul { gap:2px; margin:0 0 6px; }
.site-head .drop ul:last-child { margin-bottom:0; }
.site-head .drop a, .site-head .drop-plan { display:flex; gap:10px; align-items:flex-start; padding:10px; border-radius:10px; min-height:44px; box-sizing:border-box; }
.site-head .drop a { color:var(--ink); font-weight:600; font-size:.93rem; line-height:1.35; }
.site-head .drop a:hover, .site-head .drop a:focus-visible { background:#EAF5F3; color:#066A5F; }
.site-head .drop .ic { width:19px; height:19px; flex:none; margin-top:1px; }
.site-head .drop-meta { display:block; font-size:.82rem; font-weight:400; color:#44546C; line-height:1.45; margin-top:1px; }
.site-head .drop-plan { color:var(--ink); font-weight:600; font-size:.93rem; line-height:1.35; cursor:default; }
.site-head .drop-plan .ic { color:var(--teal-dark); }
.site-head .drop-note { margin:2px 10px 8px; font-size:.85rem; line-height:1.5; color:#44546C; background:#F2F6FA; border:1px solid #E4EBF3; border-radius:10px; padding:8px 10px; }
@media (max-width:1023px) {
  .site-head .drop { width:auto; max-width:none; box-shadow:none; }
  .site-head .drop a { color:var(--on-navy); }
  .site-head .drop-plan { color:var(--on-navy); }
  .site-head .drop-meta { color:var(--on-navy-muted); }
  .site-head .drop-head { color:var(--on-navy-muted); }
  .site-head .drop-note { background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); color:var(--on-navy-muted); }
}

/* UI-02D-FIX1: nav mode (hamburger/inline) extends to 1023px — the six desktop
   items measurably wrap below 1024px (reviewer: fits at 1024, wraps at 901).
   These rules replicate the proven <=900px nav-mode rules verbatim;
   academic layout breakpoints are unchanged. */
@media (max-width:1023px){
  .brand { order: 1; }
  .proto-badge { order: 2; }
  .nav-toggle {
    order: 3; display: inline-flex; align-items: center; gap: var(--sp-2);
    margin-left: auto; min-height: var(--tap); padding: var(--sp-2) var(--sp-3);
    background: rgba(255,255,255,.08); color: var(--on-navy);
    border: 1px solid rgba(255,255,255,.35); border-radius: var(--r-sm);
    font: inherit; font-weight: 700; cursor: pointer;
  }
  .nav-toggle:hover { border-color: var(--gold); color: var(--gold); }
  .main-nav { display: none; width: 100%; margin-left: 0; order: 4; }
  .main-nav.open { display: block; }
  .main-nav .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .nav-drop-btn { width: 100%; justify-content: flex-start; }
  .has-drop.open .drop {
    position: static; display: block; min-width: 0; max-width: none;
    background: rgba(255,255,255,.06); border: 0; box-shadow: none; padding: var(--sp-2);
  }
  .drop a { color: var(--on-navy); }
  .drop a:hover { background: rgba(255,255,255,.10); color: #fff; }
  .drop a .ic { color: var(--gold); }
  .drop a[aria-current="page"] { background: rgba(227,180,92,.18); color: var(--gold); }
  .drop-head { color: var(--on-navy-muted); }
  .drop-meta { color: var(--on-navy-muted); }
  .drop-plan { color: var(--on-navy-muted); }
  .drop-plan .ic { color: var(--on-navy-muted); }
  .drop-note { color: var(--on-navy-muted); }
  .site-head .sh-wrap.sh-wrap {flex-wrap:wrap; padding:8px 16px; gap:10px 12px; min-height:66px;}
  .site-head .brand-logo {height:46px;}
  .site-head .nav-toggle {margin-left:auto;}
  .site-head .main-nav {width:100%;}
}

/* UI-02D-FIX2: a closed disclosure is never rendered in hamburger range */
@media (max-width:1023px){ .site-head .has-drop:not(.open) > .drop{display:none} }

/* UI-02E-FIX1: on narrow desktops (1024-1199px) the right-shifted nav pushes the
   left-anchored Resources panel past the viewport; right-anchor it to its own
   trigger in that range only. Selector verified against the header DOM order:
   .nav-list items are Home(1) Classes(2) Courses(3) Practice(4) Resources(5)
   Account(6, last-child, already right-anchored). */
@media (min-width:1024px) and (max-width:1199px){
  .site-head .main-nav a,.site-head .nav-drop-btn{padding-left:9px;padding-right:9px}
  .site-head .nav-list > li.has-drop:nth-of-type(6) > .drop{left:auto;right:0}
}

/* NAV-01 (23 Nov 2026): shared footer inner layout */
.site-foot .foot-in { max-width: 1100px; margin: 0 auto; padding: 24px 16px; display: grid; gap: 6px; }
.site-foot .foot-in p { margin: 0; }
