/* The main page in Ink (Round-14-Ink.md, section 4). Every colour, face and the motion times come from reading.css's
   tokens; this file defines none. One sans and one mono, no shadows, no colour ramps, no blur, nothing under 14 px.
   Nothing moves unless the visitor did something; the one exception is the tape's cursor blinking at 1 Hz while
   nothing is landing. Spaces are 4, 8, 12, 16, 24, 32, 48, 64, 96; any other number says why beside it. */

/* ---------- the type roles (2.2), as this page uses them ---------- */
:where(.home main) { font: 400 18px/1.5 var(--sans); color: var(--ink); }
:where(.home main) h2 { margin: 0 0 16px; font: 700 28px/1.2 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
:where(.home main) h3 { margin: 0; font: 600 20px/1.3 var(--sans); color: var(--ink); }
:where(.home main) p { margin: 0; }
.home main .words { max-width: 40rem; margin: 0 0 16px; font: 400 18px/1.5 var(--sans); }
/* label and small: Semibold, expanded where the system font has the width axis, lower-case, +0.03em */
.tape-count, .nl { font: 600 14px/1.3 var(--sans); font-stretch: var(--expanded, 112.5%); letter-spacing: .03em; color: var(--quiet); }
.tape-day, .rl { font: 600 15px/1.3 var(--sans); font-stretch: var(--expanded, 112.5%); letter-spacing: .03em; color: var(--ink); }
.home main .receipt { font: 400 15px/1.4 var(--sans); color: var(--quiet); }
.tc { font: 400 14px/1.5 var(--mono); font-variant-numeric: tabular-nums; color: var(--quiet); }
.wc { font-variant-numeric: tabular-nums; }

/* links in running text (2.5): ink Semibold, no underline; on hover and focus a 2 px ink line 4 px under the words */
.home main p a:not([class]), .proline { font-weight: 600; color: var(--ink); text-decoration: none; }
.home main p a:not([class]):hover, .home main p a:not([class]):focus-visible, .proline:hover, .proline:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }


/* ---------- the controls: reading.css draws the outlined chip (.button) and the ink button (.button.primary) ---------- */
.home main .storebadge { display: inline-block; line-height: 0; border-radius: 7px; } /* Apple's badge, as Apple draws it */
.home main .storebadge img { display: block; width: 135px; height: 45px; }

/* ---------- the page's rhythm ---------- */
.home main .sec { margin-top: 96px; }
.home main > .sec:last-child { margin-bottom: 96px; }
@media (max-width: 699px) { .home main .sec { margin-top: 64px; } .home main > .sec:last-child { margin-bottom: 64px; } .home main .words { font-size: 17px; } }

/* ---------- 4.1 the hero ---------- */
.hero { padding-top: 64px; }
/* one column under 1000 px: the words, the actions, the platform row, the tape, then the hint row directly under the
   field, as the field's own receipt line */
.hero-grid { display: flex; flex-direction: column; }
@media (max-width: 999px) {
  .hero-text { display: contents; }
  .hero-text > * { order: 1; }
  .hero-grid > .tapescreen { order: 2; margin-top: 48px; }
  .hero-text > .hintrow { order: 3; margin-top: 12px; }
}
.hero h1 { margin: 0; font: 700 clamp(40px, 6vw, 72px)/1.05 var(--sans); letter-spacing: -0.02em; color: var(--ink); text-wrap: wrap; }
/* 13.1: the one hand-drawn mark on the site. A highlighter stroke behind "Let go.": one filled path drawn by hand
   (fixed points), ragged start, wavy edges, tapered end, tilted, sitting low on the letters and running a little past
   them. Static. The words on it are ink in both appearances. */
.hero h1 { isolation: isolate; }
.hero h1 .hl { position: relative; color: var(--on-lime); white-space: nowrap; }
.hero h1 .hl .stroke { position: absolute; z-index: -1; left: -.14em; right: -.22em; top: .2em; bottom: -.06em; width: calc(100% + .36em); height: calc(100% - .14em); fill: var(--lime); transform: rotate(-1.2deg); overflow: visible; pointer-events: none; }
.hero .lead { max-width: 40rem; margin: 24px 0 0; font: 400 20px/1.5 var(--sans); }
.acts0 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.proline { display: inline-block; font-size: 16px; line-height: 20px; }
.acts0 .proline { margin: 12px 0; } /* 44 tall: 12 + 20 + 12 */
.acts1 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.home main .acts1 .winchip { min-height: 45px; } /* the badge's own height, 45 */
.platnote { margin-top: 12px; }
.platnote + .acts0 { margin-top: 24px; } /* an iPhone puts the badge row first */
.hintrow { margin-top: 24px; }
.hintrow > span { display: block; }
html:not(.js) #hint { display: none; }

