/* Who Runs the Loop? — the OpenAI API as one timeline down the page.
 *
 * Lane colors are categorical (one per API surface) and were checked as a set
 * with the dataviz skill's palette validator on the page surface (#f7f5ef), in
 * the order they sit side by side on the spine: chat blue, assistants yellow,
 * responses violet, agents orange, realtime aqua. Every adjacent pair passes
 * the CVD and normal-vision floors; yellow, orange and aqua sit under 3:1
 * against the paper, so a lane is never identified by color alone: each card
 * names its lane in ink, and the lanes are labelled on the spine at each year.
 * Text never wears a lane color. The model line is ink, and the completions
 * lane a warm gray, because neither is a category to tell apart.
 */
:root {
  --paper: #f7f5ef;
  --card: #fbfaf6;
  --card-strong: #fffefb;
  --ink: #1b1a17;
  --ink-2: #4f4c45;
  --ink-3: #8a867c;
  --rule: #dcd8cd;
  --rule-soft: #e9e6dc;
  --code-bg: #f1eee5;
  --accent: #b5601e;
  --mark: rgba(181, 96, 30, 0.15);
  --wash: rgba(27, 26, 23, 0.045);

  --l-model: #1b1a17;
  --l-completions: #a8a397;
  --l-chat: #2a78d6;
  --l-assistants: #eda100;
  --l-responses: #4a3aa7;
  --l-agents: #eb6834;
  --l-realtime: #1baf7a;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --side-w: 344px;
  --lanes-w: 112px;
  --dot-y: 27px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-padding-top: calc(var(--appnav-h, 0px) + 24px); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  max-width: 1560px;
  margin: 0 auto;
}

/* ---------- sidebar ---------- */

.side {
  position: sticky;
  top: var(--appnav-h, 0px);
  height: calc(100vh - var(--appnav-h, 0px));
  height: calc(100dvh - var(--appnav-h, 0px));
  border-right: 1px solid var(--rule-soft);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.side-inner { padding: 1.35rem 1.35rem 1.6rem 1.5rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.wordmark {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.55rem;
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.wordmark em { font-style: italic; color: var(--accent); }

.lede {
  margin-top: 0.7rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.lede strong { color: var(--ink); font-weight: 600; }

/* the who-runs-what table */

.matrix { margin-top: 1.15rem; }

.matrix-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
}
.matrix-head h2 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.asof {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.asof time { color: var(--ink); font-weight: 500; }

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.15rem;
  table-layout: fixed;
}
.matrix-table th, .matrix-table td { padding: 0; }
.matrix-table thead th {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  text-align: center;
  padding: 0.4rem 0 0.25rem;
  vertical-align: bottom;
  line-height: 1.15;
  transition: color 0.3s, opacity 0.3s;
}
.matrix-table thead th:first-child { width: 6.4rem; }
.matrix-table thead th .api-swatch {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  margin: 0 auto 0.3rem;
}
.matrix-table thead th.unborn { opacity: 0.32; }
.matrix-table thead th.dead { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-3); }
.matrix-table thead th.current { color: var(--ink); font-weight: 600; }

.matrix-table tbody th {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-2);
  text-align: left;
  padding: 0.16rem 0;
  white-space: nowrap;
  cursor: help;
}
.matrix-table tbody tr + tr > * { border-top: 1px solid var(--rule-soft); }
.matrix-table td { text-align: center; }
.matrix-table td.current { background: var(--wash); }

.cell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 21px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 3px;
}
.cell-btn:hover { background: rgba(27, 26, 23, 0.07); }
.cell-btn svg { width: 13px; height: 13px; overflow: visible; }
.cell-btn.pulse svg { animation: pulse 1.1s ease-out; }
@keyframes pulse {
  0% { transform: scale(1.7); }
  60% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.h-ball { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.h-fill { fill: var(--ink); }
.h-lost { stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; }
.h-na { stroke: var(--rule); stroke-width: 1.5; stroke-linecap: round; }
.h-unborn { fill: none; stroke: none; }

.matrix-key {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.8rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--ink-2);
}
.matrix-key li { display: inline-flex; align-items: center; gap: 0.32rem; }
.matrix-note { margin-top: 0.45rem; font-size: 0.72rem; line-height: 1.45; color: var(--ink-3); }
.matrix-key svg { width: 11px; height: 11px; overflow: visible; }

/* era index */

.eras {
  margin-top: 1.15rem;
  border-top: 1px solid var(--rule);
}
.eras a {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  column-gap: 0.4rem;
  align-items: baseline;
  padding: 0.38rem 0.4rem 0.38rem 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s;
}
.eras a:hover { background: var(--wash); }
.eras .era-year { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); padding-left: 0.1rem; }
.eras .era-name { font-size: 0.86rem; font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.eras .era-name i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.eras .era-gist { grid-column: 2; font-size: 0.74rem; color: var(--ink-2); line-height: 1.35; }
.eras a.current { background: var(--wash); box-shadow: inset 2px 0 0 var(--ink); }

/* filters */

.controls { margin-top: 1rem; display: grid; gap: 0.6rem; }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; }
.control-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  width: 3.2rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; flex: 1; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.18rem 0.55rem 0.18rem 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] i { box-shadow: 0 0 0 1.5px var(--paper); }

