/* ============================================================
   SpritzWine — landing page
   Sibling design system to Beisl: same tokens, same rhythm,
   same hairlines — its own drink.
   Shared family surfaces:
     Kaffeehauscreme #F4EDE4 · Wirtshausholz #2B2320 / #17110F
   SpritzWine signature: the G'spritzter gold.
     Gold          #E0A030  — chrome on dark (hero, header, footer)
     Gold hell     #F0B840  — hover / focus lift on dark
     Gold tief     #8A5A10  — chrome on light: the same gold, one
                              shade down the cellar, so link and
                              kicker text clear 4.5:1 on cream
   Beisl's rule holds here too: the signature colour is chrome. The
   figure's ink (the pour bands) is its own fixed set, so it reads
   identically in both themes.
   ============================================================ */

:root {
  --cream: #f4ede4;
  --wood-deep: #17110f;
  --gold: #e0a030;
  --gold-light: #f0b840;
  --gold-deep: #8a5a10;

  /* the pour — figure ink, fixed in both themes (contrast is checked
     against the band fill, not against the page) */
  --pour-wine: #8a5a10;
  --pour-wine-up: #55406f;          /* upstream WineHQ base — a different vintage, on purpose;
                                       deep enough that the cream labels clear 7:1 on it */
  --pour-soda-1: #d8b45e;
  --pour-soda-2: #e6ca8b;
  --pour-soda-3: #f0dcb4;
  --pour-soda-4: #ddbd74;
  --pour-soda-5: #ebd4a0;
  --pour-soda-6: #d5b271;

  /* light theme (default) */
  --ground: #f4ede4;
  --panel: #fbf7f1;
  --panel-2: #efe6d9;
  --ink: #2b2320;
  --muted: #6b5f58;
  --hair: #e0d3c3;
  --accent: var(--gold-deep);
  --on-accent: #f4ede4;
  --code-bg: #2b2320;
  --code-ink: #f4ede4;
  --shadow: 0 14px 38px rgba(43, 35, 32, 0.14);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, ui-serif, serif;
  --sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans",
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1e1815;
    --panel: #29211d;
    --panel-2: #322822;
    --ink: #f4ede4;
    --muted: #b6a99f;
    --hair: #3a2f2a;
    --accent: var(--gold);
    --on-accent: #17110f;
    --code-bg: #17110f;
    --code-ink: #f4ede4;
    --shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
  }
}
/* explicit override from the theme toggle — must beat the media query both ways */
:root[data-theme="light"] {
  --ground: #f4ede4; --panel: #fbf7f1; --panel-2: #efe6d9;
  --ink: #2b2320; --muted: #6b5f58; --hair: #e0d3c3;
  --accent: var(--gold-deep); --on-accent: #f4ede4;
  --code-bg: #2b2320; --code-ink: #f4ede4;
  --shadow: 0 14px 38px rgba(43, 35, 32, 0.14);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ground: #1e1815; --panel: #29211d; --panel-2: #322822;
  --ink: #f4ede4; --muted: #b6a99f; --hair: #3a2f2a;
  --accent: var(--gold); --on-accent: #17110f;
  --code-bg: #17110f; --code-ink: #f4ede4;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 1024px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 44px); }

h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.14; margin: 0 0 14px; }
h3 { font-family: var(--sans); font-size: 16px; font-weight: 650; margin: 0 0 6px; letter-spacing: -0.01em; }
p { max-width: 64ch; }
section p + p { margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

code {
  font-family: var(--mono); font-size: 13px;
  background: var(--panel-2);
  border-radius: 5px; padding: 1.5px 6px;
  white-space: nowrap;
}
/* long shell fragments must be allowed to wrap, or they blow out 360px */
code.long { white-space: pre-wrap; overflow-wrap: anywhere; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.hero :focus-visible, .site-header :focus-visible, .codeblock :focus-visible {
  outline-color: var(--gold-light);
}

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}

section { padding: clamp(56px, 9vw, 104px) 0; }
section + section { border-top: 1px solid var(--hair); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 0 0 8px 0;
  font-family: var(--sans); font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- wordmark: the i-dots are the bubble ticks ---------- */

.wordmark {
  font-family: var(--sans); font-weight: 650; letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex; align-items: baseline; white-space: nowrap;
}
.wordmark .i { position: relative; }
.wordmark .tick {
  position: absolute; left: 50%; top: -0.34em;
  width: 0.2em; height: 0.2em;
  background: var(--wm-tick, var(--accent));
  transform: translateX(-50%) rotate(45deg);
  border-radius: 12%;
}

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

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--wood-deep) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 237, 228, 0.1);
  color: var(--cream);
}
.site-header .bar {
  display: flex; align-items: center; gap: 12px;
  padding-top: 11px; padding-bottom: 11px;
}
.site-header .brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--cream); text-decoration: none;
}
.site-header .brand img { width: 26px; height: auto; display: block; }
.site-header .wordmark { font-size: 21px; --wm-tick: var(--gold); }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: clamp(10px, 2.5vw, 26px); }
.site-header nav a {
  color: rgba(244, 237, 228, 0.82); text-decoration: none;
  font-size: 14px; font-weight: 550; white-space: nowrap;
}
.site-header nav a:hover { color: var(--cream); text-decoration: underline; text-underline-offset: 4px; }
.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(244, 237, 228, 0.3);
  color: rgba(244, 237, 228, 0.85);
  border-radius: 999px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: rgba(244, 237, 228, 0.6); color: var(--cream); }
