/*
  Quire: e-reader product page (Screenery template)
  The page is an e-paper display: sixteen warm greys and nothing else, no gradients, no shadows (only the device
  casts one), hairline rules, dithered fills, EB Garamond for reading and Mona Sans for the instrument labels.

  Contents
   1. Tokens (the 16 grey levels, type, space, shape, motion)
   2. Base and browser surfaces
   3. Components: buttons, fields, select, sliders, segmented control, stepper, checks
   4. Header and the refresh flash
   5. Hero: intro, the device, the screen and reader, the settings sheet, highlights and notes
   6. Hardware: exploded stack and spec table
   7. Principles: home screen and rules
   8. Compare table
   9. Accessories
  10. Buy box: mini device, choices, summary, form, states
  11. Questions and footer
  12. Motion and reduced motion
  13. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Sixteen grey levels, the panel's own count. Same faint warm hue throughout (e-paper is never blue-white). */
  --g0:  oklch(0.20 0.004 85);   /* ink */
  --g1:  oklch(0.25 0.004 85);
  --g2:  oklch(0.30 0.004 85);
  --g3:  oklch(0.35 0.004 85);
  --g4:  oklch(0.40 0.004 85);   /* secondary text, safe on every light grey */
  --g5:  oklch(0.45 0.004 85);
  --g6:  oklch(0.50 0.004 85);
  --g7:  oklch(0.55 0.004 85);
  --g8:  oklch(0.60 0.004 85);
  --g9:  oklch(0.65 0.004 85);   /* rules on paper */
  --g10: oklch(0.70 0.004 85);
  --g11: oklch(0.75 0.004 85);   /* secondary text on ink */
  --g12: oklch(0.80 0.004 85);   /* highlight on the screen */
  --g13: oklch(0.85 0.004 85);   /* unlit screen, bands */
  --g14: oklch(0.895 0.004 85);  /* page ground */
  --g15: oklch(0.94 0.004 85);   /* lit paper, fields */

  /* The single non-grey: the front light's warmth, only ever multiplied onto the drawn screen */
  --lamp: oklch(0.84 0.10 72);

  /* Roles */
  --ground: var(--g14);
  --band: var(--g13);
  --paper: var(--g15);
  --ink: var(--g0);
  --ink-2: var(--g4);
  --rule: var(--g9);
  --rule-strong: var(--g1);
  --night: var(--g1);
  --night-ink: var(--g15);
  --night-ink-2: var(--g11);

  /* Type */
  --serif: "EB Garamond", "Garamond", "Times New Roman", serif;
  --sans: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-md: 1.0625rem;   /* 17 */
  --fs-lg: 1.3125rem;   /* 21, serif body */
  --fs-xl: 1.75rem;
  --fs-h2: clamp(2rem, 1.2rem + 2.6vw, 3.4rem);
  --fs-h1: clamp(2.6rem, 1.4rem + 3.6vw, 4.6rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 120px;
  --gutter: clamp(16px, 3.6vw, 56px);
  --wrap: 1360px;

  /* Shape */
  --r-1: 3px;
  --r-2: 6px;
  --hair: 1px;
  --line: 1.5px;

  /* The device is the only object that casts a shadow */
  --device-shadow: 0 2px 2px oklch(0.2 0.004 85 / 0.18), 0 26px 44px -18px oklch(0.2 0.004 85 / 0.5);

  /* Motion: e-ink does not ease, but the page around it may, briefly */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t-mid: 260ms;
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scrollbar-color: var(--g3) var(--g13); accent-color: var(--g1); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--fs-md)/1.55 var(--sans);
  font-optical-sizing: auto;
  caret-color: var(--g0);
  overflow-x: clip;
}
::selection { background: var(--g1); color: var(--g15); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--g13); }
::-webkit-scrollbar-thumb { background: var(--g4); border: 3px solid var(--g13); }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 500; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.015em; line-height: 1.04; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--g0); outline-offset: 3px; }
.night :focus-visible, .foot :focus-visible { outline-color: var(--g15); }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Mona Sans draws tabular zeros slashed: tabular figures are kept for read-outs that change, not for static tables */
output, .tnum { font-variant-numeric: tabular-nums; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; color: var(--g1); }
.defs pattern path { fill: var(--g1); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -60px; z-index: 50; background: var(--g0); color: var(--g15); padding: var(--s-3) var(--s-4); }
.skip:focus { top: var(--s-3); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; flex: none; }
[hidden] { display: none !important; }

