/* operatorapps.dev
   Dark theme mirrors the apps (near-black, signal green). The light theme is not an inversion: the green is
   darkened to #007a45 so text and buttons keep >= 4.5:1 contrast on the off-white background. */

@font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---- Tokens -------------------------------------------------------------------------------- */

:root {
  --bg: #06070a;
  --bg-raised: #0b0d12;
  --surface: #0e1117;
  --surface-2: #141820;
  --border: #1c212b;
  --border-strong: #2b323e;
  --text: #e6e8ec;
  --text-muted: #9da4af;
  --text-faint: #7a828e;
  --accent: #00ff88;
  --accent-hover: #4dffab;
  --accent-text: #00ff88;
  --accent-ink: #03140b;
  --accent-soft: rgba(0, 255, 136, 0.07);
  --accent-line: rgba(0, 255, 136, 0.32);
  --warn: #ffb020;
  --warn-soft: rgba(255, 176, 32, 0.08);
  --danger: #ff5c6c;
  --grid-line: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(6, 7, 10, 0.82);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --tile: #06070a;

  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1140px;
  --gutter: 24px;
  --header-h: 64px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f5;
    --bg-raised: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef1ee;
    --border: #dde2de;
    --border-strong: #c3cbc5;
    --text: #0f1512;
    --text-muted: #46514b;
    --text-faint: #5c6862;
    --accent: #007a45;
    --accent-hover: #006239;
    --accent-text: #00703f;
    --accent-ink: #ffffff;
    --accent-soft: rgba(0, 122, 69, 0.07);
    --accent-line: rgba(0, 122, 69, 0.35);
    --warn: #8a5300;
    --warn-soft: rgba(176, 106, 0, 0.08);
    --danger: #b3202f;
    --grid-line: rgba(15, 21, 18, 0.05);
    --header-bg: rgba(246, 247, 245, 0.86);
    --shadow: 0 1px 2px rgba(15, 21, 18, 0.04);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f7f5;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1ee;
  --border: #dde2de;
  --border-strong: #c3cbc5;
  --text: #0f1512;
  --text-muted: #46514b;
  --text-faint: #5c6862;
  --accent: #007a45;
  --accent-hover: #006239;
  --accent-text: #00703f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 122, 69, 0.07);
  --accent-line: rgba(0, 122, 69, 0.35);
  --warn: #8a5300;
  --warn-soft: rgba(176, 106, 0, 0.08);
  --danger: #b3202f;
  --grid-line: rgba(15, 21, 18, 0.05);
  --header-bg: rgba(246, 247, 245, 0.86);
  --shadow: 0 1px 2px rgba(15, 21, 18, 0.04);
  color-scheme: light;
}

/* ---- Base ---------------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
code, kbd { font-family: var(--font-mono); font-size: 0.88em; }

a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--accent-line); }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow {
  font: 700 12px/1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.lede { font-size: 1.1875rem; line-height: 1.6; color: var(--text-muted); max-width: 62ch; }

/* ---- Header -------------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
}
.site-header-inner { display: flex; align-items: center; gap: 32px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark-tile { fill: var(--accent); }
.brand-mark-glyph { stroke: var(--accent-ink); }
.brand-name { font: 700 15px/1 var(--font-mono); letter-spacing: 0.06em; }
.brand-suffix { color: var(--text-faint); font-weight: 400; letter-spacing: 0.02em; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.9375rem; text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.header-actions { display: flex; gap: 6px; }
.icon-button {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.icon-button:hover { color: var(--text); border-color: var(--border-strong); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* The toggle shows the theme you would switch to. */
.icon-sun { display: none; }
:root:not([data-theme="light"]) .icon-sun { display: block; }
:root:not([data-theme="light"]) .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}

.nav-toggle { display: none; }

@media (max-width: 820px) {
  .site-header-inner { gap: 12px; }
  .nav-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    margin: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 1rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
}

/* ---- Buttons ------------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font: 600 0.9375rem/1 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--text-faint); background: var(--surface-2); }
.btn .icon { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Sections ------------------------------------------------------------------------------ */

.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.375rem); }
.section-head p { color: var(--text-muted); font-size: 1.0625rem; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
}

/* ---- Hero ---------------------------------------------------------------------------------- */

.hero { position: relative; padding: 112px 0 96px; border-bottom: 1px solid var(--border); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 30%, transparent 75%);
}
.hero-inner { display: grid; gap: 24px; }
.hero-inner > * { max-width: 820px; }
.hero h1 { font-size: clamp(2.375rem, 1.4rem + 3.4vw, 3.75rem); line-height: 1.08; letter-spacing: -0.03em; }
.hero h1 .accent { color: var(--accent-text); }
.hero .btn-row { margin-top: 12px; }

