/* En Prise website. The home page is the app's own scan screen: the board in its graphite
   frame, the clock as a scale along its edge, and a pane with the promise, the five levels and
   the task line with Done; the result rises into the pane, so the board and the result stay in
   view together. The scale's line carries on down every page as the rule between its two
   columns. System fonts only: no web fonts, nothing loaded from other sites; one first-party
   script (play.js) plays the home page's board.

   Colours are the app's (Chess/DesignSystem/Palette.swift, BoardTheme.swift). Contrast (WCAG 2):
   all text 4.5:1 or more in light and dark; Store/tools/check_store.py measures the pairs in its
   CONTRAST_PAIRS. The board is drawn the way the app draws it: the timer line inside the frame's
   top edge, engraved ranks, the side's rail, the found, missed and wrong marks, and the reveal
   (RevealTimeline.swift: a 0.45 s sweep, marks as it passes, then the card). */

:root {
  color-scheme: light dark;
  --ground: #eef0f3;
  --card: #ffffff;
  --ink: #111317;
  --muted: #5b6470;
  --line: #d5d9df;
  --field: #1d2735;
  --field-ink: #f2f4f7;
  --field-muted: #b4bcc7;
  --field-sentence: #b4bcc7;
  --field-rim: transparent;
  --field-found: #7fb8e6;
  --field-missed: #ffb020;
  --field-wrong: #a7b0bc;
  --signal: #c2410c;
  --on-signal: #ffffff;
  --signal-edge: #9a330a;
  --found: #0072b2;
  --missed: #c2410c;
  --wrong: #6b7480;
  --halo: rgba(16, 18, 22, 0.6);
  --sq-light: #f6f8fa;
  --sq-dark: #8a96a3;
  --frame-top: #44556d;
  --frame-bottom: #34445a;
  --frame-rim: rgba(31, 42, 58, 0.6);
  --frame-shadow: rgba(17, 19, 23, 0.35);
  --engrave: #e3e7ec;
  --rail: #e9edf2;
  --rail-ink: #1f2a3a;
  --rail-edge: rgba(0, 0, 0, 0.45);
  --warning: #ffb020;
  --focus: #111317;
  --lit: #ffffff;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --vh: 100svh;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0d10;
    --card: #15181d;
    --ink: #f2f4f7;
    --muted: #9aa3ad;
    --line: #2a2f36;
    --field: #171f2a;
    --field-rim: rgba(242, 244, 247, 0.4);
    --signal: #ffb020;
    --on-signal: #0b0d10;
    --signal-edge: #c2850f;
    --found: #7fb8e6;
    --missed: #ffb020;
    --wrong: #a4aeb8;
    --halo: rgba(0, 0, 0, 0.8);
    --sq-light: #929da9;
    --sq-dark: #5f6974;
    --frame-top: #3b4b61;
    --frame-bottom: #2c3a4e;
    --frame-rim: rgba(242, 244, 247, 0.5);
    --frame-shadow: rgba(0, 0, 0, 0.7);
    --rail: #d9dee5;
    --rail-ink: #0b0d10;
    --rail-edge: rgba(255, 255, 255, 0.12);
    --focus: #f2f4f7;
  }
}

