/* Nicole LeBlanc, portfolio 2.0 — case study system.
   Tokens are lifted from nicoleleblanc.design (cream ground, warm ink, square corners,
   Inter headings + Lora body). Layout: one narrow reading column
   that breaks out to a wide column for evidence, charts and screenshots. */

:root {
  --bg: #fcfbf8;
  --card: #ffffff;
  --sand: #f4f2eb;
  --sand-2: #ebe6da;
  --ink: #36302a;
  --ink-2: #655849;
  --accent: #987b5d;
  --accent-ink: #7a5f47;
  --line: #dad4c8;
  --pos: #3f6b52;
  --risk: #a3523a;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Lora", Georgia, "Times New Roman", serif;
  --wide: 1120px;
  --read: 680px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--sand-2); }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%; max-width: calc(var(--wide) + 2 * 32px); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px), 32px);
  padding-right: max(20px, env(safe-area-inset-right, 0px), 32px);
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
.read { max-width: var(--read); }

/* ---------- header / footer ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; padding-block: 12px; }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -0.5px; text-decoration: none; }
.site-header nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.site-header nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.site-header nav svg { width: 18px; height: 18px; }

.site-footer { margin-top: 120px; border-top: 1px solid var(--line); background: var(--sand); }
.site-footer .inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding-block: 72px; align-items: end; }
.site-footer h3 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -0.8px; margin: 0 0 12px; }
.site-footer p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.btn { display: inline-block; background: var(--ink); color: var(--bg); font-weight: 500; text-decoration: none; padding: 16px 32px; border: 1px solid var(--ink); transition: background .15s, color .15s; }
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.site-footer .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.site-footer .email { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
@media (max-width: 800px) { .site-footer .inner { grid-template-columns: 1fr; } .site-footer .actions { justify-content: flex-start; } }

/* ---------- type ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 14px; }
.back { display: inline-flex; gap: 8px; font-size: 14px; color: var(--ink-2); text-decoration: none; margin-top: 40px; }
.back:hover { color: var(--ink); }
h1, h2, h3, h4, h5, h6 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-weight: 600; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-weight: 600; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
h4 { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.lede { font-family: var(--sans); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; color: var(--ink-2); max-width: 36em; margin: 28px 0 0; }
p { margin: 0 0 1em; }
.body p, .body li { font-size: 17px; line-height: 1.7; color: var(--ink); max-width: var(--read); }
.body p.muted, .muted { color: var(--ink-2); }
.small { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.body strong { font-weight: 600; }

/* ---------- hero ---------- */
.hero { padding-block: 24px 64px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 56px 0 0; border-top: 1px solid var(--ink); }
.facts > div { padding: 16px 24px 0 0; }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 6px 0 0; font-size: 15px; line-height: 1.45; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr 1fr; row-gap: 20px; } }
@media (max-width: 440px) { .facts { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats > div { padding: 36px 28px 32px 0; }
.stats > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-n { font-family: var(--display); font-weight: 600; font-size: clamp(56px, 7vw, 92px); line-height: .95; letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.stat-n small { font-size: .5em; letter-spacing: 0; }
.stat-l { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); max-width: 28ch; }
@media (max-width: 800px) {
  .stats, .stats.four { grid-template-columns: 1fr; }
  .stats > div, .stats > div + div { padding: 24px 0; border-left: 0; }
  .stats > div + div { border-top: 1px solid var(--line); }
}

/* ---------- at-a-glance ---------- */
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 56px; }
.glance > div { background: var(--sand); padding: 28px 28px 32px; }
.glance h4 { margin-bottom: 14px; color: var(--accent-ink); }
.glance p { margin: 0; font-size: 16px; line-height: 1.6; }
@media (max-width: 800px) { .glance { grid-template-columns: 1fr; } }

/* ---------- toc ---------- */
.toc { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 48px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.toc ol::-webkit-scrollbar { display: none; }
.toc a { display: block; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 14px 0 12px; border-bottom: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- sections ---------- */
section.s { padding-top: 104px; }
section.s > .head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; margin-bottom: 48px; }
section.s > .head .eyebrow { margin-bottom: 18px; }
section.s > .head .intro { font-size: 18px; line-height: 1.65; color: var(--ink-2); margin: 6px 0 0; max-width: 56ch; }
@media (max-width: 860px) { section.s > .head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 36px; } section.s { padding-top: 80px; } }
.stack-v > * + * { margin-top: 40px; }

/* ---------- screenshots ---------- */
.shot { margin: 0; }
.shot .frame { background: var(--card); border: 1px solid var(--line); padding: 10px; cursor: zoom-in; }
.shot img { width: 100%; height: auto; border: 1px solid var(--sand-2); }
.shot figcaption { margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--ink-2); max-width: 70ch; }
.shot figcaption b { font-weight: 600; color: var(--ink); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; margin-right: 8px; }
.shot--missing .frame { aspect-ratio: 2 / 1; display: grid; place-items: center; text-align: center; padding: 24px; cursor: default;
  background: repeating-linear-gradient(135deg, var(--sand) 0 12px, var(--bg) 12px 24px); color: var(--ink-2); font-size: 13px; }
