/* The landing site: system font stack (no font file, no @font-face), no image but the brand's own
   SVG and icons, no script anywhere. Colours are the semantic tokens of branding/brand-guidelines.md
   section 4.3 (light and dark). Text contrast is at least 4.5:1 (WCAG AA) and graphics at least 3:1;
   test/static.test.mjs computes the pairs and test/browser.test.mjs checks the pages. Text on the blue (#0099FF) fills is navy, never white. */
:root {
  color-scheme: light dark;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #eef1f4;
  --text: #0b2a44;
  --muted: #475569;
  --border: #cbd2da;
  --accent: #0a66b8;
  --accent-fill: #0099ff;
  --on-accent: #071b2e;
  --success: #0f766e;
  --warning: #9a5b00;
  --focus: #0077cc;
  --direct: #0e8f82;
  --relay: #0077cc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071b2e;
    --surface: #0b2a44;
    --surface-alt: #123a5e;
    --text: #ffffff;
    --muted: #a9b6c6;
    --border: #1c4c78;
    --accent: #66bdff;
    --success: #5eddcf;
    --warning: #fbbf24;
    --focus: #66bdff;
    --direct: #14b8a6;
    --relay: #66bdff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
main { display: block; padding-bottom: 3rem; }
main:focus { outline: none; }

/* skip link: visible only while it has focus */
.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: 0.5rem;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
/* room around a focused link when the browser scrolls it into view, so the ring is not cut off */
a { scroll-margin-block: 2rem; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 0.25rem; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.logo { display: inline-flex; align-items: center; min-height: 2.75rem; }
.logo img { display: block; height: 2.25rem; width: auto; max-width: 100%; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.nav a { display: inline-block; padding: 0.6rem 0.25rem; min-height: 2.75rem; text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 1.9rem); margin-top: 3rem; }
h3 { font-size: 1.2rem; }
p, ul, ol, dl, table, figure { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; max-width: 40rem; }
.muted { color: var(--muted); }
code, pre { font-family: ui-monospace, "SF Mono", "Cascadia Mono", "DejaVu Sans Mono", monospace; font-size: 0.9em; }
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hero { padding-top: 3rem; padding-bottom: 1rem; }
.cta { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  min-height: 2.75rem;
  border-radius: 0.6rem;
  border: 2px solid var(--accent-fill);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.button:hover { text-decoration: underline; }

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 0.35rem solid var(--warning);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
}
.notice > :last-child { margin-bottom: 0; }

.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; list-style: none; padding: 0; }
@media (min-width: 48rem) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.two { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.25rem; }
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: 0.5rem; }

figure.diagram { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem; }
figure.diagram svg { display: block; width: 100%; max-width: 36rem; height: auto; margin: 0 auto; }
figure.diagram figcaption { margin-top: 0.75rem; }
.dg-device { fill: var(--surface-alt); stroke: var(--text); stroke-width: 2; }
.dg-relay { fill: var(--surface-alt); stroke: var(--relay); stroke-width: 2; stroke-dasharray: 8 5; }
.dg-zone { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 5; }
.dg-text { fill: var(--text); font: 600 18px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.dg-small { fill: var(--muted); font: 16px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.dg-direct { fill: none; stroke: var(--direct); stroke-width: 5; stroke-linecap: round; }
.dg-fallback { fill: none; stroke: var(--relay); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 10 8; }
.dg-flow { fill: none; stroke: var(--surface); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 18; }
/* The moving dots exist only for people who have not asked for less motion; without the rule the
   diagram is the same picture, standing still. */
@media (prefers-reduced-motion: no-preference) {
  .dg-flow { animation: dg-flow 2.4s linear infinite; }
  @keyframes dg-flow { to { stroke-dashoffset: -40; } }
}

.status-list { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .status-list { grid-template-columns: repeat(2, 1fr); } }
.status-row { background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem 1.25rem; }
.status-row h3 { margin-bottom: 0.25rem; }
.status-row .what { display: block; font-size: 0.9rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.status-row p { margin: 0.5rem 0 0; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 0.4rem; border: 1px solid currentColor; font-size: 0.85rem; font-weight: 600; }
.badge-built { color: var(--success); }
.badge-partial { color: var(--warning); }
.badge-none { color: var(--muted); }

table { border-collapse: collapse; width: 100%; background: var(--surface); }
caption { text-align: left; font-weight: 600; padding: 0 0 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border: 1px solid var(--border); }
th { background: var(--surface-alt); }
td.yes, td.no { font-weight: 600; white-space: nowrap; }
@media (max-width: 30rem) { th, td { padding: 0.5rem; } td.yes, td.no { white-space: normal; } }

.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 0.75rem; }
dl.facts dt { font-weight: 600; margin-top: 0.75rem; }
dl.facts dd { margin: 0; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 1.5rem 0 2rem; }
.site-footer .foot { margin-bottom: 0.75rem; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* The comparison page (/compare/). The table keeps its semantics and scrolls sideways inside a
   focusable region; its row headers stay in view. */
.wrap.wide { max-width: 80rem; }
.scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: 0.5rem; margin: 0 0 1rem; scroll-padding-inline-start: 8rem; }
.scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.scroll table { margin: 0; }
table.compare { border-collapse: separate; border-spacing: 0; min-width: 66rem; }
table.compare th, table.compare td { border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 12rem; }
table.compare th[scope="row"], table.compare thead th:first-child { min-width: 8rem; max-width: 8rem; position: sticky; left: 0; background: var(--surface-alt); z-index: 1; }
table.compare thead th { background: var(--surface-alt); }
table.compare caption { padding: 0.6rem 0.75rem; }
table.compare .cap { position: sticky; left: 0.75rem; display: block; max-width: calc(100vw - 5rem); }
table.compare th[scope="row"] { overflow-wrap: normal; }
table.compare .ver { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.src { font-size: 0.85rem; white-space: nowrap; }
.src a { display: inline-block; padding: 0.3rem 0.35rem; min-width: 1.5rem; text-align: center; }
ul.plain { padding-left: 1.25rem; }
ul.plain li { margin-bottom: 0.6rem; }
ul.sources { overflow-wrap: anywhere; }
.card ul { padding-left: 1.1rem; margin-bottom: 0; }
.card li { margin-bottom: 0.5rem; }
@media (max-width: 30rem) { table.compare th[scope="row"], table.compare thead th:first-child { min-width: 7.5rem; max-width: 7.5rem; font-size: 0.875rem; } .scroll { scroll-padding-inline-start: 7.5rem; } }
