/* ==========================================================================
   Tokens. Dark-first; a light palette applies under prefers-color-scheme.
   Terminal surfaces (--term-*) stay dark in both themes.
   ========================================================================== */

/* ==========================================================================
   Fonts. Self-hosted variable fonts (SIL OFL, licences next to the files).
   Per family, a small "core" file with ASCII and the site's punctuation at
   the weights used here (preloaded), then Google Fonts' latin and latin-ext
   files for every other character: a browser downloads only the files a
   page has characters for. The block below is generated by subset-fonts.py.
   The version is in the file names because vendor/fonts/ is cached as
   immutable (_headers): replacing a font means a new name.
   ========================================================================== */

/* fonts:begin (generated by subset-fonts.py) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("vendor/fonts/inter-v20-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("vendor/fonts/inter-v20-latin.woff2") format("woff2");
  unicode-range: U+00A1-00A8, U+00AA-00B6, U+00B8-00D6, U+00D8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-2012, U+2015-2017, U+201A-201B, U+201E-2021, U+2023-2025, U+2027-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("vendor/fonts/inter-v20-core.woff2") format("woff2");
  unicode-range: U+0000-00A0, U+00A9, U+00B7, U+00D7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2191, U+2193;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("vendor/fonts/jetbrains-mono-v24-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("vendor/fonts/jetbrains-mono-v24-latin.woff2") format("woff2");
  unicode-range: U+00A1-00A8, U+00AA-00B6, U+00B8-00D6, U+00D8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-2012, U+2015-2017, U+201A-201B, U+201E-2021, U+2023-2025, U+2027-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("vendor/fonts/jetbrains-mono-v24-core.woff2") format("woff2");
  unicode-range: U+0000-00A0, U+00A9, U+00B7, U+00D7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2191, U+2193;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("vendor/fonts/jetbrains-mono-2.304-symbols.woff2") format("woff2");
  unicode-range: U+2070, U+2074-207A, U+207C, U+2080-2089, U+2102, U+210D, U+2115-2116, U+2119-211A, U+211D, U+2124, U+212E, U+2140, U+218A-218B, U+2190, U+2192, U+2194-2199, U+219D-219E, U+21A0, U+21A2-21A3, U+21A5-21A7, U+21A9-21AA, U+21AD, U+21BE, U+21C9, U+21D0-21D4, U+21DB, U+21DE-21DF, U+21E5, U+21E7-21E8, U+21EA, U+2200-220C, U+220E-2211, U+2213, U+2218-221A, U+221E, U+2223-2225, U+2227-222B, U+2234-2239, U+223C, U+223E, U+2243, U+2245, U+2247-2249, U+224B, U+224D, U+2254, U+2257, U+225F-2265, U+226A-2273, U+227A-227C, U+2282-2289, U+228E-2299, U+229B-22A5, U+22B4, U+22B8, U+22BB-22BD, U+22C2-22C4, U+22C6, U+22C8-22CA, U+22CE, U+22D0, U+22E2, U+22EE-22F1, U+2302-2305, U+2308-230B, U+2318, U+231C-231F, U+2324-2326, U+2328, U+232B, U+2336-237A, U+2389-238B, U+2395, U+239B-23AD, U+23CE, U+23FB-23FE, U+2400-2421, U+2423-2424, U+2500-25A1, U+25AA-25AB, U+25B2-25CC, U+25CE-25CF, U+25D4-25D5, U+25E6-25EB, U+25EF, U+25F6, U+266D, U+266F, U+2687, U+26A0-26A1, U+2713, U+2715, U+2717, U+2736, U+276E-2771, U+2794, U+279C-279E, U+27C5-27C6, U+27DC, U+27E6-27EB, U+27F5-27F7, U+E0A0-E0A2, U+E0B0-E0B3;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("vendor/fonts/space-grotesk-v22-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("vendor/fonts/space-grotesk-v22-latin.woff2") format("woff2");
  unicode-range: U+00A1-00A8, U+00AA-00B6, U+00B8-00D6, U+00D8-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-2012, U+2015-2017, U+201A-201B, U+201E-2021, U+2023-2025, U+2027-206F, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("vendor/fonts/space-grotesk-v22-core.woff2") format("woff2");
  unicode-range: U+0000-00A0, U+00A9, U+00B7, U+00D7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026, U+2191, U+2193;
}
/* fonts:end */

