/* Charter site — plum ground, signal-red accent */
:root {
  color-scheme: dark;
  --bg: #0F0A16;
  --surface: #191223;
  --line: #2A2038;
  --line-strong: #3F3154;
  --accent: #E5483B;
  --glow: rgba(229, 72, 59, 0.12);

  --text: #FAFAFA;
  --text-muted: #A1A1AA;
  --text-soft: #D4D4D8;
  --text-faint: #71717A;
  --ok: #4ADE80;
  --ink: #09090B;
  --terminal-fg: #E4E4E7;
  --btn-primary-hover: #FFFFFF;
  --nav-hover: rgba(255, 255, 255, 0.03);
  --nav-active: rgba(255, 255, 255, 0.06);

  --font-sans: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F6F2F9;
    --surface: #FFFFFF;
    --line: #E5DDED;
    --line-strong: #C9BED8;
    --accent: #E5483B;
    --glow: rgba(229, 72, 59, 0.10);

    --text: #18121F;
    --text-muted: #6B6578;
    --text-soft: #3D3648;
    --text-faint: #8A8396;
    --ok: #15803D;
    --ink: #FAFAFA;
    --terminal-fg: #3F3F46;
    --btn-primary-hover: #09090B;
    --nav-hover: rgba(15, 10, 22, 0.04);
    --nav-active: rgba(15, 10, 22, 0.08);
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  background-color: var(--bg);
  background-image: radial-gradient(1100px 560px at 12% -6%, var(--glow), transparent 70%);
  background-repeat: no-repeat;
  overflow-x: clip;
}

a { color: var(--text-muted); text-decoration: none; }
a:hover { color: var(--text); }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header */
.site-header .wrap {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-header.bordered { border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .brand-mark,
.brand-mark { display: block; }
.brand .brand-mark { width: 44px; height: 44px; }
.wordmark { font-size: 23px; font-weight: 600; letter-spacing: -0.4px; }
.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 16px; }
.nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 22px; border-radius: 10px;
  font-size: 16px; font-weight: 500;
}
.btn-sm { padding: 10px 16px; border-radius: 8px; }
.btn-primary { background: var(--text); color: var(--ink); }
.btn-primary:hover { color: var(--ink); background: var(--btn-primary-hover); }
.btn-ghost { color: var(--text); border: 1px solid var(--line-strong); }

/* Hero */
.hero { padding-top: 104px; padding-bottom: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; font-weight: 600; letter-spacing: -2px; max-width: 860px; }
.hero .lead { margin: 0; font-size: 24px; line-height: 1.4; color: var(--text-muted); max-width: 560px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 8px; }

/* Terminal */
.terminal-section { padding-bottom: 120px; }
.terminal { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.terminal-path { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.terminal pre {
  margin: 0; padding: 28px 28px 32px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.85; color: var(--terminal-fg);
}
.t-prompt { color: var(--accent); }
.t-ok { color: var(--ok); }
.t-dim { color: var(--text-faint); }
.t-muted { color: var(--text-muted); }
.t-bright { color: var(--text); font-weight: 500; }

/* Key features rail */
.features { padding-bottom: 120px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -0.8px; }
.section-head .count { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.rail {
  display: flex; gap: 16px; overflow-x: auto; padding: 0 0 16px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  list-style: none; margin: 0;
}
.card {
  flex: 0 0 min(320px, 82%); scroll-snap-align: start; min-height: 210px;
  padding: 28px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.card .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.card h3 { margin: 6px 0 0; font-size: 18px; line-height: 1.3; font-weight: 500; }
.card p { margin: 0; font-size: 18px; line-height: 1.3; color: var(--text-muted); }

/* Closing CTA */
.cta { padding-top: 96px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.cta h2 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -1.2px; }
.cta p { margin: 0; font-size: 18px; line-height: 1.3; color: var(--text-muted); }
.cta .brand-mark { display: block; width: 56px; height: 56px; }

/* Footer */
.site-footer { font-size: 16px; }
.site-footer .wrap {
  padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--text-faint);
}
.site-footer .copy { display: flex; align-items: center; gap: 10px; }
.site-footer .copy .brand-mark { display: block; width: 20px; height: 20px; opacity: 0.55; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Docs */
.docs-layout { padding-top: 48px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.docs-nav { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 28px; font-size: 15px; }
.docs-nav .group { display: flex; flex-direction: column; gap: 10px; }
.docs-nav .group-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-faint); }
.docs-nav a {
  display: block; padding: 6px 10px; margin: 0 -10px; border-radius: 8px;
  color: var(--text-muted);
}
.docs-nav a:hover { color: var(--text); background: var(--nav-hover); }
.docs-nav a[aria-current="page"] {
  color: var(--text); font-weight: 500; background: var(--nav-active);
}
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.article { flex: 999 1 560px; min-width: 0; max-width: 720px; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.article h1 { margin: 12px 0 20px; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; font-weight: 600; letter-spacing: -1.6px; }
.article .lead { margin: 0 0 48px; font-size: 22px; line-height: 1.4; color: var(--text-soft); }
.article section { padding-top: 32px; border-top: 1px solid var(--line); margin-bottom: 40px; }
.article section:last-of-type { margin-bottom: 56px; }
.article h2 { margin: 0 0 16px; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.6px; }
.article p { margin: 0 0 16px; font-size: 18px; line-height: 1.55; color: var(--text-muted); }
.article p:last-child { margin-bottom: 0; }
.article ul { margin: 0 0 16px; padding-left: 1.25em; color: var(--text-muted); font-size: 18px; line-height: 1.55; }
.article li { margin-bottom: 8px; }
.draft-note {
  margin: 0 0 32px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 16px; line-height: 1.45; color: var(--text-soft);
}
.standards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.standard { padding: 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.standard .label { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.article .standard p { margin: 0; font-size: 16px; line-height: 1.45; }
.next {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--text);
}
.next:hover { color: var(--text); border-color: var(--text-faint); }
.next .kicker { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.next .title { font-size: 18px; font-weight: 500; }
.next .arrow { font-size: 20px; color: var(--accent); }

/* Changelog / release history (Intent-style entries inside docs article shell) */
.release-history { border-top: none; padding-top: 0; margin-bottom: 0; }
.release-empty {
  margin: 0; padding: 20px 22px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 18px; line-height: 1.5; color: var(--text-muted);
}
.release-meta {
  margin: 34px 0 12px; font-size: 18px; font-weight: 500;
  line-height: 1.3; color: var(--text);
}
.release-history > .release-meta:first-child { margin-top: 0; }
.release-history > .release-meta + p { margin-bottom: 0; }

/* Download page */
.download-page {
  padding-top: 96px; padding-bottom: 120px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  max-width: 640px;
}
.download-page h1 { margin: 0; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; font-weight: 600; letter-spacing: -1.6px; }
.download-page p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text-muted); }

/* Focus */
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Mobile */
@media (max-width: 480px) {
  .wordmark { display: none; }
}