.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.seg button {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border: 0;
  background: var(--card);
  cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--rule); }
.seg button:hover { background: var(--wash); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.side-foot { margin-top: 1rem; font-size: 0.78rem; color: var(--ink-3); }

/* ---------- timeline ---------- */

.timeline { padding: 0 1.6rem 4rem 1.4rem; min-width: 0; }

.tl-head {
  display: grid;
  grid-template-columns: minmax(0, 0.64fr) var(--lanes-w) minmax(0, 1fr);
  align-items: end;
  padding: 1.35rem 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}
.tl-head-models { text-align: right; padding-right: 0.9rem; }
.tl-head-api { padding-left: 0.9rem; }

.rows { list-style: none; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 0.64fr) var(--lanes-w) minmax(0, 1fr);
  position: relative;
}
.row[hidden] { display: none; }

.cell-models { padding: 0.55rem 0.9rem 0.55rem 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; min-width: 0; }
.cell-api { padding: 0.55rem 0 0.55rem 0.9rem; min-width: 0; }
.cell-lanes { position: relative; }
.cell-lanes svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* lane drawing */
.ln { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.ln.dotted { stroke-dasharray: 0.1 5.2; stroke-width: 2.6; }
.ln.legacy { stroke-width: 1.4; }
.ln.end-cap { stroke-width: 2.4; }
.dot { stroke: var(--paper); stroke-width: 2; }
.dot.model { fill: var(--l-model); }
.dot.hollow { fill: var(--paper); stroke-width: 2.2; }
.bar { stroke-width: 5; stroke-linecap: round; }
.conn { stroke: var(--rule); stroke-width: 1; }
.lane-label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  fill: var(--ink-3);
}

/* year divider */
.row-year .cell-models { padding-top: 1.6rem; padding-bottom: 0.4rem; justify-content: flex-end; }
.row-year .cell-api { padding-top: 1.6rem; padding-bottom: 0.4rem; display: flex; align-items: flex-end; }
.year-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.year-rule { flex: 1; height: 1px; background: var(--rule); margin-bottom: 0.55rem; }
.year-note { font-size: 0.8rem; font-style: italic; color: var(--ink-2); margin: 0 0.8rem 0.35rem 0; white-space: nowrap; }

