/* Sidecar Network — v1-terminal design system
   Authoritative CSS for the entire site.
   Source of truth: v1-terminal.html + tokens.jsx
   Zero Tailwind, zero external deps beyond Google Fonts.

   Mobile-first (320px base). Breakpoints: 480 / 768 / 1024.
   Utility classes exposed for page agents:
     .container       — centred content wrapper, safe side padding at 320px
     .scroll-x        — horizontal-scroll container for wide content
     .stack-sm        — flex column gap (8px) for tight mobile stacks
     .visually-hidden — accessible screen-reader-only hide
*/

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────────────────── */

:root {
  --bg: #0a0b0d;
  --bg2: #0f1115;
  --surface: #0e1115;
  --surface2: #12151b;
  --line: #1a1d22;
  --line2: #262a31;
  --fg: #e8eaed;
  --fg2: #b8bdc6;
  --dim: #7a808a;
  --dim2: #4b5058;
  --green: #00ff88;
  --green-dim: #00b864;
  --green-lo: #0a2418;
  --relay: #5fa8ff;
  --amber: #ffb547;
  --red: #ff5757;
}

/* ─── Reset + Base ───────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

a { color: inherit; }

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

/* ─── Layout ─────────────────────────────────────────────────────────────── */

/* Safe at 320px: 16px each side = 288px content. Grows at wider breakpoints. */
.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 480px) { .container { padding: 0 24px; } }
@media (min-width: 768px) { .container { padding: 0 32px; } }

section.bleed { border-top: 1px solid var(--line); padding: 56px 16px; }
@media (min-width: 480px) { section.bleed { padding: 72px 24px; } }
@media (min-width: 768px) { section.bleed { padding: 96px 32px; } }

/* ─── Status Bar ─────────────────────────────────────────────────────────── */

.status-bar {
  background: rgba(10,11,13,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px;
  color: var(--dim);
  overflow: hidden;
}
.status-bar .inner { max-width: 1320px; margin: 0 auto; padding: 7px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (min-width: 768px) { .status-bar .inner { padding: 7px 32px; gap: 24px; } }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); display: inline-block; flex-shrink: 0; }
.status-dot.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

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

nav.main {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,11,13,0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
nav.main .inner { max-width: 1320px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 16px; }
@media (min-width: 480px) { nav.main .inner { padding: 16px 24px; gap: 24px; } }
@media (min-width: 768px) { nav.main .inner { padding: 18px 32px; gap: 40px; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; background: var(--green); clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%); position: relative; flex-shrink: 0; }
.brand-mark::after { content: ''; position: absolute; width: 27%; height: 27%; background: var(--bg); top: 50%; left: 50%; transform: translate(-50%,-50%); border-radius: 1px; }
.brand-label { font-weight: 600; letter-spacing: -0.01em; color: var(--fg); font-size: 15px; }
nav.main .links { display: flex; gap: 28px; list-style: none; }
nav.main .links a { color: var(--dim); text-decoration: none; font-size: 14px; transition: color 0.1s; }
nav.main .links a:hover { color: var(--fg); }
nav.main .right { display: flex; align-items: center; gap: 16px; margin-left: auto; }

/* ─── Pill / Button ──────────────────────────────────────────────────────── */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line2); font-size: 13px;
  text-decoration: none; color: var(--fg);
  transition: border-color 0.1s;
  min-height: 44px;
}
.pill:hover { border-color: var(--fg); }
.pill.green { background: var(--green); color: #00200f; border-color: var(--green); font-weight: 500; }
.pill.green:hover { background: #5fffaa; border-color: #5fffaa; }

.btn-primary { background: var(--green); color: #00200f; padding: 12px 22px; border-radius: 8px; font-weight: 600; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; text-decoration: none; transition: background 0.1s; font-family: inherit; min-height: 44px; }
.btn-primary:hover { background: #5fffaa; }

.btn-ghost { background: transparent; color: var(--fg); padding: 12px 22px; border-radius: 8px; border: 1px solid var(--line2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; text-decoration: none; transition: border-color 0.1s; font-family: inherit; min-height: 44px; }
.btn-ghost:hover { border-color: var(--fg); }

/* ─── Hero Eyebrow ───────────────────────────────────────────────────────── */

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line2); border-radius: 999px;
  padding: 5px 12px 5px 8px;
  font-size: 12px; color: var(--dim);
  margin-bottom: 32px;
}
.hero-eyebrow .tag { background: var(--green); color: #00200f; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero-wrap { position: relative; overflow: hidden; }
.hero { padding: 48px 16px 40px; }
@media (min-width: 480px) { .hero { padding: 64px 24px 48px; } }
@media (min-width: 768px) { .hero { padding: 80px 32px 60px; } }
.hero .inner { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .hero .inner { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
h1.hero-h { font-size: clamp(36px, 8vw, 68px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }
h1.hero-h .gloss { color: var(--green); }
h1.hero-h .strike { color: var(--dim2); text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--red); font-weight: 500; }
.hero-lede { font-size: clamp(16px, 2.5vw, 19px); color: var(--dim); max-width: 540px; line-height: 1.55; margin-bottom: 36px; }
.hero-lede strong { color: var(--fg); font-weight: 500; }
.hero-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.hero-micro { font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--dim); }
.hero-micro .ck { color: var(--green); }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(900px 500px at 78% 8%, rgba(0,255,136,0.10), transparent 60%), radial-gradient(700px 400px at 12% 40%, rgba(0,150,255,0.05), transparent 60%); pointer-events: none; }

/* ─── Terminal Window ────────────────────────────────────────────────────── */

.terminal {
  background: #050608;
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,255,136,0.05), 0 0 0 1px rgba(0,255,136,0.04) inset, 0 24px 48px rgba(0,0,0,0.4);
}
.term-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  color: var(--dim);
}
.term-dots { display: flex; gap: 6px; }
.term-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line2); }
.term-title { margin-left: 14px; }
.term-tabs { display: flex; gap: 4px; margin-left: auto; }
.term-tab { color: var(--dim); font-size: 11px; padding: 3px 10px; border-radius: 5px; cursor: default; }
.term-tab.active { background: #14171c; color: var(--fg); }
.term-body {
  padding: 18px 18px 22px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #c5cad2;
  min-height: 240px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) { .term-body { min-height: 320px; } }
.term-body.code { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Disable Geist Mono's programming ligatures — `--`, `->`, `==`, `>=`, `://`
   render as fused glyphs whose advance width visually swallows the leading
   space, making `docker run --network` look like `docker run--network`.
   The DOM text is correct (copy-paste works); only the rendered glyph is wrong. */
pre, pre.code, code, .inline-code, .term-body, .term-body *, .cmd, .mono {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "calt" 0, "dlig" 0;
  font-kerning: none;
}
.term-body .p { color: var(--green); }
.term-body .dim { color: var(--dim); }
.term-body .b { color: var(--fg); font-weight: 500; }
.term-body .ok { color: var(--green); }
.term-body .warn { color: var(--amber); }
.term-body .err { color: var(--red); }
.ip-badge { display: inline-block; padding: 1px 8px; background: rgba(0,255,136,0.12); color: var(--green); border-radius: 4px; font-weight: 600; }
.caret { display: inline-block; width: 7px; height: 14px; background: var(--green); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
.term-foot { background: var(--bg); border-top: 1px solid var(--line); padding: 8px 14px; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); display: flex; gap: 14px; flex-wrap: wrap; }
.ip-live { color: var(--green); }
.region-rail { margin-top: 14px; font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--dim); display: flex; gap: 8px; flex-wrap: wrap; }
.region-chip { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line2); display: flex; gap: 6px; align-items: center; }
.region-chip.active { border-color: var(--green); color: var(--green); background: rgba(0,255,136,0.05); }
.region-chip.active .lat { color: var(--green-dim); }