.section { padding: var(--s-9) var(--gutter); border-top: var(--hair) solid var(--rule); }
.section > * { max-width: var(--wrap); margin-inline: auto; }
.section__head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s-5) var(--s-8); align-items: end; margin-bottom: var(--s-8); }
.section__head h2 { font-size: var(--fs-h2); }
.section__head p { max-width: 58ch; color: var(--ink-2); }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5);
  border: var(--line) solid var(--g1); border-radius: var(--r-1);
  background: transparent; color: var(--g0);
  font: 600 var(--fs-sm)/1 var(--sans); font-stretch: 108%; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) linear, color var(--t-fast) linear;
}
.btn:hover { text-decoration: none; background: var(--g13); }
.btn:active { background: var(--g12); }
.btn--ink { background: var(--g1); color: var(--g15); }
.btn--ink:hover { background: var(--g0); }
.btn--ink:active { background: var(--g3); }
.btn--plain { border-color: transparent; }
.btn--small { min-height: 44px; padding: 0 var(--s-4); font-size: var(--fs-xs); }
.btn--sq { width: 44px; padding: 0; }
.btn--wide { width: 100%; min-height: 54px; font-size: var(--fs-md); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; color: var(--g5); border-color: var(--g8); background: transparent; }
.btn--ink[disabled] { background: var(--g5); color: var(--g15); border-color: var(--g5); }

.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-xs); font-weight: 600; font-stretch: 108%; }
.field__opt { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea, .select select {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--paper); border: var(--line) solid var(--g3); border-radius: var(--r-1);
  font-size: var(--fs-md);
}
.field textarea { resize: vertical; min-height: 84px; font-family: var(--serif); font-size: var(--fs-lg); line-height: 1.35; }
.field input:focus-visible, .field textarea:focus-visible, .select select:focus-visible { outline-offset: 1px; border-color: var(--g0); }
.field [aria-invalid="true"] { border-color: var(--g0); border-width: 2px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' fill='%23302f2c' fill-opacity='.35'/%3E%3C/svg%3E"); }
.field__err { min-height: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--g0); }
.field__err:not(:empty)::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--g0); vertical-align: 1px; }
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 40px; cursor: pointer; }
.select .icon { position: absolute; right: 12px; top: 50%; translate: 0 -50%; pointer-events: none; }

/* Range sliders drawn as a ruled scale */
.slider { display: grid; grid-template-columns: 20px 6.2em 1fr 4.4em; align-items: center; gap: var(--s-3); min-height: 44px; }
.slider__name { font-size: var(--fs-sm); }
.slider output { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  /* a ruled scale: ten ticks over a 2px base line, drawn as one SVG */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M.5 0v10M10.5 2v8M20.5 2v8M30.5 2v8M40.5 2v8M50.5 0v10M60.5 2v8M70.5 2v8M80.5 2v8M90.5 2v8M99.5 0v10' stroke='%23565552' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 9h100' stroke='%23302f2c' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
input[type="range"]::-moz-range-track { height: 2px; background: var(--g1); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 26px; margin-top: -9px; background: var(--g15); border: 2px solid var(--g0); border-radius: 2px; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 22px; background: var(--g15); border: 2px solid var(--g0); border-radius: 2px; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--g0); outline-offset: 2px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--g0); outline-offset: 2px; }

/* Segmented control (radio row) */
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg__row { display: flex; border: var(--line) solid var(--g1); border-radius: var(--r-1); }
.seg__row label { flex: 1; position: relative; }
.seg__row label + label { border-left: var(--hair) solid var(--g1); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 42px; padding: 0 var(--s-3); font-size: var(--fs-xs); font-weight: 600; }
.seg input:checked + span { background: var(--g1); color: var(--g15); }
.seg input:focus-visible + span { outline: 2px solid var(--g0); outline-offset: 2px; }

.stepper { display: flex; align-items: center; gap: var(--s-2); }
.stepper__val { min-width: 4.6em; text-align: center; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }

.check { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: var(--s-3); min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; }
.check__price { color: var(--ink-2); }

