/* Tether Nexus — site stylesheet.

   One stylesheet, no build step, no external font: the type stack is the
   reader's own (PingFang / YaHei / Noto CJK included, because this site serves
   a .com.cn domain and ships a Simplified Chinese catalogue).

   Rules this file enforces, each because the previous attempt broke them:
   - one type scale, one section rhythm, one outcome per spacing step;
   - every control is at least 44x44 CSS pixels (--tap);
   - a visible focus ring that contrasts against the surface it sits on;
   - no section heading is styled as a kicker: h2 is always the section's title;
   - nothing may cause horizontal page scroll at 360px: tables and code blocks
     scroll inside their own box, never the document;
   - motion is one ambient path animation, and prefers-reduced-motion removes it;
   - the nav works with JavaScript disabled (it is only a disclosure when JS runs).
*/

:root {
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --tap: 2.75rem;              /* 44px: the smallest tap target anywhere */
  --wrap: 68rem;
  --measure: 38rem;

  --dur-fast: 150ms;
  --dur-slow: 200ms;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Noto Sans Mono CJK SC", monospace;

  --bg: #0b0e12;
  --surface-1: #11151b;
  --surface-2: #161b22;
  --text-1: #eef2f7;
  --text-2: #b6c0cc;
  --text-3: #98a4b3;
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --accent: #86b8ea;
  --accent-dim: rgba(134, 184, 234, 0.14);
  --on-accent: #07121c;
  --pass: #63c48f;
  --warn: #e6b163;
  --code-bg: #0e1319;
  --code-border: rgba(255, 255, 255, 0.09);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fa;
    --surface-1: #ffffff;
    --surface-2: #eef2f7;
    --text-1: #0d131b;
    --text-2: #3b4655;
    --text-3: #55606e;
    --hairline: rgba(13, 19, 27, 0.1);
    --hairline-strong: rgba(13, 19, 27, 0.2);
    --accent: #1d63a8;
    --accent-dim: rgba(29, 99, 168, 0.1);
    --on-accent: #ffffff;
    --pass: #1c7a4a;
    --warn: #8a5a00;
    --code-bg: #f0f3f7;
    --code-border: rgba(13, 19, 27, 0.14);
    --shadow: 0 1px 2px rgba(13, 19, 27, 0.08);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="zh-Hans"] body {
  line-height: 1.8;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* The offset ring sits on the page background even on an accent button, so it
   never has to contrast against the button's own fill. */
.btn:focus-visible,
.nav__cta:focus-visible {
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-dim);
  color: var(--text-1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -3rem;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  color: var(--text-1);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--s-3);
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.nav__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s-5);
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  color: var(--text-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--accent);
}

