/* =========================================================
   Streamer — streamer.keyubu.link · single stylesheet
   ========================================================= */

:root {
  --bg: #080b12; --bg-soft: #0b101b; --surface: #101725;
  --line: #1e293b; --line-soft: #18222f;
  --text: #e9eef8; --text-dim: #9aa8bf; --text-faint: #6d7c93;
  --brand: #7c5cff; --brand-strong: #6947f6; --brand-tint: rgba(124, 92, 255, 0.14);
  --mint: #2ee6a8; --mint-tint: rgba(46, 230, 168, 0.12);
  --amber: #f5b544; --red: #ff5f74;
  --radius: 16px; --radius-lg: 24px;
  --wrap: 1140px; --gutter: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(124, 92, 255, 0.18), transparent 70%),
    radial-gradient(760px 420px at 88% 4%, rgba(46, 230, 168, 0.08), transparent 72%);
}

img, svg { max-width: 100%; }
svg { display: block; }
h1, h2, h3, h4 { margin: 0 0 0.55em; line-height: 1.18; letter-spacing: -0.022em; font-weight: 650; }
h1 { font-size: clamp(2.15rem, 4.7vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: #b9a8ff; text-decoration: none; }
a:hover { color: #d3c8ff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.875em; }

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

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--brand); color: #fff;
}
.skip:focus { left: 16px; color: #fff; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 11, 18, 0.78);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 680; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 30px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--text-dim); font-size: 0.92rem; font-weight: 520;
  padding: 8px 12px; border-radius: 8px;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-actions .link-quiet { font-size: 0.92rem; color: var(--text-dim); }
.header-actions .link-quiet:hover { color: var(--text); }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); cursor: pointer;
}
.nav-toggle:hover { border-color: #33415c; }
.nav-toggle .bars { position: relative; width: 18px; height: 12px; }
.nav-toggle .bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), top 0.2s var(--ease);
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 5px; }
.nav-toggle .bars span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.mobile-panel { display: none; padding: 14px var(--gutter) 22px; border-top: 1px solid var(--line-soft); background: rgba(10, 14, 22, 0.98); }
.mobile-panel.is-open { display: block; }
.mobile-panel a { display: block; padding: 12px 4px; color: var(--text-dim); font-size: 1rem; border-bottom: 1px solid var(--line-soft); }
.mobile-panel a:hover { color: var(--text); }
.mobile-panel .btn { width: 100%; margin-top: 16px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-size: 0.93rem; font-weight: 600; line-height: 1.2;
  letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #8b6dff, var(--brand-strong)); color: #fff;
  box-shadow: 0 10px 26px -14px rgba(124, 92, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { color: #fff; background: linear-gradient(180deg, #9a80ff, #7354f8); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: #33415c; color: var(--text); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

/* ---------- hero ---------- */

.hero { padding: 74px 0 20px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 54px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px;
  padding: 6px 13px 6px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.025); color: var(--text-dim);
  font-size: 0.79rem; font-weight: 560;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 230, 168, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(46, 230, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 168, 0); }
}

.hero h1 { margin-bottom: 20px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(92deg, #a58dff 8%, #6ff0c4 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 33em; margin-bottom: 30px; font-size: 1.09rem; color: var(--text-dim); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.hero-note { font-size: 0.83rem; color: var(--text-faint); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.hero-stats div { min-width: 110px; }
.hero-stats strong { display: block; font-size: 1.32rem; font-weight: 660; letter-spacing: -0.03em; }
.hero-stats span { font-size: 0.8rem; color: var(--text-faint); }

/* ---------- console mock ---------- */

.console {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #121a29, #0c1220); box-shadow: var(--shadow);
}
.console::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), transparent 38%);
}
.console-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.02); }
.console-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2b3a52; }
.console-bar i:nth-child(1) { background: #ff5f74; }
.console-bar i:nth-child(2) { background: var(--amber); }
.console-bar i:nth-child(3) { background: var(--mint); }
.console-url { margin-left: 10px; font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); }
.console-body { padding: 18px 18px 14px; }

