/* styles.css — Aven site design system (shared by every page) */

:root {
  color-scheme: dark;

  --bg: #070a10;
  --bg-raised: #0c111a;
  --surface: #101723;
  --surface-2: #151e2d;
  --code-bg: #0a0f17;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);

  --text: #e6ebf2;
  --text-muted: #9aa6b8;
  --text-dim: #6b7789;

  --accent: #4fd1e8;
  --accent-strong: #22b8d6;
  --accent-soft: rgba(79, 209, 232, 0.12);
  --amber: #f5b451;
  --amber-soft: rgba(245, 180, 81, 0.12);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.12);
  --red: #f87171;

  --syn-kw: #c792ea;
  --syn-fn: #82aaff;
  --syn-num: #f5b451;
  --syn-com: #5f6b7d;
  --syn-op: #89ddff;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --max-w: 1180px;
  --nav-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #8be4f3;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #f4f7fb;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
p { color: var(--text-muted); text-wrap: pretty; }

code,
pre,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
:not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.08em 0.38em;
  color: #d5deea;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(7, 10, 16, 0.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.98rem;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 26px;
  height: 26px;
}
.brand-version {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  padding: 0.05rem 0.5rem;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin-right: auto;
}
.nav-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
  background: rgba(148, 163, 184, 0.08);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.icon-link:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.08);
}
.icon-link svg { width: 20px; height: 20px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 820px) {
  .nav .container { gap: 0.75rem; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-actions .btn { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 16px 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.6);
  }
  .nav[data-open="true"] .nav-links { display: flex; }
  .nav-links a { padding: 0.75rem 0.5rem; font-size: 1rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent);
  color: #04141a;
}
.btn-primary:hover {
  background: #7ddff0;
  color: #04141a;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.06);
}
.btn-sm {
  font-size: 0.82rem;
  padding: 0.5rem 0.85rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 96px 0;
}
.section-tight { padding: 64px 0; }
.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head p {
  font-size: 1.08rem;
  margin-top: 0.9rem;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.divider {
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .container { padding: 0 16px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(79, 209, 232, 0.13), transparent 60%),
    radial-gradient(700px 380px at 95% 10%, rgba(245, 180, 81, 0.07), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  background: rgba(16, 23, 35, 0.6);
  border-radius: 99px;
  padding: 0.3rem 0.85rem 0.3rem 0.4rem;
  margin-bottom: 1.5rem;
}
.hero-tag b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 99px;
  padding: 0.12rem 0.5rem;
}
.hero h1 .hl {
  color: var(--accent);
}
.hero-lede {
  font-size: 1.15rem;
  margin: 1.4rem 0 2rem;
  max-width: 34rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (max-width: 980px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Install box ---------- */

.install {
  max-width: 34rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.install-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.install-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.install-tab:hover { color: var(--text); }
.install-tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.install-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 0.9rem 0.9rem 1rem;
}
.install-cmd {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  color: #d5deea;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.install-cmd::before {
  content: "$ ";
  color: var(--text-dim);
}
.install-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 0 1rem 0.85rem;
}

.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 5px;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
}
.copy-btn:hover { color: #fff; border-color: var(--border-strong); }
.copy-btn svg { width: 13px; height: 13px; }

/* ---------- Code windows ---------- */

.window {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 23, 35, 0.6);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}
.window-dots {
  display: flex;
  gap: 6px;
}
.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2a3342;
}
.window pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #cfd8e3;
}
.window .term {
  border-top: 1px solid var(--border);
  background: #070b11;
}
.term .prompt { color: var(--green); }
.term .muted { color: var(--text-dim); }
.term .val { color: var(--amber); }
.term .ok { color: var(--green); }
.term .bad { color: var(--red); }

