/* ============================================================
   The Line Ledger — site layer on top of the Gazette template.
   Editorial paper, wine + navy + gold, line diagrams.
   ============================================================ */

:root {
  --paper: #faf6ee;
  --paper-raised: #fffdf7;
  --ink: #211a14;
  --muted: #55503f;
  --faint: #6f6552;
  --burgundy: #74263a;
  --burgundy-deep: #521827;
  --navy: #22364f;
  --gold: #8a5a12;
  --gold-soft: #e2bd72;
  --line: #e2d8c4;
  --line-strong: #2a2419;
  --wash: #f2e9dc;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body { background-color: var(--paper); }

.container { max-width: 1120px; }
.narrow { max-width: 760px; }

/* ---------- masthead ---------- */
.masthead-title a { letter-spacing: -0.01em; }
.masthead-title .tagline { color: var(--gold); }
.masthead-nav a { padding: 6px 0; }
.masthead-nav a[aria-current="page"] { color: var(--burgundy); border-bottom: 1px solid var(--burgundy); padding-bottom: 2px; }
.masthead-top { gap: 18px; }
.masthead.scrolled { box-shadow: 0 10px 28px -26px rgba(33, 26, 20, 0.55); }

/* ---------- shared type ---------- */
.kicker,
.eyebrow {
  display: inline-block;
  color: var(--burgundy);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.74rem;
}
.lede { font-size: 1.16rem; color: var(--muted); max-width: 64ch; }
.small { font-size: 0.86rem; color: var(--faint); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.center { text-align: center; }
.mono-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--burgundy);
  color: #fff;
  border: 1px solid var(--burgundy);
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--burgundy-deep); border-color: var(--burgundy-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.pill {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ---------- home hero ---------- */
.hero-ledger {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.7), rgba(250, 246, 238, 0.2));
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 54px;
  padding: 54px 0 38px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 12px 0 18px;
  max-width: 12ch;
}
.hero-copy h1 em { font-style: italic; color: var(--burgundy); }
.hero-deck { font-size: 1.18rem; line-height: 1.6; color: var(--muted); max-width: 58ch; }
.definition {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  margin: 22px 0;
  font-size: 0.98rem;
  color: var(--ink);
  max-width: 62ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.hero-actions .small { max-width: 34ch; }
.hero-figure {
  border: 1px solid var(--line);
  border-top: 3px double var(--line-strong);
  background: var(--paper-raised);
  padding: 20px 18px 16px;
  box-shadow: 0 14px 36px -28px rgba(33, 26, 20, 0.5);
}
.hero-figure svg { width: 100%; height: auto; display: block; }
.hero-figure figcaption {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.hero-figure .fg-primary { fill: none; stroke: var(--burgundy); stroke-width: 3; stroke-linecap: round; }
.hero-figure .fg-secondary { fill: none; stroke: var(--navy); stroke-width: 2; stroke-dasharray: 4 6; opacity: 0.55; }
.hero-figure .fg-guide { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 5; }
.hero-figure .fg-label { font-family: var(--font-body); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--faint); }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}
.stat-strip div { padding: 16px 22px; border-right: 1px solid var(--line); }
.stat-strip div:last-child { border-right: 0; }
.stat-strip b { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; color: var(--burgundy); }
.stat-strip span { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* ---------- home sections ---------- */
.section { padding: 54px 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; margin-bottom: 28px; align-items: end; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-top: 8px; }
.section-head p { color: var(--muted); max-width: 62ch; }
.section-head .kicker { margin-bottom: 4px; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); background: var(--paper-raised); }
.principle { padding: 24px 22px; border-right: 1px solid var(--line); }
.principle:last-child { border-right: 0; }
.principle .num { font-family: var(--font-head); font-size: 1.9rem; color: var(--gold); line-height: 1; }
.principle h3 { font-size: 1.15rem; margin: 8px 0 6px; }
.principle p { font-size: 0.92rem; color: var(--muted); }

