/* css/ledger.css — the one stylesheet. Tokens per the Ledger spec §2.
   Rules: 2px corners, hairlines, no gradients, no shadows, no italics in the UI,
   no uppercase tracking. Every migrated page loads this and nothing else. */
:root {
  --paper: #F4F1EA; --ink: #16150F; --grey: #6F6B62;
  --hairline: #D8D3C8; --hairline-strong: #B9B3A6; --track: #E4DFD3;
  --live: #B83E17; --up: #3E7A3A;
  --scrim: rgba(22, 21, 15, 0.55); --scrim-heavy: rgba(22, 21, 15, 0.92);
  --font-ui: 'Familjen Grotesk', system-ui, sans-serif;
  --font-prose: 'Newsreader', Georgia, serif;
  --gutter: clamp(20px, 5vw, 64px); --max-w: 1280px;
  color-scheme: light dark;
  /* Legacy names that script-injected markup (bottle modal, announcements, the
     Room link) still reads. Aliases, so nothing goes transparent on a Ledger page. */
  --amber: var(--ink); --surface: var(--paper); --fg-muted: var(--grey); --fg: var(--ink); --bg: var(--paper); --border: var(--hairline); --font-b: var(--font-ui);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141311; --ink: #ECE8DF; --grey: #A09B90;
    --hairline: #2A2823; --hairline-strong: #4A463E; --track: #2A2823;
    --live: #F0602E; --up: #7FB27A;
    --scrim: rgba(0, 0, 0, 0.72); --scrim-heavy: rgba(0, 0, 0, 0.94);
  }
}
/* A page that is dark in both schemes (world.html, over the globe) pins it with <html data-theme="dark">. Same values. */
:root[data-theme="dark"] {
  --paper: #141311; --ink: #ECE8DF; --grey: #A09B90;
  --hairline: #2A2823; --hairline-strong: #4A463E; --track: #2A2823;
  --live: #F0602E; --up: #7FB27A;
  --scrim: rgba(0, 0, 0, 0.72); --scrim-heavy: rgba(0, 0, 0, 0.94);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-ui); background: var(--paper); color: var(--ink); line-height: 1.45; font-size: 15px; font-variant-numeric: tabular-nums; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 700; line-height: 1.02; }
h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.045em; }
h2 { font-size: 30px; letter-spacing: -0.03em; }
h3 { font-size: 22px; letter-spacing: -0.02em; }
.prose { font-family: var(--font-prose); font-size: 18px; line-height: 1.5; }
.muted { color: var(--grey); }
.meta { font-size: 13px; color: var(--grey); }
.live { color: var(--live); }
.up { color: var(--up); }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* app-banner.js (Android) fixes a 56px banner at the top and pushes the sticky nav
   down by the same amount, but never offsets the page — the banner covered the
   first 56px of every page. This is the missing half. */
body.has-app-banner { padding-top: 56px; }