.shot--missing .frame img { display: none; }
.shot--missing .frame::after { content: attr(data-missing); max-width: 38ch; line-height: 1.5; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .shots, .shots.three { grid-template-columns: 1fr; } }
dialog.lb { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; max-height: 94dvh; overscroll-behavior: contain; }
dialog.lb::backdrop { background: rgba(32, 27, 22, .82); }
dialog.lb img { max-width: 96vw; max-height: 90vh; max-height: 90dvh; width: auto; margin: auto; object-fit: contain; background: #fff; }
dialog.lb button { position: absolute; top: 8px; right: 8px; font: 600 13px var(--sans); background: var(--bg); border: 1px solid var(--ink); padding: 8px 14px; cursor: pointer; }

/* ---------- callout ---------- */
.callout { border: 1px solid var(--ink); background: var(--card); padding: 28px 32px; }
.callout h4 { color: var(--accent-ink); margin-bottom: 12px; }
.callout p { margin: 0; font-size: 17px; line-height: 1.65; max-width: 62ch; }
.callout p + p { margin-top: .8em; }
.callout.soft { border-color: var(--line); background: var(--sand); }
.callout.warn { border-color: var(--risk); }
.callout.warn h4 { color: var(--risk); }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); margin-top: 8px; }
.roles > div { padding: 22px 24px 8px 0; }
.roles > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.roles h4 { margin-bottom: 8px; }
.roles p { margin: 0; font-size: 15px; line-height: 1.6; }
@media (max-width: 800px) { .roles { grid-template-columns: 1fr; } .roles > div, .roles > div + div { padding: 20px 0; border-left: 0; } .roles > div + div { border-top: 1px solid var(--line); } }

/* ---------- pipeline ---------- */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--ink); background: var(--card); }
.pipe > li { list-style: none; padding: 26px 24px 28px; position: relative; display: flex; flex-direction: column; gap: 12px; }
.pipe > li + li { border-left: 1px solid var(--line); }
.pipe > li:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 34px; width: 13px; height: 13px; background: var(--card); border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transform: rotate(45deg); z-index: 1; }
.pipe .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.pipe h3 { font-size: 28px; }
.pipe p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.pipe .ex { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.pipe .ex b { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
ol.pipe { margin: 0; padding: 0; }
@media (max-width: 900px) {
  .pipe { grid-template-columns: 1fr 1fr; }
  .pipe > li:nth-child(3) { border-left: 0; }
  .pipe > li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pipe > li::after { display: none; }
}
@media (max-width: 560px) { .pipe { grid-template-columns: 1fr; } .pipe > li + li { border-left: 0; border-top: 1px solid var(--line); } }
.formula { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; padding: 22px 28px; background: var(--sand); border: 1px solid var(--line); font-family: var(--display); font-size: clamp(22px, 2.6vw, 32px); font-weight: 600; letter-spacing: -.01em; }
.formula .op { color: var(--accent-ink); font-weight: 500; }
.formula .tag { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); flex-basis: 100%; }

/* ---------- three-up cards (neutral) ---------- */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 20px; }
.cards.two { --cols: 2; } .cards.four { --cols: 4; }
.card { background: var(--card); border: 1px solid var(--line); padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 10px; }
.card .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.card h3 { font-size: 24px; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.card.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card.dark p, .card.dark .k { color: #d9d0c2; }
.card.dark h3 { color: var(--bg); }
@media (max-width: 960px) { .cards, .cards.four { --cols: 2; } }
@media (max-width: 600px) { .cards, .cards.two, .cards.four { --cols: 1; } }

/* ---------- gap diagram ---------- */
.gap { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 0; align-items: stretch; }
.gap > div { padding: 28px; border: 1px solid var(--line); background: var(--card); }
.gap > div + div { border-left: 0; }
.gap .miss { background: repeating-linear-gradient(135deg, var(--sand) 0 10px, var(--bg) 10px 20px); }
.gap .fill { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gap .fill h3, .gap .fill .k { color: var(--bg); }
.gap .fill p { color: #d9d0c2; }
.gap h3 { font-size: 24px; margin: 6px 0 10px; }
.gap p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.gap .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
@media (max-width: 860px) { .gap { grid-template-columns: 1fr; } .gap > div + div { border-left: 1px solid var(--line); border-top: 0; } }

/* ---------- charts ---------- */
.chart { background: var(--card); border: 1px solid var(--line); padding: 32px 32px 28px; }
.chart > h4 { margin-bottom: 4px; }
.chart > .t { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.2; margin: 0 0 24px; max-width: 34em; letter-spacing: -.01em; }
.chart > .src { margin: 22px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); max-width: 80ch; }
.bars { display: grid; gap: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) 76px; align-items: center; gap: 16px; }
.bar-row .l { font-size: 14px; line-height: 1.35; }
.bar-row .track { height: 28px; background: var(--sand); position: relative; }
.bar-row .track i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); }
.bar-row .track i.a { background: var(--accent); }
.bar-row .track i.o { background: transparent; border: 1px solid var(--ink); }
.bar-row .v { font-family: var(--display); font-size: 26px; font-weight: 600; text-align: right; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em; }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr 64px; row-gap: 6px; } .bar-row .l { grid-column: 1 / -1; } }

