/* ============================================================
   LORENZO'S LEDGER: the reading room of L'Apertura.
   Inherits every token from site.css. Ported from the approved mockup
   (docs/mockups/writing-v2: writing.css v1 + v2.css). In the Ledger a
   ground means a rubric: ink = Aftershock, bone-2 stage holding the
   screens = Teardowns, bone-2 dashed tray = open source, plain bone =
   the two essay rubrics, told apart by type.
   ============================================================ */

:root {
  --col: 66ch;
  --read: clamp(1.06rem, 0.98rem + 0.32vw, 1.2rem);
  --ink-read: rgba(13, 13, 15, 0.86);
}

.nav__link.is-here { color: var(--ink); }
.nav__link.is-here i { color: var(--ink); }

/* ---------- index header ---------- */

.w-head {
  padding: clamp(120px, 20vh, 196px) var(--pad) clamp(40px, 7vh, 72px);
}
.w-title {
  font-size: clamp(2.9rem, 9.4vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  max-width: 11ch;
}
.w-say {
  margin: clamp(20px, 3.4vh, 30px) 0 0;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 300;
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--mute);
  max-width: 40ch;
}

/* ---------- rubric filter ---------- */

.w-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 var(--pad) clamp(18px, 3vh, 26px);
}
.w-filter .pill { padding: 8px 14px; }
.w-filter .pill b { font-weight: 400; opacity: 0.55; margin-left: 2px; }
.w-filter .pill[aria-pressed="false"] { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.w-filter .pill[aria-pressed="false"]:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }

/* ---------- the list: one row per piece ---------- */

.w-list { padding: 0 var(--pad); }
.w-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 150px;
  gap: clamp(16px, 3vw, 44px);
  align-items: baseline;
  padding: clamp(22px, 3.4vh, 34px) 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.w-row:last-child { border-bottom: 1px solid var(--rule); }
.w-row__date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); }
.w-row__t {
  display: block;
  font-size: clamp(1.4rem, 2.7vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.02;
  max-width: 34ch;
  text-wrap: balance;
}
.w-row__t span { transition: background-size 0.5s var(--ease); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; }
.w-row:hover .w-row__t span, .w-row:focus-visible .w-row__t span { background-size: 100% 1px; }
.w-row__d {
  display: block;
  margin-top: 10px;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--mute);
  max-width: 58ch;
}
.w-row__meta { text-align: right; display: grid; gap: 6px; justify-items: end; }
.w-row__meta .mono { font-size: 10px; color: var(--mute); }
.w-row__meta .mono + .mono { color: var(--faint); }
.w-row:focus-visible { outline: 2px solid var(--crew); outline-offset: 6px; border-radius: 4px; }
.w-row[hidden] { display: none; }

/* ============================================================
   ARTICLE
   ============================================================ */

.a-head { padding: clamp(116px, 18vh, 176px) var(--pad) clamp(34px, 6vh, 60px); border-bottom: 1px solid var(--rule); }
.a-crumb { display: flex; gap: 10px; color: var(--faint); margin: 0 0 clamp(20px, 4vh, 36px); }
.a-crumb a { text-decoration: none; color: var(--mute); }
.a-crumb a:hover { color: var(--ink); }
.a-title {
  font-size: clamp(2.5rem, 6.4vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 15ch;
  text-wrap: balance;
}
.a-deck {
  margin: clamp(18px, 3vh, 28px) 0 0;
  font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  font-weight: 300;
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--mute);
  max-width: 44ch;
}
.a-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: clamp(24px, 4vh, 38px); color: var(--faint); }
.a-meta b { font-weight: 400; color: var(--mute); }

/* three columns: contents rail, reading column, open margin */
.a-body {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, var(--col)) minmax(0, 1fr);
  column-gap: clamp(28px, 5vw, 88px);
  padding: clamp(40px, 7vh, 76px) var(--pad) clamp(64px, 10vh, 120px);
}
.a-body > * { grid-column: 2; }
.a-body > .a-toc { grid-column: 1; grid-row: 1 / span 60; align-self: start; }
.a-body > .a-wide { grid-column: 2 / -1; }

