/* ─────────────────────────────────────────────────────────────────────────
   ui-guide.css: study guide module (loads right after /ui.css)
   Page: study-guides.html (the hub; the section guides were folded into the
   test pages on 2026-11-01). Video-slot styles live in /ui.css.
   Colors come only from ui.css tokens.
   ───────────────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }
.g-main { display: block; padding-bottom: clamp(56px, 7vw, 96px); }

/* ── Hero: navy band with breadcrumb, H1, byline, lead, TL;DR + app data ── */
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  column-gap: 20px; align-items: start;
}
.hero-in > * { grid-column: 1 / -1; }
.hero-in > .tldr { grid-column: 1; }
.hero-in > .appdata { grid-column: 2; }

.hero-eyebrow {
  justify-self: start; display: inline-block; margin-bottom: 14px;
  font-family: var(--f-mono); font-size: 14px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--nt2);
}
/* hero breadcrumb on the navy band: lighter than --nt2 so it clears 4.5:1 even where the orange glow sits */
.hero.u-hero .breadcrumb, .hero.u-hero .breadcrumb a, .hero.u-hero .breadcrumb [aria-current] { color: #b4c2dc; }
.u-hero h1 { margin-bottom: 18px; }
.u-hero h1 em { font-style: normal; color: var(--or2); }

.byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 22px;
  font-family: var(--f-mono); font-size: 14px; font-weight: 500; letter-spacing: 0; line-height: 1.5;
}
.u-hero .byline { color: var(--nt2); }
.u-hero .byline span[aria-hidden] { color: var(--nt2); }
.u-hero .byline a, .u-hero .lead a, .tldr a {
  color: var(--ntext); text-decoration: underline; text-decoration-color: var(--or);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.u-hero .byline a:hover, .u-hero .lead a:hover, .tldr a:hover { color: #fff; text-decoration-thickness: 2px; }
.u-hero .lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.65; color: var(--nt2); max-width: 800px; }
.u-hero .lead strong { color: var(--ntext); font-weight: 600; }

.tldr, .appdata { margin-top: 32px; border-radius: var(--r2); padding: 22px 24px; }
.tldr { background: rgba(255,255,255,.03); border: 1px solid var(--nline2); }
.tldr-label, .appdata-label {
  display: block; font-family: var(--f-mono); font-size: 14px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.4;
}
.tldr-label { color: var(--gold); }
.tldr ul { margin-top: 12px; padding-left: 1.15em; }
.tldr li { color: var(--nt2); font-size: 15px; line-height: 1.55; }
.tldr li + li { margin-top: 8px; }
.tldr li::marker { color: var(--or); }
.tldr li strong { color: var(--ntext); }

.appdata { background: var(--nv3); border: 1px solid var(--nline2); border-top: 3px solid var(--green-d); }
.appdata-label { color: var(--green-d); margin-bottom: 10px; }
.u-hero .appdata p { color: var(--nt2); font-size: 15px; line-height: 1.6; }
.appdata p strong { color: var(--ntext); }
.u-hero .appdata .appdata-note {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--nline2);
  font-size: 14px; line-height: 1.55;
}

/* ── Body grid: 760 prose column + sticky side column ── */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 64px; align-items: start;
  padding-top: clamp(40px, 5vw, 64px);
}
.layout > aside, .layout > .sidebar, .layout > .side-col { grid-column: 2; grid-row: 1; }
.layout > .main-col, .layout > .article-body { grid-column: 1; grid-row: 1; min-width: 0; }
.main-col { min-width: 0; max-width: var(--prose); }
.layout > aside, .layout > .sidebar, .layout > .side-col { align-self: stretch; }
.sidebar, .side-col { display: flex; flex-direction: column; gap: 20px; }
.sidebar .toc, .side-col .toc, .sidebar .toc-card { position: sticky; top: 92px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; }
.toc-inline { display: none; }

