/* ==========================================================================
   HestiaRE – site styles. No framework, no build step.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #fbfbf8;
  --surface: #f2f3ee;
  --surface-2: #e8ebe4;
  --line: #dde1d9;
  --line-strong: #c4cac0;
  --fg: #131a15;
  --fg-muted: #48524b;
  --fg-faint: #78827b;

  --accent: #1f5c3a;          /* dark green */
  --accent-strong: #143f27;
  --accent-text: #1f5c3a;     /* accent used as text colour */
  --accent-soft: #e3ede6;
  --accent-line: #b9d0c0;
  --on-accent: #ffffff;

  --rm: #a23e2f;
  --rm-soft: #f8ece9;
  --rm-line: #e3c3bc;

  /* terminal / dark surfaces – the same in both schemes */
  --term-bg: #0f1511;
  --term-surface: #161e19;
  --term-line: #26302a;
  --term-fg: #dfe6e1;
  --term-faint: #7c877f;
  --term-add: #8fd0a2;
  --term-rm: #e2a094;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-s: 4px;
  --radius: 8px;
  --radius-l: 14px;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 10vw, 128px);
  --header-h: 64px;

  --shadow: 0 1px 2px rgb(19 26 21 / .04), 0 8px 24px -8px rgb(19 26 21 / .10);
  --shadow-l: 0 2px 4px rgb(19 26 21 / .04), 0 24px 60px -20px rgb(19 26 21 / .28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d110f;
    --surface: #141a16;
    --surface-2: #1a221d;
    --line: #253029;
    --line-strong: #344038;
    --fg: #e6ebe7;
    --fg-muted: #a8b2ab;
    --fg-faint: #758078;

    --accent: #2b7a4e;
    --accent-strong: #33915c;
    --accent-text: #74c494;
    --accent-soft: #15241b;
    --accent-line: #24412f;
    --on-accent: #ffffff;

    --rm: #e2a094;
    --rm-soft: #241614;
    --rm-line: #4a2b25;

    --term-bg: #090c0a;
    --term-surface: #101511;

    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
    --shadow-l: 0 2px 4px rgb(0 0 0 / .3), 0 24px 60px -20px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
    --bg: #0d110f;
    --surface: #141a16;
    --surface-2: #1a221d;
    --line: #253029;
    --line-strong: #344038;
    --fg: #e6ebe7;
    --fg-muted: #a8b2ab;
    --fg-faint: #758078;

    --accent: #2b7a4e;
    --accent-strong: #33915c;
    --accent-text: #74c494;
    --accent-soft: #15241b;
    --accent-line: #24412f;
    --on-accent: #ffffff;

    --rm: #e2a094;
    --rm-soft: #241614;
    --rm-line: #4a2b25;

    --term-bg: #090c0a;
    --term-surface: #101511;

    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
    --shadow-l: 0 2px 4px rgb(0 0 0 / .3), 0 24px 60px -20px rgb(0 0 0 / .7);
  }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(16px, 0.25vw + 15.2px, 17.5px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--fg);
  text-wrap: balance;
}
h2 { font-size: clamp(1.85rem, 3.6vw + .6rem, 3rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-strong); }

code {
  font-family: var(--font-mono);
  font-size: .88em;
  padding: .1em .38em;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--fg);
  white-space: nowrap;
}

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

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

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

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

.sprite { position: absolute; }

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-s);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { width: 1.05em; height: 1.05em; flex: none; }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}
.brand:hover { color: var(--fg); }
.brand-mark { width: 30px; height: 30px; }
.mark-body { fill: currentColor; }
.mark-spark { stroke: var(--accent-text); }
.brand-name {
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}
.brand-re { color: var(--accent-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 .95rem/1.2 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--fg); border-color: var(--fg-faint); background: var(--surface); }
.btn-outline { color: var(--fg); border-color: var(--line-strong); background: transparent; }
.btn-outline:hover { color: var(--fg); border-color: var(--fg-faint); }
.btn-small { min-height: 38px; padding: 7px 14px; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  color: var(--fg-muted);
  font-size: .93rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}
