/* ============================================================================
   Page-level styles — home, curriculum index, glossary, memorize, exam,
   capstone, certificate. Built from the same tokens as everything else.
   ========================================================================== */

/* ---------------------------------------------------------------- Home hero */
.hero { padding: var(--s8) 0 var(--s7); position: relative; }
.hero__eyebrow { margin-bottom: var(--s4); }
.hero h1 { font-size: var(--fs-display); max-width: 16ch; font-weight: 500; }
.hero__lead { margin-top: var(--s5); font-size: var(--fs-lead); color: var(--text-2);
  max-width: 56ch; line-height: var(--lh-snug); }
.hero__actions { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.hero__meta { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s5);
  color: var(--text-3); font-size: var(--fs-small); }
.hero__meta b { color: var(--text-2); font-weight: 500; }

/* Monolith motif — a quiet standing form echoing the firm's "what stands" art */
.hero__art { position: absolute; right: var(--gut); top: 0; bottom: 0; width: 32%;
  max-width: 380px; pointer-events: none; opacity: 0.9; }
@media (max-width: 980px) { .hero__art { display: none; } }

/* ---------------------------------------------------- Curriculum index grid */
.curric { margin-top: var(--s4); }
.curric__row {
  display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s4); align-items: baseline;
  padding: var(--s4) 0; border-top: 1px solid var(--line); text-decoration: none;
  transition: background 0.15s var(--ease);
}
.curric__row:hover { background: rgba(255,255,255,0.02); }
.curric__row:last-child { border-bottom: 1px solid var(--line); }
.curric__num { font-family: var(--mono); font-size: 0.92rem; color: var(--text-3); }
.curric__row:hover .curric__num { color: var(--steel); }
.curric__t { }
.curric__t b { font-family: var(--serif); font-weight: 500; font-size: 1.22rem; color: var(--text);
  display: block; }
.curric__t span { color: var(--text-2); font-size: var(--fs-small); display: block; margin-top: 4px;
  max-width: 64ch; }
.curric__tag { font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--steel); border: 1px solid var(--steel-line); border-radius: 2px; padding: 3px 8px;
  align-self: center; white-space: nowrap; }
.curric__done { color: var(--good); font-size: 0.8rem; align-self: center; }

/* Section eyebrow header used on home + section pages */
.shead { margin: var(--s8) 0 var(--s4); }
.shead .eyebrow { display: block; margin-bottom: var(--s2); }
.shead h2 { max-width: 24ch; }
.shead p { margin-top: var(--s3); color: var(--text-2); }

/* Feature row (how it works) */
.feature { padding-top: var(--s4); }
.feature h4 { margin-bottom: var(--s2); }
.feature p { color: var(--text-2); font-size: 0.95rem; }
.feature__n { font-family: var(--mono); font-size: 0.78rem; color: var(--steel); display: block;
  margin-bottom: var(--s2); }

/* ----------------------------------------------------------- Glossary page */
.gloss-controls { position: sticky; top: 60px; z-index: 20; padding: var(--s4) 0;
  background: linear-gradient(180deg, var(--navy) 70%, transparent); }
.search {
  width: 100%; max-width: 520px; font-family: var(--sans); font-size: 1rem; color: var(--text);
  background: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 12px 16px;
}
.search:focus { border-color: var(--steel); outline: none; }
.gloss-group { margin-top: var(--s5); }
.gloss-group__letter { font-family: var(--serif); color: var(--steel); font-size: 1.6rem;
  padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.gloss { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.gloss__head { display: flex; align-items: baseline; gap: var(--s3); }
.gloss__term { font-size: 1.12rem; color: var(--text); font-weight: 600; }
.gloss__ess { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel);
  border: 1px solid var(--steel-line); border-radius: 2px; padding: 2px 6px; }
.gloss__def { color: var(--text-2); margin-top: var(--s2); max-width: 70ch; }
.gloss__meta { display: flex; gap: var(--s4); margin-top: var(--s3); font-size: var(--fs-small);
  color: var(--text-3); align-items: center; }
.gloss__aka { font-style: italic; }
.gloss__mod { color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.gloss__mod:hover { color: var(--steel); }

/* ----------------------------------------------------- Memorize / flashcards */
.memo-intro { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center;
  justify-content: space-between; }

/* ------------------------------------------------------------------- Exam */
.exam-q { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.exam-q__n { font-family: var(--mono); font-size: 0.8rem; color: var(--steel); }
.exam-q__stem { font-size: var(--fs-lead); color: var(--text); margin: var(--s2) 0 var(--s3);
  line-height: var(--lh-snug); }
.exam-opt { display: block; cursor: pointer; padding: 11px 14px; margin-top: var(--s2);
  border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--text-2);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease); }
.exam-opt:hover { border-color: var(--steel); color: var(--text); }
.exam-opt input { margin-right: 10px; }
.exam-opt.is-correct { border-color: var(--good); background: var(--good-soft); color: var(--text); }
.exam-opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--text); }
.exam-expl { display: none; margin-top: var(--s3); padding: var(--s3) var(--s4);
  border-left: 2px solid var(--steel); background: var(--steel-soft); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-2); font-size: 0.95rem; }