.before-after { display: grid; gap: 0; }
.ba { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr) 120px; gap: 20px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.ba:first-child { border-top: 0; padding-top: 4px; }
.ba .l { font-size: 14px; line-height: 1.35; }
.ba .pair { display: grid; gap: 6px; }
.ba .pair > div { display: grid; grid-template-columns: 52px minmax(0, 1fr) 64px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.ba .pair .tr { height: 14px; background: var(--sand); position: relative; }
.ba .pair .tr i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--line); }
.ba .pair .after .tr i { background: var(--ink); }
.ba .pair b { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.ba .delta { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--pos); text-align: right; letter-spacing: -.01em; line-height: 1; }
.ba .delta small { display: block; font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--ink-2); margin-top: 4px; letter-spacing: 0; }
@media (max-width: 700px) { .ba { grid-template-columns: 1fr 96px; } .ba .l { grid-column: 1 / -1; } .ba .pair { grid-column: 1; } }

.dots { display: flex; flex-wrap: wrap; gap: 6px; max-width: 520px; }
.dots i { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); display: block; }
.dots i.f { background: var(--ink); }
.dots.sq i { border-radius: 0; width: 34px; height: 34px; }
.dots.sq i.f { background: var(--ink); }
.dots.sq i.n { border-style: dashed; border-color: var(--risk); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; gap: 8px; align-items: center; }
.legend i { width: 12px; height: 12px; display: inline-block; border: 1.5px solid var(--ink); }
.legend i.f { background: var(--ink); } .legend i.n { border: 1.5px dashed var(--risk); } .legend i.r { border-radius: 50%; }
.chart-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 860px) { .chart-split { grid-template-columns: 1fr; gap: 28px; } }
.bignum { font-family: var(--display); font-weight: 600; font-size: clamp(64px, 9vw, 112px); line-height: .9; letter-spacing: -.03em; font-variant-numeric: lining-nums; }
.bignum small { font-size: .42em; letter-spacing: 0; color: var(--ink-2); font-weight: 500; }

.segbar { display: flex; height: 64px; border: 1px solid var(--ink); }
.segbar > div { display: flex; flex-direction: column; justify-content: center; padding: 0 16px; flex: var(--f) 1 0; min-width: 0; color: var(--bg); background: var(--ink); }
.segbar > div:nth-child(2) { background: var(--accent-ink); }
.segbar > div:nth-child(3) { background: var(--ink-2); }
.segbar b { font-family: var(--display); font-size: 28px; line-height: 1; }
.segbar span { font-size: 12px; margin-top: 4px; opacity: .9; }
.segnotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.segnotes p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.segnotes b { color: var(--ink); font-weight: 600; }
@media (max-width: 700px) { .segnotes { grid-template-columns: 1fr; } .segbar b { font-size: 22px; } .segbar { height: 72px; } .segbar span { font-size: 11px; } }

