/* ===================================================================
   Dark Wire — Marketing / Docs Site
   Fully responsive HTML5 stylesheet
   =================================================================== */

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

img, svg, video { display: block; max-width: 100%; height: auto; }

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg: #07070a;
  --bg-2: #0e0e14;
  --bg-3: #14141d;
  --surface: #161620;
  --surface-2: #1d1d2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e6e6ee;
  --text-dim: #a0a0b0;
  --text-muted: #6c6c80;

  --accent: #44d488;
  --accent-2: #66f0a8;
  --accent-soft: rgba(68, 212, 136, 0.14);
  --accent-glow: rgba(68, 212, 136, 0.35);

  --cyan: #56c8d8;
  --magenta: #d65fb8;
  --amber: #e8b84a;
  --danger: #f05050;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --maxw: 1200px;
  --maxw-narrow: 820px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ── Base ───────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;

  background-image:
    radial-gradient(1100px 600px at 80% -10%, rgba(68, 212, 136, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(86, 200, 216, 0.08), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(214, 95, 184, 0.06), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--accent-2); text-decoration: none; transition: color 160ms ease; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

p { color: var(--text-dim); }
strong { color: var(--text); font-weight: 600; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

code {
  background: rgba(68, 212, 136, 0.10);
  color: var(--accent-2);
  padding: 0.12em 0.45em;
  border-radius: 4px;
  border: 1px solid rgba(68, 212, 136, 0.18);
}

pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #07070a;
  padding: 8px 14px;
  font-weight: 600;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  padding-left: clamp(16px, 4vw, 32px);
  padding-right: clamp(16px, 4vw, 32px);
  margin: 0 auto;
}

.container.narrow { max-width: var(--maxw-narrow); }

.section {
  padding: clamp(60px, 9vw, 110px) 0;
}

.section-alt {
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015) 30%, rgba(255, 255, 255, 0.015) 70%, transparent);
  border-block: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin: 0 auto clamp(32px, 5vw, 56px);
  max-width: 760px;
}

.section-header h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  margin-top: 8px;
}

.section-header .muted {
  margin-top: 14px;
  color: var(--text-dim);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(68, 212, 136, 0.22);
}

.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.muted { color: var(--text-dim); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ── Header / Nav ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 10, 0.78);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 7, 10, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--text); }

.brand-mark {
  font-size: 22px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.brand-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--text); }