:root {
  color-scheme: dark;

  --bg: #0b0d10;
  --bg-elev: #12151a;
  --bg-soft: #181c22;
  --fg: #e8eaed;
  --fg-muted: #a1a9b3;
  --fg-subtle: #6f7883;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --accent: #34d399;
  --accent-strong: #6ee7b7;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-ink: #04130c;

  --code-bg: rgba(255, 255, 255, 0.07);
  --code-fg: #e8eaed;

  --term-bg: #0f1216;
  --term-bar: #161a20;
  --term-border: rgba(255, 255, 255, 0.09);
  --term-fg: #d7dce2;
  --term-dim: #6f7883;

  --glow: rgba(52, 211, 153, 0.16);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--term-border);

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --section-gap: 7rem;
  --max-width: 1080px;
  --prose-width: 760px;
  --nav-h: 60px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fafafa;
    --bg-elev: #ffffff;
    --bg-soft: #f1f3f5;
    --fg: #0e1116;
    --fg-muted: #4b5563;
    --fg-subtle: #7b8490;
    --border: rgba(15, 17, 22, 0.08);
    --border-strong: rgba(15, 17, 22, 0.16);
    --accent: #059669;
    --accent-strong: #047857;
    --accent-soft: rgba(5, 150, 105, 0.09);
    --accent-ink: #ffffff;
    --code-bg: rgba(15, 17, 22, 0.06);
    --code-fg: #0e1116;
    --glow: rgba(5, 150, 105, 0.12);
    --shadow-lg: 0 24px 50px -24px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 17, 22, 0.1);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

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

html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code, kbd, pre {
  font-family: var(--font-mono);
}

kbd {
  font-size: 0.8em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--fg);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.logo:hover { color: var(--fg); }

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
}

.site-nav .nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav .nav-links a:hover {
  color: var(--fg);
  background: var(--bg-soft);
}

.site-nav .nav-links a.nav-cta {
  margin-left: 0.4rem;
  background: var(--fg);
  color: var(--bg);
}

.site-nav .nav-links a.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 5.5rem 1.5rem 2rem;
  text-align: center;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 900px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
  padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.eyebrow-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 auto 1.5rem;
  text-wrap: balance;
}

