@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --silver: #E4E8EB;
  --ink: #17222C;
  --bronze: #9A5B33;
  --bronze-text: #7A4624;
  --steel: #6E7F8E;
  --muted: #455461;
  --gold: #D1A02B;
  --gold-deep: #96700F;
  --bad: #B23A2E;
  --ok: #1F8A5B;
  --blue: #2F6FC0;
  --bg-bronze: #E9E1D8;
  --bg-silver: #DEE4E9;
  --bg-gold: #F1E9D2;
  --rule: rgba(23, 34, 44, 0.22);
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--silver);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--silver);
  padding: 0.6rem 1rem; border-radius: var(--radius);
  font-family: var(--display); z-index: 30;
}
.skip:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(228, 232, 235, 0.93);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 3.5rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-stretch: 85%; font-size: 1.05rem; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; }
.nav a { font-family: var(--display); font-weight: 500; font-size: 0.95rem; text-decoration: none; color: var(--muted); padding-block: 0.3rem; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }

/* Layers */
.layer-bronze { background: var(--bg-bronze); }
.layer-silver { background: var(--bg-silver); }
.layer-gold { background: var(--bg-gold); }

.layer-head { padding-top: clamp(3rem, 7vw, 5.5rem); }
.layer-word {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(5.5rem, 22vw, 19rem);
  line-height: 0.82;
  letter-spacing: -0.035em;
  margin-left: -0.04em;
  white-space: nowrap;
  user-select: none;
}
.layer-word-bronze { color: rgba(154, 91, 51, 0.5); }
.layer-word-silver { color: rgba(110, 127, 142, 0.6); }
.layer-word-gold { color: var(--gold); }
.layer-sub { margin-top: 1rem; max-width: 30em; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.4; }

.js .layer-word .ch {
  display: inline-block;
  transform: translateY(var(--y, 0)) rotate(var(--r, 0deg));
  transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) var(--d, 0s);
}
.js .layer-word.is-clean .ch { transform: none; }

.js .raw {
  opacity: 0.5;
  transform: translateX(var(--rx, 0)) rotate(var(--rr, 0deg));
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.2, 1) var(--rd, 0s), opacity 0.5s ease var(--rd, 0s);
}
.js .raw.is-clean { opacity: 1; transform: none; }

/* Gates between layers */
.gate {
  background: var(--ink);
  color: var(--silver);
  border-bottom: 5px solid var(--gold);
  padding: 1.15rem 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
}
.gate-inner { display: flex; align-items: center; justify-content: center; gap: 0.7rem; }
.gate svg { width: 1.3rem; height: 1.3rem; flex: none; }

/* Layer meter */
.meter {
  position: fixed; right: 1.1rem; top: 50%; transform: translateY(-50%);
  z-index: 15; display: none; flex-direction: column; gap: 0.9rem;
  font-family: var(--display); font-size: 0.85rem;
}
.meter-item { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; color: var(--muted); text-decoration: none; padding: 0.15rem 0.2rem; }
.meter-item:hover span { text-decoration: underline; text-decoration-thickness: 2px; color: var(--ink); }
.meter-item i { width: 0.8rem; height: 0.8rem; border-radius: 2px; border: 2px solid currentColor; flex: none; }
.meter-item.is-active { color: var(--ink); font-weight: 700; }
.meter-item.is-active i { background: var(--m, var(--ink)); border-color: var(--ink); }
.meter-bronze { --m: var(--bronze); }
.meter-silver { --m: var(--steel); }
.meter-gold { --m: var(--gold); }
@media (min-width: 1280px) { .meter { display: flex; } }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) 0; }
.name {
  font-family: var(--display); font-weight: 800; font-stretch: 78%;
  font-size: clamp(3.4rem, 12.5vw, 10rem); line-height: 0.92; letter-spacing: -0.03em;
}
.lead { max-width: 34em; margin-top: clamp(1.25rem, 3vw, 2rem); font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.75rem; }