/* syntax colors (applied by site.js / app.js highlighter) */
.tok-kw { color: var(--syn-kw); }
.tok-fn { color: var(--syn-fn); }
.tok-num { color: var(--syn-num); }
.tok-com { color: var(--syn-com); font-style: italic; }
.tok-op { color: var(--syn-op); }
.tok-name { color: #f4f7fb; font-weight: 600; }

/* ---------- Proof strip ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  overflow: hidden;
}
.proof-item {
  padding: 1.5rem 1.5rem 1.35rem;
  border-right: 1px solid var(--border);
}
.proof-item:last-child { border-right: none; }
.proof-val {
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.proof-val small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 0.15rem;
}
.proof-label {
  font-size: 0.88rem;
  color: var(--text);
  margin-top: 0.15rem;
}
.proof-src {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}
@media (max-width: 900px) {
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-item:nth-child(2) { border-right: none; }
  .proof-item:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .proof { grid-template-columns: 1fr; }
  .proof-item { border-right: none; border-bottom: 1px solid var(--border); }
  .proof-item:last-child { border-bottom: none; }
}

/* ---------- Playground ---------- */

.pg {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pg-models {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.pg-model {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.pg-model:hover { color: #fff; border-color: var(--border-strong); }
.pg-model[aria-selected="true"] {
  color: var(--accent);
  border-color: rgba(79, 209, 232, 0.45);
  background: var(--accent-soft);
}
.pg-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.pg-pane {
  padding: 1.25rem;
  min-width: 0;
}
.pg-pane + .pg-pane { border-left: 1px solid var(--border); }
.pane-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}
.pane-title a { text-transform: none; letter-spacing: 0; }
.pg-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #cfd8e3;
  max-height: 460px;
}
.pg-code [data-line] {
  display: inline-block;
  min-width: 100%;
  border-radius: 3px;
  transition: background 0.15s;
}
.pg-code .hot {
  background: rgba(79, 209, 232, 0.12);
}
.sliders {
  display: grid;
  gap: 0.9rem;
}
.slider-row label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.slider-row label span:first-child { min-width: 0; }
.slider-row code {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0;
}
.slider-row output {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), #243042 var(--fill, 50%));
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: #243042;
}
input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
}
.outputs {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code-bg);
}
.outputs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.status-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-weight: 500;
}
.status-ok::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.status-bad { color: var(--red); }
.status-bad::before { background: var(--red); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }
.output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.output {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.output:nth-child(odd) { border-right: 1px solid var(--border); }
.output-name {
  font-size: 0.76rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.output-val {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.output-val small { color: var(--text-dim); font-size: 0.72rem; margin-left: 0.3rem; }
.pg-foot {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 900px) {
  .pg-body { grid-template-columns: 1fr; }
  .pg-pane + .pg-pane { border-left: none; border-top: 1px solid var(--border); }
  .pg-code { max-height: 300px; }
}
@media (max-width: 420px) {
  .output-grid { grid-template-columns: 1fr; }
  .output:nth-child(odd) { border-right: none; }
}

/* ---------- Feature cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card {
  background: var(--bg-raised);
  padding: 1.75rem;
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.93rem; }
.card .cmd {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
}

/* ---------- Workflow (how it works) ---------- */

.flow {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
}
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0.35rem;
}
.step button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 3.4rem;
  position: relative;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.step button::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.05rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.step button:hover { background: rgba(148, 163, 184, 0.04); }
.step button[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--border);
}
.step button[aria-selected="true"]::before {
  border-color: var(--accent);
  color: var(--accent);
}
.step strong {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
}
.step span {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.flow .window pre { min-height: 330px; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 24px; }
  .flow .window pre { min-height: 0; }
}

/* ---------- Verification table ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th,
td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-raised);
}
tr:last-child td { border-bottom: none; }
td { color: var(--text-muted); }
td:first-child { white-space: nowrap; }

/* ---------- CTA ---------- */

.cta {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(79, 209, 232, 0.1), transparent 70%),
    var(--bg-raised);
}
.cta p { max-width: 36rem; margin: 0.9rem auto 1.75rem; font-size: 1.05rem; }
.cta .hero-ctas { justify-content: center; margin-bottom: 0; }

/* ---------- Notices ---------- */