.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255, 255, 255, 0.022); }
.kpi small { display: block; margin-bottom: 3px; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.kpi b { font-size: 1.02rem; font-weight: 640; letter-spacing: -0.02em; }
.kpi .up { margin-left: 2px; font-size: 0.68rem; font-weight: 600; color: var(--mint); }

.chart { width: 100%; height: auto; }
.chart-label { font-family: var(--font); font-size: 6.6px; fill: var(--text-faint); }
.chart-grid { stroke: #1b2537; stroke-width: 0.5; }
.chart-line { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke: url(#lineGrad); }
.chart-area { fill: url(#areaFill); }

.console-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px 2px; font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); }
.console-foot .live { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); }
.console-foot .live .pulse-dot { width: 6px; height: 6px; }

/* ---------- sections ---------- */

.section { padding: 86px 0; }
.section-tight { padding: 54px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-bottom: 0; font-size: 1.02rem; color: var(--text-dim); }

.kicker { display: block; margin-bottom: 12px; font-size: 0.76rem; font-weight: 640; letter-spacing: 0.14em; text-transform: uppercase; color: #9d8bff; }
.divider { height: 1px; margin: 0; border: 0; background: var(--line-soft); }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step {
  position: relative; padding: 26px 22px 24px; border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.008));
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; margin-bottom: 16px; font-family: var(--mono); font-size: 0.78rem;
  font-weight: 600; letter-spacing: 0.08em; color: var(--brand);
}
.step h3 { margin-bottom: 8px; font-size: 1.04rem; }
.step p { margin: 0; font-size: 0.92rem; color: var(--text-dim); }
.step code {
  display: block; margin-top: 14px; padding: 9px 11px;
  border: 1px solid var(--line-soft); border-radius: 8px; background: #070b12;
  color: #a7f3d0; font-size: 0.7rem; line-height: 1.6; overflow-wrap: anywhere;
}

/* ---------- features ---------- */

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature {
  padding: 24px 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface);
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.feature:hover { border-color: #2c3a55; transform: translateY(-2px); }
.feature .icon {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px;
  border: 1px solid rgba(124, 92, 255, 0.24); border-radius: 11px; background: var(--brand-tint); color: #b3a1ff;
}
.feature .icon svg { width: 19px; height: 19px; }
.feature h3 { margin-bottom: 7px; font-size: 1rem; }
.feature p { margin: 0; font-size: 0.9rem; color: var(--text-dim); }

/* ---------- panel / health ---------- */

.panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: center;
  padding: 40px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: radial-gradient(700px 300px at 100% 0%, rgba(124, 92, 255, 0.12), transparent 70%), var(--bg-soft);
}
.panel h2 { margin-bottom: 14px; }
.panel p { color: var(--text-dim); }

.checklist { list-style: none; margin: 0 0 8px; padding: 0; }
.checklist li { position: relative; margin-bottom: 11px; padding-left: 28px; font-size: 0.93rem; color: var(--text-dim); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(46, 230, 168, 0.4); background: var(--mint-tint);
}
.checklist li::after {
  content: ""; position: absolute; left: 5px; top: 11px; width: 6px; height: 3px;
  border-left: 1.5px solid var(--mint); border-bottom: 1.5px solid var(--mint); transform: rotate(-45deg);
}

.health-list { display: grid; gap: 10px; }
.health-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 12px 15px; border: 1px solid var(--line-soft); border-radius: 11px;
  background: rgba(255, 255, 255, 0.022); font-size: 0.86rem;
}
.health-row .name { color: var(--text); font-weight: 540; }
.health-row .region { font-size: 0.75rem; color: var(--text-faint); }
.health-row .val { font-family: var(--mono); font-size: 0.76rem; color: var(--text-dim); }

/* ---------- pricing ---------- */

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.tier {
  position: relative; display: flex; flex-direction: column; padding: 28px 24px;
  border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface);
}
.tier.featured {
  border-color: rgba(124, 92, 255, 0.5);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.1), rgba(124, 92, 255, 0.02) 42%), var(--surface);
  box-shadow: 0 24px 60px -44px rgba(124, 92, 255, 0.9);
}
.tier .tag {
  position: absolute; top: -11px; right: 20px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 0.68rem; font-weight: 640; letter-spacing: 0.03em;
}
.tier h3 { margin-bottom: 4px; font-size: 1rem; }
.tier .blurb { min-height: 2.6em; margin-bottom: 18px; font-size: 0.84rem; color: var(--text-faint); }
.price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.price strong { font-size: 2.15rem; font-weight: 660; letter-spacing: -0.04em; }
.price span { font-size: 0.84rem; color: var(--text-faint); }
.tier .meta { margin-bottom: 20px; font-size: 0.78rem; color: var(--text-faint); }
.tier ul {
  flex: 1; list-style: none; margin: 0 0 24px; padding: 18px 0 0;
  border-top: 1px solid var(--line-soft);
}
.tier li { position: relative; margin-bottom: 9px; padding-left: 22px; font-size: 0.86rem; color: var(--text-dim); }
.tier li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; border-radius: 2px; background: rgba(124, 92, 255, 0.55); }
.tier.featured li::before { background: var(--mint); }
.pricing-note { margin-top: 22px; text-align: center; font-size: 0.82rem; color: var(--text-faint); }

