/* ============================================================================
   grove — grove.shivgodhia.com
   A dappled-forest identity for a git-worktree manager.
   ========================================================================== */

/* ----- Fonts (self-hosted, variable) ------------------------------------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ----- Tokens ------------------------------------------------------------ */
:root {
  /* Dappled-forest palette */
  --canopy: #16281c;   /* deepest pine */
  --pine: #1f3d2b;     /* deep pine */
  --moss: #5b8c51;     /* primary leaf-green accent */
  --moss-bright: #6fa860;
  --sap: #c7d98c;      /* sunlight-through-leaves highlight */
  --bark: #8a6a52;     /* warm brown, secondary material */
  --bark-deep: #6b4e3d;
  --parchment: #f4efe2;/* warm cream */
  --parchment-soft: #ece5d3;
  --soil: #2a2019;     /* warm near-black ink */

  /* Semantic tokens — LIGHT theme (default) */
  --bg: var(--parchment);
  --bg-veil: #faf7ee;
  --surface: #fbf8f0;
  --surface-2: #f1ead9;
  --surface-sunken: #ece4d1;
  --ink: var(--soil);
  --ink-soft: #5c5142;
  --ink-faint: #8a7c66;
  --rule: #ddd2ba;
  --rule-soft: #e7ddc8;
  --accent: #40693a;         /* moss, darkened for contrast on parchment */
  --accent-ink: #2f5230;
  --accent-bright: var(--moss);
  --wood: var(--bark-deep);
  --glow: rgba(91, 140, 81, 0.14);

  /* Terminal surface — light by default (page is light), dark overrides in dark theme */
  --term-bg: #efe8d6;
  --term-bg-2: #e7dfca;
  --term-ink: #3a3226;
  --term-ink-dim: #857a64;
  --term-rule: rgba(64, 105, 58, 0.16);
  --term-prompt: #3f6a37;
  --term-path: #8a5c33;
  --term-branch: #305d8c;
  --term-leaf: #3d6a34;
  --term-barbg: rgba(42, 32, 25, 0.06);

  --shadow-sm: 0 1px 2px rgba(42, 32, 25, 0.06), 0 2px 8px rgba(42, 32, 25, 0.05);
  --shadow-md: 0 4px 14px rgba(42, 32, 25, 0.08), 0 10px 40px rgba(42, 32, 25, 0.07);
  --shadow-lg: 0 10px 30px rgba(22, 40, 28, 0.14), 0 30px 80px rgba(22, 40, 28, 0.1);

  --maxw: 1120px;
  --readw: 62ch;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.36rem + 0.7vw, 2rem);
  --step-3: clamp(2rem, 1.7rem + 1.5vw, 3.1rem);
  --step-4: clamp(2.8rem, 2.1rem + 3.6vw, 5.4rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--canopy);
    --bg-veil: #182a1e;
    --surface: #1d3324;
    --surface-2: #223b29;
    --surface-sunken: #152219;
    --ink: #ecefe1;
    --ink-soft: #bfcbb0;
    --ink-faint: #8ba07d;
    --rule: rgba(199, 217, 140, 0.14);
    --rule-soft: rgba(199, 217, 140, 0.08);
    --accent: var(--sap);
    --accent-ink: var(--sap);
    --accent-bright: var(--sap);
    --wood: #c69a76;
    --glow: rgba(199, 217, 140, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.46);
    /* Dark terminal palette */
    --term-bg: #16241a; --term-bg-2: #1c2e21; --term-ink: #e7ecd9; --term-ink-dim: #9db08f;
    --term-rule: rgba(199,217,140,.16); --term-prompt: #9ecb7f; --term-path: #d9b48a;
    --term-branch: #9db8e0; --term-leaf: #c7d98c; --term-barbg: rgba(0,0,0,.22);
  }
}

