/* MCAT Prep — shared styles. Plain CSS, no build step, mobile-first.
   Light theme by default; dark theme via html[data-theme="dark"] (toggle in nav).
   Adapted from the cert-prep engine; medical teal/emerald palette. */

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #eceefb;
  --text: #181a2e;
  --muted: #565a78;        /* AA on white for small text */
  --border: #d9dcf2;
  --accent: #4f46e5;        /* indigo-600 — brand, AA on white */
  --accent-strong: #4338ca; /* for hover/emphasis */
  --accent-2: #15803d;      /* green-700 — success, AA */
  --sec: #4f46e5;           /* Security+ card accent (indigo) */
  --pmp: #6d28d9;           /* PMP card accent (violet-700) */
  --warn: #b45309;          /* amber-700, AA */
  --strong: #10112a;        /* near-black for <strong> */
  --nav-bg: rgba(255, 255, 255, 0.85);
  --on-accent: #ffffff;     /* text on filled accent buttons */
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.08);
  --shadow: 0 1px 3px rgba(30, 27, 75, 0.07), 0 6px 18px rgba(30, 27, 75, 0.06);
  --pill-free-bg: rgba(21, 163, 74, 0.14);  --pill-free-fg: #15803d;
  --pill-paid-bg: rgba(194, 121, 10, 0.16); --pill-paid-fg: #b45309;
  --pill-low-bg: rgba(79, 70, 229, 0.14);  --pill-low-fg: #4f46e5;
  --maxw: 1180px;
}

