/* ============================================================
   Story layout — one message per carousel page.

   Opted into with <main class="deck story">. Each page is a split:
   the message on the left (eyebrow, title, one lede, a few points),
   one piece of evidence on the right (a diagram, a console, the
   numbers). Type and spacing follow the frame's height as well as
   its width, so a page reads whole on a laptop screen; on a phone
   the two halves stack and the page scrolls as before.
   ============================================================ */

/* ---------- Frame: centre the page when it has room ---------- */

.mode-carousel .deck.story > .chapter {
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 2.6vh, 28px) 28px clamp(18px, 3vh, 32px);
}
/* Auto margins centre the page in its frame and fall to zero when the page
   is taller than the frame, so nothing is ever clipped above the fold. */
.deck.story .chapter-inner {
  margin: auto;
  max-width: 1180px;
}

/* ---------- Type, sized against height too ---------- */

.deck.story h1.display {
  font-size: clamp(32px, min(4.8vw, 8vh), 58px);
  margin-bottom: clamp(10px, 2vh, 18px);
}
.deck.story h2.title {
  font-size: clamp(24px, min(3.1vw, 5.4vh), 40px);
  margin-bottom: clamp(10px, 1.8vh, 16px);
}
.deck.story h2.hero-sub {
  font-size: clamp(16px, min(1.8vw, 3vh), 22px);
  margin-bottom: clamp(8px, 1.6vh, 14px);
}
.deck.story .eyebrow { margin-bottom: clamp(10px, 1.8vh, 16px); }
.deck.story .lede {
  font-size: clamp(14.5px, min(1.35vw, 2.3vh), 17px);
  max-width: 56ch;
  margin-bottom: clamp(14px, 2.6vh, 22px);
}
.deck.story .chips { margin-bottom: clamp(12px, 2.4vh, 22px); }
.deck.story .hint { margin-top: clamp(10px, 2.4vh, 22px); }

/* Code surfaces show what is typed. JetBrains Mono would draw >= as one
   glyph, which is not what a reader should type. */
.deck.story .code,
.deck.story code { font-variant-ligatures: none; }

/* ---------- The split ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
}
.split > * { min-width: 0; }
.split.hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }

@media (max-width: 980px) {
  .split, .split.hero { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .deck.story .chapter-inner { margin: 0 auto; }
  .mode-carousel .deck.story > .chapter { padding: 16px 18px 40px; }
}

/* ---------- Points: the few things the page proves ---------- */

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(10px, 1.9vh, 16px);
}
.points li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 13px;
  align-items: start;
}
.points .pi {
  grid-row: span 2;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(14,165,233,.14);
  color: var(--primary);
}
.points .pi svg { width: 16px; height: 16px; }
.points b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin: 1px 0 2px;
}
.points li > span:not(.pi) {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.points a, .ticks a, .lane a {
  color: var(--primary); text-decoration: none;
  border-bottom: 1px solid rgba(137,206,255,.32);
}
.points a:hover, .ticks a:hover { border-bottom-color: var(--primary); }

.points code, .verdict code {
  font-family: var(--mono); font-size: .9em; color: var(--primary);
}

/* A closing line that states the page's answer. */
.verdict {
  margin: 0;
  max-width: 54ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}
.verdict b { color: var(--text); }

.deck.story .seealso { margin-top: clamp(12px, 2.4vh, 20px); }

/* ---------- Exhibit: the evidence panel ---------- */

.exhibit {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surf-1), rgba(21,27,45,.55));
  padding: clamp(14px, 2.4vh, 20px);
}
.exhibit-cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.exhibit-cap b { color: var(--primary); font-weight: 400; }
.exhibit-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
}

/* ---------- 01 · Layers: your data → CameoDB → your AI ---------- */