/* contents rail */
.a-toc { position: sticky; top: 92px; }
.a-toc__label { color: var(--faint); margin: 0 0 14px; }
.a-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--rule); }
.a-toc a {
  display: grid;
  grid-template-columns: 26px 1fr;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
  color: var(--mute);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.a-toc a i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--faint); padding-top: 2px; }
.a-toc a:hover { color: var(--ink); }
.a-toc a.is-on { color: var(--ink); border-left-color: var(--ink); }

/* the short version: a recessed panel, the same material as the trays */
.a-short {
  background: var(--bone-2);
  border-radius: 20px;
  padding: clamp(20px, 2.6vw, 32px);
  margin: 0 0 clamp(32px, 5vh, 48px);
}
.a-short__label { margin: 0 0 12px; color: var(--mute); }
.a-short ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.a-short li { position: relative; padding-left: 22px; font-size: var(--read); line-height: 1.5; font-weight: 400; color: var(--ink-read); }
.a-short li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 1px; background: var(--ink); }

/* prose */
.a-body p, .a-body li { font-size: var(--read); line-height: 1.64; font-weight: 380; color: var(--ink-read); }
.a-body > p { margin: 0 0 1.15em; }
.a-body > p.a-lead { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); line-height: 1.5; font-weight: 340; color: var(--ink); letter-spacing: -0.01em; }
.a-body strong { font-weight: 620; color: var(--ink); }
.a-body em { font-style: italic; }
.a-body a:not(.pill) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); transition: text-decoration-color 0.2s var(--ease); }
.a-body a:not(.pill):hover { text-decoration-color: var(--ink); }
.a-body > ul, .a-body > ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.a-body > ul li, .a-body > ol li { margin-bottom: 0.4em; }

.a-body h2 {
  font-size: clamp(1.6rem, 2.7vw, 2.3rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: clamp(46px, 7vh, 72px) 0 18px;
  scroll-margin-top: 90px;
  text-wrap: balance;
}
.a-body h2 .idx { display: block; margin-bottom: 12px; letter-spacing: 0.1em; font-weight: 400; }
.a-body h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); letter-spacing: -0.02em; line-height: 1.12; margin: 34px 0 10px; }

.a-body blockquote { margin: 34px 0; padding: 4px 0 4px 24px; border-left: 1px solid var(--ink); }
.a-body blockquote p { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.65rem); font-weight: 300; line-height: 1.36; letter-spacing: -0.015em; color: var(--ink); margin: 0; }
.a-body blockquote cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* ---------- after the piece ---------- */

.a-more { padding: clamp(56px, 9vh, 96px) var(--pad) clamp(64px, 10vh, 110px); border-top: 1px solid var(--rule); }
.a-more__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: clamp(20px, 4vh, 36px); }
.a-more__t { font-size: clamp(1.8rem, 3.8vw, 3rem); letter-spacing: -0.04em; }
.a-more .w-list { padding: 0; }

.a-by { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: center; margin-bottom: clamp(44px, 8vh, 80px); }
.a-by__photo { width: 112px; height: 112px; border-radius: 4px; overflow: hidden; border: 1px solid var(--rule); }
.a-by__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.a-by__name { font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -0.035em; line-height: 1; }
.a-by__say { margin: 12px 0 0; font-weight: 300; font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.45; color: var(--mute); max-width: 52ch; }
.a-by__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .a-body { grid-template-columns: minmax(0, 1fr); }
  .a-body > *, .a-body > .a-wide, .a-body > .a-toc { grid-column: 1; }
  .a-body > .a-toc { grid-row: auto; position: static; margin-bottom: 34px; }
  .a-body { max-width: calc(var(--col) + 2 * var(--pad)); }
  .a-toc ol { border-left: 0; border-top: 1px solid var(--rule); gap: 0; }
  .a-toc a { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--rule); }
  .a-toc a.is-on { border-left: 0; }
  .a-body > .a-wide { margin-right: calc(-1 * var(--pad)); }
}

