:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --card: #161a24;
  --line: #262c3a;
  --text: #e8ebf2;
  --muted: #9aa3b5;
  --accent: #5b8cff;
  --accent-strong: #3f74f5;
  --accent-text: #ffffff;
  /* Filled buttons: white text needs a darker blue than the links (WCAG AA in both themes). */
  --accent-fill: #2f62e6;
  --accent-fill-hover: #2453cc;
  --code: #0f1219;
  --ok: #3fbf7f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --bg-soft: #eef1f7;
    --card: #ffffff;
    --line: #dde2ec;
    --text: #141821;
    --muted: #5b6475;
    --accent: #2f62e6;
    --accent-strong: #2453cc;
    --code: #f1f3f8;
    --shadow: 0 10px 30px rgba(20, 30, 60, 0.08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", monospace; font-size: 0.92em; }
code { background: var(--code); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.4em; }
pre {
  background: var(--code);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 10px 0 0;
}
pre code { background: none; border: 0; padding: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 18px; font-size: 0.95rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } }

/* Hero */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 680px; height: 680px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; position: relative; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.02em; margin: 0 0 10px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 26px; max-width: 40em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text); background: var(--card);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.btn small { font-weight: 500; }
.meta { color: var(--muted); font-size: 0.92rem; }

/* Depth illustration */
.figure {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption { margin: 10px 2px 0; color: var(--muted); font-size: 0.9rem; }

/* Sections */
section { padding: 44px 0; scroll-margin-top: 56px; }
section + section { border-top: 1px solid var(--line); }
h2 { font-size: 1.7rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 26px; max-width: 46em; }
h3 { font-size: 1.08rem; margin: 0 0 6px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
}
.card p { margin: 0; color: var(--muted); }
.icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.icon svg { width: 20px; height: 20px; }

.steps { counter-reset: step; display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-fill); color: var(--accent-text); font-weight: 700; font-size: 0.85rem; margin-bottom: 8px;
}
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.os { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .os { grid-template-columns: 1fr; } }
.os .card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.os .card li { margin: 4px 0; }
.note {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--muted); font-size: 0.95rem;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--card); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 0.9rem; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 24px 14px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 12px; color: var(--muted); font-size: 1.2rem;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 14px; color: var(--muted); }
.faq details > div p { margin: 0 0 8px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
footer .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
footer p { margin: 6px 0; }
.nw { white-space: nowrap; }

/* Grid items may shrink below their content (a long command in <pre> scrolls instead of widening the page). */
.hero-grid > *, .grid > *, .steps > *, .os > * { min-width: 0; }

/* Phones: the logo alone, so the menu fits on one line. */
.brand span { white-space: nowrap; }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav { gap: 16px; }
}