/* ---------- line diagrams ---------- */
.line-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.line-figure svg { width: 100%; height: auto; display: block; }
.line-figure figcaption {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}
.line-figure-sm svg { max-width: 74px; }
.line-figure-md svg { max-width: 138px; }
.line-figure-lg svg { max-width: 200px; }
.lf-axis { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 5; }
.lf-shoulder { stroke: var(--ink); stroke-width: 1.2; opacity: 0.35; }
.lf-primary { fill: none; stroke: var(--burgundy); stroke-width: 3; stroke-linecap: round; }
.lf-primary-blend { stroke-width: 2.2; }
.lf-secondary { fill: none; stroke: var(--navy); stroke-width: 2; stroke-dasharray: 4 5; opacity: 0.55; }
.lf-accent { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.lf-accent circle { fill: var(--gold); stroke: none; }
.lf-guide { fill: none; stroke: var(--navy); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.55; }

/* ---------- test ---------- */
.test-section { padding: 46px 0 64px; background: linear-gradient(180deg, rgba(242, 233, 220, 0.35), transparent 240px); }
.test-container { max-width: 980px; }
.test-heading { text-align: center; max-width: 760px; margin: 0 auto 26px; }
.test-heading h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 8px 0 12px; }
.test-lede { color: var(--muted); }
.quiz-meter {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(250, 246, 238, 0.96);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 12px;
  margin-bottom: 10px;
}
.quiz-meter-text { display: flex; justify-content: space-between; gap: 14px; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
.quiz-meter-track { height: 4px; background: var(--line); overflow: hidden; }
.quiz-meter-track span { display: block; height: 100%; width: 0; background: var(--burgundy); transition: width 0.25s ease; }

.quiz-part { margin: 46px 0 0; }
.quiz-part-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  border-top: 3px double var(--line-strong);
  padding-top: 16px;
  margin-bottom: 8px;
}
.quiz-part-number { font-family: var(--font-head); font-size: 2rem; line-height: 1; color: var(--gold); }
.quiz-part-head h3 { font-size: 1.55rem; margin-bottom: 4px; }
.quiz-part-head p { font-size: 0.92rem; color: var(--muted); max-width: 68ch; }