@media (prefers-contrast: more) {
  :root { --muted: #3a424c; --field: #121a26; --field-muted: #d9dadc; --field-sentence: #d9dadc; --signal: #a33409; --missed: #a33409; --found: #005385; --line: #8a929c; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --muted: #c5ccd5; --field: #121a26; --signal: #ffb020; --missed: #ffb020; --found: #7fb8e6; --line: #6b7480; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background-color: var(--ground); color: var(--ink); font-family: var(--sans); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 9; padding: 12px 16px; background-color: var(--ink); color: var(--ground); }
.skip:focus { top: 8px; }

/* The frame. */
.frame-box { container-type: inline-size; width: 100%; }
.frame {
  --e: clamp(11px, calc(6cqw - 12px), 34px);
  position: relative;
  padding: var(--e) var(--e) 0;
  border-radius: clamp(14px, 5cqw, 40px);
  background-image: linear-gradient(var(--frame-top), var(--frame-bottom));
  box-shadow: 0 0 0 1px var(--frame-rim), 0 22px 44px -18px var(--frame-shadow);
  overflow: hidden;
}
.timer {
  position: absolute;
  top: calc(var(--e) * 0.5 - 1.5px);
  left: var(--e);
  right: var(--e);
  height: 3px;
  border-radius: 2px;
  background-color: rgba(255, 255, 255, 0.24);
}
.timer i { display: block; height: 100%; width: calc(var(--left, 1) * 100%); border-radius: 2px; background-color: rgba(255, 255, 255, 0.4); }
[data-warn] .timer i { background-color: var(--warning); }
.ranks {
  position: absolute;
  left: 0;
  top: var(--e);
  width: var(--e);
  height: calc(100cqw - 2 * var(--e));
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  place-items: center;
  color: var(--engrave);
  font-weight: 600;
  font-size: clamp(11px, calc(var(--e) * 0.6), 15px);
  line-height: 1;
}
.grid { position: relative; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); border-radius: 2px; }
.bd { display: block; width: 100%; height: auto; border-radius: 2px; }
.rail {
  margin: calc(var(--e) * 0.22) calc(-1 * var(--e)) 0;
  padding: 0.25em var(--e) 0.5em;
  background-color: var(--rail);
  color: var(--rail-ink);
  box-shadow: inset 0 -1px 0 var(--rail-edge);
  font-size: clamp(11px, 2.5cqw, 15px);
  font-weight: 600;
}
.files { display: grid; grid-template-columns: repeat(8, 1fr); text-align: center; line-height: 1.5; }
.rail-side { display: flex; align-items: center; gap: 0.45em; font-size: clamp(11px, 2.2cqw, 13px); font-weight: 700; letter-spacing: 0.14em; line-height: 1.3; }
.rail-side svg { width: 1.5em; height: 1.5em; }

/* Squares, pieces, marks. */
.sq-l { fill: var(--sq-light); }
.sq-d { fill: var(--sq-dark); }
.pos { display: none; }
.pos.on { display: inline; }
.bd .halo { fill: none; stroke: var(--halo); stroke-linecap: round; stroke-linejoin: round; }
.bd .ring, .bd .tick, .bd .shaft, .bd .cross { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mk > g { display: none; }
.mk.is-found > .m-found, .mk.is-missed > .m-missed, .mk.is-missed > .m-arrow, .mk.is-wrong > .m-wrong { display: inline; }
.m-found .ring, .m-found .tick { stroke: var(--found); }
.m-missed .ring, .m-missed .halo { stroke-linecap: butt; }
.m-missed .ring, .m-arrow .shaft { stroke: var(--missed); }
.m-arrow .dot, .m-arrow .head { fill: var(--missed); }
.m-wrong .ring, .m-wrong .cross { stroke: var(--wrong); }
.pc.is-wrong { opacity: 0.45; }
.penalty { fill: var(--ink); font: 700 30px var(--sans); text-anchor: middle; opacity: 0; paint-order: stroke; stroke: var(--sq-light); stroke-width: 5px; }
.sweep { fill: #ffffff; opacity: 0; }

.sqs { position: absolute; inset: 0; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr); }
.sqs[hidden] { display: none; }
.sqs button { all: unset; display: block; -webkit-tap-highlight-color: transparent; }
.sqs button[aria-pressed] { cursor: pointer; }
.sqs button:focus-visible { outline: 3px solid var(--lit); outline-offset: -3px; box-shadow: inset 0 0 0 5px var(--ink); }

/* States. Without the script the page shows the example result; with it, the task first. */
.task { display: none; }
.js[data-state="ready"] .task, .js[data-state="scan"] .task { display: block; }
.js[data-state="ready"] .result, .js[data-state="scan"] .result,
.js[data-state="ready"] .on-result, .js[data-state="scan"] .on-result,
.js[data-state="reveal"] .on-scan { display: none; }
[hidden] { display: none !important; }
[data-scan]:not(.js) .on-scan { display: none; }
.task .king { width: 1em; height: 1em; vertical-align: -0.14em; margin-right: 0.18em; }

.r0 { --d: 0.028s; } .r1 { --d: 0.084s; } .r2 { --d: 0.141s; } .r3 { --d: 0.197s; }
.r4 { --d: 0.253s; } .r5 { --d: 0.309s; } .r6 { --d: 0.366s; } .r7 { --d: 0.422s; }

@property --turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 4px;
  background-image: conic-gradient(from var(--turn), transparent 0 72%, #ffffff 96%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js .m-found .ring, .js .m-found .halo, .js .m-found .tick { stroke-dasharray: 1; animation: draw 0.28s ease-out both; }
  .js .m-found polyline { animation-delay: 0.16s; }
  .js .pc.is-wrong { transform-box: fill-box; animation: shake 0.3s linear; }
  .js .mk.is-wrong .penalty { transform-box: fill-box; animation: float 0.8s ease-out both; }
  .js[data-state="reveal"] .sweep { animation: sweep 0.45s linear both; }
  .js[data-state="reveal"] .mk.is-found > .m-found { transform-box: fill-box; transform-origin: center; animation: pulse 0.32s ease-out var(--d) both; }
  .js[data-state="reveal"] .m-missed { transform-box: fill-box; transform-origin: center; animation: pop 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2) var(--d) both; }
  .js[data-state="reveal"] .m-arrow .shaft, .js[data-state="reveal"] .m-arrow .halo { stroke-dasharray: 1; animation: draw 0.22s ease-out var(--d) both; }
  .js[data-state="reveal"] .m-arrow .dot { animation: fade 0.1s linear var(--d) both; }
  .js[data-state="reveal"] .m-arrow .head { animation: fade 0.08s linear calc(var(--d) + 0.2s) both; }
  .js.perfect .m-found .ring, .js.perfect .m-found .tick {
    animation: draw 0.28s ease-out both, brighten 0.3s ease-out calc(0.5s + var(--n, 0) * 0.12s) both;
  }
  .js.perfect .frame::after { animation: lap 0.6s linear var(--lap, 0.6s) both; }
  .js[data-state="reveal"] .rise { animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both; }
  .js.perfect[data-state="reveal"] .rise { animation-delay: var(--lap, 0.6s); }
}
@media (prefers-reduced-motion: reduce) {
  .js[data-state="reveal"] .mk > g, .js[data-state="reveal"] .rise { animation: fade 0.2s linear both; }
  .js.perfect .m-found .ring, .js.perfect .m-found .tick { stroke: var(--lit); }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0% { transform: scale(1); } 45% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes brighten { to { stroke: var(--lit); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-4px); } 88% { transform: translateX(2px); } }
@keyframes float { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-46px); } }
@keyframes sweep { 0% { opacity: 0.9; transform: translateY(0); } 99% { opacity: 0.9; transform: translateY(806px); } 100% { opacity: 0; transform: translateY(806px); } }
@keyframes lap { 0% { opacity: 1; --turn: 0deg; } 85% { opacity: 1; } 100% { opacity: 0; --turn: 360deg; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* The result card's parts, shared: the score with its small %, and the sentences led by the
   outcome's ring glyph, as on the app's card. */
.score { margin: 0; font-weight: 600; line-height: 0.95; letter-spacing: -0.02em; font-variant-numeric: proportional-nums; }
.score small { font-size: 0.34em; font-weight: 600; margin-left: 0.06em; letter-spacing: 0; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { position: relative; padding-left: 1.75em; }
.lines li + li { margin-top: 0.5em; }
.lines li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 1em; height: 1em; border-radius: 50%; border: 0.16em solid; }
/* Each mark as the board draws it, so it reads at text size: found is the ring with its check
   in the gap, missed the dashed ring, a wrong tap the thin ring with its cross. */
.lines li::after { content: ""; position: absolute; }
.lines .l-missed::before { border-style: dashed; color: var(--mark-missed, var(--missed)); }
.lines .l-wrong::before { border-width: 0.09em; color: var(--mark-wrong, var(--wrong)); }
.lines .l-found::before { color: var(--mark-found, var(--found)); }
.lines .l-wrong::before, .lines .l-found::before { -webkit-mask: conic-gradient(from -40deg, transparent 0 76deg, #000 0); mask: conic-gradient(from -40deg, transparent 0 76deg, #000 0); }
.lines .l-found::after { left: 0.37em; top: -0.1em; width: 0.3em; height: 0.56em; border-right: 0.17em solid; border-bottom: 0.17em solid; border-radius: 0.04em; color: var(--mark-found, var(--found)); transform: rotate(42deg); }
.lines .l-wrong::after { left: 0.27em; top: 0.01em; width: 0.46em; height: 0.46em; color: var(--mark-wrong, var(--wrong));
  background-image: linear-gradient(45deg, transparent 41%, currentColor 41% 59%, transparent 59%), linear-gradient(-45deg, transparent 41%, currentColor 41% 59%, transparent 59%); }
.ns { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* The scan's own layout changes at Done; the script decides any scrolling. */
[data-scan] { overflow-anchor: none; }
[data-result]:focus { outline: none; }

/* The header's language list: a <details>, so it opens with no script. */
.top nav > *, .brand { white-space: nowrap; }
.lang { position: relative; }
.lang summary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 44px; min-height: 44px; padding: 0 10px; list-style: none; cursor: pointer; white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 0.42em; height: 0.42em; margin-top: -0.2em; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); }
.lang[open] summary::after { margin-top: 0.2em; transform: rotate(-135deg); }
.lang .name { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 15em; margin: 0; padding: 6px; list-style: none;
  background-color: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.4); }
.lang li a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 0 12px; border-radius: 9px; color: inherit; font-size: 16px; font-weight: 400; text-decoration: none; white-space: nowrap; }
.lang li a[aria-current] { font-weight: 600; }
.lang li a[aria-current]::after { content: ""; width: 0.36em; height: 0.7em; margin-top: -0.2em; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); }
@media (min-width: 760px) {
  .lang .name { display: inline; }
  .lang .code { display: none; }
}