html[data-theme="dark"] {
  --bg: #0d0f1a;
  --surface: #161a2e;
  --surface-2: #1f2540;
  --text: #e9eaf8;
  --muted: #a8acd0;
  --border: #2c3258;
  --accent: #818cf8;
  --accent-strong: #a5b4fc;
  --accent-2: #4ade80;
  --sec: #818cf8;
  --pmp: #a78bfa;
  --warn: #fbbf24;
  --strong: #ffffff;
  --nav-bg: rgba(13, 15, 26, 0.92);
  --on-accent: #14152b;
  --danger: #ff9b9b;
  --danger-bg: rgba(224, 102, 102, 0.12);
  --shadow: none;
  --pill-free-bg: rgba(54, 211, 153, 0.18);  --pill-free-fg: #5be0ad;
  --pill-paid-bg: rgba(255, 206, 92, 0.18);  --pill-paid-fg: #fbbf24;
  --pill-low-bg: rgba(78, 161, 255, 0.18);   --pill-low-fg: #82bcff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Accessibility: visible keyboard focus + skip link */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.opt:focus-within, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--accent); color: var(--on-accent); padding: 0.5rem 0.9rem;
  border-radius: 8px; text-decoration: none; font-weight: 600; transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* Launch-offer promo bar */
.promo-bar { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; background: linear-gradient(90deg, #0f766e, #15803d); color: #fff; font-size: 0.88rem; line-height: 1.4; padding: 0.5rem 2.4rem 0.5rem 1rem; text-align: center; position: relative; }
.promo-bar strong { color: #fff; }
.promo-bar a { color: #fff; text-decoration: underline; font-weight: 700; white-space: nowrap; }
.promo-x { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 0 0.45rem; }
.promo-x:hover { opacity: 0.8; }

/* Pricing */
.pricing { margin: 2rem 0; }
.pricing-card { border-top: 3px solid var(--accent); max-width: 720px; margin: 0 auto; text-align: center; }
.pricing-eyebrow { display: inline-block; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.22rem 0.65rem; border-radius: 999px; }
.pricing-card h2 { border: 0; margin: 0.5rem 0 0.3rem; }
.pricing-price { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; margin: 0.6rem 0; flex-wrap: wrap; }
.price-strike { color: var(--muted); text-decoration: line-through; font-size: 1.2rem; }
.price-now { font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.price-unit { color: var(--muted); font-size: 0.9rem; }
.pricing-card ul { text-align: left; max-width: 560px; margin: 1rem auto; }

/* Comparison table */
.compare th, .compare td { text-align: center; vertical-align: middle; }
.compare tbody th { text-align: left; color: var(--text); font-weight: 600; }
.compare thead th:nth-child(2) { color: var(--accent); }
.compare th:nth-child(2), .compare td:nth-child(2) { background: var(--surface-2); }
.compare .yes { color: var(--accent-2); font-weight: 700; font-size: 1.05rem; }
.compare .no { color: var(--muted); }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 0.6rem 0; box-shadow: var(--shadow); }
.faq-item > summary { cursor: pointer; padding: 0.9rem 1.1rem; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; flex: none; }
.faq-item[open] > summary::after { content: "\2013"; }
.faq-item > summary:hover { color: var(--accent); }
.faq-a { padding: 0 1.1rem 1rem; color: var(--muted); line-height: 1.6; }
.faq-a p { margin: 0; }

/* Contact form */
.contact-form { max-width: 620px; display: flex; flex-direction: column; gap: 1rem; margin: 1.2rem 0; }
.contact-form .fld span { font-weight: 600; color: var(--text); font-size: 0.92rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { width: 100%; }
.contact-form .btn { align-self: flex-start; }

/* Sticky header wrapper (nav + location sub-bar stick together) */
.site-head { position: sticky; top: 0; z-index: 40; }
.subbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.subbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 0.3rem 1rem;
  display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--muted);
  overflow-x: auto; white-space: nowrap;
}
.subbar-inner a { color: var(--muted); text-decoration: none; }
.subbar-inner a:hover { color: var(--text); }
.subbar-sep { opacity: 0.5; }
.subbar-current { color: var(--text); font-weight: 600; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top nav (grouped dropdowns + mobile drawer) ---------- */
.nav {
  position: relative; /* sticky handled by .site-head wrapper */
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem 0.9rem;
  position: relative;
}
.nav-brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  white-space: nowrap;
  margin-right: 0.6rem;
}
.nav-brand span { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 0.2rem 1.7rem; margin-right: auto; margin-left: 1.4rem; flex-wrap: wrap; }
.nav-group-label, .nav-link { font-size: 0.95rem; }
.nav-link, .nav-group-label {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; cursor: pointer;
  background: none; border: 0; font-family: inherit; padding: 0.35rem 0;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.nav-link:hover, .nav-group:hover .nav-group-label, .nav-group:focus-within .nav-group-label, .nav-group.open .nav-group-label { color: var(--text); }
.nav-link.active { color: var(--text); border-bottom: 2px solid var(--accent); }
.nav-group { position: relative; }
.nav-group.has-active .nav-group-label { color: var(--text); }
.nav-group-label::after { content: "▾"; font-size: 0.65em; opacity: 0.7; }
.nav-dropdown {
  position: absolute; top: 100%; left: -0.4rem; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  padding: 0.4rem; display: none; flex-direction: column; z-index: 50;
}
.nav-group:hover .nav-dropdown, .nav-group:focus-within .nav-dropdown, .nav-group.open .nav-dropdown { display: flex; }
.nav-dropdown a { color: var(--muted); text-decoration: none; font-size: 0.9rem; padding: 0.45rem 0.7rem; border-radius: 8px; white-space: nowrap; }
.nav-dropdown a:hover { background: var(--surface-2); color: var(--text); }
.nav-dropdown a.active { color: var(--accent); background: var(--surface-2); }
.nav-dropdown.cols { flex-direction: row; gap: 0.6rem; }
.nav-col { display: flex; flex-direction: column; min-width: 150px; }
.nav-sub { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); opacity: 0.75; padding: 0.35rem 0.7rem 0.15rem; }
/* fallback for any plain anchor in nav (e.g., landing page) */
.nav-inner > a:not(.nav-brand) { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.nav-inner > a:not(.nav-brand):hover { color: var(--text); }

.nav-toggle {
  display: none; cursor: pointer; font: inherit; font-size: 1.15rem; line-height: 1;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; width: 40px; height: 34px;
}
.nav-toggle:hover { border-color: var(--accent); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-brand { margin-right: auto; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin-right: 0; margin-left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    padding: 0.5rem 1rem 1rem; max-height: 78vh; overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-group { position: static; }
  .nav-group-label { width: 100%; justify-content: flex-start; padding: 0.7rem 0 0.2rem; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.65; }
  .nav-group-label::after { content: ""; }
  .nav-dropdown { position: static; display: flex; border: 0; box-shadow: none; padding: 0 0 0.3rem 0.6rem; min-width: 0; background: transparent; }
  .nav-dropdown.cols { flex-direction: column; gap: 0; }
  .nav-col { min-width: 0; }
  .nav-sub { padding: 0.4rem 0 0.1rem 0.2rem; }
  .nav-link { padding: 0.55rem 0; font-size: 1rem; }
}

/* Theme / settings buttons (injected by theme.js) */
.theme-toggle {
  margin-left: 0.2rem; cursor: pointer; font: inherit; font-size: 0.95rem; line-height: 1;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}
@media (max-width: 600px) { .wrap { padding: 1.1rem 1rem 3rem; } }
/* Wide screens: use the space with multi-column feature grids */
@media (min-width: 960px) {
  .tracks { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.crumbs { display: none; } /* replaced by the sticky .subbar location bar */

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0.2rem 0 0.6rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
/* JS-rendered page titles: kept visually identical to a top-level h1 (SEO uses a static h1). */
h2.page-h1 { font-size: 1.9rem; margin: 0.2rem 0 0.6rem; padding-bottom: 0; border-bottom: 0; }
/* Visually hidden but accessible to screen readers and crawlers. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
h3 { font-size: 1.08rem; margin: 1.4rem 0 0.4rem; color: var(--accent); }
p { margin: 0.6rem 0; }
a { color: var(--accent); }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.25rem 0; }
code { background: var(--surface-2); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.88em; }
strong { color: var(--strong); }
.lead { font-size: 1.1rem; color: var(--muted); }

/* ---------- Hero / landing ---------- */
.hero {
  text-align: center; padding: 3.5rem 1rem 2.6rem;
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); font-weight: 700;
}
.hero-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px rgba(21,128,61,0.18); }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 16ch; margin: 0.7rem auto 0.5rem; line-height: 1.12; }
.hero h1 .accent-text { color: var(--accent); }
.hero .lead { max-width: 720px; margin: 0.5rem auto 0; }
.hero-cta { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.3rem; }
.hero-stats { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-stat b { display: block; font-size: 1.55rem; color: var(--text); font-weight: 800; line-height: 1; }
.hero-stat span { font-size: 0.78rem; color: var(--muted); }
.btn.lg { padding: 0.7rem 1.3rem; font-size: 1.02rem; border-radius: 11px; }

.tracks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin: 2rem 0;
}
@media (min-width: 720px) { .tracks { grid-template-columns: repeat(3, 1fr); } }

.track-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.3rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.track-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.track-card.sec { border-top: 4px solid var(--sec); }
.track-card.pmp { border-top: 4px solid var(--pmp); }
.track-card.cism { border-top: 4px solid var(--accent-2); }
.track-card h2 { border: 0; margin: 0.2rem 0 0.4rem; }
.track-card .tag { font-size: 0.8rem; color: var(--muted); }

/* ---------- Cards / boxes ---------- */
.cards { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card a.block { display: inline-block; margin-top: 0.4rem; font-weight: 600; }

.callout {
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
}
.callout.warn { border-left-color: var(--warn); }
.callout.good { border-left-color: var(--accent-2); }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--accent); font-weight: 600; }
tbody tr:hover { background: var(--surface-2); }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.5rem; border-radius: 999px; }
.pill.free { background: var(--pill-free-bg); color: var(--pill-free-fg); }
.pill.paid { background: var(--pill-paid-bg); color: var(--pill-paid-fg); }
.pill.low { background: var(--pill-low-bg); color: var(--pill-low-fg); }

/* ---------- Domain blocks ---------- */
.domain {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.4rem 1.1rem 1rem;
  margin: 1.2rem 0;
  box-shadow: var(--shadow);
}
.domain h2 { border: 0; }
.weight {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--accent);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ---------- Footer / nav between pages ---------- */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pager a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
}
.pager a:hover { border-color: var(--accent); }

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem 1rem;
}
/* Footer site navigation (injected by theme.js) */
.site-footnav {
  max-width: var(--maxw); margin: 0 auto 1.4rem; text-align: left;
  display: grid; gap: 1.6rem 2rem;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  padding-bottom: 1.4rem; border-bottom: 1px solid var(--border);
}
.site-footnav-brand .nav-brand { font-size: 1.15rem; }
.site-footnav-brand p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.85rem; max-width: 24ch; }
.site-footnav h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text); margin: 0 0 0.6rem; }
.site-footnav a { display: block; color: var(--muted); text-decoration: none; font-size: 0.9rem; padding: 0.22rem 0; }
.site-footnav a:hover { color: var(--accent); }
@media (max-width: 760px) { .site-footnav { grid-template-columns: 1fr 1fr; gap: 1.3rem; } .site-footnav-brand { grid-column: 1 / -1; } }
/* Home-page nav CTA button */
/* Home nav CTA — force high contrast in both themes (darker teal + white in light; bright teal + navy in dark) */
.nav-cta { margin-left: auto; white-space: nowrap; }
a.nav-cta.btn.primary { background: var(--accent-strong); color: #ffffff; border-color: var(--accent-strong); }
a.nav-cta.btn.primary:hover { background: var(--accent); color: #ffffff; filter: none; }
html[data-theme="dark"] a.nav-cta.btn.primary { background: var(--accent); color: #14152b; border-color: var(--accent); }
html[data-theme="dark"] a.nav-cta.btn.primary:hover { filter: brightness(1.08); }

/* ============================================================
   INTERACTIVE APP (practice, exam, flashcards, dashboard, etc.)
   ============================================================ */

/* Full-width layout for app pages */
.wrap-wide { max-width: 1320px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
.nav-inner.wide { max-width: 1320px; }
@media (max-width: 700px) { .wrap-wide { padding: 1rem 1rem 3rem; } }

.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.spread { justify-content: space-between; }
.muted { color: var(--muted); }
.right { text-align: right; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-block; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 0.55rem 1rem; text-decoration: none; transition: border-color .12s, background .12s;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); }

select, input[type=number], input[type=date], input[type=text], textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.7rem;
}
textarea { width: 100%; min-height: 220px; line-height: 1.5; resize: vertical; }
label.fld { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }

/* Stat tiles */
.stats { display: grid; gap: 0.9rem; grid-template-columns: repeat(2,1fr); margin: 1.2rem 0; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4,1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }
.stat .num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat .lbl { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.stat.accent .num { color: var(--accent); }
.stat.good .num { color: var(--accent-2); }
.stat.warn .num { color: var(--warn); }

/* Progress bars */
.bar { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s; }
.bar.good > span { background: var(--accent-2); }
.bar.warn > span { background: var(--warn); }
.bar.bad > span { background: var(--danger); }
.dom-row { display: grid; grid-template-columns: 1fr; gap: 0.3rem; margin: 0.8rem 0; }
.dom-row .top { display: flex; justify-content: space-between; font-size: 0.9rem; }

/* Quiz */
.quiz-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem 1.4rem; margin: 1rem 0; box-shadow: var(--shadow); }
.qmeta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.qmeta .tag { background: var(--surface-2); padding: 0.1rem 0.55rem; border-radius: 999px; }
.qstem { font-size: 1.12rem; font-weight: 600; margin: 0.2rem 0 1rem; }
.opt {
  display: flex; gap: 0.7rem; align-items: flex-start; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 0.7rem 0.9rem; margin: 0.5rem 0; transition: border-color .1s, background .1s;
}
.opt:hover { border-color: var(--accent); }
.opt input { margin-top: 0.25rem; }
.opt.correct { border-color: var(--accent-2); background: rgba(21,163,74,.12); }
.opt.wrong { border-color: var(--danger); background: var(--danger-bg); }
.opt.locked { cursor: default; }
.opt .ltr { font-weight: 700; color: var(--muted); }
.explain { margin-top: 0.9rem; padding: 0.8rem 1rem; border-radius: 0 8px 8px 0; background: var(--surface-2); border-left: 4px solid var(--accent); font-size: 0.95rem; }
.explain.ok { border-left-color: var(--accent-2); }
.explain.no { border-left-color: var(--danger); }
.verdict { font-weight: 700; }
.verdict.ok { color: var(--accent-2); } .verdict.no { color: var(--danger); }

/* Exam navigator */
.exam-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  position: sticky; top: 52px; z-index: 10; background: var(--nav-bg); backdrop-filter: blur(8px); padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.timer { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--warn); } .timer.crit { color: var(--danger); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px,1fr)); gap: 5px; margin: 1rem 0; }
.qgrid button { aspect-ratio: 1; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 6px; font-size: 0.78rem; cursor: pointer; padding: 0; }
.qgrid button.answered { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.qgrid button.flagged { border-color: var(--warn); color: var(--warn); }
.qgrid button.current { outline: 2px solid var(--accent); }

/* Exam mode picker cards */
.modes { display: grid; gap: 0.8rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 620px) { .modes { grid-template-columns: 1fr 1fr; } }
.mode {
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.1rem; transition: transform .12s, border-color .12s; box-shadow: var(--shadow);
}
.mode:hover { transform: translateY(-2px); border-color: var(--accent); }
.mode h3 { margin: 0 0 0.25rem; color: var(--text); }
.mode .sub { font-size: 0.85rem; color: var(--muted); }
.mode.cars { border-top: 4px solid var(--pmp); }
.mode.mix { border-top: 4px solid var(--accent); }

/* Flashcards */
.flip { perspective: 1400px; margin: 1.2rem 0; }
.flip-inner { position: relative; width: 100%; min-height: 240px; transition: transform .5s; transform-style: preserve-3d; cursor: pointer; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.6rem; }
.flip-face.back { transform: rotateY(180deg); background: var(--surface-2); }
.flip-face .ft { font-size: 1.25rem; font-weight: 600; }
.flip-face .bk { font-size: 1.05rem; }
.flip-face .corner { position: absolute; top: 0.7rem; left: 0.9rem; font-size: 0.72rem; color: var(--muted); }

/* Videos */
.vid-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .vid-grid { grid-template-columns: 1fr 1fr; } }
.vid { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.vid .frame { position: relative; padding-top: 56.25%; background: #000; }
.vid .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid .meta { padding: 0.7rem 0.9rem; }
.vid .meta h3 { margin: 0 0 0.2rem; font-size: 0.98rem; color: var(--text); }
.vid .meta .ch { font-size: 0.8rem; color: var(--muted); }

/* Streak chip */
.chip { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.chip .fire { font-size: 1rem; }

/* Tabs / domain filter */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.chips button { cursor: pointer; font: inherit; font-size: 0.82rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.8rem; }
.chips button.on { color: var(--text); border-color: var(--accent); background: var(--surface-2); }

/* Hub grid of tools */
.tools { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin: 1.4rem 0; }
@media (min-width: 560px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .tools { grid-template-columns: 1fr 1fr 1fr; } }
.tool { display: block; text-decoration: none; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.tool:hover { transform: translateY(-3px); border-color: var(--accent); }
.tool h3 { margin: 0.1rem 0 0.3rem; color: var(--text); }
.tool .ico { font-size: 1.5rem; }
.tool p { margin: 0; font-size: 0.88rem; color: var(--muted); }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--accent); color: var(--text);
  padding: 0.6rem 1rem; border-radius: 10px; font-size: 0.9rem; z-index: 50; opacity: 0; transition: opacity .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; }

/* Passage block — CARS & science passages above a question */
.passage {
  background: var(--surface-2);
  border-left: 3px solid var(--pmp);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
}
.passage strong { color: var(--pmp); }

/* Countdown / Question-of-the-day / focus timer widgets (dashboard) */
.widgets { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin: 1.2rem 0; }
@media (min-width: 760px) { .widgets { grid-template-columns: 1fr 1fr; } }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.widget h3 { margin: 0 0 0.5rem; color: var(--text); }
.countdown-num { font-size: 2.4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.focus-time { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.focus-time.run { color: var(--accent); }
.qotd-q { font-weight: 600; margin: 0.3rem 0 0.6rem; }

.disclaimer { font-size: 0.85rem; }

/* Schedule — week + vibrant day cards laid out in a row */
.sched-week > summary { display: flex; align-items: center; gap: 0.6rem; }
.sched-week .wk-title { margin-right: auto; }
.sched-week-body { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; padding: 0.5rem 1rem 1rem; align-items: start; }
@media (max-width: 900px) { .sched-week-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sched-week-body { grid-template-columns: 1fr; } }
.sched-week-body .day-task span { font-size: 0.86rem; }
.sched-week-body .day-title { font-size: 0.86rem; }

details.day-card { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--day, var(--accent)); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.12s ease, box-shadow 0.12s ease; }
details.day-card:hover { transform: translateY(-2px); }
details.day-card > summary { cursor: pointer; list-style: none; padding: 0.6rem 0.75rem 0.55rem; }
details.day-card > summary::-webkit-details-marker { display: none; }
details.day-card > summary:hover { background: var(--surface-2); }
.day-top { display: flex; align-items: center; gap: 0.4rem; }
.day-badge { background: var(--day, var(--accent)); color: #fff; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 999px; }
.day-count { margin-left: auto; font-size: 0.74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-caret { color: var(--muted); font-size: 0.7rem; transition: transform 0.15s; }
details.day-card[open] .day-caret { transform: rotate(180deg); }
.day-title { display: block; margin-top: 0.35rem; font-weight: 600; font-size: 0.9rem; color: var(--text); line-height: 1.3; }
.day-bar { height: 4px; background: var(--surface-2); }
.day-bar > span { display: block; height: 100%; background: var(--day, var(--accent)); transition: width 0.35s ease; }
.day-tasks { list-style: none; padding: 0.25rem 0.75rem 0.65rem; margin: 0; }
.day-task { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.45rem 0; border-top: 1px solid var(--border); }
.day-task:first-child { border-top: 0; }
.day-task input[type="checkbox"] { margin-top: 0.12rem; width: 17px; height: 17px; flex: none; accent-color: var(--day, var(--accent)); cursor: pointer; }
.day-task span { line-height: 1.4; font-size: 0.9rem; }
.day-task.done span { text-decoration: line-through; color: var(--muted); }
.task-min { font-size: 0.68rem; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 0 0.3rem; white-space: nowrap; }

/* Interactive calendar (month / week / day) */
.cal2 { margin: 1rem 0; }
.cal-toolbar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.cal-title { font-size: 1.1rem; font-weight: 700; }
.cal-nav { display: flex; gap: 0.3rem; align-items: center; }
.cal-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; margin-left: auto; }
.cal-seg button { font: inherit; font-size: 0.85rem; padding: 0.35rem 0.85rem; background: var(--surface); color: var(--muted); border: 0; cursor: pointer; }
.cal-seg button + button { border-left: 1px solid var(--border); }
.cal-seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cal-m { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-m-dow { text-align: center; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; padding-bottom: 0.2rem; }
.cal-m-cell { min-height: 98px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-m-cell.out { background: transparent; border: 0; }
.cal-m-num { font-size: 0.78rem; font-weight: 700; color: var(--muted); padding: 1px 4px; align-self: flex-start; }
.cal-m-cell.is-today .cal-m-num { color: #fff; background: var(--accent); border-radius: 999px; min-width: 1.5rem; text-align: center; }
.cal-m-cell.is-exam { border-color: var(--accent); }
.cal-ev { display: block; width: 100%; text-align: left; font: inherit; font-size: 0.7rem; border: 0; cursor: pointer; background: color-mix(in srgb, var(--day, var(--accent)) 16%, var(--surface)); color: var(--text); border-left: 3px solid var(--day, var(--accent)); border-radius: 5px; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { filter: brightness(1.08); }
.cal-ev-time { color: var(--muted); font-weight: 600; margin-right: 4px; }
.cal-ev-exam { background: var(--accent); color: #fff; border-left-color: var(--accent); font-weight: 700; }
.cal-more { font-size: 0.66rem; color: var(--muted); padding: 0 4px; }
.cal-w { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-w-col { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 5px; min-height: 130px; display: flex; flex-direction: column; gap: 4px; }
.cal-w-head { text-align: center; padding: 3px; border-radius: 7px; cursor: pointer; }
.cal-w-head span { display: block; font-size: 0.64rem; text-transform: uppercase; color: var(--muted); }
.cal-w-head strong { font-size: 1.1rem; }
.cal-w-head.is-today strong { color: var(--accent); }
.cal-w-head:hover { background: var(--surface-2); }
.cal-d { max-width: 680px; }
.cal-d-title { font-size: 1.05rem; font-weight: 700; margin: 0.2rem 0 0.7rem; }
.cal-d-row { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.45rem 0; }
.cal-d-time { width: 4rem; flex: none; color: var(--muted); font-size: 0.8rem; padding-top: 0.55rem; text-align: right; }
.cal-d-card { flex: 1; text-align: left; font: inherit; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--day, var(--accent)); border-radius: 10px; padding: 0.6rem 0.85rem; cursor: pointer; box-shadow: var(--shadow); color: var(--text); }
.cal-d-card:hover { background: var(--surface-2); }
.cal-modal-ov { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 160; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cal-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; max-width: 440px; width: 100%; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.45); }
.cal-modal-bar { height: 6px; }
.cal-modal-time { font-size: 0.82rem; color: var(--accent); font-weight: 600; }
.cal-modal h3 { margin: 0.25rem 0 0.3rem; }
.cal-modal-check { display: flex; gap: 0.5rem; align-items: center; margin: 0.9rem 0; cursor: pointer; }
@media (max-width: 640px) { .cal-m-cell { min-height: 62px; } .cal-w { grid-template-columns: 1fr; } .cal-d-time { width: 3.2rem; } }

/* Empty states */
.empty { text-align: center; padding: 2.5rem 1.2rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 16px; background: var(--surface); margin: 1.2rem 0; }
.empty .ico { font-size: 2.6rem; display: block; margin-bottom: 0.5rem; }
.empty h3 { color: var(--text); margin: 0.2rem 0 0.4rem; }
.empty p { max-width: 30rem; margin: 0.3rem auto; }
.empty .row { justify-content: center; margin-top: 0.9rem; }

/* Collapsible video topics */
.vid-topic { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 0.7rem 0; box-shadow: var(--shadow); overflow: hidden; }
.vid-topic > summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.vid-topic > summary::-webkit-details-marker { display: none; }
.vid-topic > summary .vid-count { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.vid-topic > summary::after { content: "▾"; color: var(--muted); transition: transform 0.15s; }
.vid-topic[open] > summary::after { transform: rotate(180deg); }
.vid-topic > summary:hover { background: var(--surface-2); }
.vid-topic .vid-grid { padding: 0 1rem 1rem; }
.vid-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0 0.2rem; }

/* --- Polish pass: consistent micro-interactions & rhythm --- */
.btn.primary { box-shadow: 0 1px 2px rgba(15, 118, 110, 0.22); }
.btn.primary:active, .btn:active { transform: translateY(1px); }
.stat { transition: transform 0.12s ease, border-color 0.12s ease; }
.stat:hover { transform: translateY(-2px); }
.opt { transition: border-color 0.1s, background 0.1s, box-shadow 0.1s; }
.qstem { line-height: 1.4; }
.lead { margin-bottom: 1.1rem; }
.callout { line-height: 1.55; }
details.vid-topic > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-dropdown { animation: navfade 0.12s ease; }
@keyframes navfade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nav-dropdown { animation: none; } }
.subbar-inner { font-weight: 500; }
.dom-row { margin: 1rem 0; }
h2 { letter-spacing: -0.01em; }
.hero h1 { letter-spacing: -0.02em; }

/* Accessibility settings (toggled by the nav settings gear) */
html.a11y-lg { font-size: 18px; }
html.a11y-xl { font-size: 20px; }
html.a11y-dys, html.a11y-dys body { font-family: "Atkinson Hyperlegible", "Comic Sans MS", Verdana, sans-serif; letter-spacing: .02em; word-spacing: .06em; }
html.a11y-hc[data-theme="light"] { --text: #000; --muted: #2a2a2a; --border: #000; --bg: #fff; --surface: #fff; --surface-2: #eef2f1; }
html.a11y-hc[data-theme="dark"] { --text: #fff; --muted: #e8e8e8; --border: #fff; --bg: #000; --surface: #0a0f10; }

/* ============================================================
   LEARN page — unified curriculum (sidebar TOC + content)
   ============================================================ */
.wrap.learn-wrap { max-width: 1320px; }
.learn-layout { display: grid; grid-template-columns: 270px 1fr; gap: 2rem; align-items: start; }
.learn-side { position: relative; }
.learn-side-inner { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding-right: 0.4rem; }

.learn-progress { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 0.9rem; margin-bottom: 0.9rem; box-shadow: var(--shadow); }
.learn-progress-label { font-size: 0.9rem; margin-bottom: 0.45rem; }

.learn-toc { font-size: 0.86rem; }
.learn-toc-dom { margin-bottom: 0.8rem; }
.learn-toc-domh { font-weight: 700; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0.6rem 0 0.3rem; }
.learn-toc-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.learn-toc-link { display: flex; align-items: flex-start; gap: 0.45rem; padding: 0.3rem 0.5rem; color: var(--muted); text-decoration: none; border-radius: 0 7px 7px 0; line-height: 1.35; }
.learn-toc-link:hover { color: var(--text); background: var(--surface-2); }
.learn-toc-link.current { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.learn-toc-text { flex: 1; }
.learn-check { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 1.5px solid var(--border); color: transparent; font-size: 0.7rem; line-height: 1rem; text-align: center; margin-top: 0.1rem; }
.learn-check.on { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.learn-head h1 { margin-bottom: 0.3rem; }
.learn-weights { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.6rem 0 0.4rem; }
.learn-weight-chip { font-size: 0.82rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.7rem; background: var(--surface); }
.learn-weight-chip strong { color: var(--text); }

.learn-domain { margin-top: 2.2rem; }
.learn-domain-h { border-bottom: 2px solid var(--accent); padding-bottom: 0.3rem; }
.learn-domain-intro { font-size: 1rem; }

.learn-obj { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem 1.4rem; margin: 1.2rem 0; box-shadow: var(--shadow); scroll-margin-top: 1rem; }
.learn-obj-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.learn-obj-title { margin: 0; }
.learn-lecture { line-height: 1.6; }
.learn-lecture h3, .learn-lecture h4 { margin: 1rem 0 0.4rem; }
.learn-tips ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.learn-terms h4, .learn-watch h4, .learn-cheat h4, .learn-quiz h4 { margin: 1.4rem 0 0.5rem; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.learn-cheat h5, .sheet-sec h5 { margin: 0.8rem 0 0.3rem; font-size: 0.92rem; }

.learn-watch .vid-grid { grid-template-columns: 1fr 1fr; }
.learn-vid-play { display: block; width: 100%; height: 100%; position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #000; }
.learn-vid-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.learn-vid-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.learn-vid-play:hover .learn-vid-btn { background: var(--accent); }
.learn-vid-link { margin-top: 0.3rem; font-size: 0.82rem; }
.learn-vid-link a { color: var(--accent); text-decoration: none; }

.learn-quiz-card { margin: 0.8rem 0; }
.learn-opts .opt { margin: 0.35rem 0; }
.learn-complete { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.learn-complete-btn.is-done { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

.learn-toc-toggle { display: none; margin-top: 0.8rem; }

/* --- Feature add-ons: time estimates, study path, resume, banner --- */
.learn-banner { font-size: 0.86rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 0.5rem 0.8rem; margin-bottom: 1rem; }
.learn-banner strong { color: var(--text); }

.learn-toprow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; margin: 0.7rem 0 0.3rem; }
.learn-total { font-size: 1.02rem; }
.learn-total strong { color: var(--accent); }
.learn-resume { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; text-align: left; }
.learn-resume-obj { font-weight: 600; opacity: 0.92; }

.learn-toc-time { color: var(--muted); font-size: 0.78em; white-space: nowrap; }
.learn-obj-time { font-variant-numeric: tabular-nums; }
.learn-domain-time { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.learn-weight-time { color: var(--muted); }

.learn-path { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.4rem 0.9rem; margin: 1rem 0 0.4rem; box-shadow: var(--shadow); }
.learn-path-sum { cursor: pointer; font-weight: 700; padding: 0.5rem 0; list-style: none; }
.learn-path-sum::-webkit-details-marker { display: none; }
.learn-path-sum::before { content: "▸ "; color: var(--accent); }
.learn-path[open] .learn-path-sum::before { content: "▾ "; }
.learn-path-why, .learn-path-pace { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.learn-path-pace { border-top: 1px solid var(--border); padding-top: 0.7rem; margin-top: 0.4rem; }
.learn-path-list { margin: 0.6rem 0; padding-left: 1.6rem; }
.learn-path-item { margin: 0.15rem 0; }
.learn-path-link { display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.4rem 0.8rem; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--text); padding: 0.25rem 0.4rem; border-radius: 7px; font-size: 0.9rem; }
.learn-path-link:hover { background: var(--surface-2); }
.learn-path-id { font-weight: 700; color: var(--accent); }
.learn-path-time { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
.learn-path-cum { color: var(--muted); font-size: 0.78em; white-space: nowrap; }

/* ----- Daily study-plan generator ----- */
.learn-plan { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0.4rem 0.9rem; margin: 1rem 0 0.4rem; box-shadow: var(--shadow); }
.learn-plan-sum { cursor: pointer; font-weight: 700; padding: 0.5rem 0; list-style: none; }
.learn-plan-sum::-webkit-details-marker { display: none; }
.learn-plan-sum::before { content: "▸ "; color: var(--accent); }
.learn-plan[open] .learn-plan-sum::before { content: "▾ "; }
.learn-plan-body { padding: 0.4rem 0 0.8rem; }
.learn-plan-form { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; align-items: flex-end; }
.learn-plan-fld { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.learn-plan-lbl { font-weight: 600; color: var(--muted); }
.learn-plan-hint { font-size: 0.74rem; color: var(--muted); max-width: 16rem; }
.learn-plan-fld input, .learn-plan-fld select { padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; }
.learn-plan-fld input[type="number"] { width: 6rem; }
.learn-plan-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.learn-plan-msg { margin: 0.8rem 0; }
.learn-plan-summary { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.9rem 0 0.4rem; font-size: 0.92rem; }
.learn-plan-summary strong { color: var(--accent); }
.learn-plan-note { font-size: 0.85rem; }
.learn-plan-days { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.learn-plan-day { border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 0.7rem; background: var(--surface-2); }
.learn-plan-day.is-done { opacity: 0.62; }
.learn-plan-day.is-review { border-style: dashed; }
.learn-plan-day.is-over { border-left: 3px solid var(--warn, #d97706); }
.learn-plan-day-hdr { display: flex; align-items: center; gap: 0.5rem; }
.learn-plan-day-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; cursor: pointer; flex: 1; }
.learn-plan-daynum { font-weight: 700; }
.learn-plan-daydate { color: var(--muted); font-size: 0.85em; }
.learn-plan-daydate.warn { color: var(--warn, #d97706); }
.learn-plan-daymin { margin-left: auto; color: var(--muted); font-size: 0.82em; white-space: nowrap; }
.learn-plan-day.is-done .learn-plan-day-title { text-decoration: line-through; }
.learn-plan-day-objs { list-style: none; margin: 0.4rem 0 0; padding: 0 0 0 0.2rem; }
.learn-plan-objlink { display: grid; grid-template-columns: auto 1fr auto; gap: 0.4rem 0.7rem; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--text); padding: 0.2rem 0.3rem; border-radius: 6px; font-size: 0.88rem; }
.learn-plan-objlink:hover { background: var(--surface); }
.learn-plan-objid { font-weight: 700; color: var(--accent); }
.learn-plan-objmin { color: var(--muted); font-size: 0.83em; white-space: nowrap; }

@media (max-width: 900px) {
  .learn-layout { grid-template-columns: 1fr; }
  .learn-side { order: -1; }
  .learn-side-inner { position: static; max-height: none; display: none; border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem; margin-bottom: 1rem; }
  .learn-side-inner.open { display: block; }
  .learn-toc-toggle { display: inline-block; }
  .learn-watch .vid-grid { grid-template-columns: 1fr; }
  .learn-path-link { grid-template-columns: auto 1fr; }
  .learn-path-time, .learn-path-cum { grid-column: 2; }
  .learn-resume { width: 100%; }
  .learn-plan-fld { flex: 1 1 8rem; }
  .learn-plan-objlink { grid-template-columns: auto 1fr; }
  .learn-plan-objmin { grid-column: 2; }
}

/* Print — cheat sheets */
@media print {
  .nav, .pager, footer.site, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap-wide, .wrap { max-width: none; padding: 0; }
  .cheat-sheet { break-inside: avoid; }
  table, .sheet-sec { break-inside: avoid; }
  th { color: #000; }
  h1,h2,h3 { color: #000 !important; }
  .sheet-sec { border: 1px solid #999; border-radius: 6px; padding: 0.3rem 0.6rem; margin: 0.5rem 0; }
  /* Print — study plan: force-open details and avoid splitting days */
  .learn-plan, .learn-plan[open] { display: block; }
  .learn-plan-form { display: none !important; }
  .learn-plan-day { break-inside: avoid; border: 1px solid #999; }
  .learn-side, .learn-banner, .learn-toprow, .learn-weights, .learn-path { display: none !important; }
}