.quiz-q { border: 0; border-bottom: 1px solid var(--line); padding: 26px 0; margin: 0; min-inline-size: auto; }
.quiz-q legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 5px;
  font-family: var(--font-head);
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.quiz-q-index {
  display: inline-block;
  min-width: 30px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--burgundy);
  vertical-align: 2px;
}
.quiz-q-help { font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; max-width: 70ch; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quiz-option {
  position: relative;
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.quiz-option:hover { border-color: var(--gold); }
.quiz-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiz-option input:focus-visible + .quiz-option-body { outline: 2px solid var(--burgundy); outline-offset: 4px; }
.quiz-option:has(input:checked) {
  border-color: var(--burgundy);
  background: #fff;
  box-shadow: inset 3px 0 0 var(--burgundy);
}
.quiz-option-body { display: block; }
.quiz-option-label { display: block; font-weight: 600; color: var(--ink); line-height: 1.35; }
.quiz-option-hint { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }

.test-section.is-scored .quiz-submit,
.test-section.is-scored .quiz-meter { display: none; }
.test-section.is-scored .quiz-result { scroll-margin-top: 20px; }
.quiz-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 28px 0 8px; }
.quiz-submit-note { flex: 1 1 280px; font-size: 0.8rem; color: var(--faint); }

/* ---------- quiz result ---------- */
.quiz-result { scroll-margin-top: 84px; margin-top: 26px; }
.result-card {
  background: var(--ink);
  color: var(--paper);
  border-top: 6px solid var(--gold);
  padding: 36px 38px 30px;
  box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.8);
}
.result-kicker { color: var(--gold-soft); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.result-head { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; margin: 8px 0 12px; }
.result-head h2 { font-size: clamp(2.3rem, 5vw, 3.4rem); color: var(--paper); line-height: 1; }
.result-sub { color: #c9bda9; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 8px; }
.result-abbr {
  flex: 0 0 auto;
  width: 70px; height: 70px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: var(--gold-soft);
}
.result-lead { color: #e9dfd0; font-size: 1.08rem; max-width: 64ch; }
.result-confidence { display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid rgba(255,255,255,0.16); border-bottom: 1px solid rgba(255,255,255,0.16); padding: 14px 0; margin: 18px 0 12px; }
.result-confidence .pill { color: var(--ink); background: var(--gold-soft); border-color: var(--gold-soft); }
.result-confidence p { font-size: 0.92rem; color: #d8cbb8; }
.result-dominant { font-size: 0.88rem; color: #b9ac99; }
.result-dominant strong { color: var(--paper); }
.result-signals { margin: 24px 0 20px; }
.result-signals-head { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 12px; }
.result-signals-head h3 { color: var(--paper); font-size: 1.15rem; }
.result-signals-head p { font-size: 0.72rem; color: #a99c89; max-width: 44ch; }
.signal { display: grid; grid-template-columns: 108px minmax(0, 1fr) 34px; gap: 10px; align-items: center; margin: 7px 0; }
.signal-head { display: contents; }
.signal-head span { font-size: 0.76rem; color: #c9bda9; }
.signal-head b { grid-column: 3; grid-row: 1; font-size: 0.76rem; color: #c9bda9; text-align: right; font-variant-numeric: tabular-nums; }
.signal-track { grid-column: 2; grid-row: 1; height: 6px; background: rgba(255,255,255,0.14); overflow: hidden; }
.signal-track span { display: block; height: 100%; background: rgba(226, 189, 114, 0.55); }
.signal.is-active .signal-track span { background: var(--gold-soft); }
.signal.is-active .signal-head span,
.signal.is-active .signal-head b { color: var(--paper); font-weight: 700; }
.result-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; border-top: 1px solid rgba(255,255,255,0.16); padding-top: 20px; }
.result-grid h3 { color: var(--paper); font-size: 1.1rem; margin-bottom: 8px; }
.result-grid p, .result-grid li { color: #c9bda9; font-size: 0.9rem; }
.result-list { list-style: none; padding: 0; margin: 0 0 10px; }
.result-list li { position: relative; padding-left: 16px; margin-bottom: 7px; }
.result-list li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }
.result-grid a { color: var(--gold-soft); }
.result-pitfall { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 10px; }
.result-runner { margin: 10px 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.result-actions .btn { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--ink); }
.result-actions .btn:hover { background: var(--paper); border-color: var(--paper); }
.result-actions .btn-quiet { background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.4); }
.result-actions .btn-quiet:hover { background: var(--paper); color: var(--ink); }
.result-card a:focus-visible, .result-card button:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.result-disclaimer { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 22px; padding-top: 12px; font-size: 0.74rem; color: #a99c89; }
.result-disclaimer a { color: var(--gold-soft); }

/* ---------- type cards ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.type-card { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 14px; background: var(--paper-raised); padding: 20px 18px; }
.type-card-figure { position: relative; }
.type-card-abbr {
  display: inline-block;
  margin-left: 7px;
  border: 1px solid var(--line);
  padding: 0 4px;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  vertical-align: middle;
}
.type-card-family { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.type-card h3 { font-size: 1.22rem; margin-bottom: 5px; }
.type-card h3 a { color: var(--ink); text-decoration: none; }
.type-card h3 a:hover { color: var(--burgundy); }
.type-card p { font-size: 0.86rem; color: var(--muted); }
.type-card-note { margin-top: 7px; font-size: 0.76rem !important; color: var(--burgundy) !important; }
.type-card-link { display: inline-block; margin-top: 8px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.type-card-retired { background: #f6eee1; }
.type-card-cta { grid-template-columns: 1fr; background: var(--wash); text-decoration: none; align-content: center; }
.type-card-cta:hover { background: #ece0ce; }
.type-card-cta .type-card-body { display: flex; flex-direction: column; height: 100%; justify-content: center; }
.type-card-cta h3 { color: var(--ink); }
.type-card-cta .type-card-link { margin-top: auto; padding-top: 10px; }
.type-card-retired .type-card-family { color: var(--burgundy); }
.retired-badge {
  display: inline-block;
  margin-left: 6px;
  border: 1px solid var(--burgundy);
  color: var(--burgundy);
  padding: 0 4px;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.family-block { margin-top: 34px; }
.family-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; border-bottom: 3px double var(--line-strong); padding-bottom: 8px; margin-bottom: 1px; }
.family-head h2 { font-size: 1.65rem; }
.family-head p { font-size: 0.82rem; color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- type page ---------- */
.type-hero { border-bottom: 1px solid var(--line); padding: 34px 0 30px; }
.type-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr); gap: 44px; align-items: center; }
.type-hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; margin: 8px 0 10px; }
.type-hero .lede { margin-bottom: 14px; }
.type-hero .line-figure { background: var(--paper-raised); border: 1px solid var(--line); border-top: 3px double var(--line-strong); padding: 18px; }
.type-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.type-badge { border: 1px solid var(--line); background: var(--paper-raised); padding: 4px 9px; font-size: 0.68rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.type-badge-retired { border-color: var(--burgundy); color: var(--burgundy); }
.type-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 52px; padding: 38px 0 60px; }
.type-body h2 { font-size: 1.7rem; margin: 32px 0 12px; }
.type-body h2:first-child { margin-top: 0; }
.type-body p { color: var(--muted); margin-bottom: 14px; max-width: 72ch; }
.type-body ul { margin: 0 0 18px 18px; color: var(--muted); }
.type-body li { margin-bottom: 7px; }
.type-side { align-self: start; position: sticky; top: 24px; }
.side-card { border: 1px solid var(--line); border-top: 3px double var(--line-strong); background: var(--paper-raised); padding: 18px; margin-bottom: 18px; }
.side-card h2 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--font-body); color: var(--faint); margin: 0 0 10px; }
.side-card dl { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; }
.side-card dt { font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.side-card dd { margin: 0 0 4px; font-size: 0.88rem; color: var(--ink); }
.side-card a { font-size: 0.88rem; }
.side-note { font-size: 0.78rem; color: var(--faint); }

.style-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 18px 0 26px; }
.style-table th, .style-table td { border: 1px solid var(--line); padding: 11px 13px; text-align: left; vertical-align: top; background: var(--paper-raised); }
.style-table th { width: 150px; background: var(--wash); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }

.mistype-box { border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--paper-raised); padding: 16px 18px; margin: 22px 0; }
.mistype-box h3 { font-size: 1.1rem; margin-bottom: 5px; }
.mistype-box p { margin: 0; font-size: 0.9rem; }

/* ---------- prose / guides ---------- */
.page-head { border-bottom: 1px solid var(--line); padding: 40px 0 28px; }
.page-head h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); margin: 8px 0 10px; max-width: 22ch; }
.page-head .lede { margin-bottom: 0; }
.page-body { padding: 36px 0 64px; }
.prose-wide { max-width: 860px; }
.prose-wide h2 { font-size: 1.65rem; margin: 34px 0 12px; }
.prose-wide h2:first-child { margin-top: 0; }
.prose-wide h3 { font-size: 1.2rem; margin: 24px 0 8px; }
.prose-wide p { color: var(--muted); margin-bottom: 14px; }
.prose-wide ul, .prose-wide ol { margin: 0 0 16px 20px; color: var(--muted); }
.prose-wide li { margin-bottom: 6px; }
.prose-wide .dropcap::first-letter { color: var(--burgundy); }
.prose-wide a { text-underline-offset: 3px; }