/* ── Nav: same hooks as before (auth.js injects into .nav-links / .nav-actions; nav.js toggles .open) ── */
nav.l-nav { height: 64px; border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 100; background: var(--paper); }
nav.l-nav .nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 0.3em; min-height: 44px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
/* The glass mark (scripts/logo-mark.mjs): ink via currentColor, sized to the wordmark. */
.logo-glass { width: 1.45em; height: 1.45em; flex: none; margin-top: -0.2em; }
.nav-links { display: flex; gap: 22px; list-style: none; flex: 1; font-size: 15px; font-weight: 500; }
.nav-links > li { display: flex; align-items: center; }
.nav-links a { text-decoration: none; color: var(--grey); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links > li > a.active, .nav-links a.nav-group-btn.active { border-bottom-color: var(--ink); }
/* L2b-1 — the EN · SV switch, last item of .nav-links. */
.nav-lang { display: flex; align-items: center; gap: 4px; color: var(--grey); font-size: 13px; }
.nav-lang a { color: var(--grey); }
.nav-lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.nav-group { position: relative; }
.nav-group-btn { display: inline-flex; align-items: center; gap: 6px; }
.nav-caret { font-size: 0.7em; }
.nav-panel { display: none; position: absolute; top: calc(100% + 10px); left: -12px; min-width: 200px; background: var(--paper); border: 1px solid var(--hairline-strong); padding: 6px 0; z-index: 120; }
.nav-group.open .nav-panel { display: block; }
.nav-panel a { display: block; padding: 9px 14px; border: 0; }
.nav-panel a:hover { background: var(--track); }
.nav-actions { display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 500; }
.nav-actions a, .nav-actions button { text-decoration: none; white-space: nowrap; }
/* 44px tap height for the unfilled actions (Sign in, Sign out); the filled .btn keeps its drawn size */
.nav-actions a:not(.btn):not(.btn-amber), .nav-actions .btn-ghost { display: inline-flex; align-items: center; min-height: 44px; }
.nav-actions > span { font-size: 13px; color: var(--grey); }
.nav-actions img { width: 32px; height: 32px; border-radius: 2px; object-fit: cover; }
.btn-ghost { display: inline-flex; align-items: center; height: 38px; padding: 0 12px; font-weight: 500; font-size: 15px; background: none; color: var(--ink); text-decoration: none; }
.btn-amber { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 2px; }
.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; padding: 8px 11px; min-height: 44px; margin: 0 -3px 0 auto; }
.nav-hamburger span { width: 22px; height: 2px; background: var(--ink); }
@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--hairline); padding: 8px var(--gutter) 16px; z-index: 99; }
  .nav-links.open { display: flex; max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-links > li { display: block; }
  .nav-links a { display: block; padding: 12px 0; font-size: 16px; border-bottom: 0; }
  .nav-links > li.nav-lang { display: flex; gap: 8px; padding-top: 8px; }
  .nav-links .nav-lang a { display: inline-block; }
  .nav-group { position: static; }
  .nav-group-btn { color: var(--grey); pointer-events: none; font-size: 13px; padding-top: 12px; }
  .nav-caret { display: none; }
  .nav-panel { display: block; position: static; border: 0; padding: 0 0 4px 16px; min-width: 0; background: transparent; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn-amber { display: none; }
  .nav-actions > span { display: none; }
  .nav-actions .btn-ghost { padding: 7px 12px; height: auto; }
  /* the static signed-out pair (before auth.js replaces it) only fits on a wide nav */
  .nav-actions > .btn.small { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Buttons, tags, inputs ── */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; text-decoration: none; border-radius: 2px; }
.btn.small { height: 38px; padding: 0 16px; font-size: 15px; }
.btn.outline { background: none; color: var(--ink); border: 1px solid var(--ink); }
.link { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 8px; border: 1px solid var(--hairline-strong); border-radius: 2px; }
.tag.live { color: var(--paper); background: var(--live); border-color: var(--live); }
.field { display: flex; align-items: center; gap: 10px; height: 44px; border-bottom: 1px solid var(--hairline-strong); }
.field input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; min-width: 0; }
.field input::placeholder { color: var(--grey); }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.filters .set { display: flex; gap: 22px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.filters .set button { padding: 4px 0 8px; color: var(--grey); border-bottom: 2px solid transparent; }
.filters .set button.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Rows and the table ── */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 82px; border-bottom: 1px solid var(--hairline); text-decoration: none; }
.row .title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.row .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bar { height: 3px; background: var(--track); width: 48px; }
.bar > span { display: block; height: 100%; background: var(--ink); }
.bar.liquid > span { background: var(--liquid, var(--ink)); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--grey); height: 36px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--hairline); padding-right: 12px; white-space: nowrap; }
.table td { height: 60px; border-bottom: 1px solid var(--hairline); vertical-align: middle; padding-right: 12px; }
.table th.num, .table td.num { text-align: right; }
.table td.name { font-weight: 600; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: var(--track); }
.glyph { display: block; }

/* ── Headline numbers ── */
.numbers { display: flex; align-items: baseline; gap: 14px; }
.numbers .big { font-size: 64px; font-weight: 700; letter-spacing: -0.04em; line-height: 0.9; }
.numbers .lines { font-size: 15px; line-height: 1.35; color: var(--grey); padding-bottom: 4px; }
.numbers .lines b { color: var(--ink); font-weight: 600; }