/* Explicit theme overrides win over the media query in both directions */
:root[data-theme="light"] {
  --bg: var(--parchment); --bg-veil: #faf7ee; --surface: #fbf8f0;
  --surface-2: #f1ead9; --surface-sunken: #ece4d1;
  --ink: var(--soil); --ink-soft: #5c5142; --ink-faint: #8a7c66;
  --rule: #ddd2ba; --rule-soft: #e7ddc8;
  --accent: #40693a; --accent-ink: #2f5230; --accent-bright: var(--moss);
  --wood: var(--bark-deep); --glow: rgba(91, 140, 81, 0.14);
  --shadow-sm: 0 1px 2px rgba(42,32,25,.06), 0 2px 8px rgba(42,32,25,.05);
  --shadow-md: 0 4px 14px rgba(42,32,25,.08), 0 10px 40px rgba(42,32,25,.07);
  --shadow-lg: 0 10px 30px rgba(22,40,28,.14), 0 30px 80px rgba(22,40,28,.1);
}
:root[data-theme="dark"] {
  --bg: var(--canopy); --bg-veil: #182a1e; --surface: #1d3324;
  --surface-2: #223b29; --surface-sunken: #152219;
  --ink: #ecefe1; --ink-soft: #bfcbb0; --ink-faint: #8ba07d;
  --rule: rgba(199,217,140,.14); --rule-soft: rgba(199,217,140,.08);
  --accent: var(--sap); --accent-ink: var(--sap); --accent-bright: var(--sap);
  --wood: #c69a76; --glow: rgba(199,217,140,.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.34);
  --shadow-lg: 0 18px 50px rgba(0,0,0,.46);
  /* Dark terminal palette */
  --term-bg: #16241a; --term-bg-2: #1c2e21; --term-ink: #e7ecd9; --term-ink-dim: #9db08f;
  --term-rule: rgba(199,217,140,.16); --term-prompt: #9ecb7f; --term-path: #d9b48a;
  --term-branch: #9db8e0; --term-leaf: #c7d98c; --term-barbg: rgba(0,0,0,.22);
}

/* ----- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; }
a { color: var(--accent); text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code, kbd, pre, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
:focus-visible { outline: 2.5px solid var(--accent-bright); outline-offset: 3px; border-radius: 3px; }
img, canvas { max-width: 100%; display: block; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 54ch; font-weight: 380; }

/* ----- Header ------------------------------------------------------------ */
.masthead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  backdrop-filter: blur(10px) saturate(1.2);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.masthead.scrolled { border-bottom-color: var(--rule); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; width: min(100% - 2.5rem, var(--maxw)); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.32rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.masthead nav { display: flex; align-items: center; gap: 1.4rem; }
.masthead nav a { font-size: 0.95rem; color: var(--ink-soft); text-decoration: none; font-weight: 480; }
.masthead nav a:hover { color: var(--accent); }
.nav-link-mono { font-family: "JetBrains Mono", monospace; font-size: 0.86rem !important; }
.theme-toggle {
  appearance: none; border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink-soft); width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; flex: none;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
@media (max-width: 680px) { .nav-hide { display: none; } }

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: "Inter", sans-serif; font-weight: 560; font-size: 0.98rem;
  padding: 0.72rem 1.3rem; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.18s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--parchment); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .btn-primary, .btn-primary { color: #fff; }
:root[data-theme="dark"] .btn-primary { color: var(--canopy); }
@media (prefers-color-scheme: dark) { .btn-primary { color: var(--canopy); } }
:root[data-theme="light"] .btn-primary { color: #fbf8f0; }
.btn-primary:hover { background: var(--accent-ink); box-shadow: var(--shadow-md); }
:root[data-theme="dark"] .btn-primary:hover { background: var(--moss-bright); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary:hover { background: var(--moss-bright); } }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ----- Hero -------------------------------------------------------------- */
.hero { position: relative; padding: clamp(3rem, 8vh, 7rem) 0 clamp(3.5rem, 7vh, 6rem); overflow: hidden; }
#grove-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; pointer-events: none; }
.hero-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 78% 8%, var(--glow), transparent 55%); }
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; } }

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.hero h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.03em; }
.leaf-word { color: var(--accent); font-style: italic; }
.hero h1 .leaf-word { font-weight: 500; }
.hero .tagline { font-size: var(--step-1); color: var(--ink-soft); max-width: 34ch; line-height: 1.5; font-weight: 380; }
.hero .tagline b { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 0.6rem; font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--ink-faint); }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }

