/* The page is the object: each issue is printed on bone paper cards laid over a NASA photograph of the Gulf at
   night. Green black ground, bone paper and type, one pale jade for the action. Square corners, filled shapes,
   no rules outside tables and forms, no shadows, no gradients. */
:root {
  --ground: #161c1a;
  --surface: #1f2725;
  --bone: #e3e2da;
  --paper: #e3e2da;
  --paper-2: #d3d2c8;
  --ink: #161c1a;
  --ink-soft: #49524e;
  --muted: #9aa099;
  --jade: #9fc7b8;
  --night: #0c100f;
  --display: 'El Messiri', 'Alexandria', serif;
  --text: 'Alexandria', system-ui, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.4rem + 2.6vw, 3.75rem);
  --step-figure: clamp(4rem, 2rem + 5.5vw, 7rem);
  --margin: clamp(12px, 1.25vw, 18px);
  --gutter: clamp(16px, 2vw, 28px);
  --section: clamp(88px, 9vw, 140px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --zig-bottom: polygon(0 0, 100% 0, 100% calc(100% - 10px), 97.917% 100%, 95.833% calc(100% - 10px), 93.75% 100%, 91.667% calc(100% - 10px), 89.583% 100%, 87.5% calc(100% - 10px), 85.417% 100%, 83.333% calc(100% - 10px), 81.25% 100%, 79.167% calc(100% - 10px), 77.083% 100%, 75% calc(100% - 10px), 72.917% 100%, 70.833% calc(100% - 10px), 68.75% 100%, 66.667% calc(100% - 10px), 64.583% 100%, 62.5% calc(100% - 10px), 60.417% 100%, 58.333% calc(100% - 10px), 56.25% 100%, 54.167% calc(100% - 10px), 52.083% 100%, 50% calc(100% - 10px), 47.917% 100%, 45.833% calc(100% - 10px), 43.75% 100%, 41.667% calc(100% - 10px), 39.583% 100%, 37.5% calc(100% - 10px), 35.417% 100%, 33.333% calc(100% - 10px), 31.25% 100%, 29.167% calc(100% - 10px), 27.083% 100%, 25% calc(100% - 10px), 22.917% 100%, 20.833% calc(100% - 10px), 18.75% 100%, 16.667% calc(100% - 10px), 14.583% 100%, 12.5% calc(100% - 10px), 10.417% 100%, 8.333% calc(100% - 10px), 6.25% 100%, 4.167% calc(100% - 10px), 2.083% 100%, 0 calc(100% - 10px));
  --zig-top: polygon(0 10px, 2.083% 0, 4.167% 10px, 6.25% 0, 8.333% 10px, 10.417% 0, 12.5% 10px, 14.583% 0, 16.667% 10px, 18.75% 0, 20.833% 10px, 22.917% 0, 25% 10px, 27.083% 0, 29.167% 10px, 31.25% 0, 33.333% 10px, 35.417% 0, 37.5% 10px, 39.583% 0, 41.667% 10px, 43.75% 0, 45.833% 10px, 47.917% 0, 50% 10px, 52.083% 0, 54.167% 10px, 56.25% 0, 58.333% 10px, 60.417% 0, 62.5% 10px, 64.583% 0, 66.667% 10px, 68.75% 0, 70.833% 10px, 72.917% 0, 75% 10px, 77.083% 0, 79.167% 10px, 81.25% 0, 83.333% 10px, 85.417% 0, 87.5% 10px, 89.583% 0, 91.667% 10px, 93.75% 0, 95.833% 10px, 97.917% 0, 100% 10px, 100% 100%, 0 100%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ground); }
