/*
 * withtiny.app, in English and Chinese. The colours and fonts are the app's (app/src/theme/tokens.ts, light): a soft green
 * ground, one deep green for what to do, the phone's own fonts.
 *
 * Each page has one thing to do on it, and the first screen holds only that:
 * - body.tool: the heading, the field, the button. The first screen is the tool's alone; examples and how it works wait
 *   under it. Once an answer is there, the heading steps back and the answer is the page.
 * - body.example: what someone typed and what Tiny answered, as an exchange.
 * - body.about: what the app is, its facts, the questions.
 * - body.android, body.iphone: the button to the app; how to install it waits under it.
 * - a page about the app (body.features, .feature, .help, .guide, .pricing, .news): a page to read. Its heading, one
 *   line, the way to the app, then a heading for each part.
 * - body.landing: a tool page under the words of the people who search the problem.
 * - body.focus: the lengths, one optional line and the button. Once started (body.focusing) the page is Tiny and the
 *   time; at the end (body.focused) what you did and the way to the app.
 * - body.quiz: the heading, one line and the start button. Once started (body.quizzing) the page is one question at a
 *   time. body.quiz-type: a page to read about one type, with the tools for it and its card.
 *
 * Rules this sheet keeps:
 * - Three levels and no more: the one thing (large, dark), what supports it (body, ink2), the rest (small, ink3).
 * - One spacing scale (4 8 12 16 24 32 48 64 96) and one radius scale (12 controls, 16 cards; a pill only on the chips).
 * - Elevation is said once: a hairline, never a hairline and a shadow. No label above a heading, no tracked capitals,
 *   no row of equal cards.
 * - Text people read is at least 16px; nothing is under 13px; a paragraph is at most 62 characters wide.
 * - Motion is transform and opacity, eases out, and rests when the visitor asks for less. Hover and press answer in
 *   150 ms; an answer arriving is the page's one moment; pages cross-fade into each other where the browser can.
 */
:root {
  color-scheme: light;
  --bg: #f4f8f1;
  --surface: #fff;
  --surface2: #f7faf5;
  --ink: #1e2b24;
  --ink2: #3e4c43;
  --ink3: #5c6b62;
  --line: #dfe7df;
  --line-strong: #c9d6cb;
  --accent: #2f7a55;
  --accent-press: #276848;
  --accent-deep: #225c40;
  --accent-soft: #e4f1e7;
  --accent-line: #cfe9d6;
  --warm: #fff3d3;
  --warm-line: #e8b039;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --r-m: 12px;
  --r-l: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --rounded: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
/* Going from one page of the site to the next is a short cross-fade, where the browser does it. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--text); accent-color: var(--accent); caret-color: var(--accent); }
::selection { background: var(--accent-line); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 150ms var(--ease); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--rounded); line-height: 1.2; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 var(--s3); text-wrap: pretty; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Chinese is set without the tightening Latin headings take, and with a little more room between lines. */
html:lang(zh-Hans) body { line-height: 1.75; }
html:lang(zh-Hans) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }

.skip { position: absolute; left: var(--s4); top: -64px; z-index: 2; background: var(--surface); color: var(--accent-deep); border: 1px solid var(--line-strong); border-radius: var(--r-m); padding: var(--s2) var(--s4); }
.skip:focus { top: var(--s2); }

.top, .tabs, main, .foot { max-width: 680px; margin: 0 auto; padding-inline: 20px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; color: var(--ink); text-decoration: none; font: 700 18px var(--rounded); letter-spacing: -0.01em; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s3); margin-inline-end: calc(-1 * var(--s3)); color: var(--ink3); font-size: 15px; text-decoration: none; }
.lang:hover { color: var(--accent-deep); }
/* The tools as tabs under the header: quiet text, the page's own one dark and underlined. On a narrow phone the row
   scrolls sideways rather than wrapping. */
.tabs { display: flex; gap: var(--s5); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background-clip: content-box; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink2); font-size: 16px; text-decoration: none; white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color 150ms var(--ease), box-shadow 150ms var(--ease); }
.tabs a:hover { color: var(--accent-deep); }
.tabs a.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

