/* chief's landing page. Hand-written, no framework, no external request: the page loads in one round
   trip and works from a USB stick. Colours are the app's own (teal, amber, red on slate).

   **Dark is the default** (asked for 2026-11-21): it is the theme the screenshots show and what most
   people run the app in. `data-theme` is set by the toggle, or from `localStorage` before first paint, so
   a visitor who chose light keeps it; nothing else switches it. */

:root {
  --theme-name: dark;
  --ink: #f1f5f9;
  --ink-soft: #aab6c5;
  --ink-faint: #7d8b9e;
  --page: #0b1220;
  --surface: #121c2b;
  --line: #24303f;
  --teal: #5eead4;
  --teal-soft: #0b3a2f;
  --amber: #fcd34d;
  --amber-soft: #3a2b0e;
  --red: #fca5a5;
  --red-soft: #3a1a1f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -18px rgba(0, 0, 0, .7);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --theme-name: light;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --page: #f6f7f9;
  --surface: #ffffff;
  --line: #e2e8f0;
  --teal: #0f766e;
  --teal-soft: #ccfbf1;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .88em; background: var(--teal-soft); color: var(--ink); padding: .1em .38em; border-radius: 5px; }
img { max-width: 100%; height: auto; display: block; }

.band-inner, .hero, .steps-inner, .shots-inner, .foot-inner {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px;
}
.narrow { max-width: 980px; }
.center { text-align: center; }
.tiny { font-size: .82rem; color: var(--ink-soft); }
.sub { font-size: 1.05rem; color: var(--ink-soft); max-width: 62ch; }

/* ── terms ───────────────────────────────────────────────────────────── */
/* The terms page is prose, not a landing band: section headings are the size of a heading in a
   document, and the measure is capped so a line stays readable across a wide window. */
.terms h2 { font-size: 1.12rem; margin: 2.2rem 0 .4rem; }
.terms p { margin: 0 0 .9rem; color: var(--ink-soft); max-width: 68ch; }
.terms ul.plain { margin: 0 0 1rem; padding-left: 1.1rem; max-width: 68ch; }
.terms li { color: var(--ink-soft); margin-bottom: .4rem; }
.terms a { color: var(--teal); }
.terms code { font-family: var(--mono); font-size: .88em; background: var(--teal-soft); color: var(--teal); padding: .1em .35em; border-radius: 4px; }

/* The CLIs chief drives, on a row of their own under the hero. Centred and on one line at any normal
   width; it wraps only when the window is too narrow to hold it, and then it stays centred rather than
   turning into a column of stray names (which is what it did inside the hero's text column). */
.agents-row { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, var(--page)); }
.agents { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem 1.4rem; max-width: 1180px; margin: 0 auto; padding: .85rem clamp(16px, 4vw, 40px); }
.agents-label { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.agent { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.agent img { display: block; border-radius: 5px; flex: none; }
:root:not([data-theme="light"]) .agent img { box-shadow: 0 0 0 1px var(--line); }
/* A mark whose vendor requires it to be used exactly as supplied: no tile, no recolour, and a file per
   theme instead — OpenAI's guidelines say "use the logo exactly as provided", so the black and white
   files from its kit are committed untouched and swapped here. A tile would be a modification. */
.agent .mark-on-light { display: none; border-radius: 0; box-shadow: none; }
.agent .mark-on-dark { display: block; border-radius: 0; box-shadow: none; }
:root[data-theme="light"] .agent .mark-on-light { display: block; }
:root[data-theme="light"] .agent .mark-on-dark { display: none; }
@media (max-width: 700px) {
  /* Below this the row cannot hold six names: keep them centred and let them wrap, two per line. */
  .agents { gap: .5rem 1rem; }
  .agents-label { width: 100%; text-align: center; margin-bottom: .1rem; }
}

/* ── nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 27px; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; font-size: .93rem; }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
/* GitHub sits with the other links, its mark the same size as a word: it is a link to the source, not the
   page's call to action, and the Download pill beside it stays the only filled control. */
.nav-links .nav-gh { display: inline-flex; align-items: center; gap: .35rem; }
.nav-gh svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* The pill is taller than a line of text, so the whole nav is centred on one axis: without this the links
   sat on the pill's top edge and the row read as misaligned (reported 2026-11-21). */
.nav-cta { color: var(--surface) !important; background: var(--teal); padding: .35rem .8rem; border-radius: 999px; font-weight: 600; line-height: 1.5; }
.theme { margin-left: .4rem; background: none; border: 1px solid var(--line); border-radius: 999px; padding: .4rem; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* The button shows what pressing it gives you: a sun while the page is dark, a moon while it is light.
   (It used to be one static half-filled circle nobody could read — reported 2026-11-21.) */
.theme .icon-sun { display: inline; }
.theme .icon-moon { display: none; }
:root[data-theme="light"] .theme .icon-sun { display: none; }
:root[data-theme="light"] .theme .icon-moon { display: inline; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); font-weight: 700; margin-bottom: .8rem; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); font-weight: 800; letter-spacing: -.035em; }
.accent { background: linear-gradient(100deg, var(--teal), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0 1rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.15rem; border-radius: 999px; font-weight: 650; font-size: .98rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  text-decoration: none; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--teal); border-color: transparent; color: #06231f; }
/* The chip inherits the teal text of `.chip` below, which is mint in the dark theme — mint on a
   lightened mint button, 1.1:1, invisible (reported 2026-11-21). On the filled button it is dark ink
   on a translucent plate in both themes. */
.btn-primary .chip { background: rgba(255, 255, 255, .6); color: #06231f; }
.btn.small { padding: .45rem .8rem; font-size: .9rem; }
/* On the light theme's darker teal, white is the readable colour (dark ink on `#0f766e` is not). */
:root[data-theme="light"] .btn-primary { color: #ffffff; }
.chip { font-size: .74rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem .9rem; padding: 1rem 0 0; margin: 0; font-size: .85rem; color: var(--ink-soft); border-top: 1px dashed var(--line); }
.trust li::before { content: "✓"; color: var(--teal); font-weight: 800; margin-right: .35rem; }
.trust b { color: var(--ink); }
.hero-shot { margin: 0; }
.hero-shot img {
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .06), 0 40px 80px -40px rgba(15, 23, 42, .55),
              0 0 0 8px color-mix(in srgb, var(--surface) 60%, transparent);
}
figcaption { font-size: .82rem; color: var(--ink-soft); padding-top: .7rem; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } }

/* ── bands and sections ──────────────────────────────────────────────── */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band.alt { background: color-mix(in srgb, var(--surface) 70%, var(--page)); border-block: 1px solid var(--line); }
.steps { padding: clamp(3rem, 7vw, 5rem) 0; }
.step-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; padding: 0; margin: 2rem 0 0; }
.step-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); position: relative; }
.step-n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 800; margin-bottom: .8rem; }
.step-list p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
@media (max-width: 820px) { .step-list { grid-template-columns: minmax(0, 1fr); } }