/* author card */
.author-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2); padding: 20px; }
.ac-top, .ac-head, .author-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.author-card img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line2);
}
.ac-name, .author-name { font-family: var(--f-head); font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.ac-role, .author-role {
  margin-top: 2px; font-family: var(--f-body); font-size: 14px; font-weight: 500;
  letter-spacing: 0; line-height: 1.4; color: var(--ink2);
}
.author-card p { font-size: 14px; line-height: 1.6; color: var(--ink2); margin-bottom: 12px; }
.author-card > a {
  display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; line-height: 1.35;
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--or);
  text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.author-card > a:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* table of contents: side card (desktop) and inline card (tablet/phone) */
.toc, .toc-card, .toc-inline {
  border: 1px solid var(--line); border-radius: var(--r2); padding: 18px 18px 10px;
}
.toc, .toc-card { background: var(--bg); }
.toc-label {
  display: block; margin-bottom: 6px; font-family: var(--f-mono); font-size: 14px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; color: var(--ink);
}
.toc ul, .toc-card ul, .toc-inline ul, .toc-inline .toc-row { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li, .toc-card li, .toc-inline li { margin: 0; }
.toc li + li, .toc-card li + li, .toc-inline li + li { margin-top: 0; }
.toc a, .toc-card a, .toc-inline a {
  counter-increment: toc; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0;
  border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; line-height: 1.35;
  color: var(--ink2); text-decoration: none;
}
.toc li:first-child a, .toc-card li:first-child a { border-top: 0; }
.toc a::before, .toc-card a::before, .toc-inline a::before {
  content: counter(toc, decimal-leading-zero); flex: none; min-width: 22px;
  font-family: var(--f-mono); font-size: 14px; font-weight: 600; color: var(--ink2);
}
.toc a:hover, .toc-card a:hover, .toc-inline a:hover {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--or); text-underline-offset: 3px;
}
.toc a:hover::before, .toc-card a:hover::before, .toc-inline a:hover::before { color: var(--ink); }

/* ── Prose column details (layout on top of ui.css .u-prose) ── */
.u-prose strong { color: var(--ink); }
.u-prose ol > li::marker { font-family: var(--f-mono); font-size: .9em; }
.u-prose em { font-style: italic; }

/* tables: keep wide tables scrollable on phones, fit tables shrink */
.table-wrap { max-width: 100%; }
.table-wrap table { min-width: 640px; }
/* a plain .table-wrap with 3 columns or fewer fits the column like .fit,
   so a new section needs no extra class; 4+ columns scroll on phones */
.table-wrap.fit table, .table-wrap table:not(:has(tr > :nth-child(4))) { min-width: 0; }
.u-prose tbody tr:hover td, .u-prose tbody tr:hover th { background: var(--bg2); }
/* row headers (<th scope="row">) keep the look of a body cell */
.u-prose tbody th, .u-table tbody th {
  font-family: var(--f-body); font-size: inherit; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--ink); background: transparent; text-align: left; vertical-align: top;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.u-prose tr:last-child th { border-bottom: 0; }
/* empty corner cell of a header row */
.u-prose thead td, .u-table thead td { background: var(--bg2); border-bottom: 2px solid var(--line2); }
/* key numbers: ink on the green tint (green text on white fails contrast) */
.highlight-col { font-family: var(--f-mono); font-size: 14px; line-height: 1.6; font-weight: 700; color: var(--ink); }
span.highlight-col { padding: 2px 6px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: var(--gdim); box-shadow: inset 0 0 0 1px rgba(22,163,74,.25); }
.u-prose td.highlight-col, .u-prose tbody tr:hover td.highlight-col { color: var(--ink); background: var(--gdim); box-shadow: inset 3px 0 0 var(--green); }

/* callout (orange) and warn (gold) */
.callout, .warn { margin: 28px 0; padding: 18px 22px; border-radius: 0 var(--r2) var(--r2) 0; color: var(--ink); }
.callout { border-left: 4px solid var(--or); background: var(--ordim); }
.warn { border-left: 4px solid var(--gold); background: rgba(245,184,64,.12); }
.u-prose .callout h3, .u-prose .warn h3 {
  margin: 0 0 8px; font-family: var(--f-mono); font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.45;
}
.u-prose .callout h3, .u-prose .warn h3 { color: var(--ink); }
.callout > p, .warn > p { margin: 0; color: var(--ink); }
.callout > * + *, .warn > * + * { margin-top: 8px; }
.u-prose .callout p, .u-prose .warn p { color: var(--ink); }
.rel-label strong { font-family: var(--f-head); font-size: 1.1rem; }

/* FAQ rows (div based) in the u-faq look */
.faq-item { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.u-prose h2 + .faq-item { margin-top: 8px; }
.faq-q { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.faq-a { margin-top: 8px; color: #24385c; line-height: 1.65; }

/* CTA band */
.cta {
  margin: 48px 0 0; padding: clamp(28px, 4vw, 44px);
  background: radial-gradient(640px 280px at 90% -20%, rgba(249,115,22,.16), transparent 60%), var(--nv);
  border: 1px solid var(--nline2); border-radius: var(--r3); color: var(--ntext);
}
.u-prose .cta .cta-h {
  font-family: var(--f-head); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700;
  line-height: 1.15; letter-spacing: -.01em; color: #fff; margin: 0 0 12px;
}
.cta .cta-h strong { font-weight: inherit; color: inherit; }
.u-prose .cta p { color: var(--nt2); max-width: 600px; }
.cta p + p { margin-top: 8px; }
.tool-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cta .tool-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
  border-radius: var(--r); border: 1px solid transparent; background: var(--or); color: var(--nv);
  font-family: var(--f-body); font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: background .15s, box-shadow .15s, border-color .15s;
}
.cta .tool-btn:hover { background: var(--or2); color: var(--nv); box-shadow: 0 6px 20px var(--orglow); text-decoration: none; }
.cta .tool-btn.dark { background: transparent; color: var(--ntext); border-color: var(--nline2); }
.cta .tool-btn.dark:hover { border-color: var(--nt2); box-shadow: none; }
.u-prose .cta + .callout { margin-top: 24px; }

/* ── Hub (study-guides.html): guide library cards, print button ── */
.hub-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; }
.hub-card { display: flex; flex-direction: column; padding-bottom: 8px; }
.u-prose .hub-card h3 { margin: 0 0 8px; }
.u-prose .hub-card p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--ink2); flex: 1; }
.hub-card-links { display: flex; flex-direction: column; }
.hub-card-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 10px 0;
  border-top: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none;
}
.hub-card-links a::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border-top: 2px solid var(--or2); border-right: 2px solid var(--or2); transform: rotate(45deg);
}
.u-prose .hub-card-links a.sec { color: var(--ink2); font-weight: 600; }
.hub-card-links a.sec::after { border-color: var(--ink2); }
.u-prose .hub-card-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--or); text-underline-offset: 3px; }
.print-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: var(--r); background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1.2; cursor: pointer;
}
.print-btn:hover { background: var(--nv3); }

