@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/google-sans-flex-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Reddit Mono";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("assets/fonts/reddit-mono-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Cossette Texte";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/cossette-texte-400-latin.woff2") format("woff2");
}

:root {
  --vinyl: #123d2e;
  --vinyl-deep: #0b2a1f;
  --paper: #e3eee8;
  --paper-rule: #8fae9b;
  --guilloche: #6c8c75;
  --ink: #2a2440;
  --ink-strong: #17112a;
  --cream: #f3efe6;
  --stamp: #c8312b;
  --sans: "Google Sans Flex", "Helvetica Neue", sans-serif;
  --print: "Reddit Mono", ui-monospace, monospace;
  --ledger: "Cossette Texte", "Reddit Mono", ui-monospace, monospace;
  /* One unit is one pixel of the 2688px comp, so the first viewport scales as one object. */
  --u: calc(100vw / 2688);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--vinyl-deep); scrollbar-color: var(--guilloche) var(--vinyl-deep); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background: url("assets/plates/security-paper.webp") repeat;
  background-size: calc(600 * var(--u)) auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--paper); }
p, li, dd, td { text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: calc(4 * var(--u)) solid var(--stamp); outline-offset: calc(4 * var(--u)); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .5rem 1rem;
  background: var(--paper);
  color: var(--ink-strong);
}
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------ cover */

.cover {
  position: relative;
  height: calc(1105 * var(--u));
  background: url("assets/plates/cover-vinyl.webp") repeat;
  background-size: calc(720 * var(--u)) auto;
  box-shadow: inset 0 calc(-6 * var(--u)) calc(12 * var(--u)) rgb(0 0 0 / .35);
}

.tabs > *, .headline, .spread > *, .page > *, .teller > * { position: absolute; }