.hero-status {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content;
  padding: 6px 12px 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  font: 400 12px/1.4 var(--font-mono); color: var(--text-muted); background: var(--bg-raised);
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

@media (max-width: 640px) { .hero { padding: 72px 0 64px; } }

/* ---- App cards (home) ---------------------------------------------------------------------- */

.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; } }

.app-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.app-card:hover { border-color: var(--border-strong); }
.app-card-main { display: grid; gap: 18px; padding: 28px; flex: 1; }
.app-card-top { display: flex; align-items: center; gap: 16px; }
.app-card h3 { font-size: 1.375rem; }
.app-card h3 a { color: inherit; text-decoration: none; }
.app-card h3 a::after { content: ""; position: absolute; inset: 0; }
.app-card-title { position: relative; }
.app-card .category { font: 400 12px/1.4 var(--font-mono); color: var(--text-faint); letter-spacing: 0.04em; margin-top: 4px; }
.app-card p { color: var(--text-muted); }
.app-card-links {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  padding: 16px 28px; border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.app-card-links a { color: var(--text-muted); text-decoration: none; }
.app-card-links a:hover { color: var(--accent-text); }

.check-list { display: grid; gap: 8px; list-style: none; }
.check-list li { position: relative; padding-left: 26px; color: var(--text-muted); font-size: 0.9375rem; }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 10px; height: 6px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}

.app-icon { width: 56px; height: 56px; flex: none; border-radius: 14px; }
.app-icon-lg { width: 88px; height: 88px; border-radius: 22px; }

/* ---- Badges -------------------------------------------------------------------------------- */

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px;
  font: 400 12px/1 var(--font-mono); color: var(--text-muted); white-space: nowrap;
}
.badge-accent { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---- Principles ---------------------------------------------------------------------------- */

.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.principle { padding: 28px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--border); }
.principle .num { font: 700 12px/1 var(--font-mono); color: var(--accent-text); letter-spacing: 0.1em; }
.principle h3 { font-size: 1.0625rem; }
.principle p { color: var(--text-muted); font-size: 0.9375rem; }
@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr 1fr; }
  .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .principle:nth-child(n + 3) { border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 24px 0 8px; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--border); }
}

/* ---- Product page -------------------------------------------------------------------------- */

.product-hero { padding: 88px 0 72px; }
.product-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.product-hero-copy { display: grid; gap: 22px; }
.product-hero-copy h1 { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.25rem); letter-spacing: -0.03em; line-height: 1.08; }
.product-id { display: flex; align-items: center; gap: 18px; }
.product-id .eyebrow { margin-bottom: 4px; }
.product-id .meta { font: 400 13px/1.5 var(--font-mono); color: var(--text-faint); }
@media (max-width: 900px) { .product-hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.store-links { display: flex; flex-wrap: wrap; gap: 12px; }
.store-link {
  display: inline-grid; gap: 2px; min-width: 156px; padding: 9px 16px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-decoration: none;
}
a.store-link:hover { border-color: var(--accent); }
.store-link-sub { font: 400 11px/1.2 var(--font-mono); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.store-link-name { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.store-link.is-pending { border-style: dashed; color: var(--text-muted); }

/* Spec panel next to the product hero: reads like a terminal readout, not decoration. */
.spec-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.spec-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  font: 400 12px/1 var(--font-mono); color: var(--text-faint); letter-spacing: 0.06em;
}
.spec-panel dl { margin: 0; display: grid; }
.spec-panel dl > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }
.spec-panel dl > div:first-child { border-top: 0; }
.spec-panel dt { font: 400 12px/1.6 var(--font-mono); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.spec-panel dd { margin: 0; font: 400 13.5px/1.6 var(--font-mono); color: var(--text); }
.spec-panel dd .ok { color: var(--accent-text); }
@media (max-width: 480px) { .spec-panel dl > div { grid-template-columns: 1fr; gap: 2px; } }

.fact-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fact { padding: 28px 24px; display: grid; gap: 6px; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact-value { font: 700 1.375rem/1.2 var(--font-mono); color: var(--text); letter-spacing: -0.01em; }
.fact-label { font-size: 0.875rem; color: var(--text-muted); }
@media (max-width: 900px) {
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--surface); padding: 28px; display: grid; gap: 10px; align-content: start; }
.feature .tag { font: 700 11px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--accent-text); text-transform: uppercase; }
.feature h3 { font-size: 1.0625rem; }
.feature p { color: var(--text-muted); font-size: 0.9375rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 64px; align-items: start; }
.split .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .split .section-head { position: static; } }

