/* ANTJANUS — Russian Constructivism redesign (038)
   Red / black / paper. Diagonals, photomontage plates, thumb-index nav after Lissitzky's "For the Voice". */

:root {
  /* primitives */
  --paper-100: #f6f0e2;
  --paper-200: #ece3d0;
  --paper-300: #ded2b8;
  --ink-900: #16130f;
  --ink-800: #1f1c17;
  --ink-700: #2a2620;
  --ink-600: #3a342c;
  --ink-500: #5b5247;
  --stone-300: #a89e8c;
  --stone-200: #d7cebd;
  --stone-100: #efe7d6;
  --red-700: #b81d17;
  --red-600: #c8231b;
  --red-400: #ff5a47;
  --ochre-500: #d99a1c;
  --ochre-400: #e6ad3a;

  /* semantic (light) */
  --ground: var(--paper-200);
  --surface: var(--paper-100);
  --surface-sunk: var(--paper-300);
  --text-strong: var(--ink-900);
  --text-body: var(--ink-600);
  --text-muted: var(--ink-500);
  --text-accent: var(--red-700);
  --fill-red: var(--red-600);
  --fill-ink: var(--ink-900);
  --fill-ochre: var(--ochre-500);
  --on-red: var(--paper-100);
  --on-ink: var(--paper-100);
  --rule: var(--ink-900);
  --plate: var(--paper-200);
  --focus: var(--red-700);
  --code-ground: var(--ink-900);
  --code-text: var(--stone-100);

  --font-display: "Big Shoulders Display", "Oswald", Impact, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --index-width: 76px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --thick: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #15130f;
    --surface: var(--ink-800);
    --surface-sunk: #0f0d0b;
    --text-strong: var(--stone-100);
    --text-body: var(--stone-200);
    --text-muted: var(--stone-300);
    --text-accent: var(--red-400);
    --fill-ink: #000000;
    --rule: var(--stone-100);
    --on-ink: var(--stone-100);
    --focus: var(--ochre-400);
    --code-ground: #0b0a08;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #15130f;
  --surface: var(--ink-800);
  --surface-sunk: #0f0d0b;
  --text-strong: var(--stone-100);
  --text-body: var(--stone-200);
  --text-muted: var(--stone-300);
  --text-accent: var(--red-400);
  --fill-ink: #000000;
  --rule: var(--stone-100);
  --on-ink: var(--stone-100);
  --focus: var(--ochre-400);
  --code-ground: #0b0a08;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--ground);
  background-image: url("assets/paper-grain.jpg");
  background-size: 900px auto;
  background-blend-mode: multiply;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
:root[data-theme="dark"] body { background-blend-mode: soft-light; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fill-red); color: var(--on-red); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-strong); text-transform: uppercase; line-height: .92; letter-spacing: .005em; margin: 0; font-weight: 800; }
p { margin: 0 0 1em; }
.mono { font-family: var(--font-mono); }
.kicker { font-family: var(--font-mono); font-size: .875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-accent); font-weight: 500; }

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: var(--thick) solid var(--rule);
  background: var(--surface);
}
.masthead-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-strong); }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand-words { display: flex; flex-direction: column; line-height: .9; font-family: var(--font-display); text-transform: uppercase; }
.brand-words small { font-size: .875rem; font-weight: 600; letter-spacing: .18em; color: var(--text-muted); font-family: var(--font-mono); }
.brand-words strong { font-size: 1.75rem; font-weight: 900; letter-spacing: .02em; }
.brand-words strong span { color: var(--text-accent); }
.mast-tools { display: flex; align-items: center; gap: 10px; }
.mast-meta { font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.theme-toggle {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 3px solid var(--rule); background: var(--surface); color: var(--text-strong);
  font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; padding: 0 12px;
}
.theme-toggle:hover { background: var(--fill-ink); color: var(--on-ink); }
.theme-toggle svg { width: 20px; height: 20px; }

/* ---------- Thumb index nav (Lissitzky, For the Voice, 1923) ---------- */
.thumb-index { background: var(--fill-ink); }
.thumb-index ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.thumb-index a {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px;
  color: var(--on-ink); text-decoration: none; font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 1.25rem; letter-spacing: .04em; border-right: 2px solid #3a342c; border-bottom: 2px solid #3a342c;
  transition: background-color .15s;
}
.thumb-index .num { font-family: var(--font-mono); font-size: .875rem; font-weight: 500; opacity: .85; }
.thumb-index .glyph { width: 22px; height: 22px; flex: none; }
.thumb-index a:hover { background: #3a342c; }
.thumb-index a[aria-current="page"] { background: var(--fill-red); color: var(--on-red); }
.thumb-index a[aria-current="page"] .glyph * { fill: var(--paper-100); stroke: var(--paper-100); }

@media (min-width: 1100px) {
  body { padding-right: var(--index-width); }
  .thumb-index { position: fixed; top: 0; right: 0; bottom: 0; width: var(--index-width); z-index: 40; border-left: var(--thick) solid var(--red-600); }
  .thumb-index ol { display: flex; flex-direction: column; height: 100%; }
  .thumb-index li { flex: 1 1 0; min-height: 0; display: flex; overflow: hidden; }
  .thumb-index li:nth-child(odd) a { margin-left: 0; }
  .thumb-index a {
    flex: 1 1 auto; height: auto; min-height: 0; writing-mode: vertical-rl; flex-direction: row; justify-content: flex-start; padding: 16px 0;
    font-size: 1.375rem; border-right: 0; border-bottom: 2px solid #3a342c; gap: 12px;
  }
  .thumb-index .glyph { transform: rotate(90deg); }
  .thumb-index a[aria-current="page"] { margin-left: -14px; box-shadow: -6px 0 0 var(--fill-ink); }
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
main { display: block; }
.section { padding: clamp(48px, 7vw, 96px) 0; position: relative; }
.section + .section { border-top: var(--thick) solid var(--rule); }

.slab-head { display: grid; grid-template-columns: auto 1fr; gap: 0 24px; align-items: end; margin-bottom: 40px; }
.slab-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 12vw, 9.5rem); line-height: .78; color: var(--text-accent); }
.slab-head h2 { font-size: clamp(2.5rem, 6vw, 4.75rem); }
.slab-head p { grid-column: 2; margin: 12px 0 0; font-size: 1.125rem; color: var(--text-body); max-width: 60ch; }
.slab-head .more { grid-column: 2; margin-top: 16px; }

.bar-label {
  display: inline-block; background: var(--fill-red); color: var(--on-red); font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: 1.25rem; letter-spacing: .06em; padding: 6px 16px 4px; transform: rotate(-4deg); transform-origin: left bottom;
}
.bar-label.ink { background: var(--fill-ink); color: var(--on-ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; text-transform: uppercase; letter-spacing: .05em;
  text-decoration: none; border: 3px solid var(--rule); cursor: pointer; transition: transform .15s, box-shadow .15s, background-color .15s;
  background: var(--fill-red); color: var(--on-red); border-color: var(--fill-red); box-shadow: 6px 6px 0 var(--rule);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--rule); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--rule); }