/* ── Test yourself (.u-test): 3 questions after a main H2 section ──
   <section class="u-test"><h3>…</h3><ol><li><p class="u-test-q">…</p>
   <details><summary>Show the answer</summary><p>…</p></details></li>…</ol>
   <a class="u-btn" href="…">…</a></section>
   Opening an answer only adds height below its own summary. */
.u-test {
  margin: 32px 0 0; padding: 24px 24px 26px; counter-reset: utest;
  background: var(--bg2); border: 1px solid var(--line); border-top: 3px solid var(--or); border-radius: var(--r2);
}
.u-prose > .u-test { margin-top: 32px; }
.u-prose .u-test h3 { margin: 0; font-size: clamp(1.2rem, 1.1rem + .4vw, 1.4rem); }
.u-prose .u-test ol { list-style: none; padding: 0; margin: 16px 0 0; }
.u-prose .u-test li { position: relative; margin: 0; padding: 18px 0 18px 44px; border-top: 1px solid var(--line); }
.u-prose .u-test li + li { margin-top: 0; }
.u-test li::before {
  counter-increment: utest; content: counter(utest);
  position: absolute; left: 0; top: 18px; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 14px; font-weight: 700; color: var(--ink);
  background: var(--ordim); border: 1px solid var(--orline);
}
.u-prose .u-test-q { margin: 0; color: var(--ink); font-weight: 700; line-height: 1.5; }
.u-test details { margin-top: 10px; }
.u-test summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; min-width: 44px; padding: 0 18px; border-radius: var(--r);
  background: var(--bg); border: 1px solid var(--line2); color: var(--ink);
  font-size: 15px; font-weight: 700; line-height: 1.2; user-select: none;
}
.u-test summary::-webkit-details-marker { display: none; }
.u-test summary::after {
  content: "+"; flex: none; width: 14px; text-align: center;
  font-family: var(--f-mono); font-size: 18px; line-height: 1; color: var(--ink2);
}
.u-test details[open] summary::after { content: "\2212"; }
.u-test summary:hover { border-color: var(--ink2); }
.u-test details > :not(summary) { color: var(--ink); }
.u-test details > p:first-of-type {
  margin-top: 12px; padding: 14px 16px 0; background: var(--bg);
  border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0;
}
.u-test details > p:last-child {
  padding: 8px 16px 14px; background: var(--bg); margin-top: 0;
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r);
}
.u-test details > p:first-of-type:last-child { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); }
.u-test details > p + p { margin-top: 0; color: var(--ink2); }
.u-prose .u-test details p { color: var(--ink); }
.u-prose .u-test details p + p { color: var(--ink2); }
.u-prose .u-test .u-btn {
  margin-top: 8px; background: var(--or); color: var(--nv); font-weight: 700; text-decoration: none;
}
.u-prose .u-test .u-btn:hover { background: var(--or2); color: var(--nv); box-shadow: 0 6px 20px var(--orglow); }

