/* TCN Storage — design system */

:root {
  color-scheme: dark;
  --bg: #07080c;
  --bg-soft: #0b0d14;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #eef1f7;
  --fg-muted: #9aa3b5;
  --fg-dim: #6c7484;
  --accent: #6d8bff;
  --accent-2: #38d9c4;
  --accent-3: #b07cff;
  --warn: #f0b429;
  --ok: #37d399;
  --danger: #ff6b6b;
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --maxw: 1180px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-soft: #ffffff;
  --panel: rgba(12, 18, 32, 0.025);
  --panel-strong: rgba(12, 18, 32, 0.045);
  --line: rgba(12, 18, 32, 0.1);
  --line-strong: rgba(12, 18, 32, 0.18);
  --fg: #12161f;
  --fg-muted: #525c6e;
  --fg-dim: #7b8494;
  --accent: #3355e8;
  --accent-2: #0f9e8c;
  --accent-3: #7c46d6;
  --ok: #16a071;
  --shadow: 0 20px 48px -30px rgba(18, 26, 48, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(760px 460px at 92% 4%, color-mix(in srgb, var(--accent-3) 12%, transparent), transparent 72%);
}

main, header, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.021em; margin: 0 0 .5em; font-weight: 640; }
h1 { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--fg-muted); }
strong { color: var(--fg); font-weight: 600; }
code { font-family: var(--mono); font-size: .9em; }
:not(pre) > code {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .12em .42em;
  color: var(--fg);
}
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-sm { padding: 52px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 1rem;
}
.lead { font-size: 1.1rem; max-width: 62ch; }
.muted { color: var(--fg-muted); }
.dim { color: var(--fg-dim); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.mono { font-family: var(--mono); }

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

.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.02em; }
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand small { display: block; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-dim); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: 8px; }
.nav-links a { font-size: .93rem; color: var(--fg-muted); transition: color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--fg-muted);
  cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.lang-switch a {
  padding: 6px 10px; font-size: .78rem; font-weight: 600; letter-spacing: .06em;
  color: var(--fg-dim); text-transform: uppercase;
}
.lang-switch a[aria-current="true"] { background: var(--panel-strong); color: var(--fg); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .72rem 1.25rem; border-radius: 11px; font-size: .94rem; font-weight: 560;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-3) 55%, var(--accent)));
  color: #fff;
  box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--accent) 90%, transparent);
}
.btn-primary:hover { box-shadow: 0 18px 38px -16px color-mix(in srgb, var(--accent) 95%, transparent); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--panel-strong); }
.btn-sm { padding: .5rem .9rem; font-size: .86rem; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; }
.center .btn-row { justify-content: center; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); font-weight: 550; font-size: .94rem; }
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

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

.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .5; pointer-events: none; z-index: 0;
  mask-image: radial-gradient(75% 65% at 50% 40%, #000 30%, transparent 100%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 span.grad {
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 45%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: .38rem .8rem .38rem .55rem;
  font-size: .82rem; color: var(--fg-muted); margin-bottom: 1.4rem;
}
.pill .tag {
  background: color-mix(in srgb, var(--accent-2) 20%, transparent);
  color: var(--accent-2); border-radius: 999px; padding: .1rem .5rem;
  font-size: .72rem; font-weight: 650; letter-spacing: .04em;
}

.stat-row { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 3rem; }
.stat b { display: block; font-size: 1.85rem; font-weight: 650; letter-spacing: -.02em; }
.stat span { font-size: .84rem; color: var(--fg-dim); }

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

.console {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: linear-gradient(180deg, var(--bg-soft), color-mix(in srgb, var(--bg-soft) 60%, transparent));
  box-shadow: var(--shadow); overflow: hidden;
}
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.console-bar .path { margin-left: 8px; font-family: var(--mono); font-size: .78rem; color: var(--fg-dim); }
.console-body { padding: 18px; display: grid; gap: 14px; }
.bucket-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--panel); font-size: .88rem;
}
.bucket-row .name { font-family: var(--mono); color: var(--fg); }
.bucket-row .size, .bucket-row .rg { color: var(--fg-dim); font-size: .8rem; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.spark i {
  display: block; width: 6px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent));
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- code ---------- */