.exam-expl.is-shown { display: block; }
.exam-score { text-align: center; padding: var(--s6); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); background: var(--panel); margin-bottom: var(--s5); }
.exam-score__big { font-family: var(--serif); font-size: 3.4rem; color: var(--text); }
.exam-score__ring { color: var(--steel); }

/* --------------------------------------------------------------- Certificate */
.cert-frame {
  background: var(--navy-deep); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: clamp(28px, 6vw, 64px); position: relative; aspect-ratio: 1.414 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); max-width: 920px; margin-inline: auto;
}
.cert-frame::after { content: ""; position: absolute; inset: 14px; border: 1px solid var(--line);
  pointer-events: none; }
.cert__eyebrow { letter-spacing: 0.28em; }
.cert__name { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.4rem); color: var(--text);
  border-bottom: 1px solid var(--line-2); padding-bottom: var(--s3); margin-top: var(--s3); }
.cert__body { color: var(--text-2); max-width: 60ch; margin-top: var(--s4); }
.cert__row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s4);
  margin-top: var(--s5); }
.cert__sig { font-size: var(--fs-small); color: var(--text-3); }
.cert__sig b { color: var(--text-2); display: block; font-weight: 500; }
.cert-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center;
  margin-top: var(--s5); justify-content: center; }
.cert-controls input {
  font-family: var(--sans); font-size: 1rem; color: var(--text); background: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 11px 14px; min-width: 280px;
}
.cert-controls input:focus { border-color: var(--steel); outline: none; }
.cert__top { display: flex; align-items: center; gap: 14px; }
.cert__top .wordmark-img { height: clamp(20px, 3.2vw, 28px); }
.cert__sub { font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--text-2); padding-left: 12px; border-left: 1px solid var(--line-2); }
.cert__mid { text-align: center; }
.cert__eyebrow { display: block; color: var(--steel); margin-bottom: var(--s3); }
.cert__pre { color: var(--text-3); font-size: var(--fs-small); margin: 0; }
.cert__name { display: inline-block; min-width: 50%; max-width: 100%; text-align: center;
  word-break: break-word; }
.cert__body { margin-inline: auto; text-align: center; }
.cert-stage { overflow-x: auto; }

/* Print: isolate the certificate to one landscape page, keep the brand. */
@media print {
  .masthead, .sidenav, #foot, #pager, .page-head, #cert-status,
  .cert-controls, #cert-hint, .disclaimer, .skip-link { display: none !important; }
  html, body { background: var(--navy) !important; }
  .app, .app--with-nav { display: block !important; min-height: 0 !important; }
  .main { padding: 0 !important; min-height: 0 !important; }
  .wrap { max-width: none !important; padding: 0 !important; }
  .cert-stage { margin: 0 !important; overflow: visible !important; }
  /* Size by height so the 1.414 frame never exceeds one landscape page. */
  .cert-frame { height: 184mm !important; width: auto !important; max-width: none !important;
    aspect-ratio: 1.414 / 1; margin: 0 auto !important; box-shadow: none !important;
    border-color: var(--line-2) !important; }
  .cert__name { font-size: 2.6rem !important; }
  .cert__body { font-size: 0.95rem !important; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* ----------------------------------------------------------------- Callout list helper */
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 30px; margin-top: var(--s3); color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px;
  border: 1px solid var(--steel-line); border-radius: 3px; }
.checklist li.ok::after { content: "✓"; position: absolute; left: 3px; top: 2px; color: var(--steel);
  font-size: 0.8rem; }

/* KPI stat row */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s4);
  margin: var(--s5) 0; }