.brand__suffix {
  color: var(--text-3);
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.75rem;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.nav__links a:hover {
  color: var(--text-1);
  text-decoration: none;
}

.nav__links a[aria-current="page"] {
  color: var(--text-1);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav__cta {
  margin-left: var(--s-2);
  padding: 0 var(--s-5) !important;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  color: var(--text-1) !important;
  font-weight: 600;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.nav__cta:hover {
  background: var(--surface-2);
  border-color: var(--text-3);
}

.nav__cta[aria-current="page"] {
  box-shadow: none;
  background: var(--surface-2);
}

.nav__toggle {
  display: none;
  width: var(--tap);
  height: var(--tap);
  margin-left: auto;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  color: var(--text-1);
  cursor: pointer;
}

.nav__toggle-icon,
.nav__toggle-icon::before,
.nav__toggle-icon::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform var(--dur-fast) var(--ease);
}

.nav__toggle-icon::before {
  content: "";
  position: absolute;
  top: -5px;
}

.nav__toggle-icon::after {
  content: "";
  position: absolute;
  top: 5px;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before {
  transform: translateY(5px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* Narrow screens. With JavaScript the links are a disclosure panel; without it
   they are a plain stacked list, which is why the page still navigates when the
   script does not run. */
@media (max-width: 860px) {
  .nav__inner {
    padding: 0 var(--s-4);
    gap: var(--s-3);
    flex-wrap: wrap;
  }

  html[data-js="on"] .nav__toggle {
    display: inline-flex;
  }

  html[data-js="on"] .nav__links {
    display: none;
    order: 3;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: var(--s-2) var(--s-4) var(--s-4);
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  html[data-js="on"] .nav__links[data-open="true"] {
    display: flex;
  }

  html[data-js="on"] .nav__links a {
    min-height: 3rem;
    padding: 0 0.25rem;
    border-bottom: 1px solid var(--hairline);
  }

  html[data-js="on"] .nav__cta {
    margin: var(--s-3) 0 0;
    justify-content: center;
    border-bottom: 1px solid var(--hairline-strong) !important;
  }

  /* No JavaScript: the list is always visible, stacked, and wraps cleanly. */
  .nav__links {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 0 var(--s-3);
    margin-left: 0;
    padding-bottom: var(--s-2);
  }
}

/* ------------------------------------------------------------------ layout */

.page {
  overflow-x: clip;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 var(--s-4);
  }
}

.section {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.section--tight {
  padding-top: 0;
}

.section--band {
  background: var(--surface-1);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

[id] {
  scroll-margin-top: 5.5rem;
}

/* ------------------------------------------------------------------ type */

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  line-height: 1.08;
  font-weight: 640;
  max-width: 20ch;
}

h2 {
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  line-height: 1.22;
  font-weight: 620;
  max-width: 26ch;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
}

p {
  margin: 0 0 var(--s-4);
  max-width: var(--measure);
  color: var(--text-2);
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  margin-top: var(--s-4);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 34rem;
}

html[lang="zh-Hans"] .lead {
  line-height: 1.75;
}

.note {
  margin-top: var(--s-4);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-3);
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 var(--s-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

html[lang="zh-Hans"] .eyebrow {
  letter-spacing: 0.02em;
}

.mono {
  font-family: var(--mono);
  font-size: 0.9375rem;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3.5rem);
}

.hero--page {
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.hero--page h1 {
  max-width: 24ch;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 34rem) minmax(0, 1fr);
    gap: var(--s-8);
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.hero__aside {
  margin-top: var(--s-5);
  font-size: 0.875rem;
  color: var(--text-3);
  max-width: 30rem;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    filter var(--dur-fast) var(--ease);
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--ghost {
  background: transparent;
  border-color: var(--text-3);
  color: var(--text-1);
}

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--text-2);
}

.btn__arrow {
  width: 14px;
  height: 14px;
  flex: none;
}

/* ------------------------------------------------------------------ hero graph
   Real DOM text, not SVG text: the previous diagram set its labels in viewBox
   units and rendered them at 5-6 CSS pixels inside a 1080-unit canvas. */

.graph {
  margin: 0;
  padding: var(--s-5);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background:
    linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
    repeating-linear-gradient(0deg, var(--hairline) 0 1px, transparent 1px 48px) border-box;
  border: 1px solid transparent;
}

.graph__ask {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0;
  padding: var(--s-3);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.tag {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-1);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.graph__asklabel {
  margin: var(--s-2) 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.graph__nodes {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
  position: relative;
}

.node {
  position: relative;
  display: grid;
  gap: 0.1rem;
  margin-left: var(--s-5);
  padding: var(--s-3);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.node::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--s-5));
  top: 50%;
  width: var(--s-5);
  height: 1px;
  background: var(--hairline-strong);
}

.node__os {
  font-weight: 600;
  font-size: 0.9375rem;
}

.node__cap {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-2);
}

.node__state {
  font-size: 0.75rem;
  color: var(--text-3);
}

@media (min-width: 640px) {
  .graph__nodes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-3);
    margin-top: var(--s-6);
  }

  .graph__nodes::before {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    top: calc(-1 * var(--s-3));
    height: 1px;
    background: var(--hairline-strong);
  }

  .node {
    margin-left: 0;
  }

  .node::before {
    left: 50%;
    top: calc(-1 * var(--s-3));
    width: 1px;
    height: var(--s-3);
  }
}

/* One ambient element, and it explains the request travelling to a machine. */
@media (prefers-reduced-motion: no-preference) and (min-width: 640px) {
  .graph__nodes::after {
    content: "";
    position: absolute;
    top: calc(-1 * var(--s-3) - 3px);
    left: 16%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: graph-run 7s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }
}

@keyframes graph-run {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  48% {
    transform: translateX(calc(68% - 7px));
    opacity: 1;
  }
  56%,
  100% {
    transform: translateX(calc(68% - 7px));
    opacity: 0;
  }
}

.graph figcaption {
  margin-top: var(--s-4);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-3);
}

/* ------------------------------------------------------------------ blocks */

.three {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-6);
}

@media (min-width: 860px) {
  .three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-6);
  }
}