/* ── Sections, lists, footer ── */
.section { padding: 44px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.list-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; }
.list-item { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 20px; padding: 18px 0; border-top: 1px solid var(--hairline); text-decoration: none; align-items: start; }
.list-item .headline { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 6px; }
.list-item .thumb { width: 88px; height: 88px; background: var(--track); object-fit: cover; display: block; }
@media (max-width: 900px) { .list-2 { grid-template-columns: 1fr; } }
footer.l-footer { margin-top: 64px; border-top: 1px solid var(--hairline); padding: 22px 0; font-size: 13px; color: var(--grey); }
footer.l-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.l-footer a { text-decoration: none; color: var(--grey); margin-left: 20px; }

/* ── Age gate (markup from js/age-gate.js) ── */
#wv-age-gate { position: fixed; inset: 0; z-index: 1000; background: var(--paper); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: var(--gutter); font-family: var(--font-ui); }
#wv-age-gate-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; text-align: left; }
#wv-age-gate-logo { width: 52px; height: 52px; color: var(--ink); }
#wv-age-gate-logo svg { width: 100%; height: 100%; display: block; }
#wv-age-gate-title { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
#wv-age-gate p { font-size: 15px; color: var(--grey); line-height: 1.45; }
#wv-age-gate label { font-size: 13px; color: var(--grey); }
#wv-age-gate-year { height: 46px; border: 0; border-bottom: 1px solid var(--hairline-strong); background: none; font-size: 16px; color: var(--ink); border-radius: 0; }
#wv-age-gate-submit { height: 46px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; border-radius: 2px; }
#wv-age-gate-submit:disabled { opacity: 0.4; cursor: default; }
#wv-age-gate-error { color: var(--live); font-size: 13px; min-height: 18px; }
#wv-age-gate-fine { font-size: 13px; color: var(--grey); }

/* ── Consent bar (markup from js/consent.js) ── */
#wv-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--paper); color: var(--ink); border-top: 1px solid var(--hairline-strong); padding: 14px var(--gutter); display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; font-family: var(--font-ui); }
#wv-consent p { font-size: 14px; color: var(--grey); line-height: 1.45; max-width: 640px; }
#wv-consent-actions { display: flex; gap: 10px; }
#wv-consent-reject { height: 38px; padding: 0 16px; border: 1px solid var(--ink); font-weight: 600; border-radius: 2px; }
#wv-consent-accept { height: 38px; padding: 0 16px; background: var(--ink); color: var(--paper); font-weight: 600; border-radius: 2px; }
#wv-cookie-settings-link { cursor: pointer; }
#wv-mini-footer { margin-top: 48px; padding: 18px var(--gutter); text-align: center; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--grey); }
footer.l-footer > a#wv-cookie-settings-link { display: block; max-width: var(--max-w); margin: 8px auto 0; padding: 0 var(--gutter); font-size: 13px; color: var(--grey); }

/* ══════════════════════════════════════════════════════════════════════════
   W2 kit — parts the remaining public pages share. Same rules as above.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page head, breadcrumbs, back link ── */
.page-head { padding: 44px 0 28px; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.04em; }
.page-head .lead { font-size: 18px; line-height: 1.45; color: var(--grey); max-width: 640px; }
.page-head .tools { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding-top: 8px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--grey); padding: 18px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.crumbs .sep { color: var(--hairline-strong); }
/* Same reasoning as .chip: the link's own box stays put (padding carries the
   spacing above the page head), the 44px hit area is an invisible ::after. */
.back { position: relative; display: inline-block; font-size: 14px; font-weight: 500; text-decoration: none; padding: 18px 0 0; }
.back::after { content: ''; position: absolute; inset: -6px -8px; }

/* ── Layout ── */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.two-col.narrow { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 900px) { .two-col, .two-col.narrow { grid-template-columns: 1fr; gap: 40px; } }
.block { padding: 28px 0 0; }
.block > h2, .block > h3 { margin-bottom: 14px; }
.label { font-size: 13px; color: var(--grey); }

/* ── Spec grid: label · value pairs, two columns, hairlines (the app's LedgerSpecGrid) ── */
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; border-top: 2px solid var(--ink); }
.spec-grid > * { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; min-width: 0; }
.spec-grid .k, .spec-grid dt { color: var(--grey); flex: none; }
.spec-grid .v, .spec-grid dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 600px) { .spec-grid { grid-template-columns: 1fr; } }