/* cards */

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  padding: 0.62rem 0.85rem 0.7rem;
  width: 100%;
  transition: opacity 0.25s, border-color 0.2s, box-shadow 0.2s;
}
.card:target, .card.flash { border-color: var(--ink-3); box-shadow: 0 0 0 3px var(--mark); }
.card.dim { opacity: 0.28; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.meta time { color: var(--ink-2); font-weight: 500; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.badge i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.badge.dotted i { background: none !important; border: 1.5px dotted var(--ink-3); }

.card h3 {
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.003em;
}
.card .surface {
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.card .surface code {
  background: var(--code-bg);
  border-radius: 3px;
  padding: 0.02rem 0.28rem;
}
.card p.what { margin-top: 0.38rem; font-size: 0.875rem; line-height: 1.55; color: var(--ink); }
.card p.shift {
  margin-top: 0.42rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 1.35rem;
  position: relative;
}
.card p.shift::before {
  content: "⇄";
  position: absolute;
  left: 0;
  top: -0.05rem;
  font-size: 0.92rem;
  color: var(--ink-3);
}
.card p.later { margin-top: 0.38rem; font-size: 0.78rem; color: var(--ink-3); font-style: italic; }
.card p.num { margin-top: 0.38rem; font-size: 0.8rem; color: var(--ink-2); }
.card p.num::before { content: "▸ "; color: var(--ink-3); }
.card .src { margin-top: 0.45rem; font-size: 0.74rem; color: var(--ink-3); line-height: 1.45; }
.card .src a { color: var(--ink-2); text-decoration-color: var(--rule); }
.card .src a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.card.major h3 { font-size: 1.08rem; }
.card.major { background: var(--card-strong); border-color: var(--rule); }

/* inline code in prose */
.card p code, .reading code, .era-body code, .lede code {
  font-size: 0.86em;
  background: var(--code-bg);
  border-radius: 3px;
  padding: 0.02rem 0.26rem;
}

/* code samples */
details.code { margin-top: 0.5rem; }
details.code summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--card);
  user-select: none;
}
details.code summary::-webkit-details-marker { display: none; }
details.code summary::before { content: "▸"; font-size: 0.7rem; transition: transform 0.15s; }
details.code[open] summary::before { transform: rotate(90deg); }
details.code summary:hover { border-color: var(--ink-3); }
pre.code-body {
  margin-top: 0.4rem;
  background: var(--code-bg);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
pre.code-body .cl { display: block; }
pre.code-body mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
pre.code-body .c-http { color: var(--ink); font-weight: 600; }
pre.code-body .c-head { color: var(--ink-2); }
pre.code-body .c-res { color: var(--ink-2); }
pre.code-body .c-note { color: var(--ink-3); font-style: italic; }
pre.code-body .c-str { color: #6b5a2e; }

/* model cards */
.card.model { max-width: 26rem; }
.card.model h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.5rem; }
.card.model .ids { font-family: var(--mono); font-size: 0.68rem; font-weight: 400; color: var(--ink-3); }
.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.42rem;
}
.spec {
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.4;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--ink-2);
  white-space: nowrap;
}
.spec b { color: var(--ink); font-weight: 600; }
.spec small { font-size: 0.92em; color: var(--ink-3); }
.ctx { margin-top: 0.45rem; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem; }
.ctx-track { position: relative; height: 5px; border-radius: 3px; background: var(--rule-soft); overflow: hidden; }
.ctx-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--ink); }
.ctx-label { font-family: var(--mono); font-size: 0.64rem; color: var(--ink-3); white-space: nowrap; }
.variants {
  margin-top: 0.42rem;
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--ink-2);
}
.variants th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 0.1rem 0.4rem 0.1rem 0; }
.variants td { padding: 0.12rem 0.4rem 0.12rem 0; border-top: 1px solid var(--rule-soft); white-space: nowrap; }
.variants td:first-child { color: var(--ink); }