.doc-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.doc-list a {
  display: grid; gap: 8px; height: 100%; padding: 22px 22px 20px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--text); text-decoration: none; transition: border-color 0.15s;
}
.doc-list a:hover { border-color: var(--accent-line); }
.doc-list .doc-kind { font: 400 11px/1 var(--font-mono); color: var(--text-faint); letter-spacing: 0.1em; text-transform: uppercase; }
.doc-list .doc-title { font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.doc-list .doc-title::after { content: "\2192"; color: var(--text-faint); transition: transform 0.15s, color 0.15s; }
.doc-list a:hover .doc-title::after { transform: translateX(3px); color: var(--accent-text); }
.doc-list .doc-desc { font-size: 0.875rem; color: var(--text-muted); }
@media (max-width: 900px) { .doc-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .doc-list { grid-template-columns: 1fr; } }

/* ---- Tables, callouts ---------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
thead th { border-top: 0; background: var(--surface-2); font: 700 11.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
td:first-child { color: var(--text); }
td { color: var(--text-muted); }
td code { color: var(--text); }

.callout {
  padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--accent-soft);
}
.callout-title { font: 700 12px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.callout-warn { border-left-color: var(--warn); background: var(--warn-soft); }
.callout-warn .callout-title { color: var(--warn); }
.callout p + p { margin-top: 8px; }

/* ---- Document pages ------------------------------------------------------------------------ */

.doc { padding-top: 48px; padding-bottom: 96px; }
.doc-header { display: grid; gap: 16px; padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--border); max-width: 860px; }
.doc-header h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); letter-spacing: -0.025em; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font: 400 12.5px/1.5 var(--font-mono); color: var(--text-faint); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-text); }

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 4px 0 0; }
.doc-meta div { display: grid; gap: 2px; }
.doc-meta dt { font: 400 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.doc-meta dd { margin: 0; font-size: 0.9375rem; }

.doc-body { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 64px; align-items: start; }
.doc-body > .prose:only-child { grid-column: 1 / -1; }

.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.doc-toc summary { font: 700 11.5px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 12px; list-style: none; cursor: default; }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--border); }
.doc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-muted); font-size: 0.875rem; line-height: 1.45; text-decoration: none; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.is-active { color: var(--accent-text); border-left-color: var(--accent); }

@media (max-width: 960px) {
  .doc-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .doc-toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; }
  .doc-toc summary { margin: 0; cursor: pointer; display: flex; justify-content: space-between; }
  .doc-toc summary::after { content: "+"; font-size: 14px; }
  .doc-toc details[open] summary { margin-bottom: 12px; }
  .doc-toc details[open] summary::after { content: "\2212"; }
}

/* Long-form text: legal documents, support articles. */
.prose { max-width: 760px; font-size: 1rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.6em; padding-top: 1.6em; border-top: 1px solid var(--border);
  font-size: 1.375rem; letter-spacing: -0.01em;
}
.prose > h2:first-child, .prose > .callout:first-child + h2 { margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }
.prose > :first-child + h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.8em; font-size: 1.0625rem; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.45em; }
.prose li::marker { color: var(--text-faint); }
.prose .table-wrap { margin-top: 1.4em; margin-bottom: 0.4em; }
.prose table { font-size: 0.9rem; line-height: 1.6; }
.prose .callout p { color: var(--text); }
.prose .summary-box { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose .summary-box h2 { margin: 0 0 10px; padding: 0; border: 0; font: 700 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-text); }
.prose .summary-box ul { margin-top: 0; }
.prose .summary-box li { color: var(--text); }
.prose address { font-style: normal; color: var(--text); }
.prose .path { font-family: var(--font-mono); font-size: 0.88em; color: var(--text); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }

.prose details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.prose details + details { margin-top: 10px; }
.prose summary { padding: 14px 18px; cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; font-family: var(--font-mono); color: var(--text-faint); }
.prose details[open] summary::after { content: "\2212"; }
.prose details > :not(summary) { padding: 0 18px; }
.prose details > :last-child { padding-bottom: 16px; }
.prose details > * + * { margin-top: 0.7em; }

/* ---- Contact / info cards ------------------------------------------------------------------ */

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.info-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.info-card h2, .info-card h3 { font-size: 1.0625rem; }
.info-card p { color: var(--text-muted); font-size: 0.9375rem; }
.info-card .mono { font: 400 14px/1.5 var(--font-mono); }
@media (max-width: 900px) { .card-grid, .card-grid-2 { grid-template-columns: 1fr; } }