.notice {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border: 1px solid rgba(245, 180, 81, 0.3);
  background: var(--amber-soft);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  color: #f2dcb6;
}
.notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.15rem; color: var(--amber); }
.notice p { color: inherit; }
.notice.info {
  border-color: rgba(79, 209, 232, 0.3);
  background: var(--accent-soft);
  color: #cdeff6;
}
.notice.info svg { color: var(--accent); }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}
.footer-brand p {
  font-size: 0.88rem;
  margin-top: 0.8rem;
  max-width: 22rem;
}
.footer h4 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}
.footer ul { list-style: none; display: grid; gap: 0.5rem; }
.footer li a { color: var(--text-muted); font-size: 0.9rem; }
.footer li a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Docs layout ---------- */

.docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding: 48px 0 32px;
  align-items: start;
}
.docs-nav {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
  padding-bottom: 1rem;
}
.docs-nav h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 1.5rem 0 0.5rem;
}
.docs-nav h4:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; border-left: 1px solid var(--border); }
.docs-nav a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.3rem 0 0.3rem 0.9rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
}
.docs-nav a:hover { color: #fff; }
.docs-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.prose { max-width: 760px; min-width: 0; }
.prose > section { padding-bottom: 2.5rem; }
.prose > section + section {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}
.prose h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 0.9rem; }
.prose h2 { font-size: 1.6rem; margin-bottom: 0.9rem; }
.prose h3 { font-size: 1.08rem; margin: 1.75rem 0 0.6rem; }
.prose p,
.prose li { color: var(--text-muted); }
.prose p + p,
.prose p + ul,
.prose ul + p { margin-top: 0.9rem; }
.prose ul,
.prose ol { padding-left: 1.3rem; display: grid; gap: 0.35rem; margin: 0.9rem 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .lede { font-size: 1.12rem; }
.prose .table-wrap { margin: 1.25rem 0; }
.prose .notice { margin: 1.25rem 0; }

.code {
  position: relative;
  margin: 1.1rem 0;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.code-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.code pre {
  padding: 0.95rem 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #cfd8e3;
}
.code .copy-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.code:hover .copy-btn,
.code .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) {
  .code .copy-btn { opacity: 1; }
}
.code.output pre { color: var(--text-muted); }

.docs-jump { display: none; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .docs-nav { display: none; }
  .docs-jump {
    display: block;
    margin-bottom: 24px;
  }
  .docs-jump select {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.8rem;
    font: inherit;
    font-size: 0.95rem;
  }
}

/* ---------- Registry ---------- */

.page-head {
  padding: 64px 0 32px;
}
.page-head p { font-size: 1.08rem; max-width: 40rem; margin-top: 0.9rem; }
.search {
  display: flex;
  gap: 0.5rem;
  max-width: 560px;
  margin-top: 1.75rem;
}
.search input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
}
.search input::placeholder { color: var(--text-dim); }
.search input:focus { outline: none; border-color: var(--accent); }
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.pkg {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  min-width: 0;
}
.pkg-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.pkg-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fff;
  overflow-wrap: anywhere;
}
.pkg-ver {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
}
.pkg-desc { font-size: 0.9rem; margin: 0.5rem 0 1rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}
.pkg-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.pkg-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  padding: 3rem 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------------------
   /weather — live radar nowcast
   --------------------------------------------------------------------------- */
