/* relaii.app — a deliberately quiet, self-hosted product site. */

:root {
  --ink: #1f1f1f;
  --white: #ffffff;
  --mist: #f1f5f8;
  --blue: #1d60fb;
  --blue-dark: #1650d8;
  --mint: #77eaa9;
  --soft: #5a6472;
  --faint: #8a94a3;
  --line: #e2e8ee;
  --line-strong: #cbd5df;
  --success-ink: #0b5e35;
  --danger: #8a2b2b;
  --surface-header: rgba(255, 255, 255, 0.96);
  --surface-card: #ffffff;
  --surface-tint: #f1f5f8;
  --shadow-header: 0 1px 0 rgba(15, 17, 21, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  --page: 1160px;
  --page-gutter: 32px;
  --measure: 67ch;
  --radius-sm: 10px;
  --radius: 14px;
  --action: #1d60fb;
  --action-hover: #1650d8;
  --on-action: #ffffff;
  --code-bg: #172033;
  --code-text: #f8fafc;
  --code-muted: #aeb9ca;
  --brand-wash: linear-gradient(125deg, color-mix(in srgb, var(--mist) 60%, var(--mint)), color-mix(in srgb, var(--mist) 76%, var(--blue)));
  --active: color-mix(in srgb, var(--blue) 10%, var(--surface-card));
}

:root[data-theme='dark'] {
  --ink: #f1f5f8;
  --white: #1a1d21;
  --mist: #111315;
  --blue: #4d8bff;
  --blue-dark: #6aa0ff;
  --soft: #a8b0bc;
  --faint: #727c8a;
  --line: #2a2f36;
  --line-strong: #3a414b;
  --success-ink: #a9f5c9;
  --danger: #f08a8a;
  --surface-header: rgba(21, 24, 28, 0.96);
  --surface-card: #1a1d21;
  --surface-tint: #15181c;
  --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #f1f5f8;
    --white: #1a1d21;
    --mist: #111315;
    --blue: #4d8bff;
    --blue-dark: #6aa0ff;
    --soft: #a8b0bc;
    --faint: #727c8a;
    --line: #2a2f36;
    --line-strong: #3a414b;
    --success-ink: #a9f5c9;
    --danger: #f08a8a;
    --surface-header: rgba(21, 24, 28, 0.96);
    --surface-card: #1a1d21;
    --surface-tint: #15181c;
    --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.28);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--mist);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  background: transparent;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── Navigation ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--brand-wash);
  box-shadow: var(--shadow-header);
}

.site-header .wrap,
.site-header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
}

.theme-toggle,
.nav-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--soft);
  background: var(--surface-card);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.nav-toggle:hover,
.nav-toggle:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--mist);
}

.theme-toggle svg,
.nav-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon-sun {
    display: none;
  }

  :root:not([data-theme='light']) .theme-icon-moon {
    display: block;
  }
}

.nav-toggle {
  display: none;
}

.nav-toggle-icon-close {
  display: none;
}

body.nav-open .nav-toggle-icon-open {
  display: none;
}

body.nav-open .nav-toggle-icon-close {
  display: block;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 30px;
  height: 30px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--mist);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
  background: var(--active);
}

.nav a[href="/install.html"] {
  margin-left: 6px;
  border: 1px solid var(--blue);
  color: var(--on-action);
  background: var(--action);
}

.nav a[href="/install.html"]:hover,
.nav a[href="/install.html"]:focus-visible {
  color: var(--on-action);
  background: var(--action-hover);
}

/* ── Releases ───────────────────────────────────────────────────────────── */

.releases h1 {
  max-width: 12ch;
}

.releases-head {
  margin-bottom: 38px;
}

.releases-status {
  max-width: var(--measure);
  margin: 0 0 1.4em;
  color: var(--soft);
}

.releases-status[data-kind="error"] {
  color: var(--danger);
}

.releases-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* Releases are a sequence, so the index is the shape of the history, not a
   decorative sidebar. It stays put while you read down the column. */
.releases-index {
  position: sticky;
  top: 92px;
}