/* ---- Footer -------------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-raised); padding: 64px 0 32px; font-size: 0.875rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-brand { display: grid; gap: 16px; align-content: start; }
.footer-brand p { color: var(--text-muted); max-width: 34ch; }
.social-links { display: flex; gap: 10px; list-style: none; margin-top: 4px; }
.social-link {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.social-link:hover { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }
.footer-heading { font: 700 11.5px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--text-muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 0.8125rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

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

.not-found { padding: 128px 0; display: grid; gap: 20px; max-width: 640px; }
.not-found h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); }
.not-found .code { font: 700 13px/1 var(--font-mono); color: var(--accent-text); letter-spacing: 0.12em; }

/* ---- Small screens, motion, print ---------------------------------------------------------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .lede { font-size: 1.0625rem; }
  .fact { padding: 20px 16px; }
  .app-card-main { padding: 22px; }
  .app-card-links { padding: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --text: #000; --text-muted: #222; --text-faint: #555; --border: #ccc; --accent-text: #000; }
  .site-header, .site-footer, .doc-toc, .skip-link { display: none !important; }
  .doc { padding: 0; }
  .doc-body { display: block; }
  .prose { max-width: none; font-size: 11pt; }
  .prose a { color: #000; }
  .prose h2 { break-after: avoid; }
}

/* ---- Utilities ----------------------------------------------------------------------------- */

.mt-20 { margin-top: 20px; }
.doc-body > * { min-width: 0; }
.prose td .path { white-space: normal; }

/* ---- Phone mockups ------------------------------------------------------------------------ */

/* A phone drawn in CSS around a real capture: titanium-style frame, glass edge, dynamic island, status bar and home
   indicator. The screenshot keeps its own pixels; only the frame scales. */
.phone {
  --w: 260px;
  position: relative; width: var(--w); flex: none;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.17);
  background: linear-gradient(150deg, #3a414b 0%, #15181d 22%, #0b0d10 55%, #23272e 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 0 0 3px #07080a,
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 30px 60px -18px rgba(0, 0, 0, 0.55),
    0 60px 120px -40px rgba(0, 0, 0, 0.5);
}
/* Side buttons. */
.phone::before, .phone::after {
  content: ""; position: absolute; width: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #2c3139, #11141a);
}
.phone::before { left: -3px; top: 20%; height: 9%; box-shadow: 0 calc(var(--w) * 0.2) 0 #1b1f25; }
.phone::after { right: -3px; top: 26%; height: 14%; }
.phone-lg { --w: 300px; }
.phone-sm { --w: 210px; }

.phone-screen {
  position: relative; overflow: hidden;
  border-radius: calc(var(--w) * 0.135);
  background: #06070a;
}
.phone-screen img { display: block; width: 100%; height: auto; }
/* Reflection across the glass. */
.phone-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 32%);
}
/* Home indicator. */
.phone-screen::before {
  content: ""; position: absolute; z-index: 2; left: 50%; bottom: calc(var(--w) * 0.018);
  width: 34%; height: 4px; transform: translateX(-50%);
  border-radius: 4px; background: rgba(255, 255, 255, 0.55);
}