/* ---------- spectrum (engagement model) ---------- */
.spectrum { background: var(--card); border: 1px solid var(--line); padding: 32px; }
.spectrum .axis { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; gap: 12px; }
.spectrum .arrow { height: 2px; background: var(--ink); position: relative; margin-bottom: 20px; }
.spectrum .arrow::before, .spectrum .arrow::after { content: ""; position: absolute; top: -4px; width: 9px; height: 9px; border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.spectrum .arrow::before { left: 0; transform: rotate(-45deg); transform-origin: left; }
.spectrum .arrow::after { right: 0; transform: rotate(135deg); transform-origin: right; }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; }
.levels li { padding: 20px 16px 22px; border: 1px solid var(--line); border-left-width: 0; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.levels li:first-child { border-left-width: 1px; }
.levels li:nth-child(1) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.levels li:nth-child(2) { background: var(--accent-ink); color: var(--bg); border-color: var(--accent-ink); }
.levels li:nth-child(3) { background: var(--accent); color: #1f1a15; border-color: var(--accent); }
.levels li:nth-child(4) { background: var(--sand-2); }
.levels li:nth-child(5) { background: var(--sand); }
.levels .n { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.levels .m { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.levels p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.levels .who { margin-top: auto; padding-top: 10px; border-top: 1px solid currentColor; font-size: 12px; opacity: .85; }
@media (max-width: 900px) { .levels { grid-template-columns: 1fr; } .levels li { border-left-width: 1px; border-top-width: 0; } .levels li:first-child { border-top-width: 1px; } .spectrum .axis { flex-direction: column; gap: 2px; } }

/* ---------- table ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--card); }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; min-width: 640px; }
table.t th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding: 14px 18px; background: var(--sand); border-bottom: 1px solid var(--ink); }
table.t td { padding: 16px 18px; border-top: 1px solid var(--line); vertical-align: top; }
table.t tr:first-child td { border-top: 0; }
table.t td.m { font-family: var(--display); font-size: 24px; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; font-variant-numeric: lining-nums; }
table.t td b { font-weight: 600; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border: 1px solid var(--ink); }
.chip.fill { background: var(--ink); color: var(--bg); }
.chip.soft { border-color: var(--line); color: var(--ink-2); }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 1px; background: var(--ink); }
.timeline li { position: relative; padding: 0 0 36px 52px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 19px; height: 19px; border: 1px solid var(--ink); background: var(--bg); border-radius: 50%; }
.timeline li.turn::before { background: var(--ink); }
.timeline .when { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.timeline h3 { font-size: 26px; margin: 4px 0 8px; }
.timeline p { margin: 0; max-width: 62ch; font-size: 16.5px; line-height: 1.65; }
.timeline blockquote { margin: 14px 0 0; padding: 14px 20px; background: var(--sand); border-left: 2px solid var(--ink); font-family: var(--display); font-size: 22px; line-height: 1.35; max-width: 52ch; }
.timeline blockquote cite { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; color: var(--ink-2); margin-top: 6px; }

/* ---------- tradeoffs ---------- */
.trade { display: grid; gap: 0; border: 1px solid var(--ink); background: var(--card); }
.trade > div { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); }
.trade > div + div { border-top: 1px solid var(--line); }
.trade .h { background: var(--sand); border-bottom: 1px solid var(--ink); }
.trade .h span { padding: 12px 22px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.trade > div > * { padding: 22px; margin: 0; font-size: 15px; line-height: 1.55; }
.trade > div > * + * { border-left: 1px solid var(--line); }
.trade .h > * { padding: 12px 22px; }
.trade h3 { font-size: 24px; }
.trade .got b, .trade .gave b { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.trade .got b { color: var(--pos); } .trade .gave b { color: var(--risk); }
@media (max-width: 800px) {
  .trade > div { grid-template-columns: 1fr; }
  .trade .h { display: none; }
  .trade > div > * + * { border-left: 0; border-top: 1px dashed var(--line); }
}

/* ---------- ladder (confidence tiers) ---------- */
.ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.rung { background: var(--card); border: 1px solid var(--ink); padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.rung:nth-child(1) { min-height: 240px; background: var(--sand); border-color: var(--line); }
.rung:nth-child(2) { min-height: 300px; }
.rung:nth-child(3) { min-height: 360px; background: var(--ink); color: var(--bg); }
.rung .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.rung:nth-child(3) .k { color: #d9c9b2; }
.rung h3 { font-size: 26px; }
.rung:nth-child(3) h3 { color: var(--bg); }
.rung p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.rung:nth-child(3) p { color: #d9d0c2; }
.rung .ev { margin-top: auto; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding-top: 12px; border-top: 1px solid currentColor; }
.ladder-axis { display: flex; justify-content: space-between; margin-top: 12px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 800px) { .ladder { grid-template-columns: 1fr; } .rung, .rung:nth-child(n) { min-height: 0; } }

/* ---------- flow (prompt → answer) ---------- */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: f; }
.flow > li { list-style: none; border: 1px solid var(--line); border-left-width: 0; background: var(--card); padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.flow > li:first-child { border-left-width: 1px; }
.flow .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.flow h3 { font-size: 22px; }
.flow p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.flow > li.check { background: var(--sand); }
ol.flow { margin: 0; padding: 0; }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; } .flow > li:nth-child(3) { border-left-width: 1px; } .flow > li:nth-child(n+3) { border-top-width: 0; } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } .flow > li { border-left-width: 1px; border-top-width: 0; } .flow > li:first-child { border-top-width: 1px; } }

/* ---------- two-sided diagram ---------- */
.two-sided { display: grid; grid-template-columns: 1fr 72px 1fr; align-items: stretch; }
.two-sided .side { background: var(--card); border: 1px solid var(--line); padding: 26px; }
.two-sided .mid { display: grid; place-items: center; }
.two-sided .mid span { writing-mode: vertical-rl; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.two-sided h3 { font-size: 24px; margin: 6px 0 12px; }
.two-sided ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14.5px; }
.two-sided li { padding: 10px 14px; border: 1px solid var(--line); background: var(--bg); }
.two-sided .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
@media (max-width: 760px) { .two-sided { grid-template-columns: 1fr; } .two-sided .mid { padding: 10px; } .two-sided .mid span { writing-mode: horizontal-tb; } }

.stackprice { display: grid; gap: 0; border: 1px solid var(--ink); background: var(--card); }
.stackprice > div { display: grid; grid-template-columns: 1fr auto; padding: 14px 20px; gap: 20px; border-top: 1px solid var(--line); font-size: 15px; align-items: baseline; }
.stackprice > div:first-child { border-top: 0; }
.stackprice b { font-weight: 600; }
.stackprice span.s { color: var(--ink-2); font-size: 13px; }
.stackprice .total { background: var(--ink); color: var(--bg); font-family: var(--display); font-size: 24px; font-weight: 600; border-top: 1px solid var(--ink); }
.stackprice .total span.s { color: #d9d0c2; font-family: var(--sans); }

/* ---------- chain ---------- */
.chain { display: flex; flex-wrap: wrap; gap: 0; align-items: stretch; }
.chain > span { padding: 14px 18px; border: 1px solid var(--ink); border-left-width: 0; font-size: 14px; font-weight: 500; background: var(--card); display: flex; align-items: center; }
.chain > span:first-child { border-left-width: 1px; }
.chain > span.now { background: var(--ink); color: var(--bg); }
.chain > span.next { background: var(--sand); border-style: dashed; }

/* ---------- pager & index cards ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); margin-top: 104px; }
.pager a { display: block; padding: 32px 0 0; text-decoration: none; }
.pager a + a { text-align: right; }
.pager .k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pager .tt { font-family: var(--display); font-size: clamp(24px, 3vw, 36px); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin-top: 8px; display: block; }
.pager a:hover .tt { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.pager a:only-child { grid-column: 1 / -1; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.work { display: flex; flex-direction: column; gap: 0; text-decoration: none; background: var(--card); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.work:hover { border-color: var(--ink); }
.work .thumb { aspect-ratio: 16 / 10; background: var(--sand); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; display: grid; place-items: center; }
.work .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.work .thumb.missing img { display: none; }
.work .thumb.missing::after { content: attr(data-missing); font-size: 12px; color: var(--ink-2); padding: 20px; text-align: center; }
.work .thumb.missing { background: repeating-linear-gradient(135deg, var(--sand) 0 12px, var(--bg) 12px 24px); }
.work .meta { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.work .tag { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.work h3 { font-size: 30px; line-height: 1.1; }
.work .d { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.work .proof { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.work .proof span { font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); background: var(--bg); }
.work .proof span b { font-family: var(--display); font-size: 18px; font-weight: 700; margin-right: 6px; }
.work .go { font-size: 14px; font-weight: 600; display: inline-flex; gap: 8px; }
.work:hover .go { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 800px) { .work-grid { grid-template-columns: 1fr; } }

.spine { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.spine > div { padding: 16px 16px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.spine b { display: block; font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
@media (max-width: 800px) { .spine { grid-template-columns: 1fr 1fr; row-gap: 18px; } }

.earlier { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; padding-block: 56px; border-top: 1px solid var(--line); align-items: start; }
.earlier:first-of-type { border-top: 1px solid var(--ink); }
.earlier .co { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
.earlier h3 { font-size: 34px; margin: 10px 0 14px; }
.earlier p { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 54ch; }
.earlier ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.earlier ul li { font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--line); background: var(--card); }
.mini-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 28px; }
.mini-shots.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-shots .shot figcaption { font-size: 12px; }
@media (max-width: 860px) { .earlier { grid-template-columns: 1fr; gap: 28px; } .mini-shots { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .mini-shots, .mini-shots.two { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
