/* The public check page. Self-contained: a stranger with no account opens this page and nothing
 * else, so it loads none of the console's stylesheet. It is built from the same parts, though:
 * the tokens, type sizes, radii and hairlines below are public/amail.css's, value for value.
 *
 * One rule decides what is a card here, as in the console: a card is for something to press.
 * The form is a card. The answer is status, so it is plain type on the canvas, with hairlines
 * between its rows, a tile for its state, and no coloured edge anywhere. */

@font-face { font-family: "Outfit"; src: url("/assets/outfit-latin-wght-normal.woff2") format("woff2-variations"), url("/assets/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --card: #ffffff;
  --well: #f3f4f6;
  --line: #e5e7eb;
  --edge: #d5d8de;
  --field-line: #868b94;
  --ink: #15171c;
  --ink-2: #4a4f58;
  --ink-3: #686e78;
  --coral: #ee5335;
  --coral-strong: #c93f1f;
  --coral-deep: #ae3418;
  --on-coral: #ffffff;
  --green: #17704a;
  --green-tint: #e0f2e8;
  --shadow: 0 0 0 1px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.06), 0 10px 24px -12px rgba(16, 24, 40, 0.18);
  /* Quiet tints for the changelog's kinds of change: one each, the same shape (D-460). */
  --blue: #1f4fa3; --blue-tint: #e3ecfb; --red: #a4321a; --red-tint: #fbe5e1;
  /* A block of code is a dark panel on either page (D-460): every colour on it is read against --code-bg and --code-bar. */
  --code-bg: #17191e; --code-bar: #1f2228; --code-edge: #0b0c0f; --code-ink: #e6e8eb; --code-muted: #a2a9b4;
  --code-comment: #8d95a1; --code-string: #9fd5a6; --code-number: #f3b47c; --code-keyword: #c6a6ff; --code-key: #8ec5ff; --code-focus: #ffa48b;

  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-code: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --t-large: 600 30px/1.12 var(--font);
  --t-title: 600 23px/1.2 var(--font);
  --t-section: 600 18px/1.25 var(--font);
  --t-row: 500 16px/1.3 var(--font);
  --t-body: 400 15px/1.5 var(--font);
  --t-meta: 400 13px/1.4 var(--font);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --gutter: 20px;
  --radius-card: 20px;
  --radius-thumb: 12px;
  --radius-pill: 999px;
  --button-h: 52px;
  --tap: 44px;
  --thumb: 44px;
  --container: 600px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0e10; --card: #1a1c20; --well: #22252a; --line: #2c2f35; --edge: #3a3e45; --field-line: #8a909a;
    --ink: #f3f4f6; --ink-2: #b9bec7; --ink-3: #9ba1ab;
    --coral: #f0674b; --coral-strong: #c93f1f; --coral-deep: #ffa48b; --on-coral: #ffffff;
    --green: #7ad6a4; --green-tint: #173323;
    --shadow: 0 0 0 1px var(--line), 0 10px 24px -12px rgba(0, 0, 0, 0.6);
    --blue: #8fb8f5; --blue-tint: #16243a; --red: #ffa48b; --red-tint: #3a1a14;
    --code-bg: #1a1d22; --code-bar: #22252b; --code-edge: #33373e;
  }
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: var(--t-body); font-synthesis: none; -webkit-font-smoothing: antialiased; }
h1, h2, p, ol, ul, dl, dd, pre { margin: 0; }
h1, h2 { font-weight: 600; }
ol, ul { padding: 0; list-style: none; }
p { text-wrap: pretty; }
a { color: var(--coral-deep); font-weight: 500; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: var(--space-4); top: -80px; z-index: 2; padding: var(--space-3) var(--space-4); border-radius: var(--radius-thumb); background: var(--ink); color: var(--bg); }
.skip:focus { top: var(--space-4); }

/* ------------------------------------------------------------------ the frame */
.head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space-3) var(--gutter); padding-top: max(var(--space-3), env(safe-area-inset-top)); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--ink); text-decoration: none; font: var(--t-row); font-weight: 600; }
.wordmark-dot { width: 22px; height: 22px; border-radius: var(--radius-pill); background: var(--coral); flex: none; }
.head-note { font: var(--t-meta); color: var(--ink-2); }
main { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-8); display: flex; flex-direction: column; gap: var(--space-8); flex: 1; }
.foot { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space-6) var(--gutter) max(var(--space-6), env(safe-area-inset-bottom)); color: var(--ink-2); font: var(--t-meta); }