/* ---------- 4. Header and the refresh flash ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s-6);
  padding: var(--s-3) var(--gutter);
  background: var(--ground); border-bottom: var(--hair) solid var(--rule);
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.mark__glyph { width: 20px; height: 26px; fill: var(--g1); }
.mark__screen, .mark__btn { fill: var(--g14); }
.mark__word { font: 500 1.75rem/1 var(--serif); letter-spacing: -0.01em; }
.nav { display: flex; gap: var(--s-1); margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3); font-size: var(--fs-sm); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.top__buy { padding: 0 var(--s-4); }
.top__price { font-weight: 400; }

/* One dark frame, then the page settles: the e-ink full refresh */
.refresh { position: fixed; inset: 0; z-index: 90; background: var(--g1); opacity: 0; pointer-events: none; }

/* ---------- 5. Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(300px, 380px);
  grid-template-areas: "intro device sheet";
  gap: var(--s-7);
  align-items: start;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s-7) var(--gutter) var(--s-9);
}
.hero__intro { grid-area: intro; padding-top: var(--s-6); }
.hero h1 { font-size: var(--fs-h1); font-weight: 500; max-width: 11ch; }
.hero__lede { margin-top: var(--s-5); max-width: 40ch; font: 400 var(--fs-lg)/1.45 var(--serif); }
.hero__facts { display: flex; flex-wrap: wrap; margin-top: var(--s-6); border-top: var(--line) solid var(--g1); border-bottom: var(--hair) solid var(--rule); }
.hero__facts span { flex: 1 1 auto; padding: var(--s-3) var(--s-3) var(--s-3) 0; font-size: var(--fs-sm); font-weight: 600; font-stretch: 112%; white-space: nowrap; }
.hero__facts span + span { padding-left: var(--s-3); border-left: var(--hair) solid var(--rule); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

/* The device: slate aluminium, a 3:4 screen, a grip with two page keys */
.device-wrap { grid-area: device; width: clamp(300px, 31vw, 450px); }
.device {
  --rm: 22px;   /* reader margin, set by the Margins control */
  --rfs: 17px;  /* reader font size, set by the Type size control */
  display: grid; grid-template-columns: 1fr 15%;
  padding: 4.5% 0 4.5% 4.5%;
  background: var(--g2);
  border-radius: 20px;
  box-shadow: var(--device-shadow), inset 0 0 0 1px var(--g4);
}
.device__screen {
  --lit: 0.35; --warm: 0.3;
  position: relative; display: flex; flex-direction: column;
  aspect-ratio: 3 / 4;
  background: color-mix(in oklch, var(--g15) calc(var(--lit) * 100%), var(--g13));
  overflow: hidden;
  outline: 1px solid var(--g0); outline-offset: -1px;
  color: var(--g0);
  isolation: isolate;
}
.screen__light { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: var(--lamp); mix-blend-mode: multiply; opacity: calc(var(--warm) * (0.15 + var(--lit) * 0.45)); }
.screen__status, .screen__foot {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
  padding: 7px 12px; font-size: 12px; font-weight: 500; font-stretch: 100%; font-variant-numeric: tabular-nums; color: var(--g1);
}
.screen__status { border-bottom: var(--hair) solid var(--g8); }
.screen__foot { border-top: var(--hair) solid var(--g8); }
.screen__status > span:first-child { font-family: var(--serif); font-style: italic; font-size: 12.5px; }
.screen__batt { display: inline-flex; align-items: center; gap: 5px; }
.screen__batt svg { width: 20px; height: 10px; fill: none; stroke: var(--g1); stroke-width: 1.2; }
.screen__batt .fill { fill: var(--g1); stroke: none; }

