:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5a6573;
  --border: #dde2e8;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --ink: #1b2a3a;
  --code-bg: #10161d;
  --code-text: #dbe3ea;
  --code-key: #7cc4fa;
  --code-str: #f6c177;
  --code-com: #7d8a97;
  --code-cmd: #a7e3a1;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1218;
    --surface: #151c24;
    --text: #e4e9ee;
    --muted: #9aa6b2;
    --border: #26313c;
    --accent: #f59e0b;
    --accent-soft: #2b2110;
    --ink: #e9eef3;
    --code-bg: #0a0f14;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code { font-family: var(--mono); font-size: 0.9em; }

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

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem;
}
.brand img { width: 28px; height: 28px; }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); }
@media (max-width: 520px) {
  /* Fit the nav on one line under the brand: Web UI is a section of the
     home page, a scroll away. */
  .site-header nav { gap: 14px; }
  .site-header nav a { font-size: 0.9rem; }
  .site-header nav .wide { display: none; }
}

/* Hero */
.hero { padding: 64px 0 48px; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.12;
  margin: 16px 0; letter-spacing: -0.02em;
}
.hero .kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0;
}
.hero .kicker span { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--border);
  color: var(--text); background: var(--surface);
}
.button.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.button:hover { filter: brightness(1.08); }

/* Code */
pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: var(--radius); font: 14px/1.55 var(--mono);
}
.code-title {
  font: 12px/1 var(--mono); color: var(--muted);
  margin: 0 0 8px; text-transform: lowercase;
}
.k { color: var(--code-key); }
.s { color: var(--code-str); }
.c { color: var(--code-com); }
.p { color: var(--code-cmd); user-select: none; }

/* Sections */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--border); }
section h2 { font-size: 1.7rem; margin: 0 0 8px; letter-spacing: -0.01em; }
section .intro { color: var(--muted); margin: 0 0 32px; max-width: 46em; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Lifecycle */
.lifecycle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 22px 48px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.9rem;
}
.steps li::after {
  content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px;
  width: 2px; background: var(--border);
}
.steps li:last-child::after { display: none; }
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: 0.97rem; }