/* ---- A tool page: the first screen is the tool's alone. ---- */
.stage { min-height: calc(100svh - 109px); padding-block: clamp(32px, 13svh, 128px) var(--s8); }
.stage h1 { font-size: clamp(32px, 6.4vw, 50px); font-weight: 800; max-width: 14em; }
.stage .sub { color: var(--ink2); font-size: 19px; margin: var(--s4) 0 var(--s6); max-width: 30em; padding-inline-end: 104px; }
html:lang(zh-Hans) .stage h1 { font-size: clamp(30px, 6vw, 46px); }

.tool { position: relative; }
.tool .tiny { position: absolute; inset-inline-end: var(--s5); top: -68px; width: 84px; pointer-events: none; }
.ask { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: var(--s2); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.ask:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: flex; gap: var(--s2); align-items: flex-end; }
.field textarea { flex: 1; min-width: 0; resize: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 19px; line-height: 1.45; padding: 12px var(--s3); max-height: 12lh; field-sizing: content; }
.field textarea::placeholder, .field input::placeholder { color: #6f7d74; }
.field textarea:focus { outline: none; }
/* A tool that takes several lines, or a second field: stacked, the button under them. */
.field.stack { flex-direction: column; align-items: stretch; }
.field.stack textarea { flex: none; min-height: 5lh; }
.field.stack .acts { align-self: flex-end; }
.note-label { color: var(--ink2); font-size: 15px; margin: var(--s1) var(--s3) calc(-1 * var(--s1)); }
.field input { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface2); color: var(--ink); font: inherit; padding: 10px var(--s3); margin-inline: var(--s1); min-width: 0; min-height: 44px; transition: border-color 150ms var(--ease); }
.field input:focus { outline: none; border-color: var(--accent); }
.field [type=submit], .cta { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; border: 0; border-radius: var(--r-m); background: var(--accent); color: #fff; font: 700 17px var(--rounded); padding: 0 var(--s5); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 150ms var(--ease), scale 90ms var(--ease); }
.field [type=submit]:hover, .cta:hover { background: var(--accent-press); color: #fff; }
.field [type=submit]:active, .cta:active { scale: 0.985; }
.field [type=submit]:disabled { opacity: 0.6; cursor: default; }
/* The microphone, beside the button, only where the browser can listen (tool.js shows it). While it listens it is lit,
   with a ring that widens and fades. */
.acts { display: flex; gap: var(--s2); align-items: center; }
.mic { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 50px; height: 50px; border: 1px solid var(--line); border-radius: var(--r-m); background: transparent; color: var(--ink2); cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.mic[hidden] { display: none; }
.mic:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-deep); }
.mic[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.mic[aria-pressed='true']::after { content: ''; position: absolute; inset: -1px; border: 2px solid var(--accent); border-radius: inherit; animation: listen 1.4s var(--ease) infinite; pointer-events: none; }
@keyframes listen {
  from { opacity: 0.7; scale: 1; }
  to { opacity: 0; scale: 1.3; }
}
@media (prefers-reduced-motion: reduce) {
  .mic[aria-pressed='true']::after { animation: none; opacity: 0; }
}
/* A way in for someone who does not know what to type: quiet, under the field, never a menu. */
.tries { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s2) var(--s1) var(--s1); color: var(--ink3); font-size: 15px; }
.tries span { margin-inline: var(--s2) var(--s1); }
.chip { min-height: 36px; border: 1px solid var(--line); background: transparent; color: var(--ink2); border-radius: 999px; padding: 0 14px; font-size: 15px; cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.chip:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.fine { color: var(--ink3); font-size: 14px; margin: var(--s3) var(--s3) 0; }
.fine a { color: var(--ink3); }
/* On an iPhone the microphone hands over to the keyboard's own: this line says where to press, until words arrive. */
.hint { color: var(--accent-deep); font-size: 15px; margin: var(--s3) var(--s3) 0; }

/* Once an answer is there the tool steps back: the heading goes quiet, the ways in go away, the answer is the page. */
body.answered .stage { min-height: 0; padding-block-start: var(--s5); }
body.answered .stage h1 { font-size: 22px; font-weight: 700; color: var(--ink3); max-width: none; }
body.answered .stage .sub, body.answered .tool .tiny, body.answered .tries, body.answered .fine { display: none; }
body.answered .stage h1 { margin-bottom: var(--s4); }

/* What comes back. */
.out { margin-top: var(--s4); }
.out > * { transition: opacity 320ms var(--ease), translate 320ms var(--ease); }
.out > :nth-child(2) { transition-delay: 60ms; }
.out > :nth-child(3) { transition-delay: 120ms; }
@starting-style {
  .out > * { opacity: 0; translate: 0 10px; }
}
.wait { display: flex; align-items: center; gap: var(--s3); color: var(--ink2); padding: var(--s3) var(--s1); }
.wait img { animation: bob 1.1s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) {
  .wait img { animation: none; }
  .out > * { transition: opacity 150ms linear; transition-delay: 0ms; }
  @starting-style {
    .out > * { translate: none; }
  }
}
.note { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: var(--s4); color: var(--ink2); }
.note p:last-child { margin-bottom: 0; }
.note.help { border-color: var(--warm-line); background: var(--warm); color: var(--ink); }
.note.help strong { display: block; font: 700 19px var(--rounded); margin-bottom: var(--s1); }
.note .row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s3); align-items: center; }
.note .plain { color: var(--ink2); font-size: 15px; }