.fact-box { border: 1px solid var(--line); border-left: 4px solid var(--navy); background: var(--paper-raised); padding: 16px 18px; margin: 22px 0; font-size: 0.92rem; color: var(--muted); }
.fact-box p:last-child { margin-bottom: 0; }
.warn-box { border-left-color: var(--burgundy); }

.breadcrumbs { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding-top: 16px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); opacity: 0.45; }
.breadcrumbs a { color: var(--muted); }

.compare-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 22px 0; }
.compare-wrapper .compare-table { margin: 0; }
@media (max-width: 640px) {
  .compare-wrapper--fit .compare-table { min-width: 0; font-size: 0.8rem; }
  .compare-wrapper--fit .compare-table th,
  .compare-wrapper--fit .compare-table td { padding: 8px 8px; }
}
.weights-body { overflow-x: auto; }
.weights-table { min-width: 560px; }
.compare-table th { background: var(--navy); }
.compare-table td { background: var(--paper-raised); }
.compare-table td:first-child { background: var(--wash); }

/* ---------- FAQ ---------- */
.faq-block { margin-top: 36px; }
.faq-block h2 { font-size: 1.65rem; margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { flex: 0 0 auto; color: var(--burgundy); font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; }
.faq-mark::before { content: "+"; }
.faq-item[open] .faq-mark::before { content: "–"; }
.faq-item p { color: var(--muted); padding: 0 0 16px; max-width: 72ch; }

/* ---------- footer ---------- */
.colophon { border-top: 3px double var(--line-strong); background: var(--paper-raised); }
.colophon-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; padding-top: 34px; }
.colophon-brand a { font-family: var(--font-head); font-size: 1.65rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.colophon-brand p { font-size: 0.86rem; color: var(--muted); margin-top: 4px; max-width: 30ch; }
.colophon-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.colophon-heading { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 8px; }
.colophon-cols a { display: block; font-size: 0.85rem; color: var(--muted); text-decoration: none; margin-bottom: 5px; }
.colophon-cols a:hover { color: var(--burgundy); }
.colophon-legal { border-top: 1px solid var(--line); margin-top: 28px; padding: 16px 24px 40px; font-size: 0.74rem; color: var(--faint); }
.colophon-legal p { margin-bottom: 5px; max-width: 92ch; }
.colophon-sources { margin-top: 8px; }
.colophon-sources a { color: var(--burgundy); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-figure { max-width: 420px; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .type-hero .line-figure { max-width: 320px; }
  .type-body { grid-template-columns: 1fr; gap: 30px; }
  .type-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .side-card { margin-bottom: 0; }
  .result-grid { grid-template-columns: 1fr; gap: 24px; }
  .colophon-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 720px) {
  .hero-grid { padding-top: 34px; }
  .hero-copy h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip div:nth-child(2) { border-right: 0; }
  .stat-strip div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .principles { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: 0; }
  .type-grid { grid-template-columns: 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-part-head { grid-template-columns: 1fr; gap: 2px; }
  .quiz-part-number { font-size: 1.4rem; }
  .result-card { padding: 26px 20px 22px; }
  .result-head { flex-direction: row; gap: 12px; align-items: flex-start; }
  .result-abbr { width: 48px; height: 48px; font-size: 1.1rem; }
  .result-confidence { flex-direction: column; gap: 8px; }
  .result-signals-head { display: block; }
  .result-signals-head p { margin-top: 4px; }
  .signal { grid-template-columns: 92px minmax(0, 1fr) 30px; }
  .type-side { grid-template-columns: 1fr; }
  .colophon-cols { grid-template-columns: 1fr 1fr; }
  .quiz-meter-text { font-size: 0.64rem; }
  .masthead-top span:nth-child(3) { display: none; }
  .masthead-top { font-size: 0.62rem; letter-spacing: 0.08em; }
  .masthead-title .tagline {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    line-height: 1.5;
    max-width: 34ch;
    margin: 6px auto 0;
  }
  .type-hero .line-figure { max-width: 220px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-actions .btn { width: 100%; }
  .hero-figure { padding: 14px; }
  .test-section { padding-top: 32px; }
  .quiz-q legend { font-size: 1.16rem; }
  .result-actions .btn { width: 100%; }
  .stat-strip div { padding: 12px 16px; }
  .colophon-cols { grid-template-columns: 1fr; }
}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .quiz-meter-track span { transition: none; }
}

@media print {
  .masthead, .colophon, .back-top, .quiz-meter, .quiz-submit, .hero-actions { display: none !important; }
  .result-card { color: #000; background: #fff; border: 1px solid #000; }
  .result-card h2, .result-card h3, .result-signals-head h3 { color: #000; }
  .result-card p, .result-card li { color: #222; }
}
