/* Trenyx — site design system v3 (2026-09-07). Static, one CSS file, no JS.
   Voice: a published record, not a terminal. Light-first, cool off-white ground,
   verdigris accent (a seal), ink-biased neutrals. Dark theme redefines tokens only.
   Type: Fraunces (display) · Source Sans 3 (body) · JetBrains Mono (hashes, ids, verdicts).
   Every class name from v2 is kept, so page markup and copy are untouched. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Source+Sans+3:wght@400;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light dark;
  --bg: #F2F4F3;  --surface: #E8ECEA;  --surface-2: #DFE5E2;
  --border: #CBD3D0;  --border-strong: #A9B5B1;
  --text: #14201D;  --muted: #3E4C48;  --faint: #6E7B77;
  --accent: #1F6F62;  --accent-ink: #F2F4F3;  --accent-strong: #185A50;  --accent-dim: #D9EAE5;
  --up: #2E7D4F;  --red: #B33A2B;  --hold: #B8821A;  --hold-dim: #F5E8C9;  --red-dim: #F3DCD8;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0F1A18;  --surface: #162422;  --surface-2: #1C2D2A;
  --border: #2C3B38;  --border-strong: #3F524E;
  --text: #E6ECEA;  --muted: #B7C4C0;  --faint: #7F918C;
  --accent: #5FB7A5;  --accent-ink: #0F1A18;  --accent-strong: #78C9B8;  --accent-dim: #1B3733;
  --up: #6CC08E;  --red: #E0705F;  --hold: #D9A64A;  --hold-dim: #3A2E14;  --red-dim: #3A1F1B; } }
:root[data-theme="dark"] {
  --bg: #0F1A18;  --surface: #162422;  --surface-2: #1C2D2A;
  --border: #2C3B38;  --border-strong: #3F524E;
  --text: #E6ECEA;  --muted: #B7C4C0;  --faint: #7F918C;
  --accent: #5FB7A5;  --accent-ink: #0F1A18;  --accent-strong: #78C9B8;  --accent-dim: #1B3733;
  --up: #6CC08E;  --red: #E0705F;  --hold: #D9A64A;  --hold-dim: #3A2E14;  --red-dim: #3A1F1B; }

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 17px/1.55 var(--sans);
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
p { text-wrap: pretty; }

/* ---- nav ---- */
header { position: sticky; top: 0; z-index: 10; background: var(--bg);
         border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 28px; min-height: 64px; flex-wrap: wrap; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .word { font: 600 21px/1 var(--display); letter-spacing: -0.01em; text-transform: lowercase; }
.brand .word::first-letter { text-transform: uppercase; }   /* Trenyx: capital T, rest lowercase */
.brand .yx { color: inherit; }   /* one colour for the whole wordmark: the ink token (light in dark theme, ink in light) */
.brand .mark-d { flex-shrink: 0; }
.brand .mark-d .ln { stroke: var(--faint); }
.brand .mark-d .ck { stroke: var(--accent); }
.nav .links { display: flex; gap: 4px 18px; margin-left: auto; flex-wrap: wrap; }
.nav .links a { color: var(--muted); font-size: 15px; font-weight: 400; padding: 4px 0;
                border-bottom: 1px solid transparent; }
.nav .links a:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); }
.nav .links a.active { color: var(--text); border-bottom-color: var(--accent); }
.up { color: var(--up); } .dn { color: var(--red); }