.card {
  padding: var(--s-5);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.section--band .card {
  background: var(--bg);
}

.card h3 {
  margin-bottom: var(--s-2);
}

.card p {
  color: var(--text-2);
  font-size: 0.9375rem;
  margin: 0;
  max-width: none;
}

.card__mark {
  width: 28px;
  height: 28px;
  margin-bottom: var(--s-4);
  color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-8);
  }
}

.stack > * + * {
  margin-top: var(--s-4);
}

/* ------------------------------------------------------------------ code */

.code {
  margin: 0;
  padding: var(--s-4);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 10px;
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.code:focus-visible {
  outline-offset: 1px;
}

.code--flat {
  background: transparent;
  border-color: transparent;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.code-wrap {
  position: relative;
  margin-top: var(--s-3);
}

.code-wrap[data-copy] .code {
  padding-right: 5.25rem;
}

.copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-height: 2.25rem;
  min-width: var(--tap);
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 7px;
  color: var(--text-2);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

@media (pointer: coarse) {
  .copy {
    min-height: var(--tap);
    min-width: var(--tap);
  }
}

.copy:hover {
  color: var(--text-1);
  background: var(--surface-2);
}

.copy[data-state="ok"] {
  color: var(--pass);
  border-color: var(--pass);
}

.copy[data-state="fail"] {
  color: var(--warn);
  border-color: var(--warn);
}

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 760px) {
  .demo {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.demo__side {
  padding: var(--s-4);
}

.demo__side + .demo__side {
  border-top: 1px solid var(--hairline);
}

@media (min-width: 760px) {
  .demo__side + .demo__side {
    border-top: 0;
    border-left: 1px solid var(--hairline);
  }
}

.demo__label {
  margin: 0 0 var(--s-3);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ------------------------------------------------------------------ figures */

.figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .figures {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.figure {
  border-top: 1px solid var(--hairline-strong);
  padding-top: var(--s-4);
}

.figure__value {
  display: block;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  line-height: 1;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.figure__unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-3);
}

.figure__label {
  display: block;
  margin-top: var(--s-3);
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.figure__source {
  display: block;
  margin-top: var(--s-2);
  color: var(--text-3);
  font-size: 0.75rem;
}

.figure__source a {
  color: inherit;
}

.figure--loss .figure__value {
  color: var(--warn);
}

/* ------------------------------------------------------------------ lists */

.steps {
  counter-reset: step;
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-6);
  max-width: 46rem;
}

.steps li {
  position: relative;
  padding-left: var(--s-7);
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

.steps h3 {
  margin-bottom: var(--s-2);
}

.steps p {
  margin: 0;
  max-width: 40rem;
}

.choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
  margin-top: var(--s-6);
}

@media (min-width: 720px) {
  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.choice {
  padding: var(--s-4);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--bg);
}

.choice h3 {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--accent);
  margin-bottom: var(--s-2);
}

.choice p {
  margin: 0;
  font-size: 0.9375rem;
  max-width: none;
}

.refusals {
  margin: var(--s-6) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-3);
  max-width: 46rem;
}

.refusals li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  color: var(--text-2);
}

.refusals svg {
  width: 18px;
  height: 18px;
  margin-top: 0.35em;
  color: var(--warn);
}

/* ------------------------------------------------------------------ tables
   A wide table scrolls inside its own box, never the document. The wrapper is
   focusable so a keyboard user can scroll it, and JS adds the region label. */

.table-scroll {
  margin-top: var(--s-5);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.table-scroll:focus-visible {
  outline-offset: 1px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 34rem;
}

.table caption {
  text-align: left;
  color: var(--text-3);
  font-size: 0.8125rem;
  padding: var(--s-4) var(--s-4) 0;
}

.table th,
.table td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.table thead th {
  color: var(--text-3);
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.table tbody th {
  color: var(--text-1);
  font-weight: 500;
}

.table td {
  color: var(--text-2);
}

.table .num {
  font-family: var(--mono);
  font-size: 0.8125rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.table .loss {
  color: var(--warn);
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------------------------------------------ rules */

.rules {
  margin: var(--s-6) 0 0;
  display: grid;
  gap: var(--s-6);
  max-width: 52rem;
}

.rules > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline-strong);
}

@media (min-width: 720px) {
  .rules > div {
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    gap: var(--s-5);
  }
}

.rules dt {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--text-1);
}

.rules dd {
  margin: 0;
}

.rules dd p {
  margin: 0;
  max-width: 40rem;
}

.rules dd p + .src {
  margin-top: var(--s-2);
}

.src {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

.dl {
  display: grid;
  gap: var(--s-5);
  margin: var(--s-6) 0 0;
  max-width: 52rem;
}

.dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-1);
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline);
}