/* ------------------------------------------------------------------ the question, and the form */
.intro { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); }
.intro h1 { font: var(--t-large); letter-spacing: -0.025em; text-wrap: balance; }
.lede { color: var(--ink-2); max-width: 34em; }
.intro + .lookup { margin-top: calc(-1 * var(--space-3)); }

/* The one thing to press, so the one card. */
.lookup { display: flex; flex-direction: column; gap: var(--space-2); background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: var(--space-5); }
.lookup label { font: 500 13px/1.4 var(--font); color: var(--ink-2); }
.lookup-row { display: flex; flex-direction: column; gap: var(--space-3); }
.lookup input { width: 100%; min-width: 0; height: var(--button-h); padding: 0 var(--space-4); border: 1px solid var(--field-line); border-radius: var(--radius-thumb); background: var(--card); color: var(--ink); font: 500 16px/1.3 var(--font-code); }
.lookup input::placeholder { color: var(--ink-3); font-weight: 400; }
.lookup input:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: -1px; border-color: var(--coral-deep); border-radius: var(--radius-thumb); }
.lookup input[aria-invalid="true"] { border-color: var(--coral-deep); }
.lookup button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--button-h); padding: 0 var(--space-8); border: 0; border-radius: var(--radius-pill); background: var(--coral-strong); color: var(--on-coral); font: 600 15px/1 var(--font); letter-spacing: 0.005em; white-space: nowrap; cursor: pointer; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.lookup button:active { transform: scale(0.97); }
.lookup button:focus-visible { border-radius: var(--radius-pill); }
@media (hover: hover) and (pointer: fine) { .lookup button:hover { background: var(--coral); } }
.problem { font: var(--t-meta); font-weight: 500; color: var(--coral-deep); }

/* ------------------------------------------------------------------ the answer: plain, on the canvas */
.verdict { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding-top: var(--space-4); }
.tile { width: var(--thumb); height: var(--thumb); border-radius: var(--radius-thumb); background: var(--well); color: var(--ink-2); display: grid; place-content: center; flex: none; margin-bottom: var(--space-1); }
.verdict.is-strong .tile { background: var(--green-tint); color: var(--green); }
/* Switched off by its person: not a warning and not a pass. Ink, the colour of a thing decided. */
.verdict.is-off .tile { background: var(--ink); color: var(--bg); }
.verdict.is-off h1 { max-width: 16em; }
.mark { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.verdict h1 { font: var(--t-large); letter-spacing: -0.025em; text-wrap: balance; max-width: 20em; }
.verdict.is-weak h1, .verdict.is-unknown h1 { font: var(--t-title); letter-spacing: -0.02em; }
.address { max-width: 100%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-thumb); background: var(--well); font: 500 15px/1.5 var(--font-code); overflow-wrap: anywhere; }
.meta { font: var(--t-meta); color: var(--ink-3); }

.columns { display: grid; gap: var(--space-8); align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.block { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.block h2 { font: var(--t-section); letter-spacing: -0.015em; }
.block > p { color: var(--ink-2); max-width: 34em; }

/* How we know: four rows with a hairline between them. A row that holds has a green dot and
 * dark type; one that does not is quiet. The difference is carried by weight and the mark too. */
.ladder > li + li { border-top: 1px solid var(--line); }
.rung { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--space-3); padding: var(--space-3) 0; }
.rung-dot { width: 24px; height: 24px; border-radius: var(--radius-pill); display: grid; place-content: center; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--edge); }
.rung-dot .mark { width: 14px; height: 14px; stroke-width: 2.75; }
.rung.is-held .rung-dot { background: var(--green); color: var(--card); box-shadow: none; }
.rung-title { font: var(--t-row); color: var(--ink-2); padding-top: 1px; }
.rung.is-held .rung-title { color: var(--ink); font-weight: 600; }
.rung-detail { font: var(--t-meta); color: var(--ink-2); margin-top: 2px; }

/* About this address: a definition list, label then value. */
.facts > * + * { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; gap: var(--space-3); padding: var(--space-3) 0; }
.fact dt { font: var(--t-meta); color: var(--ink-2); }
.fact dd { font: var(--t-body); font-weight: 500; overflow-wrap: anywhere; }