.btn-pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.03);
}
.btn-pill:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
}
.nav-toggle .bar {
  display: block;
  height: 2px;
  background: var(--text);
  width: 100%;
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(7, 7, 10, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 12px 6px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .btn-pill { text-align: center; margin-top: 8px; }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #051a10;
  box-shadow: 0 6px 18px rgba(68, 212, 136, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(68, 212, 136, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #051a10;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  color: var(--text);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(50px, 8vw, 100px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(800px 500px at 60% 30%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(800px 500px at 60% 30%, black, transparent 75%);
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(68, 212, 136, 0.025) 50%);
  background-size: 100% 4px;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.halo {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  top: -260px; right: -180px;
  background: radial-gradient(circle at center, rgba(68, 212, 136, 0.18), transparent 60%);
  filter: blur(20px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 18px 0 20px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--accent-2), var(--cyan) 60%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  color: var(--text-dim);
  max-width: 56ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.cta-row.center { justify-content: center; }

.hero-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.hero-pills li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* Hero visual — fake terminal window */
.hero-visual {
  position: relative;
}
.window-card {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: perspective(1200px) rotateY(-3deg) rotateX(2deg);
  transition: transform 600ms ease;
}
.window-card:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }

@media (max-width: 980px) {
  .window-card { transform: none; }
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.window-chrome .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--text-muted);
}
.window-chrome .dot.red { background: #ff5f57; }
.window-chrome .dot.amber { background: #febc2e; }
.window-chrome .dot.green { background: #28c840; }
.window-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.window-body {
  padding: 20px 22px;
  background: var(--bg-2);
}
.window-body pre {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.c-prompt { color: var(--accent); }
.c-cmd { color: var(--text); font-weight: 500; }
.c-muted { color: var(--text-muted); }
.c-ok { color: var(--accent-2); font-weight: 600; }
.c-user { color: var(--cyan); font-weight: 600; }
.c-assistant { color: var(--accent); font-weight: 600; }
.c-tool { color: var(--amber); }

/* ── Metrics ────────────────────────────────────────────────────── */
.metrics {
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 28px 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 240ms ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--accent) 60%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(68, 212, 136, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(68, 212, 136, 0.20);
  border-radius: var(--radius);
  font-size: 22px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.card p { font-size: 14.5px; }

/* ── Providers ──────────────────────────────────────────────────── */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.provider {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
}

.provider::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--accent);
  transition: height 240ms ease;
}
.provider:hover::after { height: 100%; }

.provider h3 {
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.muted-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 500;
}
.provider code {
  display: inline-block;
  margin: 8px 0 14px;
  font-size: 13px;
}
.provider p { font-size: 14px; }

.badge {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.badge.optional { color: var(--amber); border-color: rgba(232, 184, 74, 0.3); background: rgba(232, 184, 74, 0.08); }
.badge.needs-key { color: var(--magenta); border-color: rgba(214, 95, 184, 0.3); background: rgba(214, 95, 184, 0.08); }

/* ── Tools table ────────────────────────────────────────────────── */
.tools-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.tool {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 160ms ease, transform 160ms ease;
}
.tool:hover {
  border-color: rgba(68, 212, 136, 0.28);
  transform: translateY(-1px);
}
.tool strong {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-2);
  font-weight: 600;
}
.tool span {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Screenshots ────────────────────────────────────────────────── */
.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.screens figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 240ms ease, border-color 240ms ease;
}
.screens figure:hover {
  transform: translateY(-3px);
  border-color: rgba(68, 212, 136, 0.28);
}
.screens img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.screens figcaption {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Security ───────────────────────────────────────────────────── */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.sec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px;
  border-left: 3px solid var(--accent);
}
.sec h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.sec p { font-size: 14px; }

/* ── Install ────────────────────────────────────────────────────── */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.install-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  position: relative;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.install-step h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.install-step pre { font-size: 13px; }

.build-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.build-block h3 {
  font-size: 1rem;
  margin-bottom: 14px;
}

/* ── FAQ ────────────────────────────────────────────────────────── */
.faq {
  display: grid;
  gap: 10px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 160ms ease, background 160ms ease;
}
.faq details[open] {
  border-color: rgba(68, 212, 136, 0.28);
  background: var(--surface-2);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  transition: transform 200ms ease;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin-top: 12px;
  font-size: 14.5px;
}

/* ── CTA section ────────────────────────────────────────────────── */
.cta-section {
  padding: clamp(60px, 8vw, 90px) 0;
  text-align: center;
  background:
    radial-gradient(600px 300px at 50% 30%, rgba(68, 212, 136, 0.10), transparent 70%);
}
.cta-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.cta-section .muted { margin-bottom: 24px; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: var(--bg-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-tag {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
}
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.copyright {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-tag { display: none; }
}

/* ── Light mode (system preference) ─────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-2: #f6f7f9;
    --bg-3: #eef0f3;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.18);
    --text: #0e0e14;
    --text-dim: #4a4a55;
    --text-muted: #767685;
    --accent: #1a73e8;
    --accent-2: #4285f4;
    --accent-soft: rgba(26, 115, 232, 0.10);
    --accent-glow: rgba(26, 115, 232, 0.30);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.14);
  }

  body {
    background-image:
      radial-gradient(1100px 600px at 80% -10%, rgba(26, 115, 232, 0.10), transparent 60%),
      radial-gradient(900px 600px at -10% 30%, rgba(86, 200, 216, 0.10), transparent 60%);
  }

  code {
    background: rgba(26, 115, 232, 0.08);
    color: var(--accent);
    border-color: rgba(26, 115, 232, 0.16);
  }

  pre { background: var(--bg-2); }

  .site-header { background: rgba(255, 255, 255, 0.85); }
  .site-header.scrolled { background: rgba(255, 255, 255, 0.97); }

  .scanline { display: none; }
  .grid-overlay {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  }
  .halo {
    background: radial-gradient(circle at center, rgba(26, 115, 232, 0.18), transparent 60%);
  }
  .btn-primary { color: #fff; }
  .btn-primary:hover { color: #fff; }
  .window-body, pre { color: var(--text); }
  .c-muted, .c-ok { color: var(--text-muted); }
  .c-prompt, .c-assistant { color: var(--accent); }
  .c-user { color: #1aa673; }
  .c-tool { color: #b88a00; }
}

/* ── Print ──────────────────────────────────────────────────────── */
@media print {
  .site-header, .nav-toggle, .cta-section, .site-footer, .hero-bg { display: none; }
  body { background: #fff; color: #000; }
  .section { padding: 16px 0; }
  a { color: #000; text-decoration: underline; }
  .card, .provider, .tool, .sec, .install-step, .build-block, .faq details {
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
    box-shadow: none;
  }
  pre { background: #f4f4f4; color: #000; border: 1px solid #ddd; }
}

/* ── Ethics banner ──────────────────────────────────────────────── */
.ethics-banner {
  border-block: 1px solid rgba(232, 184, 74, 0.25);
  background: linear-gradient(180deg, rgba(232, 184, 74, 0.06), rgba(232, 184, 74, 0.02));
  padding: 18px 0;
}
.ethics-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--text-dim);
}
.ethics-inner strong {
  display: inline-block;
  margin-right: 8px;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ethics-icon {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(232, 184, 74, 0.10);
  border: 1px solid rgba(232, 184, 74, 0.30);
  border-radius: var(--radius);
}
@media (max-width: 640px) {
  .ethics-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── Agent loop flow ────────────────────────────────────────────── */
.flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  counter-reset: flow;
  position: relative;
}

.flow-step {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 240ms ease;
}

.flow-step:hover {
  transform: translateY(-3px);
  border-color: rgba(68, 212, 136, 0.30);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.flow-step::after {
  content: '→';
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--accent);
  opacity: 0.4;
  pointer-events: none;
}
.flow-step:last-child::after { display: none; }

@media (max-width: 760px) {
  .flow-step::after {
    right: 50%;
    top: auto;
    bottom: -18px;
    transform: translateX(50%);
    content: '↓';
  }
}

.flow-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.flow-step h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.flow-step p { font-size: 14px; }

/* ── Tool groups ────────────────────────────────────────────────── */
.tool-groups {
  display: grid;
  gap: 28px;
  margin-bottom: 22px;
}
.tool-group-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* SSH section: 2-up card layout on wider screens */
.card-grid.two-up {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ── Recommended models block ───────────────────────────────────── */
.model-rec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  margin-top: 22px;
}
.model-rec h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}
.model-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 14px 0 8px;
}
.model-list li {
  font-size: 14px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}
.model-list code {
  font-family: var(--font-mono);
  margin-right: 4px;
}

/* ── Reveal-on-scroll polish ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