body { margin: 0; background: var(--ground); color: var(--bone); font: 400 var(--step-body)/1.6 var(--text); font-feature-settings: 'kern' 1; text-rendering: optimizeLegibility; overflow-x: clip; }
body:lang(ar) { line-height: 1.75; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .28em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--jade); outline-offset: 3px; }
.card :focus-visible, .paper :focus-visible { outline-color: var(--ink); }
::selection { background: var(--jade); color: var(--ink); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 9; background: var(--jade); color: var(--ink); padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }
.noscript { max-width: 60ch; margin: 3rem auto; padding: 0 var(--margin); }
bdi, .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- type ---------- */
h1, h2 { font-family: var(--display); font-weight: 400; }
:lang(en) h1, :lang(en) h2 { letter-spacing: -0.02em; }
h1 { font-size: var(--step-head); line-height: 1.12; }
:lang(ar) h1 { line-height: 1.3; }
h2 { font-size: var(--step-head); line-height: 1.1; }
:lang(ar) h2 { line-height: 1.32; }
h3 { font: 500 var(--step-body)/1.4 var(--text); }
.lead { font-size: var(--step-lead); line-height: 1.5; }
.small { font-size: var(--step-small); line-height: 1.55; }
.soft { color: var(--muted); }
.card .soft, .table-sheet .soft, .receipt .soft, .proof-card .soft, .reply-card .soft, .postcard .soft, .slip .soft, .slip-inline .soft { color: var(--ink-soft); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 28px; background: var(--ink); color: var(--paper); border: 0; border-radius: 0; font: 500 var(--step-body)/1.2 var(--text); text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease); }
.btn:hover, .btn:focus-visible { background: var(--jade); color: var(--ink); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .6; cursor: progress; }
.bar { width: 100%; }
.textbtn { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; background: none; border: 0; font: 500 var(--step-small)/1.3 var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; transition: text-underline-offset .2s var(--ease); }
.textbtn:hover { text-underline-offset: .45em; }
.textbtn:active { transform: translateY(1px); }
.link { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color .2s var(--ease), text-underline-offset .2s var(--ease); }
.link:hover { text-decoration-color: currentColor; text-underline-offset: .4em; }

/* ---------- the measuring scale across the top of every card ---------- */
.scale { display: flex; justify-content: space-between; align-items: flex-start; height: 56px; padding-inline: 18px; overflow: hidden; flex: none; }
.scale i { width: 6px; height: 22px; background: var(--ink); transform-origin: top; }
.scale i:nth-child(4n+1) { height: 46px; }
.motion .scale i { animation: tick .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes tick { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- the split: a card beside the photograph ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--margin); padding: var(--margin); align-items: start; }
.card { background: var(--paper); color: var(--ink); display: flex; flex-direction: column; min-width: 0; color-scheme: light; }
.home .card, .page .card { min-height: calc(100svh - 2 * var(--margin)); }
.night { position: sticky; top: var(--margin); height: calc(100svh - 2 * var(--margin)); overflow: hidden; background: var(--night); }
.night img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 58% 50%); transform-origin: 62% 58%; }
.motion .night img { animation: drift 70s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.09) translate3d(-1.6%, -1.2%, 0); } }
.night figcaption { position: absolute; inset-block-end: 14px; inset-inline-start: 14px; max-width: min(64ch, calc(100% - 28px)); padding: 6px 10px; background: rgba(12, 16, 15, .74); color: var(--bone); font-size: var(--step-small); line-height: 1.5; }

/* the hero card */
.card-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: clamp(32px, 4vw, 56px) clamp(24px, 4.5vw, 72px); text-align: center; }
.wordmark { display: block; text-decoration: none; }
.wordmark .w1 { font: 500 var(--step-lead)/1.35 var(--display); }
.hero-title span { display: block; }
.hero-sub { max-width: 36ch; }
.card-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; padding: 0 24px 28px; }
.card-foot a, .card-foot button { background: none; border: 0; padding: 4px 0; font-size: var(--step-small); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .35em; transition: text-decoration-color .2s var(--ease); }
.card-foot a:hover, .card-foot button:hover { text-decoration-color: currentColor; }