.layers { display: grid; }
.layer {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surf-1);
  padding: 12px 14px 13px;
}
.layer-tag {
  display: block;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.layer-items { display: flex; flex-wrap: wrap; gap: 6px; }
.layer-items span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surf-2);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.layer-ai { border-color: rgba(245,158,11,.30); background: rgba(245,158,11,.05); }
.layer-ai .layer-tag { color: #f5b041; }
.layer-ai .layer-items span { border-color: rgba(245,158,11,.25); }

.layer-core {
  border-color: rgba(137,206,255,.45);
  background: linear-gradient(180deg, rgba(14,165,233,.17), rgba(14,165,233,.04));
  box-shadow: 0 18px 48px rgba(3,105,161,.18);
  padding: 14px;
}
.core-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.core-name {
  font-family: 'Liberation Mono', var(--mono);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}
.core-name i { font-style: normal; color: var(--accent); }
.core-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid rgba(137,206,255,.35);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
/* Three cells fused by hairlines: one engine, not three systems. */
.core-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(137,206,255,.28);
  border: 1px solid rgba(137,206,255,.28);
  border-radius: 10px;
  overflow: hidden;
}
.cell { background: rgba(10,16,32,.9); padding: 10px 12px 11px; }
.cell b { display: block; font-size: 13px; color: var(--text); }
.cell small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.core-foot {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 11px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--muted);
}
.core-foot span::before { content: '\25B8'; color: var(--accent); margin-right: 6px; }

.layer-link {
  position: relative;
  height: clamp(26px, 4.2vh, 36px);
  display: flex; align-items: center; justify-content: center;
}
.layer-link::before {
  content: '';
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; margin-left: -1px;
  background: var(--line-soft);
}
/* a pulse travelling upward: data flows toward the model */
.layer-link::after {
  content: '';
  position: absolute; left: 50%; bottom: 0;
  width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--accent);
  animation: layer-flow 2.6s linear infinite;
}
.layer-link + .layer-core + .layer-link::after { animation-delay: 1.3s; }
.layer-link span {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}
@keyframes layer-flow {
  0%   { transform: translateY(0);     opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-34px); opacity: 0; }
}

/* ---------- 02 · Lanes: two writes against one ---------- */

.lanes { display: grid; gap: 14px; }
.lane {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px 14px;
}
.lane.is-bad  { border-color: rgba(255,143,133,.28); background: rgba(255,143,133,.04); }
.lane.is-good { border-color: rgba(110,231,168,.30); background: rgba(110,231,168,.05); }
.lane-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 13.5px; font-weight: 700;
}
.lane-head svg { width: 16px; height: 16px; flex: 0 0 16px; }
.lane.is-bad .lane-head  { color: var(--bad); }
.lane.is-good .lane-head { color: var(--good); }

.track { display: flex; align-items: center; min-width: 0; }
.nd {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  border: 1px solid var(--line-soft);
  background: var(--surf-2);
  border-radius: 8px;
  padding: 6px 9px;
  white-space: nowrap;
}
.nd.is-core {
  flex: 1 1 auto;
  white-space: normal;
  text-align: center;
  border-color: rgba(110,231,168,.45);
  background: rgba(110,231,168,.10);
}
.ln { flex: 1 1 14px; min-width: 10px; height: 2px; background: var(--line-soft); }
.lane.is-good .ln { background: rgba(110,231,168,.55); }
/* The stretch where search and data disagree. */
.drift {
  position: relative;
  flex: 1.5 1 auto;
  display: flex; align-items: center;
  margin-left: 6px;
  padding: 7px 7px 24px;
  border: 1px dashed rgba(255,143,133,.45);
  border-radius: 10px;
  background: rgba(255,143,133,.07);
}
.drift .ln { background: repeating-linear-gradient(90deg, var(--bad) 0 5px, transparent 5px 9px); opacity: .7; }
.drift em {
  position: absolute; left: 0; right: 0; bottom: 5px;
  text-align: center;
  font-style: normal;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--bad);
}
.lane-foot {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 11px;
}
.lane-foot span {
  font-size: 11.5px;
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: rgba(12,19,36,.5);
}
.lane.is-good .lane-foot span { border-color: rgba(110,231,168,.28); }

@media (max-width: 560px) {
  .track { flex-direction: column; align-items: stretch; }
  .ln { flex: 0 0 12px; width: 2px; height: 12px; min-width: 0; margin: 0 auto; }
  .drift { flex-direction: column; align-items: stretch; margin: 0; }
  .drift .ln { background: repeating-linear-gradient(180deg, var(--bad) 0 4px, transparent 4px 7px); }
  .nd { text-align: center; }
}