/* ---------- faq ---------- */

.faq { max-width: 780px; margin: 0 auto; }
.faq details { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.faq summary {
  position: relative; padding: 16px 30px 16px 0; list-style: none;
  font-size: 0.98rem; font-weight: 560; color: var(--text); cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.15rem; color: var(--text-faint); transition: color 0.2s var(--ease);
}
.faq details[open] summary::after { content: "–"; color: var(--brand); }
.faq details p { max-width: 62ch; margin: 0 0 18px; font-size: 0.92rem; color: var(--text-dim); }

/* ---------- cta band ---------- */

.cta-band {
  padding: 52px 40px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-align: center;
  background:
    radial-gradient(600px 240px at 20% 0%, rgba(124, 92, 255, 0.22), transparent 70%),
    radial-gradient(520px 240px at 84% 100%, rgba(46, 230, 168, 0.1), transparent 70%),
    var(--bg-soft);
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 52ch; margin: 0 auto 26px; color: var(--text-dim); }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; }

/* ---------- footer ---------- */

.site-footer { margin-top: 40px; padding: 54px 0 30px; border-top: 1px solid var(--line-soft); background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-brand p { max-width: 26ch; margin-top: 12px; font-size: 0.85rem; color: var(--text-faint); }
.footer-col h4 { margin-bottom: 14px; font-size: 0.74rem; font-weight: 640; letter-spacing: 0.11em; text-transform: uppercase; color: var(--text-faint); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: 0.86rem; color: var(--text-dim); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line-soft);
  font-size: 0.79rem; color: var(--text-faint);
}
.footer-bottom .links { display: flex; gap: 20px; }
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--text-dim); }

/* ---------- auth ---------- */

.auth-main { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 56px 20px 72px; }
.auth-card {
  width: 100%; max-width: 424px; padding: 34px 32px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)), var(--bg-soft);
  box-shadow: var(--shadow);
}
.auth-card h1 { margin-bottom: 6px; font-size: 1.5rem; }
.auth-card .sub { margin-bottom: 26px; font-size: 0.9rem; color: var(--text-dim); }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 0.83rem; font-weight: 560; color: var(--text-dim); }
.input-wrap { position: relative; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 11px 13px; background: #070b12; border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font: inherit; font-size: 0.94rem;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
input[type="email"]:focus, input[type="password"]:focus, input[type="text"]:focus {
  outline: none; border-color: rgba(124, 92, 255, 0.75); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}
input.has-action { padding-right: 74px; }
.reveal {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  padding: 5px 9px; background: transparent; border: 0; border-radius: 6px;
  color: var(--text-faint); font: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer;
}
.reveal:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); }

.field-error { display: none; margin-top: 6px; font-size: 0.78rem; color: var(--red); }
.field.invalid input { border-color: rgba(255, 95, 116, 0.7); }
.field.invalid .field-error { display: block; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; font-size: 0.84rem; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); cursor: pointer; }
.check input {
  appearance: none; position: relative; width: 15px; height: 15px; margin: 0;
  border: 1px solid #33415c; border-radius: 4px; background: #070b12; cursor: pointer;
}
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(42deg);
}