/* ─── Section Eyebrow ────────────────────────────────────────────────────── */

.eyebrow { font-family: 'Geist Mono', monospace; font-size: 11.5px; color: var(--green); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.eyebrow::before { content: '▍ '; }
h2.section-h { font-size: clamp(28px, 5vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; max-width: 720px; margin-bottom: 14px; }
.section-sub { font-size: clamp(15px, 2vw, 17px); color: var(--dim); line-height: 1.55; max-width: 620px; }

/* ─── Comparison Table ───────────────────────────────────────────────────── */

.vs-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 56px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vs-row { display: grid; grid-template-columns: 220px repeat(4, 1fr) 220px; gap: 12px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); align-items: center; min-width: 600px; }
.vs-row.head { background: transparent; border-color: transparent; font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.vs-row.us { background: rgba(0,255,136,0.05); border-color: rgba(0,255,136,0.3); }
.svc-name { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.svc-mark { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.dot-y::before { content: '●'; color: var(--green); }
.dot-n::before { content: '○'; color: var(--dim2); }
.dot-q::before { content: '◐'; color: var(--amber); }
.vs-note { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--dim); }

/* ─── How It Works ───────────────────────────────────────────────────────── */

.how-wrap { margin-top: 56px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.how-grid { display: grid; grid-template-columns: 1fr; gap: 1px; }
@media (min-width: 768px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
.how-step { background: var(--bg); padding: 24px; }
@media (min-width: 768px) { .how-step { padding: 32px; min-height: 280px; } }
.how-num { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--green); letter-spacing: 0.1em; margin-bottom: 12px; }
.how-step h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; }
.how-step p { color: var(--dim); font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
pre.code { font-family: 'Geist Mono', monospace; font-size: 12px; background: #050608; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line); line-height: 1.7; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: pre; }
pre.code .p { color: var(--green); }
pre.code .c { color: var(--dim); }

/* ─── Pricing Cards ──────────────────────────────────────────────────────── */

.price-wrap { margin-top: 56px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.price-grid { display: grid; grid-template-columns: 1fr; gap: 1px; }
@media (min-width: 600px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card { background: var(--bg); padding: 24px 20px; display: flex; flex-direction: column; }
@media (min-width: 600px) { .price-card { padding: 32px 28px; } }
.price-card.featured { background: linear-gradient(180deg, rgba(0,255,136,0.05), var(--bg)); }
.price-tier { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.price-tier.active { color: var(--green); }
.price-badge { background: var(--green); color: #00200f; padding: 1px 6px; border-radius: 99px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.05em; }
.price-num { font-size: clamp(36px, 6vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; margin-bottom: 4px; }
.price-num .unit { font-size: 16px; color: var(--dim); font-weight: 400; }
.price-hook { font-size: 13px; color: var(--dim); margin-bottom: 24px; }
.price-feat { font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--fg); margin-bottom: 8px; display: flex; gap: 8px; }
.price-feat::before { content: '+'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.price-cta { margin-top: auto; padding-top: 24px; }
.price-cta button { width: 100%; padding: 12px; border-radius: 7px; border: 1px solid var(--line2); background: transparent; color: var(--fg); font-size: 14px; cursor: pointer; font-family: inherit; transition: border-color 0.1s; min-height: 44px; }
.price-cta button:hover { border-color: var(--fg); }
.price-cta.featured button { background: var(--green); color: #00200f; border-color: var(--green); font-weight: 600; }
.price-cta.featured button:hover { background: #5fffaa; }
.price-note { font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--dim); margin-top: 20px; text-align: center; }

/* ─── FAQ ────────────────────────────────────────────────────────────────── */

.faq-list { display: grid; grid-template-columns: 1fr; gap: 0; margin-top: 48px; }
@media (min-width: 768px) { .faq-list { grid-template-columns: 1fr 1fr; gap: 0 56px; } }
.faq-item { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 0 12px; }
.q-num { font-family: 'Geist Mono', monospace; color: var(--green); font-size: 12px; padding-top: 3px; }
.faq-q { font-weight: 500; font-size: 16px; margin-bottom: 8px; }
.faq-a { font-size: 14px; color: var(--dim); line-height: 1.6; }

/* ─── CTA Banner ─────────────────────────────────────────────────────────── */

.cta-banner { border: 1px solid var(--line2); border-radius: 16px; padding: 36px 24px; background: radial-gradient(700px 200px at 80% 10%, rgba(0,255,136,0.12), transparent 60%), linear-gradient(180deg, var(--bg2), var(--bg)); max-width: 1256px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 768px) { .cta-banner { padding: 64px 56px; grid-template-columns: 1.4fr 1fr; gap: 48px; } }
.cta-banner h2 { font-size: clamp(24px, 4vw, 38px); letter-spacing: -0.025em; line-height: 1.1; font-weight: 600; margin-bottom: 14px; }
.cta-banner p { color: var(--dim); font-size: 15px; max-width: 460px; }
.cmd { font-family: 'Geist Mono', monospace; font-size: 13px; background: #050608; border: 1px solid var(--line2); border-radius: 10px; padding: 14px 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) { .cmd { font-size: 14px; padding: 18px 20px; } }
.cmd .p { color: var(--green); }
.cmd .copy { color: var(--dim); font-size: 11px; margin-left: auto; flex-shrink: 0; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg) 0%, #06070a 100%); padding: 48px 16px 24px; }
@media (min-width: 480px) { footer { padding: 64px 24px 28px; } }
@media (min-width: 768px) { footer { padding: 80px 32px 32px; } }
.foot-top { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
@media (min-width: 600px) { .foot-top { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (min-width: 1024px) { .foot-top { grid-template-columns: 1.5fr repeat(4, 1fr); gap: 48px; padding-bottom: 56px; } }
.foot-brand p { font-size: 14px; color: var(--dim); max-width: 320px; margin-top: 14px; line-height: 1.6; }
.foot-col h5 { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.foot-col a { display: block; font-size: 14px; color: var(--fg2); padding: 5px 0; text-decoration: none; transition: color 0.1s; min-height: 36px; display: flex; align-items: center; }
.foot-col a:hover { color: var(--fg); }
.foot-bot { max-width: 1320px; margin: 0 auto; padding-top: 28px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; font-size: 12px; font-family: 'Geist Mono', monospace; color: var(--dim); }
.foot-bot .right { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.foot-bot .right a { color: var(--dim); text-decoration: none; }
.foot-bot .right a:hover { color: var(--fg); }

/* ─── Pain / Comparison Cards ────────────────────────────────────────────── */

.pain-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 56px; }
@media (min-width: 600px) { .pain-grid { grid-template-columns: 1fr 1fr; } }
.pain-card { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: linear-gradient(180deg, var(--bg2), transparent); }
@media (min-width: 600px) { .pain-card { padding: 28px; } }
.pain-card.us { background: linear-gradient(180deg, rgba(0,255,136,0.04), transparent); border-color: rgba(0,255,136,0.2); }
.pain-lbl { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.pain-card.diy .pain-lbl { color: var(--red); }
.pain-card.us .pain-lbl { color: var(--green); }
.pain-card h3 { font-size: clamp(18px, 3.5vw, 24px); letter-spacing: -0.02em; font-weight: 600; margin-bottom: 20px; }
.pain-list { list-style: none; font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--dim); line-height: 2; }
.pain-list li { border-bottom: 1px dashed var(--line); }
.pain-list .x { color: var(--red); }
.pain-list .y { color: var(--green); }
.pain-list .v { color: var(--fg); }

/* ─── Logo Strip ─────────────────────────────────────────────────────────── */

.logo-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; background: var(--bg2); overflow: hidden; white-space: nowrap; }
.logo-strip .inner { max-width: 1320px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 32px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) { .logo-strip .inner { padding: 0 32px; gap: 56px; } }
.logo-strip .strip-label { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; flex-shrink: 0; }
.logo-strip .logos { display: inline-flex; gap: 40px; }
@media (min-width: 768px) { .logo-strip .logos { gap: 56px; } }
.logo-strip .logos span { font-family: 'Geist Mono', monospace; font-size: 16px; font-weight: 500; color: var(--dim); cursor: default; transition: color 0.1s; }
.logo-strip .logos span:hover { color: var(--fg); }

/* ─── Stat Strip ─────────────────────────────────────────────────────────── */

.stats-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 28px; }
@media (min-width: 768px) { .stats-strip { grid-template-columns: repeat(4, 1fr); } }
.stat-item { padding: 0 0 16px 16px; border-left: 1px solid var(--line); }
.stat-item:first-child { padding-left: 0; border-left: none; }
.stat-item:nth-child(2) { }
@media (max-width: 767px) {
  .stat-item:nth-child(1), .stat-item:nth-child(2) { padding-bottom: 20px; }
  .stat-item:nth-child(3) { border-left: none; padding-left: 0; }
}
.stat-n { font-family: 'Geist Mono', monospace; font-size: clamp(20px, 4vw, 28px); font-weight: 600; letter-spacing: -0.025em; color: var(--fg); line-height: 1; margin-bottom: 4px; }
.stat-l { font-size: 13px; color: var(--fg); font-weight: 500; }
.stat-s { font-size: 12px; color: var(--dim); }

/* ─── Utility ─────────────────────────────────────────────────────────────── */

.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.text-green { color: var(--green); }
.text-dim { color: var(--dim); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }

/* Accessible hide — screen-reader only, fully off-screen */
.sr-only,
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Horizontal-scroll wrapper — for tables, pre/code, long tokens on narrow screens */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Tight vertical flex stack useful on mobile — page agents can wrap groups with this */
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Form Fields (app pages) ────────────────────────────────────────────── */

input, select, textarea {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  font-size: 16px; /* 16px prevents iOS zoom-on-focus */
  min-height: 44px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

/* ─── Prose (legal / docs pages) ─────────────────────────────────────────── */

.sc-prose h1 { font-size: clamp(1.5rem, 4vw, 1.875rem); font-weight: 700; margin: 1.25rem 0 0.75rem; }
.sc-prose h2 { font-size: clamp(1.125rem, 3vw, 1.375rem); font-weight: 700; margin: 1.5rem 0 0.5rem; }
.sc-prose h3 { font-size: 1.125rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.sc-prose p  { margin: 0.5rem 0; line-height: 1.6; }
.sc-prose ul { list-style: disc; padding-left: 1.5rem; margin: 0.5rem 0; }
.sc-prose ol { list-style: decimal; padding-left: 1.5rem; margin: 0.5rem 0; }
.sc-prose li { margin: 0.25rem 0; }

.sc-prose code {
  background: var(--surface2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: 'Geist Mono', ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.sc-prose pre {
  background: var(--surface2);
  border: 1px solid var(--line);
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  white-space: pre;
}

.sc-prose blockquote {
  border-left: 3px solid var(--line);
  padding: 0.25rem 0.75rem;
  color: var(--dim);
  margin: 0.5rem 0;
}

.sc-prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.sc-prose a  { color: var(--relay); text-decoration: underline; }
.sc-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.sc-prose th { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.sc-prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--fg2); overflow-wrap: anywhere; }

/* Wrap prose tables on narrow screens */
.sc-prose .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ─── App-page helpers ───────────────────────────────────────────────────── */

.sc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }

.sc-skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #00200f;
  padding: 8px 12px; border-radius: 6px; z-index: 200;
}
.sc-skip-link:focus { left: 1rem; top: 1rem; }

.sc-tab { padding: 10px 16px; background: transparent; color: var(--dim); border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; font-size: 14px; min-height: 44px; }
.sc-tab:hover { color: var(--fg); }
.sc-tab-active { color: var(--fg); border-bottom-color: var(--green); }

.sc-hcf-field { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; min-height: 44px; }

.sc-hidden { display: none; }
.sc-spinner-dot { background: var(--green); }
.sc-muted { color: var(--dim); }
.sc-border { border-color: var(--line); }
.sc-step { opacity: 0.4; }
.sc-step-done { opacity: 1; color: var(--fg); }
.sc-step-current { opacity: 1; color: var(--fg); font-weight: 600; }

/* Shared-IPv4 port allocation — inline list-cell badge (dashboard peer table).
   The peer-detail panel styles its own block in dashboard.html's <style>. */
.sc-shared-ipv4 { color: var(--green); font-family: 'Geist Mono', monospace; font-size: 10.5px; }
.sc-shared-ipv4-ports { color: var(--dim); }

/* docs/shared-ipv4.html — CSP-clean helpers (no inline styles on that page). */
.sc-doc-title { font-size: clamp(24px, 5vw, 34px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.sc-doc-lead { font-size: 16px; color: var(--dim); line-height: 1.75; margin-bottom: 24px; }
.sc-doc-h2 { font-size: clamp(18px, 3.5vw, 22px); font-weight: 600; letter-spacing: -0.02em; margin: 32px 0 12px; }
.sc-doc-p { line-height: 1.75; margin-bottom: 14px; color: var(--fg); }
.sc-doc-code {
  display: block; background: var(--surface2); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 16px; margin: 12px 0;
  font-family: 'Geist Mono', monospace; font-size: 12.5px; color: var(--green);
  white-space: pre-wrap; word-break: break-all;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.sc-doc-list { margin: 0 0 14px 18px; line-height: 1.8; color: var(--fg); }

/* Legacy button aliases kept for backward compat with existing page JS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.15s; min-height: 44px; }
.sc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 6px; background: var(--green); color: #00200f; font-weight: 600; border: none; cursor: pointer; transition: background 0.15s, transform 0.08s; text-decoration: none; min-height: 44px; }
.sc-btn:hover { background: #5fffaa; }
.sc-btn:active { transform: translateY(1px); }
.sc-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.sc-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sc-btn-ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.sc-btn-ghost:hover { border-color: var(--fg2); background: transparent; color: var(--fg); }
.sc-btn-secondary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: transparent; color: var(--relay); border: 1.5px solid var(--relay); border-radius: 6px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: background 0.15s, color 0.15s; min-height: 44px; }
.sc-btn-secondary:hover { background: var(--relay); color: var(--bg); }
.sc-btn-danger { background: var(--red); color: #fff; }
.sc-btn-danger:hover { background: #cc3030; }

/* ─── Inline Code ────────────────────────────────────────────────────────── */
.inline-code { font-family: 'Geist Mono', monospace; font-size: 0.88em; background: var(--surface2); color: var(--green); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
code { font-family: 'Geist Mono', monospace; font-size: 0.88em; background: var(--surface2); color: var(--green); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }

/* ─── Page Wrapper (interior pages) ─────────────────────────────────────── */
.page-wrap { max-width: 1320px; margin: 0 auto; padding: 48px 16px; }
@media (min-width: 480px) { .page-wrap { padding: 56px 24px; } }
@media (min-width: 768px) { .page-wrap { padding: 72px 32px; } }
.page-hero { padding: 40px 16px 32px; border-bottom: 1px solid var(--line); }
@media (min-width: 480px) { .page-hero { padding: 48px 24px 40px; } }
@media (min-width: 768px) { .page-hero { padding: 64px 32px 48px; } }
.page-hero .container { max-width: 1320px; margin: 0 auto; }

/* ─── Dashboard Shell ─────────────────────────────────────────────────────── */
.dash-layout { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 768px) { .dash-layout { grid-template-columns: 220px 1fr; } }
.dash-sidebar { border-right: 1px solid var(--line); padding: 24px 0; background: var(--bg); }
@media (min-width: 768px) { .dash-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.dash-sidebar .brand-wrap,
.brand-wrap { padding: 0 20px 20px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.dash-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--dim); text-decoration: none; font-size: 13px; transition: color 0.1s; min-height: 44px; }
.dash-nav-item:hover { color: var(--fg); background: rgba(255,255,255,0.02); }
.dash-nav-item.active { color: var(--fg); background: rgba(0,255,136,0.06); border-right: 2px solid var(--green); }
.dash-content { padding: 20px 16px; overflow-y: auto; }
@media (min-width: 480px) { .dash-content { padding: 28px 24px; } }
@media (min-width: 768px) { .dash-content { padding: 32px; } }
.dash-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dash-title { font-size: clamp(18px, 3.5vw, 22px); font-weight: 600; letter-spacing: -0.015em; }
.dash-crumb { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--dim); margin-bottom: 6px; }

/* ─── Data Table ─────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--fg2); overflow-wrap: anywhere; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
/* Wrap data tables in .scroll-x on narrow screens */

/* ─── Docs Layout ────────────────────────────────────────────────────────── */
.doc-shell { display: grid; grid-template-columns: 1fr; gap: 0; min-height: calc(100vh - 57px); }
@media (min-width: 1024px) { .doc-shell { grid-template-columns: 220px 1fr 200px; } }
.doc-sidebar { border-right: 1px solid var(--line); padding: 32px 0; }
@media (min-width: 1024px) { .doc-sidebar { position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; } }
.doc-sidebar-label { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); padding: 12px 20px 6px; display: block; }
.doc-sidebar a { display: block; padding: 8px 20px; font-size: 13px; color: var(--dim); text-decoration: none; transition: color 0.1s; min-height: 36px; }
.doc-sidebar a:hover { color: var(--fg); }
.doc-sidebar a.active { color: var(--green); border-left: 2px solid var(--green); padding-left: 18px; }
.doc-content { padding: 32px 16px; max-width: 740px; }
@media (min-width: 480px) { .doc-content { padding: 40px 24px; } }
@media (min-width: 1024px) { .doc-content { padding: 48px 56px; } }
.doc-toc { padding: 48px 24px; border-left: 1px solid var(--line); }
@media (min-width: 1024px) { .doc-toc { position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; } }
.doc-toc-label { font-family: 'Geist Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin-bottom: 12px; }
.doc-toc a { display: block; font-size: 12px; color: var(--dim); text-decoration: none; padding: 4px 0; transition: color 0.1s; }
.doc-toc a:hover, .doc-toc a.active { color: var(--green); }

/* ─── Status Page ────────────────────────────────────────────────────────── */
.status-banner { text-align: center; padding: 48px 16px 40px; }
@media (min-width: 768px) { .status-banner { padding: 80px 32px 56px; } }
.status-badge { display: inline-flex; align-items: center; gap: 10px; background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.25); border-radius: 999px; padding: 10px 20px; margin-bottom: 24px; font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--green); }
.status-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex-shrink: 0; }
/* uptime-row: scrollable on mobile */
.uptime-row { display: grid; grid-template-columns: 160px 1fr 60px 80px; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 400px; }
@media (min-width: 600px) { .uptime-row { grid-template-columns: 240px 1fr 80px 100px; gap: 16px; } }
.uptime-bars { display: flex; gap: 2px; height: 28px; align-items: flex-end; }
.uptime-bar-seg { flex: 1; border-radius: 2px; background: var(--green); min-height: 4px; max-height: 28px; }
.uptime-bar-seg.warn { background: var(--amber); }
.uptime-bar-seg.down { background: var(--red); }
.uptime-pct { font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--fg); text-align: right; }
.uptime-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-family: 'Geist Mono', monospace; font-size: 11px; background: rgba(0,255,136,0.1); color: var(--green); }
.uptime-pill.amber { background: rgba(255,181,71,0.1); color: var(--amber); }
.uptime-pill.red { background: rgba(255,87,87,0.1); color: var(--red); }
.incident-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.incident-date { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.incident-title { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.incident-body { font-size: 13px; color: var(--dim); line-height: 1.6; margin-bottom: 8px; }
.incident-resolved { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--green); }

/* ─── Community Testimonials ─────────────────────────────────────────────── */
.testimonial-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 48px; }
@media (min-width: 600px) { .testimonial-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.testimonial-handle { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--green); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.testimonial-source { color: var(--dim); font-size: 11px; }
.testimonial-text { font-size: 14px; color: var(--fg2); line-height: 1.6; }

/* ─── Counter Strip (community) ──────────────────────────────────────────── */
.counter-strip { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .counter-strip { grid-template-columns: repeat(5, 1fr); } }
.counter-item { padding: 20px 16px; border-right: 1px solid var(--line); }
@media (min-width: 768px) { .counter-item { padding: 28px 24px; } }
.counter-item:last-child { border-right: none; }
.counter-n { font-family: 'Geist Mono', monospace; font-size: clamp(22px, 4vw, 32px); font-weight: 600; letter-spacing: -0.03em; color: var(--fg); margin-bottom: 4px; }
.counter-l { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.counter-s { font-size: 12px; color: var(--dim); }

/* ─── API Reference ──────────────────────────────────────────────────────── */
.api-shell { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 57px); }
@media (min-width: 768px) { .api-shell { grid-template-columns: 220px 1fr; } }
.api-sidebar { border-right: 1px solid var(--line); padding: 24px 0; }
@media (min-width: 768px) { .api-sidebar { position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; } }
.api-sidebar-label { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; padding: 12px 20px 4px; display: block; }
.api-sidebar a { display: flex; align-items: center; gap: 8px; padding: 9px 20px; font-size: 12.5px; color: var(--dim); text-decoration: none; font-family: 'Geist Mono', monospace; min-height: 40px; }
.api-sidebar a:hover { color: var(--fg); background: rgba(255,255,255,0.02); }
.api-sidebar a.active { color: var(--fg); background: rgba(0,255,136,0.06); }
.method-pill { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; font-family: 'Geist Mono', monospace; }
.method-post { background: rgba(0,255,136,0.15); color: var(--green); }
.method-get { background: rgba(95,168,255,0.15); color: var(--relay); }
.method-del { background: rgba(255,87,87,0.15); color: var(--red); }
.api-content { padding: 32px 16px; max-width: 820px; }
@media (min-width: 480px) { .api-content { padding: 40px 24px; } }
@media (min-width: 768px) { .api-content { padding: 48px 56px; } }
.param-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.param-table th { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.param-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; overflow-wrap: anywhere; }
.param-name { font-family: 'Geist Mono', monospace; color: var(--fg); }
.param-type { font-family: 'Geist Mono', monospace; color: var(--dim); font-size: 12px; }
.param-req { color: var(--green); font-family: 'Geist Mono', monospace; font-size: 12px; }
.param-desc { color: var(--dim); line-height: 1.5; }

/* ─── Tag grid (apps/use-cases) ─────────────────────────────────────────── */
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 48px; }
@media (min-width: 768px) { .app-grid { grid-template-columns: repeat(4, 1fr); } }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.app-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.app-ports { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--green); margin-bottom: 8px; }
.app-desc { font-size: 13px; color: var(--dim); line-height: 1.5; }

/* ─── Comparison table (self-host) ──────────────────────────────────────── */
.compare-table { width: 100%; border-collapse: collapse; margin-top: 48px; }
.compare-table th { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.compare-table td:first-child { color: var(--dim); font-family: 'Geist Mono', monospace; font-size: 13px; }
.compare-y { color: var(--green); }
.compare-n { color: var(--dim); }

/* ─── Press Kit ──────────────────────────────────────────────────────────── */
.press-logo-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 600px) { .press-logo-grid { grid-template-columns: repeat(2, 1fr); } }
.press-logo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.press-logo-label { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); text-align: center; }
.press-download { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 40px; }
@media (min-width: 768px) { .fact-grid { grid-template-columns: repeat(4, 1fr); } }
.fact-cell { background: var(--bg); padding: 16px; }
@media (min-width: 768px) { .fact-cell { padding: 20px; } }
.fact-label { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.fact-value { font-size: 15px; font-weight: 500; }

/* ─── Onboarding step flow ───────────────────────────────────────────────── */
.onboard-layout { display: grid; grid-template-columns: 1fr; gap: 0; min-height: calc(100vh - 57px); }
@media (min-width: 768px) { .onboard-layout { grid-template-columns: 320px 1fr; } }
.onboard-sidebar { border-right: 1px solid var(--line); padding: 32px 16px; background: var(--bg2); }
@media (min-width: 768px) { .onboard-sidebar { padding: 48px 32px; } }
.onboard-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.onboard-step-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line2); background: var(--bg); display: flex; align-items: center; justify-content: center; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); flex-shrink: 0; margin-top: 2px; }
.onboard-step.done .onboard-step-dot { background: var(--green); color: #00200f; border-color: var(--green); font-weight: 700; }
.onboard-step.active .onboard-step-dot { background: rgba(0,255,136,0.1); border-color: var(--green); color: var(--green); font-weight: 700; }
.onboard-step-label { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.onboard-step.done .onboard-step-label { color: var(--dim); }
.onboard-step.active .onboard-step-label { color: var(--fg); }
.onboard-step-sub { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--dim); }
.onboard-content { padding: 32px 16px; }
@media (min-width: 480px) { .onboard-content { padding: 40px 24px; } }
@media (min-width: 768px) { .onboard-content { padding: 48px 56px; } }
.onboard-step-pill { display: inline-block; font-family: 'Geist Mono', monospace; font-size: 12px; background: rgba(0,255,136,0.1); color: var(--green); border: 1px solid rgba(0,255,136,0.25); border-radius: 6px; padding: 3px 10px; margin-bottom: 20px; }
.region-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.region-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; cursor: pointer; transition: border-color 0.1s; flex: 1; min-width: 140px; }
.region-card:hover { border-color: var(--fg2); }
.region-card.selected { border-color: var(--green); background: rgba(0,255,136,0.04); }
.region-card.down { opacity: 0.5; }
.region-card-name { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.region-card-sub { font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.region-card-lat { font-family: 'Geist Mono', monospace; font-size: 22px; font-weight: 600; color: var(--fg); }
.region-card.selected .region-card-lat { color: var(--green); }

/* ─── Settings tabs ──────────────────────────────────────────────────────── */
.settings-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 768px) { .settings-layout { grid-template-columns: 200px 1fr; } }
.settings-sidebar { border-right: 1px solid var(--line); padding: 24px 0; }
@media (min-width: 768px) { .settings-sidebar { padding: 32px 0; } }
.settings-nav-item { display: block; padding: 10px 20px; font-size: 13px; color: var(--dim); text-decoration: none; transition: color 0.1s; min-height: 44px; display: flex; align-items: center; }
.settings-nav-item:hover { color: var(--fg); }
.settings-nav-item.active { color: var(--fg); background: rgba(0,255,136,0.06); border-right: 2px solid var(--green); font-weight: 500; }
.settings-content { padding: 24px 16px; }
@media (min-width: 480px) { .settings-content { padding: 28px 24px; } }
@media (min-width: 768px) { .settings-content { padding: 32px 40px; } }
.settings-section { margin-bottom: 48px; }
.settings-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.settings-field { margin-bottom: 20px; }
.settings-label { font-family: 'Geist Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 8px; display: block; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 16px; }
.toggle-label { font-size: 14px; }
.toggle-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.toggle-switch { width: 36px; height: 20px; background: var(--line2); border-radius: 10px; position: relative; cursor: pointer; flex-shrink: 0; min-width: 36px; }
.toggle-switch.on { background: var(--green); }
.toggle-switch::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left 0.15s; }
.toggle-switch.on::after { left: 19px; }
.danger-zone { border: 1px solid rgba(255,87,87,0.3); border-radius: 10px; padding: 24px; background: rgba(255,87,87,0.03); }
.danger-zone h3 { color: var(--red); border-bottom-color: rgba(255,87,87,0.2); }

/* ─── Mobile menu (collapsed hamburger via details/summary) ──────────────── */
.sc-mobile-menu { display: none; margin-left: auto; }
.sc-mobile-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--dim);
  font-size: 14px;
  user-select: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sc-mobile-menu summary::-webkit-details-marker { display: none; }
.sc-mobile-menu[open] ul {
  position: absolute;
  top: 100%;
  right: 1rem;
  background: #0a0f0d;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0 0;
  list-style: none;
  min-width: 200px;
  z-index: 1000;
}
.sc-mobile-menu[open] ul li { margin: 8px 0; }
.sc-mobile-menu[open] ul a { color: #fff; text-decoration: none; font-size: 14px; display: block; padding: 6px 0; min-height: 36px; }

/* ─── Welcome (first-IP) onboarding page ────────────────────────────────── */
.welcome-wrap { max-width: 760px; margin: 0 auto; padding: 56px 24px 88px; }
.welcome-hero { text-align: center; margin-bottom: 36px; }
.welcome-eyebrow {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-dim); margin-bottom: 12px;
}
.welcome-hero h1 {
  font-size: clamp(26px, 4.5vw, 40px); font-weight: 700;
  letter-spacing: -0.022em; line-height: 1.15; margin-bottom: 12px;
}
.welcome-sub { font-size: 15px; color: var(--fg2); line-height: 1.6; }

/* Step strip */
.welcome-steps {
  display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px;
  font-family: 'Geist Mono', monospace;
}
.welcome-step {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--dim); font-size: 13px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.welcome-step-num {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--line2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--dim);
}
.welcome-step-current {
  border-color: var(--green); background: var(--green-lo); color: var(--fg);
}
.welcome-step-current .welcome-step-num {
  background: var(--green); color: #00200f; border-color: var(--green);
}
.welcome-step-done { border-color: var(--line2); color: var(--fg2); }
.welcome-step-done .welcome-step-num {
  background: var(--green-dim); color: #00200f; border-color: var(--green-dim);
}
.welcome-step-done .welcome-step-num::before {
  content: "✓"; font-weight: 700;
}
.welcome-step-done .welcome-step-num { font-size: 0; }
.welcome-step-done .welcome-step-num::before { font-size: 13px; }

/* Loading + error blocks */
.welcome-loading {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 48px 24px; font-family: 'Geist Mono', monospace;
  font-size: 13px; color: var(--dim);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.welcome-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line2); border-top-color: var(--green);
  animation: welcome-spin 0.8s linear infinite;
}
@keyframes welcome-spin { to { transform: rotate(360deg); } }

.welcome-error {
  padding: 20px 22px; border-radius: 10px;
  background: rgba(255,87,87,0.06); border: 1px solid rgba(255,87,87,0.3);
  color: var(--fg); margin-bottom: 24px;
}
.welcome-error strong { display: block; margin-bottom: 6px; color: var(--red); }
.welcome-error p { font-size: 14px; color: var(--fg2); line-height: 1.55; }
.welcome-error a { color: var(--relay); }

/* Card */
.welcome-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 24px; margin-bottom: 18px;
  transition: border-color 0.3s;
}
.welcome-card-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.welcome-card-head h2 {
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0;
}
.welcome-card-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  background: var(--green-lo); border: 1px solid rgba(0,255,136,0.3);
  color: var(--green); font-family: 'Geist Mono', monospace;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.welcome-card-tier {
  margin-left: auto; font-family: 'Geist Mono', monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(95,168,255,0.1); color: var(--relay);
  border: 1px solid rgba(95,168,255,0.25); border-radius: 999px;
  padding: 3px 10px;
}
.welcome-card-status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--dim);
}
.welcome-card-help {
  font-size: 14px; color: var(--fg2); line-height: 1.6; margin: 4px 0 14px;
}
.welcome-card-help code,
.welcome-card-foot code { font-size: 12px; }
.welcome-card-foot {
  font-size: 12.5px; color: var(--dim); line-height: 1.6; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.welcome-card-foot a { color: var(--relay); text-decoration: none; }
.welcome-card-foot a:hover { color: var(--fg); }

/* Pulse highlight on the verify card while we wait */
.welcome-card-pulse { border-color: rgba(0,255,136,0.2); }
.welcome-card-success {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.2), 0 10px 40px -20px rgba(0,255,136,0.3);
}

/* Token row */
.token-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.token-value {
  flex: 1 1 280px; min-width: 0;
  font-family: 'Geist Mono', monospace; font-size: 13px;
  color: var(--green); background: var(--bg2);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 14px;
  overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* Code blocks */
.welcome-code-wrap {
  position: relative; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.welcome-code-inline { display: inline-block; max-width: 100%; }
.welcome-code {
  font-family: 'Geist Mono', monospace; font-size: 12.5px;
  color: var(--fg); line-height: 1.55;
  padding: 16px 18px; margin: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  white-space: pre;
}
.welcome-code code {
  background: transparent; color: inherit; padding: 0; font-size: inherit;
}
.welcome-code-copy {
  position: absolute; top: 8px; right: 8px;
  font-size: 11px; padding: 4px 10px;
}

/* Buttons */
.welcome-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px;
  font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--fg2); cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none; min-height: 44px;
}
.welcome-btn:hover { border-color: var(--green); color: var(--green); }
.welcome-btn:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
.welcome-btn-ghost { /* default */ }
.welcome-btn-primary {
  background: var(--green); color: #00200f;
  border-color: var(--green); font-weight: 600;
}
.welcome-btn-primary:hover { background: #5fffaa; color: #00200f; }
.welcome-btn-copied { color: var(--green); border-color: var(--green); }

/* Peer status dot */
.welcome-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); display: inline-block;
}
.welcome-dot-pulse { animation: welcome-pulse 1.5s ease-in-out infinite; }
.welcome-dot-success {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: none;
}
@keyframes welcome-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Expected IP block */
.welcome-expected {
  margin-top: 14px; padding: 14px 16px;
  background: var(--surface2); border: 1px dashed var(--line2);
  border-radius: 8px;
}
.welcome-expected-label {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--dim); margin-bottom: 8px;
}
.welcome-expected-ips { display: flex; gap: 10px; flex-wrap: wrap; }
.welcome-ip {
  font-family: 'Geist Mono', monospace; font-size: 12.5px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px; color: var(--green);
  overflow-wrap: anywhere;
}

/* Wow moment banner */
.welcome-wow {
  position: relative; overflow: hidden;
  margin-top: 8px; padding: 28px 28px 28px 88px;
  background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(95,168,255,0.06));
  border: 1px solid rgba(0,255,136,0.35); border-radius: 12px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.welcome-wow-visible { opacity: 1; transform: translateY(0); }
.welcome-wow-spark {
  position: absolute; left: 24px; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 24px var(--green);
}
.welcome-wow-spark::after {
  content: ""; position: absolute; inset: 6px;
  border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.welcome-wow-body h3 {
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px;
  color: var(--fg);
}
.welcome-wow-body p {
  font-size: 13.5px; color: var(--fg2); line-height: 1.55; margin: 0 0 14px;
}
.welcome-wow-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Footer help */
.welcome-foot {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim); line-height: 1.6;
}
.welcome-foot a { color: var(--fg2); }
.welcome-foot-mono {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--dim); margin-top: 8px;
}
.welcome-foot-sep { margin: 0 8px; opacity: 0.5; }

/* Mobile: keep code blocks scrollable, stack the step strip */
@media (max-width: 640px) {
  .welcome-wrap { padding: 32px 16px 64px; }
  .welcome-steps { flex-direction: column; gap: 6px; }
  .welcome-step { padding: 10px 12px; }
  .welcome-card { padding: 18px 16px; }
  .welcome-card-head { gap: 8px; }
  .welcome-card-tier, .welcome-card-status { margin-left: 0; }
  .welcome-code { font-size: 11.5px; padding: 14px 16px; padding-right: 70px; }
  .welcome-wow { padding: 24px 20px 24px 76px; }
  .welcome-wow-spark { left: 18px; width: 36px; height: 36px; }
  .token-row { gap: 6px; }
  .token-value { flex: 1 1 100%; font-size: 12px; padding: 9px 12px; }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Nav: hide links, show hamburger menu */
  nav.main .links { display: none; }
  nav.main .right { display: none; }
  .sc-mobile-menu { display: block; }

  /* Footer: stack columns */
  .foot-top { grid-template-columns: 1fr; }
  .foot-bot { flex-direction: column; gap: 8px; }
  .foot-bot .right { margin-left: 0; }

  /* Stats: 2-col grid on mobile */
  .stats-strip { grid-template-columns: repeat(2, 1fr); }

  /* Wide content: horizontal scroll */
  .vs-grid { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* App grid: 2-col on mobile */
  .app-grid { grid-template-columns: repeat(2, 1fr); }

  /* Dashboard sidebar: hide on mobile (appears above content) */
  .dash-sidebar { border-right: none; border-bottom: 1px solid var(--line); height: auto; position: static; }
  .doc-sidebar { display: none; }
  .doc-toc { display: none; }
  .api-sidebar { display: none; }

  /* CTA banner: single column, reduced padding */
  .cta-banner { grid-template-columns: 1fr; }

  /* Onboarding: hide left sidebar steps on mobile */
  .onboard-sidebar { border-right: none; border-bottom: 1px solid var(--line); padding: 24px 16px; }

  /* Press logo/fact grids */
  .press-logo-grid { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }

  /* Counter strip: 2-col */
  .counter-strip { grid-template-columns: repeat(2, 1fr); }

  /* Testimonials: single col */
  .testimonial-grid { grid-template-columns: 1fr; }
}

@media (max-width: 479px) {
  /* At 320px minimum: tighten headings further */
  h1.hero-h { letter-spacing: -0.03em; }

  /* Hero actions: full-width stack */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { width: 100%; justify-content: center; }

  /* Stat strip: collapse to 2-col, remove left borders on 3rd/4th items */
  .stat-item { padding-left: 12px; }
  .stat-item:nth-child(3) { border-left: none; padding-left: 0; }

  /* Pricing: ensure single col */
  .price-grid { grid-template-columns: 1fr; }

  /* Pain cards: single col */
  .pain-grid { grid-template-columns: 1fr; }

  /* FAQ: single col */
  .faq-list { grid-template-columns: 1fr; }

  /* App grid: single col on 320px */
  .app-grid { grid-template-columns: 1fr; }

  /* Counter strip: single col */
  .counter-strip { grid-template-columns: 1fr; }
}

/* ─── Accessibility — WCAG 2.1 AA ────────────────────────────────────────── */

/*
  Color-contrast notes (all tokens verified against --bg #0a0b0d):
    --fg   #e8eaed  16.34:1  AAA
    --fg2  #b8bdc6  10.44:1  AAA
    --dim  #7a808a   4.95:1  AA   (minimum for normal text)
    --green #00ff88 14.68:1  AAA
    --relay #5fa8ff  8.00:1  AAA
    --amber #ffb547 11.21:1  AAA
    --red   #ff5757  6.33:1  AA
    #00200f on --green       12.90:1  AAA (CTA button text)
    --dim2  #4b5058  2.43:1  decorative-only (dot indicators, strikethrough hero text)
  Any --dim2 use on readable text was migrated to --dim above.

  prefers-color-scheme: this site is intentionally dark-only. --bg is near-black;
  forced-colors (Windows High Contrast) is handled via the system palette below.
*/

/* Skip-link: enhance with focus-visible so it is keyboard-only */
.sc-skip-link:focus-visible { left: 1rem; top: 1rem; }

/* Focus rings: visible :focus-visible outline on every interactive element.
   Keyboard users see a 2px green ring; pointer users do not (focus-visible). */

/* Navigation links */
nav.main .links a:focus-visible,
.foot-col a:focus-visible,
.foot-bot .right a:focus-visible,
.doc-sidebar a:focus-visible,
.doc-toc a:focus-visible,
.api-sidebar a:focus-visible,
.dash-nav-item:focus-visible,
.settings-nav-item:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Pill + button variants */
.pill:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.btn:focus-visible,
.sc-btn-secondary:focus-visible,
.sc-btn-ghost:focus-visible,
.sc-btn-danger:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Pricing CTA buttons */
.price-cta button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Toggle switches — these are interactive but use div-like elements */
.toggle-switch:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Region and onboarding cards (clickable) */
.region-card:focus-visible,
.app-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Term tab */
.term-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 5px;
}

/* sc-tab */
.sc-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ─── prefers-reduced-motion ─────────────────────────────────────────────── */
/*
  Users who set "reduce motion" in OS accessibility settings opt out of
  animations. We pause/remove all non-essential motion.
*/
@media (prefers-reduced-motion: reduce) {
  /* Caret blink */
  .caret { animation: none; opacity: 1; }

  /* Loading spinners: show static state */
  .welcome-spinner { animation: none; border-top-color: var(--green); }

  /* Status dot glow is kept (purely visual decoration, no motion) */

  /* Pulse dot on welcome page */
  .welcome-dot-pulse { animation: none; opacity: 1; }

  /* Wow banner transition */
  .welcome-wow { transition: none; }

  /* Welcome step transitions */
  .welcome-step { transition: none; }

  /* Welcome card border transition */
  .welcome-card { transition: none; }

  /* Button / pill / link transitions */
  .pill, .btn-primary, .btn-ghost, .btn, .sc-btn,
  .sc-btn-secondary, .sc-btn-ghost, .sc-btn-danger,
  .sc-btn:active,
  .welcome-btn,
  .foot-col a, .foot-bot .right a,
  nav.main .links a,
  .dash-nav-item,
  .doc-sidebar a, .doc-toc a,
  .region-card,
  .price-cta button {
    transition: none;
  }

  /* Body grid background — static is fine, no transform/animation needed */
}

/* ─── prefers-color-scheme ───────────────────────────────────────────────── */
/*
  This site ships a single dark theme. We do not auto-switch to light mode,
  because the design identity is intentionally dark-terminal. Browsers in light
  mode will still render the dark theme (opt-in via system preference is a UX
  future-roadmap item, not a WCAG 2.1 requirement — 1.4.3 requires contrast,
  not scheme switching).

  forced-colors (Windows High Contrast Mode): the browser replaces our palette
  with system colors. We don't override forced-colors; let the browser win.
*/
@media (forced-colors: active) {
  /* Restore meaningful borders that disappear under forced-colors */
  .pill, .btn-ghost, .sc-btn-ghost,
  .price-cta button,
  .terminal, .how-wrap, .price-wrap {
    border: 1px solid ButtonText;
  }
  /* Status dot: use system highlight so it stays visible */
  .status-dot, .status-dot.amber { background: Highlight; box-shadow: none; }
  /* Caret: use system text color */
  .caret { background: ButtonText; }
}