.stat { border-left: 1px solid var(--line-2); padding-left: var(--s3); }
.stat b { font-family: var(--serif); font-size: 1.9rem; color: var(--text); display: block; line-height: 1.1; }
.stat span { font-size: var(--fs-small); color: var(--text-3); display: block; margin-top: 6px; }

/* ============================================================ Cheat sheet */
.cheat-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center;
  margin: var(--s4) 0 var(--s6); }
.cheat-actions .fine { color: var(--text-3); }

/* Dense, multi-column reference. Cards flow and pack like a printed card. */
.sheet { column-count: 3; column-gap: var(--s4); }
.sheet > .fcard { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  display: inline-block; width: 100%; margin: 0 0 var(--s4); }
@media (max-width: 1080px) { .sheet { column-count: 2; } }
@media (max-width: 680px)  { .sheet { column-count: 1; } }

.fcard { border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--panel-soft, rgba(255,255,255,.015)); padding: 14px var(--s4) 6px; }
.fcard > h3 { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--steel); margin: 0 0 4px; }
.fcard > .fcard__mod { font-size: 0.66rem; color: var(--text-3); letter-spacing: 0.04em; }
.frows { margin: 8px 0 0; }
.frow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3);
  padding: 7px 0; border-top: 1px solid var(--line); }
.frow:first-child { border-top: 0; }
.frow dt, .frow .frow__n { color: var(--text-2); font-size: 0.86rem; flex: 0 1 auto; }
.frow dd, .frow .frow__f { margin: 0; text-align: right; white-space: nowrap; flex: 0 0 auto;
  font-size: 0.9rem; color: var(--text); }
.frow .katex { font-size: 0.96em; }
.fcard .note { font-size: 0.78rem; color: var(--text-3); margin: 6px 0 8px; }

/* Print and PDF: drop the chrome, keep comfortable type, and let the cards flow
   across as many clean landscape pages as readability needs (never shrunk to
   cram onto one). The navy brand is preserved. */
.sheet-brand { display: none; }
@media print {
  .masthead, .sidenav, #foot, #pager, .cheat-actions, .skip-link,
  .page-head, .disclaimer-print-hide { display: none !important; }
  html, body { background: var(--navy) !important; }
  .app, .app--with-nav { display: block !important; min-height: 0 !important; }
  .main { padding: 0 !important; min-height: 0 !important; }
  .wrap { max-width: none !important; padding: 0 !important; }
  .sheet { column-count: 3; column-gap: 18px; }
  .sheet > .fcard { margin-bottom: 16px; }
  .fcard { padding: 13px 16px 8px; }
  .fcard > h3 { font-size: 0.74rem; margin-bottom: 5px; }
  .frow { padding: 8px 0; }
  .frow .frow__n { font-size: 0.9rem; }
  .frow .frow__f { font-size: 0.95rem; }
  .frow .katex { font-size: 1em; }
  .fcard .note { font-size: 0.82rem; margin: 7px 0 9px; line-height: 1.5; }
  .sheet-brand { display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; border-bottom: 1px solid var(--line-2); padding-bottom: 10px; margin-bottom: 16px; }
  .sheet-brand .wordmark { font-size: 1.1rem; letter-spacing: 0.2em; }
  .sheet-brand .wordmark-img { height: 26px; }
  .sheet-brand .fine { color: var(--text-3); font-size: 0.72rem; }
  @page { size: A4 landscape; margin: 13mm; }
}

/* ============================================================ Capstone chooser */
.cap-choose { margin: var(--s5) 0 var(--s5); }
.cap-choose__label { display:block; margin-bottom: var(--s3); }
.capco { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.capco__tab { text-align: left; padding: var(--s4); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); background: rgba(255,255,255,.015); color: var(--text-2);
  cursor: pointer; font-family: var(--sans); transition: border-color .15s, background .15s; }