.wx-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 0.35rem; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: wx-pulse 2s infinite; vertical-align: 1px; }
.wx-live.stale { background: var(--amber); animation: none; }
@keyframes wx-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .wx-live { animation: none; } }
.hero-live { margin: 1rem 0 1.5rem; font-size: 0.9rem; }
.hero-live a { color: var(--text-muted); }
.hero-live a:hover { color: var(--accent); }
.wx-status { margin-top: 1.25rem; font-size: 0.9rem; color: var(--text-muted); font-family: var(--font-mono); }
.wx-section { margin: 3rem 0; }
.wx-section h2 { font-size: 1.4rem; }
.wx-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.wx-note { color: var(--text-muted); font-size: 0.92rem; max-width: 52rem; margin: 0.5rem 0 1rem; }
.wx-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.wx-seg button { background: transparent; color: var(--text-muted); border: 0; padding: 0.4rem 0.8rem; font: inherit; font-size: 0.85rem; cursor: pointer; }
.wx-seg button + button { border-left: 1px solid var(--border); }
.wx-seg button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.wx-score td.num, .wx-score th.num, .wx-ver td.num, .wx-ver th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wx-lead { font-weight: 600; white-space: nowrap; vertical-align: top; }
.wx-base { color: var(--text-muted); }
.wx-best { color: var(--green); font-weight: 600; }
.wx-dim { color: var(--text-dim); font-size: 0.85rem; }
.wx-good { color: var(--green); }
.wx-off { color: var(--amber); }
.wx-runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 1rem; }
.wx-run { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.wx-run.wx-error { opacity: 0.8; }
.wx-run-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.wx-run-head h3 { font-size: 1.05rem; margin: 0 0 0.15rem; }
.wx-run-meta { margin-top: -0.5rem; }
.wx-badge { font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap; border: 1px solid var(--border); }
.wx-badge.ok { color: var(--green); background: var(--green-soft); border-color: transparent; }
.wx-badge.gated { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.wx-badge.error { color: var(--text-muted); }
.wx-error { color: var(--amber); font-size: 0.88rem; margin: 0; overflow-wrap: anywhere; }
.wx-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 0.4rem; }
.wx-grid { display: grid; grid-template-columns: minmax(7.5rem, auto) repeat(4, 1fr); gap: 0.3rem 0.6rem; font-family: var(--font-mono); font-size: 0.88rem; align-items: baseline; }
.wx-grid .wx-h { text-align: right; }
.wx-grid .wx-m { font-family: var(--font-sans); color: var(--text-muted); font-size: 0.85rem; }
.wx-grid .wx-v { text-align: right; font-variant-numeric: tabular-nums; }
.wx-grid small { display: block; font-size: 0.72rem; }
.wx-checks { display: flex; flex-direction: column; gap: 0.35rem; }
.wx-check { display: grid; grid-template-columns: auto 1fr; column-gap: 0.5rem; font-size: 0.86rem; align-items: baseline; }
.wx-check-label { color: var(--text-muted); }
.wx-check-val { grid-column: 2; font-family: var(--font-mono); font-size: 0.8rem; overflow-wrap: anywhere; }
.wx-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-dim); align-self: center; }
.wx-dot.ok { background: var(--green); }
.wx-dot.warn { background: var(--amber); }
.wx-dot.bad { background: var(--red); }
.wx-dot.na { background: transparent; border: 1px solid var(--text-dim); }
.wx-phys { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem 1rem; margin: 0; }
.wx-phys dt { font-size: 0.75rem; color: var(--text-dim); }
.wx-phys dd { margin: 0; font-family: var(--font-mono); font-size: 0.88rem; }
.wx-src-table td:first-child { width: 38%; white-space: normal; }
.wx-ctx { display: flex; flex-direction: column; gap: 0.3rem; }
.wx-alerts { color: var(--amber); font-size: 0.86rem; }
.wx-sources summary { cursor: pointer; color: var(--text-muted); font-size: 0.86rem; }
.wx-sources ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; }
.wx-sources li { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.wx-run-foot { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.wx-rerun { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .wx-src-table, .wx-src-table tbody { display: block; }
  .wx-src-table thead { display: none; }
  .wx-src-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
  .wx-src-table td { display: block; width: auto !important; border: 0; padding: 0.1rem 0.75rem; }
  .wx-src-table td:first-child { font-weight: 600; }
}
@media (max-width: 520px) {
  .wx-grid { grid-template-columns: minmax(6rem, auto) repeat(4, 1fr); font-size: 0.8rem; gap: 0.3rem 0.4rem; }
  .wx-run { padding: 1rem; }
}