.code {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.code-head .tabs { display: flex; gap: 4px; }
.tab {
  border: 0; background: transparent; color: var(--fg-dim); cursor: pointer;
  font: inherit; font-size: .82rem; padding: .35rem .7rem; border-radius: 8px;
}
.tab[aria-selected="true"] { background: var(--panel-strong); color: var(--fg); }
.copy { margin-left: auto; }
pre {
  margin: 0; padding: 18px; overflow-x: auto;
  font-family: var(--mono); font-size: .84rem; line-height: 1.7; color: var(--fg-muted);
}
pre .k { color: var(--accent-3); }
pre .s { color: var(--accent-2); }
pre .c { color: var(--fg-dim); font-style: italic; }
pre .f { color: var(--accent); }

/* ---------- cards / grids ---------- */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 22px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.card:hover { border-color: var(--line-strong); background: var(--panel-strong); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 14px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent);
}
.card .ico svg { width: 19px; height: 19px; }

.feature-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
.feature-list li { position: relative; padding-left: 1.6rem; color: var(--fg-muted); font-size: .94rem; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 8px; height: 8px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

/* ---------- region map ---------- */

.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.region {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel);
}
.region .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: ping 2.8s ease-out infinite; }
.region .dot.warn { background: var(--warn); }
.region b { display: block; font-size: .92rem; font-weight: 560; }
.region span { font-size: .76rem; color: var(--fg-dim); font-family: var(--mono); }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

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

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.plan { position: relative; border: 1px solid var(--line); border-radius: var(--radius-l); padding: 26px; background: var(--panel); }
.plan.is-featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, var(--panel)), var(--panel));
  box-shadow: var(--shadow);
}
.plan .badge {
  position: absolute; top: -11px; left: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff;
  font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 999px;
}
.plan .price { font-size: 2.1rem; font-weight: 650; letter-spacing: -.03em; margin: .4rem 0 .1rem; }
.plan .price small { font-size: .9rem; font-weight: 450; color: var(--fg-dim); letter-spacing: 0; }
.plan .btn { width: 100%; margin-top: 1.2rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-dim); background: var(--panel); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-family: var(--mono); text-align: right; }

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

.docs-layout { display: grid; grid-template-columns: 236px 1fr; gap: 44px; align-items: start; }
.docs-nav { position: sticky; top: 92px; border-left: 1px solid var(--line); padding-left: 18px; display: grid; gap: .1rem; }
.docs-nav b { font-size: .74rem; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-dim); margin: 1rem 0 .4rem; }
.docs-nav b:first-child { margin-top: 0; }
.docs-nav a { font-size: .9rem; color: var(--fg-muted); padding: .22rem 0; }
.docs-nav a:hover { color: var(--fg); }
.docs-nav a[aria-current="page"] { color: var(--accent); }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { color: var(--fg-muted); padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.prose .code { margin: 1.2rem 0; }
.note {
  border-left: 3px solid var(--accent); background: var(--panel);
  border-radius: 0 10px 10px 0; padding: 14px 18px; margin: 1.4rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note b { color: var(--fg); }

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

.status-banner {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line));
  background: color-mix(in srgb, var(--ok) 8%, transparent);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 30px;
}
.status-banner .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.status-banner b { font-size: 1.05rem; }
.uptime { display: flex; gap: 3px; height: 30px; margin: .6rem 0 .2rem; }
.uptime i { flex: 1; border-radius: 2px; background: var(--ok); opacity: .75; display: block; }
.uptime i.deg { background: var(--warn); }
.svc { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--panel); }
.svc .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.svc .top b { font-weight: 560; font-size: .96rem; }
.svc .top span { font-size: .8rem; color: var(--ok); font-family: var(--mono); }
.svc .scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--fg-dim); }

/* ---------- forms ---------- */

.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .86rem; font-weight: 550; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--fg);
  font: inherit; font-size: .93rem;
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-dim); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.form-note { font-size: .82rem; color: var(--fg-dim); }
.form-msg {
  display: none; margin-top: 1rem; padding: 12px 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  font-size: .88rem; color: var(--fg);
}
.form-msg.is-visible { display: block; }

.auth-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 60px 0; }
.auth-card { width: 100%; max-width: 420px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-soft); padding: 34px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 1.4rem; }
.divider { display: flex; align-items: center; gap: 12px; margin: 1.3rem 0; color: var(--fg-dim); font-size: .78rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

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

.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  padding: 0 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 550; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fg-dim); font-size: 1.15rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 15px; font-size: .94rem; }

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

.cta {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background:
    radial-gradient(800px 300px at 10% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--panel);
  padding: 52px 44px; text-align: center;
}

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

.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 54px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-col b { display: block; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: .9rem; }
.footer-col a { display: block; font-size: .9rem; color: var(--fg-muted); padding: .2rem 0; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--fg-dim);
}
.footer-bottom .status-inline { display: inline-flex; align-items: center; gap: .5rem; }
.footer-bottom .status-inline i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- edge page ---------- */