@media (max-width: 760px) {
  .w-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "date meta" "main main"; gap: 10px 16px; }
  .w-row__date { grid-area: date; }
  .w-row__main { grid-area: main; }
  .w-row__meta { grid-area: meta; display: flex; gap: 14px; justify-content: flex-start; text-align: left; }
  .a-by { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
  .a-by__photo { width: 72px; height: 72px; }
  .a-more__head { flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .w-row__t span, .a-toc a { transition: none; }
}

/* fixes after the first render */
.a-body .a-toc a { text-decoration: none; }
.a-body p.mono, .a-short__label, .a-toc__label { font-size: 11px; line-height: 1.4; font-weight: 400; }
.a-by__name { font-weight: 800; letter-spacing: -0.04em; margin: 0; font-size: clamp(1.8rem, 3.6vw, 3rem); }
.colophon a.mono { text-decoration: none; }
.colophon a.mono:hover { color: var(--bone); }

/* ---- after the design critique (D-design-critique.md) ---- */
/* AA on bone: every secondary text on these pages clears 4.5:1 */
:root { --mute: rgba(13, 13, 15, 0.68); --faint: rgba(13, 13, 15, 0.6); }
/* the section number sits beside its heading, as on the home page */
.a-body h2 .idx { display: inline-block; margin: 0 14px 0 0; vertical-align: 0.5em; font-size: 11px; }
/* the portrait is grey everywhere on this site */
.a-by__photo img { filter: grayscale(1) contrast(1.06); }
/* one left edge: the header sits on the reading column */
.a-head { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, var(--col)) minmax(0, 1fr); column-gap: clamp(28px, 5vw, 88px); }
.a-head > * { grid-column: 2; }
.a-title { max-width: none; }
@media (max-width: 1100px) { .a-head { grid-template-columns: minmax(0, 1fr); } .a-head > * { grid-column: 1; } }
.a-head > .a-title { grid-column: 2 / -1; max-width: 16ch; font-size: clamp(2.5rem, 5.4vw, 5rem); }
@media (max-width: 1100px) { .a-head > .a-title { grid-column: 1; } }

/* ============================================================
   RUBRICS (mockup v2)
   ============================================================ */

.art { display: block; }
.a-body p.mono, .mono.a-meta { font-size: 11px; }

/* an open question left in a draft stays visible in the local preview;
   the build refuses to publish a post that still carries one */
mark.ask {
  background: transparent;
  border: 1px dashed var(--rule-strong);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.86em;
  color: var(--mute);
}
mark.ask b { font-family: var(--mono); font-weight: 400; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-right: 4px; }

/* ---------- shared devices ---------- */

/* The rule: type only, between two 2px ink rules. Shared ending of the
   two practical rubrics (Building with AI, Teardowns). */
.rule {
  margin: clamp(40px, 7vh, 64px) 0 clamp(20px, 4vh, 36px);
  padding: clamp(20px, 3vh, 28px) 0 clamp(22px, 3.4vh, 30px);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}
