/* Stith homepage — Aylith family tokens (warm neutrals, DM Sans + Space Grotesk) with Stith's
   terracotta as the accent. The product illustrations use the app's own palette (--ctp-*). */

:root {
  color-scheme: light;
  --bg: #f8f7f4;
  --bg-elev: #ffffff;
  --bg-sunk: #f0eee9;
  --bg-band: #f3f1ec;
  --line: #e1ddd3;
  --line-strong: #c9c3b3;
  --text: #131110;
  --text-2: #46423a;
  --text-3: #615b50;
  --accent: #b0502c;
  --accent-strong: #8f4123;
  --accent-soft: #f7e7de;
  --accent-line: #ecc8b6;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgb(19 17 16 / 0.05), 0 18px 48px -18px rgb(70 50 30 / 0.28);
  --shadow-sm: 0 1px 2px rgb(19 17 16 / 0.06), 0 6px 18px -10px rgb(70 50 30 / 0.22);

  /* The app's own light palette (app/src/client/index.css), for the illustrations. */
  --ctp-base: #f9f9f7;
  --ctp-mantle: #f3f2ef;
  --ctp-crust: #ecebe6;
  --ctp-surface0: #e6e5e0;
  --ctp-surface1: #d6d4cd;
  --ctp-overlay0: #85837c;
  --ctp-text: #141413;
  --ctp-subtext0: #57564f;
  --ctp-mauve: #cc785c;
  --ctp-peach: #c15f3c;
  --st-active: #2e8b45;
  --st-approval: #e0521f;
  --st-idle: #d29200;
  --st-stopped: #9a988f;
  --ctp-terminal-bg: #1f1e1d;

  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #100f0d;
    --bg-elev: #1a1815;
    --bg-sunk: #0b0a09;
    --bg-band: #151311;
    --line: #2c2924;
    --line-strong: #46423a;
    --text: #f3efe8;
    --text-2: #d4c8b8;
    --text-3: #ad9f8b;
    --accent: #e8957a;
    --accent-strong: #f1ad95;
    --accent-soft: #33201a;
    --accent-line: #5a3427;
    --on-accent: #1c120e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -24px rgb(0 0 0 / 0.75);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 22px -12px rgb(0 0 0 / 0.7);

    --ctp-base: #262624;
    --ctp-mantle: #1f1e1d;
    --ctp-crust: #191817;
    --ctp-surface0: #3a3835;
    --ctp-surface1: #4a4844;
    --ctp-overlay0: #86847d;
    --ctp-text: #f9f9f7;
    --ctp-subtext0: #a8a69e;
    --ctp-mauve: #d97757;
    --ctp-peach: #e0a374;
    --st-active: #7fb88b;
    --st-approval: #ff8a5c;
    --st-idle: #e0b975;
    --st-stopped: #6f6d67;
    --ctp-terminal-bg: #141413;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100f0d;
  --bg-elev: #1a1815;
  --bg-sunk: #0b0a09;
  --bg-band: #151311;
  --line: #2c2924;
  --line-strong: #46423a;
  --text: #f3efe8;
  --text-2: #d4c8b8;
  --text-3: #ad9f8b;
  --accent: #e8957a;
  --accent-strong: #f1ad95;
  --accent-soft: #33201a;
  --accent-line: #5a3427;
  --on-accent: #1c120e;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -24px rgb(0 0 0 / 0.75);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 22px -12px rgb(0 0 0 / 0.7);

  --ctp-base: #262624;
  --ctp-mantle: #1f1e1d;
  --ctp-crust: #191817;
  --ctp-surface0: #3a3835;
  --ctp-surface1: #4a4844;
  --ctp-overlay0: #86847d;
  --ctp-text: #f9f9f7;
  --ctp-subtext0: #a8a69e;
  --ctp-mauve: #d97757;
  --ctp-peach: #e0a374;
  --st-active: #7fb88b;
  --st-approval: #ff8a5c;
  --st-idle: #e0b975;
  --st-stopped: #6f6d67;
  --ctp-terminal-bg: #141413;
}