/* ----- Terminal ---------------------------------------------------------- */
.terminal {
  background: linear-gradient(180deg, var(--term-bg-2), var(--term-bg));
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--term-rule);
  overflow: hidden; font-family: "JetBrains Mono", monospace;
  color: var(--term-ink);
}
.terminal.hero-term { transform: perspective(1400px) rotateY(-4deg) rotateX(1.5deg); transition: transform 0.5s var(--ease); }
.terminal.hero-term:hover { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }
@media (max-width: 900px) { .terminal.hero-term { transform: none; } .terminal.hero-term:hover { transform: none; } }
.term-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 0.9rem; background: var(--term-barbg); border-bottom: 1px solid var(--term-rule); }
.term-bar .lights { display: flex; gap: 0.42rem; }
.term-bar .lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.term-bar .lights i:nth-child(1) { background: #e06c5b; }
.term-bar .lights i:nth-child(2) { background: #e0b45b; }
.term-bar .lights i:nth-child(3) { background: #7fbf6b; }
.term-bar .title { font-size: 0.76rem; color: var(--term-ink-dim); margin-left: 0.4rem; letter-spacing: 0.02em; }
.term-body { padding: 1.15rem 1.25rem 1.4rem; font-size: 0.86rem; line-height: 1.75; overflow-x: auto; }
.term-body .row { white-space: pre; }
.term-prompt { color: var(--term-prompt); }
.term-path { color: var(--term-path); }
.term-cmd { color: var(--term-ink); }
.term-dim { color: var(--term-ink-dim); }
.term-leaf { color: var(--term-leaf); }
.term-branch { color: var(--term-branch); }
.cursor-blink { display: inline-block; width: 9px; height: 1.05em; background: var(--term-prompt); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.term-body .row.show { animation: typerow 0.4s var(--ease) both; }
@keyframes typerow { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ----- Section scaffolding ----------------------------------------------- */
section { position: relative; }
.section-pad { padding: clamp(3.5rem, 9vh, 7rem) 0; }
.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); display: flex; flex-direction: column; gap: 0.9rem; }
.section-head h2 { font-size: var(--step-3); }
.section-head.center { margin-inline: auto; text-align: center; align-items: center; }

.leaf-divider { display: flex; align-items: center; justify-content: center; gap: 0.9rem; color: var(--accent); opacity: 0.7; }
.leaf-divider::before, .leaf-divider::after { content: ""; height: 1px; width: min(28vw, 200px); background: linear-gradient(90deg, transparent, var(--rule), transparent); }
.leaf-divider svg { width: 22px; height: 22px; }

/* ----- Install section --------------------------------------------------- */
.install { background: var(--bg-veil); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.install-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden; max-width: 820px; margin-inline: auto;
}
.install-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--rule); background: var(--surface-2); flex-wrap: wrap; }
.install-card .card-head .label { display: flex; align-items: center; gap: 0.6rem; font-family: "JetBrains Mono", monospace; font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; letter-spacing: 0.02em; }
.install-card .card-head .label svg { width: 17px; height: 17px; color: var(--accent); }
.prompt-box { position: relative; }
.prompt-box pre { margin: 0; padding: 1.4rem 1.5rem; font-size: 0.9rem; line-height: 1.7; color: var(--ink); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.prompt-box .p-mut { color: var(--ink-faint); }
.prompt-box .p-key { color: var(--accent); font-weight: 600; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: "Inter", sans-serif;
  font-size: 0.85rem; font-weight: 560; padding: 0.5rem 0.95rem; border-radius: 100px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.copy-btn:hover { background: var(--accent); color: var(--surface); transform: translateY(-1px); }
:root[data-theme="dark"] .copy-btn:hover { color: var(--canopy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .copy-btn:hover { color: var(--canopy); } }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.copied { background: var(--accent); color: var(--surface); }
:root[data-theme="dark"] .copy-btn.copied { color: var(--canopy); }

.install-note { text-align: center; margin-top: 1.4rem; color: var(--ink-soft); font-size: 0.96rem; }
.install-note code { background: var(--surface-2); padding: 0.12em 0.45em; border-radius: 5px; font-size: 0.86em; border: 1px solid var(--rule-soft); }

/* Manual install block (bash, syntax-highlighted) */
.full-prompt-inner .manual-code, .manual-code { margin: 0; padding: 1.2rem 1.4rem; font-family: "JetBrains Mono", monospace; font-size: 0.85rem; line-height: 1.75; background: var(--term-bg); color: var(--term-ink); overflow-x: auto; }
.manual-code .sh-cmt { color: var(--term-ink-dim); font-style: italic; }
.manual-code .sh-cmd { color: var(--term-prompt); font-weight: 600; }
.manual-code .sh-str { color: var(--sap); }
.manual-code .sh-url { color: var(--term-branch); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--term-branch) 40%, transparent); }
.manual-code .sh-op { color: var(--term-path); }
.manual-foot { margin: 0; padding: 0.95rem 1.4rem; font-size: 0.9rem; color: var(--ink-soft); border-top: 1px solid var(--rule-soft); background: var(--surface); }
.manual-foot code { font-family: "JetBrains Mono", monospace; font-size: 0.85em; background: var(--surface-2); padding: 0.08em 0.4em; border-radius: 4px; border: 1px solid var(--rule-soft); }

/* Expandable full prompt */
.expander { max-width: 820px; margin: 1.2rem auto 0; }
details.full-prompt { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
details.full-prompt > summary {
  list-style: none; cursor: pointer; padding: 0.95rem 1.35rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; user-select: none;
}
details.full-prompt > summary::-webkit-details-marker { display: none; }
details.full-prompt > summary .chev { transition: transform 0.25s var(--ease); flex: none; width: 18px; height: 18px; color: var(--accent); }
details.full-prompt[open] > summary .chev { transform: rotate(90deg); }
details.full-prompt > summary:hover { color: var(--accent); }
.full-prompt-inner { border-top: 1px solid var(--rule); position: relative; }
.full-prompt-inner .fp-head { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1.35rem; gap: 1rem; background: var(--surface-2); border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.full-prompt-inner .fp-head span { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--ink-faint); }
.full-prompt-inner pre { margin: 0; padding: 1.3rem 1.5rem; max-height: 460px; overflow: auto; font-size: 0.82rem; line-height: 1.72; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

/* ----- Features (canopy grid) -------------------------------------------- */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; max-width: 860px; margin-inline: auto; }
@media (max-width: 620px) { .features-grid { grid-template-columns: 1fr; } }
.features-grid.two .feature { padding: 2rem 1.9rem 2.1rem; }
.features-grid.two .feature h3 { font-size: 1.4rem; }
.features-grid.two .feature .ficon { width: 38px; height: 38px; margin-bottom: 1.1rem; }
.features-grid.two .feature p { font-size: 1rem; }
.feature {
  position: relative; padding: 1.6rem 1.5rem 1.7rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--rule);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
  overflow: hidden;
}
.feature::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--accent-bright), transparent); opacity: 0; transition: opacity 0.25s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in oklab, var(--accent) 40%, var(--rule)); }
.feature:hover::before { opacity: 1; }
.feature .ficon { width: 34px; height: 34px; color: var(--accent); margin-bottom: 0.95rem; }
.feature h3 { font-size: 1.24rem; margin-bottom: 0.5rem; font-weight: 560; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }
.feature code { font-family: "JetBrains Mono", monospace; font-size: 0.85em; color: var(--accent-ink); background: color-mix(in oklab, var(--accent) 10%, transparent); padding: 0.08em 0.36em; border-radius: 4px; }