/* ── Five bars: label · track · value ── */
.bars { display: flex; flex-direction: column; }
.bar-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 40px; gap: 14px; align-items: center; height: 40px; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.bar-row .bar { width: 100%; height: 4px; background: var(--track); }
.bar-row .bar > span { display: block; height: 100%; background: var(--ink); }
.bar-row .v { text-align: right; font-weight: 600; }

/* ── Hairline range (sliders) ── */
input[type="range"].range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"].range::-webkit-slider-runnable-track { height: 2px; background: var(--hairline-strong); }
input[type="range"].range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; background: var(--ink); border: 0; border-radius: 2px; }
input[type="range"].range::-moz-range-track { height: 2px; background: var(--hairline-strong); }
input[type="range"].range::-moz-range-thumb { width: 18px; height: 18px; background: var(--ink); border: 0; border-radius: 2px; }
input[type="range"].range:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ── Chips are words: grey, underlined in ink when active (the filter pattern) ── */
/* The chip's own box is short — the underline sitting close to the word is the
   visual idea, and .chip must keep matching .filters .set button's rhythm — so
   the 44px hit area is an invisible ::after instead of taller padding. The
   chipset's 22px gap means ±8px horizontally cannot reach a neighbour. */
.chip { position: relative; padding: 4px 0 8px; color: var(--grey); border-bottom: 2px solid transparent; font-size: 15px; font-weight: 500; white-space: nowrap; }
.chip::after { content: ''; position: absolute; inset: -6px -8px; }
.chip.active, .chip[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.chip:disabled { opacity: 0.4; cursor: default; }

/* ── Rating squares ── */
.stars { display: inline-flex; gap: 4px; }
.stars > * { width: 12px; height: 12px; background: var(--track); border-radius: 2px; font-size: 0; color: transparent; }
.stars > .on { background: var(--ink); }

/* ── Form parts (the .field above takes an input; these add the rest) ── */
.field textarea, .field select { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; min-width: 0; color: var(--ink); }
.field.multi { height: auto; align-items: flex-start; padding: 10px 0; }
.field textarea { resize: vertical; min-height: 72px; font-family: var(--font-prose); font-size: 17px; line-height: 1.45; }
.field select { height: 43px; }
.field:focus-within { border-bottom-color: var(--ink); }
/* Underline inputs on the pages drop the outline; focus darkens the underline instead, as .field does. */
input:focus-visible, select:focus-visible, textarea:focus-visible { border-bottom-color: var(--ink); }
.field > .label { flex: none; min-width: 88px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.error { color: var(--live); font-size: 13px; }
.note { font-size: 14px; color: var(--grey); padding: 18px 0; }

/* ── Prose bodies (articles, reviews, wiki) ── */
.prose h2 { font-family: var(--font-ui); font-size: 22px; letter-spacing: -0.02em; margin: 32px 0 10px; }
.prose h3 { font-family: var(--font-ui); font-size: 17px; letter-spacing: -0.01em; margin: 24px 0 8px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 2px solid var(--ink); }
.prose img { margin: 0 0 18px; }
.prose a { text-underline-offset: 4px; }
.prose strong { font-weight: 600; }
.quote { font-family: var(--font-prose); font-size: 22px; line-height: 1.35; }
.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--track); display: block; }
.photo.portrait { aspect-ratio: 3 / 4; object-fit: contain; }

/* ── Modal and lightbox ── */
.l-overlay { position: fixed; inset: 0; z-index: 900; background: var(--scrim); display: none; align-items: center; justify-content: center; padding: 16px; }
.l-overlay.open { display: flex; }
.l-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); background: var(--paper); color: var(--ink); border: 1px solid var(--hairline-strong); display: flex; flex-direction: column; overflow: hidden; }
.l-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 20px 14px; border-bottom: 1px solid var(--hairline); }
.l-modal-body { padding: 0 20px 20px; overflow-y: auto; }
.l-close { width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; margin: -10px -10px 0 0; flex: none; }
.l-lightbox { position: fixed; inset: 0; z-index: 9600; display: none; align-items: center; justify-content: center; background: var(--scrim-heavy); padding: 24px; cursor: zoom-out; }
.l-lightbox.open { display: flex; }
.l-lightbox img { max-width: min(90vw, 560px); max-height: 86vh; object-fit: contain; background: var(--paper); }
@media (max-width: 540px) { .l-modal { max-height: 100vh; } }

