/* Lurk. One scene carries the look: the inside of a timber birdwatching hide in a reed marsh at dawn. Dark planks,
   a long viewing slit with its flap propped open, the marsh beyond it in fog, binoculars on the ledge, nobody there.
   The words in the fog are the button and the state. Everything you press is a rubber-armoured olive grip (the
   binoculars) or a plain fog-white plate; every value you read is seen through a slit in dark timber. */

@font-face { font-family: 'Ibarra Real Nova'; src: url('/fonts/ibarra.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Ibarra Real Nova'; src: url('/fonts/ibarra-italic.woff2') format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Martel Sans'; src: url('/fonts/martel-400.woff2') format('woff2'); font-weight: 400; font-display: swap; ascent-override: 92%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Martel Sans'; src: url('/fonts/martel-600.woff2') format('woff2'); font-weight: 600; font-display: swap; ascent-override: 92%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Martel Sans'; src: url('/fonts/martel-700.woff2') format('woff2'); font-weight: 700; font-display: swap; ascent-override: 92%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Martel Sans'; src: url('/fonts/martel-800.woff2') format('woff2'); font-weight: 800; font-display: swap; ascent-override: 92%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; src: url('/fonts/atkinson-mono.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  /* the marsh at dawn, the hide */
  --fog: #eceee8;
  --fog-hi: #f7f7f3;
  --fog-lo: #dcdfd7;
  --sheet: #f8f7f2;
  --white: #ffffff;
  --ink: #1e2420;
  --olive: #55613a;
  --olive-hi: #707d4c;
  --olive-lo: #343c22;
  --timber: #2c241e;
  --timber-hi: #4a3c30;
  --plank: #3a2f27;
  --reed: #c9b27c;
  --reed-hi: #dcc994;
  --dawn: #efd9a6;
  --water: #3f5a5e;
  --rust: #a8432a;
  --alu: #b8bebd;
  /* the names the shared parts of the engine use */
  --desk: var(--fog);
  --tape: var(--olive);
  --rule: var(--alu);
  --cloth: var(--timber);
  --red: var(--rust);
  --cream: var(--fog-hi);

  /* the surface you are on: the fog by default, a field-guide page with .paper, the inside of the hide with .dark */
  --bg: var(--fog);
  --fg: var(--ink);
  --fg-2: #444c46;
  --mute: #6b736c;
  --line: rgba(30, 36, 32, .13);
  --line-2: rgba(30, 36, 32, .3);
  --em: var(--olive);
  --good: #3f6b3a;
  --bad: #a8432a;

  --display: 'Ibarra Real Nova', 'Iowan Old Style', Georgia, serif;
  --text: 'Martel Sans', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* figures: every amount, price and number */
  --figure: 'Atkinson Hyperlegible Mono', ui-monospace, monospace;

  --fs-0: .875rem;
  --fs-1: 1rem;
  --fs-2: 1.125rem;
  --fs-3: 1.4rem;
  --fs-4: clamp(2.1rem, 1.4rem + 2vw, 3rem);
  --fs-5: clamp(2.7rem, 1.5rem + 3.1vw, 4.25rem);

  --page: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}
.paper {
  --bg: var(--sheet);
  background: var(--bg); color: var(--fg);
}
.dark {
  --bg: var(--timber);
  --fg: #efe9dc;
  --fg-2: #cfc6b6;
  --mute: #a39887;
  --line: rgba(239, 233, 220, .14);
  --line-2: rgba(239, 233, 220, .32);
  --em: var(--reed-hi);
  background: var(--bg); color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; background: var(--fog); }
body {
  margin: 0; background: var(--fog); color: var(--fg);
  font: 400 var(--fs-2)/1.62 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: .07em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .12em; text-decoration-color: var(--em); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
b, strong { font-weight: 700; }
[hidden] { display: none !important; }
::selection { background: var(--dawn); color: var(--ink); }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; border-radius: 3px; }
.dark :focus-visible { outline-color: var(--reed); }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .9em; }
.mute { color: var(--mute); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the mark: the hide's slit with its flap up and the name */
.mark { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.mark b { font: 700 31px/1 var(--display); letter-spacing: -.01em; color: var(--fg); translate: 0 1px; }
.lk { width: 34px; height: 34px; flex: none; overflow: visible; }
.lk-wall { fill: var(--timber); }
.lk-flap { fill: #6b5642; }
.lk-slit { fill: var(--dawn); }
.lk-reed { stroke: var(--timber); stroke-width: 1.4; stroke-linecap: round; fill: none; }
.lk-ledge { fill: #8c6f54; }

/* ---------- buttons: the thing to do is a rubber-armoured olive grip, ridged at both ends like the binoculars;
   the rest is a plain fog-white plate with an ink edge. Pressing pushes it down. */
.key {
  --face: linear-gradient(180deg, #ffffff, var(--fog-hi) 55%, #e6e8e1);
  --on: var(--ink); --lip: #9aa198; --edge: rgba(30, 36, 32, .55); --ridge: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 3px 1.5em 0; border: 0; border-radius: 9px;
  background:
    repeating-linear-gradient(90deg, var(--ridge) 0 1.5px, transparent 1.5px 4.5px) left 7px center / 16px 58% no-repeat,
    repeating-linear-gradient(90deg, var(--ridge) 0 1.5px, transparent 1.5px 4.5px) right 7px center / 16px 58% no-repeat,
    var(--face);
  color: var(--on);
  font: 700 var(--fs-2)/1 var(--text); letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--edge), inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--lip), 0 12px 20px -12px rgba(30, 36, 32, .6);
  transform: translateY(0); transition: transform .08s ease-out, filter .1s ease-out, box-shadow .08s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.key:hover { transform: translateY(-1px); filter: brightness(1.04); }
.key:active, .key[aria-pressed='true'] { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px var(--edge), inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--lip), 0 4px 8px -6px rgba(30, 36, 32, .6); }
.key:disabled { opacity: .42; cursor: not-allowed; transform: none; filter: none; }
.key.go { --face: linear-gradient(180deg, var(--olive-hi), var(--olive) 52%, #48532f); --on: #f4f1e4; --lip: #262d18; --edge: rgba(20, 24, 12, .55); --ridge: rgba(16, 20, 8, .45); padding-inline: 1.9em; }
.dark .key:not(.go) { --face: linear-gradient(180deg, #5a4a3c, var(--timber-hi) 60%, #3a2f26); --on: #efe9dc; --lip: #15100c; --edge: rgba(0, 0, 0, .5); }
/* small plates carry no ridges */
.key.small, .chat .key, .amounts .key { --ridge: transparent; padding-inline: 1em; }
.key.big { min-height: 62px; padding-inline: 2em; font-size: 1.2rem; }
.key.small { min-height: 40px; padding-inline: 1.25em; font-size: var(--fs-1); }
.key svg { width: 1.1em; height: 1.1em; flex: none; }
.plain { background: none; border: 0; padding: 0; font-weight: 700; text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .22em; }
.plain:hover { text-decoration-thickness: .12em; text-decoration-color: var(--em); }

/* ---------- a slit: every value you read (the credit at the top, the balance, the 404) is seen through one, ink on
   the pale dawn light, cut into dark timber */
.lit {
  --mute: #5d655f;
  position: relative; color: var(--ink);
  background: linear-gradient(180deg, #b9c3c3 0%, #dcdcd0 38%, #efe0bb 62%, #d5d4c7 100%);
  border-radius: 2px;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .28), inset 3px 0 0 rgba(255, 236, 200, .35), 0 0 0 4px var(--timber), 0 0 0 5px #120e0b, 0 3px 0 5px rgba(30, 36, 32, .18);
}
.dark .lit { color: var(--ink); }
.lettered { font-family: var(--figure); font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--fog) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); min-height: 76px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--fg); padding: 4px 2px; }
.brand .lk-flap { transition: translate .25s ease-out; }
.brand:hover .lk-flap { translate: 0 -1.5px; }
.nav { display: flex; gap: clamp(16px, 2.6vw, 34px); margin-left: auto; font-weight: 600; font-size: var(--fs-2); }
.nav a { text-decoration: none; padding: 8px 0 5px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line-2); }
.nav a[aria-current='page'] { border-bottom-color: var(--olive); }
.top-x { display: inline-flex; padding: 8px; margin: -8px; }
.top-x svg { width: 19px; height: 19px; }
/* the credit at the top: a small slit, pressable */
.credit { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; margin: 6px; transition: transform .07s; }
.credit:hover { transform: translateY(-1px); }
.credit:active { transform: translateY(1px); }
.credit .lit { display: block; min-width: 100px; padding: 10px 14px 8px; font-size: 1.15rem; line-height: 1; text-align: right; }
.menu-btn { display: none; }

/* ---------- the hero: fog in the morning, light from the upper right where the sun is */
.hero {
  --u: 16px;
  position: relative; overflow: clip; padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 5vw, 76px);
  background:
    radial-gradient(60% 80% at 88% 8%, rgba(255, 244, 214, .7), rgba(255, 244, 214, 0) 70%),
    linear-gradient(180deg, var(--fog-hi), var(--fog) 55%, var(--fog-lo));
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(20px, 4vw, 56px); }
.hero .words { padding: clamp(8px, 2vw, 24px) 0; }
.hero h1 { font: 700 var(--fs-5)/1 var(--display); letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.hero h1 em { font-style: italic; font-weight: 600; color: var(--olive); }
.hero h1 .ln { display: block; margin-top: .06em; }
.hero .lead { margin-top: 26px; max-width: 31em; font-size: clamp(1.08rem, 1rem + .4vw, 1.22rem); line-height: 1.62; color: var(--fg-2); text-wrap: pretty; }
.hero .lead b { color: var(--ink); font-weight: 700; }
.hero .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 36px; }

/* ---------- the scene: the hide, drawn at 400 x 320 units for 40em x 32em. The whole wall is the button. */
.scene { position: relative; display: block; flex: none; width: 40em; height: 32em; padding: 0; border: 0; background: none; font-size: var(--u); -webkit-tap-highlight-color: transparent; }
.scene svg { width: 100%; height: 100%; overflow: visible; }
.scene:focus-visible { outline: 3px solid var(--olive); outline-offset: .3em; }
.scene:hover .hd-say { fill: #0f1410; }
.scene:hover .hd-flap { translate: 0 -2px; }
.scene:active .hd-say { translate: 0 1px; }

.hd-say { font-family: var(--display); font-weight: 600; letter-spacing: .14em; fill: #26302b; font-variant-numeric: lining-nums; transition: fill .15s; }
.amount .hd-say { letter-spacing: .04em; font-weight: 700; }
.hd-no { font: 700 9.5px var(--figure); letter-spacing: .06em; fill: #2c3130; }
.hd-flap { transition: translate .25s ease-out; }
/* the fog drifts, slowly, and the reeds move a little */
.hd-fog .f1, .hd-fog .f2, .hd-fog .f3, .hd-reeds { transform-box: fill-box; }
.hd-fog .f1 { animation: drift 23s ease-in-out infinite alternate; }
.hd-fog .f2 { animation: drift 31s ease-in-out infinite alternate-reverse; }
.hd-fog .f3 { animation: drift 27s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(16px); } }
.hd-reeds { transform-origin: 50% 100%; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: skewX(-1.2deg); } to { transform: skewX(1.2deg); } }
/* new words come up out of the fog */
.fresh .hd-say { animation: emerge .9s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes emerge { from { opacity: 0; filter: blur(3px); transform: translateY(3px); } }
/* with a key the caps come off and the tag is stamped */
.arrive .hd-caps { animation: caps .5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes caps { from { transform: translate(18px, -8px); opacity: 0; } }
.arrive .hd-no { animation: stamp .45s ease-out both .2s; }
@keyframes stamp { from { opacity: 0; } }
.hd-glint { animation: glint 6s ease-in-out infinite; }
@keyframes glint { 0%, 80%, 100% { opacity: .9; } 90% { opacity: .45; } }

/* ---------- home */
.band { padding: clamp(56px, 8vw, 108px) 0; border-top: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.hero + .band, .band.paper, .band.paper + .band, .band.dark + .band, .band.dark { border-top: 0; }
.band h2 { font: 700 var(--fs-4)/1.08 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.band h2 em { font-style: normal; color: var(--em); }
.band .intro { margin-top: 18px; max-width: 34em; color: var(--fg-2); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 84px); align-items: start; }
/* a field-guide page: one fine olive rule over a wider reed rule at the top */
.band.paper, main.page.paper { background: linear-gradient(180deg, var(--olive) 0 1px, transparent 1px 4px, var(--reed) 4px 7px, transparent 7px) 0 0 / 100% 7px no-repeat, var(--sheet); }
/* the inside of the hide: dark planks with their seams */
.band.dark { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 1.5px, transparent 1.5px 44px, rgba(255, 255, 255, .025) 44px 88px), linear-gradient(180deg, #33291f, var(--timber) 40%, #231c17); }
.band.dark .intro { color: var(--fg-2); }

/* price list */
.prices { width: 100%; border-collapse: collapse; font-size: var(--fs-2); }
.prices th { text-align: left; font: 700 var(--fs-0)/1.2 var(--text); letter-spacing: .02em; color: var(--mute); padding: 0 0 10px; border-bottom: 2px solid var(--fg); white-space: nowrap; }
.prices td { padding: 14px 0 12px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.prices .n { text-align: right; font-family: var(--figure); font-size: 1rem; white-space: nowrap; padding-left: 18px; font-variant-numeric: tabular-nums; }
.prices th.n { font-family: var(--text); font-size: var(--fs-0); }
.prices td:first-child { font-weight: 700; padding-right: 12px; }
.prices tr.front td:first-child { font: 700 1.12rem/1.3 var(--text); }
.prices caption { caption-side: bottom; text-align: left; padding-top: 12px; font-size: var(--fs-0); color: var(--mute); }
.prices .id { display: block; font: 400 var(--fs-0)/1.4 var(--mono); color: var(--mute); overflow-wrap: anywhere; letter-spacing: 0; }
.prices .tag { font: 700 var(--fs-0)/1 var(--text); color: var(--em); margin-left: 8px; }
.prices tbody tr:hover td { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.more { display: inline-block; margin-top: 24px; font-weight: 700; }

/* code: a graphite card */
.code { background: #171b18; color: #ecebe6; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(241, 241, 238, .13), 0 18px 40px -18px rgba(0, 0, 0, .7); }
.code-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 8px 0 10px; }
.code-tabs button { background: none; border: 0; padding: 10px 13px 8px; border-radius: 4px 4px 0 0; font: 500 var(--fs-1)/1 var(--text); color: #a5ac9f; }
.code-tabs button:hover { color: #fff; }
.code-tabs button[aria-selected='true'] { background: #232a25; color: #fff; }
.code-tabs .copy { margin-left: auto; margin-bottom: 6px; }
.code pre { margin: 0; padding: 20px 22px 22px; background: #232a25; overflow-x: auto; font: 400 .88rem/1.7 var(--mono); tab-size: 2; }
.code pre .c { color: #8a9287; } .code pre .s { color: #e3cd92; } .code pre .k { color: #b7c58f; font-weight: 700; }
.copy { background: #3a443c; color: #ecebe6; border: 0; border-radius: 3px; padding: 8px 11px 6px; font: 500 var(--fs-0)/1 var(--text); }
.copy:hover { background: #4a564c; }
.copy.done { background: var(--good); color: #fff; }

/* what the server keeps, and what it never keeps: two ledger columns */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 5vw, 64px); margin-top: clamp(26px, 4vw, 44px); }
.ledger h3 { font: 700 1.5rem/1.15 var(--display); padding-bottom: 12px; border-bottom: 2px solid var(--fg); }
.ledger li { padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.mem { counter-reset: mem; }
.mem li { display: grid; grid-template-columns: 2.4em 1fr; align-items: baseline; counter-increment: mem; }
.mem li::before { content: counter(mem, decimal-leading-zero); font: 700 .95rem/1 var(--figure); color: var(--mute); }
/* never kept: each line has the bookkeeper's red dash for nil */
.ledger .no li { display: grid; grid-template-columns: 2.4em 1fr; align-items: baseline; color: var(--fg-2); }
.ledger .no li::before { content: '\2014'; font: 700 1rem/1 var(--figure); color: var(--red); }
.fine { margin-top: 26px; max-width: 46em; color: var(--fg-2); }

/* questions */
.qa { border-top: 2px solid var(--fg); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 0 16px; font: 700 1.16rem/1.35 var(--text); cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; font: 400 1.6rem/1 var(--mono); color: var(--mute); flex: none; }
.qa details[open] summary::after { content: '\2212'; color: var(--em); }
.qa p { padding: 0 0 20px; max-width: 44em; color: var(--fg-2); }

.foot { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: var(--fs-1); color: var(--mute); background: var(--desk); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: baseline; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.foot a { color: var(--fg); font-weight: 500; }
.foot p { max-width: 40em; }

/* ---------- the account sheet: a field-guide page over the fog */
dialog.sheet {
  --bg: var(--sheet);
  width: min(100% - 24px, 500px); max-height: min(100dvh - 24px, 860px); padding: 0; border: 0; border-radius: 3px;
  background: var(--bg); color: var(--fg); overflow: auto;
  box-shadow: 0 0 0 1px rgba(24, 25, 27, .12), 0 30px 70px rgba(20, 22, 26, .4);
}
dialog.sheet::backdrop { background: rgba(20, 22, 26, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog.sheet[open] { animation: rise .22s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes rise { from { transform: translateY(14px) scale(.985); opacity: 0; } }
.sheet-in { padding: 26px 26px 28px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--fg); }
.sheet-head h2 { font: 700 1.95rem/1.05 var(--display); letter-spacing: -.015em; }
.x { background: none; border: 0; width: 40px; height: 40px; margin: -8px -10px 0 0; border-radius: 3px; font: 400 1.8rem/1 var(--mono); color: var(--mute); }
.x:hover { background: rgba(24, 25, 27, .07); color: var(--fg); }
.sheet p { font-size: var(--fs-1); line-height: 1.55; }
.keyline { margin: 4px 0 16px; padding: 15px 16px 13px; border: 2px solid var(--fg); border-radius: 2px; background: #fff; font: 400 .95rem/1.55 var(--mono); word-break: break-all; user-select: all; }
.note-name { margin: -4px 0 14px; font-size: var(--fs-1); color: var(--fg-2); }
.note-name b { font: 700 1rem/1 var(--figure); color: var(--fg); margin: 0 4px 0 6px; }
.balance { margin: 12px 0 22px; padding: 18px 22px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.balance b { font-size: 2.7rem; line-height: 1.05; }
.balance span { font: 700 var(--fs-0)/1.35 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); text-align: right; }
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.row.spread { justify-content: space-between; }
.row.center { justify-content: center; }
.full { width: 100%; }
.gap-top { margin-top: 22px; }
.warn { margin: 20px 0 22px; padding-left: 14px; border-left: 3px solid var(--red); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr) 1.25fr; gap: 10px; margin: 8px 0 20px; }
.amounts .key { padding: 2px 0 0; min-height: 46px; }
.amounts .key[aria-pressed='true'] { --face: linear-gradient(180deg, var(--olive-hi), var(--olive) 52%, #48532f); --on: #f4f1e4; --lip: #262d18; --edge: rgba(20, 24, 12, .55); }
.amounts label { position: relative; display: block; }
.amounts label span { position: absolute; left: 12px; top: 50%; translate: 0 -46%; font-weight: 700; pointer-events: none; }
.amounts input { width: 100%; height: 46px; padding: 3px 8px 0 26px; border: 2px solid var(--fg); border-radius: 2px; background: #fff; font: 700 var(--fs-2)/1 var(--text); }
.pay { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: start; }
.qr { width: 148px; height: 148px; background: #fff; padding: 8px; border-radius: 2px; box-shadow: 0 0 0 2px var(--fg); }
.qr svg, .qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.field { margin-bottom: 12px; }
.field > span { display: block; font: 500 var(--fs-0)/1.2 var(--text); color: var(--mute); margin-bottom: 5px; }
.field .val { display: flex; align-items: flex-start; gap: 8px; }
.field .val b { flex: 1; min-width: 0; font: 400 .84rem/1.5 var(--mono); overflow-wrap: anywhere; }
.field .val b.amt { font: 700 1.25rem/1.15 var(--figure); }
.mini { background: var(--ink); color: #f4f1ea; border: 0; border-radius: 2px; padding: 8px 10px 6px; font: 500 var(--fs-0)/1 var(--text); flex: none; box-shadow: 0 2px 0 #000; }
.mini:hover { background: #3a443c; }
.mini:active { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.mini.done { background: var(--good); }
.status { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px 12px; border-radius: 2px; background: #e2e4dd; font-weight: 500; font-size: var(--fs-1); }
.status.seen { background: #ece3c6; }
.status.ok { background: var(--good); color: #fff; }
/* waiting: a small dotted ring turns, like a focus wheel */
.wait { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 4px dotted var(--olive); animation: spin 2.4s linear infinite; }
@keyframes spin { to { rotate: 1turn; } }
.notes { margin-top: 16px; font-size: var(--fs-0); color: var(--mute); line-height: 1.55; }
.notes a { color: var(--fg); font-weight: 700; }
.payments { margin-top: 20px; border-top: 2px solid var(--fg); }
.payments li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0 8px; border-bottom: 1px solid var(--line); font-size: var(--fs-1); }
.payments li span:last-child { font-family: var(--mono); font-size: var(--fs-0); color: var(--mute); text-align: right; }
.sheet-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--fs-1); }
.sheet-foot .danger { color: var(--bad); }
.paste { display: flex; gap: 12px; margin-top: 12px; }
.paste input { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border: 2px solid var(--fg); border-radius: 2px; background: #fff; font: 400 var(--fs-1)/1 var(--mono); }
.err { color: var(--bad); font-weight: 700; margin-top: 10px; font-size: var(--fs-1); }
.credited { text-align: center; padding: 6px 0 4px; }
.credited .lit { margin: 10px 30px; padding: 20px 26px 22px; }
.credited .lit small { display: block; font: 700 var(--fs-0)/1 var(--text); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; color: var(--mute); }
.credited .lit b { display: block; font-size: 3.2rem; line-height: 1.05; }
.credited p { margin: 22px 0 20px; font-size: var(--fs-2); }

.toast { position: fixed; left: 50%; bottom: 26px; translate: -50% 0; z-index: 90; background: var(--ink); color: #f4f4f1; padding: 13px 18px 11px; border-radius: 2px; font-weight: 500; font-size: var(--fs-1); box-shadow: 0 12px 30px rgba(20, 22, 26, .35); animation: rise .2s ease-out; max-width: calc(100% - 32px); }

/* ---------- text pages: a field-guide page */
.page { padding: clamp(30px, 6vw, 70px) 0 clamp(60px, 8vw, 110px); }
.page h1 { font: 700 clamp(2.5rem, 1.5rem + 3.4vw, 4.2rem)/1.05 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.page h1 em { font-style: normal; color: var(--em); }
.page .lead { margin-top: 20px; max-width: 36em; font-size: 1.26rem; line-height: 1.5; color: var(--fg-2); }
.prose { max-width: 44em; }
.prose h2 { font: 700 1.8rem/1.14 var(--display); letter-spacing: -.015em; margin: 52px 0 14px; }
.prose h3 { font: 700 1.2rem/1.25 var(--text); margin: 30px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul { list-style: square; padding-left: 1.2em; }
.prose ul li::marker { color: var(--em); }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose code { font: 400 .9em var(--mono); background: color-mix(in srgb, var(--fg) 7%, transparent); padding: .12em .38em; border-radius: 2px; }
.prose .code { margin: 16px 0 22px; }
.prose .code code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: var(--fs-1); }
.prose th { text-align: left; font-weight: 700; border-bottom: 2px solid var(--fg); padding: 8px 12px 8px 0; }
.prose td { border-bottom: 1px solid var(--line); padding: 10px 12px 10px 0; vertical-align: top; }

/* ---------- small screens */
@media (max-width: 1080px) {
  .hero { --u: 13px; }
}
@media (max-width: 900px) {
  .hero { --u: clamp(7.5px, (100vw - 2 * var(--gutter)) / 40.5, 16px); }
  .hero .wrap { grid-template-columns: 1fr; gap: 0; }
  .hero .words { padding-bottom: 6px; }
  .hero .scene { margin: 26px auto 0; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 76px 0 auto 0; z-index: 29; flex-direction: column; gap: 0; padding: 6px var(--gutter) 18px; background: var(--desk); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(20, 22, 26, .18); font-size: 1.25rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current='page'] { border-bottom-color: var(--line); color: var(--tape); }
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; margin-right: -8px; background: none; border: 0; border-radius: 3px; color: var(--fg); }
  .menu-btn svg { width: 24px; height: 24px; }
  .top .wrap { gap: 12px; }
  .top-x { display: none; }
  .mark b { font-size: 26px; }
  .lk { width: 32px; height: 32px; }
  .ledger { grid-template-columns: 1fr; gap: 34px; }
  .prices .ctx { display: none; }
  .pay { grid-template-columns: 1fr; }
  .qr { margin-inline: auto; }
  .amounts { grid-template-columns: repeat(4, 1fr); }
  .amounts label { grid-column: 1 / -1; }
  .sheet-in { padding: 22px 18px 24px; }
  .hero .acts .key.big { width: 100%; }
  .credit .lit { min-width: 0; padding: 9px 12px 10px; font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* CA-Leiste (nur wenn COIN_CA gesetzt ist) */
.ca-bar { background: var(--cloth); color: #dcdfe8; font-size: 14px; border-bottom: 1px solid var(--line); }
.ca-bar .wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; min-height: 40px; padding-block: 6px; }
.ca-t { font: 700 15px/1 var(--figure); color: var(--reed-hi); }
.ca-v { font-family: var(--mono); color: #f1ede4; overflow-wrap: anywhere; min-width: 0; }
.ca-copy, .ca-go { font: inherit; font-weight: 700; color: var(--ink); background: #f1ede4; border: 0; border-radius: 3px; padding: 5px 10px 3px; cursor: pointer; text-decoration: none; }
.ca-go { background: var(--reed); color: var(--ink); }