.a-body .rule__label { margin: 0 0 14px; color: var(--ink); }
.a-body p.rule__t {
  margin: 0 0 20px;
  font-size: clamp(1.55rem, 2.9vw, 2.45rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.rule__copy { padding: 8px 14px; cursor: pointer; }

/* copyable block: an ink panel, a plain-language head, mono inside */
.cp {
  margin: 30px 0 36px;
  background: var(--ink-2);
  border-radius: 12px;
  overflow: hidden;
}
.cp__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid rgba(239, 238, 233, 0.12);
}
.cp__t { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: #EFEEE9; line-height: 1.3; }
.cp__btn { background: #EFEEE9; color: var(--ink); border-color: #EFEEE9; padding: 7px 13px; cursor: pointer; flex: none; }
.cp__btn.is-copied { background: transparent; color: #EFEEE9; border-color: #EFEEE9; }
.rule__copy.is-copied { background: transparent; color: inherit; border-color: currentColor; }
.cp__body, .cp__peek {
  display: block;
  margin: 0;
  padding: 18px 20px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(239, 238, 233, 0.88);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ln { display: block; }
.ln--gap { min-height: 1.7em; }
/* a list line wraps under its own text, not under the bracket or the number */
.ln--h { padding-left: var(--h); text-indent: calc(-1 * var(--h)); }
.cp__fold > summary { display: block; list-style: none; cursor: pointer; padding-bottom: 20px; }
.cp__fold > summary::-webkit-details-marker { display: none; }
.cp__peek { padding-bottom: 6px; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.cp__more { margin: 0 20px; color: var(--bone); border-color: rgba(239, 238, 233, 0.3); }
.cp__fold > summary:hover .cp__more { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.cp__more-c { display: none; }
.cp__fold[open] > summary { padding: 16px 0 0; }
.cp__fold[open] .cp__peek, .cp__fold[open] .cp__more-o { display: none; }
.cp__fold[open] .cp__more-c { display: inline; }

/* one big number with a real source */
.stat { margin: 30px 0 34px; padding: 22px 0 4px; border-top: 1px solid var(--rule); }
.a-body p.stat__n { margin: 0; font-size: clamp(3rem, 7.4vw, 5.6rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; color: var(--ink); }
.a-body p.stat__l { margin: 12px 0 0; font-size: 1rem; line-height: 1.45; color: var(--mute); max-width: 44ch; }

/* default pull quote: light type behind a left rule */
.pull { margin: 36px 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--ink); }
.a-body .pull p { margin: 0; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); font-weight: 300; line-height: 1.28; letter-spacing: -0.02em; color: var(--ink); }

.a-body li code, .a-body p code { font-family: var(--mono); font-size: 0.8em; background: var(--bone-2); padding: 2px 6px; border-radius: 4px; }

/* ============================================================
   BUILDING WITH AI · the lab notebook
   ============================================================ */

.a-head--ai > .a-title { font-size: clamp(2.1rem, 5.2vw, 4.2rem); max-width: 18ch; }
.plate {
  margin: clamp(26px, 4vh, 38px) 0 0;
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  overflow: hidden;
}
.plate__r { padding: 13px 16px 14px; border-top: 1px solid var(--rule); display: grid; gap: 5px; }
.plate__r:nth-child(-n+2) { border-top: 0; }
.plate__r:nth-child(odd) { border-right: 1px solid var(--rule); }
.plate dt { font-size: 10px; color: var(--mute); margin: 0; }
.plate dd { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }

/* sidenotes: a mono margin beside the column, where a claim says where it comes from */
.snw { position: relative; }
.snw > p { margin: 0 0 1.15em; }
.sn {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--mute);
  margin: -0.4em 0 1.4em;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--ink);
}
.sn__k { display: block; font-size: 9.5px; margin-bottom: 4px; color: var(--ink); }
.sn a { color: inherit; }
.sn--read { border-left-color: var(--rule-strong); }
@media (min-width: 1200px) {
  .a-body--ai .sn {
    position: absolute;
    top: 0.35em;
    left: calc(100% + clamp(28px, 4vw, 64px));
    width: min(230px, 17vw);
    margin: 0;
    border-left: 1px solid var(--rule-strong);
  }
  .a-body--ai .sn--measured { border-left-color: var(--ink); }
}

/* ============================================================
   FOUNDER NOTES · the letter
   ============================================================ */

.a-head--founder > .a-title { font-size: clamp(1.6rem, 3vw, 2.4rem); max-width: 26ch; line-height: 1; }
.period {
  margin: clamp(22px, 3.4vh, 30px) 0 0;
  max-width: 560px;
  color: var(--mute);
}
.a-head .period__who { margin: 0 0 10px; color: var(--ink); }
.period__line { display: flex; align-items: center; gap: 14px; }
.period .mono { font-size: 10.5px; flex: none; }
.period__bar { flex: 1; height: 1px; background: var(--rule-strong); position: relative; min-width: 40px; }
.period__bar i { position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.period__bar i:first-child { left: 0; }
.period__bar i:last-child { right: 0; }
.a-head > .opening {
  grid-column: 2 / -1;
  margin: clamp(30px, 5vh, 48px) 0 0;
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  font-weight: 300;
  line-height: 1.16;
  letter-spacing: -0.025em;
  max-width: 26ch;
  text-wrap: pretty;
}
.a-body--founder hr.part { border: 0; height: 1px; width: 64px; background: var(--rule-strong); margin: clamp(52px, 8vh, 80px) auto 0; }
.a-body--founder h2 { margin-top: clamp(30px, 5vh, 46px); }
.a-body--founder .sn { margin: 0 0 1.4em; font-family: var(--display); letter-spacing: -0.005em; font-size: 1rem; font-weight: 300; line-height: 1.5; border-left-width: 1px; }
.a-body--founder .sn__k { display: none; }
/* one pull quote per piece, breaking out of the column to the right */
.a-body > .pull--founder {
  grid-column: 2 / -1;
  border: 0;
  padding: 0;
  margin: clamp(44px, 7vh, 72px) 0;
}
.a-body .pull--founder p { font-size: clamp(2rem, 4.4vw, 3.8rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em; max-width: 20ch; text-wrap: balance; }
.a-toc--plain a { grid-template-columns: 1fr; }
/* m2: a short ink line tells the quote from a heading */
.a-body > .pull--founder::before { content: ""; display: block; width: 48px; height: 2px; background: var(--ink); margin-bottom: clamp(18px, 3vh, 26px); }
/* M6: the rule I kept is said in the letter's light voice, between hairlines */
.rule--founder { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.a-body .rule--founder .rule__label { color: var(--mute); }
.a-body .rule--founder p.rule__t { margin: 0; font-size: clamp(1.45rem, 2.5vw, 2.1rem); font-weight: 300; line-height: 1.2; letter-spacing: -0.022em; text-wrap: pretty; }
/* M6: the checklist stays copyable but sits on bone, in ink: black is for Aftershock and BwAI code */
.a-body--founder .cp { background: transparent; border: 1px solid var(--rule-strong); }
.a-body--founder .cp__head { border-bottom-color: var(--rule); }
.a-body--founder .cp__t { color: var(--ink); }
.a-body--founder .cp__btn { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.a-body--founder .cp__btn.is-copied { background: transparent; color: var(--ink); border-color: var(--ink); }
.a-body--founder .cp__body { color: var(--ink-read); }

/* ============================================================
   AFTERSHOCK · filed
   ============================================================ */

.tk-head { padding: clamp(116px, 18vh, 176px) var(--pad) clamp(44px, 7vh, 72px); }
.tk-head .a-crumb a { color: var(--mute); }
.tk-head .a-crumb a:hover { color: var(--bone); }
.stamp { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0 0 clamp(22px, 4vh, 36px); color: var(--bone); }
.stamp span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.stamp span:first-child { color: var(--bone); }
.stamp span + span::before { content: "·"; margin: 0 12px; color: var(--mute); }
.stamp span:last-child { color: var(--mute); }
.tk-title { font-size: clamp(2.4rem, 7vw, 5.6rem); line-height: 0.92; letter-spacing: -0.045em; max-width: 14ch; text-wrap: balance; }
.tk-deck { margin: clamp(20px, 3.4vh, 30px) 0 0; font-size: clamp(1.15rem, 1.9vw, 1.5rem); font-weight: 300; line-height: 1.38; color: var(--mute); max-width: 44ch; }
.tk-src { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: clamp(26px, 4vh, 40px) 0 0; color: var(--faint); }
.tk-src a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--rule-strong); display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.tk-src a svg { width: 9px; height: 9px; }
.a-body--aftershock { padding-top: clamp(44px, 7vh, 80px); }
.a-body--aftershock > p:first-child { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); line-height: 1.5; font-weight: 340; color: var(--ink); }

/* the call: dashed means "not a product" on this site, here "not settled yet" */
.call {
  margin: 30px 0 40px;
  border: 1px dashed var(--rule-strong);
  border-radius: 20px;
  padding: clamp(18px, 2.6vw, 28px);
}
.a-body .call__k { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; color: var(--mute); }
.call__k b { font-weight: 400; color: var(--ink); }
.a-body p.call__t { margin: 0 0 16px; font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; color: var(--ink); }
.a-body p.call__s { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--mute); line-height: 1.45; }
.tk-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.tk-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--crew); flex: none; }
.tk-pill--line { color: var(--ink); }

/* the Aftershock band: the fast kind in its own container, on ink */
.tk-band { padding: clamp(56px, 9vh, 100px) var(--pad); }
.tk-band--s { padding-top: clamp(44px, 7vh, 72px); padding-bottom: clamp(44px, 7vh, 72px); }
.tk-band__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 32px; flex-wrap: wrap; margin-bottom: clamp(22px, 4vh, 40px); }
.tk-band__over { margin: 0 0 12px; color: var(--bone); }
.tk-band__say { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.45rem); font-weight: 300; line-height: 1.35; letter-spacing: -0.015em; max-width: 44ch; }
.tk-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 44px);
  align-items: center;
  padding: clamp(20px, 3vh, 30px) 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.tk-row:last-child { border-bottom: 1px solid var(--rule); }