.limits { display: flex; flex-direction: column; gap: var(--space-2); color: var(--ink-2); }
.limits li { position: relative; padding-left: var(--space-5); }
.limits li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.inline-address { font-family: var(--font-code); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ for programs: one tap away */
.technical { border-top: 1px solid var(--line); }
.technical summary { display: flex; align-items: center; min-height: var(--button-h); cursor: pointer; font: var(--t-row); color: var(--ink-2); list-style: none; }
.technical summary::-webkit-details-marker { display: none; }
.technical summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; margin-right: var(--space-1); border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 200ms var(--ease-out); }
.technical[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.technical[open] summary { color: var(--ink); }
.technical p { font: var(--t-meta); color: var(--ink-2); max-width: 44em; }
.statement { margin: var(--space-3) 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-thumb); background: var(--well); font: 400 13px/1.6 var(--font-code); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 172px; overflow: auto; }
.digests { display: grid; gap: var(--space-1); margin: var(--space-3) 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-thumb); background: var(--well); }
.digests dt { font: var(--t-meta); color: var(--ink-2); }
.digests dt:not(:first-child) { margin-top: var(--space-2); }
.digests dd { margin: 0; min-width: 0; }
/* A digest is one long word: it breaks anywhere, so a phone never scrolls sideways to read it. */
.digests code { font: 400 13px/1.6 var(--font-code); color: var(--ink); overflow-wrap: anywhere; word-break: break-all; }
.technical-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); padding-bottom: var(--space-2); }
.technical-links a { display: inline-flex; align-items: center; min-height: var(--tap); }
.copy { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--edge); color: var(--ink); font: 600 13px/1 var(--font); cursor: pointer; }
.copy:focus-visible { border-radius: var(--radius-pill); }

/* ------------------------------------------------------------------ the other doors: verify, live test, message */
/* Three places to go, so three rows to press: one card, hairlines between its rows. */
.doors { display: flex; flex-direction: column; gap: var(--space-3); }
.doors h2 { font: var(--t-section); letter-spacing: -0.015em; }
.doors ul { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); overflow: hidden; }
.doors li + li { border-top: 1px solid var(--line); }
.door { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: var(--space-3) var(--space-5); color: var(--ink); text-decoration: none; }
.door-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.door-title { font: var(--t-row); }
.door-meta { font: var(--t-meta); color: var(--ink-2); }
.door-go { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.door:focus-visible { outline-offset: -3px; border-radius: var(--radius-card); }
@media (hover: hover) and (pointer: fine) { .door:hover { background: var(--well); } }

/* A form with more than one field: the same card, each field under its label, the one button last. */
.form-title { font: var(--t-section); letter-spacing: -0.015em; margin-bottom: var(--space-1); }
.lookup .field { display: flex; flex-direction: column; gap: var(--space-2); }
.lookup .field + .field, .lookup .field + .tick, .lookup .tick + .problem, .lookup .field + .problem { margin-top: var(--space-2); }
.lookup .field input[type="text"] { font-family: var(--font); }
.lookup > button { margin-top: var(--space-3); }
.hint { font: var(--t-meta); color: var(--ink-2); }
.tick { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); color: var(--ink); cursor: pointer; }
.lookup .tick { font: var(--t-body); color: var(--ink); }
.tick input { width: 20px; height: 20px; min-width: 20px; margin: 0; padding: 0; accent-color: var(--coral-strong); }
.back { font: var(--t-meta); color: var(--ink-2); }
.back a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Waiting is neither a pass nor a problem: a neutral tile, and the code as the largest thing on the page. */
.verdict.is-wait h1 { font: var(--t-title); letter-spacing: -0.02em; }
.code-big { padding: var(--space-3) var(--space-5); border-radius: var(--radius-thumb); background: var(--card); box-shadow: var(--shadow); font: 600 30px/1.2 var(--font-code); letter-spacing: 0.08em; user-select: all; overflow-wrap: anywhere; }
.say { padding: var(--space-3) var(--space-4); border-radius: var(--radius-thumb); background: var(--well); color: var(--ink); }

/* The level: a number a business grants against, in one quiet line above the facts it stands for. */
.level { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font: var(--t-meta); color: var(--ink-2); }
.level-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 var(--space-3); border-radius: var(--radius-pill); background: var(--well); color: var(--ink); font: 600 13px/1 var(--font); letter-spacing: 0.02em; white-space: nowrap; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); margin-top: var(--space-2); }
.foot-links a { display: inline-flex; align-items: center; min-height: var(--tap); }
/* On a phone the links are two columns, so none is left on a line of its own. */
@media (max-width: 599px) {
  .foot-links { display: grid; grid-template-columns: repeat(2, max-content); gap: 0 var(--space-8); }
  .foot-links a { justify-self: start; }
}