/* ---------- 03 · Steps: the write path, top to bottom ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 14px;
  padding-bottom: clamp(10px, 2vh, 16px);
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: '';
  position: absolute; left: 16px; top: 36px; bottom: 2px;
  width: 2px;
  background: linear-gradient(rgba(137,206,255,.5), var(--line));
}
.steps li:last-child::before { display: none; }
.sn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--mono); font-size: 12px; color: var(--primary);
  background: rgba(14,165,233,.12);
  border: 1px solid rgba(137,206,255,.42);
}
.steps b {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 14px; color: var(--text);
  margin: 6px 0 3px;
}
.steps li > div > span { font-size: 13px; line-height: 1.5; color: var(--muted); }
.eng {
  font-family: var(--mono); font-size: 9.5px; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: 999px; padding: 1px 7px;
  border: 1px solid var(--line-soft); color: var(--dim);
}
.eng.redb    { color: var(--amber);   border-color: rgba(255,185,95,.4); }
.eng.tantivy { color: var(--primary); border-color: rgba(137,206,255,.4); }

/* ---------- 04 · Agent: connect line and the tool catalogue ---------- */

.tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.tools span {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--bg-low);
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tools span::before {
  content: ''; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
}
.stack-gap { height: 14px; }

/* ---------- 05 · Projection: what leaves the shard ---------- */

.proj-call {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
  color: var(--muted);
  background: var(--bg-low);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  overflow-wrap: anywhere;
}
.proj-call .k { color: var(--primary); }
.proj-call .s { color: var(--amber); }
.fgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.f {
  font-family: var(--mono); font-size: 11px;
  color: var(--dim);
  border: 1px dashed var(--line-soft);
  border-radius: 7px;
  padding: 5px 9px;
}
.f.on {
  color: var(--primary);
  border: 1px solid rgba(137,206,255,.55);
  background: rgba(14,165,233,.14);
}
/* the long summary: shown as lines of text that stay behind */
.f.long { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; }
.f.long i { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--line); }
.f.long i:last-child { flex-grow: .5; }
.proj-arrow {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary);
}
.proj-arrow::before, .proj-arrow::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.proj-arrow svg { width: 14px; height: 14px; }
.proj-out {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 14px;
  font-family: var(--mono); font-size: 12px;
  background: var(--bg-low);
  border: 1px solid rgba(137,206,255,.35);
  border-radius: 10px;
  padding: 11px 14px;
}
.proj-out dt { color: var(--primary); }
.proj-out dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.proj-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin-top: 12px;
}
.proj-stats div {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
  background: rgba(12,19,36,.5);
}
.proj-stats b { display: block; font-size: 19px; font-weight: 650; letter-spacing: -.02em; color: var(--text); }
.proj-stats span { display: block; font-size: 11.5px; line-height: 1.4; color: var(--muted); margin-top: 2px; }

/* ---------- 06 · Console: the query syntax at a glance ---------- */