/* ══════════════════════════════════════════════════════════════════════════
   Script-injected parts. The scripts inject their own CSS only when --paper is
   absent (the W1 probe); on a Ledger page these rules apply instead.
   ══════════════════════════════════════════════════════════════════════════ */

/* app-banner.js (Android only) */
#app-banner { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--hairline-strong); z-index: 1100; display: flex; align-items: center; font-family: var(--font-ui); }
.app-banner-inner { display: flex; align-items: center; gap: 10px; padding: 0 12px; width: 100%; }
.app-banner-close { width: 44px; height: 44px; display: grid; place-items: center; color: var(--grey); font-size: 16px; flex: none; }
.app-banner-icon { display: none; }
.app-banner-text { flex: 1; min-width: 0; }
.app-banner-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-banner-sub { font-size: 12px; color: var(--grey); margin-top: 1px; }
.app-banner-cta { height: 34px; display: inline-flex; align-items: center; padding: 0 14px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; text-decoration: none; border-radius: 2px; flex: none; }

/* announcements.js */
#wv-announcement-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: var(--scrim); padding: 16px; }
#wv-announcement { width: min(480px, 100%); background: var(--paper); color: var(--ink); border: 1px solid var(--hairline-strong); padding: 24px 20px 20px; font-family: var(--font-ui); display: flex; flex-direction: column; gap: 14px; }
#wv-announcement h2 { font-size: 22px; letter-spacing: -0.02em; }
#wv-announcement p { font-size: 15px; line-height: 1.5; white-space: pre-wrap; color: var(--grey); }
#wv-ann-dismiss { height: 46px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; border-radius: 2px; margin-top: 6px; }