.btn.ink { background: var(--fill-ink); color: var(--on-ink); border-color: var(--fill-ink); box-shadow: 6px 6px 0 var(--fill-red); }
.btn.ghost { background: transparent; color: var(--text-strong); border-color: var(--rule); box-shadow: none; }
.btn.ghost:hover { background: var(--text-strong); color: var(--ground); box-shadow: none; transform: none; }
.link-arrow { font-family: var(--font-mono); font-weight: 500; font-size: 1rem; color: var(--text-accent); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.link-arrow:hover { color: var(--text-strong); }

/* ---------- Photomontage plates ---------- */
.plate { background: var(--plate); position: relative; overflow: hidden; isolation: isolate; }
:root[data-theme="dark"] .plate { --plate: #d9cdb2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .plate { --plate: #d9cdb2; } }
.plate img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.35) brightness(1.04); mix-blend-mode: multiply; }
.plate.red { background: var(--red-600); }
.plate.red img { filter: grayscale(1) contrast(1.5) brightness(1.15); }
.plate::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(22,19,15,.18) 1px, transparent 1.2px); background-size: 4px 4px; mix-blend-mode: multiply; }

/* ---------- Home hero poster ---------- */
.poster {
  position: relative; overflow: hidden; background: var(--surface); border-bottom: var(--thick) solid var(--rule);
  min-height: min(88vh, 860px);
}
.poster-grid { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter); display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.poster-wedge { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.poster-wedge svg { width: 100%; height: 100%; }
.poster-portrait { position: relative; aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; }
.poster-portrait .disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 10px solid var(--fill-ink); }
.poster-portrait .disc img { object-position: 22% 30%; }
.poster-portrait .ring { position: absolute; inset: -28px; border-radius: 50%; border: 3px dashed var(--rule); animation: spin 60s linear infinite; }
.poster-portrait .tag { position: absolute; right: -8px; bottom: 8%; transform: rotate(-12deg); }
.poster h1 { font-size: clamp(3.5rem, 8.8vw, 8.5rem); line-height: .84; letter-spacing: -.005em; }
.poster h1 .red { color: var(--text-accent); display: block; }
.poster h1 .slant { display: inline-block; background: var(--fill-ink); color: var(--on-ink); padding: .02em .12em 0; transform: rotate(-5deg); margin: .08em 0; }
.poster .lede { font-size: 1.25rem; line-height: 1.5; color: var(--text-strong); max-width: 34ch; margin: 28px 0; font-weight: 500; }
.poster-ctas { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; }
.poster-ctas .tertiary { font-family: var(--font-mono); color: var(--text-muted); font-size: 1rem; text-decoration: underline; text-underline-offset: 4px; }
.poster-ctas .tertiary:hover { color: var(--text-accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--thick) solid var(--rule); position: relative; z-index: 2; background: var(--fill-ink); }
.stat { padding: 20px var(--gutter); color: var(--on-ink); border-right: 2px solid #3a342c; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.stat:last-child { border-right: 0; }
.stat b { font-family: var(--font-display); font-size: clamp(2.75rem, 5vw, 4.25rem); font-weight: 900; line-height: .9; color: var(--red-400); }
.stat span { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .9375rem; }

/* ---------- Cards: leaflets ---------- */
.leaflets { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.leaflet {
  grid-column: span 4; position: relative; background: var(--surface); border: 3px solid var(--rule);
  display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.leaflet:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--fill-red); }
.leaflet .plate { aspect-ratio: 16 / 9; border-bottom: 3px solid var(--rule); }
.leaflet:hover .plate img { filter: grayscale(0) contrast(1.05); mix-blend-mode: normal; }
.leaflet-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.leaflet h3 { font-size: 1.875rem; line-height: .98; }
.leaflet h3 a { text-decoration: none; }
.leaflet h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.leaflet p { margin: 0; color: var(--text-body); }
.leaflet .meta { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-top: auto; padding-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; }
.leaflet .corner { position: absolute; top: -3px; right: -3px; width: 54px; height: 54px; background: var(--fill-red); clip-path: polygon(0 0, 100% 0, 100% 100%); z-index: 2; }
.leaflet .corner-num { position: absolute; top: 4px; right: 7px; z-index: 3; color: var(--on-red); font-family: var(--font-mono); font-size: .875rem; font-weight: 500; }
.leaflet.wide { grid-column: span 8; flex-direction: row; }
.leaflet.wide .plate { aspect-ratio: auto; width: 52%; flex: none; border-bottom: 0; border-right: 3px solid var(--rule); min-height: 320px; }
.leaflet.wide h3 { font-size: 2.75rem; }
.leaflet.tilt { transform: rotate(-1.2deg); }
.leaflet.tilt:hover { transform: rotate(-1.2deg) translate(-3px, -3px); }
.leaflet.noimg { background: var(--fill-ink); border-color: var(--fill-ink); }
.leaflet.noimg h3, .leaflet.noimg p { color: var(--on-ink); }
.leaflet.noimg .meta { color: var(--stone-300); }
.leaflet.noimg .glyph-block { height: 110px; border-bottom: 3px solid #3a342c; position: relative; overflow: hidden; }

/* list rows (dispatches) */
.dispatch { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--rule); }
.dispatch li { border-bottom: 2px solid var(--rule); }
.dispatch a { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 8px 28px; align-items: baseline; padding: 20px 4px; text-decoration: none; transition: background-color .15s, padding .15s; }
.dispatch a:hover { background: var(--fill-ink); color: var(--on-ink); padding-left: 18px; }
.dispatch a:hover .d-title, .dispatch a:hover .d-desc { color: var(--on-ink); }
.dispatch time { font-family: var(--font-mono); font-size: .9375rem; color: var(--text-accent); }
.dispatch a:hover time { color: var(--red-400); }
.d-title { font-family: var(--font-display); text-transform: uppercase; font-weight: 800; font-size: 1.75rem; line-height: 1; color: var(--text-strong); }
.d-desc { grid-column: 2; color: var(--text-body); }
.d-coll { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.dispatch a:hover .d-coll { color: var(--stone-300); }

/* experiments (geometric icon cards) */
.works { display: grid; grid-template-columns: repeat(4, 1fr); border: 3px solid var(--rule); }
.work { padding: 26px 22px 28px; border-right: 3px solid var(--rule); text-decoration: none; display: flex; flex-direction: column; gap: 10px; background: var(--surface); transition: background-color .15s; }
.work:last-child { border-right: 0; }
.work:hover { background: var(--fill-red); }
.work:hover h3, .work:hover p, .work:hover .w-type, .work:hover .w-tech { color: var(--on-red); }
.work svg { width: 64px; height: 64px; }
.work h3 { font-size: 1.75rem; }
.work p { margin: 0; }
.w-type { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .875rem; color: var(--text-accent); }
.w-tech { font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); margin-top: auto; }

/* call-to-action slab */
.cta-slab { background: var(--fill-red); color: var(--on-red); position: relative; overflow: hidden; }
.cta-slab .wrap { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 72px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.cta-slab h2 { color: var(--on-red); font-size: clamp(3rem, 7vw, 6rem); }
.cta-slab p { font-size: 1.25rem; max-width: 40ch; }
.cta-slab .btn { background: var(--fill-ink); border-color: var(--fill-ink); color: var(--paper-100); box-shadow: 6px 6px 0 var(--paper-100); }
.cta-slab .beam { position: absolute; right: -10%; top: -40%; width: 70%; height: 180%; background: rgba(22,19,15,.18); transform: rotate(24deg); }

/* three bottom columns */
.triad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.triad-col { border-top: 10px solid var(--rule); padding-top: 18px; }
.triad-col h3 { font-size: 2rem; margin-bottom: 14px; }
.triad-col ul { list-style: none; margin: 0; padding: 0; }
.triad-col li { border-bottom: 2px dotted var(--text-muted); }
.triad-col li a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 44px; text-decoration: none; font-weight: 600; color: var(--text-strong); }
.triad-col li a:hover { color: var(--text-accent); }
.triad-col li small { font-family: var(--font-mono); color: var(--text-muted); font-size: .875rem; font-weight: 400; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--surface); border-bottom: var(--thick) solid var(--rule); }
.page-hero .wrap { position: relative; z-index: 2; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.page-hero h1 { font-size: clamp(4rem, 12vw, 10rem); line-height: .8; }
.page-hero h1 .red { color: var(--text-accent); }
.page-hero .lede { font-size: 1.25rem; color: var(--text-strong); max-width: 44ch; margin-top: 24px; font-weight: 500; }
.page-hero .plate { aspect-ratio: 4 / 3; border: 6px solid var(--rule); transform: rotate(3deg); box-shadow: -14px 14px 0 var(--fill-red); }
.page-hero .diag { position: absolute; z-index: 1; left: -10%; bottom: -120px; width: 130%; height: 180px; background: var(--fill-red); transform: rotate(-6deg); }
.page-hero .diag.ink { background: var(--fill-ink); bottom: -170px; transform: rotate(-3deg); }

.jump { position: sticky; top: 0; z-index: 30; background: var(--ground); border-bottom: 3px solid var(--rule); }
.jump .wrap { display: flex; gap: 10px; align-items: center; padding-top: 10px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: thin; }
.jump span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: .1em; flex: none; }
.jump a { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border: 2px solid var(--rule); text-decoration: none; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.125rem; color: var(--text-strong); }
.jump a:hover { background: var(--fill-red); color: var(--on-red); border-color: var(--fill-red); }