.phone-status {
  position: relative; height: calc(var(--w) * 0.12);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(var(--w) * 0.09) 0 calc(var(--w) * 0.1);
  font: 600 calc(var(--w) * 0.045)/1 var(--font-sans); color: #e6e8ec;
}
.phone-island {
  position: absolute; left: 50%; top: calc(var(--w) * 0.03); transform: translateX(-50%);
  width: 31%; height: calc(var(--w) * 0.075); border-radius: 999px; background: #000;
}
.phone-icons { display: flex; align-items: flex-end; gap: calc(var(--w) * 0.012); }
.phone-icons i { display: block; width: calc(var(--w) * 0.011); background: #e6e8ec; border-radius: 1px; }
.phone-icons i:nth-child(1) { height: calc(var(--w) * 0.018); }
.phone-icons i:nth-child(2) { height: calc(var(--w) * 0.026); }
.phone-icons i:nth-child(3) { width: calc(var(--w) * 0.07); height: calc(var(--w) * 0.032); border-radius: 3px; margin-left: calc(var(--w) * 0.012); }

/* ---- Home hero with two phones ------------------------------------------------------------- */

.hero-showcase { padding: 72px 0 88px; }
.hero-showcase::after {
  content: ""; position: absolute; z-index: -1; right: -10%; top: 4%; width: 60%; height: 90%;
  background: radial-gradient(closest-side, rgba(0, 255, 136, 0.16), transparent 70%);
  filter: blur(8px);
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .hero-showcase::after { background: radial-gradient(closest-side, rgba(0, 122, 69, 0.14), transparent 70%); } }
:root[data-theme="light"] .hero-showcase::after { background: radial-gradient(closest-side, rgba(0, 122, 69, 0.14), transparent 70%); }

.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero-split .hero-inner > * { max-width: 600px; }

.hero-phones { position: relative; display: flex; justify-content: center; align-items: flex-start; padding: 8px 0 32px; }
.hero-phone { position: relative; display: block; color: inherit; text-decoration: none; transition: transform 0.35s ease; }
.hero-phones-2 .hero-phone-1 { z-index: 2; transform: rotate(-4deg) translateY(28px); margin-right: -32px; }
.hero-phones-2 .hero-phone-2 { z-index: 1; transform: rotate(5deg) translateY(-12px); }
.hero-phones-2 .hero-phone-1:hover { transform: rotate(-3deg) translateY(18px); }
.hero-phones-2 .hero-phone-2:hover { transform: rotate(4deg) translateY(-22px); }
.hero-phone .phone { box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 0 0 3px #07080a, 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 80px -24px rgba(0, 0, 0, 0.6), 0 0 90px -20px rgba(0, 255, 136, 0.35); }
.hero-phone-label {
  position: absolute; left: 50%; bottom: -34px; transform: translateX(-50%);
  font: 700 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
  white-space: nowrap;
}
.hero-phone:hover .hero-phone-label, .hero-phone:focus-visible .hero-phone-label { color: var(--accent-text); }

@media (max-width: 1100px) {
  .hero-phones .phone-lg { --w: 250px; }
}
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 24px; }
  .hero-phones { padding-top: 24px; }
}
@media (max-width: 560px) {
  .hero-phones .phone-lg { --w: 172px; }
  .hero-phones-2 .hero-phone-1 { margin-right: -28px; transform: rotate(-4deg) translateY(18px); }
}

/* ---- App pages ----------------------------------------------------------------------------- */

.product-hero-phone { display: flex; justify-content: center; position: relative; }
.product-hero-phone::before {
  content: ""; position: absolute; z-index: -1; inset: 6% 0;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 75%);
  transform: scale(1.4);
}
.product-hero-phone .phone { box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 0 0 3px #07080a, 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 80px -24px rgba(0, 0, 0, 0.6), 0 0 90px -20px rgba(0, 255, 136, 0.3); }
@media (max-width: 560px) { .product-hero-phone .phone-lg { --w: 240px; } }

.highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; justify-items: center; }
.highlight { margin: 0; display: grid; gap: 16px; justify-items: center; }
.highlight figcaption { font-size: 0.875rem; color: var(--text-muted); text-align: center; }
@media (max-width: 1100px) { .highlights .phone-sm { --w: 190px; } }
@media (max-width: 900px) { .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 480px) { .highlights .phone-sm { --w: 150px; } .highlights { gap: 16px; row-gap: 32px; } }

.stack { display: grid; gap: 20px; }
.hero-split h1 { font-size: clamp(2.25rem, 1.2rem + 2.5vw, 3.25rem); }

/* ---- Enlarged screenshot ------------------------------------------------------------------- */

.phone-zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 0;
}
.phone-zoom img { transition: transform 0.25s ease, filter 0.25s ease; }
.phone-zoom:hover img { filter: brightness(1.08); }
.phone-zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: #e6e8ec; overflow: hidden;
}
.lightbox::backdrop { background: rgba(3, 4, 6, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-in 0.22s ease; }
.lightbox-figure { margin: 0; display: grid; gap: 14px; justify-items: center; cursor: zoom-out; }
.lightbox-figure img {
  display: block; width: auto; height: auto;
  max-height: calc(100vh - 110px); max-width: calc(100vw - 32px);
  border-radius: 22px; border: 1px solid #2b323e; background: #06070a;
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8), 0 0 120px -30px rgba(0, 255, 136, 0.35);
  animation: lightbox-zoom 0.25s ease;
}
.lightbox-caption { font: 400 13px/1.4 var(--font-mono); letter-spacing: 0.06em; color: #9da4af; text-align: center; }
.lightbox-button {
  position: fixed; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid #2b323e; border-radius: 50%; background: rgba(14, 17, 23, 0.9); color: #e6e8ec; cursor: pointer;
}
.lightbox-button:hover { border-color: #00ff88; color: #00ff88; }
.lightbox-button .icon { width: 20px; height: 20px; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-button[hidden] { display: none; }
@media (max-width: 640px) { .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; } }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lightbox-zoom { from { transform: scale(0.9); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
