/* cairnobs.org -- "Scope"

   The site's own look, no longer the family shell. It borrows from the product
   rather than from its siblings: the ground and housing colours of the mark's
   scope, the trace orange of its screen, the console's typefaces (Overpass and
   Overpass Mono, the same files the Cairn OBS web UI ships), and its way of
   reading a stream: a histogram with a selection over it, which is the
   navigation here (the masthead's scope, drawn by theme.js).

   Sections:
     1  palette           every colour on the site, dark then light
     2  type and base
     3  masthead          top bar, query field, the scope
     4  page              hero, section openers and their traces, panels
     5  footer
     6  consent banner, jump palette
     7  narrow screens, reduced motion

   Dark is the default and the system preference is not consulted: Cairn OBS
   is a dark brand, and light is there for whoever actively picks it. */

/* ==========================================================================
   1  PALETTE
   Nothing outside this block names a colour, except the legend swatches that
   have to match the diagrams' own fills. Text pairs are WCAG AA or better on
   --panel and --ground in both themes.
   ========================================================================== */
:root {
  --ground: #0D0B10;        /* the mark's tile ground */
  --ground-2: #121017;
  --chrome: #110F15;
  --panel: #17141D;
  --panel-2: #1E1A26;
  --line: #2A2533;
  --line-strong: #3D3546;   /* the scope housing */
  --grid: rgba(98, 87, 110, 0.16);
  --ink: #F2EFF5;           /* 16.0 on panel */
  --ink-soft: #ABA3B5;      /*  7.5 */
  --ink-faint: #8A8195;     /*  4.9 */
  --trace: #FF8A00;         /* the trace, the spike, the buttons */
  --trace-hot: #FFB84D;
  --trace-text: #FF9A2E;    /* orange as text: 8.6 on panel */
  --trace-ink: #140A00;     /* on a trace-filled button: 8.3 */
  --glow: rgba(255, 138, 0, 0.32);
  --tint: rgba(255, 138, 0, 0.10);
  --sig: #3fb6ff;           /* query keys, the query path */
  --str: #9fd18a;           /* query strings */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 14px 34px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  --scrim: rgba(6, 4, 9, 0.62);
  --hist-idle: #3D3546;
  --hist-seen: #7a4a1d;
  --hist-view: #FF8A00;
  --brush: rgba(255, 184, 77, 0.10);
  --brush-edge: rgba(255, 184, 77, 0.65);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ground: #F6F4F8;        /* chart paper */
  --ground-2: #EFECF3;
  --chrome: #FBFAFC;
  --panel: #FFFFFF;
  --panel-2: #F4F1F7;
  --line: #E2DDE8;
  --line-strong: #C9C1D2;
  --grid: rgba(98, 87, 110, 0.10);
  --ink: #17131C;           /* 18.3 on panel */
  --ink-soft: #554D60;      /*  8.0 */
  --ink-faint: #6E6679;     /*  5.5; 5.0 on ground */
  --trace: #C25400;         /* white on it: 4.6 */
  --trace-hot: #E6690E;
  --trace-text: #9A4300;    /* 6.0 on ground */
  --trace-ink: #FFFFFF;
  --glow: transparent;
  --tint: rgba(194, 84, 0, 0.08);
  --sig: #0a6ea8;
  --str: #2f6f34;
  --shadow: 0 1px 2px rgba(23, 19, 28, 0.05), 0 10px 26px -16px rgba(23, 19, 28, 0.22);
  --shadow-lg: 0 30px 60px -30px rgba(23, 19, 28, 0.32);
  --scrim: rgba(23, 19, 28, 0.45);
  --hist-idle: #D6CFDE;
  --hist-seen: #E8B48A;
  --hist-view: #C25400;
  --brush: rgba(194, 84, 0, 0.08);
  --brush-edge: rgba(194, 84, 0, 0.6);
  color-scheme: light;
}

/* ==========================================================================
   2  TYPE AND BASE
   ========================================================================== */