/* era cards: a new API is born */
.card.era {
  background: var(--card-strong);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--era-color, var(--ink));
  padding: 0.85rem 1rem 0.95rem;
  box-shadow: 0 1px 0 var(--rule-soft), 0 10px 24px -18px rgba(27, 26, 23, 0.35);
}
.era-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.card.era h3 {
  margin-top: 0.15rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.95rem;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.card.era h3 em { font-style: italic; }
.era-endpoint {
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.era-body { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.6; color: var(--ink); }
.era-body p + p { margin-top: 0.5rem; }
.era-runs {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.25rem 0.6rem;
  font-size: 0.7rem;
  color: var(--ink-2);
}
.era-runs span { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.era-runs svg { width: 10px; height: 10px; flex: none; overflow: visible; }

/* what runs behind one Agents API session */
.anatomy { margin-top: 0.85rem; }
.an-box {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.45rem 0.6rem 0.5rem;
  font-size: 0.76rem;
  line-height: 1.42;
  color: var(--ink-2);
}
.an-k {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.an-k span { font-weight: 400; letter-spacing: 0.02em; text-transform: none; color: var(--ink-3); }
.an-box ul { list-style: none; }
.an-box li { padding-left: 0.75rem; position: relative; }
.an-box li::before { content: "·"; position: absolute; left: 0.15rem; color: var(--ink-3); }
.an-you { border-style: dashed; border-color: var(--ink-3); }
.an-you ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0.8rem; }
.an-wire {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding: 0.35rem 0;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--ink-2);
}
.an-openai {
  position: relative;
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  padding: 1.4rem 0.5rem 0.5rem;
  background: rgba(27, 26, 23, 0.035);
}
.an-side {
  position: absolute;
  top: 0.4rem;
  left: 0.6rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.an-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0.45rem; }
.an-sandbox { border-color: var(--ink); border-width: 1.5px; background: var(--card-strong); }
.anatomy figcaption { margin-top: 0.45rem; font-size: 0.74rem; line-height: 1.45; color: var(--ink-3); }

/* ---------- reading + sources ---------- */

.reading, .sources {
  max-width: 1560px;
  margin: 0 auto;
  padding: 3rem 1.6rem 1rem calc(var(--side-w) + 1.4rem);
}
.reading h2, .sources h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1;
}
.reading h2 em, .sources h2 em { font-style: italic; color: var(--accent); }
.reading .reading-lede, .sources .sources-lede { margin-top: 0.6rem; max-width: 68ch; color: var(--ink-2); font-size: 0.95rem; }
.findings {
  list-style: none;
  counter-reset: f;
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
  gap: 1rem 1.6rem;
}
.findings li { counter-increment: f; border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.findings h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.findings h3::before {
  content: counter(f, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}
.findings p { margin-top: 0.4rem; font-size: 0.875rem; line-height: 1.6; color: var(--ink); }
.findings .refs { font-size: 0.76rem; color: var(--ink-3); }
.findings .refs a { color: var(--ink-2); }

.source-list {
  margin-top: 1.2rem;
  columns: 2 26rem;
  column-gap: 2rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-2);
  padding-left: 1.4rem;
}
.source-list li { break-inside: avoid; margin-bottom: 0.4rem; }
.source-list a { color: var(--ink); text-decoration-color: var(--rule); }
.source-list a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.source-list .pub { color: var(--ink-3); }

.colophon {
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.6rem 1.6rem 3rem calc(var(--side-w) + 1.4rem);
  font-size: 0.76rem;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ---------- tooltip ---------- */

.tip {
  position: fixed;
  z-index: 4000;
  max-width: 19rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 7px;
  padding: 0.55rem 0.7rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.tip b { font-weight: 600; }
.tip .tip-k {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bdb8ac;
  margin-bottom: 0.15rem;
}
.tip .tip-since { margin-top: 0.3rem; font-family: var(--mono); font-size: 0.66rem; color: #bdb8ac; }

/* ---------- narrower screens: one column, lanes at the left ---------- */

@media (max-width: 1180px) {
  :root { --side-w: 0px; }
  .layout { display: block; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--rule-soft); overflow: visible; }
  .side-inner { max-width: 46rem; padding: 1.4rem 1.2rem 1.4rem; }
  .wordmark { font-size: 2.4rem; }
  .timeline { padding: 0 1rem 3rem 0.4rem; }
  .tl-head { grid-template-columns: var(--lanes-w) minmax(0, 1fr); }
  .tl-head-models { display: none; }
  .tl-head-api { padding-left: 0.6rem; }
  .row { grid-template-columns: var(--lanes-w) minmax(0, 1fr); }
  .cell-lanes { grid-column: 1; grid-row: 1 / span 2; }
  .cell-models { grid-column: 2; grid-row: 1; align-items: stretch; padding: 0.5rem 0 0 0.6rem; }
  .cell-models:empty { display: none; }
  .cell-api { grid-column: 2; grid-row: 2; padding: 0.5rem 0 0.5rem 0.6rem; }
  .cell-api:empty { padding: 0 0 0.5rem; }
  .card.model { max-width: none; }
  .row-year .cell-models { grid-row: 1; padding: 1.2rem 0 0.3rem 0.6rem; justify-content: flex-start; }
  .row-year .cell-api { grid-row: 2; padding-top: 0; }
  .reading, .sources, .colophon { padding-left: 1.2rem; padding-right: 1.2rem; }
}

@media (max-width: 560px) {
  :root { --lanes-w: 64px; }
  .timeline { padding-right: 0.75rem; padding-left: 0.1rem; }
  .card { padding-left: 0.7rem; padding-right: 0.7rem; }
  body { font-size: 14.5px; }
  .card.era h3 { font-size: 1.6rem; }
  .era-runs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-grid, .an-you ul { grid-template-columns: minmax(0, 1fr); }
  .matrix-table thead th:first-child { width: 5.6rem; }
}

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