/* An answer: its first line is the largest thing in it, everything after is quieter. */
.plan { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: var(--s5); }
.plan-title { font-size: 17px; font-weight: 700; color: var(--ink3); letter-spacing: 0; margin-bottom: var(--s3); }
.plan-title .pre { font-weight: 400; }
.first .tag { display: block; color: var(--accent-deep); font-size: 15px; font-weight: 600; margin-bottom: var(--s1); }
.first p { margin: 0; font: 800 26px/1.25 var(--rounded); letter-spacing: -0.02em; text-wrap: balance; }
html:lang(zh-Hans) .first p { line-height: 1.4; letter-spacing: 0; font-size: 24px; }
.steps { list-style: none; counter-reset: step 1; margin: var(--s5) 0 0; padding: var(--s2) 0 0; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: flex; gap: var(--s3); align-items: baseline; padding: 10px 0; color: var(--ink2); }
.steps li::before { content: counter(step); flex: none; width: 1.4em; color: var(--ink3); font: 600 15px var(--rounded); font-variant-numeric: tabular-nums; }
.steps .what { flex: 1; }
.steps .min { flex: none; color: var(--ink3); font-size: 15px; font-variant-numeric: tabular-nums; }
.call, .extra, .reply { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.plan > .call:nth-child(2), .plan > .call:first-child, .plan > .reply:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.call h3, .extra h3, .reply h3 { font-size: 15px; font-weight: 600; color: var(--accent-deep); letter-spacing: 0; margin-bottom: var(--s3); }
.say { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.say li { background: var(--accent-soft); border-radius: var(--r-l) var(--r-l) var(--r-l) var(--s1); padding: 10px 14px; font-size: 18px; width: fit-content; max-width: 100%; }
/* On the call tool's own answer the lines to say are the first thing: the first of them is the largest. */
.plan > .call:nth-child(2) .say li:first-child { font: 700 22px/1.3 var(--rounded); }
.have { margin: var(--s4) 0 0; color: var(--ink2); font-size: 16px; }
.plan > .have { padding-top: var(--s4); border-top: 1px solid var(--line); margin-top: var(--s5); }
.ask-list, .later { margin: 0; padding-inline-start: 1.2em; color: var(--ink2); }
.ask-list li, .later li { padding: 3px 0; }
.vm, .letter { margin: 0; background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--s3) 14px; }
.letter { white-space: pre-line; font-size: 18px; }
.why { color: var(--ink2); margin: var(--s3) 0 0; }
.copy, .again { min-height: 40px; margin-top: var(--s3); border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent-deep); border-radius: var(--r-m); padding: 0 var(--s4); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color 150ms var(--ease); }
.copy:hover, .again:hover { background: var(--accent-soft); }
.again { display: block; margin: var(--s5) 0 0; border: 0; background: none; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: 400; }
.again:hover { background: none; color: var(--accent); }

/* Practising the call (practice.js), under its lines: the button and its line, then in its place the call as it goes,
   the other side on the left and the visitor on the right, the box to answer in, and the feedback at the end. */