/* inner pages: the same card, set as a document */
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 28px; padding: 8px clamp(24px, 4vw, 56px) 0; }
.card-head .wordmark .w1 { font-size: var(--step-body); }
.card-head nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.card-head nav a, .card-head .lang { display: inline-block; padding: 6px 0; background: none; border: 0; font-size: var(--step-small); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .35em; transition: text-decoration-color .2s var(--ease); }
.card-head nav a:hover, .card-head .lang:hover, .card-head nav [aria-current] { text-decoration-color: currentColor; }
.card-head nav [aria-current] { font-weight: 500; }
.sheet { padding: clamp(40px, 5vw, 72px) clamp(24px, 4vw, 56px) clamp(48px, 6vw, 88px); display: flex; flex-direction: column; gap: 28px; }
.sheet:focus { outline: none; }
.sheet > h1 { max-width: 18ch; }
.sheet p, .sheet li { max-width: 64ch; }
.sheet section { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; }
.sheet section h2 { font-size: var(--step-lead); line-height: 1.4; }
.steps { list-style: decimal; padding-inline-start: 1.4em; display: flex; flex-direction: column; gap: 8px; }
.refs { display: flex; flex-direction: column; gap: 6px; }
pre { margin: 0; padding: 16px 18px; background: var(--ink); color: var(--paper); overflow-x: auto; font: 400 var(--step-small)/1.6 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; direction: ltr; text-align: left; white-space: pre; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .9em; }