@media (min-width: 640px) {
  .dl > div {
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
    gap: var(--s-5);
  }
}

.dl dt {
  color: var(--text-3);
  font-size: 0.9375rem;
}

.dl dd {
  margin: 0;
}

.dl dd p {
  margin: 0;
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ platforms */

.platforms {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--s-6);
}

@media (min-width: 860px) {
  .platforms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.platform {
  padding: var(--s-5);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.platform__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.platform__title {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.platform__icon {
  width: 22px;
  height: 22px;
  color: var(--text-2);
}

.platform__state {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn);
  white-space: nowrap;
}

.platform__body {
  margin-top: var(--s-3);
  color: var(--text-2);
  font-size: 0.9375rem;
  max-width: none;
}

.platform .code {
  margin-top: var(--s-4);
}

.platform__req {
  margin-top: var(--s-3);
  color: var(--text-3);
  font-size: 0.8125rem;
  max-width: none;
}

/* ------------------------------------------------------------------ notify */

.notify {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-6);
  max-width: 44rem;
}

.notify__row {
  display: grid;
  gap: var(--s-2);
  align-items: start;
}

@media (min-width: 640px) {
  .notify__row {
    grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
    gap: var(--s-5);
    align-items: center;
  }
}

.notify__note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-3);
  max-width: none;
}

/* ------------------------------------------------------------------ doors */

.doors {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-6);
}

@media (min-width: 860px) {
  .doors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.door {
  padding: var(--s-5);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.door p {
  margin: 0;
  font-size: 0.9375rem;
  flex: 1;
  max-width: none;
}

.door__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 600;
}

/* ------------------------------------------------------------------ changelog */

.log {
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-5);
  max-width: 52rem;
}

.log__group h3 {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.log__entries {
  margin: var(--s-3) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s-2);
}

.log__entries li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--hairline);
}

@media (min-width: 640px) {
  .log__entries li {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--s-4);
    align-items: baseline;
  }
}

.log__line {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
  max-width: none;
}

.log__sha {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
}

.lang-note {
  margin-top: var(--s-4);
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: 40rem;
}

/* ------------------------------------------------------------------ CTA */

.cta {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  text-align: center;
  background: var(--surface-1);
  border-top: 1px solid var(--hairline);
}

.cta h2 {
  max-width: 24ch;
  margin: 0 auto;
}

.cta p {
  margin: var(--s-4) auto 0;
  color: var(--text-2);
  max-width: 34rem;
}

.cta .hero__actions {
  justify-content: center;
}

/* ------------------------------------------------------------------ 404 */

.notfound {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.nf-links {
  list-style: none;
  margin: var(--s-6) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
}

.nf-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 500;
}

/* ------------------------------------------------------------------ footer */

.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--s-8) 0 var(--s-6);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
}

@media (min-width: 860px) {
  .footer__inner {
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: var(--s-7);
  }
}

.footer__brand .brand {
  margin-bottom: var(--s-4);
}

.footer__brand p {
  font-size: 0.875rem;
  color: var(--text-3);
  max-width: 26rem;
}

.footer__brand p + p {
  margin-top: var(--s-2);
}

.footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer__heading {
  margin: 0 0 var(--s-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer__col a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.footer__col a:hover {
  color: var(--text-1);
}

.lang {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.lang button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
  background: none;
  border: 0;
  color: var(--text-2);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.lang button:hover:not(:disabled) {
  color: var(--text-1);
  text-decoration: underline;
}

.lang button[aria-pressed="true"] {
  color: var(--text-1);
  font-weight: 600;
}

.lang button:disabled {
  color: var(--text-3);
  cursor: default;
  opacity: 0.75;
}

.lang__status {
  margin: var(--s-2) 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-3);
  max-width: 18rem;
}

.lang__status:empty {
  display: none;
}

.footer__legal {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--hairline);
}

.footer__legal p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: none;
}