.site-nav ul a:hover { color: var(--fg); background: var(--surface); }
.site-nav ul a[aria-current="true"] { color: var(--accent-text); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  cursor: pointer;
  border-radius: var(--radius-s);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 12px;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, top .2s ease, opacity .2s ease;
}
.nav-toggle-bars { top: 21px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 879px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-l);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    padding: 14px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .site-nav ul a:hover { background: none; }
  .nav-cta { align-self: flex-start; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 120px) 0 var(--section-y);
  overflow: hidden;
}
.hero::before {
  /* faint grid, fades out towards the bottom */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 20%, #000 10%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg-muted);
  font: 500 .78rem/1.3 var(--font-mono);
  letter-spacing: .02em;
}
.pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-text);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: none;
}

.hero-title {
  font-size: clamp(2.6rem, 6.4vw + .4rem, 5.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 24px;
}
.r-star {
  display: inline-block;
  color: var(--accent-text);
  transition: opacity .18s ease, transform .18s ease;
}
.r-star.is-swapping { opacity: 0; transform: translateY(.12em); }
.r-star-ast {
  display: inline-block;
  font-size: .62em;
  vertical-align: .62em;
  margin-left: .02em;
}

.hero-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 22px;
}
.hero-pick-label {
  color: var(--fg-faint);
  font: 500 .85rem var(--font-mono);
  margin-right: 4px;
}
.r-chip {
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font: 500 .95rem/1.4 var(--font-sans);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.r-chip:hover { border-color: var(--accent-text); color: var(--accent-text); }
.r-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.lead {
  max-width: 54ch;
  margin-bottom: 0;
  color: var(--fg-muted);
  font-size: clamp(1.08rem, .5vw + .95rem, 1.25rem);
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
@media (max-width: 479px) {
  .cta-row .btn { flex: 1 1 100%; }
}

/* terminal card */
.hero-card {
  margin: 0;
  background: var(--term-bg);
  color: var(--term-fg);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(.78rem, .3vw + .7rem, .88rem);
  border: 1px solid var(--term-line);
}
.term-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--term-surface);
  border-bottom: 1px solid var(--term-line);
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--term-line); }
.term-title { color: var(--term-faint); font-size: .85em; }
.term-body { padding: 20px 20px 22px; }
.term-line { margin: 0 0 14px; overflow-wrap: anywhere; }
.term-prompt { color: var(--term-add); margin-right: .5ch; user-select: none; }
.term-summary { color: var(--term-faint); margin-top: 16px; }
.t-add { color: var(--term-add); }
.t-rm { color: var(--term-rm); }
.term-cursor {
  display: inline-block;
  width: .6em; height: 1.1em;
  vertical-align: -.2em;
  background: var(--term-fg);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--term-line);
}
.stat-row + .stat-row { border-bottom: 1px dashed var(--term-line); }
.stat-name { color: var(--term-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-count { color: var(--term-faint); text-align: right; }
.stat-bar {
  grid-column: 1 / -1;
  height: 8px;
  width: calc(var(--n) / 13 * 100%);
  border-radius: 2px;
  background-image: repeating-linear-gradient(90deg, currentColor 0 calc(100% / var(--n) - 3px), transparent 0 calc(100% / var(--n)));
  transform-origin: left;
  animation: grow .9s cubic-bezier(.2,.7,.2,1) .3s both;
}
.stat-rm { color: var(--term-rm); }
.stat-add { color: var(--term-add); }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Sections ---------- */
.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}
.section-tint { background: var(--surface); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent-text);
  font: 500 .78rem/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: currentColor;
  flex: none;
}

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { margin-bottom: 20px; }
.section-intro { color: var(--fg-muted); font-size: 1.08em; max-width: 64ch; }

.prose p { color: var(--fg-muted); max-width: 66ch; }

/* two-column: sticky heading left, text right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 64px;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split-head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}

/* philosophy */
.facts {
  list-style: none;
  margin: 28px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: .95rem;
  line-height: 1.35;
}
.facts-x {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--rm-soft);
  color: var(--rm);
  font-size: .9rem;
  line-height: 1;
}