/* ---------- Projects ---------- */
.feature-proj { display: grid; grid-template-columns: 1.1fr 1fr; border: 6px solid var(--rule); background: var(--surface); }
.feature-proj .plate { min-height: 420px; border-right: 6px solid var(--rule); }
.feature-proj .body { padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.feature-proj h3 { font-size: clamp(2.5rem, 5vw, 4rem); }
.fp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--rule); border: 2px solid var(--rule); margin: 8px 0; }
.fp-stats div { background: var(--surface); padding: 12px 14px; }
.fp-stats b { display: block; font-family: var(--font-display); font-size: 2.75rem; line-height: 1; color: var(--text-accent); font-weight: 900; }
.fp-stats span { font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; }

.oss { display: flex; flex-direction: column; gap: 40px; }
.oss-row { display: grid; grid-template-columns: 1fr 1fr; border: 3px solid var(--rule); background: var(--surface); }
.oss-row:nth-child(even) .plate { order: 2; border-right: 0; border-left: 3px solid var(--rule); }
.oss-row .plate { min-height: 300px; border-right: 3px solid var(--rule); }
.oss-row .body { padding: 32px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.oss-row h3 { font-size: 2.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li, .chip { font-family: var(--font-mono); font-size: .875rem; padding: 4px 10px; border: 2px solid var(--rule); color: var(--text-strong); text-transform: lowercase; text-decoration: none; }
a.chip:hover { background: var(--fill-ink); color: var(--on-ink); }
.stars { font-family: var(--font-mono); font-size: .9375rem; color: var(--text-accent); font-weight: 500; }

.ledger { width: 100%; border-collapse: collapse; border-top: 6px solid var(--rule); }
.ledger th { text-align: left; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); padding: 12px 10px; border-bottom: 3px solid var(--rule); font-weight: 500; }
.ledger td { padding: 16px 10px; border-bottom: 2px solid var(--rule); vertical-align: top; }
.ledger td:first-child { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; color: var(--text-strong); white-space: nowrap; }
.ledger td:first-child a { text-decoration: none; }
.ledger td:first-child a:hover { color: var(--text-accent); }
.ledger td.num { font-family: var(--font-mono); text-align: right; color: var(--text-accent); font-weight: 500; }

.clippings { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 28px; }
.clip { background: var(--surface); border: 3px solid var(--rule); display: flex; flex-direction: column; }
.clip:nth-child(3n+2) { transform: rotate(1deg); }
.clip:nth-child(4n+3) { transform: rotate(-1.2deg); }
.clip .plate { aspect-ratio: 16/10; border-bottom: 3px solid var(--rule); }
.clip .plate.dark { background: #1a1814; }
.clip .plate.dark img { mix-blend-mode: normal; filter: grayscale(1) contrast(1.2) brightness(1.3); }
.clip .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.clip h3 { font-size: 1.625rem; }
.clip p { margin: 0; }
.clip .no-plate { aspect-ratio: 16/10; border-bottom: 3px solid var(--rule); background: var(--fill-ink); position: relative; overflow: hidden; }

/* ---------- Writing ---------- */
.two-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.two-lists h3 { font-size: 2.25rem; margin-bottom: 4px; }
.two-lists .sub { color: var(--text-muted); margin-bottom: 16px; }
.numbered { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.numbered li { counter-increment: n; border-top: 3px solid var(--rule); }
.numbered a { display: grid; grid-template-columns: 3.5rem 1fr; gap: 12px; padding: 16px 0; text-decoration: none; }
.numbered a::before { content: counter(n, decimal-leading-zero); font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; line-height: .9; color: var(--text-accent); }
.numbered strong { font-family: var(--font-display); text-transform: uppercase; font-size: 1.625rem; line-height: 1; color: var(--text-strong); display: block; }
.numbered span { color: var(--text-body); display: block; margin-top: 6px; }
.numbered a:hover strong { color: var(--text-accent); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; text-decoration: none; padding: 6px 14px; border: 3px solid var(--rule); color: var(--text-strong); min-height: 44px; display: inline-flex; align-items: center; }
.tag-cloud a:nth-child(3n) { background: var(--fill-ink); color: var(--on-ink); }
.tag-cloud a:nth-child(5n) { background: var(--fill-red); color: var(--on-red); border-color: var(--fill-red); }
.tag-cloud a:hover { transform: rotate(-3deg); }
.tag-cloud a small { font-family: var(--font-mono); font-weight: 400; margin-left: 8px; font-size: .875rem; }

/* ---------- AI page ---------- */
.consult-strip { background: var(--fill-ink); color: var(--on-ink); }
.consult-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.consult-strip p { margin: 0; font-size: 1.25rem; font-weight: 600; }
.consult-strip .btn { box-shadow: 5px 5px 0 var(--paper-100); }

.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 6px solid var(--rule); background: var(--surface); }
.story { border-right: 6px solid var(--rule); display: flex; flex-direction: column; position: relative; }
.story:last-child { border-right: 0; }
.story .plate { aspect-ratio: 4/3; border-bottom: 6px solid var(--rule); }
.story .part { position: absolute; top: 0; left: 0; z-index: 3; background: var(--fill-red); color: var(--on-red); font-family: var(--font-display); font-weight: 900; font-size: 3rem; line-height: 1; padding: 8px 16px 4px; }
.story .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.story h3 { font-size: 2rem; }
.story h3 a { text-decoration: none; }
.story h3 a:hover { color: var(--text-accent); }
.coming { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.coming div { border: 3px dashed var(--rule); padding: 18px 20px; }
.coming b { font-family: var(--font-display); text-transform: uppercase; font-size: 1.5rem; color: var(--text-strong); display: block; }
.notice { border-left: 10px solid var(--fill-ochre); background: var(--surface); padding: 16px 20px; margin-top: 28px; }
.notice strong { color: var(--text-strong); }

/* ---------- About ---------- */
.about-hero { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 640px; border-bottom: var(--thick) solid var(--rule); background: var(--surface); position: relative; overflow: hidden; }
.about-hero .plate { border-right: var(--thick) solid var(--rule); clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); }
.about-hero .plate img { object-position: 50% 25%; }
.about-hero .copy { padding: clamp(32px, 5vw, 72px) var(--gutter) clamp(32px, 5vw, 72px) 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.about-hero h1 { font-size: clamp(4rem, 10vw, 9rem); line-height: .8; }
.about-hero h1 .red { color: var(--text-accent); display: block; }
.about-hero .tagline { font-size: 1.375rem; color: var(--text-strong); font-weight: 600; max-width: 32ch; }

.career-bar { display: flex; border: 3px solid var(--rule); overflow: hidden; margin-bottom: 36px; }
.career-bar div { padding: 10px 10px; border-right: 2px solid var(--rule); min-width: 0; }
.career-bar div:last-child { border-right: 0; }
.career-bar b { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.125rem; line-height: 1.05; color: var(--text-strong); }
.career-bar span { font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); }
.career-bar div:first-child { background: var(--fill-red); }
.career-bar div:first-child b, .career-bar div:first-child span { color: var(--on-red); }

.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 10px solid var(--rule); }
.phase { padding: 22px 22px 22px 0; border-right: 2px solid var(--rule); padding-left: 22px; }
.phase:first-child { padding-left: 0; }
.phase:last-child { border-right: 0; }
.phase .period { font-family: var(--font-mono); color: var(--text-accent); font-weight: 500; }
.phase h3 { font-size: 1.875rem; margin: 6px 0 12px; }
.phase ul { padding-left: 18px; margin: 12px 0 0; }
.phase li { margin-bottom: 6px; }
details.history > summary { list-style: none; cursor: pointer; }
details.history > summary::-webkit-details-marker { display: none; }
details.history[open] > summary .when-closed { display: none; }
details.history:not([open]) > summary .when-open { display: none; }

.principles { background: var(--fill-ink); color: var(--on-ink); position: relative; overflow: hidden; }
.principles .wrap { position: relative; z-index: 2; padding-top: 80px; padding-bottom: 80px; }
.principles h2 { color: var(--on-ink); font-size: clamp(3rem, 7vw, 6rem); margin-bottom: 36px; }
.principles ol { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 5rem 1fr; gap: 16px; align-items: baseline; padding: 18px 0; border-top: 2px solid #3a342c; font-family: var(--font-display); text-transform: uppercase; font-weight: 700; font-size: clamp(1.75rem, 3.6vw, 2.75rem); line-height: 1; }
.principles li::before { content: counter(p, decimal-leading-zero); color: var(--red-400); font-weight: 900; }
.principles li:nth-child(even) { padding-left: clamp(0px, 6vw, 96px); }
.principles .link-arrow { color: var(--ochre-400); }
.principles .wedge { position: absolute; right: -80px; top: 0; bottom: 0; width: 42%; background: var(--red-600); clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%); opacity: .95; }

.beyond { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.beyond .plate { aspect-ratio: 4/5; border: 6px solid var(--rule); box-shadow: 16px 16px 0 var(--fill-red); }
.beyond .plate img { object-position: 50% 40%; }
.beyond dl { margin: 0; }
.beyond dt { font-family: var(--font-display); text-transform: uppercase; font-weight: 800; font-size: 2rem; color: var(--text-strong); border-top: 3px solid var(--rule); padding-top: 14px; }
.beyond dd { margin: 6px 0 22px; }

.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; background: var(--rule); border: 3px solid var(--rule); }
.cap { background: var(--surface); padding: 26px; }
.cap h3 { font-size: 2rem; margin-bottom: 8px; }
.cap h3::before { content: ""; display: inline-block; width: .6em; height: .6em; background: var(--fill-red); margin-right: 12px; transform: rotate(45deg) translateY(-3px); }
.cap:nth-child(2) h3::before { border-radius: 50%; transform: none; }
.cap:nth-child(3) h3::before { background: var(--fill-ink); }
.cap:nth-child(4) h3::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); transform: none; }
.cap .chips { margin-top: 14px; }