.console {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-low);
  overflow: hidden;
}
.console .code-head { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.qrow {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: clamp(7px, 1.25vh, 10px) 16px;
}
.qrow + .qrow { border-top: 1px solid rgba(46,52,71,.75); }
.qrow code { font-family: var(--mono); font-size: 12.5px; color: var(--primary); overflow-wrap: anywhere; }
.qrow code .op { color: var(--amber); }
.qrow span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
@media (max-width: 560px) { .qrow { grid-template-columns: minmax(0, 1fr); gap: 3px; } }

.langs { margin-top: 2px; }
.langs h3 {
  margin: 0 0 9px;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.langs .chips { margin-bottom: 10px; gap: 6px; }
.langs .chip { padding: 4px 10px; }
.langs p { margin: 0; max-width: 56ch; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* ---------- 07 · Ring: smaller, inside its panel ---------- */

.deck.story .cluster { padding: 4px 4px 12px; }
.deck.story .cluster-svg { max-height: min(300px, 40vh); }
.cluster-key .k-range { background: var(--amber); }

/* ---------- 08 · Numbers, two by two ---------- */

.deck.story .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deck.story .stat-value { font-size: clamp(21px, min(2.2vw, 3.6vh), 27px); }
@media (max-width: 420px) { .deck.story .stats { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 09 · Ways in, compact ---------- */

.deck.story .cta-grid { gap: 10px; }
.deck.story .cta { padding: clamp(12px, 2vh, 18px) 18px; }

/* ---------- Short frames: a laptop with the browser's own bars ---------- */

@media (min-width: 981px) and (max-height: 700px) {
  .deck.story .chips .chip { padding: 4px 10px; }
  .deck.story .points li > span:not(.pi) { font-size: 13px; }
  .deck.story .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .layer-link::after { animation: none; display: none; }
}

/* ---------- Fit-and-finish ---------- */

/* A long command wraps rather than hiding behind a sideways scroll;
   copying it still gives one line. */
.deck.story .code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* The ways-in cards: icon beside both lines, so each card is two lines tall. */
.deck.story .cta { row-gap: 2px; }
.deck.story .cta .cta-ico { grid-row: span 2; }

@media (min-width: 981px) and (max-height: 700px) {
  .deck.story .proj-arrow { margin: 8px 0; }
  .deck.story .proj-stats { margin-top: 8px; }
  .deck.story .stack-gap { height: 10px; }
}

/* Arrow keys mean nothing on a touch screen. */
@media (hover: none) { .deck.story .hint { display: none; } }

/* ---------- Room to grow ----------
   story.js sets --story-zoom: the largest scale, up to 1.3, at which
   every page still fits its frame. One value for the whole deck, so
   type keeps its size from page to page. */

.deck.story .chapter-inner {
  zoom: var(--story-zoom, 1);
  /* grown, the page still spans no wider than the column the header's
     brand and controls line up on */
  max-width: min(1180px, calc(var(--shell-max) / var(--story-zoom, 1)));
}

/* While measuring: no slide-away scaling, and some headroom kept free
   above and below, so a grown page never touches the bars. */
.deck.story.is-fitting .chapter-inner { transform: none !important; }
.mode-carousel .deck.story.is-fitting > .chapter {
  padding-top: calc(clamp(14px, 2.6vh, 28px) + 4vh);
  padding-bottom: calc(clamp(18px, 3vh, 32px) + 4vh);
}
@media (min-width: 981px) and (max-height: 700px) {
  .deck.story .cta { padding: 10px 16px; }
  .deck.story .code { line-height: 1.6; }
}

/* ---------- Steps that show their output (Quickstart) ---------- */

/* Inline code in running text. */
.ic, .points code, .lede code {
  font-family: var(--mono); font-size: .9em; color: var(--primary);
  font-variant-ligatures: none;
}

/* A terminal shows the command bright and what it printed dimmer, with
   the words that say "it worked" in green. */
.code .o  { color: var(--muted); }
.code .ok { color: var(--good); }
.code .os-only { display: none; }
html[data-os="mac"]   .code .os-only.for-mac,
html[data-os="linux"] .code .os-only.for-linux,
html[data-os="win"]   .code .os-only.for-win { display: block; }

/* The step number beside a split: the node keeps its column. */
.chapter-inner.step > .step-body.split { padding-top: 0; }

/* Response size, before and after projection. */
.sizes { display: grid; gap: 8px; margin: 0 0 clamp(14px, 2.6vh, 22px); max-width: 520px; }
.size-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.size-row i {
  display: block; height: 10px; width: max(var(--w), 6px);
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,143,133,.55), rgba(255,143,133,.25));
}
.size-row.is-lean i { background: var(--good); box-shadow: 0 0 10px rgba(110,231,168,.5); }
.size-row b { font-weight: 600; color: var(--text); text-align: right; }
.size-row.is-lean b { color: var(--good); }
@media (max-width: 420px) { .size-row { grid-template-columns: 96px minmax(0, 1fr) 58px; gap: 8px; } }

/* Quickstart step 1 on a phone: the download button leads the column, right
   under the points, so the one tap most visitors want is the first thing
   they reach. The commands and the checksum follow it. */
@media (max-width: 980px) {
  html[data-os="mac"]   #qs-get .os-only.for-mac,
  html[data-os="linux"] #qs-get .os-only.for-linux,
  html[data-os="win"]   #qs-get .os-only.for-win { display: flex; flex-direction: column; }
  #qs-get .alt-get { order: -1; margin: 0 0 16px; }
}

/* A long reference table: rows a little closer together. */
.console.is-tight .qrow { padding-top: clamp(5px, .9vh, 8px); padding-bottom: clamp(5px, .9vh, 8px); }

/* Tools that stand apart from the walk above them: a smaller number, no
   connecting line, and the name and its line of text side by side. */
.steps.is-apart {
  margin-top: clamp(12px, 2vh, 16px);
  padding-top: clamp(10px, 1.8vh, 14px);
  border-top: 1px solid var(--line);
  gap: 8px;
}
.steps.is-apart li { grid-template-columns: 34px minmax(0, 1fr); align-items: center; padding-bottom: 0; }
.steps.is-apart li::before { display: none; }
.steps.is-apart .sn { width: 24px; height: 24px; margin-left: 5px; font-size: 10.5px; }
.steps.is-apart b { display: inline; margin: 0 8px 0 0; }
.steps.is-apart li > div > span { font-size: 12.5px; }

/* Console with a hit count per row: query on the left, total_hits on the right */
.console.is-counts .qrow { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
.qrow .n { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--good); text-align: right; white-space: nowrap; }
.qrow .n small { margin-left: 6px; font-size: 11.5px; color: var(--muted); }
.qrow span b { color: var(--text); font-weight: 500; }
.console.is-tri .qrow { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) 92px; }
.qrow .tk { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; }
@media (max-width: 560px) { .console.is-tri .qrow { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) 86px; gap: 8px; } }
.code .x { color: var(--bad); }
.code .w { color: var(--amber); }
/* Column-aligned output keeps its lines and scrolls inside its frame instead of wrapping */
.deck.story .code.is-cols { white-space: pre; overflow-wrap: normal; }
.cta-grid.stack { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.qrow code a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(137,206,255,.45); }
/* On one column, .is-lead puts the evidence (a download card) right after the lede, ahead of the points */
@media (max-width: 980px) {
  .split.is-lead { gap: 0; }
  .split.is-lead > div:first-child { display: contents; }
  .split.is-lead > div:last-child { order: 1; margin-top: 8px; }
  .split.is-lead .points { order: 2; margin-top: 26px; }
}

/* ---------- Blog index: a list of posts beside each message ---------- */
.post-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surf-1);
  overflow: hidden;
}
.post-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: clamp(9px, 1.5vh, 12px) 16px;
  color: inherit;
  text-decoration: none;
  transition: background .2s var(--ease);
}
.post-row + .post-row { border-top: 1px solid rgba(46,52,71,.75); }
.post-row:hover { background: var(--surf-3); }
.pr-ico {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.pr-ico svg { width: 16px; height: 16px; color: #fff; opacity: .92; }
.pr-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pr-main b { font-size: 13.5px; font-weight: 650; line-height: 1.35; color: var(--text); letter-spacing: -.005em; }
.pr-main > span {
  font-size: 12.5px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-list.is-brief .pr-main > span { -webkit-line-clamp: 1; }
.pr-date {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); text-align: right; white-space: nowrap;
  display: flex; flex-direction: column; gap: 3px;
}
.pr-date small { font-size: 9.5px; color: var(--dim); opacity: .8; }
.post-row:hover .pr-main b { color: var(--primary); }

/* A release row leads with its version, coloured from the post's own pair */
.post-row.is-release { grid-template-columns: 64px minmax(0, 1fr) auto; }
.pr-ver {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: var(--c1);
}
.post-row.is-release .pr-main b { font-weight: 550; font-size: 13px; }

/* The lead post keeps its card, with a shorter visual beside a list */
.post-card.is-feature .post-visual { height: 64px; }
.post-card.is-feature:hover { transform: none; }

@media (max-width: 560px) {
  .post-row { grid-template-columns: 30px minmax(0, 1fr); }
  .post-row .pr-date { grid-column: 2; text-align: left; flex-direction: row; gap: 8px; }
  .pr-ico { width: 30px; height: 30px; }
  .post-row.is-release { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; }
  .post-row.is-release .pr-date { grid-column: auto; text-align: right; }
}

/* ---------- Blog posts: one section per page, heading and lead on the left ---------- */
.post-story .post-split { align-items: start; }
.post-story .post-split h2.title,
.post-story .post-solo h2.title { font-size: clamp(22px, min(2.5vw, 4.4vh), 32px); }
.post-story .article-head h1.title { font-size: clamp(24px, min(2.9vw, 5vh), 38px); }
.post-story .post-left .lede { margin-bottom: 0; }
.post-story .post-solo { max-width: 760px; }
.post-story .prose { max-width: none; font-size: 14.5px; line-height: 1.62; }
.post-story .prose p { margin-bottom: 12px; }
.post-story .prose li { margin-bottom: 6px; }
.post-story .prose pre { font-size: 12px; line-height: 1.5; padding: 12px 16px; }
.post-story .prose h4 { margin-top: 16px; }
.post-story .article-head .article-standfirst { margin: clamp(10px, 1.6vh, 14px) 0 clamp(10px, 1.6vh, 14px); }

.toc {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-low);
  overflow: hidden;
}
.toc .code-head { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.toc-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: clamp(5px, 1vh, 8px) 16px;
  font-size: 13.5px; line-height: 1.4;
  color: var(--text);
  text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.toc-row + .toc-row { border-top: 1px solid rgba(46,52,71,.75); }
.toc-row:hover { background: var(--surf-3); color: var(--primary); }
.toc-n { font-family: var(--mono); font-size: 11px; color: var(--c1, var(--primary)); }
.post-story .post-hero { display: block; }
.post-story .prose .post-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
/* A post frame sits under the post bar, so it keeps a little less headroom */
.mode-carousel .deck.story.post-story:not(.is-fitting) > .chapter { padding-top: clamp(10px, 1.8vh, 20px); padding-bottom: clamp(12px, 2vh, 22px); }
/* Back to the list of sections, on the eyebrow's line */
.post-eyebrow-row { display: flex; align-items: center; justify-content: flex-start; gap: 16px; margin-bottom: clamp(10px, 1.8vh, 16px); }
.deck.story .post-eyebrow-row .eyebrow { margin-bottom: 0; white-space: nowrap; min-width: 0; }
.toc-back {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.toc-back svg { width: 13px; height: 13px; }
.toc-back:hover { color: var(--primary); border-color: rgba(137,206,255,.45); background: var(--surf-3); }
@media (max-width: 560px) {
}

/* Hand-laid posts: a full-width page, card rows, notes and the hero */
.post-story .post-wide { width: 100%; }
.post-story .post-wide .lede { max-width: 72ch; }
.post-story .post-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.post-story .post-cols.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-story .post-cols .card { padding: clamp(12px, 2vh, 18px); }
.post-story .post-cols .card h3 svg { color: var(--c1, var(--primary)); }
.post-story .post-cols .card p { line-height: 1.55; }
.post-story .post-cols .card p + p { margin-top: 8px; }
.post-story .cases .card h3 { margin-bottom: 6px; }
.post-story .case-q { font-style: italic; color: var(--text) !important; border-left: 2px solid var(--c1, var(--accent)); padding-left: 10px; }
.post-story .post-note { margin: 12px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); max-width: 72ch; }
.post-story .post-note a, .post-story .lede a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(137,206,255,.3); }
.post-story .post-hero img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.post-story .card code, .post-story .points code { font-family: var(--mono); font-size: .9em; color: var(--primary); }
@media (max-width: 980px) {
  .post-story .post-cols, .post-story .post-cols.pair { grid-template-columns: minmax(0, 1fr); }
}
.post-story .points b a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(137,206,255,.5); }
.post-story .points b a:hover { color: var(--primary); }
.post-story .card .post-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.post-story .post-actions a { font-size: 13px; color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(137,206,255,.3); }
.post-story .lede code, .post-story .post-note code { font-family: var(--mono); font-size: .86em; color: var(--primary); }

/* A list of documents: the file name in mono, the description in full */
.post-list.is-full .pr-main > span { display: block; -webkit-line-clamp: unset; overflow: visible; }
.post-row.is-file .pr-main b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0; }

/* A link inside a verdict reads as one */
.verdict a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(137,206,255,.3); }
.verdict a:hover { border-bottom-color: var(--primary); }
.verdict code { white-space: nowrap; }
