/* Clank. One object carries the look: a lithographed tin wind-up robot on a beech workbench, light from the upper
   left. It has no face plate and nothing where a name would go. The counter window in its chest is the button and
   the state; the brass wind-up key is the key. Everything you press is a pressed tin plate with two printed rivets:
   toy-yellow for the thing to do, plain tin for the rest. Every value you read sits in a counter window, cream figures
   on dark drums. */

@font-face { font-family: 'Kreon'; src: url('/fonts/kreon.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Maven Pro'; src: url('/fonts/maven.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Datatype'; src: url('/fonts/datatype.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fira Code'; src: url('/fonts/firacode.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  /* the workshop */
  --wall: #ece8df;
  --wall-hi: #f7f4ee;
  --wall-lo: #dfd9cd;
  --sheet: #f7f4ee;
  --white: #ffffff;
  --ink: #18203a;
  --cobalt: #2c4f9e;
  --cobalt-hi: #4769bd;
  --cobalt-lo: #1d3a78;
  --yellow: #f2b927;
  --yellow-hi: #f8cf55;
  --yellow-lo: #b98a0c;
  --red: #d9452a;
  --cream: #f3ead6;
  --tin: #cdd2d6;
  --tin-hi: #f4f6f7;
  --tin-lo: #8d959c;
  --navy: #172241;
  --drum: #1d2230;
  --beech: #dcc095;
  /* the names the shared parts of the engine use */
  --desk: var(--wall);
  --tape: var(--cobalt);
  --rule: var(--tin-lo);
  --cloth: var(--navy);

  /* the surface you are on: the workshop wall by default, a catalogue sheet with .paper, the inside of the tin box with .dark */
  --bg: var(--wall);
  --fg: var(--ink);
  --fg-2: #444b5e;
  --mute: #6a7083;
  --line: rgba(24, 32, 58, .13);
  --line-2: rgba(24, 32, 58, .3);
  --em: var(--cobalt);
  --good: #2e7d4f;
  --bad: #b8321a;

  --display: 'Kreon', 'Rockwell', Georgia, serif;
  --text: 'Maven Pro', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --mono: 'Fira Code', ui-monospace, 'SF Mono', Menlo, monospace;
  /* figures: the counter drums, for every amount, price and number */
  --figure: 'Datatype', 'Fira Code', ui-monospace, monospace;

  --fs-0: .875rem;
  --fs-1: 1rem;
  --fs-2: 1.125rem;
  --fs-3: 1.4rem;
  --fs-4: clamp(2rem, 1.4rem + 1.9vw, 2.8rem);
  --fs-5: clamp(2.6rem, 1.5rem + 3.1vw, 4.3rem);

  --page: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}
.paper {
  --bg: var(--sheet);
  background: var(--bg); color: var(--fg);
}
.dark {
  --bg: var(--navy);
  --fg: #f1ede4;
  --fg-2: #c6cbd8;
  --mute: #98a0b6;
  --line: rgba(241, 237, 228, .14);
  --line-2: rgba(241, 237, 228, .32);
  --em: var(--yellow);
  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(--wall); }
body {
  margin: 0; background: var(--wall); 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: #f8d77a; color: var(--ink); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 3px; }
.dark :focus-visible { outline-color: var(--yellow); }

.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 robot's head, blank face and antenna, and the name */
.mark { display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
.mark b { font: 700 30px/1 var(--display); letter-spacing: -.02em; color: var(--fg); translate: 0 -1px; }
.ck { width: 34px; height: 34px; flex: none; overflow: visible; }
.ck-head { fill: var(--tin); stroke: var(--ink); stroke-width: 1.6; }
.ck-side { fill: var(--tin-lo); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.ck-face { fill: #9aa2a9; stroke: var(--ink); stroke-width: 1.2; }
.ck-ant { stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; fill: none; }
.ck-ball { fill: var(--red); stroke: var(--ink); stroke-width: 1.2; }
.ck-ear { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.2; }

/* ---------- buttons: a pressed tin plate with two printed rivets and a crimped lower edge. Toy-yellow for the thing
   to do, plain tin for the rest. Pressing it pushes the plate down onto the bench. */
.key {
  --face: linear-gradient(180deg, var(--tin-hi), #d8dcdf 48%, #b9bfc4);
  --on: var(--ink); --lip: #7f878e; --rivet: #8d959c;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 2px 1.55em 0; border: 0; border-radius: 5px;
  background:
    radial-gradient(circle at 11px 50%, var(--rivet) 0 2.2px, rgba(255, 255, 255, .7) 2.4px 3.1px, transparent 3.3px),
    radial-gradient(circle at calc(100% - 11px) 50%, var(--rivet) 0 2.2px, rgba(255, 255, 255, .7) 2.4px 3.1px, transparent 3.3px),
    var(--face);
  color: var(--on);
  font: 700 var(--fs-2)/1 var(--text); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -4px 0 rgba(0, 0, 0, .12), 0 3px 0 var(--lip), 0 10px 18px -10px rgba(24, 32, 58, .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.05); }
.key:active, .key[aria-pressed='true'] { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -4px 0 rgba(0, 0, 0, .12), 0 1px 0 var(--lip), 0 4px 8px -6px rgba(24, 32, 58, .6); }
.key:disabled { opacity: .42; cursor: not-allowed; transform: none; filter: none; }
.key.go { --face: linear-gradient(180deg, var(--yellow-hi), var(--yellow) 50%, #e3a915); --on: var(--ink); --lip: var(--yellow-lo); --rivet: #b98a0c; }
.dark .key:not(.go) { --face: linear-gradient(180deg, #dfe3e6, #b9bfc4 60%, #9aa1a8); --lip: #5c636a; }
/* small plates and the chat's tool plates carry no rivets */
.key.small, .chat .key, .amounts .key { background: var(--face); padding-inline: 1em; }
.key.big { min-height: 62px; padding-inline: 1.9em; font-size: 1.22rem; }
.key.small { min-height: 40px; padding-inline: 1.3em; 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 counter window: every value you read (the credit at the top, the balance, the 404) shows in one,
   cream figures on dark drums, behind a tin bezel */
.lit {
  --mute: #a5adc2;
  position: relative; color: var(--cream);
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 76%, rgba(0, 0, 0, .6)), var(--drum);
  border-radius: 3px;
  box-shadow: 0 0 0 3px #b9bfc4, 0 0 0 4px #6f777f, 0 2px 0 4px rgba(24, 32, 58, .25);
}
.dark .lit { color: var(--cream); }
.lettered { font-family: var(--figure); font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--wall) 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 .ck-ball { transition: translate .25s ease-out; }
.brand:hover .ck-ball { 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(--cobalt); }
.top-x { display: inline-flex; padding: 8px; margin: -8px; }
.top-x svg { width: 19px; height: 19px; }
/* the credit at the top: a small counter window, 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 9px; font-size: 1.2rem; line-height: 1; text-align: right; }
.menu-btn { display: none; }

/* ---------- the hero: the workshop wall, light from the upper left, the bench in the drawing */
.hero {
  --u: 16px;
  position: relative; overflow: clip; padding: clamp(28px, 5vw, 60px) 0 clamp(36px, 5vw, 72px);
  background:
    radial-gradient(70% 85% at 14% 0%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--wall-hi), var(--wall) 55%, var(--wall-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.02 var(--display); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--cobalt); }
.hero h1 .ln { display: block; margin-top: .04em; }
.hero .lead { margin-top: 26px; max-width: 31em; font-size: clamp(1.1rem, 1rem + .45vw, 1.26rem); 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 robot on the bench, drawn at 400 x 320 units for 40em x 32em. The whole robot 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(--cobalt); outline-offset: .3em; }
.scene:hover .rb-bezel { stroke: var(--yellow-lo); stroke-width: 2; fill: var(--yellow); }
.scene:active .rb-body { transform: translateY(1px); }

.rb-drums text { font-family: var(--figure); font-weight: 600; fill: var(--cream); }
.rb-no { font: 600 8.5px var(--figure); letter-spacing: .05em; fill: var(--cream); }
/* the drums roll to a new value, one after another */
.rb-drums .ch { transform-box: fill-box; transform-origin: center; }
.fresh .rb-drums .ch { animation: roll .32s cubic-bezier(.3, 1.3, .5, 1) both; }
.fresh .rb-drums .c2 { animation-delay: .05s; } .fresh .rb-drums .c3 { animation-delay: .1s; } .fresh .rb-drums .c4 { animation-delay: .15s; }
.fresh .rb-drums .c5 { animation-delay: .2s; } .fresh .rb-drums .c6 { animation-delay: .25s; } .fresh .rb-drums .c7 { animation-delay: .3s; }
.fresh .rb-drums .c8 { animation-delay: .35s; } .fresh .rb-drums .c9 { animation-delay: .4s; } .fresh .rb-drums .c10 { animation-delay: .45s; }
.fresh .rb-drums .c11 { animation-delay: .5s; } .fresh .rb-drums .c12 { animation-delay: .55s; }
@keyframes roll { from { transform: translateY(-120%); opacity: 0; } 40% { opacity: 1; } }
/* the key goes into the back */
.arrive .rb-key { animation: keyin .5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes keyin { from { transform: translateX(22px); opacity: 0; } }
/* with credit the key turns, slowly, and the arms swing a little */
.rb-bow, .rb-armL, .rb-armR, .rb-body { transform-box: fill-box; }
.rb-bow { transform-origin: center; }
.run .rb-bow { animation: turn 2.4s linear infinite; }
@keyframes turn { 0% { transform: scaleY(1); } 25% { transform: scaleY(.08); } 50% { transform: scaleY(-1); } 75% { transform: scaleY(.08); } 100% { transform: scaleY(1); } }
.rb-armL, .rb-armR { transform-origin: 50% 4%; }
.run .rb-armL { animation: swing 2.4s ease-in-out infinite; }
.run .rb-armR { animation: swing 2.4s ease-in-out infinite reverse; }
@keyframes swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* ---------- 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 catalogue sheet: a thin double rule in cobalt at the top */
.band.paper, main.page.paper { background: linear-gradient(180deg, var(--cobalt) 0 2px, transparent 2px 5px, var(--cobalt) 5px 6px, transparent 6px) 0 0 / 100% 6px no-repeat, var(--sheet); }
/* the inside of the tin box: printed navy */
.band.dark { background: var(--navy); }
.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: #0f1630; 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: #9aa3bd; }
.code-tabs button:hover { color: #fff; }
.code-tabs button[aria-selected='true'] { background: #1d2647; color: #fff; }
.code-tabs .copy { margin-left: auto; margin-bottom: 6px; }
.code pre { margin: 0; padding: 20px 22px 22px; background: #1d2647; overflow-x: auto; font: 400 .88rem/1.7 var(--mono); tab-size: 2; }
.code pre .c { color: #8892ad; } .code pre .s { color: #f8cf55; } .code pre .k { color: #9fb7ee; font-weight: 700; }
.copy { background: #2f3a63; color: #ecebe6; border: 0; border-radius: 3px; padding: 8px 11px 6px; font: 500 var(--fs-0)/1 var(--text); }
.copy:hover { background: #3d4a7a; }
.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 catalogue sheet over the workshop */
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(--yellow-hi), var(--yellow) 50%, #e3a915); --on: var(--ink); --lip: var(--yellow-lo); --rivet: #b98a0c; }
.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: #2f3a63; }
.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: #e6e3db; font-weight: 500; font-size: var(--fs-1); }
.status.seen { background: #dde5f5; }
.status.ok { background: var(--good); color: #fff; }
/* waiting: a small gear turns */
.wait { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 4px dotted var(--cobalt); 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 catalogue sheet */
.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; }
  .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: #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(--yellow); }
.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(--yellow); color: var(--ink); }
