/* Rival Readout. A field memo on paper: warm stock, black ink, one red pencil. */
@font-face { font-family: Fraunces; src: url(/fonts/fraunces.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Fraunces; src: url(/fonts/fraunces-italic.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/fonts/plex-mono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(/fonts/plex-mono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f1ece0;
  --sheet: #fbf8f1;
  --ink: #16130e;
  --soft: #5d564a;
  --rule: #cfc6b3;
  --red: #c8371b;
  --serif: Fraunces, 'Iowan Old Style', Georgia, serif;
  --mono: 'Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--serif);
  font-optical-sizing: auto;
  /* Ledger ruling, faint enough to read as paper and not as a pattern. */
  background:
    linear-gradient(to right, transparent 0, transparent calc(2.25rem - 1px), rgb(200 55 27 / 0.22) calc(2.25rem - 1px), rgb(200 55 27 / 0.22) 2.25rem, transparent 2.25rem),
    repeating-linear-gradient(to bottom, transparent 0, transparent 2.0rem, rgb(22 19 14 / 0.05) 2.0rem, rgb(22 19 14 / 0.05) calc(2.0rem + 1px)),
    var(--paper);
}
a { color: inherit; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 0 3.5rem; }
.label { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); margin: 0; }
.label b { color: var(--red); font-weight: 500; }

header.top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 1.75rem; }
.mark { font: 600 1.125rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; }
.mark i { color: var(--red); font-style: italic; font-weight: 500; }
header.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem 1.25rem; }
header.top nav a { text-decoration: none; color: var(--ink); }
header.top nav a:hover { color: var(--red); }
.more { font: 500 0.8125rem/1.4 var(--mono); margin: 1.25rem 0 0; }
.intro { padding-top: 3.5rem; }

/* The guide: one column, numbered checks. */
.guide h1 { font-size: clamp(2.25rem, 6vw, 4rem); max-width: 18ch; }
.guide .lede { max-width: 38rem; }
.checks { list-style: none; margin: 0 0 2rem; padding: 0; max-width: 44rem; counter-reset: check; }
.checks li { counter-increment: check; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.checks li::before { content: '0' counter(check); display: block; font: 500 0.8125rem/1 var(--mono); color: var(--red); margin-bottom: 0.6rem; }
.checks h2 { font: 600 1.375rem/1.2 var(--serif); letter-spacing: -0.015em; margin: 0 0 0.5rem; }
.checks p { margin: 0; color: var(--soft); }
.after { max-width: 54rem; padding-bottom: 5rem; }
.after p:first-child { margin: 0 0 1.75rem; font-size: 1.1875rem; }

.hero { display: grid; gap: 3rem; padding: 4.5rem 0 5rem; align-items: start; }
h1 { font: 560 clamp(2.75rem, 7.4vw, 5.75rem)/0.96 var(--serif); letter-spacing: -0.035em; margin: 1.25rem 0 1.75rem; text-wrap: balance; }
h1 em { font-style: italic; font-weight: 420; color: var(--red); }
.lede { font-size: 1.3125rem; line-height: 1.5; max-width: 31rem; margin: 0 0 2.25rem; }
.price { font: 500 0.9375rem/1.55 var(--mono); max-width: 27rem; margin: 1.5rem 0 0; color: var(--soft); }
.price strong { color: var(--ink); font-weight: 500; }
.buy {
  display: inline-block; font: 500 1rem/1 var(--mono); letter-spacing: 0.02em;
  padding: 1.1rem 1.6rem; background: var(--ink); color: var(--sheet); text-decoration: none;
  box-shadow: 6px 6px 0 var(--red); transition: transform 120ms, box-shadow 120ms;
}
.buy:hover { color: var(--sheet); transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--red); }