/* The pages. */
body { font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

body {
  --pad: 16px;
  --board: min(100vw - 8px, 560px);
  --tick: color-mix(in srgb, var(--ink) 32%, transparent);
}

.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 var(--pad); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 44px; min-height: 44px; font-weight: 600; text-decoration: none; }
.brand img { border-radius: 7px; }
.top nav { display: flex; align-items: center; }
.top nav > a, .top nav > span, .lang summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav > a[aria-current] { color: var(--ink); }
.top nav > a.to-store, .top nav > span.to-store { color: var(--ink); font-weight: 600; }
.top .other { display: none; }
.lang summary { margin-right: -9px; }

/* The scan. Phone first: promise, board edge to edge, task, Done. */
.scan { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: 28px; }
.intro, .foot { width: 100%; max-width: calc(var(--board) + 2 * var(--pad) - 8px); justify-self: center; padding-left: var(--pad); padding-right: var(--pad); }
.intro { padding-top: 4px; padding-bottom: 14px; }
.intro h1 { margin: 0; font-size: clamp(24px, 6.6vw, 30px); line-height: 1.14; font-weight: 600; letter-spacing: -0.02em; }
.intro p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; max-width: 34em; }
.board { padding: 0 4px; width: 100%; max-width: calc(var(--board) + 8px); justify-self: center; }
.gauge { display: none; }
.foot { padding-top: 20px; }
.task { margin: 0 0 18px; font-size: clamp(26px, 7vw, 32px); line-height: 1.12; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.card { margin: 0 0 14px; padding: 16px 20px 18px; border-radius: 24px; background-color: var(--field); color: var(--field-ink); box-shadow: inset 0 0 0 1px var(--field-rim);
  --mark-missed: var(--field-missed); --mark-wrong: var(--field-wrong); --mark-found: var(--field-found); }
.card .score { font-size: 64px; }
.card .score small { color: var(--field-muted); }
.card .lines { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(242, 244, 247, 0.16); color: var(--field-sentence); font-size: 15px; line-height: 1.4; }
.card .lines strong { color: var(--field-ink); font-weight: 600; }
.actions { display: grid; gap: 4px; }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 24px; border: 0; border-radius: 28px;
  background-color: var(--signal); color: var(--on-signal); box-shadow: inset 0 -1px 0 var(--signal-edge);
  font: 600 19px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
/* The way to the app, under the promise, after a result and at the end. Released: Apple's
   badge as Apple draws it, at least 40 px tall, with a quarter of its height clear around it
   (developer.apple.com/app-store/marketing/guidelines), the devices beside it. Before release:
   the app's icon at the badge's height with "Coming soon to the App Store" in the ink, no button. */
.get { display: flex; align-items: center; gap: 16px; margin: 0; }
.get > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.35; text-wrap: pretty; }
.get .badge { flex: none; display: block; padding: 12px; margin: -12px; border-radius: 20px; }
.get .badge img { display: block; height: 48px; width: auto; }
.get.soon > img { flex: none; width: 48px; height: 48px; }
.get.soon strong { display: block; color: var(--ink); font-size: 19px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.get.soon span { display: block; margin-top: 2px; }
.intro .get { margin-top: 18px; }
.actions .get { margin-top: 16px; }

/* Below the scan. One column on a phone; wide, the page's two columns either side of the rule. */
.row { padding: 44px var(--pad) 0; }
.row > * { max-width: 560px; margin-left: auto; margin-right: auto; }
h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.rest p { margin: 14px 0 0; color: var(--muted); max-width: 30em; }
.rest p.big { color: var(--ink); font-size: clamp(20px, 2vw, 24px); line-height: 1.28; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
/* The levels: each clock as the frame's timer line, to scale; the board's own level is lit. */
.levels { width: 100%; max-width: calc(var(--board) + 2 * var(--pad) - 8px); justify-self: center; padding: 40px var(--pad) 0; }
.levels h2 { font-size: 17px; line-height: 1.3; letter-spacing: 0; }
.levels p { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
/* One grid for all five rows, so every line shares one scale whatever the words beside it. */
.clocks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 2em minmax(0, 1fr) auto auto; column-gap: 12px; }
.clocks li { display: grid; grid-column: 1 / -1; grid-template-columns: 2em minmax(0, 1fr) 5.4em 6.6em; column-gap: 12px; align-items: center; min-height: 30px; color: var(--muted); font-size: 15px; }
@supports (grid-template-columns: subgrid) {
  .clocks li { grid-template-columns: subgrid; }
}
.clocks .lv { font-weight: 600; }
.clocks .bar { height: 3px; border-radius: 2px; background-color: var(--tick); }
.clocks .bar i { display: block; height: 100%; border-radius: 2px; background-image: linear-gradient(to right, var(--missed) 0 var(--last), var(--muted) 0); }
.clocks .s15 i { width: 100%; --last: 20%; }
.clocks .s12 i { width: 80%; --last: 25%; }
.clocks .s10 i { width: 66.67%; --last: 30%; }
.clocks .s5 i { width: 33.33%; --last: 60%; }
.clocks .none { background-color: transparent; background-image: repeating-linear-gradient(to right, var(--tick) 0 3px, transparent 3px 9px); }
.clocks .val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.clocks .tier-name { font-size: 14px; text-align: right; white-space: nowrap; }
[data-level="L3"] .is-L3, [data-level="L4"] .is-L4, .scan:not(.js) .is-L3 { color: var(--ink); }
[data-level="L3"] .is-L3 .bar i, [data-level="L4"] .is-L4 .bar i, .scan:not(.js) .is-L3 .bar i { background-image: linear-gradient(to right, var(--missed) 0 var(--last), var(--ink) 0); }
.tiers .rest { margin-top: 32px; }
.row .rest p.big { color: var(--ink); }
.tier h2 { font-size: 26px; }
.tier .kind { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.tier ul { list-style: none; margin: 14px 0 0; padding: 0; }
.tier li { padding: 11px 0; border-top: 1px solid var(--line); text-wrap: balance; }
.tier .note { margin: 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; max-width: none; }
.last { padding-bottom: 52px; }
.plainly { margin: 0; color: var(--muted); font-size: 15px; }
.last .rest { margin-top: 24px; }

footer { padding: 16px var(--pad) 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer > * { max-width: 560px; margin-left: auto; margin-right: auto; }
footer nav { display: flex; flex-wrap: wrap; column-gap: 24px; margin-bottom: 8px; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; }
footer nav a[aria-current] { color: var(--muted); }
footer p { margin-top: 0; margin-bottom: 10px; }
footer p a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* The text pages (privacy, support, not found): the same two columns. The title and the list
   of sections sit beside the rule; the text reads on the other side. */
.doc { padding: 12px var(--pad) 56px; }
.doc-head, .prose { max-width: 640px; margin-left: auto; margin-right: auto; }
.doc-head h1 { margin: 0; font-size: clamp(34px, 9.4vw, 46px); line-height: 1.06; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.doc-head .effective, .doc-head .lead { margin: 12px 0 0; color: var(--muted); max-width: 34em; }
.doc-head .lead { font-size: 18px; line-height: 1.45; }
.doc-head .lead a, .prose a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.contents { display: none; }
.prose { margin-top: 28px; }
.prose section { padding: 22px 0 10px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.prose h2 { margin: 0 0 10px; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose p, .prose li, .faq dd, .doc-head p, .rest p, .levels p, .intro p, footer p { text-wrap: pretty; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; padding-left: 0.2em; }
.prose li::marker { color: var(--muted); }
/* The privacy policy's first section, its one-paragraph answer, on the app's slate field. */
.privacy .prose section:first-child { margin-bottom: 10px; padding: 20px 22px 22px; border: 0; border-radius: 24px; background-color: var(--field); color: var(--field-ink); box-shadow: inset 0 0 0 1px var(--field-rim); }
.privacy .prose section:first-child h2 { margin-bottom: 8px; color: var(--field-muted); font-size: 15px; letter-spacing: 0; }
.privacy .prose section:first-child p { margin: 0; font-size: clamp(19px, 2vw, 22px); line-height: 1.36; font-weight: 600; letter-spacing: -0.01em; text-wrap: pretty; }
.privacy .prose section:nth-child(2) { border-top: 0; }
.faq { margin: 0; }
.faq dt { padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; text-wrap: balance; }
.faq dt:first-child { padding-top: 4px; border-top: 0; }
.faq dd { margin: 4px 0 14px; color: var(--muted); }
.homes ul { list-style: none; margin: 0; padding: 0; }
.homes li { border-top: 1px solid var(--line); }
.homes li:last-child { border-bottom: 1px solid var(--line); }
.homes a { display: flex; align-items: center; min-height: 52px; font-size: 18px; font-weight: 600; text-decoration: none; }
@media (min-width: 1000px) {
  .doc {
    --aside: clamp(260px, calc(100vw - 640px - var(--gap) - 64px), 340px);
    --doc-unit: calc(var(--aside) + var(--gap) + 640px);
    display: grid; grid-template-columns: var(--aside) var(--gap) minmax(0, 640px); justify-content: center; padding: 28px 32px 80px;
  }
  main.doc::before { left: calc(50% - var(--doc-unit) / 2 + var(--aside) + 27px); top: 28px; }
  .doc-head, .prose { max-width: none; margin: 0; }
  .doc-head { grid-column: 1; position: sticky; top: 28px; align-self: start; }
  .doc-head h1 { font-size: clamp(34px, 3.1vw, 46px); }
  .doc-head .lead { font-size: 17px; }
  .contents { display: block; margin-top: 26px; }
  .contents ol { list-style: none; margin: 0; padding: 0; }
  .contents a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 1.3; text-decoration: none; }
  .contents a:hover { color: var(--ink); }
  .prose { grid-column: 3; }
  .support .prose section:first-child { padding-top: 6px; border-top: 0; }
  .prose section { scroll-margin-top: 28px; }
  .homes li:first-child { border-top: 0; }
}
@media (min-width: 1000px) and (max-height: 780px) {
  .doc-head { position: static; }
}

@media (max-width: 381px) { .board { padding: 0; } }
@media (max-width: 479px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 359px) {
  .top nav > a, .top nav > span, .lang summary { padding: 0 6px; font-size: 14px; }
  .lang summary { margin-right: -6px; }
}
@media (min-width: 640px) {
  .top .other { display: inline-flex; }
}
@media (min-width: 600px) {
  body { --pad: 32px; --board: min(560px, calc((var(--vh) - 56px - 300px) / 1.09)); }
}
@media (min-width: 600px) and (max-height: 760px) { body { --board: 420px; } }

/* Wide: the app's wide scan screen. */
@media (min-width: 1000px) {
  body {
    --gap: 116px;
    --pane: clamp(320px, calc(100vw - var(--board) - var(--gap) - 64px), 440px);
    --board: clamp(400px, min(calc((var(--vh) - 56px - 48px) / 1.09), calc(100vw - var(--gap) - 320px - 64px)), 780px);
    --e2: clamp(11px, calc(var(--board) * 0.06 - 12px), 34px);
    --unit: calc(var(--board) + var(--gap) + var(--pane));
    --rule-x: calc(50% - var(--unit) / 2 + var(--board) + 27px);
  }
  main { position: relative; }
  main::before { content: ""; position: absolute; z-index: 1; left: var(--rule-x); top: calc(12px + var(--board) - var(--e2)); bottom: 0; width: 1px; background-color: var(--tick); }
  .scan { grid-template-columns: var(--board) var(--gap) var(--pane); grid-template-rows: auto 1fr auto; justify-content: center; padding: 12px 32px 36px; }
  .board { grid-column: 1; grid-row: 1 / 4; padding: 0; max-width: none; }
  .scan .timer { opacity: 0; }
  .gauge { display: block; grid-column: 2; grid-row: 1 / 4; padding: var(--e2) 0 0 26px; }
  .scan:not(.js) .gauge { visibility: hidden; }
  .scale { position: relative; width: 3px; height: calc(var(--board) - 2 * var(--e2)); border-radius: 2px;
    background-image: linear-gradient(to top, var(--ink) 0 calc(var(--left, 1) * 100%), transparent 0), linear-gradient(var(--tick), var(--tick)); }
  [data-warn] .scale { background-image: linear-gradient(to top, var(--missed) 0 calc(var(--left, 1) * 100%), transparent 0), linear-gradient(var(--tick), var(--tick)); }
  .scale::before { content: ""; position: absolute; right: 8px; top: 0; bottom: -1px; width: 8px;
    background-image: repeating-linear-gradient(to bottom, var(--tick) 0 1px, transparent 1px calc(100% / var(--secs, 12))); }
  .pointer { position: absolute; left: 0; top: calc((1 - var(--left, 1)) * 100%); display: flex; align-items: center; height: 0; padding-left: 14px; }
  .pointer::before { content: ""; position: absolute; left: -12px; width: 20px; height: 3px; border-radius: 2px; background-color: var(--ink); }
  .pointer b { min-width: 1.2em; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
  [data-warn] .pointer b { color: var(--missed); }
  [data-warn] .pointer::before { background-color: var(--missed); }
  .intro, .foot, .levels { grid-column: 3; max-width: none; padding-left: 0; padding-right: 0; }
  .levels { grid-row: 2; align-self: start; padding-top: 22px; padding-bottom: 20px; }
  .levels p { display: none; }
  .intro { grid-row: 1; padding-top: calc(var(--e2) - 6px); padding-bottom: 20px; }
  .intro h1 { font-size: clamp(34px, 3.1vw, 46px); line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }
  .intro p { margin-top: 14px; font-size: 17px; line-height: 1.45; }
  .foot { grid-row: 3; align-self: end; padding-top: 0; }
  .task { font-size: clamp(28px, 2.5vw, 36px); margin-bottom: 16px; }
  /* The promise's way to the app is in view beside the result: one per screen. */
  .actions .get { display: none; }
  .row { display: grid; grid-template-columns: var(--board) var(--gap) var(--pane); justify-content: center; padding: 56px 32px 0; }
  .row > * { max-width: none; margin: 0; }
  .row .main { grid-column: 1; padding-right: 24px; }
  .row .rest { grid-column: 3; }
  .row .rest > :first-child { margin-top: 0; }
  .rest p.big:first-child { margin-top: 6px; }
  .tiers .rest, .last .rest { margin-top: 0; }
  .last { padding-bottom: 64px; align-items: center; }
  .plainly { font-size: 16px; max-width: 30em; }
  footer > * { max-width: var(--unit); }
}
@media (min-width: 1000px) and (max-height: 700px) {
  .intro p { font-size: 15px; margin-top: 8px; }
  .intro h1 { font-size: 32px; }
  .task { font-size: 26px; margin-bottom: 12px; }
  .card { padding: 12px 18px 14px; margin-bottom: 10px; }
  .card .score { font-size: 48px; }
  .card .lines { margin-top: 8px; padding-top: 8px; font-size: 14px; }
  .intro .get { margin-top: 14px; }
  .scan { grid-template-rows: auto 1fr auto auto; }
  .levels { grid-column: 1 / 4; grid-row: 4; align-self: start; max-width: 560px; padding: 36px 0 0; }
  .levels p { display: block; }
  main::before { display: none; }
}