.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proof a { display: block; border: 3px solid var(--rule); padding: 18px; text-decoration: none; background: var(--surface); }
.proof a:hover { background: var(--fill-red); border-color: var(--fill-red); }
.proof a:hover b, .proof a:hover span { color: var(--on-red); }
.proof b { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1.625rem; color: var(--text-strong); line-height: 1; }
.proof span { display: block; font-family: var(--font-mono); font-size: .875rem; color: var(--text-muted); margin-top: 8px; }

/* ---------- Article ---------- */
.progress { position: fixed; top: 0; left: 0; height: 8px; width: 0; background: var(--fill-red); z-index: 60; }
.progress-pct { position: fixed; top: 12px; left: 12px; z-index: 60; background: var(--fill-ink); color: var(--on-ink); font-family: var(--font-mono); font-size: .875rem; padding: 2px 8px; opacity: 0; transition: opacity .2s; }
.progress-pct.on { opacity: 1; }
.art-hero { position: relative; background: var(--fill-ink); color: var(--on-ink); overflow: hidden; border-bottom: var(--thick) solid var(--rule); }
.art-hero .plate { position: absolute; inset: 0 0 0 38%; clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%); }
.art-hero .plate::before { content: ""; position: absolute; inset: 0; background: var(--red-600); mix-blend-mode: multiply; z-index: 1; opacity: .55; }
.art-hero .wrap { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 64px; }
.art-hero .crumbs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.art-hero .crumbs a { color: var(--on-ink); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .9375rem; }
.art-hero .crumbs .chip { color: var(--on-ink); border-color: var(--stone-300); }
.art-hero h1 { color: var(--on-ink); font-size: clamp(3.25rem, 8vw, 7.5rem); max-width: 11ch; line-height: .84; }
.art-hero h1 em { font-style: normal; color: var(--ink-900); background: var(--red-600); color: var(--paper-100); padding: 0 .1em; display: inline-block; transform: rotate(-3deg); }
.art-hero .desc { font-size: 1.375rem; max-width: 36ch; margin: 24px 0 18px; color: var(--stone-100); }
.art-hero .meta { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .9375rem; color: var(--ochre-400); display: flex; gap: 18px; flex-wrap: wrap; }
.art-hero .meta a { color: var(--ochre-400); }