.edge-body { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; }
.edge-main { display: grid; place-items: center; padding: 56px 24px; }
.edge-card {
  width: 100%; max-width: 520px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--bg-soft); box-shadow: var(--shadow); padding: 40px 36px;
}
.edge-card .mark-lg { width: 52px; height: 52px; margin: 0 auto 18px; }
.edge-id {
  display: inline-block; font-family: var(--mono); font-size: .8rem; letter-spacing: .1em;
  border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem;
  color: var(--fg-muted); margin-bottom: 1.2rem;
}
.edge-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 1.6rem 0; }
.edge-meta div { background: var(--bg-soft); padding: 13px 8px; }
.edge-meta b { display: block; font-size: .9rem; font-weight: 560; }
.edge-meta span { font-size: .72rem; color: var(--fg-dim); letter-spacing: .04em; text-transform: uppercase; }
.edge-footer { border-top: 1px solid var(--line); padding: 20px 24px; text-align: center; font-size: .82rem; color: var(--fg-dim); }
.edge-footer a { color: var(--fg-muted); margin: 0 .5rem; }
.edge-footer a:hover { color: var(--fg); }

/* ---------- error pages ---------- */

.error-shell { min-height: calc(100vh - 68px); display: grid; place-items: center; text-align: center; padding: 70px 24px; }
.error-code {
  font-family: var(--mono); font-size: clamp(4rem, 2rem + 10vw, 8rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 50%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- reveal ---------- */

html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 26px; }
  .docs-nav { position: static; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .section { padding: 60px 0; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 10px 24px 18px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { gap: 22px; }
  .cta { padding: 38px 24px; }
}

/* =====================================================================
   Extensions for the generated site (components added by build/*.mjs)
   ===================================================================== */

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--bg-soft); color: var(--fg); border: 1px solid var(--line-strong);
  padding: .5rem .9rem; border-radius: 10px; font-size: .9rem;
}
.skip-link:focus { top: 12px; }

/* theme toggle shows the icon of the theme you would switch to */
.theme-toggle .i-sun, .theme-toggle .i-moon { display: inline-flex; }
.theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-moon { display: inline-flex; }

.nav-mobile-only { display: none; }
.icon-btn.nav-toggle { display: none; }
.hero h1 { font-size: clamp(2.3rem, 1.2rem + 3.2vw, 3.6rem); }
.icon-btn svg, .btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- hero ---------- */
.hero-copy { min-width: 0; }
.hero-meta { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .88rem; color: var(--fg-dim); }
.hero-meta li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-meta svg { width: 15px; height: 15px; color: var(--accent-2); }
.hero-console { position: relative; }
.hero-console::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 35%, transparent 65%, color-mix(in srgb, var(--accent-3) 55%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.hero-console.is-in { animation: float 9s ease-in-out 1s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.console-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.console-kpis div { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: var(--panel); }
.console-kpis span { display: block; font-size: .72rem; color: var(--fg-dim); letter-spacing: .03em; }
.console-kpis b { font-family: var(--mono); font-size: 1.02rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bucket-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.bucket-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { height: 22px; align-items: flex-end; }
.spark i { width: 4px; }
.spark i:nth-child(2n) { animation-delay: .4s; }
.spark i:nth-child(3n) { animation-delay: .9s; }
.lv-1 { height: 10%; } .lv-2 { height: 20%; } .lv-3 { height: 30%; } .lv-4 { height: 40%; } .lv-5 { height: 50%; }
.lv-6 { height: 60%; } .lv-7 { height: 70%; } .lv-8 { height: 80%; } .lv-9 { height: 90%; } .lv-10 { height: 100%; }
.console-foot { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--fg-dim); font-family: var(--mono); }
.ok-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---------- section heads ---------- */
.section-head { max-width: 760px; margin-bottom: 2.4rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.split-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: 2.2rem; }
.split-head .lead { margin: 0; }
.more { margin: 1.8rem 0 0; }
.page-hero { padding: 84px 0 36px; }
.page-hero.compact { padding: 64px 0 8px; }
.page-hero .lead { font-size: 1.15rem; }

/* ---------- metrics ---------- */
.metrics-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.metric b {
  display: block; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); font-weight: 650; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
  background: linear-gradient(120deg, var(--fg), color-mix(in srgb, var(--fg) 55%, var(--accent)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric > span { font-size: .88rem; color: var(--fg-dim); }
.cta .btn-row { justify-content: center; }
.cta .lead { margin-left: auto; margin-right: auto; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--panel); }
.step-n { font-family: var(--mono); font-size: .8rem; color: var(--accent-2); letter-spacing: .1em; display: block; margin-bottom: .9rem; }
.step p { margin: 0; }

/* ---------- code layouts ---------- */
.code-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.code-split > * { min-width: 0; }
.code-title { font-family: var(--mono); font-size: .8rem; color: var(--fg-dim); }
.code-head .tabs { flex-wrap: wrap; }
.copy {
  margin-left: auto; border: 1px solid var(--line); background: transparent; color: var(--fg-dim);
  font: inherit; font-size: .76rem; padding: .28rem .65rem; border-radius: 7px; cursor: pointer;
}
.copy:hover { color: var(--fg); border-color: var(--line-strong); }
pre code { font-family: inherit; font-size: inherit; background: none; border: 0; padding: 0; }
.tab:hover { color: var(--fg); }

/* ---------- faq ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }

/* ---------- product pages ---------- */
.pillar .feature-list { margin-top: .6rem; }
.badge-ok, .badge-deg, .badge-out {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 600;
  border-radius: 999px; padding: .15rem .6rem; white-space: nowrap;
}
.badge-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.badge-deg { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.badge-out { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }

.flow { display: grid; grid-template-columns: 1fr 48px 1fr 48px 1fr; align-items: stretch; }
.flow-step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--panel); }
.flow-step .ico {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px;
  color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 25%, transparent);
}
.flow-step .ico svg { width: 19px; height: 19px; }
.flow-step b { display: block; margin-bottom: .3rem; }
.flow-step p { margin: 0; font-size: .92rem; }
.flow-arrow { position: relative; }
.flow-arrow::before {
  content: ""; position: absolute; top: 50%; left: 8px; right: 8px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-2));
  background-size: 200% 100%; animation: flowline 2.4s linear infinite;
}
@keyframes flowline { from { background-position: 0 0; } to { background-position: -200% 0; } }