.tk-row__stamp { color: var(--mute); font-size: 10px; line-height: 1.6; }
.tk-row__stamp > span { display: block; }
.tk-row__t { font-size: clamp(1.5rem, 3.2vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.98; text-wrap: balance; }
.tk-row:hover .tk-row__t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tk-row .tk-pill { color: var(--bone); }
.gap-bone { height: 0; }
.tk-band--s + .gap-bone { height: clamp(40px, 7vh, 72px); background: var(--bone); }
/* ink never touches ink: the Aftershock band and the ink author block keep a bone strip between them */
.gap-bone--end { height: clamp(56px, 9vh, 100px); background: var(--bone); }

/* nav over the dark masthead keeps its bone chip */
.is-darkhead .tk-head { margin-top: 0; }

/* ============================================================
   TEARDOWNS · the stage
   ============================================================ */

.ph { margin: 0; }
.ph__frame { border-radius: 13.5% / 6.2%; border: 1px solid var(--rule-strong); padding: 5px; background: var(--bone); }
.ph__frame img { width: 100%; height: auto; border-radius: 12.5% / 5.8%; display: block; }
.ph figcaption { margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--mute); }
.ph figcaption i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink); margin-right: 8px; }

.a-head .td-flow { margin: 0 0 clamp(20px, 4vh, 36px); color: var(--ink); }
.td-flow span { white-space: nowrap; }