/* ---------- sections of the issue ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); }
.band { padding-block: var(--section); }
.on-surface { background: var(--surface); }

/* intro: title and note, then the facts row */
.intro-top { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: end; }
.intro-top h2 { grid-column: 1 / 7; max-width: 12ch; }
.intro-top .note { grid-column: 9 / 13; max-width: 40ch; }
.facts { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 32px; margin-top: 120px; }
.fact { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fact .v { font: 300 var(--step-head)/1.1 var(--text); font-variant-numeric: tabular-nums lining-nums; }
.fact .k { font-size: var(--step-small); line-height: 1.5; color: var(--muted); max-width: 26ch; }
.intro .plate { grid-column: 8 / 13; margin-top: 72px; }
.intro .plate-note { grid-column: 1 / 7; align-self: start; margin-top: 72px; max-width: 30ch; font-size: var(--step-lead); line-height: 1.5; color: var(--bone); }
.plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.plate figcaption { margin-top: 10px; font-size: var(--step-small); color: var(--muted); }

/* the ledger: figures aligned on the decimal point */
.ledger-head { grid-column: 1 / 6; align-self: start; position: sticky; top: 18vh; display: flex; flex-direction: column; gap: 22px; }
.ledger-head h2 span { display: block; }
.ledger-head h2 .soft { color: var(--muted); }
.ledger-body { grid-column: 7 / 13; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.tabs legend { padding: 0; margin-bottom: 8px; font-size: var(--step-small); color: var(--muted); }
.tabs label { position: relative; }
.tabs input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tabs span { display: inline-block; padding: 9px 16px; background: var(--surface); color: var(--bone); font-size: var(--step-small); transition: background-color .2s var(--ease), color .2s var(--ease); }
.tabs label:hover span { background: #2b3532; }
.tabs input:checked + span { background: var(--bone); color: var(--ink); }
.tabs input:focus-visible + span { outline: 3px solid var(--jade); outline-offset: 2px; }
.past { padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.figures { display: flex; flex-direction: column; gap: 20px; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; align-items: baseline; padding-block: 10px; scroll-margin-top: 20vh; transition: background-color .6s var(--ease); }
.fig { display: grid; grid-template-columns: 2.05em 1.15em; direction: ltr; font: 300 var(--step-figure)/1 var(--text); font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.01em; }
.fig .whole { text-align: right; }
.fig .frac { text-align: left; }
.fig.none { grid-template-columns: auto; font-size: var(--step-lead); }
.cap { display: flex; flex-direction: column; gap: 6px; }
.cap .what { max-width: 30ch; }
.cap .basis { font-size: var(--step-small); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.row.stamped { background: var(--surface); margin-inline: -14px; padding-inline: 14px; }
.row > .slip-inline { grid-column: 1 / -1; }
.source { max-width: 60ch; }

/* the slip a citation is printed on */
.slip-inline { margin-top: 14px; padding: 22px 22px 32px; background: var(--paper); color: var(--ink); clip-path: var(--zig-bottom); display: flex; flex-direction: column; gap: 14px; color-scheme: light; }
.slip-inline h3 { font-size: var(--step-small); }
.slip-inline blockquote { display: flex; flex-direction: column; gap: 4px; }
.slip-inline .src { font-size: var(--step-small); color: var(--ink-soft); }
.slip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.done { font-size: var(--step-small); }

/* every check for one state, printed on a sheet of its own */
.table-sheet { grid-column: 3 / 11; background: var(--paper); color: var(--ink); padding: 40px clamp(20px, 3vw, 44px) 56px; clip-path: var(--zig-bottom); display: flex; flex-direction: column; gap: 14px; color-scheme: light; }
.table-sheet caption { font: 400 var(--step-lead)/1.4 var(--display); padding-bottom: 18px; }
.table-sheet table { font-size: var(--step-body); }

/* the week by week table */
.trend-head { grid-column: 1 / 6; margin-top: 88px; display: flex; flex-direction: column; gap: 10px; }
.trend-head h3 { font-family: var(--display); font-weight: 400; }
.trend { grid-column: 7 / 13; margin-top: 88px; display: flex; flex-direction: column; gap: 10px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--step-small); }
caption { text-align: start; padding-bottom: 10px; font: 500 var(--step-body)/1.4 var(--text); }
th, td { padding: 9px 10px; text-align: start; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); vertical-align: baseline; }
thead th { font-weight: 500; border-bottom-color: color-mix(in srgb, currentColor 55%, transparent); }
td.n, th.n { text-align: end; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
tr.group th { padding-top: 22px; font-weight: 500; border-bottom: 0; }
.wk th[scope='row'] { font-weight: 400; max-width: 28ch; }
.wk-date { display: block; font-weight: 400; color: var(--muted); }

/* the suffix card: printed like a list of patrons, tilted and cut by the edge of its section */
.proof { overflow: hidden; padding-top: var(--section); display: flex; justify-content: center; }
.proof-card { width: min(56vw, 860px); background: var(--paper); color: var(--ink); padding: 56px 56px 260px; margin-bottom: -200px; transform: rotate(-1.4deg); display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; color-scheme: light; transition: transform .6s var(--ease); }
[dir='ltr'] .proof-card { transform: rotate(1.4deg); }
.proof-card:hover { transform: rotate(-.8deg); }
[dir='ltr'] .proof-card:hover { transform: rotate(.8deg); }
.proof-card h2 { font-size: var(--step-lead); line-height: 1.4; }
.proof-card .tipped { width: 100%; }
.proof-card .tipped img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.proof-card .tipped figcaption { margin-top: 8px; font-size: var(--step-small); color: var(--ink-soft); }
.guests { display: flex; flex-direction: column; gap: 4px; font-size: var(--step-lead); line-height: 1.7; }
.guests a { text-decoration: none; }
.guests a:hover .who { text-decoration: underline; text-underline-offset: .3em; }
.guests .who { font-family: var(--display); }
.guests bdi { color: var(--ink-soft); }
.proof-note { max-width: 46ch; }

/* the showcase: citation slips standing along the bottom of the photograph */
.showcase { position: relative; height: 96svh; min-height: 640px; overflow: hidden; background: var(--night); }
.showcase > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transform-origin: 40% 60%; }
.motion .showcase.in > img { animation: drift 70s ease-in-out infinite alternate-reverse; }
.say { position: absolute; top: 10svh; inset-inline-start: 18%; width: min(36ch, 52vw); padding: 22px 26px; background: rgba(12, 16, 15, .72); font-size: var(--step-lead); line-height: 1.45; display: flex; flex-direction: column; gap: 14px; }
.say h2 { display: inline; font: 500 var(--step-lead)/1.45 var(--display); }
.say .p1 { display: inline; }
.slips { position: absolute; inset-inline: var(--margin); bottom: 0; display: flex; align-items: flex-end; gap: 12px; }
.slip { flex: 1 1 0; min-width: 0; background: var(--paper); color: var(--ink); padding: 26px 18px 40px; clip-path: var(--zig-top); display: flex; flex-direction: column; gap: 10px; line-height: 1.5; transform-origin: bottom center; color-scheme: light; }
.slip-head { font-size: var(--step-small); }
.slip-fig { display: block; font: 300 var(--step-lead)/1.2 var(--text); font-variant-numeric: tabular-nums lining-nums; margin-bottom: 4px; text-align: start; }
.slip:nth-child(1) { height: 40svh; }
.slip:nth-child(2) { height: 33svh; transform: rotate(-1.6deg); }
.slip:nth-child(3) { height: 44svh; }
.slip:nth-child(4) { height: 36svh; transform: rotate(1.2deg); }
.slip:nth-child(5) { height: 42svh; }
.slip:nth-child(6) { height: 34svh; transform: rotate(-1deg); }
.slip-head { font-weight: 500; }
.slip-rule { color: var(--ink-soft); overflow: hidden; white-space: nowrap; font-size: var(--step-small); }
.motion .slips .slip { opacity: 0; translate: 0 48px; transition: opacity .7s var(--ease), translate .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.motion .showcase.in .slip { opacity: 1; translate: 0 0; }

/* the itinerary: how an issue is made, printed on a slip */
.how-text { grid-column: 8 / 13; grid-row: 1; display: flex; flex-direction: column; gap: 22px; align-self: start; }
.how-text p { max-width: 34ch; }
.receipt { grid-column: 1 / 7; grid-row: 1; justify-self: start; width: min(100%, 620px); background: var(--paper); color: var(--ink); padding: 28px 28px 52px; clip-path: var(--zig-bottom); font-variant-numeric: tabular-nums lining-nums; color-scheme: light; }
.receipt h3 { margin-top: 28px; }
.receipt h3:first-child { margin-top: 0; }
.receipt dl { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.line { display: flex; align-items: baseline; gap: 10px; }
.line dt { flex: 0 1 auto; }
.dots { flex: 1 1 24px; min-width: 24px; border-bottom: 4px dotted var(--ink-soft); transform: translateY(-.32em); }
.line dd { flex: none; text-align: end; white-space: nowrap; }
.total { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; margin: 28px -28px 0; padding: 8px 28px; background: var(--ink); color: var(--paper); font-weight: 500; }

/* the reply card: the live check, lying on the page */
.reply { position: relative; overflow: hidden; padding-top: 48px; }
.reply .grid { min-height: 66svh; align-items: end; }
.reply-side { grid-column: 1 / 5; align-self: end; margin-bottom: 140px; font-size: var(--step-lead); line-height: 1.5; max-width: 30ch; }
.reply-card { grid-column: 6 / 13; justify-self: center; width: min(44vw, 680px); aspect-ratio: 7 / 5; margin-bottom: -84px; padding: 48px 48px 128px; background: var(--paper); color: var(--ink); transform: rotate(2deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; color-scheme: light; transition: transform .6s var(--ease); }
[dir='ltr'] .reply-card { transform: rotate(-2deg); }
.reply-card:focus-within { transform: rotate(.6deg); }
[dir='ltr'] .reply-card:focus-within { transform: rotate(-.6deg); }
.reply-card h2 { font-size: var(--step-lead); line-height: 1.4; }
.reply-card p { max-width: 40ch; }
.field { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: start; }
.field input { width: 100%; min-height: 52px; padding: 12px 16px; background: var(--paper-2); color: var(--ink); border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; font-size: var(--step-body); direction: ltr; text-align: left; }
.field input::placeholder { color: var(--ink-soft); }
.field input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.reply-card .btn { min-height: 56px; }

/* the back of the card: the footer, laid out as the back of a postcard */
.back { padding: var(--section) var(--margin) 0; overflow: hidden; }
.postcard { position: relative; width: min(100%, 1180px); margin: 0 auto; background: var(--paper); color: var(--ink); padding: 72px clamp(24px, 5vw, 72px) 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 96px); color-scheme: light; }
.scallops { position: absolute; inset-inline: 0; top: 0; display: flex; translate: 0 -50%; }
.scallops i { flex: 1 1 0; aspect-ratio: 1; border-radius: 50%; background: var(--paper); }
.scallops i:nth-child(n+25) { display: none; }
.pc-msg { display: flex; flex-direction: column; gap: 14px; }
.pc-msg .sign { font: 400 var(--step-lead)/1.4 var(--display); }
.pc-addr { position: relative; display: flex; flex-direction: column; gap: 22px; padding-top: 4px; }
.stamp { align-self: flex-end; width: 88px; padding: 6px; background: var(--paper-2); }
.stamp img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.addr { display: flex; flex-direction: column; gap: 12px; font-size: var(--step-body); }
.imprint { grid-column: 1 / -1; justify-self: center; max-width: 72ch; text-align: center; font-size: var(--step-small); color: var(--ink-soft); padding-top: 24px; }

/* pages inside the card */
.rows { display: flex; flex-direction: column; }
.rows li { max-width: none; }
.row-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; padding: 14px 14px; margin-inline: -14px; text-decoration: none; transition: background-color .2s var(--ease); }
.row-link:hover { background: var(--paper-2); }
.row-link:hover .row-title { text-decoration: underline; text-underline-offset: .3em; }
.row-title { font-weight: 500; }
.row-meta { grid-column: 1; }
.row-fig { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 300 var(--step-lead)/1 var(--text); font-variant-numeric: tabular-nums lining-nums; direction: ltr; }
.states { display: flex; flex-direction: column; gap: 6px; }
.states a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding: 10px 0; text-decoration: none; }
.states .who { font: 400 var(--step-head)/1.25 var(--display); transition: translate .3s var(--ease); }
.states a:hover .who { translate: -6px 0; }
[dir='ltr'] .states a:hover .who { translate: 6px 0; }
.states bdi { color: var(--ink-soft); font-size: var(--step-body); }
.levels { display: flex; flex-direction: column; gap: 8px; }
.levels li { display: flex; align-items: baseline; gap: 10px; }
.mark { width: 12px; height: 12px; flex: none; translate: 0 1px; }
.big-fig { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.big-fig .fig { font-size: var(--step-head); }
.suffixes { display: flex; flex-direction: column; gap: 6px; }
.suffixes li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.downloads { display: flex; flex-direction: column; gap: 8px; }

/* the live check result, printed as a reply slip */
.check-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.status { min-height: 1.6em; }
.status.error { font-weight: 500; }
.result:empty { display: none; }
.result { background: var(--paper-2); padding: 28px 28px 48px; clip-path: var(--zig-bottom); display: flex; flex-direction: column; gap: 12px; }
.result h2 { font-size: var(--step-lead); line-height: 1.3; }
.result h3 { margin-top: 14px; }
.res { display: flex; flex-direction: column; gap: 8px; }
.res li { display: flex; align-items: baseline; gap: 10px; }
.res .what { flex: 0 1 auto; }
.res .lvl { flex: none; text-align: end; max-width: 55%; }

/* ---------- entrances ---------- */
.motion [data-rise] { opacity: 0; translate: 0 26px; transition: opacity .7s var(--ease), translate .8s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.motion .in [data-rise], .motion [data-rise].in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .motion [data-rise], .motion .slips .slip { opacity: 1; translate: none; }
}

/* ---------- narrower screens ---------- */
@media (max-width: 1100px) {
  .intro-top h2 { grid-column: 1 / 8; }
  .intro-top .note { grid-column: 8 / 13; }
  .receipt { grid-column: 1 / 8; }
  .how-text { grid-column: 8 / 13; }
}
@media (max-width: 1100px) {
  .showcase { height: auto; min-height: 0; padding: 72px var(--margin) 0; display: flex; flex-direction: column; gap: 48px; }
  .say { position: relative; top: 0; inset-inline: auto; width: min(100%, 40ch); }
  .slips { position: relative; inset-inline: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; margin-bottom: -40px; }
  .slip { height: auto !important; padding-bottom: 32px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .ledger-head { grid-column: 1 / 13; position: static; }
  .ledger-body { grid-column: 1 / 13; margin-top: 104px; }
  .figures { gap: 40px; }
  .trend-head { grid-column: 1 / 5; }
  .trend { grid-column: 5 / 13; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .night { order: -1; position: relative; top: 0; height: 48svh; }
  .page .night { height: 30svh; }
  .card { margin-top: -24px; position: relative; z-index: 1; }
  .home .card, .page .card { min-height: 0; }
  .night figcaption { inset-block-end: auto; inset-block-start: 12px; }
  .scale { height: 40px; }
  .scale i { height: 16px; }
  .scale i:nth-child(4n+1) { height: 32px; }
  .scale i:nth-child(2n) { display: none; }
  .card-body { padding: 28px 22px 32px; gap: 18px; }
  .proof-card { width: min(92vw, 640px); padding: 28px 28px 220px; transform: rotate(-1deg); }
  [dir='ltr'] .proof-card { transform: rotate(1deg); }
  .reply .grid { grid-template-columns: minmax(0, 1fr); align-items: start; min-height: 0; }
  .reply-side, .reply-card { grid-column: 1 / -1; }
  .reply-side { margin-bottom: 40px; }
  .reply-card { width: min(90vw, 560px); aspect-ratio: auto; transform: rotate(1deg); padding: 36px 24px 96px; }
  [dir='ltr'] .reply-card { transform: rotate(-1deg); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; }
  .intro-top { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; row-gap: 32px; column-gap: 20px; margin-top: 56px; }
  .intro .plate, .intro .plate-note { margin-top: 40px; }
  .ledger-head { position: static; gap: 16px; }
  .ledger-body { margin-top: 80px; }
  .figures { gap: 72px; }
  .row { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding-block: 6px; }
  .fig { font-size: 15vw; }
  .cap .what { max-width: none; }
  .wk th:nth-child(n+4), .wk td:nth-child(n+4) { display: none; }
  .trend-head, .trend { margin-top: 56px; }
  .trend { margin-top: 20px; }
  .showcase { padding-top: 64px; gap: 40px; }
  .say { width: auto; }
  .slips { grid-template-columns: minmax(0, 1fr); }
  .slip:nth-child(odd) { transform: rotate(.8deg); }
  .slip:nth-child(even) { transform: rotate(-.8deg); }
  .how-text, .receipt { grid-row: auto; }
  .how-text { order: -1; margin-bottom: 36px; }
  .receipt { width: 100%; padding-inline: 20px; }
  .line { flex-wrap: wrap; row-gap: 2px; }
  .line dt { flex-basis: 100%; }
  .res li { flex-wrap: wrap; row-gap: 2px; }
  .res .what { flex-basis: calc(100% - 22px); }
  .res .dots { margin-inline-start: 22px; }
  .res .lvl { max-width: none; }
  .card-head .lang { margin-inline-start: auto; }
  .total { margin-inline: -20px; padding-inline: 20px; }

  .postcard { grid-template-columns: minmax(0, 1fr); padding-top: 52px; }
  .scallops i:nth-child(n+13) { display: none; }
  .stamp { position: absolute; top: -8px; inset-inline-end: 0; width: 64px; }
  .pc-msg { padding-inline-end: 76px; }
  .card-head { padding-inline: 22px; }
  .sheet { padding-inline: 22px; }
}

@media print {
  body { background: #fff; color: #000; }
  .night, .showcase, .reply, .skip, .card-foot, .card-head nav, .lang, .cite, .tabs, .scale, .scallops { display: none !important; }
  .split { display: block; padding: 0; }
  .card, .postcard, .proof-card, .receipt { background: #fff; transform: none; clip-path: none; }
  .band { padding-block: 24px; }
  .ledger-head { position: static; }
}