.reader { position: relative; flex: 1; overflow: hidden; touch-action: pan-y; cursor: default; container-type: inline-size; }
/* A narrow page cannot justify well: rag it, like the device does on its smallest type column */
@container (max-width: 330px) { .reader .reader__flow { text-align: left; } }
.reader:focus-visible { outline: 2px dashed var(--g0); outline-offset: -4px; }
.reader__flow {
  position: absolute; top: 14px; bottom: 10px; left: var(--rm); right: var(--rm);
  column-count: 1; column-gap: calc(var(--rm) * 2); column-fill: auto;
  font: 400 var(--rfs)/1.42 var(--serif);
  hyphens: auto; -webkit-hyphens: auto;
  text-align: justify;
  font-variant-numeric: oldstyle-nums;
}
.reader__flow p { margin: 0; text-indent: 1.3em; orphans: 2; widows: 2; }
.reader__flow .chapter + p, .reader__flow p:first-of-type { text-indent: 0; }
.chapter { break-inside: avoid; text-align: center; margin-bottom: 0.9em; }
.chapter__no { font-size: 0.75em; letter-spacing: 0.18em; text-transform: uppercase; text-indent: 0 !important; }
.chapter__title { margin-top: 0.15em; font: 500 1.7em/1.05 var(--serif); letter-spacing: -0.01em; }
.chapter__plate { margin: 0.7em auto 0; width: 82%; }
.chapter__plate canvas { width: 100%; height: auto; image-rendering: pixelated; }
.sample-end { break-before: column; padding-top: 2.5em; text-align: center; font-size: 0.92em; }
.sample-end p { text-indent: 0 !important; text-align: center; }
.sample-end p + p { margin-top: 0.8em; }
.sample-end__title { font-size: 1.25em; font-style: italic; }
.reader__sentinel { display: inline-block; width: 1px; height: 1px; }

/* Sentences, wrapped by the script for the highlight flow */
.s { border-radius: 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.s.is-hl { background: var(--g12); box-shadow: 0 1.5px 0 var(--g0); }
.s.has-note { box-shadow: 0 2px 0 var(--g0); }
.s.is-cand { outline: 1.5px dashed var(--g0); outline-offset: 1px; background: var(--g15); }
.reader.is-picking .s { cursor: pointer; }

/* E-ink artefacts: the ghost of the previous page, and the one-frame flash */
.screen__ghost, .screen__flash { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.screen__ghost { opacity: 0; }
.screen__ghost .reader__flow { color: var(--g0); }
.screen__flash { background: var(--g0); opacity: 0; z-index: 5; }

.device__grip { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.device__key {
  width: 46%; min-width: 30px; height: 64px; padding: 0;
  border: 0; border-radius: 6px; cursor: pointer;
  background: var(--g3);
  box-shadow: inset 0 0 0 1px var(--g5), 0 1px 0 var(--g1);
}
.device__key span { display: block; width: 40%; height: 2px; margin: auto; background: var(--g6); }
.device__key:hover { background: var(--g4); }
.device__key:active { background: var(--g2); box-shadow: inset 0 0 0 1px var(--g4); }
.device__key:focus-visible { outline-color: var(--g15); outline-offset: 2px; }
.device__logo { position: absolute; bottom: 6%; font: 500 13px/1 var(--serif); color: var(--g10); letter-spacing: 0.04em; }
.device-wrap__note { min-height: 1.5em; margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--ink-2); text-align: center; }

/* The settings sheet */
.sheet { grid-area: sheet; display: grid; gap: 0; background: var(--paper); border: var(--line) solid var(--g1); border-radius: var(--r-2); }
.sheet__group { padding: var(--s-4) var(--s-5); }
.sheet__group + .sheet__group { border-top: var(--hair) solid var(--rule); }
.sheet__group--row { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
.sheet__group--row .stepper { justify-content: space-between; }
.sheet__label { margin-bottom: var(--s-2); padding: 0; font-size: var(--fs-xs); font-weight: 700; font-stretch: 112%; letter-spacing: 0.02em; }
.sheet__hint { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--ink-2); }
.turn { display: flex; align-items: center; gap: var(--s-3); }
.turn__count { flex: 1; text-align: center; font: 500 var(--fs-xl)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }

.notes__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); }
.notes__head .sheet__label { margin: 0; }
.pick, .note-form { margin: var(--s-4) calc(var(--s-5) * -1) 0; padding: var(--s-4) var(--s-5); background: var(--g14); border-block: var(--hair) solid var(--rule); }
.pick__msg { font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.pick__row, .note-form__row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.note-form { display: grid; gap: var(--s-3); }
.note-form__quote { margin: 0; padding-left: var(--s-3); border-left: 0; font: italic 400 var(--fs-md)/1.4 var(--serif); position: relative; }
.note-form__quote::before { content: ""; position: absolute; left: 0; top: 0.3em; bottom: 0.3em; width: 4px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%23302f2c'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23302f2c'/%3E%3C/svg%3E"); }
.note-form__meta { display: flex; justify-content: space-between; gap: var(--s-3); }
.note-form__count { font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-form__count.is-over { color: var(--g0); font-weight: 700; }
.notes__list { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.notes__list li { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s-3); padding: var(--s-3) 0; border-top: var(--hair) solid var(--rule); }
.notes__q { font: italic 400 var(--fs-md)/1.35 var(--serif); }
.notes__n { grid-column: 1; font-size: var(--fs-sm); }
.notes__meta { grid-column: 1; font-size: var(--fs-xs); color: var(--ink-2); }
.notes__go { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.notes__empty { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--ink-2); }

/* No script: the reader scrolls instead of paging, the sheet explains itself */
.no-js .reader { overflow: auto; }
.no-js .reader__flow { position: static; column-count: auto; padding: 14px 22px; }
.no-js .sheet { opacity: 1; }
.no-js .sheet button, .no-js .sheet input { pointer-events: none; }

/* ---------- 6. Hardware ---------- */
.hardware__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.stack__draw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); }
.stack svg { width: 100%; height: auto; }
.stack__key { position: relative; list-style: none; margin: 0; padding: 0; }
.stack__key li { position: absolute; left: 0; right: 0; top: var(--y); translate: 0 -50%; padding-left: 40px; font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; }
.stack__key li::before { content: ""; position: absolute; left: 4px; top: 0.65em; width: 28px; border-top: var(--hair) solid var(--g1); }
.ink-line { stroke: var(--g1); stroke-width: 1.5; stroke-linejoin: round; }
.ink-line.thick { stroke-width: 5; stroke-linecap: round; }
.paper-line { stroke: var(--g15); stroke-width: 2; }
.stack__axis path { stroke: var(--g5); stroke-width: 1; fill: none; }
.stack figcaption, .home figcaption { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--ink-2); max-width: 52ch; }
.stack { margin: 0; }