/* ───────────── Base ───────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

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

code {
  font-size: 0.86em;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  font-size: 0.78em;
  text-align: center;
  padding: 0.08em 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-elev);
  color: var(--text);
  line-height: 1.4;
}

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

.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;
}

.skip {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; color: var(--bg); }

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

/* ───────────── Header ───────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.wordmark:hover { color: var(--text); }
.wordmark img { display: block; }

.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.main-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.main-nav a:hover { color: var(--text); }

.theme {
  display: inline-flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
}
.theme button {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.theme button svg { width: 16px; height: 16px; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed="true"] { background: var(--bg-sunk); color: var(--text); }

/* ───────────── Shared bits ───────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--accent-strong); color: var(--on-accent); transform: translateY(-1px); }

.text-link {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.text-link:hover { color: var(--accent); }

.section { padding-block: 112px; }

.section-head {
  max-width: 760px;
  margin-bottom: 56px;
}
.section-head h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.4vw, 50px);
}
.section-head > p:not(.eyebrow) {
  margin-top: 18px;
  font-size: 18.5px;
  color: var(--text-2);
}

/* ───────────── Hero ───────────── */

.hero {
  position: relative;
  padding-top: 88px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 760px;
  background:
    radial-gradient(60% 55% at 78% 8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(40% 40% at 8% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
  pointer-events: none;
}

.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 56px;
  align-items: center;
}
.hero-copy { position: relative; min-width: 0; }
.hero-term { min-width: 0; }
.hero-term .window { transform: rotate(1.2deg); }

.hero h1 {
  margin-top: 22px;
  max-width: 940px;
  font-size: clamp(42px, 5.6vw, 72px);
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  margin-top: 26px;
  max-width: 720px;
  font-size: clamp(17.5px, 1.6vw, 20px);
  color: var(--text-2);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 34px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}
.meta li {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
}

.hero-stage { position: relative; margin-top: 72px; }

.stage {
  position: relative;
  margin: 0;
  padding-bottom: 64px;
}

.stage-caption {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-3);
  text-align: center;
}

/* ───────────── Windows (illustrations) ───────────── */

.window {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: var(--ctp-base);
  color: var(--ctp-text);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36px;
  padding: 0 14px;
  background: var(--ctp-crust);
  border-bottom: 1px solid var(--ctp-surface0);
}
.lights { display: inline-flex; gap: 7px; }
.lights i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ctp-surface1);
}
.url {
  flex: 1;
  max-width: 340px;
  margin-inline: auto;
  transform: translateX(-30px);
  font-family: var(--mono);
  font-size: 11.5px;
  text-align: center;
  color: var(--ctp-subtext0);
  background: var(--ctp-base);
  border: 1px solid var(--ctp-surface0);
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.term .window-bar { background: #2a2826; border-color: #34322f; }
.term .lights i { background: #4a4844; }
.term .url { background: #1b1a19; border-color: #34322f; color: #a8a69e; }


.app {
  display: grid;
  grid-template-columns: 200px 1fr;
  font-size: 13px;
  line-height: 1.35;
  min-height: 430px;
}

.app.solo { grid-template-columns: minmax(0, 1fr); min-height: 0; }

.app-side {
  background: var(--ctp-mantle);
  border-right: 1px solid var(--ctp-surface0);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  padding: 2px 6px 10px;
}
.app-jump {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ctp-subtext0);
  border: 1px solid var(--ctp-surface0);
  background: var(--ctp-base);
  border-radius: 7px;
  padding: 5px 8px;
  margin-bottom: 6px;
}
.app-jump kbd {
  font-size: 10px;
  border-width: 1px;
  background: var(--ctp-mantle);
  color: var(--ctp-subtext0);
  border-color: var(--ctp-surface1);
}
.app-nav {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--ctp-subtext0);
}
.app-nav b {
  font-size: 10.5px;
  color: #fff;
  background: var(--st-approval);
  border-radius: 999px;
  padding: 0 6px;
  line-height: 1.5;
}
.app-nav.on { background: var(--ctp-surface0); color: var(--ctp-text); font-weight: 600; }
.app-group {
  margin-top: 9px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ctp-overlay0);
}

.app-main { padding: 20px 22px; min-width: 0; }
.app-main.wide { padding: 14px 16px; }
.app-title { font-weight: 700; font-size: 16px; margin-bottom: 14px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.tile {
  border: 1px solid var(--ctp-surface0);
  border-radius: 9px;
  padding: 11px 12px;
  background: var(--ctp-base);
  min-width: 0;
}
.tile span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ctp-subtext0);
}
.tile strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0 2px;
  font-family: var(--sans);
}
.tile small { color: var(--ctp-overlay0); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tile.alert { border-color: color-mix(in srgb, var(--st-approval) 45%, var(--ctp-surface0)); background: color-mix(in srgb, var(--st-approval) 7%, var(--ctp-base)); }
.tile.alert strong { color: var(--st-approval); }

.panes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.pane-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.lock {
  flex: none;
  width: 9px; height: 8px;
  border-radius: 2px;
  background: var(--ctp-mauve);
  position: relative;
  margin-top: 3px;
}
.lock::before {
  content: "";
  position: absolute;
  left: 1.5px; top: -5px;
  width: 6px; height: 6px;
  border: 1.5px solid var(--ctp-mauve);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-sizing: border-box;
}
.pane-head { font-weight: 600; color: var(--ctp-subtext0); margin-bottom: 7px; }
.acct, .sess {
  border: 1px solid var(--ctp-surface0);
  border-radius: 9px;
  background: var(--ctp-base);
}
.acct { padding: 10px 12px; display: grid; gap: 9px; }
.acct-row {
  display: grid;
  grid-template-columns: 62px 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}
.acct-row span { font-weight: 600; }
.acct-row em { font-style: normal; color: var(--ctp-overlay0); font-size: 11.5px; }
.acct-row b { font-weight: 600; text-align: right; font-size: 12px; }
.bar { height: 7px; border-radius: 999px; background: var(--ctp-surface0); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--st-active); }
.bar.warn i { background: var(--st-approval); }