@font-face {
  font-family: 'Overpass'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/overpass-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Overpass Mono'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/fonts/overpass-mono-variable.woff2') format('woff2');
}
:root {
  --sans: 'Overpass', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Overpass Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius: 6px;
  --top-h: 58px;
  --scope-h: 46px;
  --mast-h: calc(var(--top-h) + var(--scope-h));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--mast-h) + 8px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 28px; }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 90;
  background: var(--trace); color: var(--trace-ink);
  font-family: var(--mono); font-size: 13px; padding: 10px 16px; text-decoration: none;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--trace-hot); outline-offset: 2px; }

/* Both wordmarks ship and CSS picks one: <picture media> follows the system
   scheme only, so the switch would move the page and leave the logo behind. */
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }

kbd {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px;
}

/* Buttons. Primary is the trace, lit; ghost is a hairline. */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.2;
  text-decoration: none; background: transparent; color: var(--ink);
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn .i { width: 15px; height: 15px; }
.btn-primary {
  background: var(--trace); color: var(--trace-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 0 0 var(--glow);
}
.btn-primary:hover { background: var(--trace-hot); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 22px -4px var(--glow); }
:root[data-theme="light"] .btn-primary:hover { background: #A94A00; }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); background: var(--panel-2); }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; }
.linklike:hover { color: var(--trace-text); text-decoration: underline; }

/* ==========================================================================
   3  MASTHEAD
   The bar and the scope stick together as one block.
   ========================================================================== */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--chrome) 90%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar {
  display: flex; align-items: center; gap: 18px;
  height: var(--top-h); padding: 0 20px;
}
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.brand img.logo { height: 40px; width: auto; }

/* The query field, written the way the console's search bar is. */
.qbar {
  flex: 1 1 auto; max-width: 36rem; min-width: 0; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 8px 0 12px;
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink-soft); font-family: var(--mono); font-size: 13px; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.qbar[hidden] { display: none; }
.qbar:hover { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--tint); }
.qbar-prompt { color: var(--trace-text); font-family: var(--mono); font-weight: 700; }
.qbar-text { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qk { color: var(--sig); }
.qs { color: var(--str); }
.qp { color: var(--ink-faint); }
.qbar-caret {
  display: inline-block; width: 7px; height: 15px; margin-left: 3px; vertical-align: -3px;
  background: var(--trace); animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.topbar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.qbar:not([hidden]) + .topbar-end { margin-left: 0; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.seg button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; border: 0; border-radius: 5px;
  background: transparent; color: var(--ink-faint); font-size: 15px;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--trace-text); box-shadow: var(--shadow); }
.btn-sponsor .i { stroke: #db61a2; }
.btn-sponsor:hover .i { fill: #db61a2; }

/* The scope: bars on top, the section names under them. Without scripting
   there are no bars, and the names are a row of tabs. */
.scope { padding: 0 20px; }
.scope-hist { display: none; width: 100%; height: 26px; touch-action: none; cursor: crosshair; }
html.js .scope-hist { display: block; }
.scope-labels { display: flex; height: 36px; }
html.js .scope-labels { height: calc(var(--scope-h) - 27px); }
html.js .scope-label { line-height: calc(var(--scope-h) - 27px); }
.scope-label {
  flex: 1 1 0; min-width: 0; position: relative;
  display: block; padding: 0 6px 0 7px; line-height: 36px;
  border-left: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-faint); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.scope-label:hover { color: var(--ink); }
.scope-label.here { color: var(--trace-text); }
.scope-label.here::before {
  content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: var(--trace);
}
/* The tip that follows the pointer over the bars. */
.scope-tip {
  position: fixed; top: calc(var(--mast-h) + 6px); left: 0; z-index: 41;
  pointer-events: none; white-space: nowrap;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 3px 8px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .12s;
}
.scope-tip.on { opacity: 1; }
.scope-tip b { color: var(--trace-text); font-weight: 600; }

/* ==========================================================================
   4  PAGE
   ========================================================================== */
main { display: block; counter-reset: ph; }
section { padding: 84px 0; position: relative; }
section.flush { padding-top: 0; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--trace-text); margin: 0 0 14px;
}
.section-head { max-width: 760px; margin: 0 0 40px; }
h2.section-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 12px; }
p.section-sub { color: var(--ink-soft); font-size: 17px; margin: 0; }

/* ---- hero: words left, the console right, on graticule ---- */
.hero-split { padding: 76px 0 92px; overflow: hidden; }
.hero-split::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero-split::after {
  content: ""; position: absolute; right: -10%; top: -20%; width: 70%; height: 90%; pointer-events: none;
  background: radial-gradient(closest-side, var(--tint), transparent);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 4.5vw, 64px); align-items: center;
}
.release-note {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px 4px 5px;
}
.release-mark { height: 22px; width: auto; }
.hero-split h1 {
  font-size: clamp(38px, 4.6vw, 58px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 22px;
}
.hero-split h1 .accent {
  background: linear-gradient(90deg, var(--trace-hot), var(--trace));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px var(--glow));
}
:root[data-theme="light"] .hero-split h1 .accent { background: none; color: var(--trace-text); filter: none; }
.hero-split p.lede { color: var(--ink-soft); font-size: 17.5px; line-height: 1.65; max-width: 580px; margin: 0 0 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-ctas .btn { padding: 12px 22px; font-size: 15.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--trace); }
.query-mock {
  margin: 26px 0 0; max-width: 580px;
  background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--trace);
  border-radius: var(--radius); padding: 12px 16px;
  font-family: var(--mono); font-size: 13.5px; color: var(--ink);
  overflow-x: auto; white-space: nowrap;
}
.query-mock .dot-row { display: none; }
.query-mock .kw { color: var(--sig); }
.query-mock .pipe { color: var(--trace-text); }

