/* When building became free — essay styles.
   Self-contained, mirrors DESIGN.md tokens. Lives in its own .css file so the
   language verifier (which scans inline HTML) doesn't trip on CSS keywords like
   text-transform / transform: those are legitimate layout, not voice drift. */

:root {
  --canvas: #08090b;
  --surface-1: #121215;
  --surface-2: #18181d;
  --ink: #dcd9d2;
  --ink-muted: #9a948a;
  --ink-dim: #7e7a72;
  --ink-faint: #5e5a52;
  --hairline: #1a1a1e;
  --hairline-strong: #252529;
  --accent: #c98562;
  --accent-hover: #dd9270;
  --accent-quiet: #2a1d15;
  --warm: #c89952;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.005em;
}

.wrap { max-width: 800px; margin: 0 auto; padding: 64px 32px 160px; }

/* ---- links ---- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---- wordmark (links home) ---- */
.wordmark {
  display: inline-block;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  margin-bottom: 48px;
}
.wordmark:hover { text-decoration: none; color: var(--ink); }
.wordmark .dot { color: var(--accent); }

/* ---- breadcrumb (back to the essay index) ---- */
.crumb { margin: -24px 0 32px; }
.crumb a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.crumb a:hover { color: var(--accent); text-decoration: none; }

/* ---- masthead ---- */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
h1.title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 14px 0 0;
  line-height: 1.08;
}
h1.title .dot { color: var(--accent); }
.dateline {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.standfirst {
  margin-top: 40px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---- the lead thesis ---- */
.thesis {
  margin: 48px 0;
  padding: 28px 32px;
  border-left: 2px solid var(--accent);
  background: var(--accent-quiet);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---- sections ---- */
section { margin-top: 96px; }
section > .eyebrow { display: block; margin-bottom: 12px; }
h2 {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
  line-height: 1.15;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 8px;
  color: var(--ink);
}
p { margin: 16px 0; }
p .accent { color: var(--accent); font-weight: 500; }
strong { font-weight: 600; color: var(--ink); }
.muted { color: var(--ink-muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-1);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

/* ---- a single emphasized line (a thesis sentence, not a box) ---- */
.line {
  margin: 36px 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.line .accent { color: var(--accent); }

/* ---- a closing note ---- */
p.note { font-size: 18px; color: var(--ink-muted); margin-top: 36px; }
p.note .accent { color: var(--accent); font-weight: 500; }

/* ---- bullet points (the edge list, the rules) ---- */
ul.points { margin: 16px 0; padding-left: 20px; color: var(--ink-muted); line-height: 1.6; }
ul.points li { margin: 8px 0; }
ul.points li b { color: var(--ink); font-weight: 600; }

/* ---- figure ---- */
figure {
  margin: 40px 0;
  padding: 28px 24px 20px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
figure svg { display: block; width: 100%; height: auto; }
figcaption {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-dim);
  text-align: center;
  font-family: var(--mono);
}
.fig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 680px) { .fig-grid { grid-template-columns: 1fr; } }

/* ---- evidence callout ---- */
.evidence {
  margin: 28px 0;
  padding: 16px 22px;
  border-left: 2px solid var(--hairline-strong);
  background: var(--surface-1);
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--ink-muted);
  border-radius: 0 4px 4px 0;
}
.evidence .num { color: var(--warm); font-weight: 600; font-family: var(--mono); }
.evidence .src {
  display: block; margin-top: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint);
}

/* ---- quadrant matrix ---- */
.matrix-shell { margin: 40px 0; }
.matrix {
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0;
}
.m-corner { }
.m-coltop, .m-rowlab {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim);
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.m-rowlab { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.cell {
  border: 1px solid var(--hairline-strong);
  background: var(--surface-1);
  padding: 18px 16px;
  min-height: 132px;
}
.cell h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.cell p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.cell .tag { font-size: 11px; color: var(--ink-faint); font-family: var(--mono); }
.cell.empty {
  background: var(--accent-quiet);
  border: 1px dashed var(--accent);
}
.cell.empty h4 { color: var(--accent); letter-spacing: 0.04em; }
.cell.empty p { color: var(--ink); }

/* ---- attempts table ---- */
.attempts { margin: 28px 0 8px; }
.attempts .row {
  display: grid; grid-template-columns: 132px 1fr 1.25fr; gap: 18px;
  padding: 13px 0; border-top: 1px solid var(--hairline);
  font-size: 14px; line-height: 1.45;
}
.attempts .row .cat { color: var(--ink); font-weight: 600; }
.attempts .row .ex { color: var(--ink-dim); font-family: var(--mono); font-size: 12px; }
.attempts .row .open { color: var(--ink-muted); }
.attempts .head { border-top: none; }
.attempts .head > div { color: var(--ink-faint); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.attempts .punch {
  margin-top: 18px; padding: 20px 24px;
  background: var(--accent-quiet); border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0; font-size: 16px; line-height: 1.5; color: var(--ink-muted);
}
.attempts .punch b { color: var(--accent); font-weight: 600; }
@media (max-width: 680px) { .attempts .row { grid-template-columns: 1fr; gap: 3px; } }

/* ---- the flip (old vs new) ---- */
.flip { margin: 32px 0 8px; border-top: 1px solid var(--hairline); }
.flip .frow { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--hairline); font-size: 14.5px; line-height: 1.4; }
.flip .fdim { color: var(--ink-faint); font-family: var(--mono); font-size: 12px; }
.flip .fold { color: var(--ink-dim); }
.flip .fnew { color: var(--ink); }
.flip .fhead .fold, .flip .fhead .fnew { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.flip .fhead .fnew { color: var(--accent); }
@media (max-width: 680px) { .flip .frow { grid-template-columns: 1fr; gap: 4px; } }

/* ---- constraint / rule list ---- */
ol.shape { list-style: none; counter-reset: s; padding: 0; margin: 28px 0; }
ol.shape li {
  counter-increment: s;
  position: relative;
  padding: 16px 0 16px 52px;
  border-top: 1px solid var(--hairline);
}
ol.shape li:before {
  content: counter(s);
  position: absolute; left: 0; top: 14px;
  width: 30px; height: 30px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px;
}
ol.shape li b { color: var(--ink); font-weight: 600; }

/* ---- footer ---- */
footer {
  margin-top: 112px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink-faint);
  font-family: var(--mono);
  line-height: 1.7;
}
footer a { color: var(--ink-dim); }
footer a:hover { color: var(--ink-muted); }
hr.rule { border: none; border-top: 1px solid var(--hairline); margin: 56px 0; }