/* ------------------------------------------------------------------ pages for businesses to read */
.doc { display: flex; flex-direction: column; gap: var(--space-8); }
.doc h1 { font: var(--t-large); letter-spacing: -0.025em; text-wrap: balance; }
.doc h2 { font: var(--t-title); letter-spacing: -0.02em; scroll-margin-top: var(--space-6); }
.doc h3 { margin: 0; font: var(--t-section); letter-spacing: -0.015em; scroll-margin-top: var(--space-6); }
.doc section { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.doc section > p, .doc section > ul, .doc section > ol { color: var(--ink-2); max-width: 44em; }
.doc section > ul, .doc section > ol { display: flex; flex-direction: column; gap: var(--space-2); padding-left: var(--space-5); list-style: disc; }
.doc section > ol { list-style: decimal; }
.doc code { font: 500 13.5px/1.5 var(--font-code); color: var(--ink); overflow-wrap: anywhere; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); font: var(--t-meta); }
.doc-nav a { display: inline-flex; align-items: center; min-height: var(--tap); }
/* The page you are on: said in ink, not as a link to itself. */
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: none; }
.doc section > h3 { margin-top: var(--space-3); }
/* What is on a long page: status, so plain type on the canvas with a hairline, in two columns where there is room. */
.toc { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toc h2 { font: var(--t-meta); font-weight: 600; color: var(--ink-2); letter-spacing: 0.02em; }
.toc ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-6); font: var(--t-body); }
.toc a { display: inline-flex; align-items: center; min-height: 36px; }
.aside { font: var(--t-meta); }
.doc .quote { margin: 0; padding: var(--space-4); border-radius: var(--radius-thumb); background: var(--well); color: var(--ink); max-width: 44em; }
.glossary { display: flex; flex-direction: column; margin: 0; }
.glossary > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px var(--space-5); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.glossary dt { font: var(--t-row); font-weight: 600; }
.glossary dd { color: var(--ink-2); }
@media (min-width: 640px) {
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary > div { grid-template-columns: 170px minmax(0, 1fr); }
}
/* The levels: a list of rows on a phone, each with its number as a pill. */
.levels { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); overflow: hidden; }
.levels > li + li { border-top: 1px solid var(--line); }
.levels > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-2) var(--space-4); padding: var(--space-4) var(--space-5); align-items: start; }
.levels .level-pill { justify-self: start; margin-top: 2px; }
.levels-name { font: var(--t-row); font-weight: 600; }
.levels-text { font: var(--t-body); color: var(--ink-2); margin-top: 2px; }
.levels-grant { font: var(--t-meta); color: var(--ink-2); margin-top: var(--space-2); }
.levels-grant strong { color: var(--ink); font-weight: 600; }
/* A handful of things of the same shape, each a name, a sentence or two, and one line set apart: the four rules a person has. */
.rule-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.rule-block { display: grid; align-content: start; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-radius: var(--radius-thumb); box-shadow: inset 0 0 0 1px var(--line); }
.rule-block h3 { font: var(--t-row); font-weight: 600; }
.rule-block p { margin: 0; font: var(--t-meta); color: var(--ink-2); }
.rule-block .rule-start { color: var(--ink); }
@media (max-width: 719px) { .rule-blocks { grid-template-columns: minmax(0, 1fr); } }
.table-wrap { max-width: 100%; overflow-x: auto; border-radius: var(--radius-thumb); box-shadow: inset 0 0 0 1px var(--line); }
.doc table { width: 100%; border-collapse: collapse; font: var(--t-meta); }
.doc th, .doc td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; }
.doc th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.doc td { color: var(--ink-2); }
/* The name in a row's first cell is one word a program reads: it is never broken in two. */
.doc td:first-child code { overflow-wrap: normal; white-space: nowrap; }
.doc tr + tr td, .doc thead + tbody td { border-top: 1px solid var(--line); }
/* On a phone a table is a list: each row is a block, its first cell the name and the rest under it. Nothing is pushed sideways. */
@media (max-width: 639px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .doc tr { padding: var(--space-3) var(--space-4); }
  .doc tr + tr { border-top: 1px solid var(--line); }
  .doc td, .doc tr + tr td, .doc thead + tbody td { padding: 0; border-top: 0; }
  .doc td + td { margin-top: var(--space-1); }
  .doc td:first-child { color: var(--ink); font-weight: 600; }
  .doc td code, .doc td:first-child code { white-space: normal; overflow-wrap: anywhere; }
}
.endpoint { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.method { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--space-2); border-radius: 6px; background: var(--ink); color: var(--bg); font: 600 12px/1 var(--font-code); letter-spacing: 0.04em; }