.sess { list-style: none; margin: 0; padding: 0; }
.sess li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border-top: 1px solid var(--ctp-surface0);
}
.sess li:first-child { border-top: 0; }
.sess li span { margin-left: auto; color: var(--ctp-overlay0); font-size: 11.5px; }

.st {
  flex: none;
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--st-stopped);
}
.st.active { background: var(--st-active); }
.st.approval { background: var(--st-approval); }
.st.idle { background: var(--st-idle); }

.window.term { border-color: #3a3835; }

.tui {
  margin: 0;
  padding: 14px 16px 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #e8e6df;
  background: var(--ctp-terminal-bg);
  white-space: pre;
  overflow: hidden;
}
.term { background: var(--ctp-terminal-bg); }
.t-b { font-weight: 700; color: #f9f9f7; }
.t-u { text-decoration: underline; text-underline-offset: 3px; }
.t-dim { color: #86847d; }
.t-acc { color: #e08a68; }
.t-key { color: #c3c2b7; background: #2e2c2a; }
.t-ok { color: #7fb88b; }
.t-ap { color: #ff8a5c; }
.t-id { color: #e0b975; }
.t-sel { background: #3a3835; color: #f9f9f7; }
.t-btn { background: #3a3835; color: #f9f9f7; }

/* ───────────── Signals ───────────── */

.signals {
  border-block: 1px solid var(--line);
  background: var(--bg-band);
}
.signal-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.signal {
  padding: 30px 24px 30px 0;
  display: grid;
  gap: 6px;
  align-content: start;
}
.signal + .signal { padding-left: 24px; border-left: 1px solid var(--line); }
.signal strong {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.signal span { color: var(--text-3); font-size: 14.5px; line-height: 1.5; }

/* ───────────── Why ───────────── */

.failures {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: f;
}
.failure {
  counter-increment: f;
  position: relative;
  padding: 28px 26px 30px;
  border-radius: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.failure::before {
  content: "0" counter(f);
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 18px;
}
.quiet {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
}
.answer { color: var(--text-2); font-size: 16px; }
.answer strong { color: var(--accent); }

/* ───────────── Features ───────────── */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feature {
  padding: 32px 30px 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ficon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 22px;
}
.ficon svg {
  width: 23px; height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ficon .fill { fill: currentColor; stroke: none; }
.feature h3 { font-size: 21px; margin-bottom: 10px; }
.feature p { color: var(--text-2); font-size: 16px; }

.also {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 30px 32px;
  border-radius: 16px;
  background: var(--bg-band);
  border: 1px solid var(--line);
}
.also-title { font-size: 20px; }
.also ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 32px;
}
.also li {
  position: relative;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 15.5px;
}
.also li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.also strong { color: var(--text); }

/* ───────────── Surfaces ───────────── */

.surfaces {
  background: var(--bg-band);
  border-block: 1px solid var(--line);
}

.tablist {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.tablist [role="tab"] {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
}
.tablist [role="tab"]:hover { color: var(--text); }
.tablist [role="tab"][aria-selected="true"] {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tabpanel:focus-visible { outline-offset: 6px; border-radius: 14px; }

.surface-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}
.surface-notes h3 { font-size: 22px; margin-bottom: 16px; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--text-2);
  font-size: 15.5px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3em;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 3px; top: calc(0.3em + 3px);
  width: 11px; height: 11px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.excerpt-note { margin-top: 18px; font-size: 13.5px; color: var(--text-3); }

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ctp-surface0);
  margin-bottom: 12px;
}
.chip {
  border: 1px solid var(--ctp-surface0);
  border-radius: 7px;
  padding: 3px 9px;
  color: var(--ctp-subtext0);
}
.count { display: inline-flex; align-items: center; gap: 6px; color: var(--ctp-subtext0); }

.split-view {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-content: start;
}
.card {
  position: relative;
  display: grid;
  gap: 3px;
  border: 1px solid var(--ctp-surface0);
  border-radius: 9px;
  padding: 10px 11px 8px;
  background: var(--ctp-base);
  min-width: 0;
}
.card.sel {
  border-color: color-mix(in srgb, var(--ctp-mauve) 55%, var(--ctp-surface0));
  background: color-mix(in srgb, var(--ctp-mauve) 8%, var(--ctp-base));
  box-shadow: inset 3px 0 0 var(--ctp-mauve);
}
.cs {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ctp-subtext0);
}
.cs::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-stopped); }
.cs.active::before { background: var(--st-active); }
.cs.approval { color: var(--st-approval); }
.cs.approval::before { background: var(--st-approval); }
.cs.idle::before { background: var(--st-idle); }
.badge {
  position: absolute;
  right: 9px; top: 9px;
  font-size: 10.5px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--ctp-mantle);
  border: 1px solid var(--ctp-surface0);
  color: var(--ctp-subtext0);
}
.card b { font-size: 14px; }
.card small {
  color: var(--ctp-overlay0);
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill {
  justify-self: start;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 5px;
  margin: 4px 0;
  color: var(--ctp-peach);
  background: color-mix(in srgb, var(--ctp-mauve) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ctp-mauve) 30%, transparent);
}
.pill.q { color: var(--st-idle); background: color-mix(in srgb, var(--st-idle) 12%, transparent); border-color: color-mix(in srgb, var(--st-idle) 30%, transparent); }
.card footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--ctp-surface0);
  padding-top: 6px;
  margin-top: 2px;
  color: var(--ctp-overlay0);
  font-size: 11px;
}

.detail {
  border-left: 1px solid var(--ctp-surface0);
  padding-left: 14px;
  min-width: 0;
}
.d-state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--st-approval);
}
.d-state code { background: none; border: 0; color: var(--ctp-overlay0); font-size: 10.5px; padding: 0; letter-spacing: 0; text-transform: none; }
.d-title { font-size: 19px; font-weight: 700; margin: 4px 0 10px; }
.d-tabs { display: flex; gap: 14px; border-bottom: 1px solid var(--ctp-surface0); margin-bottom: 10px; color: var(--ctp-overlay0); font-size: 12px; overflow: hidden; white-space: nowrap; }
.d-tabs span { padding-bottom: 6px; }
.d-tabs .on { color: var(--ctp-text); box-shadow: inset 0 -2px 0 var(--ctp-mauve); font-weight: 600; }
.d-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.d-grid div {
  border: 1px solid var(--ctp-surface0);
  border-radius: 7px;
  padding: 6px 8px;
  min-width: 0;
}
.d-grid span {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ctp-overlay0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-grid b { font-size: 13px; }
.d-label {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ctp-overlay0);
}
.d-wait {
  margin-top: 5px;
  border: 1px solid color-mix(in srgb, var(--st-approval) 35%, var(--ctp-surface0));
  background: color-mix(in srgb, var(--st-approval) 6%, var(--ctp-base));
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d-wait code { background: none; border: 0; padding: 0; font-size: 11px; color: var(--ctp-text); }
.d-actions { display: flex; gap: 6px; margin-top: 10px; }
.btn {
  border: 1px solid var(--ctp-surface1);
  background: var(--ctp-mantle);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
}

.tui-scroll { overflow-x: auto; background: var(--ctp-terminal-bg); }
.tui.wide { font-size: 13px; overflow: visible; display: inline-block; min-width: 100%; }

/* ───────────── How it works ───────────── */

.flow {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px minmax(0, 1.15fr) 118px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 36px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg-elev);
}
.flow-col { display: grid; gap: 10px; }
.flow-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}
.node {
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.node small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}
.node.soft { background: var(--bg-band); box-shadow: none; border-style: dashed; font-weight: 500; color: var(--text-2); }
.node.core {
  border: 1.5px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg-elev));
  padding: 18px 18px 16px;
}
.core-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 19px;
}
.node.core code { display: inline-block; margin-top: 6px; }
.node.core ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 4px;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-2);
}
.node.core li::before { content: "› "; color: var(--accent); font-weight: 700; }
.node.reads { font-size: 13.5px; text-align: center; }
.node.reads code { font-size: 12px; }