.practice-open { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
/* Its own small print: the tool's (.fine) steps back once there is an answer, and these belong to the answer. */
.practice-fine { color: var(--ink3); font-size: 14px; margin: 0; max-width: 34em; }
.practice-open > .practice-fine { margin-top: var(--s2); }
.practice-open > .note { margin-top: var(--s3); }
.practice-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); }
.practice-head h3 { font-size: 15px; font-weight: 600; color: var(--accent-deep); letter-spacing: 0; margin: 0; }
.practice .row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.practice .plain { min-height: 44px; border: 0; background: none; padding: 0 var(--s1); color: var(--ink2); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.practice .plain:hover { color: var(--accent); }
.practice .plain.small { min-height: 36px; font-size: 14px; }
.practice > .practice-fine { margin: var(--s1) 0 var(--s4); }
.practice-choose { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.talk { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.talk:empty { display: none; }
.talk li { display: grid; gap: 2px; max-width: 88%; }
.talk .by { font-size: 13px; color: var(--ink3); }
.talk .line { border-radius: var(--r-l); padding: 10px 14px; font-size: 18px; line-height: 1.45; }
.talk .them { justify-self: start; }
.talk .them .line { background: var(--surface2); border: 1px solid var(--line); border-end-start-radius: var(--s1); }
.talk .me { justify-self: end; justify-items: end; }
.talk .me .line { background: var(--accent-soft); border-end-end-radius: var(--s1); }
.talk .waiting .line { color: var(--ink3); }
.talk .ended { justify-self: center; max-width: none; color: var(--ink3); font-size: 14px; }
.practice .turn { margin: var(--s4) 0 0; color: var(--accent-deep); font-weight: 600; }
.practice-notes { display: grid; gap: var(--s3); margin-top: var(--s4); }
.practice-notes:empty { display: none; }
.crib { margin-top: var(--s4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface2); padding: 0 var(--s3); }
.crib summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink2); font-size: 15px; font-weight: 600; }
.crib .say { padding-bottom: var(--s3); }
.crib .say li { background: var(--surface); font-size: 16px; }
.practice-say { margin-top: var(--s3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: var(--s2); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.practice-say:focus-within, .practice.listening .practice-say { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.practice-say textarea { font-size: 18px; }
.feedback { background: var(--accent-soft); border-radius: var(--r-l); padding: var(--s5); }
.feedback h4 { font-size: 15px; font-weight: 600; color: var(--accent-deep); letter-spacing: 0; margin: 0 0 var(--s2); }
.feedback .good { margin: 0 0 var(--s4); padding-inline-start: 1.2em; color: var(--ink); }
.feedback .good li { padding: 2px 0; }
.feedback .add { margin: 0 0 var(--s4); font: 700 19px/1.4 var(--rounded); color: var(--ink); }
.feedback .real { margin: 0 0 var(--s3); color: var(--ink2); }
.feedback .copy { margin-top: 0; }
.feedback .row + .row { margin-top: var(--s4); }

/* After an answer, and only then: the one invitation to the app. */
.next { display: flex; gap: var(--s4); align-items: center; margin-top: var(--s4); background: var(--accent-soft); border-radius: var(--r-l); padding: var(--s5); }
.next img { flex: none; }
.next p { margin: 0 0 var(--s2); color: var(--ink2); }
.next .next-title { font: 700 19px var(--rounded); color: var(--ink); }
.next .cta { margin-top: var(--s2); }

/* The picture of an answer (tool.js): a quiet button at the foot of the answer, and a window with the picture, its two
   shapes, Share where the phone can take the file, and Save. */
.plan > .card-open { display: block; margin-top: var(--s5); }
.card-box { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: var(--s5); border: 0; border-radius: var(--r-l); background: var(--surface); color: var(--ink); overflow: auto; }
.card-box::backdrop { background: rgb(30 43 36 / 0.55); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.card-head h2 { font-size: 20px; }
.card-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface2); color: var(--ink2); font-size: 24px; line-height: 1; cursor: pointer; }
.card-close:hover { background: var(--accent-soft); }
.card-shapes { display: inline-flex; padding: 3px; margin-bottom: var(--s3); background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-m); }
.card-shapes button { min-height: 36px; padding: 0 var(--s4); border: 0; border-radius: 9px; background: none; color: var(--ink3); font-size: 15px; font-weight: 600; cursor: pointer; }
.card-shapes button[aria-pressed=true] { background: var(--surface); color: var(--accent-deep); box-shadow: 0 1px 2px rgb(30 43 36 / 0.12); }
.card-img { width: 100%; max-height: 56dvh; object-fit: contain; border-radius: var(--r-m); background: var(--bg); }
.card-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s4); }
.card-actions .copy { margin-top: 0; display: inline-flex; align-items: center; text-decoration: none; }
.card-note { margin: var(--s3) 0 0; font-size: 14px; color: var(--ink3); }