/* The sample sheet: the product itself, shown at the size it is read. */
.sheet {
  position: relative; background: var(--sheet); border: 1px solid var(--rule);
  padding: 2rem 1.75rem 1.5rem; transform: rotate(-1.1deg);
  box-shadow: 0 1px 0 #fff inset, 0 24px 48px -28px rgb(22 19 14 / 0.55), 10px 10px 0 -1px var(--paper), 10px 10px 0 0 var(--rule);
}
.sheet > .label { padding-right: 5.5rem; }
.sheet h2 { font: 600 1.5rem/1.15 var(--serif); letter-spacing: -0.02em; margin: 0.5rem 0 0.4rem; }
.sheet p { margin: 0 0 1rem; font-size: 0.9375rem; }
.sheet h3 { font: 500 0.6875rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin: 1.25rem 0 0.4rem; }
.sheet ul { margin: 0; padding-left: 1.1rem; font-size: 0.9375rem; }
.sheet li { margin-bottom: 0.3rem; }
.sheet table { font-size: 0.8125rem; }
.stamp {
  position: absolute; top: 1.1rem; right: 1.1rem; transform: rotate(7deg);
  font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--red); border: 2px solid var(--red); padding: 0.4rem 0.55rem; opacity: 0.85;
}

table { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 0.875rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }

section { padding: 4rem 0; border-top: 1px solid var(--ink); }
section > h2 { font: 560 clamp(1.875rem, 4vw, 2.75rem)/1.05 var(--serif); letter-spacing: -0.03em; margin: 0.75rem 0 2.25rem; max-width: 20ch; text-wrap: balance; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: '0' counter(step); display: block; font: 500 0.8125rem/1 var(--mono); color: var(--red); margin-bottom: 0.75rem; }
.steps strong { display: block; font: 600 1.25rem/1.2 var(--serif); margin-bottom: 0.4rem; }
.steps p, .parts dd { margin: 0; color: var(--soft); }
.parts { margin: 0; display: grid; gap: 0 3rem; }
.parts div { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; }
.parts dt { font: 600 1.0625rem/1.4 var(--serif); }
.limits { max-width: 38rem; font-size: 1.1875rem; }
.limits p { margin: 0 0 1rem; }
details { border-bottom: 1px solid var(--rule); max-width: 44rem; }
summary { cursor: pointer; padding: 1.1rem 0; font: 600 1.125rem/1.3 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 400 1.25rem/1 var(--mono); color: var(--red); }
details[open] summary::after { content: '\2212'; }
details p { margin: 0 0 1.25rem; color: var(--soft); max-width: 38rem; }
.close { text-align: left; }
.close h2 { max-width: 16ch; }

footer { border-top: 1px solid var(--ink); padding: 2.5rem 0 4rem; }
form { max-width: 30rem; }
label { display: block; font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
textarea { display: block; width: 100%; margin: 0.6rem 0; padding: 0.75rem; font: 400 1rem/1.5 var(--serif); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 0; resize: vertical; }
button { font: 500 0.875rem/1 var(--mono); padding: 0.75rem 1.1rem; background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 0; cursor: pointer; }
button:hover { background: var(--ink); color: var(--sheet); }

/* Short pages: thanks, not found, and the states of an order. */
.note { padding: 6rem 0 5rem; max-width: 40rem; }
.note h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
.note p { font-size: 1.1875rem; }

/* A delivered readout: one sheet, full width, made to be printed. */
.readout { background: var(--sheet); border: 1px solid var(--rule); padding: 2.5rem clamp(1.25rem, 4vw, 3.5rem) 3rem; margin: 2.5rem 0 3rem; max-width: 54rem; box-shadow: 0 24px 48px -32px rgb(22 19 14 / 0.5); }
.readout h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 1rem; }
.readout h1 + p { font-size: 1.25rem; margin: 0 0 1rem; }
.readout h2 { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin: 2.5rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--ink); }
.readout ul { margin: 0; padding-left: 1.2rem; }
.readout li { margin-bottom: 0.5rem; overflow-wrap: anywhere; }
.readout p { margin: 0 0 1rem; }
.readout p.say { font-style: italic; font-weight: 500; margin-bottom: 0.25rem; }
.scroll { overflow-x: auto; }

@media (min-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; padding-top: 6rem; }
  .sheet { margin-top: 2.5rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .parts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 34rem) {
  .wrap { padding-left: 3rem; }
  .parts div { grid-template-columns: 1fr; gap: 0.2rem; }
}
@media (prefers-reduced-motion: reduce) { .buy { transition: none; } }
@media print {
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  header.top, footer, .noprint { display: none; }
  .readout { border: 0; box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .readout h2 { break-after: avoid; }
}