.flow-arrow {
  position: relative;
  height: 2px;
  margin-inline: 8px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 12px);
}
.flow-arrow::after {
  content: "";
  position: absolute;
  right: -2px; top: -5px;
  border: 6px solid transparent;
  border-left: 8px solid var(--accent);
  border-right: 0;
}
.flow-arrow span {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 4px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 56px;
}
.principle h3 { font-size: 20px; margin-bottom: 10px; }
.principle p { color: var(--text-2); font-size: 16px; }

/* ───────────── Companions ───────────── */

.companions { padding-top: 0; padding-bottom: 24px; }
.companion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.companion {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.companion:hover { color: inherit; border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.c-body { display: grid; gap: 6px; }
.c-title { font-family: var(--display); font-weight: 600; font-size: 21px; color: var(--text); }
.companion:hover .c-title { color: var(--accent); }
.c-text { color: var(--text-2); font-size: 15.5px; }

.keys {
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 6px;
  padding: 9px;
  border-radius: 14px;
  background: #1f1e1d;
}
.keys .k { width: 34px; height: 34px; border-radius: 8px; background: #3a3835; position: relative; }
.keys .k.ok { background: color-mix(in srgb, #7fb88b 35%, #2a2826); box-shadow: inset 0 0 0 1.5px #7fb88b; }
.keys .k.ap { background: color-mix(in srgb, #ff8a5c 30%, #2a2826); box-shadow: inset 0 0 0 1.5px #ff8a5c; }
.keys .k.ap::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; color: #ff8a5c; font-weight: 700; font-size: 15px; }
.keys .k.gauge { background: conic-gradient(#e0b975 0 62%, #4a4844 62% 100%); -webkit-mask: radial-gradient(circle, transparent 8px, #000 9px); mask: radial-gradient(circle, transparent 8px, #000 9px); border-radius: 50%; }
.keys.pane { grid-template-columns: repeat(2, 34px); }
.keys.pane i { width: 34px; height: 34px; border-radius: 4px; background: #2e2c2a; border: 1px solid #4a4844; }
.keys.pane i:first-child { border-color: #e08a68; }
.keys.pane i.wide { grid-column: span 2; width: auto; height: 22px; }

/* ───────────── Install ───────────── */

.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 34px;
}
.steps > li {
  counter-increment: s;
  position: relative;
  padding-left: 52px;
  min-width: 0;
}
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: -2px;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
}
.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px; top: 40px; bottom: -28px;
  width: 1.5px;
  background: var(--line);
}
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { color: var(--text-2); font-size: 16px; }
.steps .tablist { margin: 4px 0 12px; }
.tabs.small .tablist [role="tab"] { font-size: 14px; padding: 7px 14px; }

.code {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #1f1e1d;
  border: 1px solid #34322f;
}
.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 8px 7px 14px;
  background: #2a2826;
  border-bottom: 1px solid #34322f;
  font-size: 12px;
  font-family: var(--mono);
  color: #a8a69e;
}
.copy {
  font: inherit;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: #e8e6df;
  background: #3a3835;
  border: 1px solid #4a4844;
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
}
.copy:hover { background: #4a4844; }
.copy:focus-visible { outline-color: #e8957a; }
.code pre {
  margin: 0;
  padding: 14px 16px;
  color: #f0eee9;
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
}
.note { margin-top: 10px; font-size: 14.5px !important; color: var(--text-3) !important; }
.caption { margin-top: 14px; min-height: 1.5em; font-size: 14px; color: var(--accent); }

.status {
  padding: 30px;
  border-radius: 18px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-elev) 60%);
}
.status h3 { font-size: 23px; margin: 12px 0 12px; }
.status > p:not(.eyebrow) { color: var(--text-2); font-size: 15.5px; }

.systems {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.systems th, .systems td {
  text-align: left;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.systems thead th {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}
.systems tbody th { font-weight: 500; padding-right: 14px; }
.systems td { color: var(--text-2); white-space: nowrap; }

.caveats {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-2);
}
.caveats li { position: relative; padding-left: 18px; }
.caveats li::before { content: "–"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ───────────── Footer ───────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 34px 44px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}
.aylith {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
}
.aylith b { color: var(--text); font-weight: 600; }
.aylith:hover b { color: var(--accent); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.site-footer nav a:hover { color: var(--accent); }

/* ───────────── Responsive ───────────── */


@media (max-width: 1080px) {
  .hero-split { grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
  .hero-term .window { transform: none; }
  .stage { padding-bottom: 0; }
  .surface-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .surface-notes { max-width: 680px; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 28px; }
  .flow-arrow {
    width: 2px; height: 56px;
    margin: 10px auto;
    background: repeating-linear-gradient(180deg, var(--accent) 0 7px, transparent 7px 12px);
  }
  .flow-arrow::after { right: auto; left: -5px; top: auto; bottom: -2px; border: 6px solid transparent; border-top: 8px solid var(--accent); border-bottom: 0; }
  .flow-arrow span { left: 16px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .install-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .main-nav { display: none; }
  .theme { margin-left: auto; }
  .section { padding-block: 84px; }
  .signal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signal:nth-child(3) { padding-left: 0; border-left: 0; }
  .signal:nth-child(n+3) { border-top: 1px solid var(--line); }
  .failures { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .also { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .companion-grid { grid-template-columns: minmax(0, 1fr); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app.solo { grid-template-columns: minmax(0, 1fr); min-height: 0; }

.app-side { display: none; }
  .split-view { grid-template-columns: minmax(0, 1fr); }
  .detail { border-left: 0; padding-left: 0; border-top: 1px solid var(--ctp-surface0); padding-top: 12px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 46px); }
  .hero-stage { margin-top: 44px; }
  .section { padding-block: 68px; }
  .section-head { margin-bottom: 36px; }
  .section-head > p:not(.eyebrow) { font-size: 17px; }
  .signal-row { grid-template-columns: minmax(0, 1fr); }
  .signal, .signal + .signal { padding: 20px 0; border-left: 0; }
  .signal + .signal { border-top: 1px solid var(--line); }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 26px 22px 28px; }
  .also { padding: 24px 20px; }
  .also ul { grid-template-columns: minmax(0, 1fr); }
  .app { min-height: 0; font-size: 12px; }
  .app-main { padding: 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile strong { font-size: 20px; }
  .panes { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards .card:nth-child(n+3) { display: none; }
  .d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-term .tui { font-size: 11px; padding: 12px; }
  .url { transform: none; }
  .flow { padding: 22px 18px; }
  .companion { flex-direction: column; align-items: flex-start; padding: 22px; }
  .steps > li { padding-left: 46px; }
  .status { padding: 24px 20px; }
  .systems td { white-space: normal; }
  .tablist { display: flex; width: 100%; }
  .tablist [role="tab"] { flex: 1 1 auto; padding: 8px 10px; font-size: 14px; }
  .code pre { font-size: 12px; padding: 12px 14px; }
  .steps > li { padding-left: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Stacked hero: the terminal centres under the copy instead of hugging the left edge. */
@media (max-width: 920px) {
  .hero-split { grid-template-columns: minmax(0, 1fr); }
  .hero-term { max-width: 560px; width: 100%; margin-inline: auto; }
}