@media (min-width: 560px) {
  .lookup-row { flex-direction: row; }
  .lookup input { flex: 1; }
  .lookup > button { align-self: flex-start; }
}
@media (min-width: 960px) {
  .has-answer { --container: 960px; }
  main { padding-top: var(--space-8); }
  .columns { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-10); }
  .is-doc { --container: 760px; }
  /* A page of examples: the column holds a hundred characters of code. Prose keeps its own measure. */
  .is-doc.is-reference { --container: 880px; }
}

/* ------------------------------------------------------------------ the fourth door: ask an agent for what you need */
/* The things to ask for: one group of boxes, each on its own line. */
.ticks { border: 0; margin: var(--space-2) 0 0; padding: 0; min-width: 0; display: flex; flex-direction: column; }
.ticks legend { padding: 0; margin-bottom: var(--space-1); font: 500 13px/1.4 var(--font); color: var(--ink-2); }
.ticks .tick input { height: 20px; }
.tick-hint { font: var(--t-meta); color: var(--ink-3); margin-left: var(--space-1); }
.lookup .ticks + .field, .lookup .field + .ticks { margin-top: var(--space-2); }
.lookup select { width: 100%; min-width: 0; height: var(--button-h); padding: 0 var(--space-4); border: 1px solid var(--field-line); border-radius: var(--radius-thumb); background: var(--card); color: var(--ink); font: 500 16px/1.3 var(--font); }
.lookup select:focus-visible { outline: 2px solid var(--coral-deep); outline-offset: -1px; border-color: var(--coral-deep); }
/* The form that carries this browser's own token back, by post: one button, quiet when it only looks again, filled when it shows the answer. */
.again { display: flex; }
.again button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--button-h); padding: 0 var(--space-8); border: 0; border-radius: var(--radius-pill); background: var(--coral-strong); color: var(--on-coral); font: 600 15px/1 var(--font); cursor: pointer; transition: transform 140ms var(--ease-out); }
.again button.quiet { min-height: var(--tap); padding: 0; background: transparent; color: var(--ink-2); font: var(--t-meta); text-decoration: underline; text-underline-offset: 2px; }
.again button:active { transform: scale(0.97); }
.again button:focus-visible { border-radius: var(--radius-pill); }
.facts dd { overflow-wrap: anywhere; }
/* A field keeps its own height, and a box its own size, at every width: the rule above that lets the one-line lookup's field grow is not for these. */
.lookup .field > input, .lookup .field > select, .lookup .tick input { flex: none; }

/* ------------------------------------------------------------------ D-450: the answer in a band, the frame finished
 * The verdict is a band: the drawing (a check that holds) or its mark, the headline, the address as a chip, and the three lines
 * as pills. Why each holds is behind "How we know". The frame has a right-hand slot on every page and a proper foot. */
.wordmark { font: 600 18px/1 var(--font); letter-spacing: -0.02em; gap: 9px; }
.wordmark-mark { width: 28px; height: 28px; flex: none; }
.wordmark-mark rect { fill: var(--coral); }
.wordmark-mark path { fill: none; stroke: #ffffff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.head { gap: var(--space-3); }
.head-note { margin-right: auto; padding-left: var(--space-3); border-left: 1px solid var(--edge); }
/* "Sign in" as the home page sets it (D-460): a quiet button, the same weight on every public page. */
.head-end { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-3); border-radius: var(--radius-pill); color: var(--ink-2); text-decoration: none; font: 500 15px/1 var(--font); letter-spacing: 0.005em; transition: background-color 160ms ease, color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .head-end:hover { background: var(--well); color: var(--ink); } }
@media (max-width: 479px) { .head-note { display: none; } .head .wordmark { margin-right: auto; } }

.verdict { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: var(--space-3); padding: var(--space-6); border-radius: var(--radius-card); background: var(--card); box-shadow: var(--shadow); }
.verdict.is-strong { background: var(--green-tint); box-shadow: none; }
.verdict-art { width: 96px; height: auto; display: block; }
.verdict .address { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.verdict.is-strong .address { background: var(--card); box-shadow: none; }
.verdict .tile { margin-bottom: 0; }
@media (min-width: 720px) {
  .verdict:has(> .verdict-art) { grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--space-6); align-items: start; }
  .verdict:has(> .verdict-art) > .verdict-art { grid-row: 1 / span 5; }
  .verdict:has(> .verdict-art) > :not(.verdict-art) { grid-column: 2; }
}
.proof-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.proof-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px 0 8px; border-radius: var(--radius-pill); background: var(--card); color: var(--ink-2); font: 500 13px/1.3 var(--font); box-shadow: inset 0 0 0 1px var(--line); }
.proof-pill .mark { width: 16px; height: 16px; stroke-width: 2.5; color: var(--ink-3); }
.proof-pill.is-held { color: var(--ink); box-shadow: none; }
.proof-pill.is-held .mark { color: var(--green); }

