:root {
  --bg: #0b0e14;
  --bg-alt: #0f131b;
  --surface: #141924;
  --surface-2: #1a2130;
  --border: #263044;
  --border-subtle: #1c2333;
  --text: #f2f5fa;
  --text-2: #9aa6bc;
  --muted: #6e7b93;
  --accent: #12d696;
  --accent-hover: #23e8a8;
  --accent-soft: rgba(18, 214, 150, .14);
  --accent-ink: #061a14;
  --info: #4da3ff;
  --info-soft: rgba(77, 163, 255, .14);
  --warn: #f5a623;
  --warn-soft: rgba(245, 166, 35, .14);
  --danger: #f25c69;
  --danger-soft: rgba(242, 92, 105, .14);
  --radius: 12px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

[data-theme="light"] {
  --bg: #f3f5f9;
  --bg-alt: #eaf0f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #d8dfea;
  --border-subtle: #e6ebf2;
  --text: #101623;
  --text-2: #4e5b72;
  --muted: #7c889e;
  --accent: #058a5e;
  --accent-hover: #047852;
  --accent-soft: #e3f8f0;
  --accent-ink: #ffffff;
  --info: #1565c0;
  --info-soft: #e7f2fe;
  --warn: #b86d00;
  --warn-soft: #fef5e4;
  --danger: #d62f3f;
  --danger-soft: #fdecee;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: inherit; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

.top-banner { padding: 10px 22px; text-align: center; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--border); }
.top-banner.warn { background: var(--warn-soft); color: var(--warn); }
.top-banner.info { background: var(--info-soft); color: var(--info); }
.top-banner.danger { background: var(--danger-soft); color: var(--danger); }

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg-alt) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.header-inner { height: 64px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.brand span { display: block; font-size: 11px; color: var(--muted); }
.main-nav { display: flex; gap: 6px; margin-left: 16px; flex: 1; }
.main-nav a { text-decoration: none; color: var(--text-2); font-size: 13px; font-weight: 500; padding: 7px 11px; border-radius: 8px; transition: background .15s, color .15s; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 15px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: .15s ease; white-space: nowrap; }
.btn.lg { padding: 11px 20px; font-size: 14px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-icon { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 15px; }
.btn-icon:hover { color: var(--text); border-color: var(--accent); }

.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.neutral { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.hero { padding: 64px 0 56px; background: radial-gradient(800px 420px at 80% 10%, rgba(18, 214, 150, .10), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 36px; align-items: center; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 16px; }
.accent, .accent-txt { color: var(--accent); }
.lead { font-size: 16px; color: var(--text-2); margin: 0 0 24px; max-width: 58ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.hero-facts strong { display: block; font-size: 13px; margin-bottom: 2px; }
.hero-facts span { font-size: 12px; color: var(--text-2); }

.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.window-chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border-subtle); }
.wd { width: 10px; height: 10px; border-radius: 50%; }
.wd.r { background: #f25c69; } .wd.y { background: #f5a623; } .wd.g { background: #12d696; }
.wtitle { margin-left: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.mock-body { padding: 16px; display: grid; gap: 12px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mk { background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: 9px; padding: 10px; }
.mk span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mk b { font-size: 13px; }
.mock-graph { background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 12px; }
.mg-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.slope-svg { width: 100%; height: auto; display: block; color: var(--text); }
.mock-flow { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--text-2); padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.mock-flow i { font-style: normal; color: var(--accent); font-weight: 700; }

.section { padding: 60px 0; }
.alt-section { background: var(--bg-alt); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.section-head { max-width: 680px; margin-bottom: 30px; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
.section-head h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--text-2); font-size: 15px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: border-color .15s; }
.fcard:hover { border-color: var(--accent); }
.fnum { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.fcard h3 { margin: 0 0 8px; font-size: 16px; }
.fcard p { margin: 0; color: var(--text-2); font-size: 13.5px; }

.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dl-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-content: start; }
.dl-panel.recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft); }
.dl-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-panel h3 { margin: 0; font-size: 18px; }
.dl-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border-subtle); text-decoration: none; transition: border-color .15s; }
.dl-item:hover { border-color: var(--accent); }
.dl-item .meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.dl-item .sha { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cmd-card { background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; display: grid; gap: 8px; }
.cmd-card code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--accent); word-break: break-all; }
.cmd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-loading { color: var(--text-2); font-size: 14px; }

.releases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; align-content: start; }
.rel-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rel-ver { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.rel-notes { margin: 0; font-size: 13px; color: var(--text-2); white-space: pre-wrap; }

.portals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.portal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.portal-card h3 { margin: 0; font-size: 20px; }
.portal-card p { margin: 0 0 6px; color: var(--text-2); font-size: 14px; }

.site-footer { border-top: 1px solid var(--border-subtle); padding: 24px 0; font-size: 13px; color: var(--text-2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--text-2); }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .hero-grid, .feature-grid, .dl-grid, .releases-grid, .portals-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}