.plan h3 { margin-bottom: .1rem; }
.plan-note { font-size: .9rem; margin-bottom: .6rem; }
tr.total td { background: var(--panel); }
.form-note.center { margin-top: 1.4rem; }

.narrow { max-width: 820px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.2rem; margin: .6rem 0 1.2rem; font-size: .93rem; }
.kv dt { color: var(--fg-dim); }
.kv dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.kv a, .prose a:not(.card):not(.btn), .note a, .auth-foot a, .edge-note a { color: var(--accent); }
.kv a:hover, .prose a:not(.card):not(.btn):hover { text-decoration: underline; }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; display: grid; }
.timeline::before { content: ""; position: absolute; left: 58px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline li { display: grid; grid-template-columns: 58px 1fr; gap: 28px; padding: 12px 0; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 54px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline b { font-family: var(--mono); font-size: .92rem; padding-top: 2px; }
.timeline p { margin: 0; }

/* ---------- contact / auth ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.contact-cards .card p { margin-bottom: .5rem; }
.contact-cards a.mono { color: var(--accent); font-size: .9rem; overflow-wrap: anywhere; }
.contact-office { grid-column: 1 / -1; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-soft); padding: 28px; box-shadow: var(--shadow); position: sticky; top: 92px; }
.form-card h2 { font-size: 1.35rem; margin-bottom: 1.2rem; }
.field textarea { resize: vertical; min-height: 120px; }
.btn-block { width: 100%; }
.auth-head { text-align: center; margin-bottom: 1.6rem; }
.auth-head h1 { font-size: 1.5rem; margin-bottom: .3rem; }
.auth-head p { margin: 0; font-size: .92rem; }
.auth-foot { text-align: center; margin: 1.4rem 0 0; font-size: .88rem; }
.auth-shell { min-height: calc(100vh - 68px - 80px); }

/* ---------- docs ---------- */
.docs-section { padding-top: 48px; }
.docs-nav a.toc { font-size: .84rem; color: var(--fg-dim); }
.docs-nav a.toc:hover { color: var(--fg); }
.prose { min-width: 0; }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); }
.prose h2 { font-size: 1.5rem; scroll-margin-top: 90px; }
.prose .table-wrap { margin: 1.2rem 0; }
.legal h2 { font-size: 1.2rem; margin-top: 2rem; }
.doc-cards .card { display: block; }
.doc-cards .card h3 { font-size: 1.05rem; }
.docs-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.docs-pager a { display: grid; gap: .1rem; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 180px; background: var(--panel); font-weight: 560; }
.docs-pager a span { font-size: .76rem; color: var(--fg-dim); font-weight: 450; }
.docs-pager a.next { text-align: right; margin-left: auto; }
.docs-pager a:hover { border-color: var(--line-strong); }
.method { font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .04em; border-radius: 6px; padding: .12rem .45rem; }
.m-get { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.m-post { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.m-patch { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.m-delete { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }

/* ---------- status ---------- */
.status-banner p { margin: 0; font-size: .86rem; }
.status-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: .8rem; color: var(--fg-dim); margin-bottom: 14px; }
.status-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.status-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--ok); display: block; }
.status-legend i.deg { background: var(--warn); }
.status-legend i.out { background: var(--danger); }
.svc-list { display: grid; gap: 12px; }
.uptime { gap: 2px; }
.uptime i.out { background: var(--danger); opacity: .9; }
.uptime i:hover { opacity: 1; }
.incidents { display: grid; gap: 12px; margin-top: 1rem; }
.incident { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--panel); }
.incident-meta { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--fg-dim); margin-bottom: .5rem; font-family: var(--mono); }
.incident h3 { font-size: 1.02rem; }
.incident p { font-size: .93rem; }
.incident-foot { margin: 0; font-size: .8rem; }