/* the wordmark is long — the bar sheds links before it sheds the brand */
@media (max-width: 900px) { .site-header nav a.hide-sm { display: none; } }
@media (max-width: 520px) {
  .site-header nav a.hide-xs { display: none; }
  .site-header .wordmark { font-size: 18px; }
  .site-header .brand img { width: 22px; }
  .site-header nav { gap: 10px; }
  .theme-toggle { padding: 5px 10px; font-size: 12px; }
}

/* ---------- hero: always the dim room, whatever the theme ----------
   The one loud section on the page. Carbonation drifts up behind it;
   everything after this is quiet. */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 480px at 18% -10%, rgba(224, 160, 48, 0.12), transparent 62%),
    linear-gradient(178deg, #241c18 0%, var(--wood-deep) 74%);
  color: var(--cream);
  padding: clamp(72px, 11vw, 140px) 0 clamp(80px, 11vw, 148px);
  border-bottom: 3px solid var(--gold);
}
.hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-lockup {
  display: grid;
  grid-template-columns: clamp(100px, 14vw, 160px) 1fr;
  gap: clamp(24px, 4.5vw, 52px);
  align-items: center;
}
.hero-lockup .glass {
  width: 100%; height: auto;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.5));
}
.hero-body { max-width: 64ch; }
.hero-headline {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  color: var(--cream);
  margin: 0;
}
.hero .lede {
  font-size: clamp(16px, 2vw, 18.5px);
  color: rgba(244, 237, 228, 0.85);
  max-width: 56ch;
  margin: 18px 0 0;
}
.hero .lede em { font-style: italic; color: var(--gold-light); }
.hero .lede b { color: var(--cream); font-weight: 650; }
.hero .hero-link { color: var(--gold-light); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }
.hero-cmd {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14px;
  color: rgba(244, 237, 228, 0.9);
  background: rgba(244, 237, 228, 0.07);
  border: 1px solid rgba(244, 237, 228, 0.16);
  border-radius: 9px;
  padding: 10px 14px;
  white-space: normal;
}
.hero-cmd .prompt { color: var(--gold-light); user-select: none; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 650; font-size: 15px;
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--wood-deep); }
.btn-primary:hover { background: var(--gold-light); }
.btn-ghost { border-color: rgba(244, 237, 228, 0.35); color: var(--cream); }
.btn-ghost:hover { border-color: rgba(244, 237, 228, 0.7); }

@media (max-width: 640px) {
  .hero-lockup { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero-lockup .glass { width: 100px; }
  .hero-body { max-width: 100%; }
  .hero .lede { margin-inline: auto; }
  .hero-cta { justify-content: center; }
}

/* ---------- cards ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 16px;
  padding: clamp(22px, 3.5vw, 36px);
}

/* ---------- the approach: three house rules ---------- */

.claims {
  margin-top: 34px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.claim {
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--panel);
  font-size: 14px; color: var(--muted);
}
.claim b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 650; }
@media (max-width: 780px) { .claims { grid-template-columns: 1fr; } }

/* ---------- two-column feature layout ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------- the architecture figure: how a consumer is poured ----------
   Drawn, not photographed: inline SVG, themed through custom properties.
   The band fills are fixed in both themes so their label contrast is a
   property of the figure, not of the page. */