.btn {
  appearance: none; display: inline-block; border: 0;
  background: var(--ink); color: var(--silver);
  font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 0.95rem 1.35rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: #2B3B49; }
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.btn-ghost {
  display: inline-block; background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: calc(0.95rem - 1.5px) calc(1.35rem - 1.5px); text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { background: var(--ink); color: var(--silver); }

.pipe-block { margin-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.pipe {
  position: relative; height: clamp(250px, 34vw, 360px);
  border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden; background: #EEF1F3;
}
.zones { position: absolute; inset: 0; display: grid; grid-template-columns: 36fr 32fr 32fr; }
.zone { display: flex; flex-direction: column; padding: 0.85rem 1rem; gap: 0.1rem; }
.zone-bronze { background: rgba(154, 91, 51, 0.09); }
.zone-silver { background: rgba(110, 127, 142, 0.12); }
.zone-gold { background: rgba(209, 160, 43, 0.14); }
.zone-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.zone-bronze .zone-name { color: var(--bronze-text); }
.zone-silver .zone-name { color: var(--muted); }
.zone-gold .zone-name { color: #6F5210; }
.zone-note { font-size: 0.9rem; color: var(--muted); line-height: 1.3; }
.gate-label {
  position: absolute; bottom: 0.6rem; transform: translateX(-50%);
  font-family: var(--display); font-weight: 500; font-size: 0.82rem; color: var(--ink);
  background: #EEF1F3; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.15rem 0.55rem; white-space: nowrap;
}
.gate-1 { left: 36%; }
.gate-2 { left: 68%; }
#pipe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.pipe-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.75rem; margin-top: 1rem; }
.tally { display: flex; gap: 1.25rem; font-family: var(--display); font-size: 1rem; color: var(--muted); }
.tally b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 0.2em; }
.log { flex: 1 1 18rem; font-size: 1rem; color: var(--muted); min-height: 1.6em; }
.log.is-bad { color: var(--bad); }
.pipe-caption { margin-top: 0.75rem; font-size: 0.95rem; font-style: italic; color: var(--muted); max-width: 46em; }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.layer-head + .section { padding-top: clamp(2rem, 4vw, 3rem); }
.section + .section { border-top: 1px solid var(--rule); }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split-head h2 {
  font-family: var(--display); font-weight: 700; font-stretch: 88%;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; letter-spacing: -0.015em;
}
.split-body { max-width: 44rem; }
@media (min-width: 761px) { .split-head { position: sticky; top: 5rem; } }
.split-body > p { max-width: 36em; }

/* Ledger (used for migration scale, rejected rules and scoring) */
.ledger { margin-top: 2rem; border-top: 1px solid var(--rule); }
.ledger-row {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 6rem;
  align-items: center; gap: 1rem; padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.ledger-label { font-family: var(--display); font-weight: 500; font-size: 1rem; line-height: 1.3; }
.ledger-bar { display: block; height: 0.7rem; background: rgba(23, 34, 44, 0.07); border-radius: 2px; position: relative; }
.ledger-bar::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w);
  background: var(--bar, var(--gold)); border-radius: 2px;
}
.ledger-count { text-align: right; font-family: var(--display); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* Flagship project */
.project { padding-top: clamp(2rem, 4vw, 3rem); }
.project-title {
  font-family: var(--display); font-weight: 800; font-stretch: 82%;
  font-size: clamp(2.4rem, 6.4vw, 5.2rem); line-height: 0.98; letter-spacing: -0.025em; max-width: 14em;
}
.project-lede { max-width: 38em; margin-top: 1.4rem; font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; }
.project-lede + .project-lede { margin-top: 0.9rem; }
.project .actions { margin-top: 1.6rem; }
.project-note { margin-top: 0.9rem; font-size: 0.95rem; font-style: italic; color: var(--muted); }

.proj-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem clamp(1.5rem, 4vw, 3rem); margin-top: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.sub-h { font-family: var(--display); font-weight: 650; font-stretch: 92%; font-size: 1.3rem; line-height: 1.2; }
.panel-sub { margin-top: 0.3rem; color: var(--muted); font-size: 1rem; }

.stack { display: flex; gap: 2px; height: 2.4rem; margin-top: 1rem; }
.seg { display: block; height: 100%; width: var(--w); transition: width 1.1s cubic-bezier(0.2, 0.9, 0.2, 1); }
.stack.is-empty .seg { width: 0; }
.seg:first-child { border-radius: 4px 0 0 4px; }
.seg:last-child { border-radius: 0 4px 4px 0; }
.seg-ok { background: var(--ok); }
.seg-dup { background: var(--blue); }
.seg-bad { background: repeating-linear-gradient(45deg, var(--bad) 0 6px, #8A2A20 6px 10px); }

.legend { margin-top: 0.9rem; border-top: 1px solid var(--rule); }
.legend li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding-block: 0.55rem; border-bottom: 1px solid var(--rule); }
.sw { width: 0.9rem; height: 0.9rem; border-radius: 2px; display: block; }
.sw-ok { background: var(--ok); }
.sw-dup { background: var(--blue); }
.sw-bad { background: repeating-linear-gradient(45deg, var(--bad) 0 3px, #8A2A20 3px 5px); }
.legend b { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 1.05rem; }

.stages { margin-top: 1.6rem; border-top: 1px solid var(--rule); }
.stage {
  display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto; gap: 0.2rem 0.7rem;
  padding-block: 0.7rem; border-bottom: 1px solid var(--rule); align-items: start;
}
.stage::before {
  content: ""; width: 0.85rem; height: 0.85rem; margin-top: 0.3rem; border-radius: 50%;
  border: 2px solid var(--steel); background: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  grid-row: 1 / span 2;
}
.stage.is-done::before { background: var(--gold); border-color: var(--ink); }
.st-name { font-family: var(--display); font-weight: 650; font-size: 1.02rem; }
.st-time { font-family: var(--display); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.95rem; }
.st-what { grid-column: 2 / span 2; font-size: 1rem; color: var(--muted); line-height: 1.45; }
.stage-total { display: flex; justify-content: space-between; padding-top: 0.7rem; font-family: var(--display); font-weight: 650; }

.console-wrap { position: sticky; top: 5rem; }
.console {
  background: #0F1A22; color: #D6DFE6; border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.6;
  padding: 1rem 1.1rem; margin-top: 0.9rem; height: 27rem; overflow: auto;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.console .t { color: #8CA0B0; }
.console .warn { color: #E7B955; }
.console .err { color: #F59A8F; }
.console .ok { color: #8FD9A8; }
.console .cur::after { content: "\2588"; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.proj-block { margin-top: clamp(2.5rem, 6vw, 4rem); }
.proj-block > .sub-h { margin-bottom: 0.3rem; }
.ledger-bad { --bar: var(--bad); margin-top: 1rem; }
.ledger-bad .ledger-row { grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr) 5rem; }
.ledger-bad .ledger-count { font-size: 1.1rem; }
.rule-id { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); font-weight: 400; margin-top: 0.15rem; }

.score { margin-top: 1rem; border-top: 1px solid var(--rule); }
.score div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; border-bottom: 1px solid var(--rule); }
.score dt { font-family: var(--display); font-weight: 500; }
.score dd { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.2rem; }

.gold-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem clamp(1.5rem, 4vw, 3rem); margin-top: 1.2rem; align-items: start; }

.chart { position: relative; margin-top: 0.6rem; }
.chart-plot {
  position: relative; height: 15rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px;
  align-items: end; border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(to top, transparent calc(33.33% - 1px), rgba(23,34,44,0.13) calc(33.33% - 1px), rgba(23,34,44,0.13) 33.33%, transparent 33.33%),
    linear-gradient(to top, transparent calc(66.66% - 1px), rgba(23,34,44,0.13) calc(66.66% - 1px), rgba(23,34,44,0.13) 66.66%, transparent 66.66%);
}
.bar {
  position: relative; height: var(--h); background: var(--gold-deep);
  border-radius: 4px 4px 0 0; cursor: default; outline-offset: 2px;
  transform-origin: bottom; transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) var(--bd, 0s);
}
.js .chart:not(.is-in) .bar { transform: scaleY(0.04); }
.bar:hover, .bar:focus-visible { background: #7C5A08; }
.bar-val {
  position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%);
  font-family: var(--display); font-weight: 700; font-size: 0.8rem; white-space: nowrap;
}
.chart-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 0.4rem; font-family: var(--display); font-size: 0.8rem; color: var(--muted); text-align: center; }
.tip {
  position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--silver);
  border-radius: var(--radius); padding: 0.45rem 0.7rem; font-family: var(--display); font-size: 0.85rem; line-height: 1.35;
  transform: translate(-50%, -100%); white-space: nowrap; opacity: 0; transition: opacity 0.1s ease;
}
.tip.is-on { opacity: 1; }
.chart-cap { margin-top: 0.7rem; font-size: 0.95rem; color: var(--muted); font-style: italic; }

.table-wrap { overflow-x: auto; margin-top: 0.6rem; }
.data { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.data th { text-align: left; font-family: var(--display); font-weight: 600; font-size: 0.88rem; color: var(--muted); padding: 0.4rem 0.7rem 0.5rem 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.data td { padding: 0.55rem 0.7rem 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 0.7rem; }
.data th.num { padding-left: 0.7rem; }

.rejects { margin-top: 1rem; border-top: 1px solid var(--rule); }
.reject { padding-block: 0.9rem; border-bottom: 1px solid var(--rule); display: grid; gap: 0.15rem; }
.reject-id { font-family: var(--display); font-weight: 700; }
.reject-bad { font-family: var(--mono); font-size: 0.88rem; }
.reject-bad mark { background: rgba(178, 58, 46, 0.16); color: var(--ink); padding: 0.05em 0.3em; border-radius: 3px; }
.reject-why { color: var(--muted); font-size: 1rem; }

/* Silver: work and experience */
.piece { padding-block: 1.8rem; border-bottom: 1px solid var(--rule); border-left: 6px solid var(--steel); padding-left: 1.4rem; transition: border-color 0.2s ease; }
.piece:hover, .piece:focus-within { border-left-color: var(--gold); }
.piece:first-child { padding-top: 1.8rem; }
.piece h3 { font-family: var(--display); font-weight: 700; font-stretch: 88%; font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.01em; }
.piece p { margin-top: 0.6rem; max-width: 36em; }
.piece .stack-line { font-size: 0.97rem; color: var(--muted); font-style: italic; }

.timeline { position: relative; padding-left: 1.75rem; border-left: 3px solid var(--steel); }
.stop { position: relative; padding-bottom: 2.6rem; }
.stop:last-child { padding-bottom: 0; }
.stop::before {
  content: ""; position: absolute; left: calc(-1.75rem - 8px); top: 0.35rem; width: 14px; height: 14px;
  background: var(--gold); border: 2px solid var(--bg-silver); box-shadow: 0 0 0 2px var(--steel); border-radius: 50%;
}
.when { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.stop h3 { margin-top: 0.15rem; font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.2; }
.where { color: var(--muted); font-size: 1rem; }
.plain { margin-top: 0.9rem; display: grid; gap: 0.55rem; max-width: 38em; }
.plain li { position: relative; padding-left: 1.1rem; }
.plain li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.4rem; height: 2px; background: var(--bronze); }

/* Gold: toolkit, certifications, publications, contact */
.toolkit { border-top: 2px solid var(--ink); }
.toolkit > div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 0.3rem 1.5rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.toolkit dt { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--muted); }
.toolkit dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.3; }
.sub { margin-top: 3rem; font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: 1.5rem; line-height: 1.2; }
.certs { margin-top: 0.9rem; border-top: 2px solid var(--ink); }
.certs li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.25; }
.yr { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 1rem; font-weight: 500; }
.papers { margin-top: 0.9rem; display: grid; gap: 1rem; }
.papers li { padding-left: 1.1rem; border-left: 5px solid var(--gold); max-width: 34em; font-size: 1.2rem; line-height: 1.4; }

.contact { padding-bottom: clamp(4rem, 9vw, 7rem); }
.contact-title { font-family: var(--display); font-weight: 800; font-stretch: 80%; font-size: clamp(2.6rem, 8vw, 6.4rem); line-height: 0.95; letter-spacing: -0.03em; max-width: 12em; }
.mega {
  display: inline-block; margin-top: 2rem; max-width: 100%;
  font-family: var(--display); font-weight: 700; font-stretch: 90%;
  font-size: clamp(1.35rem, 4.6vw, 3.6rem); line-height: 1.1; letter-spacing: -0.02em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 100% 0.14em;
  transition: background-size 0.25s ease;
}
.mega:hover { background-size: 100% 100%; }
.contact-lede { margin-top: 1.4rem; max-width: 30em; font-size: 1.3rem; line-height: 1.45; }
.links { margin: 1.6rem 0 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }

.foot { padding-block: 2rem 3rem; border-top: 1px solid var(--rule); font-size: 0.95rem; color: var(--muted); background: var(--bg-gold); }

/* Smaller screens */
@media (max-width: 900px) {
  .proj-cols, .gold-cols { grid-template-columns: minmax(0, 1fr); }
  .console-wrap { position: static; }
  .console { height: 20rem; }
}
@media (max-width: 760px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .ledger-row { grid-template-columns: minmax(0, 1fr) 5.5rem; row-gap: 0.4rem; }
  .ledger-bad .ledger-row { grid-template-columns: minmax(0, 1fr) 5rem; }
  .ledger-bar { grid-column: 1 / -1; grid-row: 2; }
  .toolkit > div { grid-template-columns: minmax(0, 1fr); }
  .zone { padding: 0.6rem; }
  .zone-name { font-size: 1rem; }
  .zone-note { font-size: 0.78rem; }
  .gate-label { font-size: 0.7rem; padding: 0.1rem 0.35rem; }
  .top-inner { padding-block: 0.5rem; }
  .chart-months span:nth-child(even) { visibility: hidden; }
  .bar-val { font-size: 0.7rem; }
  .gate { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn-ghost, .mega, .piece, .seg, .stage::before { transition: none; }
  .js .layer-word .ch, .js .raw { transform: none; opacity: 1; transition: none; }
  .js .chart:not(.is-in) .bar { transform: none; }
  .bar { transition: none; }
  .console .cur::after { animation: none; }
}

.grid-label { position: absolute; left: 0; font-family: var(--display); font-size: 0.75rem; color: var(--muted); pointer-events: none; }
