/* Anon. One object carries the look: an anonymous note, its words cut letter by letter from newspapers and magazines
   and glued onto a white sheet, lying on a pink craft table with the scissors, the cut-up magazine, a glue stick and an
   airmail envelope with nothing in the sender line. The AI gets the note, never the writer. The note is the button and
   says what to do next; every key cuts its own letters. Everything you press is a scrap of paper glued down with tape;
   every value you read is cut from a yellow magazine page. Ink is printer black, the ground is newsprint. */

@font-face { font-family: 'Playfair Display'; src: url('/fonts/playfair-900.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/fonts/playfair-900-italic.woff2') format('woff2'); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Encode Sans'; src: url('/fonts/encode-sans.woff2') format('woff2'); font-weight: 400 900; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: 'Ubuntu Sans Mono'; src: url('/fonts/ubuntu-sans-mono.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
/* only for cut letters: subsets with A-Z, a-z, 0-9 and $ . , ? ! - ' & */
@font-face { font-family: 'Cut Anton'; src: url('/fonts/cut-anton.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Cut Rubik Mono'; src: url('/fonts/cut-rubik-mono.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Cut Old Standard'; src: url('/fonts/cut-old-standard.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ground: #f3f0e8;
  --ground-hi: #fbfaf6;
  --ground-lo: #e7e2d6;
  --line: #dcd6c9;
  --line-2: #b9b2a3;
  --ink: #151315;
  --ink-2: #39353a;
  --mute: #6c6762;
  --table: #f2a3bf;
  --table-hi: #f6bcd0;
  --table-lo: #e48aab;
  --hot: #d42a6b;
  --yellow: #ffd83a;
  --yellow-lo: #e9bd17;
  --red: #e5402d;
  --blue: #2c5be0;
  --paper: #fdfcf8;
  --black-paper: #1b1a1c;
  --tape: rgba(246, 240, 214, .62);
  --highlight: #ffe57a;
  --good: #1f7a4a;
  --bad: #c22a2a;

  --display: 'Playfair Display', 'Didot', 'Bodoni 72', Georgia, serif;
  --text: 'Encode Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Ubuntu Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* the fibres of cheap paper, very faint */
  --fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .28 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23f)' opacity='.22'/%3E%3C/svg%3E");

  --fs-0: .8125rem;
  --fs-1: .9375rem;
  --fs-2: 1.0625rem;
  --fs-3: 1.375rem;
  --fs-4: clamp(2.1rem, 1.4rem + 2.4vw, 3.3rem);
  --fs-5: clamp(2.6rem, 1.2rem + 3.8vw, 4.4rem);

  --page: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 var(--fs-2)/1.55 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: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; text-decoration-color: var(--hot); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--highlight); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

.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; }

/* ---------- cut letters. Each <i> is one letter cut from another page: its paper, its print, the way the scissors went
   (k0..k3 clip the corners differently), a tilt (--r) and a lift (--y), all decided by the seed in site.js. */
.cut { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .1em .42em; line-height: 1; }
.cut .w { display: inline-flex; align-items: center; gap: .04em; white-space: nowrap; }
:where(.cut, .mark) i { --bg: var(--paper); --fg: var(--ink); }
.cut i, .mark i {
  display: inline-block; font-style: normal; font-size: calc(1em * var(--z, 1)); line-height: 1;
  padding: .13em .13em .1em; min-width: .66em; text-align: center;
  background: var(--fibre), var(--bg); color: var(--fg);
  rotate: var(--r, 0deg); translate: 0 var(--y, 0);
  filter: drop-shadow(0 .03em .02em rgba(30, 20, 20, .28)) drop-shadow(0 .08em .1em rgba(30, 20, 20, .14));
}
.cut i.k0, .mark i.k0 { clip-path: polygon(2% 4%, 97% 0, 100% 95%, 4% 100%); }
.cut i.k1, .mark i.k1 { clip-path: polygon(0 0, 100% 6%, 95% 100%, 3% 94%); }
.cut i.k2, .mark i.k2 { clip-path: polygon(5% 0, 100% 3%, 98% 100%, 0 97%); }
.cut i.k3, .mark i.k3 { clip-path: polygon(0 6%, 94% 0, 100% 100%, 6% 96%); }
/* tilt, lift, size and the order of gluing: set by class, since the site allows no inline styles */
.cut .t0, .mark .t0 { --r: -7deg; } .cut .t1, .mark .t1 { --r: -5.5deg; } .cut .t2, .mark .t2 { --r: -4deg; } .cut .t3, .mark .t3 { --r: -2.5deg; } .cut .t4, .mark .t4 { --r: -1deg; } .cut .t5, .mark .t5 { --r: 1deg; } .cut .t6, .mark .t6 { --r: 2.5deg; } .cut .t7, .mark .t7 { --r: 4deg; } .cut .t8, .mark .t8 { --r: 5.5deg; } .cut .t9, .mark .t9 { --r: 7deg; }
.cut .y0, .mark .y0 { --y: -0.07em; } .cut .y1, .mark .y1 { --y: -0.035em; } .cut .y2, .mark .y2 { --y: 0em; } .cut .y3, .mark .y3 { --y: 0.035em; } .cut .y4, .mark .y4 { --y: 0.07em; }
.cut .z0 { --z: 0.92; } .cut .z1 { --z: 0.98; } .cut .z2 { --z: 1.04; } .cut .z3 { --z: 1.1; }
.cut .d0 { --i: 0; } .cut .d1 { --i: 1; } .cut .d2 { --i: 2; } .cut .d3 { --i: 3; } .cut .d4 { --i: 4; } .cut .d5 { --i: 5; } .cut .d6 { --i: 6; } .cut .d7 { --i: 7; } .cut .d8 { --i: 8; } .cut .d9 { --i: 9; } .cut .d10 { --i: 10; } .cut .d11 { --i: 11; } .cut .d12 { --i: 12; } .cut .d13 { --i: 13; } .cut .d14 { --i: 14; } .cut .d15 { --i: 15; }
/* the eight papers */
.s1 { --bg: #f1ede2; --fg: #141214; font-family: 'Cut Old Standard', Georgia, serif; font-weight: 700; }
.s2 { --bg: #18171a; --fg: #fbf8f0; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-style: italic !important; }
.s3 { --bg: #ffd83a; --fg: #141214; font-family: 'Cut Rubik Mono', 'Arial Black', sans-serif; font-size: calc(.82em * var(--z, 1)) !important; padding: .16em .12em .14em !important; }
.s4 { --bg: #e5402d; --fg: #fff7ee; font-family: 'Cut Anton', Impact, sans-serif; text-transform: uppercase; }
.s5 { --bg: #2c5be0; --fg: #fff; font-family: 'Encode Sans', sans-serif; font-weight: 900; font-stretch: 125%; font-size: calc(.9em * var(--z, 1)) !important; }
.s6 { --bg: #f7b9cf; --fg: #141214; font-family: 'Cut Anton', Impact, sans-serif; }
.s7 { --bg: #fbfaf5; --fg: #d42a2a; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; }
.s8 { --bg: #cfd3cf; --fg: #141214; font-family: 'Encode Sans', sans-serif; font-weight: 800; font-stretch: 75%; }

/* the logo: the name in four scraps */
.mark { display: inline-flex; align-items: center; gap: .03em; font-size: 30px; line-height: 1; }
.mark i { padding: .08em .08em .06em; }

/* ---------- buttons: scraps of paper with a piece of tape. The plain ones are newsprint, the one you should press is
   a scrap of yellow magazine page. Pressing flattens the scrap onto the table. */
.key {
  --face: #fbfaf5; --on: var(--ink); --rim: rgba(21, 19, 21, .9); --lift: rgba(30, 20, 20, .32);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.3em; border: 0; border-radius: 1px;
  background: var(--fibre), var(--face); color: var(--on);
  font: 750 var(--fs-2)/1 var(--text); font-stretch: 108%; letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  clip-path: polygon(0 3%, 99% 0, 100% 96%, 1% 100%);
  box-shadow: inset 0 0 0 2px var(--rim);
  filter: drop-shadow(0 2px 0 var(--lift)) drop-shadow(0 7px 8px rgba(30, 20, 20, .16));
  transform: translateY(0) rotate(-.6deg); transition: transform .08s ease-out, filter .08s ease-out;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.key:hover { transform: translateY(-1px) rotate(-.6deg); }
.key:active, .key[aria-pressed='true'] { transform: translateY(1px) rotate(0); filter: drop-shadow(0 1px 0 var(--lift)) drop-shadow(0 2px 3px rgba(30, 20, 20, .16)); }
.key:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.key.go { --face: var(--yellow); --rim: #151315; }
.key.go::after { /* the tape that holds the scrap down */
  content: ''; position: absolute; right: -6px; top: -5px; width: 34px; height: 14px; rotate: 28deg;
  background: linear-gradient(90deg, rgba(255, 255, 255, .25), transparent 30%, transparent 70%, rgba(255, 255, 255, .25)), var(--tape);
  box-shadow: 0 0 0 .5px rgba(120, 110, 80, .18);
}
.key.dark { --face: var(--black-paper); --on: #fbf8f0; --rim: #000; }
.key.big { min-height: 62px; padding: 0 1.6em; font-size: 1.1875rem; }
.key.small { min-height: 40px; padding: 0 1em; font-size: var(--fs-1); }
.key.small.go::after { width: 26px; height: 11px; right: -5px; top: -4px; }
.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: .08em; text-underline-offset: .2em; }
.plain:hover { text-decoration-thickness: .14em; text-decoration-color: var(--hot); }

/* ---------- the yellow scrap: every value you read (the credit at the top, the balance, the 404) is cut out of a
   yellow magazine page, a strip of tape across the top. */
.lit {
  position: relative; color: var(--ink);
  background: var(--fibre), linear-gradient(180deg, #ffdd4a, #ffd42a);
  clip-path: polygon(1% 4%, 98% 0, 100% 97%, 0 100%);
  filter: drop-shadow(0 2px 1px rgba(30, 20, 20, .25)) drop-shadow(0 8px 10px rgba(30, 20, 20, .14));
}
.lettered { font-family: 'Cut Anton', 'Encode Sans', Impact, sans-serif; font-weight: 400; letter-spacing: .01em; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--ground) 93%, 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(--ink); padding: 4px 2px; }
.brand:hover .mark i:nth-child(odd) { rotate: calc(var(--r) * -1); }
.brand .mark i { transition: rotate .2s; }
.nav { display: flex; gap: clamp(14px, 2.4vw, 30px); margin-left: auto; font-weight: 650; font-size: var(--fs-2); }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
.nav a[aria-current='page'] { border-bottom-color: var(--hot); }
.top-x { display: inline-flex; padding: 8px; margin: -8px; }
.top-x svg { width: 19px; height: 19px; }
/* the credit at the top: a small yellow scrap, pressable */
.credit { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; margin: 4px; transition: transform .07s; rotate: -2deg; }
.credit:hover { transform: translateY(-1px); }
.credit:active { transform: translateY(1px); }
.credit .lit { display: block; min-width: 88px; padding: 9px 12px 8px; font-size: 1.45rem; line-height: 1; text-align: center; }
.menu-btn { display: none; }

/* ---------- the hero: a sheet of pink craft card on the table, its lower edge torn off. One unit, --u, sizes the
   scene; the note is an HTML button laid on the drawing at the same measures. */
.hero {
  --u: 16px;
  position: relative; overflow: clip; padding: clamp(28px, 5vw, 64px) 0 calc(var(--u) * 3);
  background: var(--fibre), radial-gradient(120% 90% at 70% 30%, var(--table-hi), var(--table) 60%, var(--table-lo));
}
.tear { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 34px; z-index: 0; }
.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 40px; }
.hero h1 { font: 900 var(--fs-5)/1.02 var(--display); letter-spacing: -.015em; text-wrap: balance; }
/* the second line is a strip cut from a black page and glued under the first */
.hero h1 em {
  display: inline; font-style: italic; color: #fff8f0; background: var(--black-paper); padding: 0 .16em .04em;
  line-height: 1.32; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  box-shadow: 0 .06em .08em rgba(40, 10, 20, .3);
}
.hero h1 .ln { display: block; margin-top: .14em; rotate: -1.2deg; transform-origin: left; }
.hero .lead { margin-top: 28px; max-width: 30em; font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); line-height: 1.5; color: #2c2026; text-wrap: pretty; }
.hero .lead b { font-weight: 750; color: var(--ink); }
.hero .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin-top: 36px; }
.hero .acts .plain { color: var(--ink); }

/* ---------- the scene: drawn in SVG at 360 x 300 units for 36em x 30em, one unit a tenth of an em */
.scene { position: relative; flex: none; width: 36em; height: 30em; font-size: var(--u); }
.desk-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.desk-art.over { z-index: 3; }
.scene .env-to { position: absolute; z-index: 1; left: 1.5em; top: 25.1em; rotate: 4deg; display: flex; align-items: center; gap: .45em; font: 700 1.05em/1 var(--mono); color: #3b3550; pointer-events: none; }
.scene .env-to .cut { font-size: 1.55em; gap: .1em .28em; }

/* the note: a white sheet, taped down at two corners, the words glued on letter by letter */
.note {
  position: absolute; z-index: 2; left: 5.6em; top: 6.2em; width: 22.4em; height: 17.6em; padding: 2.2em 1.4em 1.4em; border: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; text-align: center; color: var(--ink);
  rotate: 1.6deg; -webkit-tap-highlight-color: transparent; border-radius: 1px;
  background:
    var(--fibre),
    linear-gradient(115deg, rgba(255, 255, 255, .6), transparent 40%),
    linear-gradient(180deg, #fefdf9, #f7f4ec);
  box-shadow: 0 .05em 0 rgba(120, 90, 100, .3), 0 .7em 1.2em -.4em rgba(90, 30, 50, .35), 0 1.8em 2.6em -1.4em rgba(90, 30, 50, .4);
  transition: transform .1s ease-out, box-shadow .1s ease-out;
}
.note::before, .note::after { /* two pieces of tape */
  content: ''; position: absolute; top: -.7em; width: 5.4em; height: 1.6em;
  background: linear-gradient(90deg, rgba(255, 255, 255, .3), transparent 25%, transparent 75%, rgba(255, 255, 255, .3)), var(--tape);
  box-shadow: 0 0 0 .04em rgba(120, 110, 80, .16);
  clip-path: polygon(0 8%, 6% 0, 12% 10%, 18% 0, 100% 4%, 96% 50%, 100% 96%, 0 100%, 4% 50%);
}
.note::before { left: -1.4em; rotate: -32deg; }
.note::after { right: -1.4em; rotate: 34deg; }
.note:hover { transform: translateY(-.1em); }
.note:active { transform: translateY(.08em); box-shadow: 0 .05em 0 rgba(120, 90, 100, .3), 0 .3em .6em -.3em rgba(90, 30, 50, .4); }
.note:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.note .say { align-self: center; justify-self: center; font-size: 3.35em; max-width: 100%; }
.note .say .cut { gap: .18em .5em; }
.note .say.num { font-size: 3.2em; }
.note .say.num.long { font-size: 2.7em; }
.note .foot-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 1em; }
.note small { font: 500 .78em/1.2 var(--mono); letter-spacing: .02em; color: #57514f; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.note .sig { flex: none; font-size: 1.35em; display: inline-flex; align-items: center; gap: .2em; }
.note .sig b { font: 400 1em/1 var(--display); color: var(--ink); translate: 0 -.04em; }
.note .sig .cut { gap: .04em; }
/* new letters are glued down one after another */
.scene.on .note .say i { animation: glue .5s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes glue { 0% { opacity: 0; transform: translateY(-.35em) scale(1.4); } 60% { opacity: 1; } 100% { transform: none; } }
.scene.on .scissors .blade-b { animation: snip .7s ease-in-out .15s; transform-origin: 0 0; }
@keyframes snip { 0%, 100% { transform: rotate(8deg); } 45% { transform: rotate(-1deg); } }

/* ---------- home */
.band { padding: clamp(52px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.hero + .band { border-top: 0; }
.band h2 { font: 900 var(--fs-4)/1.04 var(--display); letter-spacing: -.012em; text-wrap: balance; }
.band h2 em { font-style: italic; color: var(--hot); }
.band .intro { margin-top: 18px; max-width: 34em; color: var(--ink-2); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 84px); align-items: start; }

/* 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); color: var(--mute); padding: 0 0 10px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.prices td { padding: 13px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.prices .n { text-align: right; font-family: var(--mono); font-size: .9rem; 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: 800 1.1rem/1.25 var(--text); letter-spacing: -.01em; }
.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.35 var(--mono); color: var(--mute); overflow-wrap: anywhere; letter-spacing: 0; }
.prices .tag { font: 700 var(--fs-0)/1 var(--text); color: var(--hot); margin-left: 8px; }
.prices tbody tr:hover td { background: color-mix(in srgb, var(--ground-hi) 80%, transparent); }
.more { display: inline-block; margin-top: 24px; font-weight: 700; }

/* code: white print on black paper */
.code { background: #121113; color: #efece6; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px #000, 0 14px 30px -18px rgba(0, 0, 0, .6); }
.code-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 8px 0 10px; }
.code-tabs button { background: none; border: 0; padding: 9px 13px; border-radius: 3px 3px 0 0; font: 650 var(--fs-1)/1 var(--text); color: #a39e98; }
.code-tabs button:hover { color: #fff; }
.code-tabs button[aria-selected='true'] { background: #222024; color: #fff; }
.code-tabs .copy { margin-left: auto; margin-bottom: 6px; }
.code pre { margin: 0; padding: 20px 22px 22px; background: #222024; overflow-x: auto; font: 400 .8375rem/1.7 var(--mono); tab-size: 2; }
.code pre .c { color: #8f8a86; } .code pre .s { color: #ffd83a; } .code pre .k { color: #f7a6c4; font-weight: 700; }
.copy { background: #34313a; color: #efece6; border: 0; border-radius: 3px; padding: 7px 11px; font: 650 var(--fs-0)/1 var(--text); }
.copy:hover { background: #45414b; }
.copy.done { background: var(--yellow); color: var(--ink); }

/* the dark band: black sugar paper */
.band.dark { color: #efece6; border-top: 0; background: var(--fibre), linear-gradient(180deg, #1f1e21, var(--black-paper)); }
.band.dark .wrap { position: relative; }
.band.dark .intro { color: #c9c4bd; }
.band.dark h2 em { color: var(--yellow); }
.band.dark .more:hover { text-decoration-color: var(--yellow); }
.band.dark + .band { border-top: 0; }

/* what the server keeps, and what it never keeps */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 5vw, 64px); margin-top: clamp(26px, 4vw, 44px); }
.ledger h3 { font: 900 1.7rem/1.15 var(--display); letter-spacing: -.005em; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.ledger li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.mem { counter-reset: mem; }
.mem li { display: grid; grid-template-columns: 2.2em 1fr; align-items: baseline; counter-increment: mem; }
.mem li::before { content: counter(mem, decimal-leading-zero); font: 500 .9375rem/1 var(--mono); color: var(--mute); }
/* never kept: each line next to the hole where a word was cut out */
.ledger .no li { display: flex; align-items: baseline; gap: 14px; color: var(--ink-2); }
.ledger .no li::before { content: ''; flex: none; width: 22px; height: 13px; translate: 0 1px; background: var(--table); rotate: -3deg;
  clip-path: polygon(0 8%, 100% 0, 96% 100%, 3% 92%); box-shadow: inset 0 2px 2px rgba(80, 20, 40, .3); }
.ledger .no li:nth-child(even)::before { rotate: 4deg; }
.fine { margin-top: 26px; max-width: 46em; color: var(--ink-2); }

/* questions */
.qa { border-top: 2px solid var(--ink); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 0; font: 750 1.1875rem/1.3 var(--text); letter-spacing: -.01em; 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(--hot); }
.qa p { padding: 0 0 20px; max-width: 44em; color: var(--ink-2); }

.foot { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: var(--fs-1); color: var(--mute); }
.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(--ink); font-weight: 650; }
.foot p { max-width: 40em; }

/* ---------- the account sheet: a sheet of paper taped over the page */
dialog.sheet {
  width: min(100% - 24px, 500px); max-height: min(100dvh - 24px, 860px); padding: 0; border: 0; border-radius: 2px;
  background: var(--fibre), var(--paper); color: var(--ink); overflow: auto;
  box-shadow: 0 0 0 1px rgba(21, 19, 21, .3), 0 30px 70px rgba(30, 10, 20, .45);
}
dialog.sheet::backdrop { background: rgba(70, 20, 40, .45); 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) rotate(-1deg) 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; }
.sheet-head h2 { font: 900 2rem/1.05 var(--display); letter-spacing: -.01em; }
.x { background: none; border: 0; width: 40px; height: 40px; margin: -8px -10px 0 0; border-radius: 3px; font: 400 1.7rem/1 var(--mono); color: var(--mute); }
.x:hover { background: var(--ground-lo); color: var(--ink); }
.sheet p { font-size: var(--fs-1); line-height: 1.5; }
/* the key: typed on a slip */
.keyline { margin: 4px 0 16px; padding: 15px 16px 14px; border: 2px solid var(--ink); border-radius: 2px; background: #fff; font: 500 .9375rem/1.5 var(--mono); word-break: break-all; user-select: all; }
.note-name { margin: -4px 0 14px; font-size: var(--fs-1); color: var(--ink-2); }
.note-name b { font: 700 1.05rem/1 var(--mono); color: var(--ink); margin-left: 8px; }
/* the credit: cut from a yellow page */
.balance { margin: 12px 4px 22px; padding: 20px 20px 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; rotate: -1deg; }
.balance b { font-size: 3.3rem; line-height: .95; }
.balance span { font: 600 var(--fs-0)/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #5a4a10; 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: 4px solid var(--hot); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr) 1.25fr; gap: 12px; margin: 8px 3px 20px; }
.amounts .key { padding: 0; min-height: 46px; }
.amounts .key[aria-pressed='true'] { --face: var(--black-paper); --on: #fbf8f0; --rim: #000; }
.amounts label { position: relative; display: block; }
.amounts label span { position: absolute; left: 12px; top: 50%; translate: 0 -50%; font-weight: 700; pointer-events: none; }
.amounts input { width: 100%; height: 46px; padding: 0 8px 0 26px; border: 2px solid var(--ink); 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(--ink); }
.qr svg, .qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.field { margin-bottom: 12px; }
.field > span { display: block; font: 650 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: 500 .78rem/1.45 var(--mono); overflow-wrap: anywhere; }
.field .val b.amt { font: 700 1.2rem/1.15 var(--mono); letter-spacing: -.01em; }
.mini { background: var(--ink); color: #fff; border: 0; border-radius: 2px; padding: 7px 10px; font: 650 var(--fs-0)/1 var(--text); flex: none; box-shadow: 0 2px 0 #000; }
.mini:hover { background: var(--ink-2); }
.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; border-radius: 2px; background: var(--ground-lo); font-weight: 650; font-size: var(--fs-1); }
.status.seen { background: #ffe9a0; }
.status.ok { background: var(--good); color: #fff; }
/* waiting: the scissors snip, again and again */
.wait { position: relative; width: 26px; height: 14px; flex: none; }
.wait::before, .wait::after { content: ''; position: absolute; left: 2px; top: 6px; width: 22px; height: 3px; border-radius: 2px; background: var(--ink); transform-origin: 3px 50%; animation: snipw 1s ease-in-out infinite; }
.wait::after { animation-direction: reverse; }
@keyframes snipw { 0%, 100% { rotate: -16deg; } 50% { rotate: 0deg; } }
.notes { margin-top: 16px; font-size: var(--fs-0); color: var(--mute); line-height: 1.5; }
.notes a { color: var(--ink); font-weight: 650; }
.payments { margin-top: 20px; border-top: 2px solid var(--ink); }
.payments li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; 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: 48px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 2px; background: #fff; font: 500 var(--fs-1)/1 var(--mono); }
.err { color: var(--bad); font-weight: 650; margin-top: 10px; font-size: var(--fs-1); }
.credited { text-align: center; padding: 6px 0 4px; }
.credited .lit { margin: 10px 30px; padding: 22px 16px 20px; rotate: -2deg; }
.credited .lit small { display: block; font: 600 var(--fs-0)/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; color: #5a4a10; }
.credited .lit b { display: block; font-size: 3.8rem; line-height: .95; }
.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: #fff; padding: 12px 18px; border-radius: 2px; font-weight: 650; font-size: var(--fs-1); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: rise .2s ease-out; max-width: calc(100% - 32px); }

/* ---------- text pages */
.page { padding: clamp(30px, 6vw, 70px) 0 clamp(60px, 8vw, 110px); }
.page h1 { font: 900 clamp(2.5rem, 1.5rem + 3.6vw, 4.4rem)/1.02 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.page h1 em { font-style: italic; color: var(--hot); }
.page .lead { margin-top: 20px; max-width: 36em; font-size: 1.25rem; line-height: 1.45; color: var(--ink-2); }
.prose { max-width: 44em; }
.prose h2 { font: 900 1.9rem/1.1 var(--display); letter-spacing: -.01em; margin: 52px 0 14px; }
.prose h3 { font: 750 1.1875rem/1.2 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(--hot); }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose code { font: 500 .88em var(--mono); background: var(--ground-lo); 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(--ink); 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: 14px; }
}
@media (max-width: 900px) {
  .hero { --u: clamp(8px, (100vw - 2 * var(--gutter)) / 37, 16px); }
  .hero .wrap { grid-template-columns: 1fr; gap: 0; }
  .hero .words { padding-bottom: 8px; }
  .hero .scene { margin: 22px 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(--ground); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(20, 22, 18, .14); font-size: 1.25rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current='page'] { border-bottom-color: var(--line); color: var(--hot); }
  .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; }
  .menu-btn svg { width: 24px; height: 24px; }
  .top .wrap { gap: 12px; }
  .top-x { display: none; }
  .mark { font-size: 26px; }
  .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%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* CA-Leiste (nur wenn COIN_CA gesetzt ist) */
.ca-bar { background: var(--black-paper); color: #e6e1da; font-size: 13px; }
.ca-bar .wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; min-height: 38px; padding-block: 6px; }
.ca-t { font: italic 900 17px/1 var(--display); color: var(--yellow); }
.ca-v { font-family: var(--mono); color: var(--ground-hi); overflow-wrap: anywhere; min-width: 0; }
.ca-copy, .ca-go { font: inherit; font-weight: 700; color: var(--ink); background: var(--ground-hi); border: 0; border-radius: 2px; padding: 4px 10px; cursor: pointer; text-decoration: none; }
.ca-go { background: var(--yellow); color: var(--ink); }