.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.spec-table th, .spec-table td { padding: 11px var(--s-3) 11px 0; text-align: left; border-bottom: var(--hair) solid var(--rule); vertical-align: top; }
.spec-table thead th { font: 500 var(--fs-xl)/1 var(--serif); border-bottom: var(--line) solid var(--g1); padding-bottom: var(--s-3); }
.spec-table tbody th { font-weight: 600; width: 30%; }
.specs__note { margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--ink-2); max-width: 62ch; }

/* ---------- 7. Principles (the dark inverted band: e-ink in night mode) ---------- */
.principles { background: var(--night); color: var(--night-ink); border-top: 0; }
.principles :focus-visible { outline-color: var(--g15); }
.principles__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-8); }
.principles h2 { font-size: var(--fs-h2); }
.principles__lead > p { margin-top: var(--s-5); max-width: 44ch; color: var(--night-ink-2); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-7); }
.rules li { padding: var(--s-5) 0 var(--s-6); border-top: var(--hair) solid var(--g5); }
.rules h3 { font: 500 var(--fs-xl)/1.15 var(--serif); }
.rules p { margin-top: var(--s-3); color: var(--night-ink-2); font-size: var(--fs-sm); max-width: 44ch; }

.home { margin: var(--s-7) 0 0; max-width: 340px; }
.home__screen { padding: var(--s-4); background: var(--g13); color: var(--g0); border: 10px solid var(--g3); border-radius: 12px; }
.home__bar { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; padding-bottom: 6px; border-bottom: var(--hair) solid var(--g8); }
.home__h { margin: var(--s-4) 0 var(--s-2); font: 500 var(--fs-md)/1 var(--serif); }
.home__books { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.home__books li { display: flex; gap: var(--s-3); align-items: center; font-size: 12px; }
.home__books b { display: block; font: 500 14px/1.2 var(--serif); }
.home__cover { width: 28px; height: 38px; border: 1px solid var(--g1); flex: none; }
.home__cover--a { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%23302f2c'/%3E%3C/svg%3E"); }
.home__cover--b { background: var(--g6); }
.home__cover--c { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%23302f2c'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23302f2c'/%3E%3C/svg%3E"); }
.home__shelf { display: flex; gap: 6px; }
.home__shelf span { flex: 1; aspect-ratio: 3 / 4; border: 1px solid var(--g1); background: var(--g15); }
.home__shelf span:nth-child(2n) { background: var(--g9); }
.home__shelf span:nth-child(3n) { background: var(--g4); }
.home figcaption { color: var(--night-ink-2); }

/* ---------- 8. Compare ---------- */
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: 4px; }
.cmp { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-sm); }
.cmp th, .cmp td { padding: 13px var(--s-4); text-align: left; border-bottom: var(--hair) solid var(--rule); }
.cmp thead th { font: 500 var(--fs-xl)/1.1 var(--serif); border-bottom: var(--line) solid var(--g1); }
.cmp tbody th { font-weight: 600; width: 22%; padding-left: 0; }
.cmp td { color: var(--g3); }
.cmp .cmp__us { background: var(--paper); color: var(--g0); font-weight: 600; border-left: var(--line) solid var(--g1); border-right: var(--line) solid var(--g1); }
.cmp thead .cmp__us { border-top: var(--line) solid var(--g1); }
.cmp tbody tr:last-child .cmp__us { border-bottom: var(--line) solid var(--g1); }

/* ---------- 9. Accessories: a catalogue page, one ruled row per item ---------- */
.acc { list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; }
.acc__item { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: var(--s-7); align-items: center; padding: var(--s-5) 0; border-top: var(--hair) solid var(--rule); }
.acc__item:last-child { border-bottom: var(--hair) solid var(--rule); }
.acc__art { width: 220px; height: auto; }
.acc__text h3 { font: 500 var(--fs-xl)/1.1 var(--serif); }
.acc__text p { margin-top: var(--s-2); color: var(--ink-2); max-width: 56ch; }
.acc__text .acc__price { color: var(--g0); font-weight: 600; }
.acc__add { min-width: 150px; }
.acc__add .acc__on { display: none; }
.acc__add[aria-pressed="true"] { background: var(--g1); color: var(--g15); }
.acc__add[aria-pressed="true"] .acc__on { display: inline; }
.acc__add[aria-pressed="true"] .acc__off { display: none; }

/* ---------- 10. Buy box ---------- */
.buy { background: var(--band); }
.buy__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: var(--s-8); align-items: start; }
.buy__show { position: sticky; top: 100px; }
.buy__show h2 { font-size: var(--fs-h2); }
.buy__sub { margin-top: var(--s-4); max-width: 44ch; color: var(--ink-2); }