.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2rem; }
@media (max-width: 900px) { .three { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.card-icon { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-icon.teal { background: var(--teal-soft); color: var(--teal); }
.card-icon.amber { background: var(--amber-soft); color: var(--amber); }
.card-icon.red { background: var(--red-soft); color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1rem; margin-top: 2rem; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.feat, .safe { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; transition: border-color .15s ease, transform .15s ease; }
.feat:hover { border-color: var(--teal); transform: translateY(-2px); }
.feat h3 { display: flex; align-items: center; gap: .5rem; }
.feat h3 svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat p, .safe p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* ── screenshots ─────────────────────────────────────────────────────── */
.shots { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.shots img { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.wide { margin: 2rem 0 1.2rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.figure { margin: 0; }
@media (max-width: 820px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.dark img { border-color: #24303f; }

/* ── install ─────────────────────────────────────────────────────────── */
.install-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; margin-top: 1.5rem; }
@media (max-width: 900px) { .install-grid { grid-template-columns: minmax(0, 1fr); } }

/* Two ways to run chief: the app and the browser, side by side and equally weighted. */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2rem; align-items: start; }
@media (max-width: 900px) { .modes { grid-template-columns: minmax(0, 1fr); } }
.mode { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); display: grid; gap: .6rem; }
.mode p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.mode-head { display: flex; align-items: center; gap: .8rem; }
.mode-head h3 { margin: 0; }
.mode-head .tiny { margin: 0; }
.mode-icon { width: 2.4rem; height: 2.4rem; border-radius: 12px; display: grid; place-items: center; flex: none; }
.mode-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mode-icon.teal { background: var(--teal-soft); color: var(--teal); }
.mode-icon.amber { background: var(--amber-soft); color: var(--amber); }
.mode .install-steps { margin-top: .4rem; gap: .9rem; }
.wide-needs { margin-top: 1.2rem; display: grid; gap: .2rem; }
.wide-needs h3 { margin-top: .8rem; }

/* chief bot: the conversation beside the canvas it built. */
.bot { background: linear-gradient(180deg, color-mix(in srgb, var(--teal-soft) 45%, var(--page)), var(--page)); border-block: 1px solid var(--line); }
.bot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 900px) { .bot-grid { grid-template-columns: minmax(0, 1fr); } }
.bot-shot { margin: 0; }
.bot-shot img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }

.install-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.install-steps li { counter-increment: step; position: relative; padding-left: 2.6rem; display: grid; gap: .35rem; justify-items: start; }
.install-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.8rem; height: 1.8rem; border-radius: 999px; display: grid; place-items: center;
  background: var(--teal); color: #06231f; font-weight: 800; font-size: .85rem;
}
.install-steps b { font-size: 1rem; }
.cmd { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.cmd code { background: var(--ink); color: var(--page); padding: .5rem .7rem; border-radius: 8px; font-size: .82rem; }
.copy { background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); border-radius: 8px; padding: .4rem .6rem; font-size: .78rem; cursor: pointer; }
.copy:hover { border-color: var(--teal); color: var(--ink); }
.needs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); align-self: start; }
.needs h3 { margin-top: 1rem; }
.needs h3:first-child { margin-top: 0; }
.needs ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink-soft); font-size: .92rem; }
.needs li { margin-bottom: .35rem; }

/* ── safety and footer ───────────────────────────────────────────────── */
.safety { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; }
.foot { border-top: 1px solid var(--line); margin-top: 2rem; padding: 2rem 0 2.5rem; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: start; gap: 1.5rem 2rem; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; }
.foot-links a { color: var(--ink-soft); }
.downloads img { height: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feat { transition: none; }
}