.releases-index p {
  margin: 0 0 12px;
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.releases-index ol {
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.releases-index a {
  display: grid;
  grid-template-columns: 7px auto 1fr;
  align-items: baseline;
  gap: 11px;
  padding: 7px 0;
  color: var(--soft);
  font-size: 0.9rem;
  text-decoration: none;
}

.releases-index a::before {
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.releases-index a:hover {
  color: var(--ink);
}

.releases-index li.is-latest a::before {
  background: var(--mint);
}

/* Where you are is carried by weight and colour of the text. The dot means
   one thing only: which release is the latest. */
.releases-index a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
}

.releases-index time {
  justify-self: end;
  color: var(--soft);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* releases.js splits every code span into per-word spans; this is what keeps
   a break out of the middle of a flag. */
.releases code span {
  white-space: nowrap;
}

.release-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  max-width: none;
  margin: 0 0 14px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-card);
  scroll-margin-top: 92px;
}

.release-card.is-latest {
  border-color: var(--line-strong);
  box-shadow: 0 18px 36px rgba(31, 31, 31, 0.06);
}

:root[data-theme='dark'] .release-card.is-latest {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

 /* On a long release the changes run past the meta column, so it follows: you
   can always see which version you are reading and how to install it. */
.release-meta {
  position: sticky;
  top: 92px;
  align-self: start;
  min-width: 0;
}

.release-card h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-variant-numeric: tabular-nums;
}

.release-kicker {
  margin: 0 0 5px;
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.release-card.is-latest .release-kicker {
  color: var(--success-ink);
}

.release-card time {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.88rem;
}

.release-summary {
  max-width: none;
  margin: 1em 0 0;
  color: var(--soft);
  font-size: 0.92rem;
}

.release-highlights {
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-highlights li {
  position: relative;
  padding: 14px 0 14px 27px;
  border-top: 1px solid var(--line);
}

.release-highlights li:first-child {
  border-top: 0;
  padding-top: 0;
}

.release-highlights li::before {
  position: absolute;
  top: 1.15em;
  left: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.release-highlights li:first-child::before {
  top: 0.45em;
}

/* One row per kind: the label lives in the gutter, the items beside it. The
   padding is also what keeps the global `section` rule off this component. */
.release-changes {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0 20px;
  margin: 0;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.release-changes:first-child {
  padding-top: 0;
  border-top: 0;
}

.release-changes h3 {
  margin: 0;
  padding-top: 0.15em;
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.release-changes ul {
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-changes li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 16px;
}

.release-changes li:last-child {
  margin-bottom: 0;
}

.release-changes li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.release-changes[data-kind="security"] h3 {
  color: var(--danger);
}

.release-changes[data-kind="security"] li::before {
  background: var(--danger);
}

.release-update {
  max-width: none;
  margin: 1.3em 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.release-update span {
  display: block;
  margin-bottom: 6px;
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.release-update code {
  display: block;
  padding: 0.45em 0.6em;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
  .releases-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  /* No room for a rail: the index becomes a strip you can swipe. */
  .releases-index {
    position: static;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .releases-index ol {
    display: flex;
    gap: 8px;
  }

  .releases-index a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
  }

  .releases-index time {
    display: none;
  }

  .release-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .release-update {
    margin-top: 1em;
  }
}

@media (max-width: 620px) {
  .release-card {
    padding: 20px 18px;
  }

  .release-changes {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ── Type and content ───────────────────────────────────────────────────── */

h1,
h2,
h3 {
  margin: 0 0 0.48em;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2.65rem, 6vw, 4.5rem);
}

h2 {
  max-width: 25ch;
  margin-top: 2.4em;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

h3 {
  font-size: 1.08rem;
}

p,
ul,
ol {
  max-width: var(--measure);
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-dark);
}

.lede {
  max-width: 56ch;
  color: var(--soft);
  font-size: clamp(1.08rem, 1.65vw, 1.25rem);
  line-height: 1.58;
}

code {
  padding: 0.14em 0.35em;
  border-radius: 4px;
  background: var(--mist);
  font-family: var(--mono);
  font-size: 0.87em;
}

pre {
  max-width: 100%;
  margin: 0 0 1.5em;
  padding: 22px 24px;
  overflow-x: auto;
  border: 1px solid #394257;
  border-radius: var(--radius);
  color: var(--code-text);
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.65;
  tab-size: 2;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.comment {
  color: var(--code-muted);
}

/* ── Home ───────────────────────────────────────────────────────────────── */

.hero {
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--brand-wash);
}

.hero .wrap {
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 1fr);
  align-items: center;
  gap: 40px 56px;
  padding-top: 72px;
  padding-bottom: 36px;
}

.hero-copy { min-width: 0; }
.hero-identity { display: grid; place-items: center; }
.hero-mark { display: block; width: min(100%, 320px); height: auto; }
.hero > .wrap > .hero-facts { grid-column: 1 / -1; max-width: none; margin: 0; gap: 32px; }
.hero-facts div { padding-block: 20px 0; }
.hero-facts dd { max-width: 32ch; }
.home section > .wrap > h2 { margin-top: 0; }
.home .pillar { display: flex; flex-direction: column; gap: 12px; }
.home .pillar h3 { margin: 0; }
.home .pillar a { margin-top: auto; padding-top: 8px; font-size: 0.9rem; }
.home-resources { margin-bottom: 0; }


.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(119, 234, 169, 0.22);
  content: "";
}

.hero h1 {
  max-width: none;
  font-size: clamp(2.25rem, 4.6vw, 3.6rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.hero h1 span {
  display: block;
}

.hero h1 .accent {
  color: var(--blue);
}

.hero .lede {
  margin-top: 22px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 590px;
  margin: 42px 0 0;
}

.hero-facts div {
  padding-top: 12px;
  border-top: 1px solid var(--line-strong);
}

.hero-facts dt {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
}

.hero-facts dd {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 0.875rem;
  line-height: 1.42;
}

.quickstart {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}

.quickstart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.quickstart-heading .eyebrow,
.quickstart-heading h2 {
  margin: 0;
}

.quickstart-heading h2 {
  max-width: none;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.quickstart-code-wrap {
  position: relative;
}

.quickstart-command {
  width: 100%;
  margin: 0;
  padding: 28px;
  box-shadow: none;
}

.copy-command {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  min-width: 70px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-sm);
  color: var(--code-text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
}

.copy-command:hover {
  background: rgba(255, 255, 255, 0.16);
}

.quickstart-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin: 24px 0 0;
}

.quickstart-facts > div {
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}

.quickstart-facts dt {
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 650;
}

.quickstart-facts dd {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

section {
  padding: 64px 0;
  background: var(--surface-card);
}

.section-tint {
  padding: 64px 0;
  border-block: 1px solid var(--line);
  background: var(--mist);
}

.section-tint h2 {
  margin-top: 0;
}

.home-statement {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: start;
}

.home-statement h2 {
  margin-top: 0;
}

.statement-aside {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-tint);
}

.statement-aside p:last-child {
  margin-bottom: 0;
}

/* ── Shared components ──────────────────────────────────────────────────── */

.page {
  min-height: 60vh;
  margin-block: 32px 48px;
  padding: 48px calc(var(--page-gutter) - 1px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-card);
}

.page > h1 + .lede {
  margin-top: 22px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}

.btn-primary {
  border-color: var(--blue);
  color: var(--on-action);
  background: var(--action);
}

.btn-primary:hover {
  border-color: var(--blue-dark);
  color: var(--on-action);
  background: var(--action-hover);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--white);
}

.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.pillars,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.pillar,
.grid > div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.pillar h3,
.grid h3 {
  margin: 0 0 0.55em;
  font-size: 1.02rem;
}

.pillar p,
.grid p,
.grid ul {
  max-width: none;
  margin: 0;
  color: var(--soft);
  font-size: 0.94rem;
}

.ticks,
.nots {
  padding: 0;
  list-style: none;
}

.ticks li,
.nots li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 27px;
}

.ticks li::before {
  position: absolute;
  top: 0.55em;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.nots {
  color: var(--soft);
}

.nots li::before {
  position: absolute;
  top: 0.82em;
  left: 3px;
  width: 11px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.note {
  max-width: var(--measure);
  margin: 1.7em 0;
  padding: 18px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-tint);
}

.note-strong {
  border-left-color: var(--success-ink);
}

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

table {
  width: 100%;
  max-width: var(--measure);
  margin: 1.3em 0 1.8em;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

/* ── Documentation ──────────────────────────────────────────────────────── */

.docs {
  display: grid;
  gap: 54px;
  align-items: start;
}

.docs-toc {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--mist);
  font-size: 0.88rem;
}

.docs-toc h2 {
  margin: 0 0 11px;
  color: var(--soft);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.docs-toc ol {
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-toc li {
  margin: 0;
}

.docs-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--soft);
  text-decoration: none;
}

.docs-toc a:hover {
  color: var(--ink);
}

.docs-body {
  min-width: 0;
}

.docs-body h1,
.docs-body h2,
.docs-body h3 {
  scroll-margin-top: 96px;
}

.docs-body table,
.docs-body pre {
  max-width: none;
}

.endpoint,
.verb {
  font-family: var(--mono);
}

.endpoint {
  font-size: 0.84rem;
  white-space: nowrap;
}

.verb {
  display: inline-block;
  min-width: 3.7em;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.verb-get {
  color: var(--soft);
}

.verb-post {
  color: var(--success-ink);
}

.verb-put,
.verb-patch {
  color: var(--blue);
}

.verb-delete {
  color: var(--danger);
}

.docs-index td:first-child,
.docs-index th:first-child {
  width: 5.4em;
}

/* ── Legal pages ────────────────────────────────────────────────── */

.legal-page > *,
.legal-page section {
  max-width: 72ch;
}

.legal-page section {
  padding: 0;
  background: transparent;
}

.legal-page h1 {
  max-width: 14ch;
}

.legal-page h2 {
  margin-top: 2em;
}

.legal-page li {
  margin-bottom: 0.55em;
}

.legal-updated {
  margin-top: 24px;
  color: var(--soft);
  font-size: 0.88rem;
}

.legal-summary {
  margin: 38px 0 12px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--mint);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--mist);
}

.legal-summary h2 {
  margin: 0 0 0.75em;
  font-size: 1.2rem;
}

.legal-summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.legal-details {
  display: grid;
  grid-template-columns: 10em minmax(0, 1fr);
  gap: 0 16px;
  margin: 1.4em 0;
  border-bottom: 1px solid var(--line);
}

.legal-details dt,
.legal-details dd {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.legal-details dt {
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 650;
}

.legal-details dd {
  margin: 0;
}

/* ── Footer and accessibility ───────────────────────────────────────────── */

.site-footer {
  padding: 42px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  background: var(--mist);
  font-size: 0.91rem;
}

.site-footer .wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.site-footer .wrap > div:first-child {
  max-width: 50ch;
}

.site-footer a {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

  .docs-toc {
    position: sticky;
    top: 94px;
  }
}

@media (max-width: 880px) {
  .nav-ready .nav-toggle {
    display: inline-grid;
  }

  .site-header .wrap,
  .site-header-inner {
    flex-wrap: wrap;
    align-items: center;
    min-height: 62px;
    gap: 12px;
  }

  .brand {
    flex: 1;
  }

  .nav {
    display: flex;
    order: 4;
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--line);
    overflow: visible;
  }

  body.nav-ready:not(.nav-open) .nav { display: none; }

  body.nav-open .nav {
    display: flex;
  }

  .nav a {
    padding: 10px 12px;
    font-size: 0.95rem;
    white-space: normal;
  }

  .nav a:nth-child(1),
  .nav a:nth-child(2),
  .nav a:nth-child(3),
  .nav a:nth-child(4),
  .nav a:nth-child(5),
  .nav a:nth-child(6) {
    display: block;
  }

  .nav a[href="/install.html"] {
    margin-left: 0;
    margin-top: 4px;
    text-align: center;
  }
}

@media (max-width: 800px) {
  :root { --page-gutter: 22px; }

  .site-header .wrap,
  .site-header-inner {
    min-height: 62px;
    gap: 14px;
  }

  .hero-grid {
    padding-top: 68px;
    padding-bottom: 64px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .home-statement {
    grid-template-columns: 1fr;
  }

  .quickstart-facts,
  .hero-facts {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .docs-index {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .endpoint {
    white-space: normal;
    word-break: break-word;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  :root { --page-gutter: 18px; }

  .brand {
    gap: 8px;
    font-size: 1.08rem;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .site-header .wrap,
  .site-header-inner {
    align-items: center;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.35rem);
  }

  h2 {
    font-size: 1.72rem;
  }

  .hero-grid {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .quickstart,
  section,
  .section-tint {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .page {
    padding-top: 54px;
    padding-bottom: 64px;
  }

  .quickstart-heading {
    display: block;
  }

  .quickstart-heading .eyebrow {
    margin-bottom: 9px;
  }

  .quickstart-command {
    padding: 52px 18px 20px;
    font-size: 0.875rem;
  }

  .legal-summary {
    padding: 18px;
  }

  .legal-details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal-details dt {
    padding-bottom: 2px;
  }

  .legal-details dd {
    padding-top: 0;
    border-top: 0;
  }

  .copy-command {
    top: 10px;
    right: 10px;
  }

  .pillars,
  .grid {
    grid-template-columns: 1fr;
  }

  .pillar,
  .grid > div {
    padding: 20px;
  }

  .site-footer .wrap {
    display: block;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Documentation hub and API reference. */
.docs-eyebrow {
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 0.875rem;
}
.docs-start {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 36px;
}
.docs-start a {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-card);
}
.docs-start a:hover {
  border-color: var(--blue);
  background: var(--surface-tint);
}
.docs-start strong { color: var(--blue); font-size: 1rem; }
.docs-start span { color: var(--soft); font-size: 0.9rem; }
.docs-toc summary {
  cursor: pointer;
  padding: 8px 0;
  font-weight: 600;
}
.docs-toc a[aria-current="location"] {
  color: var(--blue);
  font-weight: 600;
  background: var(--active);
}
.docs-search-label { display: block; margin: 14px 0; font-size: 0.875rem; }
.docs-search-label input {
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
}
.docs-search-label input:focus-visible,
.docs-toc summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.docs-search-status { font-size: 0.875rem; color: var(--soft); }
.docs-search-status:empty { display: none; }
.docs-body table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}
.docs-body td { overflow-wrap: anywhere; }
.docs-body .endpoint { white-space: normal; }
.docs-code { position: relative; margin: 1.4em 0; min-width: 0; }
.docs-code pre { margin: 0; padding-top: 52px; }
.docs-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.docs-copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (min-width: 1000px) {
  .docs { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
  .docs-toc { max-height: calc(100dvh - 118px); overflow-y: auto; overscroll-behavior: contain; }
  .docs-toc summary { display: none; }
}
@media (max-width: 999px) {
  .docs { gap: 28px; }
  .docs-toc { padding: 12px 18px; }
  .docs-toc h2 { margin-bottom: 0; }
}
@media (max-width: 520px) {
  .docs-start { grid-template-columns: 1fr; }
  .docs-start a { padding: 18px; }
}

/* The same separate navigation and content surfaces as the app. */
.page.docs {
  padding: 0 var(--page-gutter);
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 24px;
}
.docs-toc { background: var(--surface-card); }
.docs-body {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-card);
}
.docs-body h1 { max-width: 20ch; font-size: clamp(2rem, 4vw, 3rem); }
.docs-body > h2 { max-width: none; padding-top: 24px; border-top: 1px solid var(--line); }
.docs-start a { background: var(--surface-tint); }
.docs-start a:focus-visible { border-color: var(--blue); }
.quickstart-command { padding-top: 56px; }
.releases h1 { max-width: none; }
@media (min-width: 1000px) {
  .page.docs { grid-template-columns: 248px minmax(0, 1fr); }
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 180px; gap: 32px; }
  .hero > .wrap > .hero-facts { gap: 20px; }
  .page { padding: 32px calc(var(--page-gutter) - 1px); }
}
@media (max-width: 620px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 28px; gap: 28px; }
  .hero-identity { grid-row: 1; justify-items: start; }
  .hero-mark { width: 104px; }
  .hero h1 { font-size: clamp(2rem, 8.5vw, 3rem); }
  .hero .lede { font-size: 1.0625rem; }
  .hero > .wrap > .hero-facts { grid-template-columns: 1fr; gap: 12px; }
  .hero-facts div { padding-top: 12px; }
  .hero-facts dd { max-width: none; }
  .page, .page.docs { margin-block: 16px 28px; }
  .page { padding: 24px calc(var(--page-gutter) - 1px); border-radius: var(--radius); }
  .page.docs { gap: 16px; }
  .docs-body { padding: 24px 18px; }
  .docs-start { grid-template-columns: 1fr; }
  .site-footer .wrap { display: block; }
  .footer-links { justify-content: flex-start; margin-top: 20px; }
}