.mini { margin: var(--s-7) 0 0; display: grid; justify-items: start; gap: var(--s-4); }
.mini__body {
  --case: var(--g2);
  display: grid; grid-template-columns: 1fr 14%;
  width: 290px; aspect-ratio: 133 / 176; padding: 5% 0 5% 5%;
  background: var(--case); border-radius: 14px; box-shadow: var(--device-shadow), inset 0 0 0 1px var(--g4);
  transition: width var(--t-mid) var(--ease-out);
}
.mini[data-size="large"] .mini__body { width: 397px; aspect-ratio: 182 / 229; }
.mini[data-colour="ash"] .mini__body { --case: var(--g7); box-shadow: var(--device-shadow), inset 0 0 0 1px var(--g8); }
.mini[data-colour="chalk"] .mini__body { --case: var(--g12); box-shadow: var(--device-shadow), inset 0 0 0 1px var(--g9); }
.mini__screen { background: var(--g13); box-shadow: inset 0 0 0 1px var(--g0); padding: 16% 12%; display: grid; align-content: start; gap: 7%; }
.mini__screen span { height: 3px; background: var(--g6); }
.mini__screen span:first-child { width: 50%; height: 6px; margin: 0 auto 6%; background: var(--g2); }
.mini__screen span:last-child { width: 60%; }
.mini__grip { display: grid; align-content: center; justify-items: center; gap: 10px; }
.mini__grip i { width: 40%; height: 34px; border-radius: 4px; background: color-mix(in oklch, var(--case), var(--g0) 18%); }
.mini figcaption { font-size: var(--fs-sm); color: var(--ink-2); }
.inbox { margin-top: var(--s-7); max-width: 420px; border-top: var(--line) solid var(--g1); }
.inbox__h { padding: var(--s-3) 0; font-size: var(--fs-xs); font-weight: 700; font-stretch: 112%; letter-spacing: 0.02em; }
.inbox ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--s-5); }
.inbox li { break-inside: avoid; padding: var(--s-2) 0; border-top: var(--hair) solid var(--rule); font-size: var(--fs-sm); }