@media (min-width: 1000px) {
  .hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
  .hero-text { grid-column: 1 / span 5; }
  .tapescreen { grid-column: 6 / span 7; margin-top: calc(clamp(40px, 6vw, 72px) * .22); } /* the label row's caps on the h1's cap height */
  .hero h1 > span { display: block; }
}

/* ---------- the tape: the app's own home screen, in the app's tokens ---------- */
.tapescreen { min-width: 0; }
.tape-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.tape-head p { margin: 0; }
/* the view ends at the field: a new line pushes the older ones up and the oldest scrolls off under the hairline */
.tape-view { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.tape-body { flex: none; box-sizing: border-box; list-style: none; margin: 0; padding: 12px 0 0; }
/* a row: the timecode in the 72 px margin (56 under 700, reading.css's --margin), the sentence beside it, the receipt 4 under it */
.tline { position: relative; display: grid; grid-template-columns: var(--margin, 72px) minmax(0, 1fr); padding-bottom: 16px; }
.tline .tc { padding-left: 12px; line-height: 27px; } /* 12 clear of the landed mark; 27 is the sentence's line, 18 × 1.5 */
.tline .ts { font: 400 18px/1.5 var(--sans); color: var(--ink); overflow-wrap: break-word; }
.tline .tr { margin-top: 4px; font: 400 15px/1.4 var(--sans); color: var(--quiet); }
/* the landed mark: a 3 px ink bar the height of the line, at the margin's left edge */
.tline.last::before { content: ""; position: absolute; left: 0; top: 0; bottom: 16px; width: 3px; background: var(--ink); }

/* the live row: an empty timecode and the cursor; this is where the demo's words land */
.liverow { padding-bottom: 0; }
.liverow .tc { line-height: 31px; } /* words-live's line, 24 × 1.3 */
.liverow.listening .tc { color: var(--lime-ink); }
.liverow .ts { min-height: 31px; font: 600 24px/1.3 var(--sans); }
.cursor { display: inline-block; width: 2px; height: 24px; margin-left: 1px; vertical-align: -4px; background: var(--ink); }
html.js .tapescreen.idle .liverow .cursor { animation: blink 1s steps(1, end) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
/* the lime block behind the live words: radius 4, 2 px either side, tight to the words on every line */
.lb .ow, .lb .nw { background: var(--lime); color: var(--on-lime); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lb .ow { padding: 0 2px; border-radius: 4px; }
.lb .ow:empty { display: none; }
.lb .ow:has(+ .nw) { padding-right: 0; border-radius: 4px 0 0 4px; }
.lb .nw { padding: 0 2px 0 0; border-radius: 0 4px 4px 0; animation: grow .12s ease-out; }
.lb .nw:first-child { padding-left: 2px; border-radius: 4px; }
@keyframes grow { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.lb.drain .ow { background-color: transparent; color: var(--ink); transition: background-color var(--t-drain, .3s ease-out), color var(--t-drain, .3s ease-out); }

/* the field: paper, 1 px ink, radius 12, 56 tall, a real button, as the phone's "hold to talk" */
.field { display: flex; align-items: center; box-sizing: border-box; width: 100%; height: 56px; margin-top: 16px; padding: 0 24px; font: 400 18px/1 var(--sans); color: var(--ink); text-align: left; background: var(--paper); border: 1px solid var(--ink); border-radius: 12px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; transition: background-color var(--t-drain, .3s ease-out); }
.field:disabled { cursor: default; opacity: 1; color: var(--ink); }
.field:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.field > span { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; }
.field .f-count { color: var(--quiet); white-space: nowrap; }
.field .f-hold { display: none; }
.field .f-clock { font: 400 18px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--lime-ink); }
/* the holding bar: lime, the outline stays ink, the words Semibold on lime */
.field.holding { background: var(--lime); transition: none; }
.field.holding .f-rest { display: none; }
.field.holding .f-hold { display: flex; }
.field .f-hold .f-say { font-weight: 600; color: var(--on-lime); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field.holding.draining { background: var(--paper); transition: background-color var(--t-drain, .3s ease-out); }
.field.draining .f-say { color: var(--ink); } /* the bar drains to paper: the frozen words turn ink with it */
.field.pressed { animation: press .12s ease-out; }
@keyframes press { 50% { transform: scale(.98); } }
/* critic 5, M-1: at night the ink letters above a low stroke vanish into the night page, so the stroke covers the whole letters there */
@media (prefers-color-scheme: dark) { .hero h1 .hl .stroke { top: -.04em; bottom: -.14em; height: calc(100% + .18em); } }
@media (prefers-color-scheme: dark) { .field.holding:not(.draining) .f-clock { color: var(--on-lime); } } /* at night the clock on the lime bar stays dark, as the app's pill does */

/* ---------- 4.2 the facts row ---------- */
.facts { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 64px 0 0; padding: 24px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.facts li { margin: 0; font: 400 17px/1.5 var(--sans); color: var(--ink); } /* section 14: three facts, no labels over them */
@media (min-width: 700px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

/* ---------- rows on the tape's grid (4.3) ---------- */
.rows { list-style: none; margin: 24px 0 0; padding: 0; }
.row { display: grid; grid-template-columns: var(--margin, 72px) minmax(0, 1fr); align-items: baseline; padding: 16px 0; border-top: 1px solid var(--hairline); }
.row:last-child { border-bottom: 1px solid var(--hairline); }
.row p { max-width: 40rem; }

/* ---------- 4.4 the night box: Night in both appearances ---------- */
.nightbox { margin-top: 32px; padding: 32px; background: var(--night-stage); border-radius: 12px; color: var(--on-night-stage); }
@media (prefers-color-scheme: dark) { .nightbox { border: 1px solid var(--quiet); } }
.nrow { position: relative; display: grid; grid-template-columns: var(--margin, 72px) minmax(0, 1fr); }
.nrow + .nrow { margin-top: 24px; }
.nrow .tt { grid-column: 2; }
.home main .nrow .nl { margin-bottom: 4px; color: var(--quiet-night-stage); }
.nrow .raw { font: 400 18px/1.5 var(--sans); color: var(--on-night-stage); }
.nrow .raw .fill { color: var(--quiet-night-stage); }
.nrow .clean { font: 600 24px/1.3 var(--sans); color: var(--on-night-stage); }
.nrow.typed::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--on-night-stage); }

/* ---------- 4.5 the Mac: the real renders ---------- */
.macframe { margin-top: 32px; overflow: hidden; border: 1px solid var(--hairline); border-radius: 12px; line-height: 0; }
.macframe img { display: block; width: 100%; height: auto; }
.pill { margin: 24px 0 0; }
/* the render's natural size at 2×; its 24 px of transparent air sits outside the column, so the capsule meets the edge */
.pill img { display: block; width: 348px; max-width: calc(100% + 24px); height: auto; margin: -24px 0 -24px -24px; }
.pill figcaption { margin-top: 4px; }

/* ---------- 4.6 and 4.7: words beside a picture from 1000 px ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; } }
.home main .wordbox { margin: 0; } /* reading.css draws the box; beside the words it starts at their top */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-top: 1px solid var(--hairline); font: 400 18px/1.5 var(--sans); }
.list li:first-child { border-top: 0; }
.wordbox .list + .list { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); } /* words, then snippets: a hairline, no label */
.wordbox .list .receipt { text-align: right; }
.badge { margin-top: 24px; }
.phones { display: flex; gap: 24px; }
.phones picture, .phones .kbdemo { min-width: 0; }
.phones img { display: block; box-sizing: border-box; width: 300px; max-width: 100%; height: auto; border: 1px solid var(--hairline); border-radius: 24px; }


/* ---------- 4.8 the plans ---------- */
.planpair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 32px; }
@media (min-width: 700px) { .planpair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.home main .planpair > .plan { display: flex; flex-direction: column; margin: 0; }
.home main .plan .words { margin: 4px 0 16px; }
.plan .price { margin: 8px 0 16px; }
.plan .price .pf { font: 600 24px/1.3 var(--sans); }
.plan .list li { font-size: 17px; }
.home main .plan .act { margin-top: auto; padding-top: 24px; }
.home main .nojs { margin-top: 16px; }

/* ---------- 4.9 questions ---------- */
.qa-list { margin-top: 24px; }
.qa { padding: 24px 0; border-top: 1px solid var(--hairline); }
.qa:last-child { border-bottom: 1px solid var(--hairline); }
.home main .qa p { max-width: 40rem; margin-top: 8px; }
.home main .act { margin-top: 24px; }

/* ---------- 4.10 the end: a tape row on its own ---------- */
.endrow { display: grid; grid-template-columns: var(--margin, 72px) minmax(0, 1fr); align-items: baseline; }
.home main .endrow h2 { margin: 0; font: 700 clamp(40px, 6vw, 72px)/1.05 var(--sans); letter-spacing: -0.02em; }
.endrow .cursor { height: .8em; margin: 0 .08em 0 0; vertical-align: -.06em; }
.endacts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 32px 0 0 var(--margin, 72px); }

@media (max-width: 699px) {
  .hero { padding-top: 48px; }
  .tline .tc { padding-left: 4px; } /* the 56 margin: 4 clear of the 3 px mark, 10 before the sentence */
  .tline .ts { font-size: 17px; }
  .nightbox { padding: 24px 16px; }
  .field { padding: 0 16px; }
}

/* Reduce Motion (2.6): the block appears whole, the cursor is solid, the mark at once, the drain is a cut */
@media (prefers-reduced-motion: reduce) {
  html.js .tapescreen.idle .liverow .cursor { animation: none; }
  .lb .nw, .field.pressed { animation: none; }
  .lb.drain .ow, .field { transition: none; }
}

/* ---------- the drawn keyboard (Luca, 2026-10-25: the screenshot "looks amateur"; a graphic with motion) ----------
   The iPhone keyboard in Ink, drawn, not photographed: the field at the top, the panel at the bottom, the same size as
   the tape frame beside it. Tap talk: the strip becomes the lime bar with the clock and "done", the words land one at a
   time on the lime block in the field, done drains the block and the words stay. It plays once when it comes into
   view and again on every tap of talk. Reduce Motion and no JavaScript: the end state, the words in the field. */
.kbdemo { box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; width: 300px; max-width: 100%; aspect-ratio: 1206 / 2466; margin: 0; padding: 16px 12px 12px; border: 1px solid var(--hairline); border-radius: 24px; background: var(--paper); }
.kb-field { position: relative; min-height: 44px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; font: 400 17px/1.4 var(--sans); color: var(--ink); }
.kb-ph { color: var(--quiet); }
/* critic 6: one line of the conversation at the top, text only; the field sits right above the keys, as on a phone */
.kb-msg { margin: 0; padding: 4px 4px 0; font: 400 16px/1.4 var(--sans); color: var(--quiet); }
/* at rest the cursor stands before the placeholder, as iOS draws it; once words land it follows them */
.kbdemo.has-words .kb-pre, .kbdemo:not(.has-words) .kb-post { display: none; }
.kb-pre { margin: 0 1px 0 0; }
.kb-words { color: var(--ink); }
.kbdemo.has-words .kb-ph { display: none; }
.kbdemo:not(.has-words) .kb-words { display: none; }
/* one lime block behind the live line, as the app draws it, growing as each word lands */
.kb-words { padding: 1px 2px; margin: 0 -2px; border-radius: 4px; transition: background-color var(--t-drain); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.kbdemo.live .kb-words { background: var(--lime); color: var(--on-lime); font-weight: 600; }
.kbdemo.live .kb-words .w:not(.in) { display: none; }
.kb-cursor { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -.2em; background: var(--ink); }
.kb-panel { display: flex; flex-direction: column; gap: 10px; }
.kb-strip, .kb-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.kb-date { font: 600 14px/1.3 var(--sans); font-stretch: var(--expanded, 112.5%); letter-spacing: .03em; color: var(--ink); }
.kb-talk { min-height: 44px; padding: 0 16px; font: 600 16px/1 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 8px; cursor: pointer; transition: transform var(--t-press); }
.kb-talk:hover, .kb-talk:focus-visible { border-width: 2px; padding: 0 15px; } /* the chip hover: a 2 px outline, nothing shifts */
.kbdemo.pressed .kb-talk, .kbdemo.pressing-done .kb-done { transform: scale(.96); }
.kb-bar { display: none; padding: 0 6px 0 14px; background: var(--lime); border: 1px solid var(--on-lime); border-radius: 12px; color: var(--on-lime); }
.kbdemo.live .kb-strip { display: none; }
.kbdemo.live .kb-bar { display: flex; }
.kb-say { font: 600 15px/1 var(--sans); white-space: nowrap; }
.kb-clock { margin-left: auto; font: 400 14px/1 var(--mono); font-variant-numeric: tabular-nums; }
.kb-done { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; font: 600 15px/1 var(--sans); border: 1px solid var(--on-lime); border-radius: 8px; transition: transform var(--t-press); }
.kb-keys { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.kb-row { display: flex; justify-content: center; gap: 5px; }
/* critic 6, M-1: keys are outlined, not filled (grey pills read as a page still loading) */
.kb-row .k { flex: 0 1 22px; height: 34px; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
@media (prefers-color-scheme: dark) { .kb-row .k { border-color: color-mix(in srgb, var(--ink) 30%, transparent); } }
.kb-row .k.kb-wide { flex-basis: 52px; }
.kb-row .k.kb-space { flex-basis: 140px; }
/* critic 6, S-1: under 700 px two shrunk frames cannot be read; the keyboard stands alone at its own size */
@media (max-width: 699px) { .phones > picture { display: none; } .kbdemo { aspect-ratio: 3 / 4; } } /* alone, it needs no phone-tall empty middle */
@media (prefers-reduced-motion: reduce) { .kb-words, .kb-talk, .kb-done { transition: none; } }