.a-body--teardown { row-gap: 0; }
.t-sec {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr);
  column-gap: clamp(28px, 5vw, 88px);
  align-items: start;
}
.t-sec > h2 { grid-column: 1 / -1; }
.t-sec__prose { grid-column: 1; grid-row: 2; }
.t-sec__prose > p { margin: 0 0 1.15em; }
.t-sec__shots { grid-column: 2; grid-row: 2; position: sticky; top: 92px; display: grid; gap: 18px; max-width: 420px; justify-self: start; background: var(--bone-2); border-radius: 20px; padding: 18px; }
.t-sec__shots--1 { grid-template-columns: minmax(0, 230px); }
.t-sec__shots--2, .t-sec__shots--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.t-sec--chg .t-sec__prose { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, var(--col)) minmax(0, 1fr); column-gap: clamp(28px, 5vw, 88px); }
.t-sec--chg .t-sec__prose > * { grid-column: 1; }
.t-sec--chg .t-sec__prose > .chg { grid-column: 1 / -1; }

.chg { display: grid; grid-template-columns: repeat(2, minmax(0, 250px)) minmax(0, 1fr); gap: clamp(14px, 2.4vw, 32px); align-items: start; background: var(--bone-2); border-radius: 20px; padding: clamp(18px, 2.6vw, 32px); margin: 8px 0 34px; }
.chg__f { margin: 0; }
.a-body .chg__k { margin: 0 0 10px; color: var(--ink); font-size: 10px; white-space: nowrap; }
.a-body p.chg__why { align-self: end; margin: 0; font-size: 1rem; color: var(--mute); line-height: 1.5; max-width: 30ch; }
.sk { aspect-ratio: 600 / 1299; min-height: 0; overflow: hidden; border: 1px solid var(--ink); border-radius: 12.5% / 5.8%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 18% 12%; }
.sk__owl { width: 38%; aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; }
.a-body p.sk__line { margin: 0; text-align: center; font-weight: 700; font-size: clamp(0.95rem, 1.3vw, 1.15rem); line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.sk__bar { width: 70%; height: 6px; border-radius: 999px; border: 1px solid var(--ink); }

/* ============================================================
   INDEX
   ============================================================ */

.feat {
  margin: clamp(28px, 5vh, 56px) var(--pad) 0;
  padding: clamp(26px, 4vh, 40px) 0 clamp(22px, 3.6vh, 34px);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  column-gap: clamp(28px, 5vw, 88px);
  align-items: start;
}
.feat[hidden] { display: none; }
.feat__a { display: block; text-decoration: none; color: inherit; }
.feat__thumbs { display: flex; justify-content: center; background: var(--bone-2); border-radius: 20px; padding: 28px; }
.feat__thumbs .ph { width: 100%; max-width: 230px; }
.feat__k { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 18px; color: var(--mute); }
.feat__k span:first-child { color: var(--ink); }
.feat__t { font-size: clamp(2.3rem, 6vw, 5.2rem); line-height: 0.92; letter-spacing: -0.045em; max-width: 16ch; text-wrap: balance; }
.feat__t span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.5s var(--ease); }
.feat__a:hover .feat__t span { background-size: 100% 2px; }
.feat__d { margin: 18px 0 0; font-size: clamp(1.1rem, 1.7vw, 1.4rem); font-weight: 300; line-height: 1.4; color: var(--mute); max-width: 48ch; }