/* ---- The focus page: pick a length, then Tiny and the time are the page. ---- */
.focus-box { position: relative; }
.focus-box .tiny { position: absolute; inset-inline-end: var(--s5); top: -68px; width: 84px; pointer-events: none; }
.focus-set { display: grid; gap: var(--s3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: var(--s3); }
.lengths { display: flex; gap: var(--s2); margin: 0; padding: 0; border: 0; min-width: 0; }
.lengths label { flex: 1; position: relative; }
.lengths input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.lengths span { display: flex; align-items: center; justify-content: center; min-height: 50px; border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink2); font: 600 17px var(--rounded); font-variant-numeric: tabular-nums; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.lengths label:hover span { background: var(--surface2); }
.lengths input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); font-weight: 700; }
.lengths input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.focus-set > input, .did-row input { min-width: 0; min-height: 50px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface2); color: var(--ink); font: inherit; font-size: 18px; padding: 0 14px; transition: border-color 150ms var(--ease); }
.focus-set > input::placeholder, .did-row input::placeholder { color: #6f7d74; }
.focus-set > input:focus, .did-row input:focus { outline: none; border-color: var(--accent); }
.focus-set [type=submit], .did-row [type=submit] { min-height: 50px; border: 0; border-radius: var(--r-m); background: var(--accent); color: #fff; font: 700 17px var(--rounded); padding: 0 var(--s5); cursor: pointer; transition: background-color 150ms var(--ease), scale 90ms var(--ease); }
.focus-set [type=submit]:hover, .did-row [type=submit]:hover { background: var(--accent-press); }
.focus-set [type=submit]:active, .did-row [type=submit]:active { scale: 0.985; }
/* Who else is here: a small steady dot before the line. */
.here { color: var(--ink2); font-size: 16px; margin: var(--s4) var(--s3) 0; }
.here::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-inline-end: var(--s2); border-radius: 50%; background: var(--accent); vertical-align: 0.1em; }
/* Running: the chooser goes, Tiny sits in a ring that empties as the time goes, the time under it. */
body.focusing .stage h1, body.focusing .stage .sub, body.focusing .focus-set, body.focusing .focus-box > .tiny, body.focusing .focus-box > .fine, body.focused .focus-box > .here { display: none; }
body.focusing .stage { padding-block-start: var(--s6); }
.focus-run { display: grid; justify-items: center; text-align: center; }
/* A new view (running, the end) comes in softly; under reduced motion it is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .focus-run, .focus-end { transition: opacity 320ms var(--ease), translate 320ms var(--ease); }
  @starting-style {
    .focus-run, .focus-end { opacity: 0; translate: 0 10px; }
  }
}
.ring { position: relative; width: min(240px, 64vw); aspect-ratio: 1; }
.ring svg { position: absolute; inset: 0; rotate: -90deg; fill: none; stroke-width: 3.5; }
.ring .track { stroke: var(--line); }
.ring .left { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring .sit { position: absolute; left: 50%; top: 50%; width: 58%; translate: -50% -46%; transform-origin: 50% 100%; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04, 1.025); } }
.clock { margin: var(--s5) 0 var(--s2); font: 800 clamp(56px, 16vw, 80px)/1 var(--rounded); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.clock:focus { outline: none; }
.doing-now { max-width: 30em; margin: 0; color: var(--ink); font-size: 19px; overflow-wrap: anywhere; }
.focus-run .here { max-width: 30em; margin: var(--s4) 0 0; }
.run-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s6); }
.run-acts .finish { min-height: 44px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent-deep); border-radius: var(--r-m); padding: 0 var(--s5); font-weight: 600; cursor: pointer; transition: background-color 150ms var(--ease); }
.run-acts .finish:hover { background: var(--accent-soft); }
.run-acts .stop { min-height: 44px; border: 0; background: none; color: var(--ink3); padding: 0 var(--s3); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.run-acts .stop:hover { color: var(--ink2); }
/* The end: what happened, what you did (on this page only), the way to the app. */
.end-top { display: flex; gap: var(--s4); align-items: center; }
.end-top img { flex: none; }
.end-top h2 { font-size: clamp(28px, 5vw, 36px); font-weight: 800; }
.end-top h2:focus { outline: none; }
.stayed { margin: var(--s1) 0 0; color: var(--ink2); }
.did { margin-top: var(--s5); }
.did-label { display: block; font: 700 19px var(--rounded); margin-bottom: var(--s2); }
.did-row { display: flex; gap: var(--s2); }
.did-row input { flex: 1; }
.did .fine { margin-inline: 0; }
.did-card { margin-top: var(--s5); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); padding: var(--s4) var(--s5); }
.did-card:focus { outline: none; }
.did-title { margin: 0 0 var(--s1); color: var(--ink3); font-size: 15px; }
.did-text { margin: 0; font: 700 22px/1.35 var(--rounded); overflow-wrap: anywhere; }
.focus-end .next { margin-top: var(--s6); }
@media (prefers-reduced-motion: no-preference) {
  .end-top img { animation: hop 700ms var(--ease) 1; }
  @keyframes hop { 30% { translate: 0 -10px; } 60% { translate: 0 0; } 75% { translate: 0 -3px; } }
}
@media (prefers-reduced-motion: reduce) {
  .ring .sit { animation: none; }
  .ring .left { transition: none; }
}