.wordmark {
  left: calc(140 * var(--u));
  top: calc(31 * var(--u));
  width: calc(385 * var(--u));
  height: calc(65 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: calc(64 * var(--u));
  letter-spacing: -0.01em;
}
.wordmark__mark { width: calc(76 * var(--u)); height: calc(38 * var(--u)); fill: currentColor; flex: none; }

.tab {
  top: calc(17 * var(--u));
  height: calc(84 * var(--u));
  display: grid;
  place-items: center;
  color: var(--cream);
  text-decoration: none;
  padding-top: calc(4 * var(--u));
  font-weight: 650;
  font-size: calc(45 * var(--u));
  background: url("assets/plates/cover-vinyl.webp") repeat;
  background-size: calc(720 * var(--u)) auto;
  border-radius: calc(30 * var(--u)) calc(30 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u));
  border: calc(4 * var(--u)) solid rgb(150 185 165 / .45);
  border-bottom-color: transparent;
  box-shadow: 0 calc(6 * var(--u)) calc(10 * var(--u)) rgb(0 0 0 / .5);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.tab:hover { transform: translateY(calc(-4 * var(--u))); }
.tab--how { left: calc(700 * var(--u)); width: calc(411 * var(--u)); }
.tab--rules { left: calc(1120 * var(--u)); width: calc(394 * var(--u)); }
.tab--presets { left: calc(1522 * var(--u)); width: calc(403 * var(--u)); }
.tab--token { left: calc(1934 * var(--u)); width: calc(394 * var(--u)); }

.x-link {
  left: calc(2520 * var(--u));
  top: calc(26 * var(--u));
  width: calc(88 * var(--u));
  height: calc(70 * var(--u));
  display: grid;
  place-items: center;
  color: var(--cream);
}
.x-link svg { width: calc(66 * var(--u)); height: calc(60 * var(--u)); fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: square; }

.headline {
  left: calc(490 * var(--u));
  top: calc(122 * var(--u));
  width: calc(1750 * var(--u));
  height: calc(97 * var(--u));
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  font-weight: 700;
  font-size: calc(86 * var(--u));
  line-height: 1;
  letter-spacing: -0.012em;
  white-space: nowrap;
  text-shadow: 0 calc(3 * var(--u)) calc(6 * var(--u)) rgb(0 0 0 / .35);
}

/* ------------------------------------------------------------ spread */

/* The spread box spans the whole cover; only its pages take clicks, so the tabs above stay reachable. */
.spread { position: absolute; inset: 0; pointer-events: none; }
.spread > * { pointer-events: auto; }

.page {
  top: calc(248 * var(--u));
  width: calc(1312 * var(--u));
  height: calc(818 * var(--u));
  background: url("assets/plates/security-paper.webp") repeat;
  background-size: calc(600 * var(--u)) auto;
  box-shadow:
    0 calc(3 * var(--u)) 0 #cfded5,
    0 calc(6 * var(--u)) 0 #bcd0c3,
    0 calc(9 * var(--u)) 0 #a9c1b2,
    0 calc(18 * var(--u)) calc(26 * var(--u)) rgb(0 0 0 / .45);
}
.page--left {
  left: calc(30 * var(--u));
  border-radius: calc(70 * var(--u)) calc(6 * var(--u)) calc(6 * var(--u)) calc(40 * var(--u));
  background-image: linear-gradient(to left, rgb(40 70 55 / .22), transparent calc(60 * var(--u))), url("assets/plates/security-paper.webp");
  background-size: auto, calc(600 * var(--u)) auto;
}
/* Clips the OPEN stamp while it lands scaled up, so the page never scrolls sideways. */
.page--right {
  overflow: clip;
  left: calc(1346 * var(--u));
  border-radius: calc(6 * var(--u)) calc(70 * var(--u)) calc(40 * var(--u)) calc(6 * var(--u));
  background-image: linear-gradient(to right, rgb(40 70 55 / .22), transparent calc(60 * var(--u))), url("assets/plates/security-paper.webp");
  background-size: auto, calc(600 * var(--u)) auto;
}

/* Children of a page use comp coordinates, offset by the page's own corner. */
.page--left > * { --ox: 30; --oy: 248; }
.page--right > * { --ox: 1346; --oy: 248; }

.passbook-title {
  left: calc((175 - var(--ox)) * var(--u));
  top: calc((297 - var(--oy)) * var(--u));
  width: calc(1040 * var(--u));
  margin: 0;
  padding-bottom: calc(18 * var(--u));
  border-bottom: calc(4 * var(--u)) dotted var(--ink);
  font-family: var(--print);
  font-weight: 500;
  font-size: calc(69 * var(--u));
  line-height: 1;
  letter-spacing: .02em;
  color: var(--ink);
}

.account {
  left: calc((175 - var(--ox)) * var(--u));
  top: calc((420 - var(--oy)) * var(--u));
  width: calc(1015 * var(--u));
  margin: 0;
  display: grid;
  row-gap: calc(22 * var(--u));
  font-family: var(--print);
  font-size: max(14px, calc(50 * var(--u)));
  line-height: 1;
  color: var(--ink);
}
.account div { display: grid; grid-template-columns: calc(250 * var(--u)) calc(70 * var(--u)) 1fr; }
.account dt { text-transform: uppercase; letter-spacing: .04em; }
.account dd { margin: 0; }
.account dd::before { content: ":"; display: inline-block; width: calc(70 * var(--u)); margin-left: calc(-70 * var(--u)); }
.account dd { grid-column: 3; }

.rosette {
  left: calc((560 - var(--ox)) * var(--u));
  top: calc((690 - var(--oy)) * var(--u));
  /* At its own aspect the artwork lands 370x213 like the comp, with the plate's transparent margin below. */
  width: calc(370 * var(--u));
  height: auto;
}

.ledger-title {
  left: calc((1435 - var(--ox)) * var(--u));
  top: calc((297 - var(--oy)) * var(--u));
  margin: 0;
  font-family: var(--print);
  font-weight: 500;
  font-size: calc(56 * var(--u));
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ledger-title span { font-size: max(11px, .6em); letter-spacing: .08em; vertical-align: .25em; margin-left: .4em; }

.ledger {
  left: calc((1435 - var(--ox)) * var(--u));
  top: calc((372 - var(--oy)) * var(--u));
  width: calc(1120 * var(--u));
  border-collapse: collapse;
  font-family: var(--ledger);
  font-size: max(12px, calc(30 * var(--u)));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  border-top: calc(3 * var(--u)) dotted var(--ink);
}
.ledger th { font-weight: 400; text-align: left; }
.ledger th, .ledger td { padding: calc(15 * var(--u)) 0 calc(10 * var(--u)); border-bottom: calc(3 * var(--u)) dotted var(--ink); white-space: nowrap; }
.ledger th:first-child, .ledger td:first-child { width: calc(260 * var(--u)); }
.ledger th:last-child, .ledger td:last-child { text-align: right; }

.stamp {
  left: calc((2150 - var(--ox)) * var(--u));
  top: calc((692 - var(--oy)) * var(--u));
  width: calc(440 * var(--u));
  height: calc(234 * var(--u));
  object-fit: cover;
}

/* ------------------------------------------------------------ teller window */

.teller {
  position: absolute;
  left: calc(61 * var(--u));
  top: calc(919 * var(--u));
  width: calc(2564 * var(--u));
  height: calc(140 * var(--u));
  border: calc(4 * var(--u)) solid #6e8f7b;
  border-radius: calc(36 * var(--u));
  background: url("assets/plates/security-paper.webp") repeat;
  background-size: calc(600 * var(--u)) auto;
  box-shadow: inset 0 0 0 calc(6 * var(--u)) var(--paper), inset 0 0 0 calc(8 * var(--u)) #9bb5a5;
}
.teller > * { --ox: 61; --oy: 919; }

.teller__ornament { top: calc((916 - var(--oy)) * var(--u)); height: calc(128 * var(--u)); object-fit: cover; }
.teller__ornament--left { left: calc((62 - var(--ox)) * var(--u)); width: calc(226 * var(--u)); }
.teller__ornament--right { left: calc((2400 - var(--ox)) * var(--u)); width: calc(230 * var(--u)); }

.teller__label {
  left: calc((324 - var(--ox)) * var(--u));
  top: calc((954 - var(--oy)) * var(--u));
  width: calc(590 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  font-family: var(--print);
  font-size: max(12px, calc(32 * var(--u)));
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.teller__label::after { content: ""; flex: 1; border-bottom: calc(5 * var(--u)) dotted var(--paper-rule); }

.button {
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: calc(12 * var(--u));
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s;
}
.button--primary {
  left: calc((941 - var(--ox)) * var(--u));
  top: calc((941 - var(--oy)) * var(--u));
  width: calc(490 * var(--u));
  height: calc(81 * var(--u));
  background: #35283d;
  color: #f5f1eb;
  font-size: calc(50 * var(--u));
  box-shadow: 0 calc(4 * var(--u)) calc(8 * var(--u)) rgb(23 17 42 / .3);
}
.button--secondary {
  left: calc((1508 - var(--ox)) * var(--u));
  top: calc((948 - var(--oy)) * var(--u));
  width: calc(425 * var(--u));
  height: calc(67 * var(--u));
  color: #2a2440;
  background: #dbeadd;
  border: calc(4 * var(--u)) solid #282234;
  font-size: calc(42 * var(--u));
}
.button--secondary::after {
  content: "";
  position: absolute;
  left: calc(100% + 26 * var(--u));
  width: calc(470 * var(--u));
  top: 50%;
  border-bottom: calc(5 * var(--u)) dotted var(--paper-rule);
}
.button:hover { transform: translateY(calc(-3 * var(--u))); }
.button--primary:hover { box-shadow: 0 calc(8 * var(--u)) calc(16 * var(--u)) rgb(23 17 42 / .35); }

/* ------------------------------------------------------------ rules */

.rules {
  position: relative;
  padding: calc(24 * var(--u)) calc(297 * var(--u)) calc(40 * var(--u));
}
.rules__heading, .section__heading {
  margin: 0;
  padding-bottom: calc(18 * var(--u));
  border-bottom: calc(4 * var(--u)) dotted var(--ink);
  color: var(--ink-strong);
  font-weight: 700;
  font-size: max(28px, calc(69 * var(--u)));
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.rules__columns {
  display: grid;
  grid-template-columns: calc(1050 * var(--u)) calc(910 * var(--u));
  column-gap: calc(140 * var(--u));
  padding: calc(14 * var(--u)) 0 calc(24 * var(--u));
  border-bottom: calc(4 * var(--u)) dotted var(--ink);
  font-family: var(--print);
  color: var(--ink-strong);
}
.rules__col + .rules__col { position: relative; }
.rules__col + .rules__col::before {
  content: "";
  position: absolute;
  left: calc(-70 * var(--u));
  top: calc(14 * var(--u));
  bottom: 0;
  border-left: calc(5 * var(--u)) dotted var(--ink);
}
.rules__col h3 {
  margin: 0 0 calc(10 * var(--u));
  font-weight: 600;
  font-size: max(12px, calc(36 * var(--u)));
  letter-spacing: .12em;
  text-transform: uppercase;
}
.rules__col ul { margin: 0; padding-left: calc(40 * var(--u)); font-size: max(15px, calc(26 * var(--u))); line-height: 1.36; }
.rules__col li { margin-bottom: calc(6 * var(--u)); }

/* ------------------------------------------------------------ shared below the cover */

:root {
  --gut: calc(297 * var(--u));
  --t-body: max(16px, calc(29 * var(--u)));
  --t-small: max(14px, calc(25 * var(--u)));
  --ink-soft: #364f3e;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cover :focus-visible, .token :focus-visible, .back :focus-visible { outline-color: var(--cream); }

.section { padding: calc(110 * var(--u)) var(--gut) calc(120 * var(--u)); }

/* Calms the guilloche behind the reading column; full linework stays in the margins, as in the comp. */
.rules, .section {
  background: linear-gradient(90deg,
    transparent calc(var(--gut) - 150 * var(--u)),
    rgb(232 241 236 / .74) calc(var(--gut) - 20 * var(--u)),
    rgb(232 241 236 / .74) calc(100% - var(--gut) + 20 * var(--u)),
    transparent calc(100% - var(--gut) + 150 * var(--u)));
}
.sample { font-size: max(12px, .62em); letter-spacing: .08em; vertical-align: .2em; color: var(--ink-soft); }
.section__lede {
  max-width: 48ch;
  margin: calc(30 * var(--u)) 0 calc(64 * var(--u));
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink-strong);
}

/* A row of punched holes, the tear line between two pages of the book. */
.perf {
  height: max(18px, calc(40 * var(--u)));
  margin: 0 calc(120 * var(--u));
  background: radial-gradient(circle, rgb(11 42 31 / .3) 0 max(3px, calc(7 * var(--u))), transparent calc(max(3px, calc(7 * var(--u))) + .6px)) center / max(16px, calc(36 * var(--u))) 100% repeat-x;
}

/* ------------------------------------------------------------ how it works: tractor-feed printout */

.printout-wrap {
  max-width: calc(2000 * var(--u));
  filter: drop-shadow(0 calc(10 * var(--u)) calc(16 * var(--u)) rgb(23 45 35 / .28));
}
.printout {
  --strip: max(26px, calc(70 * var(--u)));
  --pitch: max(22px, calc(52 * var(--u)));
  --r: max(5px, calc(12 * var(--u)));
  --tear: rgb(42 36 64 / .35);
  --cols: calc(150 * var(--u)) calc(290 * var(--u)) minmax(0, 1fr) calc(330 * var(--u));
  position: relative;
  padding: calc(26 * var(--u)) var(--strip) calc(40 * var(--u));
  background: #f8f6ef;
  -webkit-mask:
    radial-gradient(circle, transparent var(--r), #000 calc(var(--r) + .5px)) left top / var(--strip) var(--pitch) repeat-y,
    radial-gradient(circle, transparent var(--r), #000 calc(var(--r) + .5px)) right top / var(--strip) var(--pitch) repeat-y,
    linear-gradient(#000 0 0) center / calc(100% - 2 * var(--strip)) 100% no-repeat;
  mask:
    radial-gradient(circle, transparent var(--r), #000 calc(var(--r) + .5px)) left top / var(--strip) var(--pitch) repeat-y,
    radial-gradient(circle, transparent var(--r), #000 calc(var(--r) + .5px)) right top / var(--strip) var(--pitch) repeat-y,
    linear-gradient(#000 0 0) center / calc(100% - 2 * var(--strip)) 100% no-repeat;
}
/* The tear lines where the sprocket strips come off. */
.printout::before {
  content: "";
  position: absolute;
  inset: 0 var(--strip);
  border-inline: 1.5px dashed var(--tear);
  pointer-events: none;
}
.printout__head, .entry {
  display: grid;
  grid-template-columns: var(--cols);
  column-gap: calc(40 * var(--u));
  padding-inline: calc(56 * var(--u));
}
.printout__head {
  padding-block: calc(18 * var(--u));
  border-bottom: calc(3 * var(--u)) dotted var(--ink);
  font-family: var(--ledger);
  font-size: var(--t-small);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.entries { list-style: none; margin: 0; padding: 0; }
.entry {
  position: relative;
  align-items: baseline;
  padding-block: calc(36 * var(--u));
}
/* Green-bar paper: every other line sits on a pale green band. */
.entry:nth-child(odd) { background: #d8ebde; }
.entry__line, .entry__code { font-family: var(--ledger); text-transform: uppercase; }
.entry__line { font-size: var(--t-small); letter-spacing: .12em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.entry__code { font-size: max(17px, calc(36 * var(--u))); letter-spacing: .14em; color: var(--ink-strong); }
.entry__text {
  margin: 0;
  max-width: 60ch;
  font-family: var(--print);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink-strong);
}
.entry__stamp {
  position: absolute;
  right: calc(16 * var(--u));
  top: 50%;
  width: calc(380 * var(--u));
  min-width: 150px;
  height: auto;
  translate: 0 -50%;
  rotate: -5deg;
  mix-blend-mode: multiply;
}

/* ------------------------------------------------------------ presets: rate schedule */

.schedule {
  width: 100%;
  border-collapse: collapse;
  border-top: calc(4 * var(--u)) dotted var(--ink);
  font-size: var(--t-body);
  line-height: 1.45;
  color: var(--ink-strong);
}
.schedule thead th {
  padding: calc(22 * var(--u)) calc(40 * var(--u)) calc(18 * var(--u)) 0;
  border-bottom: calc(3 * var(--u)) dotted var(--ink);
  font-family: var(--print);
  font-weight: 500;
  font-size: var(--t-small);
  letter-spacing: .12em;
  text-align: left;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.schedule tbody th, .schedule td {
  padding: calc(34 * var(--u)) calc(48 * var(--u)) calc(34 * var(--u)) 0;
  border-bottom: calc(3 * var(--u)) dotted var(--ink);
  vertical-align: top;
  text-align: left;
}
.schedule tbody th {
  width: 22%;
  font-family: var(--print);
  font-weight: 600;
  font-size: max(16px, calc(31 * var(--u)));
  letter-spacing: .06em;
  text-transform: uppercase;
}
.schedule td:nth-of-type(1), .schedule td:nth-of-type(2) { width: 30%; }
.schedule td:last-child { padding-right: 0; color: var(--ink-soft); font-size: var(--t-small); }
.schedule__note {
  display: block;
  margin-top: calc(8 * var(--u));
  font-weight: 400;
  font-size: var(--t-small);
  letter-spacing: .12em;
  color: var(--ink-soft);
}
.rate {
  display: block;
  font-family: var(--ledger);
  font-size: max(26px, calc(60 * var(--u)));
  line-height: 1;
  letter-spacing: .04em;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ token: the back cover */

.token {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  column-gap: calc(180 * var(--u));
  align-items: center;
  padding: calc(160 * var(--u)) var(--gut) calc(170 * var(--u));
  background: url("assets/plates/cover-vinyl.webp") repeat;
  background-size: calc(720 * var(--u)) auto;
  box-shadow: inset 0 calc(8 * var(--u)) calc(16 * var(--u)) rgb(0 0 0 / .4), inset 0 calc(-8 * var(--u)) calc(16 * var(--u)) rgb(0 0 0 / .4);
  color: var(--cream);
}
/* Debossed into the vinyl: a dark fill, shadowed top edge, faint lit lower edge. */
.token__emboss {
  display: block;
  width: calc(600 * var(--u));
  margin-top: calc(110 * var(--u));
  fill: rgb(0 0 0 / .3);
  filter: drop-shadow(0 calc(-3 * var(--u)) 0 rgb(0 0 0 / .35)) drop-shadow(0 calc(4 * var(--u)) 0 rgb(190 225 205 / .16));
}
.token__title { position: relative; }
.token__title h2 {
  margin: 0;
  font-weight: 800;
  font-size: max(64px, calc(280 * var(--u)));
  line-height: .9;
  letter-spacing: -0.03em;
  color: #eadfbf;
  text-shadow: 0 calc(-2 * var(--u)) 0 rgb(0 0 0 / .45), 0 calc(3 * var(--u)) 0 rgb(255 255 255 / .08);
}
.token__title p {
  max-width: 28ch;
  margin: calc(36 * var(--u)) 0 0;
  font-size: var(--t-body);
  line-height: 1.5;
  color: rgb(243 239 230 / .86);
}
.terms {
  position: relative;
  margin: 0;
  font-family: var(--print);
  font-size: var(--t-body);
  border-top: calc(3 * var(--u)) dotted rgb(243 239 230 / .45);
}
.terms div {
  display: flex;
  align-items: baseline;
  gap: calc(18 * var(--u));
  padding: calc(18 * var(--u)) 0;
  border-bottom: calc(3 * var(--u)) dotted rgb(243 239 230 / .2);
}
.terms div::before { content: ""; order: 1; flex: 1 1 calc(40 * var(--u)); border-bottom: calc(4 * var(--u)) dotted rgb(243 239 230 / .35); }
.terms dt { order: 0; white-space: nowrap; font-size: var(--t-small); letter-spacing: .1em; text-transform: uppercase; color: rgb(243 239 230 / .78); }
.terms dd { order: 2; margin: 0; max-width: 62%; text-align: right; color: var(--cream); }

/* ------------------------------------------------------------ open a vault: the teller window again */

.open { padding-top: calc(140 * var(--u)); }
.window {
  position: relative;
  padding: calc(80 * var(--u)) calc(110 * var(--u)) calc(90 * var(--u)) calc(420 * var(--u));
  border: calc(4 * var(--u)) solid #6e8f7b;
  border-radius: calc(36 * var(--u));
  box-shadow: inset 0 0 0 calc(6 * var(--u)) var(--paper), inset 0 0 0 calc(8 * var(--u)) #9bb5a5;
}
.window__ornament {
  position: absolute;
  left: calc(40 * var(--u));
  top: calc(50 * var(--u));
  width: calc(340 * var(--u));
  height: auto;
}
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: calc(20 * var(--u));
  max-width: 54ch;
  margin: calc(44 * var(--u)) 0 calc(54 * var(--u));
  padding: 0;
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--ink-strong);
}
.steps li { counter-increment: step; display: grid; grid-template-columns: max(40px, calc(90 * var(--u))) 1fr; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--ledger);
  letter-spacing: .1em;
  color: var(--ink-soft);
}
/* Ruled like a ledger entry rather than boxed, so it does not read as a card inside the window. */
.status {
  max-width: 56ch;
  margin-bottom: calc(60 * var(--u));
  padding: calc(24 * var(--u)) 0;
  border-block: calc(3 * var(--u)) dotted var(--ink);
}
.status h3 {
  margin: 0 0 calc(10 * var(--u));
  font-family: var(--print);
  font-weight: 600;
  font-size: var(--t-small);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.status p { margin: 0; font-size: var(--t-body); line-height: 1.5; color: var(--ink-strong); }
.window__actions { display: flex; flex-wrap: wrap; gap: calc(30 * var(--u)) calc(40 * var(--u)); }
.window__actions .button {
  position: relative;
  width: auto;
  height: auto;
  min-height: 48px;
  padding: .7em 1.3em;
  font-size: max(16px, calc(34 * var(--u)));
}
.window__actions .button--secondary::after { content: none; }

/* ------------------------------------------------------------ back cover footer */

.back {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: calc(100 * var(--u));
  align-items: start;
  padding: calc(100 * var(--u)) var(--gut) calc(110 * var(--u));
  background: var(--vinyl-deep);
  color: var(--cream);
}
.wordmark--back { width: auto; height: auto; font-size: max(24px, calc(56 * var(--u))); }
.back__risk { max-width: 52ch; margin: 0; font-size: var(--t-small); line-height: 1.6; color: rgb(243 239 230 / .82); }
.back__contacts { display: grid; gap: calc(14 * var(--u)); margin: 0; padding: 0; list-style: none; font-family: var(--print); font-size: var(--t-small); }
.back__contacts a, .back__risk a { text-underline-offset: .25em; text-decoration-color: rgb(243 239 230 / .4); }
.back__contacts a:hover { text-decoration-color: currentColor; }

/* ------------------------------------------------------------ motion: the ledger prints, then the stamp lands */

@keyframes print-cell { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes stamp-land {
  0% { opacity: 0; transform: scale(1.55); filter: blur(2px); }
  55% { opacity: 1; transform: scale(.96); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  /* The print head sweeps each line left to right, one line after another. */
  .js .ledger tbody td { animation: print-cell .16s steps(8, end) backwards; animation-delay: calc(var(--row) + var(--col, 0s)); }
  .js .ledger tbody tr:nth-child(1) { --row: .30s; }
  .js .ledger tbody tr:nth-child(2) { --row: .62s; }
  .js .ledger tbody tr:nth-child(3) { --row: .94s; }
  .js .ledger tbody tr:nth-child(4) { --row: 1.26s; }
  .js .ledger tbody td:nth-child(2) { --col: .08s; }
  .js .ledger tbody td:nth-child(3) { --col: .16s; }
  .js .stamp { animation: stamp-land .5s cubic-bezier(.16, 1, .3, 1) 1.75s both; }
  .entry__stamp.is-waiting { opacity: 0; }
  .entry__stamp.is-landed { animation: stamp-land .5s cubic-bezier(.16, 1, .3, 1) .15s both; }
}

/* ------------------------------------------------------------ below 1024px: the book lies closed, pages stacked */

@media (max-width: 1023px) {
  :root {
    --u: .42px;
    --gut: max(20px, calc((100vw - 720px) / 2));
  }

  .tabs > *, .headline, .spread > *, .page > *, .teller > * {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
  }

  .cover { height: auto; padding: 10px var(--gut) 32px; }

  .tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 6px; }
  .wordmark { flex: 1 1 calc(100% - 60px); min-height: 44px; gap: 10px; font-size: 26px; }
  .wordmark__mark { width: 34px; height: 17px; }
  .x-link { order: 1; width: 44px; height: 44px; }
  .x-link svg { width: 22px; height: 20px; stroke-width: 2.6; }
  .tab {
    order: 2;
    flex: 1 1 auto;
    min-height: 44px;
    padding: 2px 8px 0;
    font-size: 14px;
    border-width: 2px;
    border-radius: 14px 14px 4px 4px;
    box-shadow: 0 3px 6px rgb(0 0 0 / .45);
  }

  .headline {
    display: block;
    margin: 26px 0 22px;
    font-size: clamp(30px, 8.4vw, 46px);
    line-height: 1.06;
    white-space: normal;
    text-wrap: balance;
  }

  .spread { position: static; display: grid; gap: 18px; }
  .page {
    padding: 24px 20px 26px;
    box-shadow: 0 2px 0 #cfded5, 0 4px 0 #bcd0c3, 0 6px 0 #a9c1b2, 0 12px 20px rgb(0 0 0 / .4);
  }
  .page--left { border-radius: 28px 6px 6px 18px; }
  .page--right { border-radius: 6px 28px 18px 6px; padding-bottom: 104px; }
  .passbook-title { padding-bottom: 10px; border-bottom-width: 2px; font-size: clamp(21px, 6vw, 30px); }
  .account { margin-top: 18px; row-gap: 10px; font-size: 15px; }
  .account div { grid-template-columns: 84px 20px 1fr; }
  .account dd::before { width: 20px; margin-left: -20px; }
  .rosette { display: block; width: 170px; height: auto; margin: 14px auto 0; }

  .ledger-title { font-size: 22px; }
  .ledger { width: 100%; margin-top: 14px; font-size: 12px; letter-spacing: .05em; border-top-width: 2px; }
  .ledger th, .ledger td { padding: 10px 8px 8px 0; border-bottom-width: 2px; white-space: normal; vertical-align: top; }
  .ledger th:first-child, .ledger td:first-child { width: 62px; white-space: nowrap; }
  .ledger th:last-child, .ledger td:last-child { padding-right: 0; white-space: nowrap; }
  .stamp { position: absolute; right: 14px; bottom: 12px; width: 170px; height: auto; }

  .teller {
    display: grid;
    gap: 12px;
    padding: 18px 16px;
    border-width: 2px;
    border-radius: 20px;
    box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px #9bb5a5;
  }
  .teller__ornament { display: none; }
  .teller__label { font-size: 12px; }
  .teller .button { width: 100%; min-height: 50px; font-size: 17px; border-radius: 10px; }
  .button--secondary { border-width: 2px; }
  .button--secondary::after { content: none; }

  .rules { padding: 40px var(--gut) 36px; }
  .rules__heading, .section__heading { padding-bottom: 12px; border-bottom-width: 2px; font-size: clamp(26px, 7vw, 36px); }
  .rules__columns { grid-template-columns: 1fr; row-gap: 20px; padding-top: 16px; border-bottom-width: 2px; }
  .rules__col + .rules__col { padding-top: 20px; border-top: 2px dotted var(--ink); }
  .rules__col + .rules__col::before { display: none; }
  .rules__col h3 { margin-bottom: 8px; font-size: 14px; }
  .rules__col ul { padding-left: 18px; font-size: 15px; line-height: 1.45; }

  .section { padding: 48px var(--gut) 56px; }
  .section__lede { margin: 16px 0 28px; }
  .perf { margin: 0 var(--gut); }

  .printout { --strip: 22px; --pitch: 22px; --r: 5px; padding: 6px var(--strip) 14px; }
  .printout__head { display: none; }
  .entry { grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 8px; padding: 18px 14px; }
  .entry__code { font-size: 17px; }
  .entry__text { grid-column: 1 / -1; font-size: 15px; }
  .entry--close { padding-bottom: 92px; }
  .entry__stamp { top: auto; right: 12px; bottom: 12px; width: 150px; min-width: 0; translate: none; }

  .schedule thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .schedule, .schedule tbody, .schedule tr, .schedule tbody th, .schedule td { display: block; width: auto; }
  .schedule { border-top-width: 2px; }
  .schedule tr { padding: 18px 0 20px; border-bottom: 2px dotted var(--ink); }
  .schedule tbody th, .schedule td { padding: 0; border: 0; }
  .schedule tbody th { margin-bottom: 4px; font-size: 17px; }
  .schedule__note { display: inline; margin-left: 10px; }
  .schedule td, .schedule td:nth-of-type(n) { width: auto; padding-top: 10px; }
  .schedule td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--print);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  .schedule td:last-child { font-size: 15px; }
  .rate { display: inline; margin-right: 6px; font-size: 26px; }

  .token { grid-template-columns: 1fr; row-gap: 32px; padding: 56px var(--gut) 60px; }
  .token__title h2 { font-size: clamp(76px, 24vw, 150px); }
  .token__emboss { width: 160px; margin-top: 28px; }
  .terms { font-size: 15px; }
  .terms div { display: grid; gap: 4px; padding: 12px 0; }
  .terms div::before { display: none; }
  .terms dt { font-size: 12px; }
  .terms dd { max-width: none; text-align: left; }

  .open { padding-top: 56px; }
  .window {
    padding: 26px 18px 28px;
    border-width: 2px;
    border-radius: 20px;
    box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px #9bb5a5;
  }
  .window__ornament { display: none; }
  .steps { gap: 12px; margin: 20px 0 24px; }
  .status { margin-bottom: 24px; padding: 14px 0; border-block-width: 2px; }
  .window__actions { display: grid; gap: 12px; }
  .window__actions .button { width: 100%; font-size: 16px; border-width: 2px; }

  .back { grid-template-columns: 1fr; gap: 22px; padding: 40px var(--gut) 48px; }
}