.auth-note {
  display: flex; gap: 10px; margin-top: 22px; padding: 13px 14px;
  border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255, 255, 255, 0.022);
  font-size: 0.8rem; line-height: 1.55; color: var(--text-faint);
}
.auth-note svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; color: #8f7dff; }
.auth-alt { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 0.85rem; color: var(--text-faint); }
.auth-foot { margin-top: 26px; text-align: center; font-size: 0.79rem; color: var(--text-faint); }
.auth-foot a { color: var(--text-faint); text-decoration: underline; text-decoration-color: #2b3a52; }
.auth-foot a:hover { color: var(--text-dim); }
.form-status {
  display: none; margin-top: 14px; padding: 10px 13px; border-radius: 9px;
  border: 1px solid rgba(46, 230, 168, 0.35); background: var(--mint-tint); color: #9ef2d0; font-size: 0.82rem;
}
.form-status.show { display: block; }

/* ---------- docs ---------- */

.docs-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 56px; padding: 46px var(--gutter) 80px; align-items: start; }
.docs-side { position: sticky; top: 92px; font-size: 0.88rem; }
.docs-side .group { margin-bottom: 26px; }
.docs-side h4 { margin: 0 0 10px; font-size: 0.72rem; font-weight: 640; letter-spacing: 0.11em; text-transform: uppercase; color: var(--text-faint); }
.docs-side ul { list-style: none; margin: 0; padding: 0; }
.docs-side li { margin-bottom: 2px; }
.docs-side a { display: block; padding: 6px 10px; border-left: 2px solid transparent; border-radius: 7px; color: var(--text-dim); }
.docs-side a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.docs-side a.active { border-left-color: var(--brand); background: var(--brand-tint); color: #c0b1ff; font-weight: 560; }
.docs-side .ext { padding-left: 10px; font-size: 0.8rem; color: var(--text-faint); }

.docs-body { min-width: 0; }
.docs-body h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 3.4vw, 2.35rem); }
.docs-lede { max-width: 62ch; margin-bottom: 30px; font-size: 1rem; color: var(--text-dim); }
.doc-section { padding: 30px 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 96px; }
.doc-section:first-of-type { padding-top: 0; border-top: 0; }
.doc-section h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.42rem; }
.doc-section h3 { margin: 24px 0 8px; font-size: 1rem; }
.doc-section p, .doc-section li { font-size: 0.92rem; color: var(--text-dim); }
.doc-section ul, .doc-section ol { margin: 0 0 16px; padding-left: 20px; }
.doc-section li { margin-bottom: 7px; }
.doc-section p code, .doc-section li code { padding: 1px 5px; border: 1px solid var(--line-soft); border-radius: 5px; background: #070b12; color: #c4b5fd; font-size: 0.82em; }
.doc-section a { text-decoration: underline; text-decoration-color: #3b2f6b; text-underline-offset: 2px; }

pre {
  position: relative; margin: 0 0 18px; padding: 16px 18px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 11px; background: #070b12;
  color: #cfd9ea; font-size: 0.8rem; line-height: 1.7; tab-size: 2;
}
pre .cmt { color: #64748b; }
pre .str { color: #7dd3a8; }
pre .flag { color: #c4b5fd; }
pre .cmd { color: #93c5fd; }
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 11px 11px 0 0;
  background: #0b1220; font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint);
}
.code-head + pre { margin-bottom: 18px; border-radius: 0 0 11px 11px; }
.copy-btn {
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: transparent; color: var(--text-faint); font: inherit; font-size: 0.68rem; cursor: pointer;
}
.copy-btn:hover { border-color: #33415c; color: var(--text-dim); }

.callout {
  display: flex; gap: 12px; margin: 0 0 20px; padding: 14px 16px;
  border: 1px solid rgba(124, 92, 255, 0.3); border-left-width: 3px; border-radius: 9px;
  background: rgba(124, 92, 255, 0.07); font-size: 0.88rem; color: var(--text-dim);
}
.callout strong { color: var(--text); }
.callout.warn { border-color: rgba(245, 181, 68, 0.34); background: rgba(245, 181, 68, 0.07); }

.table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 0.86rem; }
.table th, .table td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); color: var(--text-dim); }
.table th { font-size: 0.72rem; font-weight: 620; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint); }
.table td code { color: #c4b5fd; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 0.86rem; }
.pager span { display: block; font-size: 0.78rem; color: var(--text-faint); }
.pager a { font-weight: 560; color: #b9a8ff; }

/* ---------- status ---------- */

.status-hero { padding: 48px 0 10px; }
.status-hero h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 3.4vw, 2.3rem); }
.status-hero p { font-size: 0.92rem; color: var(--text-dim); }

.status-banner {
  display: flex; align-items: center; gap: 16px; margin: 26px 0 40px; padding: 20px 24px;
  border: 1px solid rgba(46, 230, 168, 0.32); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(46, 230, 168, 0.13), rgba(46, 230, 168, 0.04));
}
.status-banner .ind {
  display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(46, 230, 168, 0.16); color: var(--mint);
}
.status-banner .ind svg { width: 20px; height: 20px; }
.status-banner .status-copy { flex: 1 1 220px; min-width: 0; }
.status-banner h2 { margin: 0 0 2px; font-size: 1.07rem; font-weight: 620; color: #a8f6d8; }
.status-banner p { margin: 0; font-family: var(--mono); font-size: 0.83rem; color: #7fb9a5; }
.status-banner .stamp { margin-left: auto; font-size: 0.76rem; white-space: nowrap; color: #7fb9a5; }

.status-block { margin-bottom: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.status-block > header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.022);
}
.status-block h2 { margin: 0; font-size: 0.95rem; letter-spacing: 0; }
.status-block > header span { font-family: var(--mono); font-size: 0.74rem; color: var(--text-faint); }

.comp {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px 92px; gap: 18px; align-items: center;
  padding: 15px 22px; border-bottom: 1px solid var(--line-soft); font-size: 0.9rem;
}
.comp:last-child { border-bottom: 0; }
.comp .c-name { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 520; }
.comp .c-name .pulse-dot { background: var(--mint); }
.comp .c-sub { font-size: 0.75rem; font-weight: 400; color: var(--text-faint); }
.comp .bars { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.comp .bars i { flex: 1; height: 70%; border-radius: 1px; background: rgba(46, 230, 168, 0.42); }
.comp .bars i.deg { height: 45%; background: rgba(245, 181, 68, 0.6); }
.comp .pct { text-align: right; font-family: var(--mono); font-size: 0.8rem; color: var(--text-dim); }

.incident {
  display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 18px;
  padding: 16px 22px; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem;
}
.incident:last-child { border-bottom: 0; }
.incident .date { padding-top: 3px; font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); }
.incident .what { margin-bottom: 3px; color: var(--text); font-weight: 520; }
.incident p { margin: 0 0 8px; font-size: 0.84rem; color: var(--text-dim); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.68rem; font-weight: 620; white-space: nowrap; }
.badge.resolved { border: 1px solid rgba(46, 230, 168, 0.3); background: var(--mint-tint); color: #74e7bd; }
.badge.degraded { border: 1px solid rgba(245, 181, 68, 0.3); background: rgba(245, 181, 68, 0.12); color: #f2c274; }
.badge.maintenance { border: 1px solid rgba(124, 92, 255, 0.32); background: rgba(124, 92, 255, 0.14); color: #b7a6ff; }
.incident .dur { font-size: 0.74rem; color: var(--text-faint); }

.status-footnote {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin: 30px 0 70px; padding: 18px 22px; border: 1px solid var(--line-soft);
  border-radius: var(--radius); font-size: 0.84rem; color: var(--text-faint);
}
.status-footnote a { color: #b9a8ff; }

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

.err-main { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 70px 20px; text-align: center; }
.err-main .err-code {
  margin-bottom: 8px; font-size: clamp(4.5rem, 15vw, 8rem); font-weight: 680; line-height: 1; letter-spacing: -0.06em;
  background: linear-gradient(160deg, #b9a8ff 10%, #7c5cff 48%, rgba(46, 230, 168, 0.75) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.err-main h1 { margin-bottom: 10px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.err-main p { max-width: 44ch; margin: 0 auto 28px; font-size: 0.95rem; color: var(--text-dim); }
.err-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.err-links { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin-top: 40px; font-size: 0.84rem; }
.err-links a { color: var(--text-faint); }
.err-links a:hover { color: var(--text-dim); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .console { max-width: 560px; }
  .docs-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .panel { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 32px 26px; }
}

@media (max-width: 860px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .pricing { grid-template-columns: minmax(0, 1fr); }
  .tier.featured { order: -1; }
  .docs-shell { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-top: 26px; }
  .docs-side {
    position: static; display: block; margin-bottom: 10px;
    padding: 10px 0 16px; border-bottom: 1px solid var(--line-soft);
  }
  .docs-side .group { margin-bottom: 12px; }
  .docs-side h4 { margin-bottom: 7px; }
  .docs-side ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-side li { margin: 0; }
  .docs-side a {
    display: inline-block; padding: 4px 11px; border: 1px solid var(--line-soft);
    border-radius: 999px; font-size: 0.82rem;
  }
  .docs-side a.active { border-color: rgba(124, 92, 255, 0.45); }
  .docs-side .ext { padding: 4px 11px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .hero { padding-top: 46px; }
  .section { padding: 62px 0; }
  .hero-stats { gap: 20px 26px; }
  .hero-stats strong { font-size: 1.15rem; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:last-child { display: none; }
  .cta-band { padding: 38px 22px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .status-banner { flex-wrap: wrap; align-items: flex-start; padding: 16px 18px; }
  .status-banner .status-copy { flex: 1 1 180px; min-width: 0; }
  .status-banner .ind { flex-basis: 34px; width: 34px; height: 34px; }
  .status-banner .stamp { width: 100%; margin-left: 0; padding-left: 50px; }
  .comp { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; padding: 13px 18px; }
  .comp .bars { display: none; }
  .comp .c-name { flex-wrap: wrap; align-items: center; row-gap: 2px; }
  .comp .c-name .c-sub { flex: 1 0 100%; padding-left: 17px; font-size: 0.72rem; }
  .incident { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 18px; }
  .incident .date { padding-top: 0; }
  .auth-card { padding: 26px 22px 24px; }
  .code-head span { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
}