.river { padding: clamp(40px, 7vh, 72px) 0 clamp(64px, 10vh, 110px); }
.w-row__setup { display: block; margin-top: 12px; color: var(--mute); font-size: 10.5px; }
.w-row__meta .mono { white-space: nowrap; }
.w-row__date { text-transform: uppercase; }
.w-row__open { display: block; margin-top: 12px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 300; line-height: 1.34; letter-spacing: -0.012em; color: var(--ink); max-width: 46ch; }
.w-row__thumbs { display: flex; gap: 10px; margin-top: 16px; }
.w-row__thumbs .ph { width: 64px; }
.w-row__thumbs .ph__frame { padding: 2px; }

.w-oss-wrap { padding: clamp(56px, 9vh, 96px) var(--pad); }
.w-oss-wrap .oss { margin-top: 0; }
.rel-row {
  display: grid;
  grid-template-columns: 112px 180px minmax(0, 1fr) auto;
  gap: clamp(14px, 2.6vw, 36px);
  align-items: baseline;
  padding: clamp(20px, 3vh, 28px) 0;
  border-top: 1px dashed var(--rule-strong);
  text-decoration: none;
  color: inherit;
}
.ver { justify-self: start; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; background: var(--ink); color: var(--bone); padding: 5px 11px; border-radius: 999px; }
.rel-row__t { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.rel-row__d { font-weight: 300; color: var(--mute); line-height: 1.4; }
.rel-row__date { color: var(--mute); font-size: 10px; }
.rel-row:hover .rel-row__t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .t-sec { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  .t-sec__shots { position: static; grid-column: 1; grid-row: 2; margin: 4px 0 26px; max-width: none; justify-self: stretch; justify-content: center; }
  .t-sec--chg .t-sec__prose { grid-template-columns: minmax(0, 1fr); }
  .t-sec__prose { grid-row: 3; }
  .t-sec__shots--1 { grid-template-columns: minmax(0, 240px); }
  .a-body > .pull--founder { grid-column: 1; }
  .a-head > .opening { grid-column: 1; }
  .chg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-body p.chg__why { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 760px) {
  .plate { grid-template-columns: minmax(0, 1fr); }
  .plate__r:nth-child(2) { border-top: 1px solid var(--rule); }
  .plate__r:nth-child(odd) { border-right: 0; }
  .feat { grid-template-columns: minmax(0, 1fr); }
  .feat__thumbs { margin-top: 26px; padding: 24px; }
  .feat__thumbs .ph { max-width: 210px; }
  /* M4: one row of rubrics that scrolls under the thumb */
  /* the row fades at the right edge, so a pill cut by the screen reads as more to swipe (QA 2026-09-25) */
  .w-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-right: 40px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
  .w-filter::-webkit-scrollbar { display: none; }
  .w-filter .pill { flex: none; }
  .t-sec__shots { padding: 16px; }
  .tk-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stamp pill" "t t"; gap: 12px 16px; }
  .tk-row__stamp { grid-area: stamp; }
  .tk-row__t { grid-area: t; }
  .tk-row .tk-pill { grid-area: pill; justify-self: end; }
  .tk-row__stamp > span { display: inline; }
  .tk-row__stamp > span + span::before { content: "\00B7  "; white-space: pre; }
  .stamp span { padding: 5px 10px; font-size: 10px; }
  .stamp { gap: 6px; }
  .stamp span, .stamp span:first-child, .stamp span:last-child { border-radius: 999px; }
  .stamp span + span { border-left: 1px solid var(--rule-strong); }
  .rel-row { grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; }
  .rel-row__d { grid-column: 1 / -1; }
  .rel-row__date { grid-column: 1 / -1; }
  .w-row__thumbs .ph { width: 84px; }
  .a-body .pull--founder p { font-size: clamp(1.8rem, 8vw, 2.4rem); }

}
@media (max-width: 480px) {
  .a-head > .opening { font-weight: 350; }
  .cp__body { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .feat__t span { transition: none; }
}

/* after the first render */
.is-darkhead .nav { background: var(--bone); }

/* after Lorenzo's review, 25/9: no numbered strip, Aftershock never ink above the ink contact */
.a-more .w-list > :last-child { border-bottom: 1px solid var(--rule); }

/* ---- after the design critic (h-design-critic.md, 25/9) ---- */

/* M5: in Keep reading the Aftershock entries sit in their own small ink tray, above the
   essay rows; bone rows always stand between it and the ink contact */
.tk-tray { border-radius: 20px; padding: clamp(20px, 3vw, 40px); margin: 0 0 clamp(28px, 5vh, 48px); }
.tk-tray__k { margin: 0 0 6px; color: var(--bone); }
.tk-tray .tk-row:last-child { border-bottom: 0; padding-bottom: 4px; }
.tk-tray .tk-row__t { font-size: clamp(1.4rem, 2.7vw, 2.3rem); }

/* m5: the short version is a lab card like the plate, not a bone-2 ground */
.a-short { background: transparent; border: 1px solid var(--rule-strong); border-radius: 12px; }

/* m9: contents are a fold on a phone, an open rail on desktop */
.a-toc__fold > summary { display: block; list-style: none; }
.a-toc__fold > summary::-webkit-details-marker { display: none; }
.a-toc__n { display: none; }
@media (min-width: 761px) { .a-toc__fold > summary { pointer-events: none; } }
@media (max-width: 760px) {
  .a-body .a-toc__fold > summary { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); cursor: pointer; color: var(--ink); }
  .a-toc__n { display: inline; color: var(--mute); }
  .a-toc__fold > summary::after { content: "+"; font-size: 16px; line-height: 1; }
  .a-toc__fold[open] > summary { border-bottom: 0; }
  .a-toc__fold[open] > summary::after { content: "\2212"; }
}

/* ---- site build (tools/build-ledger.mjs) ---- */
/* a featured essay without screens takes the full row */
.feat--text { grid-template-columns: minmax(0, 1fr); }
/* no filter row under a single rubric: the header closes on its own */
.w-head--solo { padding-bottom: clamp(56px, 9vh, 96px); }
.a-by__name a { text-decoration: none; }
.a-by__name a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
/* on a phone the stamp keeps its two lines, as on desktop: inline, a long
   stamp wrapped mid-phrase or opened a line on the dot */
@media (max-width: 760px) {
  .tk-row__stamp > span { display: block; }
  .tk-row__stamp > span + span::before { content: none; }
}