.buy__form { display: grid; gap: var(--s-5); background: var(--paper); border: var(--line) solid var(--g1); border-radius: var(--r-2); padding: var(--s-6); }
.buy__form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.buy__form legend { padding: 0; margin-bottom: var(--s-3); font-size: var(--fs-xs); font-weight: 700; font-stretch: 112%; letter-spacing: 0.02em; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.choice legend { grid-column: 1 / -1; }
.choice__opt { position: relative; cursor: pointer; }
.choice__opt input, .swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__box { display: grid; gap: 4px; height: 100%; padding: var(--s-4); border: var(--line) solid var(--g8); border-radius: var(--r-1); font-size: var(--fs-xs); color: var(--ink-2); }
.choice__box b { font: 500 var(--fs-xl)/1 var(--serif); color: var(--g0); }
.choice__price { margin-top: var(--s-2); font-size: var(--fs-md); font-weight: 600; color: var(--g0); }
.choice__opt input:checked + .choice__box { border: 2px solid var(--g0); padding: calc(var(--s-4) - 0.5px); background: var(--g14); }
.choice__opt input:focus-visible + .choice__box, .swatch input:focus-visible ~ .swatch__chip { outline: 2px solid var(--g0); outline-offset: 3px; }

.swatches__row { display: flex; gap: var(--s-5); }
.swatches legend span { font-weight: 400; }
.swatch { position: relative; display: grid; justify-items: center; gap: 6px; cursor: pointer; min-width: 52px; }
.swatch__chip { width: 40px; height: 40px; border-radius: 50%; border: var(--hair) solid var(--g1); box-shadow: 0 0 0 3px var(--paper), 0 0 0 3px var(--paper); }
.swatch__chip--slate { background: var(--g2); }
.swatch__chip--ash { background: var(--g7); }
.swatch__chip--chalk { background: var(--g12); }
.swatch input:checked ~ .swatch__chip { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--g0); }
.swatch__name { font-size: var(--fs-xs); }
.swatch.is-out .swatch__chip { background-image: linear-gradient(135deg, transparent 47%, var(--g0) 47% 53%, transparent 53%); }

.stock { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-sm); }
.stock.is-out { font-weight: 600; }

.sum { margin: 0; border-top: var(--line) solid var(--g1); }
.sum > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 9px 0; border-bottom: var(--hair) solid var(--rule); font-size: var(--fs-sm); }
.sum dt { color: var(--g3); }
.sum dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.sum__total { border-bottom: var(--line) solid var(--g1) !important; }
.sum__total dt { color: var(--g0); font-weight: 600; }
.sum__total dd { font: 500 var(--fs-xl)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }

.details__note { margin-bottom: var(--s-4); font-size: var(--fs-xs); color: var(--ink-2); }
.details__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.details__grid .field:first-child, .details__grid .field:nth-child(2) { grid-column: 1 / -1; }

.buy__status { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4) 0; border-block: var(--line) solid var(--g1); font-size: var(--fs-sm); }
.buy__status b { display: block; font: 500 var(--fs-lg)/1.2 var(--serif); margin-bottom: 2px; }
.buy__status.is-error { border-width: 3px; }
.buy__status .btn { margin-top: var(--s-3); }
.buy__form.is-busy .btn--wide { cursor: progress; }
.dots { display: inline-flex; gap: 4px; margin-left: 6px; }
.dots i { width: 5px; height: 5px; background: currentColor; }
.buy__form.is-done fieldset, .buy__form.is-done .sum { opacity: 1; }

/* ---------- 11. Questions and footer ---------- */
.faq > h2 { font-size: var(--fs-h2); margin-bottom: var(--s-7); }
.faq__list { border-top: var(--line) solid var(--g1); }
.faq details { border-bottom: var(--hair) solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 64px; padding: var(--s-3) 0; cursor: pointer; list-style: none;
  font: 500 var(--fs-xl)/1.2 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: rotate var(--t-mid) var(--ease-out); }
.faq details[open] summary .icon { rotate: 180deg; }
.faq details p { padding: 0 0 var(--s-5); max-width: 68ch; color: var(--g3); }

.foot { background: var(--night); color: var(--night-ink); padding: var(--s-8) var(--gutter) var(--s-6); }
.foot__grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--s-6); }
.foot__word { font: 500 2.6rem/1 var(--serif); margin-bottom: var(--s-4); }
.foot__brand p + p { margin-top: var(--s-3); }
.foot__brand { font-size: var(--fs-sm); color: var(--night-ink-2); }
.foot__brand .foot__word { color: var(--night-ink); }
.foot__col { display: grid; align-content: start; }
.foot__h { font-size: var(--fs-xs); font-weight: 700; font-stretch: 112%; margin-bottom: var(--s-2); }
.foot__col a { display: inline-flex; align-items: center; min-height: 40px; font-size: var(--fs-sm); color: var(--night-ink-2); text-decoration: none; }
.foot__col a:hover { color: var(--night-ink); text-decoration: underline; }
.foot__small { max-width: var(--wrap); margin: var(--s-7) auto 0; padding-top: var(--s-4); border-top: var(--hair) solid var(--g4); font-size: var(--fs-xs); color: var(--night-ink-2); }