/* affiliate-offers.js */
.aff-block { margin-top: 28px; }
.aff-title { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 8px; }
.aff-rows { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.aff-row { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--hairline); text-decoration: none; font-size: 15px; }
.aff-retailer { font-weight: 600; }
.aff-price { color: var(--grey); }
.aff-cta { margin-left: auto; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.aff-disclosure { margin-top: 10px; font-size: 13px; color: var(--grey); }

/* bottle-modal.js — the vault's bottle sheet as a paper form */
#bm-overlay { position: fixed; inset: 0; z-index: 600; background: var(--scrim); display: none; align-items: center; justify-content: center; padding: 16px; }
#bm-overlay.open { display: flex; }
#bm-box { width: min(560px, 100%); max-height: calc(100vh - 32px); background: var(--paper); color: var(--ink); border: 1px solid var(--hairline-strong); display: flex; flex-direction: column; font-family: var(--font-ui); overflow: hidden; }
#bm-photo-header { position: relative; display: flex; align-items: flex-end; gap: 14px; padding: 20px 20px 14px; border-bottom: 1px solid var(--hairline); min-height: 96px; }
#bm-photo-header img { width: 56px; height: 76px; object-fit: cover; background: var(--track); cursor: zoom-in; flex: none; }
#bm-photo-overlay { display: none; }
#bm-header-info { flex: 1; min-width: 0; }
#bm-header-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
#bm-header-sub { font-size: 13px; color: var(--grey); margin-top: 4px; }
#bm-status-badge { font-size: 12px; font-weight: 600; padding: 4px 8px; border: 1px solid var(--hairline-strong); border-radius: 2px; flex: none; }
#bm-status-badge:empty { display: none; }
#bm-status-badge.opened { border-color: var(--ink); }
#bm-status-badge.empty { color: var(--grey); }
#bm-close-btn { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; font-size: 18px; }
#bm-tabs { display: flex; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--hairline); }
.bm-tab { padding: 14px 0 12px; color: var(--grey); font-size: 15px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bm-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
#bm-body { padding: 16px 20px 20px; overflow-y: auto; }
.bm-tab-panel { display: none; }
.bm-tab-panel.active { display: block; }
.bm-section-label { display: block; font-size: 13px; color: var(--grey); margin: 16px 0 6px; }
.bm-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.bm-stat-cell { display: flex; flex-direction: column; gap: 4px; }
.bm-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 4px; }
.bm-info-cell { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.bm-info-cell .bm-cell-label { margin: 0; }
.bm-cell-label { font-size: 13px; color: var(--grey); }
.bm-cell-val { font-size: 15px; font-weight: 600; text-align: right; }
.bm-cell-val.amber { color: var(--ink); }
.bm-rating-line { font-size: 12px; color: var(--grey); margin-top: 4px; }
.bm-notes-block { margin-top: 4px; }
.bm-notes-text { font-family: var(--font-prose); font-size: 17px; line-height: 1.45; }
.bm-link { font-size: 14px; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.bm-divider { height: 1px; background: var(--hairline); margin: 16px 0; }
#bm-radar-wrap { display: none; }
.bm-slider-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 32px; gap: 14px; align-items: center; height: 44px; }
.bm-slider-label { font-size: 15px; }
.bm-slider-val { text-align: right; font-weight: 600; }
.bm-field { margin-bottom: 4px; }
.bm-field label { display: block; }
.bm-field .bm-section-label { margin-top: 12px; }
.bm-input, .bm-select, .bm-textarea { width: 100%; height: 44px; background: none; border: 0; border-bottom: 1px solid var(--hairline-strong); outline: 0; font-size: 16px; color: var(--ink); border-radius: 0; }
.bm-input:focus, .bm-select:focus, .bm-textarea:focus { border-bottom-color: var(--ink); }
.bm-textarea { height: auto; min-height: 72px; padding: 8px 0; resize: vertical; font-family: var(--font-prose); font-size: 17px; line-height: 1.45; }
.bm-input[type="range"] { border: 0; height: 28px; accent-color: var(--ink); }
.bm-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.bm-3col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
.bm-checkbox-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.bm-checkbox-row input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.bm-star-row { display: flex; gap: 6px; margin: 4px 0 12px; }
/* 22px squares can't each be 44px wide with ten in a row on a 390px screen, so
   the visible square is the WCAG 2.5.8 AA floor (24px) with an invisible
   ::after widening only the tap band's height, not its width — the 6px gap
   above keeps neighbours from overlapping. */
.bm-star { position: relative; width: 24px; height: 24px; background: var(--track); border-radius: 2px; font-size: 0; color: transparent; cursor: pointer; }
.bm-star::after { content: ''; position: absolute; inset: -10px -2px; }
.bm-star.on { background: var(--ink); }
.bm-photo-row { display: flex; align-items: center; gap: 14px; }
#bm-edit-photo-preview { width: 64px; height: 84px; background: var(--track); display: grid; place-items: center; overflow: hidden; flex: none; }
#bm-edit-photo-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.bm-photo-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; border-radius: 2px; cursor: pointer; }
.bm-photo-name { font-size: 13px; color: var(--grey); overflow-wrap: anywhere; }
.bm-save-btn { width: 100%; height: 46px; margin-top: 18px; background: var(--ink); color: var(--paper); font-size: 16px; font-weight: 600; border-radius: 2px; }
.bm-save-btn:disabled { opacity: 0.4; cursor: default; }
.bm-error { color: var(--live); font-size: 13px; margin-top: 8px; }
.bm-msg { font-size: 13px; color: var(--grey); margin-top: 6px; }
.bm-msg.warn { color: var(--ink); }
.bm-msg.error { color: var(--live); }
#bm-lightbox { position: fixed; inset: 0; z-index: 9600; display: none; align-items: center; justify-content: center; background: var(--scrim-heavy); padding: 24px; cursor: zoom-out; }
#bm-lightbox.open { display: flex; }
#bm-lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
@media (max-width: 540px) { #bm-box { max-height: 100vh; } .bm-2col, .bm-3col { grid-template-columns: 1fr; } }

/* ── Page photo: one wide, decorative photograph under a page's heading (alt="": it carries no information) ── */
.page-photo { margin: 24px 0 8px; }
.page-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; background: var(--track); border-radius: 2px; }
.page-photo.inset img { aspect-ratio: 4 / 3; }
.page-photo.home-photo { margin: 8px 0 0; }
@media (max-width: 720px) { .page-photo img { aspect-ratio: 16 / 9; } }