.hero h1 .hl {
  background: linear-gradient(100deg, var(--accent) 10%, #5eead4 55%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-color-scheme: light) {
  .hero h1 .hl {
    background-image: linear-gradient(100deg, #047857 10%, #0d9488 55%, #2563eb 100%);
  }
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 680px;
  margin: 0 auto 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero .subtitle-secondary {
  font-size: 1rem;
  color: var(--fg-subtle);
  margin-bottom: 2.75rem;
}

/* --- Install card --- */

.hero .install-tabs {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  background: var(--term-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.install-head {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.6rem;
  background: var(--term-bar);
  border-bottom: 1px solid var(--term-border);
}

.hero .tab-buttons {
  display: flex;
  gap: 0.15rem;
}

.hero .tab-btn {
  background: none;
  border: none;
  color: var(--term-dim);
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.hero .tab-btn:hover {
  color: var(--term-fg);
}

.hero .os-tabs .tab-btn.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.hero .os-group {
  display: none;
}

.hero .os-group.active {
  display: block;
}

.hero .sub-tabs {
  padding: 0.5rem 0.6rem 0;
  gap: 0;
  border-bottom: 1px solid var(--term-border);
}

.hero .sub-tabs .tab-btn {
  border-radius: 0;
  padding: 0.35rem 0.7rem 0.55rem;
  font-size: 0.78rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.hero .sub-tabs .tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

@media (prefers-color-scheme: light) {
  .hero .sub-tabs .tab-btn.active { border-bottom-color: #34d399; }
}

.hero .tab-panel {
  display: none;
  position: relative;
  padding: 1.1rem 4.5rem 1.2rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.75;
  color: var(--term-fg);
  overflow-x: auto;
}

.hero .tab-panel.active {
  display: block;
}

.hero .tab-panel pre {
  margin: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
}

.hero .tab-panel code {
  color: inherit;
  background: none;
  padding: 0;
  font-size: inherit;
}

.copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--term-border);
  color: var(--term-dim);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.copy-btn.copied {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.35);
}

/* --- Buttons --- */

.cta-links {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cta-links a {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.cta-links a.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px var(--accent);
}

.cta-links a.primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.cta-links a.secondary {
  color: var(--fg);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
}

.cta-links a.secondary:hover {
  border-color: var(--fg-subtle);
  background: var(--bg-soft);
}

.hero-cast {
  max-width: 1040px;
  margin: 4.5rem auto 0;
  text-align: left;
}

.hero-cast .cast-frame {
  box-shadow: 0 40px 120px -30px var(--glow), var(--shadow-lg);
}

/* ==========================================================================
   Pillars
   ========================================================================== */

.pillars {
  max-width: var(--max-width);
  margin: 5rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.pillar {
  display: block;
  padding: 1.4rem 1.3rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--fg);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.pillar:hover {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-2px);
}

.pillar-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.pillar-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.pillar p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--fg-muted);
}

.pillar code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--code-fg);
}

/* ==========================================================================
   Feature sections
   ========================================================================== */

.features {
  padding: var(--section-gap) 1.5rem 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 4rem;
  margin-bottom: var(--section-gap);
}

.feature:last-child {
  margin-bottom: 0;
}

.feature > .cast-frame {
  grid-column: 1 / -1;
  width: 100%;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow span {
  color: var(--fg-subtle);
}

.eyebrow span::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-left: 0.6rem;
  vertical-align: middle;
  background: var(--border-strong);
}

.feature h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.feature-body {
  padding-top: 2rem;
}

.feature p {
  color: var(--fg-muted);
  font-size: 1.02rem;
  margin-bottom: 1rem;
}

.feature strong {
  color: var(--fg);
  font-weight: 600;
}

.feature code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  font-size: 0.85em;
}

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

/* ==========================================================================
   Closing CTA
   ========================================================================== */

.closing {
  position: relative;
  max-width: var(--max-width);
  margin: var(--section-gap) auto 0;
  padding: 4.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 50% 70% at 50% 100%, var(--glow), transparent 70%);
}

.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.closing p {
  margin-top: 0.9rem;
  color: var(--fg-muted);
  font-size: 1.1rem;
  text-wrap: balance;
}

.closing .cta-links {
  margin-top: 1.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  color: var(--fg-subtle);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.footer-inner .logo {
  font-size: 1rem;
}

.site-footer a {
  color: var(--fg-muted);
}

.site-footer a:hover {
  color: var(--fg);
}

.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.site-footer p {
  margin-left: auto;
}

/* ==========================================================================
   Docs page
   ========================================================================== */

.docs-container {
  display: flex;
  max-width: 1320px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
  gap: 4rem;
  position: relative;
}

.docs-toc {
  flex: 0 0 250px;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-h) - 3rem);
  overflow-y: auto;
  padding: 0.25rem 0.5rem 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.docs-toc::before {
  content: "On this page";
  display: block;
  margin: 0 0 0.75rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.docs-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

.docs-toc .toc-item {
  margin: 0;
}

.docs-toc .toc-item-nested a {
  padding-left: 1.6rem;
  font-size: 0.82rem;
}

.docs-toc a {
  display: block;
  margin-left: -1px;
  padding: 0.32rem 0.85rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--fg-muted);
  border-left: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.docs-toc a:hover {
  color: var(--fg);
  border-left-color: var(--fg-subtle);
}

.docs-toc a.active {
  color: var(--accent);
  font-weight: 500;
  border-left-color: var(--accent);
}

.docs-content {
  flex: 1;
  min-width: 0;
  max-width: var(--prose-width);
  font-size: 1rem;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.docs-content h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.docs-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 4rem;
  margin-bottom: 1.1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.docs-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.docs-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.docs-content p {
  margin-bottom: 1.1rem;
  color: color-mix(in srgb, var(--fg) 88%, var(--bg));
}

.docs-content strong {
  color: var(--fg);
  font-weight: 600;
}

.docs-content a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}

.docs-content a:hover {
  text-decoration-color: currentColor;
}

.docs-content ul, .docs-content ol {
  margin-bottom: 1.1rem;
  padding-left: 1.4rem;
}

.docs-content li {
  margin-bottom: 0.4rem;
}

.docs-content li::marker {
  color: var(--fg-subtle);
}

.docs-content pre {
  background: var(--term-bg);
  color: var(--term-fg);
  padding: 1.1rem 1.35rem;
  border: 1px solid var(--term-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.docs-content code {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  font-size: 0.85em;
}

.docs-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.docs-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.docs-content th, .docs-content td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-content tr:last-child td {
  border-bottom: none;
}

.docs-content th {
  background: var(--bg-soft);
  font-weight: 600;
  white-space: nowrap;
}

.docs-content blockquote {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--fg);
}

.docs-content blockquote p:last-child {
  margin-bottom: 0;
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.docs-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

/* --- Docs tabs (platform-specific sections) --- */

.docs-tabs {
  margin: 1.5rem 0;
}

.docs-tabs .tab-buttons {
  display: inline-flex;
  gap: 0.15rem;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 100%;
}

.docs-tabs .tab-btn {
  background: none;
  border: none;
  color: var(--fg-muted);
  padding: 0.4rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 500;
  font-family: var(--font-body);
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.docs-tabs .tab-btn:hover {
  color: var(--fg);
}

.docs-tabs .tab-btn.active {
  color: var(--fg);
  background: var(--bg-elev);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--border);
}

.docs-tabs .tab-panel {
  display: none;
  padding: 1rem 0 0;
}

.docs-tabs .tab-panel.active {
  display: block;
}

/* ==========================================================================
   Terminal frames (animated casts and static snippets)
   ========================================================================== */

/* Custom asciinema theme, calm to sit in the page: the recordings' prompts and
   TUIs use ANSI colours, so cyan, blue and magenta become greys and slate, green
   is the site's accent, and red and amber are muted. The player draws bold text
   in the bright variant (colour + 8), so 9-14 repeat 1-6: bold stays a weight,
   not a neon colour. Colours a program sets as 24-bit RGB are not remapped. */
.asciinema-player-theme-isx {
  --term-font-family: var(--font-mono);
  --term-color-foreground: #d7dce2;
  --term-color-background: #0f1216;
  --term-color-0: #0f1216;
  --term-color-1: #e06c75;
  --term-color-2: #34d399;
  --term-color-3: #d9b56a;
  --term-color-4: #8b98a8;
  --term-color-5: #a79fb8;
  --term-color-6: #b8c0ca;
  --term-color-7: #d7dce2;
  --term-color-8: #6f7883;
  --term-color-9: #e06c75;
  --term-color-10: #34d399;
  --term-color-11: #d9b56a;
  --term-color-12: #8b98a8;
  --term-color-13: #a79fb8;
  --term-color-14: #b8c0ca;
  --term-color-15: #eef0f2;
}

.asciinema-player-theme-isx .ap-term-text .ap-bright {
  font-weight: 600;
}

.cast-frame {
  margin: 2.5rem auto 0;
  border-radius: var(--radius);
  background: var(--term-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cast-title {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--term-dim);
  background: var(--term-bar);
  padding: 0.6rem 1rem 0.6rem 4.5rem;
  border-bottom: 1px solid var(--term-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-title::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
  opacity: 0.85;
}

.castbox {
  position: relative;
  background: var(--term-bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.castbox .ap-wrapper,
.castbox .ap-player {
  border-radius: 0;
}

.castbox .endcard {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 13, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
  z-index: 5;
}

.castbox .endcard span {
  background: var(--term-bar);
  border: 1px solid var(--term-border);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  color: #e6e8eb;
  font-size: 0.9rem;
  font-weight: 500;
}

.castbox .endcard:hover span {
  border-color: rgba(110, 231, 183, 0.5);
}

.castbox.done .endcard { display: flex; }

.feature .cast-frame + .cast-frame { margin-top: 1.25rem; }

/* Wider than a phone, every terminal frame, recorded or static, is as wide as an
   80-column terminal at 0.84rem (the static snippets' size) plus the player's 0.75em
   border, in the terminal font. The player fits the recording to that width, which
   draws it at exactly 0.84rem, and stacked frames line up. On a phone the frames
   take the screen width and the recording scales down with them. */
@media (min-width: 721px) {
  .cast-frame,
  .feature > .cast-frame {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    width: calc(80ch + 1.5em);
    max-width: 100%;
  }
}

/* Static terminal snippets (branch tree, git commands): same frame chrome and
   dark terminal look as the animated casts, contained so they scroll within the
   frame on small screens instead of breaking the page layout. */
.term-static {
  background: var(--term-bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.feature .term-static pre {
  background: none;
  color: var(--term-fg);
  margin: 0;
  padding: 1.1rem 1.35rem;
  border-radius: 0;
  overflow: visible;
  font-size: 0.84rem;
  line-height: 1.65;
}

.feature .term-static code { background: none; color: inherit; padding: 0; font-size: inherit; }
.term-static .t-dim { color: var(--term-dim); }
.term-static .t-hi { color: #fff; font-weight: 500; }
.term-static .t-ok { color: #6ee7b7; }
.term-static .t-prompt { color: #6ee7b7; user-select: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .docs-toc {
    display: none;
  }

  .docs-content {
    margin: 0 auto;
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature-body {
    padding-top: 1.25rem;
  }

  .site-footer p {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --section-gap: 4.5rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero .subtitle {
    font-size: 1.02rem;
  }

  .hero-cast {
    margin-top: 3rem;
  }

  .pillars {
    grid-template-columns: 1fr;
    margin-top: 3.5rem;
  }

  .site-nav .nav-links a.nav-gh svg {
    display: none;
  }

  .site-nav .nav-links a.nav-cta {
    display: none;
  }

  .hero .sub-tabs,
  .docs-tabs .tab-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hero .sub-tabs .tab-btn,
  .docs-tabs .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .docs-content h1 {
    font-size: 2.1rem;
  }

  .docs-content h2 {
    font-size: 1.45rem;
  }
}