/* ---- The quiz: a start button, then one question at a time (quiz.js). ---- */
.quiz-box { position: relative; }
.quiz-box > .tiny { position: absolute; inset-inline-end: var(--s5); top: -68px; width: 84px; pointer-events: none; }
.quiz-open .cta { min-width: 12em; }
.quiz-open .fine { margin-inline: 0; max-width: 34em; }
body.quizzing .stage h1, body.quizzing .stage .sub, body.quizzing .quiz-open, body.quizzing .quiz-box > .tiny { display: none; }
body.quizzing .stage { padding-block-start: var(--s5); }
.quiz-bar { height: 4px; background: var(--line); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 320ms var(--ease); }
.quiz-where { margin: var(--s3) 0 var(--s2); color: var(--ink3); font-size: 15px; font-variant-numeric: tabular-nums; }
.quiz-q { font-size: clamp(24px, 4.6vw, 32px); font-weight: 800; max-width: 22em; margin-bottom: var(--s5); }
html:lang(zh-Hans) .quiz-q { font-size: clamp(22px, 4.4vw, 30px); }
.quiz-q:focus { outline: none; }
.quiz-answers { display: grid; gap: var(--s2); }
.quiz-a { display: block; width: 100%; min-height: 56px; padding: var(--s3) var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font-size: 17px; line-height: 1.45; text-align: start; cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), scale 90ms var(--ease); }
.quiz-a:hover { background: var(--surface2); border-color: var(--accent-line); }
.quiz-a:active { scale: 0.99; }
.quiz-a[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.quiz-back { margin-top: var(--s4); min-height: 44px; border: 0; background: none; color: var(--ink3); padding: 0 var(--s1); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.quiz-back:hover { color: var(--ink2); }
/* Each question's answers come in softly; under reduced motion they are simply there. */
@media (prefers-reduced-motion: no-preference) {
  .quiz-a { transition: opacity 240ms var(--ease), translate 240ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease), scale 90ms var(--ease); }
  @starting-style {
    .quiz-a { opacity: 0; translate: 0 8px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-bar span { transition: none; }
}
/* All ten questions, folded away under the first screen: for a visitor without JavaScript, and to read before starting. */
.quiz-all { margin-bottom: var(--s7); }
.quiz-all summary { display: flex; align-items: center; gap: var(--s3); min-height: 44px; color: var(--accent-deep); cursor: pointer; list-style: none; }
.quiz-all summary::-webkit-details-marker { display: none; }
.quiz-all summary::before { content: ''; flex: none; width: 7px; height: 7px; margin-inline-start: var(--s1); border-inline-end: 1.5px solid; border-bottom: 1.5px solid; rotate: -45deg; transition: rotate 150ms var(--ease); }
.quiz-all[open] summary::before { rotate: 45deg; }
.quiz-qs { margin: var(--s3) 0 0; padding-inline-start: 1.4em; color: var(--ink2); max-width: 62ch; }
.quiz-qs > li { padding: var(--s3) 0; }
.quiz-qs p { margin: 0 0 var(--s1); color: var(--ink); font-weight: 600; }
.quiz-qs ul { margin: 0; padding-inline-start: 1.2em; font-size: 16px; }
/* A type's page: the next-closest type under the heading (from the quiz), the tools for it, its card, the app. */
.also-type { margin: var(--s3) 0 0; color: var(--ink3); font-size: 16px; }
.also-type a { font-weight: 600; }
.card-row { margin: var(--s4) 0 0; }
.card-row .copy { margin-top: 0; }
.read .next { max-width: 62ch; margin-top: var(--s7); }
.read .next .get { margin-top: var(--s3); }
.next .get .cta { min-width: 0; }
/* ---- An example page: what someone typed, what Tiny answered. ---- */
.crumb { padding-top: var(--s2); font-size: 15px; }
.crumb a { color: var(--ink3); text-decoration: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; }
.crumb a::before { content: ''; width: 7px; height: 7px; border-inline-start: 1.5px solid; border-bottom: 1.5px solid; rotate: 45deg; }
html[dir='rtl'] .crumb a::before { rotate: -135deg; }
.crumb a:hover { color: var(--accent-deep); }
.read { padding-top: var(--s5); }
.read h1 { font-size: clamp(28px, 5.2vw, 40px); font-weight: 800; max-width: 18em; }
.read .sub { color: var(--ink2); font-size: 19px; margin: var(--s4) 0 0; max-width: 62ch; }
.read > p { max-width: 62ch; color: var(--ink2); }
.read > p + p { margin-top: var(--s3); }
.exchange { margin-top: var(--s7); display: grid; gap: var(--s4); }
.said { justify-self: end; max-width: 85%; margin: 0; background: var(--ink); color: #fff; border-radius: var(--r-l) var(--r-l) var(--s1) var(--r-l); padding: var(--s3) var(--s4); font-size: 18px; }
.reply-side { display: grid; grid-template-columns: 40px 1fr; gap: var(--s3); align-items: start; }
.reply-side img { margin-top: var(--s2); }
.yours { margin-top: var(--s8); }
.yours h2 { font-size: 22px; font-weight: 800; margin-bottom: var(--s4); }

/* ---- Under the first screen: the quiet part. Rows with a hairline, never boxes side by side. ---- */
.below { padding-top: var(--s7); border-top: 1px solid var(--line); }
.example .below, .about .below, .cancel .below, .read + .below { margin-top: var(--s8); }
.below:empty { display: none; }
.below h2 { font-size: 15px; font-weight: 600; color: var(--ink3); letter-spacing: 0; margin: var(--s7) 0 var(--s2); }
.below h2:first-child { margin-top: 0; }
.below > p { color: var(--ink2); max-width: 62ch; font-size: 16px; }
.links { list-style: none; margin: 0; padding: 0; }
.links li + li { border-top: 1px solid var(--line); }
.links a { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 52px; padding: var(--s3) 0; color: var(--ink); text-decoration: none; }
.links a::after { content: ''; flex: none; width: 7px; height: 7px; margin-inline-end: var(--s1); border-inline-end: 1.5px solid var(--ink3); border-top: 1.5px solid var(--ink3); rotate: 45deg; transition: translate 150ms var(--ease); }
.links a:hover { color: var(--accent-deep); }
.links a:hover::after { translate: 3px 0; }
.links.tools a > span { display: block; }
.links.tools strong { display: block; font-family: var(--rounded); }
.links.tools strong + span { color: var(--ink3); font-size: 15px; }
.facts { margin: var(--s6) 0 var(--s5); border-top: 1px solid var(--line-strong); }
.facts div { display: grid; grid-template-columns: 8em 1fr; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink3); font-size: 15px; }
.facts dd { margin: 0; }
/* ---- A page to read about the app: a heading for each part, quiet lists, the way to the app after the first lines. ---- */
.read h2 { font-size: 22px; font-weight: 800; margin: var(--s7) 0 var(--s3); }
.read ul, .read ol { margin: 0 0 var(--s3); padding-inline-start: 1.3em; color: var(--ink2); max-width: 62ch; }
.read li { padding: 3px 0; }
.read .get { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin: var(--s5) 0 0; }
.read .facts { max-width: 62ch; }
/* A guide's steps: numbered, each one large enough to follow with the phone in the other hand. */
.how { counter-reset: how; list-style: none; margin: var(--s6) 0 0; padding: 0; max-width: 62ch; }
.read .how { padding-inline-start: 0; color: var(--ink); }
.how li { counter-increment: how; display: grid; grid-template-columns: 32px 1fr; gap: var(--s3); align-items: baseline; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.how li:first-child { border-top: 0; }
.how li::before { content: counter(how); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font: 700 15px var(--rounded); font-variant-numeric: tabular-nums; }
/* How to cancel with one company: what to say is a card among the parts of the page, and where each fact was read is small. */
.read .plan { max-width: 62ch; }
.read .say { padding: 0; color: var(--ink); }
.sources { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.sources li { padding: var(--s1) 0; font-size: 15px; }
.sources a { color: var(--ink2); overflow-wrap: anywhere; }
/* What changed: under each version's heading, when it came out. */
.when { color: var(--ink3); font-size: 15px; margin: calc(-1 * var(--s2)) 0 var(--s3); }
.also { color: var(--ink3); font-size: 15px; }

/* ---- The Android and iPhone pages: one button on the first screen; the steps and notes under it. ---- */
.android .stage .sub, .iphone .stage .sub { padding-inline-end: 0; }
.get { margin: 0; }
.get .cta { min-width: 15em; }
.install, .notes { margin: 0; padding-inline-start: 1.4em; color: var(--ink2); max-width: 62ch; }
.install li, .notes li { padding: var(--s2) 0; }
.qa div { padding: var(--s4) 0; border-top: 1px solid var(--line); }
.qa div:first-child { border-top: 0; padding-top: var(--s2); }
.qa h3 { font-size: 18px; margin-bottom: var(--s2); }
.qa p { margin: 0; color: var(--ink2); max-width: 62ch; }

.foot { margin-top: var(--s8); padding-block: var(--s5) var(--s7); border-top: 1px solid var(--line); color: var(--ink3); font-size: 14px; }
.foot a { color: var(--ink3); text-decoration: none; }
.foot a:hover { color: var(--accent-deep); text-decoration: underline; }
.foot-tools, .foot p { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: 0 0 var(--s3); }
.foot-tools span { color: var(--ink2); font-weight: 600; }
.foot p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .tabs { gap: var(--s4); }
  .stage { padding-block-start: clamp(24px, 8svh, 64px); }
  .stage .sub { font-size: 18px; padding-inline-end: 76px; margin-bottom: var(--s5); }
  .tool .tiny, .focus-box .tiny, .quiz-box > .tiny { width: 60px; inset-inline-end: var(--s4); top: -49px; }
  .quiz-a { font-size: 16px; min-height: 52px; }
  .did-row { flex-direction: column; }
  .end-top img { width: 56px; }
  .field { flex-direction: column; align-items: stretch; }
  .field textarea { flex: none; }
  .acts, .field.stack .acts { align-self: stretch; }
  .acts [type=submit] { flex: 1; }
  .plan { padding: var(--s4); }
  .first p { font-size: 23px; }
  .next { align-items: flex-start; padding: var(--s4); }
  .next img { width: 48px; }
  .reply-side { grid-template-columns: 1fr; }
  .reply-side img { width: 32px; margin: 0; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 370px) {
  .tabs a { font-size: 15px; }
}