/* ----- By hand vs grove -------------------------------------------------- */
.versus-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch; max-width: 960px; margin-inline: auto;
}
@media (max-width: 780px) { .versus-grid { grid-template-columns: 1fr; } }
.versus-col { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.5rem 1.6rem; display: flex; flex-direction: column; }
.versus-col.by-hand { background: var(--surface-sunken); }
.versus-col.with-grove { border-color: color-mix(in oklab, var(--accent) 45%, var(--rule)); box-shadow: var(--shadow-md); }
.versus-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.versus-tag { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); }
.versus-tag.grove { color: var(--accent); }
.versus-count { font-size: 0.8rem; color: var(--ink-faint); font-style: italic; }
.versus-steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.45; }
.versus-steps li { padding-left: 0.2rem; }
.versus-steps li::marker { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
/* Plain (non-sequential) variant: dashes instead of numbers */
.versus-steps.plain { list-style: none; padding-left: 0.2rem; }
.versus-steps.plain li { position: relative; padding-left: 1.3rem; }
.versus-steps.plain li::before { content: "✕"; position: absolute; left: 0; color: color-mix(in oklab, #e06c5b 80%, var(--ink-faint)); font-weight: 700; font-size: 0.9em; }
.versus-steps code { font-family: "JetBrains Mono", monospace; font-size: 0.85em; color: var(--ink); background: color-mix(in oklab, var(--ink) 7%, transparent); padding: 0.05em 0.34em; border-radius: 4px; }
.versus-arrow { display: grid; place-items: center; color: var(--accent); }
.versus-arrow svg { width: 30px; height: 30px; }
@media (max-width: 780px) { .versus-arrow { transform: rotate(90deg); padding: 0.3rem 0; } }
.versus-one { display: flex; flex-direction: column; gap: 1rem; justify-content: center; flex: 1; }
.versus-one pre { margin: 0; background: var(--term-bg); color: var(--term-ink); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-size: 0.92rem; overflow-x: auto; }
.versus-one pre .term-prompt { color: var(--term-prompt); }
.versus-one p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.6; }
.versus-one code { font-family: "JetBrains Mono", monospace; font-size: 0.86em; color: var(--accent-ink); }

/* Secondary proof-point row under the feature cards */
.proof-row { list-style: none; margin: 1rem auto 0; padding: 0; max-width: 860px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 560px) { .proof-row { grid-template-columns: 1fr; } }
.proof-row li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--radius-sm); transition: transform 0.22s var(--ease), box-shadow 0.22s, border-color 0.22s; }
.proof-row li:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: color-mix(in oklab, var(--accent) 35%, var(--rule)); }
.proof-row svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 0.15rem; }
.proof-row b { color: var(--ink); font-weight: 600; }
.proof-row code { font-family: "JetBrains Mono", monospace; font-size: 0.85em; color: var(--accent-ink); }