.art-layout { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 40px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
.toc { position: sticky; top: 24px; align-self: start; }
.toc h2 { font-size: 1.5rem; margin-bottom: 10px; background: var(--fill-ink); color: var(--on-ink); padding: 8px 12px 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; border-left: 3px solid var(--rule); }
.toc li { counter-increment: t; }
.toc a { display: grid; grid-template-columns: 2rem 1fr; padding: 9px 10px; text-decoration: none; color: var(--text-body); font-weight: 500; line-height: 1.3; border-left: 6px solid transparent; margin-left: -4px; }
.toc a::before { content: counter(t, decimal-leading-zero); font-family: var(--font-mono); color: var(--text-muted); font-size: .875rem; padding-top: 2px; }
.toc a:hover { color: var(--text-strong); }
.toc a.active { border-left-color: var(--fill-red); color: var(--text-strong); font-weight: 700; background: var(--surface); }
.toc a.active::before { color: var(--text-accent); }
.md-link { margin-top: 20px; display: inline-block; }
.toc-mobile { display: none; border: 3px solid var(--rule); margin-bottom: 32px; background: var(--surface); }
.toc-mobile summary { min-height: 48px; padding: 12px 16px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.375rem; cursor: pointer; color: var(--text-strong); }
.toc-mobile ol { margin: 0; padding: 0 16px 16px 40px; }
.toc-mobile a { display: block; padding: 8px 0; }

.prose { max-width: 700px; font-size: 1.125rem; line-height: 1.7; color: var(--text-body); }
.prose > * + * { margin-top: 1.2em; }
.prose p { margin: 0; }
.prose h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-top: 2em; padding-top: .35em; border-top: 6px solid var(--rule); position: relative; scroll-margin-top: 24px; }
.prose h2 .hn { color: var(--text-accent); margin-right: .25em; }
.prose a { color: var(--text-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 600; }
.prose a:hover { background: var(--fill-red); color: var(--on-red); text-decoration: none; }
.prose strong { color: var(--text-strong); }
.prose ol, .prose ul { padding-left: 1.6em; }
.prose ol li::marker { font-family: var(--font-mono); color: var(--text-accent); font-weight: 500; }
.prose li + li { margin-top: .35em; }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-sunk); padding: 1px 6px; color: var(--text-strong); }
.codeblock { margin: 1.8em 0; border: 3px solid var(--fill-ink); background: var(--code-ground); max-width: 780px; box-shadow: 10px 10px 0 var(--fill-red); }
.codeblock header { display: flex; justify-content: space-between; align-items: center; background: var(--red-600); padding: 0 0 0 14px; }
.codeblock header span { font-family: var(--font-mono); font-weight: 500; color: var(--paper-100); letter-spacing: .12em; font-size: .875rem; }
.codeblock button { min-height: 40px; min-width: 88px; border: 0; background: var(--ink-900); color: var(--paper-100); font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.codeblock button:hover { background: #000; }
.codeblock pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.6; color: var(--code-text); tab-size: 2; }
.codeblock code { background: none; padding: 0; color: inherit; font-size: inherit; }
.codeblock .c { color: #a59c8a; font-style: italic; }
.codeblock .k { color: #ff7b6b; }
.codeblock .s { color: #e6ad3a; }
.codeblock .t { color: #9fd0c0; }

.callout { position: relative; padding: 28px 22px 20px; border: 3px solid var(--rule); background: var(--surface); margin-top: 2em !important; }
.callout .label { position: absolute; top: -18px; left: 14px; }
.callout p { margin: 0; }
.callout.why { border-left: 12px solid var(--fill-red); }
.callout.ask { background: var(--fill-ink); border-color: var(--fill-ink); color: var(--on-ink); }
.callout.ask strong { color: var(--on-ink); }
.callout.ask .bar-label { background: var(--fill-ochre); color: var(--ink-900); }
.callout.note { border-style: dashed; }
.callout.skill { border-width: 6px; border-color: var(--fill-red); }
.callout.skill a { color: var(--text-accent); }

.filed { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filed span { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); font-size: .9375rem; margin-right: 6px; }

.share-band { background: var(--surface-sunk); border-top: var(--thick) solid var(--rule); border-bottom: var(--thick) solid var(--rule); }
.share-band .wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding-top: 56px; padding-bottom: 56px; align-items: start; }
.share-band h2 { font-size: 2.5rem; margin-bottom: 18px; }
.share-row { display: flex; flex-wrap: wrap; gap: 14px; }
.share-row .btn { font-size: 1.125rem; min-height: 44px; padding: 8px 16px; }

.newsletter { background: var(--fill-red); color: var(--on-red); padding: 32px; position: relative; border: 3px solid var(--fill-ink); box-shadow: 10px 10px 0 var(--fill-ink); }
.newsletter h2, .newsletter h3 { color: var(--on-red); font-size: 2.5rem; margin-bottom: 10px; }
.newsletter form { display: flex; gap: 0; margin-top: 16px; flex-wrap: wrap; }
.newsletter label.sr-only + input, .newsletter input[type="email"] { flex: 1 1 220px; min-height: 52px; border: 3px solid var(--ink-900); padding: 0 14px; font-size: 1.0625rem; font-family: var(--font-body); background: var(--paper-100); color: var(--ink-900); }
.newsletter button { min-height: 52px; border: 3px solid var(--ink-900); background: var(--ink-900); color: var(--paper-100); font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; text-transform: uppercase; padding: 0 22px; cursor: pointer; }
.newsletter button:hover { background: #000; }
.newsletter .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 1rem; }
.newsletter .consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--ink-900); }
.newsletter .consent a { color: var(--on-red); }
.newsletter .status { margin-top: 12px; font-weight: 700; min-height: 1.6em; }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.related .leaflet { grid-column: auto; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .1em; background: var(--fill-ochre); color: var(--ink-900); padding: 2px 8px; font-weight: 500; }
.badge.red { background: var(--fill-red); color: var(--on-red); }

/* ---------- Patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, 1fr); border: 6px solid var(--rule); background: var(--surface); }
.three-ways > div { padding: 26px; border-right: 3px solid var(--rule); }
.three-ways > div:last-child { border-right: 0; }
.three-ways b { font-family: var(--font-display); text-transform: uppercase; font-size: 2.25rem; color: var(--text-strong); display: flex; align-items: center; gap: 12px; }
.three-ways b i { font-style: normal; display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--fill-red); color: var(--on-red); font-size: 1.5rem; }
.three-ways + .point { margin-top: 24px; font-size: 1.125rem; max-width: 76ch; color: var(--text-strong); border-left: 10px solid var(--fill-red); padding-left: 18px; }

.catalog-controls { display: grid; gap: 18px; margin-bottom: 32px; }
.search-field { display: flex; border: 4px solid var(--rule); background: var(--surface); }
.search-field label { background: var(--fill-ink); color: var(--on-ink); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.375rem; padding: 0 18px; display: flex; align-items: center; }
.search-field input { flex: 1; min-width: 0; min-height: 56px; border: 0; background: transparent; padding: 0 16px; font-size: 1.0625rem; font-family: var(--font-body); color: var(--text-strong); }
.search-field input::placeholder { color: var(--text-muted); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border: 3px solid var(--rule); background: var(--surface); color: var(--text-strong); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.125rem; cursor: pointer; }
.pill:hover { background: var(--surface-sunk); }
.pill[aria-pressed="true"] { background: var(--fill-red); border-color: var(--fill-red); color: var(--on-red); }
.pill[aria-pressed="true"]::before { content: "■ "; }
.count-sort { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); }
.count-sort select { min-height: 44px; border: 3px solid var(--rule); background: var(--surface); color: var(--text-strong); font-family: var(--font-mono); font-size: 1rem; padding: 0 10px; }
.clear-btn { background: none; border: 0; color: var(--text-accent); font-family: var(--font-mono); font-size: 1rem; text-decoration: underline; cursor: pointer; min-height: 44px; }

.plates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; list-style: none; padding: 0; margin: 0; }
.pcard { position: relative; border: 3px solid var(--rule); background: var(--surface); display: flex; flex-direction: column; height: 100%; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--fill-red); }
.pcard .thumb { height: 170px; border-bottom: 3px solid var(--rule); background: var(--plate); position: relative; overflow: hidden; }
.pcard .thumb svg { width: 100%; height: 100%; }
.pcard .pno { position: absolute; left: 0; top: 0; background: var(--fill-ink); color: var(--paper-100); font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; padding: 4px 12px 0; line-height: 1.1; }
.pcard .body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .eyebrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-accent); }
.pcard .eyebrow time { color: var(--text-muted); }
.pcard h2 { font-size: 1.75rem; line-height: 1; }
.pcard h2 a { text-decoration: none; }
.pcard h2 a::after { content: ""; position: absolute; inset: 0; }
.pcard p { margin: 0; }
.pcard .good { font-size: 1rem; color: var(--text-muted); }
.pcard .good b { color: var(--text-strong); }
.empty-state { border: 4px dashed var(--rule); padding: 40px; text-align: center; }
.empty-state h2 { font-size: 2.5rem; margin-bottom: 10px; }

.pd-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.pd-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(7rem, 16vw, 13rem); line-height: .75; color: var(--text-accent); }
.uses { columns: 2; column-gap: 40px; padding-left: 1.2em; margin: 12px 0 0; }
.uses li { margin-bottom: 6px; break-inside: avoid; }
.uses li::marker { content: "▶  "; color: var(--text-accent); font-size: .8em; }

.panes { border: 6px solid var(--rule); background: var(--surface); margin-top: 40px; }
.panes-bar { display: flex; justify-content: space-between; flex-wrap: wrap; border-bottom: 6px solid var(--rule); background: var(--fill-ink); }
.panes-tabs { display: flex; flex-wrap: wrap; }
.panes-tabs button { min-height: 52px; padding: 0 18px; border: 0; border-right: 2px solid #3a342c; background: transparent; color: var(--paper-100); font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.25rem; cursor: pointer; }
.panes-tabs button:hover { background: #3a342c; }
.panes-tabs button[aria-selected="true"] { background: var(--red-600); color: var(--paper-100); }
.panes-actions { display: flex; }
.panes-actions button { min-height: 52px; padding: 0 16px; border: 0; border-left: 2px solid #3a342c; background: transparent; color: var(--ochre-400); font-family: var(--font-mono); font-size: .9375rem; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.panes-actions button:hover { background: #3a342c; }
.pane { padding: 28px; }
.pane[hidden] { display: none; }
.pane pre { margin: 0; overflow-x: auto; font-family: var(--font-mono); font-size: .9375rem; line-height: 1.6; background: var(--code-ground); color: var(--code-text); padding: 20px; }
.pane .note { margin-bottom: 16px; border-left: 8px solid var(--fill-ochre); padding-left: 14px; }
.prompt-text { max-width: 72ch; font-size: 1.0625rem; }
.prompt-text p { margin-bottom: 1em; }

/* live demo: hairline stat strip, restyled into this system */
.demo-stage { background: var(--ground); padding: 24px; border: 2px solid var(--rule); }
.demo-caption { font-family: var(--font-mono); font-size: .9375rem; color: var(--text-muted); margin: 0 0 12px; }
.hss-strip { display: grid; gap: 2px; background: var(--rule); border: 2px solid var(--rule); grid-template-columns: 1fr; }
@media (min-width: 336px) { .hss-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .hss-strip.four { grid-template-columns: repeat(4, 1fr); } .hss-strip.five { grid-template-columns: repeat(5, 1fr); } }
.hss-tile { background: var(--surface); padding: 14px 16px; text-align: left; min-width: 0; }
.hss-label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; font-size: .8125rem; color: var(--text-muted); display: block; }
.hss-fig { font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; line-height: 1; color: var(--text-strong); font-variant-numeric: tabular-nums; display: block; margin: 4px 0; }
.hss-fig.missing { color: var(--text-muted); }
.hss-sub { font-size: .9375rem; color: var(--text-muted); }
button.hss-tile { border: 0; cursor: pointer; font: inherit; color: inherit; min-height: 44px; }
button.hss-tile:hover { background: var(--surface-sunk); }
button.hss-tile[aria-pressed="true"] { background: var(--fill-red); }
button.hss-tile[aria-pressed="true"] .hss-label, button.hss-tile[aria-pressed="true"] .hss-fig, button.hss-tile[aria-pressed="true"] .hss-sub { color: var(--on-red); }
.hss-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 2px solid var(--rule); }
.hss-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--text-muted); }
.hss-list li span:last-child { font-family: var(--font-mono); font-size: .9375rem; color: var(--text-accent); }
.hss-status { margin-top: 12px; font-family: var(--font-mono); font-size: .9375rem; }