/* Parts */
.parts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.parts li {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 0.95rem;
}
.parts li.new { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 32px; }
.roadmap li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--border); }
.roadmap .n { font: 600 0.9rem var(--mono); color: var(--accent); min-width: 1.5em; }
.roadmap strong { display: block; }
.roadmap span { color: var(--muted); font-size: 0.95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (max-width: 860px) {
  .hero { padding: 40px 0 32px; }
  .hero .wrap, .lifecycle { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .roadmap { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
}

/* Badges that link, and badges in headings */
a.badge { text-decoration: none; }
a.badge:hover { text-decoration: underline; }
h2 .badge { vertical-align: middle; margin-left: 8px; font-size: 0.75rem; letter-spacing: 0; }

/* Screenshots */
.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.shot figcaption { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }
.shot figcaption strong { color: var(--text); }
.shot-wide { margin-bottom: 28px; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }

.checks { margin: 32px 0 16px; padding-left: 1.2em; max-width: 50em; }
.checks li { margin: 6px 0; }
.more { margin: 24px 0 0; }

.card pre { margin-top: 12px; padding: 12px 14px; font-size: 13px; }

/* Roadmap state */
.roadmap li > div { flex: 1; }
.roadmap .state {
  font-size: 0.8rem; font-weight: 600; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent);
}
.roadmap .state.done { border-color: var(--border); color: var(--muted); }

/* Release lists */
.release-list { list-style: none; margin: 0; padding: 0; }
.release-list li {
  display: grid; grid-template-columns: 8em 15em minmax(0, 1fr); gap: 4px 20px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.release-list a { text-decoration: none; }
.release-list .when { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 860px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
  .release-list li { grid-template-columns: minmax(0, 1fr); }
}

/* The feature tour in the hero: an SVG of a pair, one part lit at a
   time with its caption below. CSS only. Without motion (or with
   prefers-reduced-motion) every part is lit and the captions are a list. */
:root { --ok: #15803d; --bad: #b91c1c; --tour-step: 4.5s; --tour-cycle: 31.5s; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ok: #4ade80; --bad: #f87171; }
}
.tour { margin: 0; }
.tour svg { display: block; width: 100%; height: auto; font: 14px var(--sans); }
.tour text { fill: var(--text); text-anchor: middle; }
.tour text.start { text-anchor: start; }
.tour rect { fill: var(--bg); stroke: var(--border); stroke-width: 1.5; }
.tour .frame { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.tour .ext rect { fill: var(--surface); stroke-dasharray: 4 3; stroke: var(--muted); }
.tour .name { font-weight: 700; font-size: 15px; }
.tour .sub, .tour .state { fill: var(--muted); font-size: 12px; }
.tour .label { fill: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tour .tiny { fill: var(--muted); font-size: 10px; }
.tour .node rect { stroke: var(--accent); stroke-width: 2; }
.tour .gateway rect { fill: var(--accent); stroke: none; }
.tour .gateway text { fill: var(--bg); font-size: 11px; font-weight: 700; }
.tour .chip.ok rect { stroke: var(--ok); }
.tour .chip.ok text { fill: var(--ok); font-weight: 600; }
.tour .chip.bad rect { stroke: var(--bad); }
.tour .chip.bad text { fill: var(--bad); font-weight: 600; }
.tour .track, .tour .link { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.tour .sync, .tour .tunnel { stroke: var(--accent); stroke-width: 3; fill: none; stroke-dasharray: 6 4; }
.tour .packet { fill: var(--accent); opacity: 0; }
.tour .state.down { opacity: 0; }

.captions { list-style: none; margin: 14px 0 0; padding: 0; }
.captions li { margin: 0 0 10px; color: var(--muted); font-size: 0.97rem; }
.captions strong { color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .tour .s1, .tour .s2, .tour .s3, .tour .s4, .tour .s5, .tour .s6, .tour .s7 {
    animation: tour-spot var(--tour-cycle) infinite both;
  }
  .tour .s2 { animation-delay: calc(1 * var(--tour-step)); }
  .tour .s3 { animation-delay: calc(2 * var(--tour-step)); }
  .tour .s4 { animation-delay: calc(3 * var(--tour-step)); }
  .tour .s5 { animation-delay: calc(4 * var(--tour-step)); }
  .tour .s6 { animation-delay: calc(5 * var(--tour-step)); }
  .tour .s7 { animation-delay: calc(6 * var(--tour-step)); }

  .tour .sync, .tour .tunnel { animation: tour-flow 0.8s linear infinite; }
  .tour .p-out { animation: tour-p-out var(--tour-cycle) infinite; }
  .tour .p-drop { animation: tour-p-drop var(--tour-cycle) infinite; }
  .tour .p-fail { animation: tour-p-fail var(--tour-cycle) infinite; }
  .tour .fw1 rect { animation: tour-fw1 var(--tour-cycle) infinite; }
  .tour .fw1 .up { animation: tour-fw1-up var(--tour-cycle) infinite; }
  .tour .fw1 .down { animation: tour-fw1-down var(--tour-cycle) infinite; }
  .tour .fw2 .up { animation: tour-fw2-up var(--tour-cycle) infinite; }
  .tour .fw2 .down { animation: tour-fw2-down var(--tour-cycle) infinite; }
  .tour .gateway { animation: tour-gateway var(--tour-cycle) infinite; }

  /* One caption at a time, in one grid cell, with a bar for the step. */
  .captions { display: grid; position: relative; padding-bottom: 8px; }
  .captions li { grid-area: 1 / 1; margin: 0; opacity: 0; animation: tour-caption var(--tour-cycle) infinite both; }
  .captions li:nth-child(2) { animation-delay: calc(1 * var(--tour-step)); }
  .captions li:nth-child(3) { animation-delay: calc(2 * var(--tour-step)); }
  .captions li:nth-child(4) { animation-delay: calc(3 * var(--tour-step)); }
  .captions li:nth-child(5) { animation-delay: calc(4 * var(--tour-step)); }
  .captions li:nth-child(6) { animation-delay: calc(5 * var(--tour-step)); }
  .captions li:nth-child(7) { animation-delay: calc(6 * var(--tour-step)); }
  .captions::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: var(--accent); border-radius: 2px; transform-origin: left;
    animation: tour-bar var(--tour-step) linear infinite;
  }
  .tour:hover *, .tour:hover .captions::after { animation-play-state: paused; }
}

/* A step is 1/7 of the cycle: 14.29%. */
@keyframes tour-spot {
  0% { opacity: 0.3; } 1.5%, 12.8% { opacity: 1; } 14.29%, 100% { opacity: 0.3; }
}
@keyframes tour-caption {
  0% { opacity: 0; } 1.5%, 12.8% { opacity: 1; } 14.29%, 100% { opacity: 0; }
}
@keyframes tour-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tour-flow { from { stroke-dashoffset: 10; } to { stroke-dashoffset: 0; } }
@keyframes tour-p-out {
  0%, 2% { transform: translateY(520px); opacity: 0; }
  2.5% { opacity: 1; }
  8% { transform: translateY(40px); opacity: 1; }
  9%, 100% { transform: translateY(40px); opacity: 0; }
}
@keyframes tour-p-drop {
  0%, 7% { transform: translateY(40px); opacity: 0; fill: var(--accent); }
  7.5% { opacity: 1; }
  10.5% { transform: translateY(205px); opacity: 1; fill: var(--accent); }
  11% { fill: var(--bad); }
  13%, 100% { transform: translateY(205px); opacity: 0; fill: var(--bad); }
}
@keyframes tour-p-fail {
  0%, 20% { transform: translateY(520px); opacity: 0; }
  20.5% { opacity: 1; }
  26% { transform: translateY(40px); opacity: 1; }
  27%, 100% { transform: translateY(40px); opacity: 0; }
}
@keyframes tour-fw1 {
  0%, 15.5% { stroke: var(--accent); stroke-dasharray: none; }
  16%, 28% { stroke: var(--bad); stroke-dasharray: 5 4; }
  28.5%, 100% { stroke: var(--accent); stroke-dasharray: none; }
}
@keyframes tour-fw1-up { 0%, 15.5% { opacity: 1; } 16%, 28% { opacity: 0; } 28.5%, 100% { opacity: 1; } }
@keyframes tour-fw1-down { 0%, 15.5% { opacity: 0; } 16%, 28% { opacity: 1; } 28.5%, 100% { opacity: 0; } }
@keyframes tour-fw2-up { 0%, 18.5% { opacity: 1; } 19%, 28% { opacity: 0; } 28.5%, 100% { opacity: 1; } }
@keyframes tour-fw2-down { 0%, 18.5% { opacity: 0; } 19%, 28% { opacity: 1; } 28.5%, 100% { opacity: 0; } }
@keyframes tour-gateway {
  0%, 17% { transform: translateX(0); }
  19%, 28% { transform: translateX(194px); }
  28.5%, 100% { transform: translateX(0); }
}
.shell-title { margin-top: 20px; }

/* Feature groups */
.groups .card ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 0.97rem; }
.groups .card li { margin: 6px 0; }
.groups .card.planned { border-style: dashed; background: transparent; }
@media (max-width: 1000px) and (min-width: 861px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Comparison table */
.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.compare thead th { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.compare tbody th { font-weight: 600; white-space: nowrap; }
.compare tbody th a { text-decoration: none; }
.compare tr.us { background: var(--accent-soft); }
.compare td { color: var(--muted); }
.compare tr.us td { color: var(--text); }
@media (max-width: 860px) {
  /* Each row becomes a small card, with the column name beside each fact. */
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare tr { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 0; margin-bottom: 12px; }
  .compare tbody th { border: 0; padding-bottom: 2px; white-space: normal; }
  .compare td { border: 0; padding: 2px 12px; }
  .compare td::before { content: attr(data-label) ": "; color: var(--text); font-weight: 600; }
}
.compare-wrap + .note { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }

/* Hardware requirements */
.reqs { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.reqs th, .reqs td { text-align: left; vertical-align: top; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
.reqs tr:last-child th, .reqs tr:last-child td { border-bottom: 0; }
.reqs thead th { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.reqs tbody th { font-weight: 600; }
.reqs td { color: var(--muted); }