/* ---------- error pages ---------- */
.error-inner { max-width: 760px; }
.error-inner .lead { margin-left: auto; margin-right: auto; }
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 2.2rem; text-align: left; }
.quick-links .card { display: grid; gap: .2rem; padding: 16px; }
.quick-links .ico { margin-bottom: 8px; width: 34px; height: 34px; }
.quick-links b { font-weight: 600; }
.quick-links span:last-child { font-size: .82rem; color: var(--fg-dim); }
.error-code.small { font-size: 3.4rem; margin: .4rem 0 .6rem; }

/* ---------- edge ---------- */
.edge-top { position: fixed; top: 16px; right: 16px; z-index: 5; }
.edge-card .mark-lg { display: block; }
.edge-kicker { font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: .7rem; }
.edge-card h1 { font-size: 1.6rem; }
.edge-card .btn-row { justify-content: center; margin-top: 1.4rem; }
.edge-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .84rem; font-family: var(--mono); margin: 0; }
.edge-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 2.8s ease-out infinite; }
.edge-note { font-size: .84rem; margin: 1.4rem 0 0; color: var(--fg-dim); }
.edge-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 0; margin-bottom: .4rem; }
.edge-footer p { margin: 0; color: var(--fg-dim); font-size: .8rem; }
.edge-body::before {
  background:
    radial-gradient(700px 420px at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(600px 380px at 50% 110%, color-mix(in srgb, var(--accent-3) 10%, transparent), transparent 70%);
}
.edge-main, .edge-footer { position: relative; z-index: 1; }

/* ---------- footer ---------- */
.footer-col a.brand { display: inline-flex; padding: 0; color: var(--fg); margin-bottom: 1rem; }
.footer-about p { font-size: .9rem; max-width: 34ch; }
.footer-entity { font-size: .8rem; line-height: 1.6; }
.site-footer.bare { margin-top: 0; padding: 0 0 22px; border-top: 0; }
.site-footer.bare .footer-bottom { margin-top: 0; }
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 16px; }
.footer-links a:hover, .status-inline:hover { color: var(--fg); }

/* ---------- responsive for the extensions ---------- */
@media (max-width: 980px) {
  .code-split, .faq-wrap, .contact-grid, .split-head { grid-template-columns: 1fr; gap: 28px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { height: 34px; }
  .flow-arrow::before {
    top: 6px; bottom: 6px; left: 50%; right: auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--accent-2), var(--accent)); animation: none;
  }
  .form-card { position: static; }
  .quick-links { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 64px; }
}
@media (max-width: 760px) {
  .nav { gap: 12px; }
  .nav-desktop-only { display: none; }
  .nav-mobile-only { display: block; }
  .icon-btn.nav-toggle { display: inline-flex; }
  .nav-links a.nav-cta { color: var(--accent); font-weight: 600; border-bottom: 0; }
  .brand small { display: none; }
  .console-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .console-kpis div { padding: 8px; }
  .console-kpis b { font-size: .86rem; }
  .bucket-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
  .bucket-row .spark { display: none; }
  .uptime { gap: 1px; height: 26px; }
  .docs-pager a { min-width: 0; }
  .timeline::before { left: 44px; }
  .timeline li { grid-template-columns: 44px 1fr; gap: 22px; }
  .timeline li::after { left: 40px; }
  .page-hero { padding: 56px 0 20px; }
  .edge-meta { grid-template-columns: 1fr; }
  .regions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .region { padding: 10px 12px; }
  .edge-card { padding: 32px 22px; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
}
@media (max-width: 420px) {
  .quick-links { grid-template-columns: 1fr; }
  .lang-switch a { padding: 6px 8px; }
  .metrics { gap: 18px; }
}
