/* Nolog. One object carries the look: an account ledger lying open on a white office desk. The request log on the
   left page is empty and voided with a red pen line; the account page on the right has no name, no email, no IP,
   only a key number and a balance box. The balance box is the button and says what to do next. Everything you press
   is a length of woven tape: red tape for the thing to do, black bookbinding tape for the rest. Every value you read
   sits in a ruled cell with the bookkeeper's double underline under it. */

@font-face { font-family: 'Hedvig Letters Serif'; src: url('/fonts/hedvig-serif-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Zen Kaku Gothic New'; src: url('/fonts/zenkaku-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Zen Kaku Gothic New'; src: url('/fonts/zenkaku-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Zen Kaku Gothic New'; src: url('/fonts/zenkaku-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'BIZ UDGothic'; src: url('/fonts/bizud-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'BIZ UDGothic'; src: url('/fonts/bizud-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'BIZ UDPGothic'; src: url('/fonts/bizudp-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'BIZ UDPGothic'; src: url('/fonts/bizudp-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* the office */
  --desk: #f2f2ef;
  --desk-hi: #fafaf8;
  --desk-lo: #e6e6e1;
  --sheet: #fcfcfa;
  --white: #ffffff;
  --ink: #18191b;
  --ink-2: #3c3f44;
  --tape: #c42a20;
  --tape-hi: #dc4436;
  --tape-lo: #8f1c15;
  --rule: #9db9c9;
  --rule-red: #d4685c;
  --cloth: #1d1e21;
  --steel: #8d939a;

  /* the surface you are on: the white desk by default, a ruled sheet with .paper, the black book cloth with .dark */
  --bg: var(--desk);
  --fg: var(--ink);
  --fg-2: #43464c;
  --mute: #6c7077;
  --line: rgba(24, 25, 27, .13);
  --line-2: rgba(24, 25, 27, .3);
  --em: var(--tape);
  --key-face: var(--ink);
  --key-on: #f4f4f1;
  --key-edge: rgba(255, 255, 255, .16);
  --go-face: var(--tape);
  --go-on: #fff;
  --go-edge: rgba(70, 0, 0, .35);
  --go-rib: rgba(0, 0, 0, .1);
  --good: #2b7a46;
  --bad: #b3261c;

  --display: 'Hedvig Letters Serif', 'Iowan Old Style', Georgia, serif;
  --text: 'Zen Kaku Gothic New', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --mono: 'BIZ UDGothic', ui-monospace, 'SF Mono', Menlo, monospace;
  /* figures: the office forms face, for every amount, price and number */
  --figure: 'BIZ UDPGothic', 'Helvetica Neue', Arial, sans-serif;

  --fs-0: .875rem;
  --fs-1: 1rem;
  --fs-2: 1.125rem;
  --fs-3: 1.4rem;
  --fs-4: clamp(2rem, 1.4rem + 1.9vw, 2.75rem);
  --fs-5: clamp(2.5rem, 1.45rem + 3vw, 4.1rem);

  --page: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}
.paper {
  --bg: var(--sheet);
  background: var(--bg); color: var(--fg);
}
.dark {
  --bg: var(--cloth);
  --fg: #f1f1ee;
  --fg-2: #c9cbce;
  --mute: #9a9ea4;
  --line: rgba(241, 241, 238, .13);
  --line-2: rgba(241, 241, 238, .3);
  --em: #ef6a5c;
  --key-face: #f1f1ee;
  --key-on: var(--ink);
  --key-edge: rgba(0, 0, 0, .14);
  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(--desk); }
body {
  margin: 0; background: var(--desk); color: var(--fg);
  font: 400 var(--fs-2)/1.6 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: #f3c9c3; color: var(--ink); }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible { outline-color: #ef6a5c; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .92em; }
.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: a small open ledger with its red ribbon, and the name */
.mark { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.mark b { font: 400 29px/1 var(--display); letter-spacing: -.02em; color: var(--fg); translate: 0 -1px; }
.nl { width: 36px; height: 31px; flex: none; overflow: visible; }
.nl-cover { fill: var(--ink); }
.nl-page { fill: #fff; }
.nl-rule { stroke: var(--rule); stroke-width: 1; fill: none; }
.nl-red { stroke: var(--rule-red); stroke-width: .9; fill: none; }
.nl-tape { fill: var(--tape); }
.dark .nl-cover { fill: #4a4d53; }

/* ---------- buttons: a cut length of woven tape. Red tape for the thing to do, black bookbinding tape for the rest
   (white on the black cloth). The selvage runs along both edges; pressing it flattens it onto the desk. */
.key {
  --face: var(--key-face); --on: var(--key-on); --edge: var(--key-edge); --rib: rgba(255, 255, 255, .05);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 2px 1.3em 0; border: 0; border-radius: 1px;
  background:
    repeating-linear-gradient(90deg, var(--rib) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .1)),
    var(--face);
  color: var(--on);
  font: 700 var(--fs-2)/1 var(--text); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 3px 0 -1px var(--edge), inset 0 -3px 0 -1px var(--edge), 0 2px 0 rgba(0, 0, 0, .22), 0 8px 16px -10px rgba(0, 0, 0, .55);
  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.08); }
.key:active, .key[aria-pressed='true'] { transform: translateY(1px); box-shadow: inset 0 3px 0 -1px var(--edge), inset 0 -3px 0 -1px var(--edge), 0 1px 0 rgba(0, 0, 0, .22); }
.key:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; }
.dark .key:focus-visible { outline-color: #ef6a5c; }
.key:disabled { opacity: .42; cursor: not-allowed; transform: none; filter: none; }
.key.go { --face: var(--go-face); --on: var(--go-on); --edge: var(--go-edge); --rib: var(--go-rib); }
.key.big { min-height: 62px; padding-inline: 1.6em; font-size: 1.22rem; }
.key.small { min-height: 40px; padding-inline: 1em; 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 ledger cell: every value you read (the credit at the top, the balance, the 404) is entered in one,
   in the adding-machine figures, with the double underline of a total */
.lit {
  position: relative; color: var(--ink); background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink), 0 1px 0 rgba(0, 0, 0, .06);
}
.dark .lit { color: var(--ink); background: #fff; }
.lettered { font-family: var(--figure); font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums;
  text-decoration: underline double; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--ink); }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--desk) 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 .nl-tape { transition: translate .25s ease-out; }
.brand:hover .nl-tape { translate: 0 1.5px; }
.nav { display: flex; gap: clamp(16px, 2.6vw, 34px); margin-left: auto; font-weight: 500; 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(--tape); }
.top-x { display: inline-flex; padding: 8px; margin: -8px; }
.top-x svg { width: 19px; height: 19px; }
/* the credit at the top: a ruled cell, pressable */
.credit { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; margin: 4px; transition: transform .07s; }
.credit:hover { transform: translateY(-1px); }
.credit:active { transform: translateY(1px); }
.credit .lit { display: block; min-width: 104px; padding: 10px 16px 11px; font-size: 1.15rem; line-height: 1; text-align: right; }
.menu-btn { display: none; }

/* ---------- the hero: the white desk, light from the upper left */
.hero {
  --u: 16px;
  position: relative; overflow: clip; padding: clamp(28px, 5vw, 60px) 0 clamp(36px, 5vw, 72px);
  background:
    radial-gradient(70% 80% at 12% 0%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--desk-hi), var(--desk) 55%, var(--desk-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: 400 var(--fs-5)/1.03 var(--display); letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--tape); }
.hero h1 .ln { display: block; margin-top: .06em; }
.hero .lead { margin-top: 26px; max-width: 31em; font-size: clamp(1.1rem, 1rem + .45vw, 1.28rem); line-height: 1.6; 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 ledger, drawn at 400 x 320 units for 40em x 32em. The whole book 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(--tape); outline-offset: .3em; }
.scene:hover .lg-box rect:first-child { stroke: var(--tape); stroke-width: 1.6; }
.scene:active { transform: translateY(1px); }

.lg-mono, .lg-fig { font-family: var(--figure); }
.lg-text { font-family: var(--text); }
.lg-serif { font-family: var(--display); }
.lg-head text { font-size: 5.2px; font-weight: 700; letter-spacing: .06em; fill: #b0473c; }
.lg-title { font-size: 13px; fill: var(--ink); letter-spacing: -.01em; }
.lg-folio { font-size: 6px; fill: #8b8f95; }
.lg-label text { font-size: 6.6px; font-weight: 500; fill: #5c6066; }
.lg-nil text, .lg-nil-k { font-size: 6.4px; fill: #c42a20; }
.lg-entry { font-size: 7.4px; font-weight: 700; fill: var(--ink); }
.lg-boxhead { font-size: 6px; font-weight: 700; letter-spacing: .1em; fill: #fff; }
.lg-value { font-weight: 700; fill: var(--ink); letter-spacing: 0; }
.amount .lg-value { fill: var(--ink); }
/* new words in the balance box are typed in, one figure after the other, then the total is underlined */
.fresh .lg-value .ch, .arrive .lg-key .ch { animation: type .01s steps(1) both; }
.fresh .lg-value .c1, .arrive .lg-key .c1 { animation-delay: .05s; } .fresh .lg-value .c2, .arrive .lg-key .c2 { animation-delay: .11s; }
.fresh .lg-value .c3, .arrive .lg-key .c3 { animation-delay: .17s; } .fresh .lg-value .c4, .arrive .lg-key .c4 { animation-delay: .23s; }
.fresh .lg-value .c5, .arrive .lg-key .c5 { animation-delay: .29s; } .fresh .lg-value .c6, .arrive .lg-key .c6 { animation-delay: .35s; }
.fresh .lg-value .c7, .arrive .lg-key .c7 { animation-delay: .41s; } .fresh .lg-value .c8, .arrive .lg-key .c8 { animation-delay: .47s; }
.fresh .lg-value .c9, .arrive .lg-key .c9 { animation-delay: .53s; } .fresh .lg-value .c10, .arrive .lg-key .c10 { animation-delay: .59s; }
.fresh .lg-value .c11, .arrive .lg-key .c11 { animation-delay: .65s; } .fresh .lg-value .c12, .arrive .lg-key .c12 { animation-delay: .71s; }
@keyframes type { from { opacity: 0; } to { opacity: 1; } }
.fresh .lg-total { stroke-dasharray: 160; stroke-dashoffset: 160; animation: rule .45s .6s ease-out forwards; }
@keyframes rule { to { stroke-dashoffset: 0; } }
.lg-void { stroke-dasharray: 270; stroke-dashoffset: 0; }

/* ---------- 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: 400 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 ruled sheet: the red double margin rule of ledger paper on the left */
.band.paper, main.page.paper { background: linear-gradient(90deg, transparent 0 calc(var(--gutter) * .4), var(--rule-red) calc(var(--gutter) * .4) calc(var(--gutter) * .4 + 1px), transparent calc(var(--gutter) * .4 + 1px) calc(var(--gutter) * .4 + 3px), var(--rule-red) calc(var(--gutter) * .4 + 3px) calc(var(--gutter) * .4 + 4px), transparent calc(var(--gutter) * .4 + 4px)) 0 0 / 100% 100% no-repeat, var(--sheet); }
/* the black book cloth: a fine weave */
.band.dark { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px), var(--cloth); }
.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: #111214; color: #ececea; 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: #9a9ea4; }
.code-tabs button:hover { color: #fff; }
.code-tabs button[aria-selected='true'] { background: #222428; color: #fff; }
.code-tabs .copy { margin-left: auto; margin-bottom: 6px; }
.code pre { margin: 0; padding: 20px 22px 22px; background: #222428; overflow-x: auto; font: 400 .88rem/1.7 var(--mono); tab-size: 2; }
.code pre .c { color: #868a91; } .code pre .s { color: #f2a196; } .code pre .k { color: #a9c7d8; font-weight: 700; }
.copy { background: #34373c; color: #ececea; border: 0; border-radius: 3px; padding: 8px 11px 6px; font: 500 var(--fs-0)/1 var(--text); }
.copy:hover { background: #44474d; }
.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: 400 1.55rem/1.15 var(--display); padding-bottom: 12px; border-bottom: 3px double 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(--em); }
.fine { margin-top: 26px; max-width: 46em; color: var(--fg-2); }

/* questions */
.qa { border-top: 3px double 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 ledger sheet over the desk */
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: 3px double var(--fg); }
.sheet-head h2 { font: 400 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 .98rem/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(--tape); }
.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: var(--go-face); --on: var(--go-on); --edge: var(--go-edge); --rib: var(--go-rib); }
.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: #f4f4f1; 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: #34373c; }
.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: #eceeef; font-weight: 500; font-size: var(--fs-1); }
.status.seen { background: #e3eef4; }
.status.ok { background: var(--good); color: #fff; }
/* waiting: a pen nib ticks along a ruled line */
.wait { position: relative; width: 22px; height: 14px; flex: none; color: var(--ink);
  background: linear-gradient(var(--rule), var(--rule)) 0 11px / 100% 1px no-repeat; }
.wait::after { content: ''; position: absolute; left: 0; top: 3px; width: 3px; height: 8px; background: var(--tape); animation: tick 1.2s steps(6) infinite; }
@keyframes tick { from { translate: 0 0; } to { translate: 20px 0; } }
.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: 3px double 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 ruled sheet */
.page { padding: clamp(30px, 6vw, 70px) 0 clamp(60px, 8vw, 110px); }
.page h1 { font: 400 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: 400 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: 3px double 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; }
  .nl { width: 32px; height: 28px; }
  .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: #dcdddf; 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: #ef6a5c; }
.ca-v { font-family: var(--mono); color: #f1f1ee; overflow-wrap: anywhere; min-width: 0; }
.ca-copy, .ca-go { font: inherit; font-weight: 700; color: var(--ink); background: #f1f1ee; border: 0; border-radius: 2px; padding: 5px 10px 3px; cursor: pointer; text-decoration: none; }
.ca-go { background: var(--tape); color: #fff; }