/* How we know: one tap down. */
details.how > summary { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap); cursor: pointer; list-style: none; }
details.how > summary::-webkit-details-marker { display: none; }
details.how > summary h2 { font: var(--t-section); letter-spacing: -0.015em; }
details.how .how-go { width: 18px; height: 18px; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
details.how[open] .how-go { transform: rotate(90deg); }
details.how > .lede { margin-bottom: var(--space-1); }

/* Check another address: across the page, the field beside its button from a tablet up. */
.has-answer .lookup { width: 100%; }
@media (min-width: 600px) { .lookup-row { flex-direction: row; } .lookup-row input { flex: 1; } .lookup-row button { flex: none; } }

/* The foot: the mark, one line on what Amail is, and the links, above a hairline. */
.foot { border-top: 1px solid var(--line); margin-top: var(--space-4); }
.foot-in { display: grid; gap: var(--space-5); }
.foot-brand { display: flex; flex-direction: column; gap: var(--space-2); max-width: 36em; }
.foot-brand .wordmark { font-size: 15px; min-height: 0; }
.foot-brand .wordmark-mark { width: 22px; height: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.foot-links a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 32px; }
@media (min-width: 900px) { .foot-in { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } .foot-links { justify-content: flex-end; } }

/* Placeholders are hints, in the sans; the value typed is in the monospace. */
.lookup input::placeholder { font-family: var(--font); }
/* How we know runs across the answer, above what the address is and what this does not tell you, which sit side by side. */
.columns > details.how { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .columns:has(> details.how) { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .columns:has(> details.how) > .stack { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-10); }
}
/* The one line of honesty under the pills stays in sight; only the reasons fold (D-450). */
.verdict .plain { font: var(--t-body); color: var(--ink); max-width: 36em; }

/* ------------------------------------------------------------------ D-454: the documentation's frame
 * One column width on every documentation page; the pages and this page's contents in a column of their own beside it, in view
 * while the article scrolls, with the section being read marked. Code keeps its lines and scrolls sideways, with a copy button. */
.is-doc, .is-doc.is-reference { --container: 1080px; }
.doc-layout { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: var(--space-6); flex: 1; }
.doc-layout > main { max-width: none; margin: 0; padding-left: 0; padding-right: 0; min-width: 0; }
.doc-side { display: flex; flex-direction: column; gap: var(--space-5); padding-top: var(--space-4); min-width: 0; }
.doc-side .doc-nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: var(--space-1); }
.doc-side .doc-nav a { min-height: 36px; padding: 0 var(--space-3); border-radius: 8px; color: var(--ink-2); text-decoration: none; font: 500 15px/1 var(--font); }
.doc-side .doc-nav a:hover { background: var(--well); color: var(--ink); }
.doc-side .doc-nav a[aria-current="page"] { background: var(--well); color: var(--ink); font-weight: 600; }
.doc-side .toc { padding: var(--space-3) 0 0; border-bottom: 0; }
.doc-side .toc ul { display: flex; flex-direction: column; gap: 0; font: var(--t-meta); }
.doc-side .toc a { min-height: 32px; color: var(--ink-2); text-decoration: none; padding: 0 var(--space-3); border-radius: 8px; }
.doc-side .toc a:hover { color: var(--ink); background: var(--well); }
.doc-side .toc a[aria-current="true"] { color: var(--ink); font-weight: 600; background: var(--well); }
@media (max-width: 1023px) { .doc-side .toc { display: none; } }
@media (min-width: 1024px) {
  .doc-layout { grid-template-columns: 232px minmax(0, 1fr); gap: var(--space-10); }
  .doc-side { position: sticky; top: var(--space-4); align-self: start; max-height: calc(100dvh - 2 * var(--space-4)); overflow-y: auto; padding-top: var(--space-8); }
  .doc-side .doc-nav { flex-direction: column; }
  .doc-side .doc-nav a { min-height: 40px; }
  /* The page you are on, plain on either theme: a card's ground and a hairline, not a tint the canvas almost shares (D-460). */
  .doc-side .doc-nav a[aria-current="page"] { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
}

/* ------------------------------------------------------------------ D-457: the documentation's prose
 * A quick start is numbered steps, each a title, one line and its code; a rule is a callout beside the call it governs; detail is
 * one click down, in a fold; a block of code says what it is. */
.lede { font: 400 17px/1.5 var(--font); color: var(--ink-2); max-width: 40em; }
.doc section > ol.steps { list-style: none; padding-left: 0; gap: var(--space-8); max-width: none; color: var(--ink); counter-reset: step; }
.steps > li { position: relative; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding-left: 44px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font: 600 14px/1 var(--font); }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 34px; bottom: calc(-1 * var(--space-8) + 6px); width: 1px; background: var(--line); }
.step-title { font: var(--t-row); font-weight: 600; color: var(--ink); }
.step-text { color: var(--ink-2); max-width: 44em; }
.or { font: 600 12px/1.2 var(--font); letter-spacing: 0.04em; color: var(--ink-3); text-transform: uppercase; }
.callout { max-width: 44em; padding: var(--space-3) var(--space-4); border-radius: var(--radius-thumb); background: var(--well); font: var(--t-meta); color: var(--ink-2); }
.callout .tag { margin-right: var(--space-2); color: var(--ink); font-weight: 600; }
.doc details.more { max-width: 44em; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc details.more + details.more { border-top: 0; }
.doc details.more > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; font: 500 14px/1.3 var(--font); color: var(--ink); }
.doc details.more > summary::-webkit-details-marker { display: none; }
.doc details.more > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 12px 0 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 160ms var(--ease-out); }
.doc details.more[open] > summary::before { transform: rotate(45deg); }
.doc details.more > p, .doc details.more > ul, .doc details.more > ol, .doc details.more > .table-wrap, .doc details.more > .code-panel { margin: 0 0 var(--space-4); color: var(--ink-2); }
.doc details.more > ul, .doc details.more > ol { display: flex; flex-direction: column; gap: var(--space-2); padding-left: var(--space-5); list-style: disc; }
.doc details.more > ol { list-style: decimal; }
.doc .quote.lines { white-space: pre-line; }
.ep a { text-decoration: none; }
.ep .method { height: 20px; font-size: 11px; margin-right: var(--space-2); }
.doc td.ep code { white-space: nowrap; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.pair > div { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; padding: var(--space-4); border-radius: var(--radius-thumb); box-shadow: inset 0 0 0 1px var(--line); }
.pair h4 { margin: 0; font: var(--t-row); font-weight: 600; }
.pair p { color: var(--ink-2); font: var(--t-meta); }
.change-list { display: flex; flex-direction: column; }
.change { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.change-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font: var(--t-meta); color: var(--ink-3); }
.change p { color: var(--ink-2); max-width: 44em; }
/* Every kind of change is the same pill, each in its own quiet colour (D-460); a kind with no colour of its own is the neutral one. */
.kind { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--radius-pill); font: 600 12px/1 var(--font); letter-spacing: 0.01em; background: var(--well); color: var(--ink); }
.kind-added { background: var(--green-tint); color: var(--green); }
.kind-changed { background: var(--blue-tint); color: var(--blue); }
.kind-removed { background: var(--red-tint); color: var(--red); }
@media (min-width: 720px) {
  .change { grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-5); }
  .change-head { align-self: start; }
}
@media (max-width: 599px) {
  .steps > li { padding-left: 0; }
  .steps > li > .step-title { display: flex; align-items: center; min-height: 28px; padding-left: 40px; }
  .steps > li:not(:last-child)::after { display: none; }
}
/* A table cell that names itself where the table's head is hidden: on a phone. */
.cell-label { display: none; }
@media (max-width: 639px) { .cell-label { display: inline; color: var(--ink-3); } }
.change-title { font: var(--t-row); font-weight: 600; color: var(--ink); margin-bottom: var(--space-1); }