/* ── Desktop only: no rule line above the first heading of a column ── */
/* script = Ezoic ad spot, stamped before the first h2 by scripts/apply-ads.mjs */
.u-prose > h2:first-child, .u-prose > script:first-child + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
@media (min-width: 961px) {
  .u-prose > .toc-inline:first-child + h2,
  .u-prose > .toc-inline:first-child + script + h2 { margin-top: 0; padding-top: 0; border-top: 0; }
}

/* ── Tablet / phone: one column, inline TOC replaces the side TOC ── */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-in > .tldr, .hero-in > .appdata { grid-column: 1; }
  .hero-in > .appdata { margin-top: 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .layout > aside, .layout > .sidebar, .layout > .side-col,
  .layout > .main-col, .layout > .article-body { grid-column: 1; grid-row: auto; }
  .sidebar .toc, .side-col .toc, .sidebar .toc-card, .toc-stack { display: none; }
  .toc-inline { display: block; background: var(--bg2); }
  .toc-inline li:first-child a { border-top: 1px solid var(--line); }
  .toc-inline ul, .toc-inline .toc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .u-prose > .toc-inline { margin-bottom: 8px; }
  .u-prose > .toc-inline + * { margin-top: 28px; }
}
@media (max-width: 640px) {
  .tldr, .appdata { padding: 18px; }
  .toc-inline ul, .toc-inline .toc-row { grid-template-columns: minmax(0, 1fr); }
  .hub-nav { grid-template-columns: minmax(0, 1fr); }
  .faq-q { font-size: 16px; }
  .u-prose table { font-size: 14px; }
  .u-prose th, .u-prose td { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .byline { column-gap: 16px; }
  .byline span[aria-hidden] { display: none; }
  .u-test { padding: 20px 16px 22px; }
  .u-prose .u-test li { padding-left: 40px; }
}


/* ── Hub v2 (study-guides.html): PDF downloads, section cards, cheat-sheet tables, sample questions ── */
.dl-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.u-prose .dl-row { margin-top: 20px; }
.dl-note { margin-top: 10px; font-size: 14px; }
.u-prose .dl-note { color: var(--ink2); }
.u-hero .vslot[data-video-id] { max-width: 720px; margin-bottom: 0; }
.dl-preview { display: block; width: 100%; max-width: 600px; height: auto; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--r2); }
.hub-card--wide { grid-column: 1 / -1; }
.u-prose .hub-card .hub-card-t { flex: none; margin: 0 0 8px; font-size: 16px; color: var(--ink2); }
.hub-card-t strong { font-family: var(--f-head); font-size: 1.25rem; color: var(--ink); }
.u-prose .hub-card .hub-card-topics { flex: none; margin: -6px 0 18px; font-size: 14px; color: var(--ink2); }
/* cheat sheet: the row header is the number to memorize; the third column is the trap */
.u-prose .cheat tbody th { font-weight: 700; color: var(--ink); }
.has-wrong td:last-child { color: #9a3412; }
/* .appdata inside the article (the hero version is navy) */
.u-prose .appdata { margin: 24px 0 0; background: var(--bg2); border: 1px solid var(--line); border-top: 3px solid var(--green); }
.u-prose .appdata-label { color: #15803d; }
.u-prose .appdata p { color: var(--ink); font-size: 15px; line-height: 1.6; }
.u-prose .appdata p + p { margin-top: 8px; }
.u-prose .appdata .appdata-note { color: var(--ink2); font-size: 14px; }
/* sample questions: the .u-test box without its H3; options lettered A to D */
.u-prose .pq > ol { margin: 0; }
.u-prose .pq > ol > li:first-child { border-top: 0; padding-top: 0; }
.pq > ol > li:first-child::before { top: 0; }
.u-prose .u-test .pq-opts { list-style: upper-alpha; margin: 8px 0 0; padding-left: 1.6em; }
.u-prose .u-test .pq-opts li { padding: 2px 0 2px 4px; border: 0; }
.u-test .pq-opts li::before { content: none; }
.u-prose .cta .cta-h--sm { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); line-height: 1.3; }
.u-prose .cta .tool-grid + p { margin-top: 18px; }
/* phones: a 3-column cheat row reads as a card (number, meaning, the trap) instead of three narrow columns */
@media (max-width: 560px) {
  .has-wrong table, .has-wrong tbody { display: block; }
  .has-wrong thead { display: none; }
  .has-wrong tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .has-wrong tr:last-child { border-bottom: 0; }
  .u-prose .has-wrong tbody th, .u-prose .has-wrong td { display: block; padding: 0; border: 0; }
  .u-prose .has-wrong td { margin-top: 4px; }
  .has-wrong td:empty { display: none; }
  .has-wrong td:last-child::before { content: "Common wrong answer: "; font-weight: 600; color: var(--ink2); }
}

/* Print (the hub's "Print this page", any guide): content only, dark text on white */
@media print {
  header, footer, .mobile-nav, .sidebar, .toc-inline, .breadcrumb, .hero-eyebrow, .dl-row, .dl-note, .dl-preview, .vslot, .cta { display: none !important; }
  .u-hero { background: none !important; padding: 0 !important; border: 0 !important; }
  .u-hero h1, .u-hero h1 em, .u-hero p, .u-hero .byline, .u-hero a { color: #000 !important; }
  .layout { display: block; }
  .table-wrap { overflow: visible; }
  .table-wrap table { min-width: 0 !important; }
  tr, .faq-item, .appdata { break-inside: avoid; }
}
