:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10110f;
  --bg-elev: #181a16;
  --bg-soft: #1f221c;
  --line: #2c3128;
  --text: #eceee6;
  --muted: #9aa392;
  --dim: #6f7668;
  --accent: #c4f04d;
  --accent-ink: #1a2208;
  --ok: #7dce7a;
  --bad: #e36b5c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 14px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --glow: rgba(196, 240, 77, 0.08);
  --brand-ring: rgba(196, 240, 77, 0.12);
  --card-hover: #3d4634;
  --focus-ring: rgba(196, 240, 77, 0.35);
  --focus-border: #5d6b38;
  --primary-border: #d6f57a;
  --code: #d5d8cc;
  --modal-scrim: rgba(8, 9, 7, 0.82);
  --header-bg: rgba(16, 17, 15, 0.82);
  --frame-bar: #141612;
  --them-line: #3a3228;
  --us-line: #3a4a22;
  --step-num: #c4f04d;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4ee;
  --bg-elev: #fcfdf8;
  --bg-soft: #eaecdf;
  --line: #d4d8ca;
  --text: #1b1e16;
  --muted: #5a6152;
  --dim: #7a8170;
  --accent: #c4f04d;
  --accent-ink: #1a2208;
  --ok: #2f8a3a;
  --bad: #c2473b;
  --shadow: 0 18px 40px rgba(28, 32, 18, 0.08);
  --glow: rgba(139, 184, 42, 0.14);
  --brand-ring: rgba(139, 184, 42, 0.2);
  --card-hover: #b7c08e;
  --focus-ring: rgba(139, 184, 42, 0.4);
  --focus-border: #8bb82a;
  --primary-border: #9cc93a;
  --code: #3a3f32;
  --modal-scrim: rgba(28, 32, 18, 0.55);
  --header-bg: rgba(243, 244, 238, 0.88);
  --frame-bar: #eceee4;
  --them-line: #e2d4c4;
  --us-line: #c5d48a;
  --step-num: #5a7a18;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 560px at 12% -12%, var(--glow), transparent 52%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 30;
}
.skip:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: 0 0 0 4px var(--brand-ring);
}
.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 0.94rem;
  color: var(--muted);
}
.nav a { text-decoration: none; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--card-hover); }
.theme-toggle:focus-visible,
.btn:focus-visible,
.copy:focus-visible,
.shot:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-theme="dark"] .theme-toggle .icon-moon,
html:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 10px;
}
h1, h2, h3 { margin: 0 0 10px; font-weight: 600; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); line-height: 1.12; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); max-width: 42ch; }
h3 { font-size: 1.05rem; }
.lede { margin: 0; color: var(--muted); max-width: 58ch; font-size: 1.08rem; }

.btn, .btn-small {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-small { padding: 6px 10px; font-size: 0.88rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--primary-border); }
.btn:hover { filter: brightness(1.06); }
html[data-theme="light"] .btn:hover { filter: brightness(0.97); }
html[data-theme="light"] .btn-primary:hover { filter: brightness(1.04); }

.hero { padding: 56px 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 22px; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(125, 206, 122, 0.45);
  flex-shrink: 0;
}
.hero-shot { margin-top: 40px; }

.frame {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow), 0 0 0 1px rgba(196, 240, 77, 0.04);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--frame-bar);
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.78rem;
  font-style: normal;
}
.frame-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.frame-bar em { margin-left: 8px; font-style: normal; font-family: var(--mono); }

.shot {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  background: transparent;
  cursor: zoom-in;
  display: block;
}
.shot img { width: 100%; }

.section { padding: 72px 0; }
.section h2 { margin-bottom: 22px; }
.section .lede { margin-bottom: 22px; }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
}
.panel p { margin: 0; color: var(--muted); }
.panel h3 { margin-bottom: 8px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.contrast-them { border-color: var(--them-line); }
.contrast-us { border-color: var(--us-line); }
.contrast-us h3 { color: var(--accent-ink); }
html[data-theme="dark"] .contrast-us h3 { color: var(--accent); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td {
  text-align: left;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.compare thead th {
  border-top: 0;
  color: var(--dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 550;
}
.compare tbody th { font-weight: 550; width: 34%; }
.compare td { color: var(--text); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { position: relative; overflow: hidden; }
.feature::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.tour { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tour-card { margin: 0; }
.tour-card .shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.tour-card figcaption { padding: 14px 4px 0; }
.tour-card p { margin: 0; color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--step-num);
  margin-bottom: 10px;
}
.steps p { margin: 0; color: var(--muted); }

.ticks { margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); }
.ticks li {
  position: relative;
  padding: 8px 0 8px 18px;
  border-top: 1px solid var(--line);
}
.ticks li:first-child { border-top: 0; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.install-section { padding-bottom: 88px; }
.terminal {
  margin: 22px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0c0d0b;
  overflow: hidden;
  box-shadow: var(--shadow);
}
html[data-theme="light"] .terminal { background: #1b1e16; }
.terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #2c3128;
  color: #9aa392;
  font-size: 0.8rem;
  font-family: var(--mono);
}
.copy {
  appearance: none;
  border: 1px solid #2c3128;
  background: #1f221c;
  color: #eceee6;
  border-radius: 8px;
  padding: 4px 10px;
  font: inherit;
  cursor: pointer;
}
.copy:hover { filter: brightness(1.08); }
.terminal pre {
  margin: 0;
  padding: 18px 16px 20px;
  overflow-x: auto;
  color: #d5d8cc;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.7;
}
.after-install { color: var(--muted); margin: 0 0 22px; max-width: 70ch; }
.env {
  margin: 12px 0 0;
  padding: 12px;
  overflow-x: auto;
  background: var(--bg);
  border-radius: 10px;
  color: var(--code);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
}
.env-split .panel p { margin-bottom: 10px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.footer-inner p { margin: 10px 0 0; max-width: 52ch; }
.footer-inner a { color: var(--text); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.legal { margin: 0; color: var(--dim); font-size: 0.8rem; max-width: 90ch; }

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--modal-scrim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 20px 28px;
  z-index: 40;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.lightbox-caption { margin: 0; color: var(--muted); text-align: center; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 900px) {
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .tour { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 108px; }
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .header-inner { flex-wrap: wrap; min-height: 56px; gap: 10px 16px; padding: 10px 0; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 14px; overflow-x: auto; }
  .header-actions { margin-left: auto; }
  .hero { padding-top: 28px; }
  .split, .features, .steps, .footer-inner { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .hero-points { flex-direction: column; gap: 8px; }
  h1 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