/* ------------------------------------------------------------------ D-460: the documentation, finished
 * A block of code is a framed panel: a hairline, rounded corners, a dark ground on either page, and a slim bar with what it is
 * and its copy button. One step in two languages is one panel with a tab for each. Colour is light and done on the server. */
.code-panel { min-width: 0; max-width: 100%; border: 1px solid var(--code-edge); border-radius: var(--radius-thumb); background: var(--code-bg); color: var(--code-ink); overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-2) 0 var(--space-4); background: var(--code-bar); border-bottom: 1px solid var(--code-edge); }
.code-lang { font: 500 12.5px/1 var(--font); letter-spacing: 0.02em; color: var(--code-muted); }
/* An example keeps its own line breaks; a line too long for the column scrolls sideways inside its panel, never the page. */
.doc pre { margin: 0; padding: var(--space-4); background: transparent; color: var(--code-ink); font: 400 13px/1.65 var(--font-code); white-space: pre; overflow-x: auto; max-width: 100%; tab-size: 2; scrollbar-color: #3a3f47 transparent; }
.code-panel pre:focus-visible { outline: 2px solid var(--code-focus); outline-offset: -2px; border-radius: 0; }
.copy-code { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-pill); background: transparent; box-shadow: inset 0 0 0 1px #3a3f47; color: var(--code-ink); font: 500 12.5px/1 var(--font); cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.copy-code:focus-visible { outline: 2px solid var(--code-focus); outline-offset: 2px; border-radius: var(--radius-pill); }
.copy-code.is-done { color: var(--code-string); }
/* On a touch screen the Copy button and the language tabs take a whole finger: the button's target reaches past its pill, a tab is 44px tall. */
@media (pointer: coarse) {
  .copy-code { position: relative; }
  .copy-code::before { content: ""; position: absolute; inset: -8px -6px; }
  .code-tab { min-height: 44px; }
}
@media (hover: hover) and (pointer: fine) { .copy-code:hover { background: rgba(255, 255, 255, 0.07); } }
.code-tablist { display: flex; align-self: stretch; margin-left: calc(-1 * var(--space-3)); }
.code-tab { position: relative; display: inline-flex; align-items: center; padding: 0 var(--space-3); border: 0; background: transparent; color: var(--code-muted); font: 500 13px/1 var(--font); cursor: pointer; transition: color 160ms ease; }
.code-tab[aria-selected="true"] { color: var(--code-ink); font-weight: 600; }
.code-tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px; height: 2px; border-radius: 2px; background: var(--coral); }
.code-tab:focus-visible { outline: 2px solid var(--code-focus); outline-offset: -6px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .code-tab:hover { color: var(--code-ink); } }
.code-alt-label { display: none; }
.code-note { padding: var(--space-3) var(--space-4) 0; font: var(--t-meta); color: var(--code-muted); }
.doc .code-note code { color: var(--code-ink); font-size: 12.5px; }
/* With scripts off a tab cannot be chosen: every language shows, each under its own name. */
@media (scripting: none) {
  .code-tabs > .code-bar { display: none; }
  .code-tabs > .code-tabpanel[hidden] { display: block !important; }
  .code-tabpanel + .code-tabpanel { border-top: 1px solid var(--code-edge); }
  .code-alt-label { display: block; padding: 12px var(--space-4); background: var(--code-bar); border-bottom: 1px solid var(--code-edge); font: 500 12.5px/1 var(--font); color: var(--code-muted); }
}
.tk-c { color: var(--code-comment); }
.tk-s { color: var(--code-string); }
.tk-n { color: var(--code-number); }
.tk-k { color: var(--code-keyword); }
.tk-p { color: var(--code-key); }