.pullquote {
  margin: 40px 0 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
}
.pullquote p {
  margin: 0;
  max-width: 24ch;
  color: var(--fg);
  font-size: clamp(1.45rem, 2vw + .8rem, 2rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ---------- Diff ---------- */
.diff {
  background: var(--term-bg);
  color: var(--term-fg);
  border: 1px solid var(--term-line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .9rem;
}
.diff-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 12px 12px 12px 20px;
  background: var(--term-surface);
  border-bottom: 1px solid var(--term-line);
}
.diff-path { color: var(--term-faint); font-size: .85rem; }
.diff-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.diff-tab {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: none;
  color: var(--term-faint);
  font: 500 .8rem/1.3 var(--font-mono);
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.diff-tab span { opacity: .6; margin-left: 4px; }
.diff-tab:hover { color: var(--term-fg); }
.diff-tab[aria-pressed="true"] { background: var(--term-line); color: var(--term-fg); }

.diff-list { list-style: none; margin: 0; padding: 8px 0; }
.diff-list + .diff-list { border-top: 1px solid var(--term-line); }

.diff-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 2px 12px;
  padding: 9px 20px 9px 17px;
  border-left: 3px solid transparent;
  line-height: 1.5;
}
.diff-line.rm { border-left-color: #6a3a31; background: rgb(226 160 148 / .045); }
.diff-line.add { border-left-color: #2f5c3e; background: rgb(143 208 162 / .045); }
.diff-mark { user-select: none; font-weight: 600; }
.rm .diff-mark, .rm .diff-text { color: var(--term-rm); }
.add .diff-mark, .add .diff-text { color: var(--term-add); }
.diff-note {
  grid-column: 2;
  color: var(--term-faint);
  font-family: var(--font-sans);
  font-size: .85rem;
}
@media (min-width: 760px) {
  .diff-line { grid-template-columns: 20px minmax(0, 1fr) minmax(0, .8fr); }
  .diff-note { grid-column: auto; text-align: right; }
}

.diff[data-show="rm"] .diff-list:has(.add),
.diff[data-show="add"] .diff-list:has(.rm) { display: none; }
.diff[data-show="rm"] .diff-list + .diff-list,
.diff[data-show="add"] .diff-list + .diff-list { border-top: 0; }

/* ---------- Dependencies ---------- */
.repo-grid {
  list-style: none;
  margin: 0 0 clamp(40px, 6vw, 64px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}
.repo-card {
  position: relative;
  padding: 24px 24px 26px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.repo-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.repo-index {
  display: block;
  margin-bottom: 28px;
  color: var(--fg-faint);
  font: 500 .8rem var(--font-mono);
}
.repo-name { font-size: 1.35rem; margin-bottom: 10px; }
.repo-card p { margin: 0; color: var(--fg-muted); font-size: .97rem; }
.repo-when {
  display: block;
  margin-bottom: 2px;
  color: var(--accent-text);
  font: 500 .75rem var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.repo-card-zero {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.repo-card-zero:hover { border-color: var(--accent); }
.repo-card-zero .repo-index,
.repo-card-zero p { color: rgb(255 255 255 / .78); }
.repo-card-zero .repo-name { color: var(--on-accent); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 32px 40px;
}
.feature {
  padding-top: 20px;
  border-top: 2px solid var(--fg);
}
.feature h3 { margin-bottom: 10px; }
.feature p { margin: 0; color: var(--fg-muted); font-size: .97rem; }

/* ---------- Releases ---------- */
.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 0 0 32px 60px;
}
.step::before {
  /* connector line */
  content: "";
  position: absolute;
  left: 19px; top: 40px; bottom: 0;
  width: 2px;
  background: var(--accent-line);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step-num {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 .95rem var(--font-mono);
}
.step-title { margin: 8px 0 8px; font-size: 1.1rem; }
.step-title code { font-size: .95em; background: var(--bg); border: 1px solid var(--line); }
.step p { margin: 0; color: var(--fg-muted); font-size: .97rem; max-width: 52ch; }

@media (min-width: 900px) {
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .step { padding: 64px 0 0; }
  .step::before { left: 48px; right: -20px; top: 19px; bottom: auto; width: auto; height: 2px; }
  .step:last-child::before { display: none; }
  .step-title { margin-top: 0; }
}

.note {
  margin-top: clamp(40px, 5vw, 56px);
  padding: 22px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-l);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 24px;
}
@media (min-width: 700px) { .note { grid-template-columns: 120px minmax(0, 1fr); } }
.note-label {
  margin: 0;
  color: var(--accent-text);
  font: 500 .78rem/1.9 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.note p:not(.note-label) { margin: 0; color: var(--fg-muted); }

/* ---------- Status ---------- */
.os-grid {
  list-style: none;
  margin: 0 0 clamp(40px, 5vw, 56px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 900px) { .os-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.os-card {
  display: flex;
  flex-direction: column;
  padding: 20px clamp(16px, 2vw, 24px) 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.os-family { color: var(--fg-muted); font-weight: 500; font-size: .95rem; }
.os-version {
  margin: 2px 0 4px;
  font-size: clamp(2rem, 3vw + .8rem, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.os-code { color: var(--fg-faint); font: 400 .85rem var(--font-mono); }
.os-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 500 .75rem/1.5 var(--font-mono);
}
.os-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px 56px;
  align-items: start;
}
@media (min-width: 900px) { .status-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.chips {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font: 500 .82rem/1.4 var(--font-mono);
}
.chips li::before {
  content: "";
  width: 7px; height: 4px;
  margin-top: -3px;
  border-left: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg);
}

.callout {
  padding: 22px 24px;
  background: var(--rm-soft);
  border: 1px solid var(--rm-line);
  border-radius: var(--radius-l);
}
.callout p { color: var(--fg); font-size: .97rem; }
.callout-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rm) !important;
  font: 500 .78rem/1.3 var(--font-mono) !important;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.callout-label::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--rm);
  color: var(--rm-soft);
  font-weight: 600;
  letter-spacing: 0;
}

/* ---------- Development (dark band) ---------- */
.section-dark {
  background: var(--term-bg);
  color: var(--term-fg);
  border-top-color: var(--term-line);
}
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: var(--term-add); }
.section-dark p { color: #b4beb7; max-width: 62ch; }
.section-dark code { background: var(--term-line); color: var(--term-fg); }

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 36px;
}
.flow-node {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--term-line);
  border-radius: var(--radius);
  background: var(--term-surface);
}
.flow-node-human { border-color: var(--term-add); box-shadow: inset 0 0 0 1px var(--term-add); }
.flow-role { color: var(--term-faint); font: 500 .75rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.flow-verb { color: #fff; font-size: 1.15rem; font-weight: 600; }
.flow-verb code { font-size: .9em; padding: 0; background: none; }
.flow-arrow { align-self: center; color: var(--term-faint); font-family: var(--font-mono); }
@media (max-width: 559px) {
  .flow { flex-direction: column; }
  .flow-node { flex: none; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-note { margin: 0; color: var(--fg-faint); font: 400 .85rem var(--font-mono); }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font: 400 .88rem var(--font-mono);
}
.footer-links a { color: var(--fg-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-text); text-decoration: underline; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .hero::before, .cta-row, .diff-filter, .term-cursor { display: none !important; }
  .section, .hero { padding: 24px 0; }
  .section-dark, .hero-card, .diff { background: #fff; color: #000; box-shadow: none; }
}

/* ---------- Small-screen refinements ---------- */
@media (max-width: 479px) {
  .pill { font-size: .7rem; letter-spacing: 0; padding-inline: 10px 12px; }
  .hero-pick-label { flex-basis: 100%; }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--fg-faint); }
.theme-toggle .icon { width: 19px; height: 19px; grid-area: 1 / 1; }
/* show the icon of the scheme you'd switch TO */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.header-inner { justify-content: flex-start; }
.brand { margin-right: auto; }
@media (min-width: 880px) {
  .site-nav { order: 1; }
  .theme-toggle { order: 2; }
}
@media (max-width: 879px) {
  .theme-toggle { margin-right: 4px; }
}
.mark-accent { fill: var(--accent-text); }

/* headings that should stay on one line wherever there is room */
@media (min-width: 900px) {
  .section-head:has(.h-oneline) { max-width: none; }
  .h-oneline { white-space: nowrap; }
}