.arch-fig { margin: 0; }
/* The two-glass figure needs the full column: it is a diagram, not a decoration. */
.arch-fig-wide { margin-top: 34px; }
.arch-fig-wide figcaption { max-width: 78ch; }
.arch-fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.arch-fig .kick {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  fill: var(--ink); opacity: 0.8; /* muted was too faint at this size */
}
.arch-fig .label {
  font-family: var(--sans); font-size: 14px; font-weight: 650; fill: var(--ink);
}
.arch-fig .label.held { fill: var(--muted); }
.arch-fig .label.out { fill: var(--accent); }
.arch-fig .sub { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.arch-fig .chip { fill: var(--panel-2); stroke: var(--accent); stroke-width: 1.2; }
.arch-fig .chip-held { fill: none; stroke: var(--hair); stroke-width: 1.2; stroke-dasharray: 4 3; }
.arch-fig .arrow { stroke: var(--muted); stroke-width: 1.4; fill: none; }
.arch-fig .arrowhead { fill: var(--muted); }
.arch-fig .wine-base { fill: var(--pour-wine); }
.arch-fig .wine-base-up { fill: var(--pour-wine-up); }
.arch-fig .soda-1 { fill: var(--pour-soda-1); }
.arch-fig .soda-2 { fill: var(--pour-soda-2); }
.arch-fig .soda-3 { fill: var(--pour-soda-3); }
.arch-fig .soda-4 { fill: var(--pour-soda-4); }
.arch-fig .soda-5 { fill: var(--pour-soda-5); }
.arch-fig .soda-6 { fill: var(--pour-soda-6); }
/* Kept for any future not-yet-poured glass: drawn, but dashed. */
.arch-fig .glass-planned { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0.42; stroke-dasharray: 6 4; }
.arch-fig .band-planned { opacity: 0.72; }   /* present, but visibly not poured yet */
.arch-fig .label.goal { fill: var(--ink); }
.arch-fig .on-soda { fill: #2b2320; }        /* >=10:1 on every soda band */
.arch-fig .on-wine { fill: #f4ede4; }        /* 5.1:1 on the wine band */
.arch-fig .on-wine-dim { fill: rgba(244, 237, 228, 0.86); }
.arch-fig .glass-body { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0.5; }
.arch-fig .fizz { fill: #fbf7f1; opacity: 0.55; }
.arch-fig figcaption { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---------- tier table (what ships in Rust) ---------- */

.tier-card { margin-top: 30px; box-shadow: var(--shadow); }
.tier-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tier-table caption {
  text-align: left;
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.13em;
  font-size: 11px; font-weight: 700; color: var(--muted);
  padding-bottom: 10px;
}
.tier-table th, .tier-table td {
  text-align: left; padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
  font-weight: 400;
}
.tier-table thead th {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
  border-bottom-color: var(--muted);
}
.tier-table tbody tr:last-child th, .tier-table tbody tr:last-child td { border-bottom: 0; }
.tier-table code { font-size: 13px; }
.cov-hint { color: var(--muted); font-size: 12.5px; margin: 16px 0 0; }

.aside-note {
  margin-top: 24px;
  font-size: 14.5px;
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  max-width: 60ch;
}

/* ---------- architecture card grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.card-grid .card h3 { font-size: 17px; margin-bottom: 8px; }
.card-grid .card p { font-size: 14.5px; color: var(--muted); margin: 0; }
.card-grid .card code { font-size: 12.5px; }
@media (max-width: 780px) { .card-grid { grid-template-columns: 1fr; } }

/* ---------- quote interlude ---------- */

.interlude { text-align: center; background: var(--panel); }
.interlude .kicker { color: var(--muted); }
.interlude .quote {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.3;
  max-width: 26ch;
  margin: 0 auto;
  text-wrap: balance;
  border: none;
  padding: 0;
}
.interlude .attrib {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 58ch;
  margin: 18px auto 0;
}

/* ---------- get it: entry list + code block ---------- */

.install-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
@media (max-width: 820px) { .install-grid { grid-template-columns: 1fr; } }

.entry-list { margin: 18px 0 0; padding: 0; list-style: none; font-size: 14.5px; }
.entry-list li {
  padding: 9px 0; border-bottom: 1px solid var(--hair);
  display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline;
}
.entry-list li:last-child { border-bottom: 0; }
.entry-list .ctx { font-weight: 650; font-family: var(--sans); min-width: 118px; }
.entry-list span:last-child { flex: 1; min-width: 12rem; }

.status-note {
  margin-top: 20px;
  font-size: 13.5px; color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  max-width: 60ch;
}

.codeblock {
  position: relative;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 14px;
  border: 1px solid rgba(244, 237, 228, 0.1);
  padding: 40px 24px 22px;
  overflow-x: auto;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 237, 228, 0.3) transparent;
}
.codeblock pre { margin: 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; }
.codeblock code {
  background: none; padding: 0; border-radius: 0;
  font-size: inherit; white-space: pre;
}
.codeblock .c { color: #b6a99f; }              /* comments: warm gray, not brand */
.codeblock .cmd { color: var(--cream); font-weight: 600; }
.codeblock .hl { color: var(--gold-light); }   /* the name in the clone URL */
.copy-btn {
  position: absolute; top: 12px; right: 12px;
  appearance: none;
  font-family: var(--sans); font-size: 12px; font-weight: 650;
  background: rgba(244, 237, 228, 0.1);
  color: var(--cream);
  border: 1px solid rgba(244, 237, 228, 0.22);
  border-radius: 7px;
  padding: 5px 11px;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(244, 237, 228, 0.18); }

/* ---------- release notes (releasenotes.md, rendered by site.js) ---------- */

.release-notes h3 { margin: 4px 0 6px; font-size: 1.25em; }
.release-notes h3 + p { color: var(--muted); }
.release-notes h4 { margin: 20px 0 8px; letter-spacing: 0.02em; }
.release-notes ul { margin: 8px 0 16px; padding-left: 22px; }
.release-notes li { margin: 7px 0; }
.release-notes p { max-width: 68ch; }
.release-notes hr { border: none; border-top: 1px solid var(--hair); margin: 28px 0; }
.release-notes code { overflow-wrap: anywhere; white-space: normal; }
.release-notes { position: relative; } /* offsetParent for the two-release height cap */
.release-notes.scrolls { overflow-y: auto; padding-right: 22px; } /* keep text off the scrollbar */

/* ---------- family ---------- */

.family { text-align: center; }
.family .sibs {
  display: flex; justify-content: center; align-items: baseline;
  gap: clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
  font-family: var(--serif); font-size: clamp(18px, 2.6vw, 24px); font-weight: 600;
  margin-top: 18px;
}
.family .sibs .dotsep { color: var(--hair); font-size: 0.8em; }
.family .sibs .self { color: var(--accent); font-size: 1.15em; }
.family .sibs .other { color: var(--muted); }
/* the sibling's own lowercase wordmark, worn quietly */
.family .sibs .sib-beisl {
  --wm-tick: var(--muted);
  font-family: var(--serif); font-weight: 600; letter-spacing: normal;
}
/* a sibling that is a link: the name keeps its ink — only the underline
   wears the gold. The text is a wordmark, not chrome. */
.family .sibs a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}
.family .sibs a:hover { text-decoration-thickness: 2.5px; }
.family p { margin-inline: auto; margin-top: 18px; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--wood-deep);
  color: rgba(244, 237, 228, 0.75);
  padding: 56px 0 44px;
  font-size: 14px;
  border-top: 3px solid var(--gold);
}
.site-footer .cols {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 32px; align-items: center;
}
.site-footer .glass-icon { width: 44px; height: auto; display: block; }
.site-footer .wordmark { font-size: 18px; color: var(--cream); --wm-tick: var(--gold); }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer .fine { margin-top: 6px; max-width: 62ch; }
.site-footer .easter {
  font-family: var(--serif); font-style: italic;
  color: rgba(244, 237, 228, 0.45);
  text-align: right;
}
@media (max-width: 680px) {
  .site-footer .cols { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .site-footer .easter { text-align: center; }
}

/* forced colors: keep the drawn figure's edges visible */
@media (forced-colors: active) {
  .card, .claim { border: 1px solid CanvasText; }
  .arch-fig .chip, .arch-fig .wine-base, .arch-fig .wine-base-up,
  .arch-fig .soda-1, .arch-fig .soda-2, .arch-fig .soda-3,
  .arch-fig .soda-4, .arch-fig .soda-5, .arch-fig .soda-6 {
    stroke: CanvasText; stroke-width: 1;
  }
}


/* ============================================================
   the-pour.html — the deep-dive page
   ============================================================ */

/* ============================================================
   The pour — subpage-only styles.
   Everything here is built from the tokens in assets/style.css
   (--ink, --muted, --hair, --panel, --panel-2, --accent,
    --pour-wine, --pour-soda-1..3, --cream, --wood-deep …).
   No new colours, no new type scale — just the shapes the
   front page never needed.
   ============================================================ */

/* ---------- back-to-the-front-page affordance ---------- */

.backlink {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 650;
  color: rgba(244, 237, 228, 0.8);
  text-decoration: none;
  border: 1px solid rgba(244, 237, 228, 0.28);
  border-radius: 999px;
  padding: 5px 14px 5px 11px;
  margin-bottom: 26px;
}
.backlink:hover { color: var(--cream); border-color: rgba(244, 237, 228, 0.65); }
.backlink .arr { font-size: 15px; line-height: 1; }

.footer-back {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin-top: 30px;
}

/* the subpage hero carries no canvas — it is the quieter room */
.hero.page-head { padding: clamp(52px, 8vw, 96px) 0 clamp(52px, 8vw, 92px); }
/* the hero is the dim room in BOTH themes, so inline code in it cannot use the
   page's panel tokens — in light theme that is cream ink on a cream chip. */
.hero code {
  background: rgba(244, 237, 228, 0.12);
  color: var(--cream);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.hero.page-head .hero-body { max-width: 68ch; }
.hero.page-head .lede { max-width: 62ch; }

/* ---------- a small "on this page" rail ---------- */

.toc { margin: 30px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px 10px; }
.toc a {
  display: inline-block;
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: rgba(244, 237, 228, 0.82);
  border: 1px solid rgba(244, 237, 228, 0.18);
  background: rgba(244, 237, 228, 0.06);
  border-radius: 8px;
  padding: 6px 11px;
}
.toc a:hover { color: var(--cream); border-color: rgba(244, 237, 228, 0.5); }

/* ---------- the replay figure ----------
   Complex enough that shrinking it to 360px would make it a
   decorative smudge. So it scrolls sideways in its own box, and
   every fact in it is also written out in the cards below. */

.fig-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
  margin: 0;
}
.pour-fig { margin: 0; }
.pour-fig svg { width: 100%; min-width: 700px; height: auto; display: block; }
.pour-fig figcaption {
  font-size: 13px; color: var(--muted); margin-top: 14px; max-width: 68ch;
}
.pour-fig .kick {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  fill: var(--ink); opacity: 0.8; /* muted was too faint at this size */
}
.pour-fig .kick.hot { fill: var(--accent); }
.pour-fig .label { font-family: var(--sans); font-size: 13px; font-weight: 650; fill: var(--ink); }
.pour-fig .label.held { fill: var(--muted); }
.pour-fig .label.out { fill: var(--accent); font-size: 14px; }
.pour-fig .sub { font-family: var(--sans); font-size: 11.5px; fill: var(--muted); }
.pour-fig .mono { font-family: var(--mono); font-size: 12px; fill: var(--ink); }
.pour-fig .mono.sm { font-size: 10.5px; fill: var(--muted); }

.pour-fig .chip { fill: var(--panel-2); stroke: var(--accent); stroke-width: 1.2; }
.pour-fig .chip-held { fill: none; stroke: var(--hair); stroke-width: 1.2; stroke-dasharray: 4 3; }
.pour-fig .box { fill: var(--panel); stroke: var(--accent); stroke-width: 1.4; }
.pour-fig .spine { stroke: var(--hair); stroke-width: 1.2; fill: none; }
.pour-fig .arrow { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.pour-fig .arrowhead { fill: var(--muted); }

/* poured: the filled glasses. Fixed inks, as on the front page. */
.pour-fig .wine-base { fill: var(--pour-wine); }
.pour-fig .wine-base-up { fill: var(--pour-wine-up); }
.pour-fig .soda-1 { fill: var(--pour-soda-1); }
.pour-fig .soda-2 { fill: var(--pour-soda-2); }
.pour-fig .soda-3 { fill: var(--pour-soda-3); }
.pour-fig .soda-4 { fill: var(--pour-soda-4); }
.pour-fig .soda-5 { fill: var(--pour-soda-5); }
.pour-fig .soda-6 { fill: var(--pour-soda-6); }
.pour-fig .on-soda { fill: #2b2320; }   /* >= 10:1 on every soda band */
.pour-fig .on-wine { fill: #f4ede4; }   /* 5.1:1 on the wine band */
.pour-fig .on-wine-dim { fill: rgba(244, 237, 228, 0.86); }
.pour-fig .glass-body { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0.5; }
.pour-fig .fizz { fill: #fbf7f1; opacity: 0.55; }

/* not poured yet: the empty glass (spritzwine). Drawn, not filled. */
.pour-fig .band-empty { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 5 4; }
.pour-fig .base-empty { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 4; }
.pour-fig .glass-empty { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0.28; stroke-dasharray: 6 5; }

/* ---------- the two glasses, as prose ---------- */

.glasses { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 34px; }
@media (max-width: 820px) { .glasses { grid-template-columns: 1fr; } }

.glass-card { position: relative; display: flex; flex-direction: column; }
.glass-card h3 {
  font-family: var(--mono); font-size: 17px; font-weight: 650;
  margin: 0 0 2px; color: var(--ink);
}
.glass-card .role {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 10.5px; font-weight: 700; color: var(--accent);
  margin: 0 0 14px;
}
.glass-card p { font-size: 14.5px; margin: 0 0 12px; max-width: none; }
.glass-card .recipe {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--panel-2); color: var(--ink);
  border-radius: 8px; padding: 10px 12px;
  margin: 4px 0 14px;
  overflow-wrap: anywhere;
}
.glass-card .recipe .base { color: var(--accent); font-weight: 700; }
.glass-card .foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hair);
  font-size: 13px; color: var(--muted);
}
.glass-card.is-endeavour { border-color: var(--accent); box-shadow: var(--shadow); }

.pill {
  display: inline-block;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 10px;
  border: 1px solid var(--hair); color: var(--muted);
  white-space: nowrap;
}
.pill.ships { border-color: var(--accent); color: var(--accent); }

/* ---------- the honest ledger ---------- */

.ledger { margin: 30px 0 0; padding: 0; }
.ledger div {
  display: grid; grid-template-columns: 150px 1fr;
  gap: 4px 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.ledger div:last-child { border-bottom: 0; }
.ledger dt { font-family: var(--sans); font-weight: 700; font-size: 13px; }
.ledger dd { margin: 0; font-size: 14.5px; color: var(--muted); }
.ledger dd b { color: var(--ink); font-weight: 650; }
@media (max-width: 640px) {
  .ledger div { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- misc ---------- */

/* the row-header cells hold branch and file names: they must never break
   mid-token ("soda-bui / ld"). The prose column may wrap anywhere it likes,
   and the card scrolls sideways if the sum still does not fit 360px. */
.tier-card { overflow-x: auto; }
.tier-table th[scope="row"] code, .tier-table th[scope="row"] { white-space: nowrap; }
.tier-table tbody td:first-of-type code { white-space: nowrap; }
.tier-table td code { overflow-wrap: anywhere; white-space: normal; }
.tier-table caption code { white-space: nowrap; }
/* below ~640px the prose column would be squeezed into a one-word ribbon;
   give the table a floor and let the card scroll instead. */
@media (max-width: 700px) { .tier-table { min-width: 520px; } }

/* the figure is wider than a phone: say so, once, and only there */
.scroll-hint { display: none; font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
@media (max-width: 760px) { .scroll-hint { display: block; } }
.wide-note { max-width: 68ch; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
@media (max-width: 780px) { .stat-row { grid-template-columns: 1fr; } }
.stat { border: 1px solid var(--hair); border-radius: 14px; background: var(--panel); padding: 18px 20px; }
.stat .n {
  display: block;
  font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1;
  color: var(--accent);
}
.stat .t { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }

@media (forced-colors: active) {
  .glass-card, .stat, .toc a, .backlink { border: 1px solid CanvasText; }
  .pour-fig .chip, .pour-fig .box, .pour-fig .wine-base,
  .pour-fig .soda-1, .pour-fig .soda-2, .pour-fig .soda-3,
  .pour-fig .soda-4, .pour-fig .soda-5, .pour-fig .soda-6 {
    stroke: CanvasText; stroke-width: 1;
  }
}