/* The levels' first column: the pill on top, the rung's name under it, the same in every row; side by side on a phone. */
.level-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.level-cell strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
.level-cell .level-pill { height: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--edge); }
.doc td:has(> .level-cell) { width: 10rem; min-width: 10rem; }
@media (max-width: 639px) {
  .level-cell { flex-direction: row; align-items: center; gap: var(--space-2); }
  .doc td:has(> .level-cell) { width: auto; min-width: 0; }
}

/* The pages on a phone or a tablet: one row that scrolls on its own, the page you are on marked, never the page sideways. */
@media (max-width: 1023px) {
  .doc-side { gap: 0; padding-top: var(--space-2); }
  .doc-side .doc-nav { position: relative; flex-wrap: nowrap; gap: 0; margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - var(--space-3)); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .doc-side .doc-nav::-webkit-scrollbar { display: none; }
  .doc-side .doc-nav a { position: relative; flex: none; min-height: var(--tap); white-space: nowrap; border-radius: 0; }
  .doc-side .doc-nav a:hover, .doc-side .doc-nav a[aria-current="page"] { background: none; }
  .doc-side .doc-nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 0; height: 2px; border-radius: 2px; background: var(--ink); }
}
/* An API name in a change keeps to one line: lines break between names, never inside one. */
.change code { white-space: nowrap; overflow-wrap: normal; }