/* ---- hero ---- */
.hero { padding: 64px 0 44px; border-bottom: 1px solid var(--border); background: var(--bg); }
.hero + .section { padding-top: 40px; }
.eyebrow { font: 400 12px var(--mono); letter-spacing: 0.12em;
           text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
h1 { font: 600 clamp(36px, 5.6vw, 56px)/1.04 var(--display); letter-spacing: -0.01em;
     max-width: 20ch; text-wrap: balance; }
.hero .lead { margin: 18px 0 22px; max-width: 60ch; }
.lead { color: var(--muted); font-size: 21px; line-height: 1.45; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-block; border-radius: 2px; padding: 10px 16px;
       font-weight: 600; font-size: 15.5px; border: 1px solid var(--accent); color: var(--accent);
       transition: background .15s ease, color .15s ease; }
.btn:hover { text-decoration: none; background: var(--accent-dim); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn.ghost { border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-dim); }

/* ---- stat strip (the receipts) ---- */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.stats .row { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 22px 20px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: none; }
.stat b { display: block; font: 600 1.6rem/1.1 var(--display); color: var(--text);
          font-variant-numeric: tabular-nums; }
.stat span { font-size: 13.5px; color: var(--faint); line-height: 1.4; display: block; margin-top: 6px; }

/* ---- sections ---- */
.section { padding: 52px 0 10px; }
.section:last-of-type { padding-bottom: 40px; }
.section > .wrap > :first-child,
.section > .wrap > .prose > :first-child { margin-top: 0; }
h2 { font: 500 30px/1.15 var(--display); margin: 8px 0 14px; text-wrap: balance; }
h3 { font: 600 22px/1.2 var(--display); margin-bottom: 8px; text-wrap: balance; }
.section > .wrap > p, .prose p { color: var(--muted); max-width: 68ch; margin-bottom: 14px; }
.prose h2 { margin-top: 44px; }
.prose b { color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
         gap: 18px 28px; margin: 24px 0 8px; }
.card { background: transparent; border: 0; border-top: 2px solid var(--accent);
        border-radius: 0; padding: 12px 0 0; }
.card .tag { font: 400 12px var(--mono); letter-spacing: 0.12em;
             text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }
.card a.more { display: inline-block; margin-top: 12px; font-size: 15.5px; font-weight: 600; }

/* ---- terminal block (the run log, styled as a receipt) ---- */
.term { background: var(--surface); border: 1px solid var(--border); border-radius: 0;
        padding: 18px 22px; font: 13px/1.65 var(--mono); color: var(--muted);
        overflow-x: auto; margin: 22px 0; white-space: pre; }
.term .ok { color: var(--up); }
.term .bad, .term .halt { color: var(--red); }
.term .dim { color: var(--faint); }
.term .hl { color: var(--text); }
.ok { color: var(--up); } .halt { color: var(--red); }

/* ---- callout ---- */
.rule { border-left: 2px solid var(--border-strong); background: transparent;
        border-radius: 0; padding: 2px 0 2px 16px; color: var(--muted);
        font-size: 16px; margin: 22px 0; max-width: 68ch; }
.rule b { color: var(--text); }

/* figures + scoreboard table (notes / write-ups) */
.fig { margin: 28px 0; }
.fig img { width: 100%; display: block; border: 1px solid var(--border); border-radius: 0; }
.fig figcaption { color: var(--faint); font-size: 14px; margin-top: 9px; max-width: 68ch; }
.board { width: 100%; border-collapse: collapse; margin: 24px 0; font-family: var(--mono); font-size: 14px;
         font-variant-numeric: tabular-nums; }
.board th, .board td { text-align: right; padding: 8px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.board th:first-child, .board td:first-child { text-align: left; color: var(--muted); }
.board thead th { color: var(--faint); font-weight: 400; border-bottom: 1px solid var(--text); }
.board tbody tr:first-child td { color: var(--text); }
.back { margin: 26px 0 6px; }
.back a { font: 400 12.5px var(--mono); color: var(--faint); letter-spacing: 0.04em; }
.back a:hover { color: var(--accent); text-decoration: none; }
.metaline { font: 400 13px var(--mono); color: var(--faint); letter-spacing: 0.02em; margin: 0 0 22px; }

/* ---- lists & tables ---- */
.prose ul { padding-left: 1.2em; color: var(--muted); max-width: 68ch; }
.prose li { margin: 0.5em 0; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; margin: 20px 0; }
td, th { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font: 400 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
     color: var(--faint); border-bottom: 1px solid var(--text); }
.mono { font-family: var(--mono); font-size: 0.86em; }
code { font-family: var(--mono); font-size: 0.86em; }

/* ---- article list ---- */
.pieces { margin: 8px 0 30px; border-top: 1px solid var(--text); }
.piece { display: block; padding: 22px 0; border-bottom: 1px solid var(--border); }
.piece:hover { text-decoration: none; }
.piece h3 { color: var(--text); transition: color .12s; }
.piece:hover h3 { color: var(--accent); }
.piece p { color: var(--muted); font-size: 16px; max-width: 64ch; }
.piece .k { font: 400 12.5px var(--mono); color: var(--faint); letter-spacing: 0.08em;
            text-transform: uppercase; }

/* ---- footer ---- */
footer { margin-top: 72px; border-top: 1px solid var(--border); background: var(--bg); }
.foot { display: flex; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap;
        padding: 36px 0 64px; font-size: 14.5px; color: var(--faint); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); text-decoration: none; }
.foot .cols { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .stats .row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: none; border-top: 1px solid var(--border); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(2n) { border-left: 1px solid var(--border); }
  .nav .links { gap: 4px 14px; font-size: 14px; margin-left: 0; }
  .hero { padding: 44px 0 32px; }
  .lead { font-size: 18px; }
}