/* ----- How it works (roots → saplings) ----------------------------------- */
.how { background: var(--bg-veil); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .how-grid { grid-template-columns: 1fr; } }
.steps { display: flex; flex-direction: column; gap: 0.4rem; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1rem 0; }
.step:not(:last-child) { border-bottom: 1px solid var(--rule-soft); }
.step .num {
  counter-increment: step; width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: "Fraunces", serif; font-weight: 600; font-size: 1.15rem;
  color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 1.12rem; margin-bottom: 0.25rem; font-weight: 560; }
.step p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.55; }
.step p code { font-family: "JetBrains Mono", monospace; font-size: 0.86em; color: var(--accent-ink); }

/* ----- Command reference (terminal panel) -------------------------------- */
.cmds .terminal { max-width: 900px; margin-inline: auto; }
.cmd-table { padding: 0.6rem 0.4rem 1rem; }
.cmd-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1rem 1.6rem; padding: 0.62rem 0.95rem; border-radius: 8px; align-items: baseline; }
.cmd-row:hover { background: rgba(199, 217, 140, 0.06); }
.cmd-row .c { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: var(--sap); white-space: nowrap; overflow-x: auto; }
.cmd-row .c .flag { color: var(--term-branch); }
.cmd-row .d { font-size: 0.87rem; color: var(--term-ink-dim); line-height: 1.5; }
.cmd-row .d code { font-family: "JetBrains Mono", monospace; font-size: 0.92em; color: var(--term-leaf); background: color-mix(in oklab, var(--term-leaf) 12%, transparent); padding: 0.05em 0.36em; border-radius: 4px; white-space: nowrap; }
.cmd-group-label { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--term-ink-dim); opacity: 0.7; padding: 1rem 0.95rem 0.35rem; }
@media (max-width: 620px) { .cmd-row { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ----- CTA / footer ------------------------------------------------------ */
.closing { text-align: center; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.closing h2 { font-size: var(--step-3); max-width: 18ch; }
.closing .lede { text-align: center; max-width: 46ch; }
.closing .hero-actions { justify-content: center; }

.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; color: var(--ink-faint); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between; }
.site-foot .foot-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: "Fraunces", serif; font-size: 1.1rem; color: var(--ink-soft); }
.site-foot .foot-brand .mark { width: 24px; height: 24px; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot .foot-links { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.92rem; }
.site-foot .foot-fine { width: 100%; font-size: 0.82rem; color: var(--ink-faint); border-top: 1px solid var(--rule-soft); padding-top: 1.3rem; margin-top: 0.4rem; line-height: 1.6; }
.site-foot .foot-fine a { color: var(--accent); }

/* ----- Reveal on scroll -------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