/* ---------- 12. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Full-page refresh: a single dark frame held ~90ms, then a quick settle. One flash per jump, never repeated. */
  .refresh.is-on { animation: refresh 340ms linear 1; }
  @keyframes refresh {
    0% { opacity: 0.86; }
    26% { opacity: 0.86; }
    27% { opacity: 0.28; }
    100% { opacity: 0; }
  }
  /* Screen refresh on a page turn */
  .screen__flash.is-on { animation: flash 260ms linear 1; }
  @keyframes flash {
    0% { opacity: 1; }
    30% { opacity: 1; }
    31% { opacity: 0; }
    100% { opacity: 0; }
  }
  .screen__ghost.is-on { animation: ghost 700ms steps(4, end) 1; }
  @keyframes ghost { 0% { opacity: 0.12; } 100% { opacity: 0; } }
}

/* ---------- 13. Narrow screens ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "intro intro" "device sheet"; column-gap: var(--s-6); }
  .hero__intro { padding-top: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--s-7); align-items: end; }
  .hero h1 { max-width: 13ch; grid-row: span 2; }
  .hero__lede { margin-top: 0; }
  .device-wrap { width: clamp(300px, 46vw, 440px); }
  .nav a { padding: 0 var(--s-2); }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .top__buy { margin-left: auto; }
  .section__head, .hardware__body, .principles__grid, .buy__grid { grid-template-columns: 1fr; }
  .section__head { margin-bottom: var(--s-7); }
  .buy__show { position: static; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "intro" "device" "sheet"; padding-top: var(--s-6); }
  .hero__intro { display: block; }
  .hero__lede { margin-top: var(--s-5); }
  .device-wrap { width: min(100%, 440px); justify-self: center; }
  .sheet { max-width: 560px; width: 100%; justify-self: center; }
  .acc__item { grid-template-columns: 160px minmax(0, 1fr); gap: var(--s-4) var(--s-5); }
  .acc__art { width: 160px; }
  .acc__add { grid-column: 2; justify-self: start; }
}
@media (max-width: 620px) {
  .pick, .note-form { margin-inline: calc(var(--s-4) * -1); padding-inline: var(--s-4); }
  :root { --s-9: 80px; --s-8: 48px; }
  .rules { grid-template-columns: 1fr; }
  .hero h1 { max-width: 12ch; }
  .hero__facts span { flex-basis: 50%; }
  .hero__facts span:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__facts span:nth-child(n+3) { border-top: var(--hair) solid var(--rule); }
  .sheet__group { padding: var(--s-4); }
  .sheet__group--row { grid-template-columns: 1fr; }
  .slider { grid-template-columns: 20px 1fr 4.4em; row-gap: 0; }
  .slider input { grid-column: 1 / -1; grid-row: 2; }
  .acc__item { grid-template-columns: 1fr; }
  .acc__art { width: 180px; }
  .spec-table thead th { font-size: var(--fs-lg); }
  .acc__add { grid-column: 1; width: 100%; }
  .choice { grid-template-columns: 1fr; }
  .details__grid { grid-template-columns: 1fr; }
  .buy__form { padding: var(--s-5) var(--s-4); }
  .mini__body { width: 220px; }
  .mini[data-size="large"] .mini__body { width: 300px; }
  .inbox ul { columns: 1; }
  .stack__draw { grid-template-columns: 1fr; }
  .stack__key { counter-reset: layer; margin-top: var(--s-4); border-top: var(--hair) solid var(--rule); }
  .stack__key li { position: static; translate: none; padding: var(--s-2) 0; border-bottom: var(--hair) solid var(--rule); }
  .stack__key li::before { display: none; }
  .top__price { display: none; }
  .faq summary { font-size: var(--fs-lg); }
  .device { border-radius: 16px; }
  .screen__status { padding: 6px 10px; }
}