.hero-shot { position: relative; }
.window {
  border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow-lg), 0 0 0 6px color-mix(in oklab, var(--panel) 50%, transparent);
}
.window-bar {
  display: flex; align-items: center; gap: 7px; padding: 9px 14px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.window-bar .lamp { width: 8px; height: 8px; border-radius: 2px; background: var(--line-strong); }
.window-bar .lamp.on { background: var(--trace); box-shadow: 0 0 8px var(--glow); }
.window-name { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-left: 6px; }
.window img { display: block; width: 100%; height: auto; }
.hero-cat { position: absolute; height: 78px; width: auto; right: 6px; top: -53px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35)); }
.hero-shot-note { margin: 12px 0 0; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* ---- screenshots, in the same window chrome as the hero ---- */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.shots figure { margin: 0; }
.shots figure > a { display: block; color: inherit; text-decoration: none; }
.shots figcaption { margin-top: 14px; }
.shots figcaption strong { display: block; font-size: 15px; color: var(--ink); }
.shots figcaption span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.shots-note { margin: 22px 0 0; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* ---- section openers ---- */
.page-hero { padding: 96px 0 0; counter-increment: ph; border-top: 1px solid var(--line); }
.page-hero .wrap { position: relative; }
.ph-num::before {
  content: counter(ph, decimal-leading-zero);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 22px; padding: 0 6px;
  border: 1px solid color-mix(in oklab, var(--trace) 55%, transparent); border-radius: 4px;
  background: var(--tint); color: var(--trace-text); letter-spacing: 0.04em;
}
.page-hero h1 {
  font-size: clamp(32px, 4.2vw, 52px); font-weight: 800; line-height: 1.06; letter-spacing: -0.025em;
  margin: 0 0 16px; max-width: 900px;
}
.page-hero p.lede { color: var(--ink-soft); font-size: 18px; max-width: 700px; margin: 0; }
/* The trace under each opener. Stretched to the width; the stroke keeps its
   weight because it does not scale with the drawing. */
.trace { display: block; width: 100%; height: 60px; margin-top: 40px; overflow: visible; }
.trace path { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.trace-base { stroke: var(--line); stroke-width: 1; }
.trace-line { stroke: var(--trace); stroke-width: 2; filter: drop-shadow(0 0 4px var(--glow)); }
.trace-ping { stroke: var(--trace-hot); stroke-width: 9; }
html.js .trace-line { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s ease-out; }
html.js .trace-ping { opacity: 0; transition: opacity .3s 1s; }
html.js .page-hero.seen .trace-line { stroke-dashoffset: 0; }
html.js .page-hero.seen .trace-ping { opacity: 1; animation: ping 2.4s 1.3s ease-out infinite; }
@keyframes ping { 0% { stroke-width: 9; opacity: 1; } 70% { stroke-width: 24; opacity: 0; } 100% { stroke-width: 9; opacity: 0; } }
.page-hero + section { padding-top: 36px; }
/* Two blocks in a row inside one part of the page share one gap, not two. */
section:not(.page-hero) + section:not(.page-hero) { padding-top: 0; }

/* ---- panels: the card grids ---- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card h3 {
  grid-column: 1; grid-row: 1; margin: 0; padding: 13px 16px 11px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 800; line-height: 1.3; letter-spacing: -0.005em;
}
.card .icon {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; padding: 0 16px 0 8px;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 15px; color: var(--trace-text);
}
.card p { grid-column: 1 / -1; grid-row: 2; margin: 0; padding: 14px 16px 18px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.card .go {
  grid-column: 1 / -1; grid-row: 3; padding: 0 16px 16px;
  font-family: var(--mono); font-size: 12.5px; color: var(--trace-text);
}
.card.link-card { text-decoration: none; }
.card.link-card:hover { border-color: color-mix(in oklab, var(--trace) 55%, var(--line)); box-shadow: var(--shadow), 0 0 0 3px var(--tint); transform: translateY(-2px); }
.card:hover h3 { box-shadow: inset 0 2px 0 var(--trace); }

/* ---- diagrams, on graticule ---- */
.diagram-frame {
  background-color: var(--panel);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; overflow-x: auto;
}
.diagram-frame object { display: block; width: 100%; min-width: 640px; aspect-ratio: 1100 / 600; border: none; }
.diagram-frame object[data*="several-copies"] { aspect-ratio: 1100 / 440; }
.diagram-caption { color: var(--ink-faint); font-family: var(--mono); font-size: 12.5px; margin: 14px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; font-size: 13.5px; color: var(--ink-soft); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; }
.legend .sw-edge { background: #E6690E; }
.legend .sw-consumer { background: #FFB157; }
.legend .sw-query { background: #3fb6ff; }

/* ---- two columns ---- */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.twocol > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: var(--shadow); }
.twocol h3 { font-size: 21px; font-weight: 800; line-height: 1.2; margin: 0 0 12px; }
.twocol p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
ul.checks { list-style: none; padding: 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
ul.checks li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px dashed var(--line); color: var(--ink-soft); font-size: 14.5px; }
ul.checks li:last-child { border-bottom: 0; padding-bottom: 0; }
ul.checks li::before { content: "✓"; position: absolute; left: 2px; color: var(--trace-text); font-weight: 800; }

/* ---- the stack table: a result table ---- */
table.stack {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; font-size: 15px; box-shadow: var(--shadow);
}
table.stack th {
  text-align: left; padding: 11px 18px; background: var(--panel-2); border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
}
table.stack td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
table.stack tr:last-child td { border-bottom: 0; }
table.stack tbody tr { transition: background .12s; }
table.stack tbody tr:hover { background: var(--tint); }
table.stack td:first-child { font-family: var(--mono); font-size: 13.5px; color: var(--trace-text); white-space: nowrap; }
table.stack td:nth-child(2) { color: var(--ink); font-weight: 700; white-space: nowrap; }

/* ---- the license band: an alert rule, firing ---- */
.license-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: linear-gradient(90deg, var(--tint), transparent 70%), var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--trace); border-radius: var(--radius);
  padding: 30px 32px;
}
.license-band h3 { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.license-band p { margin: 0; color: var(--ink-soft); font-size: 15.5px; max-width: 560px; }

/* ---- reading text ---- */
.prose { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.prose h2 { font-size: clamp(25px, 3vw, 33px); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 24px; }
.prose p { color: var(--ink-soft); font-size: 17px; line-height: 1.75; margin: 0 0 20px; }
.prose p strong, .prose li strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--ink); }
.prose a { color: var(--trace-text); }
.prose blockquote {
  margin: 36px 0; padding: 18px 22px;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--trace); border-radius: var(--radius);
  font-family: var(--mono); font-size: 17px; color: var(--ink);
}
.prose blockquote p { color: inherit; font-size: inherit; margin: 0; line-height: 1.5; }
.prose blockquote p::before { content: "› "; color: var(--trace-text); }
.stone-list { list-style: none; padding: 0; margin: 26px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stone-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  color: var(--ink-soft); font-size: 15.5px;
}
.stone-list li:last-child { border-bottom: 0; }
.stone-list .n {
  flex: none; font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--trace-text);
  border: 1px solid color-mix(in oklab, var(--trace) 45%, transparent); background: var(--tint);
  border-radius: 3px; padding: 1px 6px; margin-top: 2px;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 28px; }
.split .col { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.split .col.old { border-style: dashed; }
.split .col.new { border-color: color-mix(in oklab, var(--trace) 50%, var(--line)); box-shadow: 0 0 0 3px var(--tint); }
.split .tag { display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.split .old .tag { color: var(--ink-faint); }
.split .new .tag { color: var(--trace-text); }
.split h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.split p { font-size: 15px; line-height: 1.6; margin: 0; }
.split code { font-family: var(--mono); }

/* ---- privacy, 404 ---- */
.page-narrow { max-width: 780px; margin: 0 auto; padding: 72px 28px 96px; }
.page-narrow h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 10px; }
.page-narrow h2 { font-size: 20px; font-weight: 800; margin: 40px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.page-narrow p, .page-narrow li { color: var(--ink-soft); font-size: 16.5px; line-height: 1.7; }
.page-narrow .copy { font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); }
.page-narrow a { color: var(--trace-text); }
.page-narrow .asked {
  font-family: var(--mono); font-size: 13px; color: var(--ink-faint);
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--trace);
  border-radius: var(--radius); padding: 10px 14px; margin: 18px 0 28px; overflow-wrap: anywhere;
}
.page-narrow .asked::before { content: "404  GET "; color: var(--trace-text); white-space: pre; }

/* ==========================================================================
   5  FOOTER
   ========================================================================== */
.site-foot { margin-top: 40px; border-top: 1px solid var(--line); background: var(--chrome); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-top: 52px; padding-bottom: 44px; }
.foot-brand img.logo { height: 40px; width: auto; }
.foot-brand p { color: var(--ink-faint); font-size: 14px; max-width: 280px; margin: 14px 0 0; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-label { margin: 0 0 4px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.foot-col a { color: var(--ink-soft); font-size: 14.5px; text-decoration: none; }
.foot-col a:hover { color: var(--ink); }
.foot-col a:hover b { text-decoration: underline; }
.foot-col .out { color: var(--ink-faint); font-size: 12px; }
.foot-col b { font-weight: 700; color: var(--ink); }
.foot-col b.inbuxa { color: var(--trace-text); }
.foot-col small { color: var(--ink-faint); font-size: 12.5px; }
.foot-bar { border-top: 1px solid var(--line); }
.foot-bar-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.foot-copy, .foot-end { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.foot-copy a { color: var(--ink-soft); text-underline-offset: 2px; }
.foot-copy a:hover { color: var(--ink); }
.foot-end { text-align: right; }
/* The HotDog CMS credit: the one lit thing on the bar. */
.built-with {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); text-decoration: none;
  border: 1px solid color-mix(in oklab, var(--trace) 50%, transparent); background: var(--tint);
  border-radius: 999px; padding: 4px 12px;
  transition: box-shadow .15s, border-color .15s;
}
.built-with:hover { border-color: var(--trace); box-shadow: 0 0 16px -4px var(--glow); }
.bw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--trace); box-shadow: 0 0 6px var(--glow); animation: bw 2.4s ease-in-out infinite; }
@keyframes bw { 50% { opacity: 0.35; } }

/* ==========================================================================
   6  CONSENT BANNER, JUMP PALETTE
   ========================================================================== */
/* Fixed over the page, never a wall: a visitor who never answers can still
   read every word. Both buttons are identical on purpose: dressing Accept up
   as the primary action is the dark pattern regulators name first. */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 1080px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line-strong); border-top: 2px solid var(--trace);
  border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 18px 0;
}
.consent[hidden] { display: none; }
.consent-inner { padding: 0 22px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent-text { flex: 1 1 460px; min-width: 0; }
.consent-title { font-size: 16px; font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.consent p { margin: 0 0 6px; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.consent p:last-child { margin-bottom: 0; }
.consent-current { color: var(--ink-faint); font-style: italic; }
.consent-more a { color: var(--trace-text); text-underline-offset: 2px; }
.consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent-actions .btn { min-width: 128px; justify-content: center; border-color: var(--line-strong); }

.palette {
  width: min(40rem, calc(100vw - 2rem)); max-height: min(30rem, 72vh);
  margin: 12vh auto auto; padding: 0; overflow: hidden;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-top: 2px solid var(--trace); border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.palette::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.palette-box { display: flex; flex-direction: column; max-height: inherit; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--ground); }
.palette-input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: var(--mono); font-size: 15px; color: var(--ink);
}
.palette-input input::placeholder { color: var(--ink-faint); }
.palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; font-family: var(--mono); font-size: 13.5px; }
.palette-list li { display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; border-radius: 4px; cursor: pointer; }
.palette-list li[aria-selected="true"] { background: var(--tint); box-shadow: inset 2px 0 0 var(--trace); }
.pl-lvl { flex: none; width: 3.2em; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.pl-lvl.sec { color: var(--trace-text); }
.pl-lvl.page { color: var(--str); }
.pl-lvl.res { color: var(--sig); }
.pl-lvl.fam { color: var(--ink-soft); }
.pl-name { color: var(--ink); font-weight: 600; }
.pl-note { margin-left: auto; color: var(--ink-faint); font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-empty { color: var(--ink-faint); justify-content: center; cursor: default; padding: 18px; }
.palette-foot { display: flex; gap: 18px; margin: 0; padding: 9px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

/* ==========================================================================
   7  NARROW SCREENS, REDUCED MOTION
   ========================================================================== */
@media (max-width: 1180px) {
  .btn-sponsor, .btn-swag { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-shot { max-width: 820px; }
}
@media (max-width: 960px) {
  .qbar-site { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twocol, .split { grid-template-columns: 1fr; }
  .shots { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --top-h: 54px; --scope-h: 30px; }
  .wrap, .prose { padding: 0 16px; }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand img.logo { height: 28px; }
  .btn-source { display: none; }
  .qbar { height: 36px; font-size: 12.5px; padding: 0 8px 0 10px; }
  .qbar kbd { display: none; }
  .scope { padding: 0 12px; }
  /* On a phone the names under the bars won't fit; the query field names the
     section on screen and opens the full list. Without scripting there are no
     bars, and the names scroll sideways as tabs. */
  .scope-labels { overflow-x: auto; scrollbar-width: none; }
  .scope-label { flex: 0 0 auto; padding: 0 12px; }
  html.js .scope-labels { display: none; }
  html.js .scope-hist { height: 29px; }
  section { padding: 60px 0; }
  .hero-split { padding: 44px 0 64px; }
  .hero-cat { height: 60px; top: -41px; }
  .page-hero { padding-top: 64px; }
  .trace { margin-top: 28px; height: 44px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .license-band { padding: 24px 20px; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; }
  table.stack thead { display: none; }
  table.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { padding: 0; border: 0; white-space: normal !important; }
  table.stack td:first-child { font-size: 12px; margin-bottom: 2px; }
  table.stack td:nth-child(2) { margin-bottom: 6px; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; padding-top: 40px; }
  .foot-bar-in { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; }
  .foot-end { text-align: center; }
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1 1 0; min-width: 0; }
  .palette { margin-top: 8vh; }
  .palette-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .qbar-caret, .bw-dot { animation: none; }
  html.js .trace-line { transition: none; stroke-dashoffset: 0; }
  html.js .trace-ping { transition: none; opacity: 1; animation: none; }
  .card.link-card:hover { transform: none; }
}