/* ---------- Footer ---------- */
.site-foot { background: var(--fill-ink); color: var(--on-ink); border-top: 12px solid var(--red-600); position: relative; overflow: hidden; }
.site-foot .wrap { position: relative; z-index: 2; padding-top: 64px; padding-bottom: 32px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 40px; }
.site-foot h2 { color: var(--on-ink); font-size: 1.75rem; margin-bottom: 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li a { display: inline-flex; min-height: 40px; align-items: center; color: var(--stone-200); text-decoration: none; font-weight: 500; }
.site-foot li a:hover { color: var(--red-400); text-decoration: underline; }
.site-foot .blurb { color: var(--stone-200); max-width: 30ch; margin-top: 16px; }
.site-foot .newsletter { box-shadow: 8px 8px 0 #000; padding: 22px; }
.site-foot .newsletter h2 { font-size: 1.75rem; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 2px solid #3a342c; margin-top: 48px; padding-top: 20px; font-family: var(--font-mono); font-size: .875rem; color: var(--stone-300); }
.foot-giant { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(5rem, 17vw, 16rem); line-height: .75; color: #26221c; white-space: nowrap; margin-top: 40px; letter-spacing: -.01em; user-select: none; }
.foot-giant span { color: var(--red-600); }
.site-foot a:focus-visible { outline-color: var(--ochre-400); }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .leaflet { grid-column: span 6; }
  .leaflet.wide { grid-column: span 12; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .work:nth-child(2) { border-right: 0; }
  .work:nth-child(-n+2) { border-bottom: 3px solid var(--rule); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .art-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .phases { grid-template-columns: 1fr 1fr; }
  .phase { padding-left: 0 !important; padding-right: 18px; border-right: 0; border-bottom: 2px solid var(--rule); }
  .stories { grid-template-columns: 1fr; }
  .story { border-right: 0; border-bottom: 6px solid var(--rule); }
  .story:last-child { border-bottom: 0; }
  .story { display: grid; grid-template-columns: 1fr 1.3fr; }
  .story .plate { aspect-ratio: auto; min-height: 260px; border-bottom: 0; border-right: 6px solid var(--rule); }
  .career-bar { flex-wrap: wrap; }
  .career-bar div { flex: 1 1 25%; border-bottom: 2px solid var(--rule); }
}
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .mast-meta { display: none; }
  .theme-toggle .label { display: none; }
  .thumb-index a { font-size: 1.0625rem; gap: 6px; padding: 8px 8px; min-height: 48px; }
  .thumb-index .num { display: none; }
  .poster { min-height: 0; }
  .poster-grid, .page-hero .wrap, .cta-slab .wrap, .feature-proj, .oss-row, .two-lists, .share-band .wrap, .beyond, .caps, .about-hero, .pd-head { grid-template-columns: minmax(0, 1fr); }
  .poster-portrait { max-width: 300px; order: -1; margin-top: 20px; }
  .poster-portrait .ring { inset: -16px; }
  .poster h1 { font-size: clamp(3.25rem, 15.5vw, 5rem); }
  .stat-row { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 2px solid #3a342c; padding: 14px var(--gutter); }
  .leaflets { gap: 22px; }
  .leaflet, .leaflet.wide { grid-column: span 12; }
  .leaflet.wide { flex-direction: column; }
  .leaflet.wide .plate { width: 100%; min-height: 0; aspect-ratio: 16/9; border-right: 0; border-bottom: 3px solid var(--rule); }
  .leaflet.wide h3 { font-size: 2.125rem; }
  .leaflet.tilt, .leaflet.tilt:hover { transform: none; }
  .works { grid-template-columns: 1fr; }
  .work { border-right: 0; border-bottom: 3px solid var(--rule); }
  .work:last-child { border-bottom: 0; }
  .triad, .related, .proof, .three-ways, .coming { grid-template-columns: 1fr; }
  .three-ways > div { border-right: 0; border-bottom: 3px solid var(--rule); }
  .three-ways > div:last-child { border-bottom: 0; }
  .slab-head { grid-template-columns: 1fr; }
  .slab-head p, .slab-head .more { grid-column: 1; }
  .slab-num { font-size: 4.5rem; }
  .dispatch a { grid-template-columns: 1fr; gap: 4px; }
  .d-desc { grid-column: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .page-hero .plate { transform: rotate(2deg); box-shadow: -8px 8px 0 var(--fill-red); }
  .feature-proj .plate { min-height: 240px; border-right: 0; border-bottom: 6px solid var(--rule); }
  .feature-proj .body { padding: 24px 20px; }
  .fp-stats { grid-template-columns: minmax(0, 1fr); }
  .fp-stats div { display: flex; align-items: baseline; gap: 14px; }
  .oss-row .plate, .oss-row:nth-child(even) .plate { order: 0; min-height: 220px; border: 0; border-bottom: 3px solid var(--rule); }
  .oss-row h3 { font-size: 2.25rem; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 2px solid var(--rule); padding: 10px 0; }
  .ledger td { border: 0; padding: 4px 0; }
  .ledger td:nth-child(2), .ledger td:nth-child(3) { grid-column: 1 / -1; }
  .ledger td.num { grid-row: 1; grid-column: 2; }
  .ledger td:first-child { white-space: normal; }
  .story { grid-template-columns: 1fr; }
  .story .plate { border-right: 0; border-bottom: 6px solid var(--rule); aspect-ratio: 4/3; min-height: 0; }
  .about-hero .plate { clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); min-height: 360px; border-right: 0; }
  .about-hero .copy { padding: 8px var(--gutter) 40px; }
  .phases { grid-template-columns: 1fr; }
  .principles li { grid-template-columns: 3.25rem 1fr; }
  .principles li:nth-child(even) { padding-left: 0; }
  .principles .wedge { width: 60%; opacity: .5; }
  .career-bar div { flex: 1 1 45%; }
  .uses { columns: 1; }
  .pane { padding: 16px; }
  .demo-stage { padding: 14px; }
  .art-hero { display: flex; flex-direction: column; }
  .art-hero .plate { position: relative; inset: auto; order: 2; height: 220px; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .art-hero .wrap { padding-top: 48px; padding-bottom: 32px; }
  .codeblock { box-shadow: 6px 6px 0 var(--fill-red); margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
  .share-band .wrap { gap: 32px; }
  .newsletter { padding: 22px; }
  .cta-slab .wrap { padding-top: 56px; padding-bottom: 56px; }
}

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