.capco__tab b { display: block; color: var(--text); font-size: 1.05rem; font-weight: 500; }
.capco__tab .capco__tk { font-size: var(--fs-small); letter-spacing: .14em; color: var(--text-3); }
.capco__tab small { display: block; margin-top: 7px; color: var(--text-3); font-size: .8rem; line-height: 1.35; }
.capco__tab:hover { border-color: var(--steel-line); }
.capco__tab.is-active { border-color: var(--steel); background: rgba(138,170,214,.09); }
.capco__tab.is-active .capco__tk { color: var(--steel); }
@media (max-width: 680px) { .capco { grid-template-columns: 1fr; } }

.cap-panel[hidden] { display: none; }
.cap-panel__co { font-family: var(--sans); font-weight: 600; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel); display: flex; align-items: center; gap: var(--s3); }
.cap-panel__co::before { content: ""; width: 18px; height: 1px; background: var(--steel); }

/* Valuation result summary */
.vsum { width: 100%; border-collapse: collapse; margin: var(--s4) 0; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; }
.vsum td { padding: 11px var(--s4); border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--text-2); }
.vsum td:last-child { text-align: right; font-family: var(--mono); color: var(--text); white-space: nowrap; }
.vsum tr:last-child td { border-bottom: 0; }
.vsum .vsum__hl td { background: rgba(138,170,214,.07); color: var(--text); font-weight: 500; }

/* Collapsible guided walkthrough */
.walk { border: 1px solid var(--line-2); border-radius: var(--radius-lg); margin: var(--s5) 0;
  background: rgba(255,255,255,.012); }
.walk > summary { cursor: pointer; padding: var(--s4) var(--s4); font-family: var(--sans); font-weight: 500;
  color: var(--text); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.walk > summary::-webkit-details-marker { display: none; }
.walk > summary .walk__hint { font-weight: 400; color: var(--text-3); font-size: var(--fs-small); }
.walk > summary::after { content: "Show \002B"; color: var(--steel); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap; }
.walk[open] > summary::after { content: "Hide \2013"; }
.walk__body { padding: 0 var(--s4) var(--s2); border-top: 1px solid var(--line); }
.walk__body h4 { margin-top: var(--s4); }

/* ---- Final exam pass/fail + locked states ------------------------------- */
.exam-score.is-pass { border-color: rgba(127,176,138,.4); background: var(--good-soft); }
.exam-score.is-fail { border-color: rgba(201,160,99,.4); background: var(--warn-soft); }
.exam-score.is-pass .exam-score__big { color: var(--good); }
.exam-score.is-fail .exam-score__big { color: var(--warn); }
.exam-score p { color: var(--text-2); margin-top: var(--s2); }
.exam-score a { color: var(--steel); }
.exam-locked { text-align: left; }
.exam-locked p { color: var(--text-2); }

/* ---- Certificate: read-only name + serialized verify line --------------- */
.cert-name-display { font-size: var(--fs-small); color: var(--text-3); }
.cert-name-display b { color: var(--text); font-weight: 500; font-size: var(--fs-body);
  margin-left: 8px; font-family: var(--serif); }
.cert__verify { display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line);
  font-size: var(--fs-small); }
.cert__id { font-family: var(--mono); color: var(--steel); letter-spacing: .04em; }
.cert__vline { color: var(--text-3); }

/* ---- Home: locked curriculum row + progress/resume panel ---------------- */
.curric__row.is-locked { opacity: .55; cursor: not-allowed; }
.curric__row.is-locked:hover { background: none; }
.curric__lock { color: var(--text-3); font-size: .9rem; }
.home-status { margin-top: var(--s5); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  background: rgba(138,170,214,.06); padding: var(--s4) var(--s5); }
.home-status__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.home-status__info { min-width: 0; flex: 1 1 320px; }
.home-status__line { margin: 6px 0 0; color: var(--text-2); }
.home-status__line b { color: var(--text); font-weight: 600; }
.home-status__bar { height: 4px; background: rgba(255,255,255,.10); border-radius: 2px; margin-top: 10px;
  max-width: 420px; overflow: hidden; }
.home-status__bar i { display: block; height: 100%; background: var(--steel); }
