/* Kindling — fire & spark. Warm black, ember accents, live mono logs. */
:root {
  --bg: #0b0908;
  --bg-2: #120e0c;
  --surface: #17120f;
  --surface-2: #1f1813;
  --line: rgba(255, 196, 150, 0.10);
  --line-2: rgba(255, 196, 150, 0.18);
  --text: #f7efe7;
  --muted: #b2a194;
  --faint: #7d6e63;
  --ember: #ff6b1a;
  --ember-2: #ff9a3d;
  --gold: #ffd36b;
  --blood: #e2361f;
  --ash: #6f6a66;
  --ok: #8fd18b;
  --cold: #8fb3d9;
  --flame: linear-gradient(90deg, #e2361f 0%, #ff6b1a 45%, #ff9a3d 75%, #ffd36b 100%);
  --glow: 0 0 0 1px rgba(255, 107, 26, .35), 0 8px 40px -8px rgba(255, 107, 26, .45);
  --radius: 14px;
  --radius-sm: 9px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fbf6f0; --bg-2: #f5ede4; --surface: #fffaf5; --surface-2: #f6ece2;
    --line: rgba(90, 40, 10, .12); --line-2: rgba(90, 40, 10, .22);
    --text: #1f150e; --muted: #6c5848; --faint: #8f7b6b;
    --ember: #d9480f; --ember-2: #e8590c; --gold: #b7791f; --blood: #c92a2a; --ash: #8a827c; --ok: #2f9e44; --cold: #3b6ea8;
    --glow: 0 0 0 1px rgba(217, 72, 15, .35), 0 8px 30px -10px rgba(217, 72, 15, .35);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
body::before { /* warm heat haze at the top */
  content: ""; position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 0%, rgba(255, 107, 26, .16), transparent 70%),
              radial-gradient(30% 40% at 80% 10%, rgba(255, 211, 107, .07), transparent 70%);
}
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ember) 60%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--ember-2); }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); font-size: .86em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ember); color: #160b05; padding: 8px 14px; border-radius: 8px; z-index: 50; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(1.3); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.02em; font-size: 1.08rem; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: .94rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.devnet { font: 600 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); padding: 5px 8px; border-radius: 999px; }

/* ---------- buttons ---------- */
.btn { --b: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--b); color: var(--text); font: 600 .95rem/1 var(--sans); cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); color: var(--text); border-color: color-mix(in srgb, var(--ember) 50%, var(--line-2)); }
.btn:active { transform: translateY(0); }
.btn.fire { background: var(--flame); color: #1a0b03; border: 0; box-shadow: var(--glow); }
.btn.fire:hover { color: #1a0b03; filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { background: color-mix(in srgb, var(--blood) 18%, var(--surface)); border-color: color-mix(in srgb, var(--blood) 55%, transparent); color: #ffd8d0; }
.btn.danger:hover { background: var(--blood); color: #fff; }
.btn.sm { min-height: 34px; padding: 0 13px; font-size: .86rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 9vw, 110px) 0 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ember-2); margin-bottom: 22px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); animation: pulse 1.8s infinite; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 850; letter-spacing: -0.045em; }
.hero h1 em { font-style: normal; background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 36em; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.ticker { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 340px; position: relative; overflow: hidden; }
.ticker h2 { font: 600 .74rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 2px 4px 12px; display: flex; gap: 8px; align-items: center; }
.ticker ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ticker li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 9px 10px; border-radius: 10px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); font-size: .86rem; animation: rise .45s ease-out both; }
.ticker li .who { font-weight: 700; }
.ticker li .what { color: var(--muted); display: block; font-family: var(--mono); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker::after { content: ""; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, var(--bg-2)); pointer-events: none; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 10px 0 10px; }
.stat { background: var(--bg-2); padding: 18px 20px; }
.stat b { display: block; font: 800 1.9rem/1.1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--faint); font-size: .84rem; }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
.section-head p { color: var(--muted); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 999px; padding: 7px 13px; font: 500 .85rem/1 var(--sans); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- agent cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .25s; overflow: hidden; min-width: 0; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .6); color: inherit; }
.card.working { border-color: color-mix(in srgb, var(--ember) 45%, transparent); }
.card.working::before { content: ""; position: absolute; inset: -1px -1px auto; height: 2px; background: var(--flame); background-size: 200% 100%; animation: flow 2.4s linear infinite; }
.card-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.sigil { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.sigil svg { width: 30px; height: 30px; }
.card h3 { font-size: 1.12rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .tag { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card .meta { display: flex; gap: 14px; color: var(--faint); font-size: .8rem; flex-wrap: wrap; }
.card .meta b { color: var(--muted); font-weight: 600; }
.lastline { font: .78rem/1.45 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lastline .k { color: var(--ember-2); }

.status { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.working { color: var(--ember-2); border-color: color-mix(in srgb, var(--ember) 45%, transparent); }
.status.working::before { box-shadow: 0 0 10px var(--ember); animation: pulse 1.2s infinite; }
.status.idle { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.status.starved { color: var(--cold); border-color: color-mix(in srgb, var(--cold) 40%, transparent); }
.status.paused { color: var(--gold); }
.status.killed { color: var(--blood); border-color: color-mix(in srgb, var(--blood) 45%, transparent); }

/* ---------- life meter ---------- */
.life { display: grid; gap: 7px; }
.life-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .82rem; color: var(--faint); }
.life-top b { font: 800 1.05rem/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.meter { position: relative; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 80%, var(--bg)); border: 1px solid var(--line); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); background: var(--flame); border-radius: inherit; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.meter i::after { content: ""; position: absolute; right: -2px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, #fff6d5 0%, var(--gold) 30%, transparent 70%); filter: blur(1px); }
.meter.low i { background: linear-gradient(90deg, var(--blood), var(--ember)); }
.meter.empty i { width: 0; }
.meter.empty { background: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--ash) 18%, transparent) 6px 12px); }
.working .meter i { background-size: 200% 100%; animation: flow 3s linear infinite; }
.life.big .meter { height: 18px; }
.life.big .life-top b { font-size: 2.2rem; }

/* ---------- agent page ---------- */
.agent-hero { padding: 36px 0 26px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.agent-hero .sigil { width: 76px; height: 76px; border-radius: 20px; }
.agent-hero .sigil svg { width: 50px; height: 50px; }
.agent-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 850; }
.agent-hero .sub { color: var(--muted); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; padding-bottom: 64px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1rem; font-weight: 750; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel h2 .count { margin-left: auto; font: 500 .78rem/1 var(--mono); color: var(--faint); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: .86rem; margin: 14px 0 0; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv dd.mono { font-size: .76rem; }
.note { font-size: .8rem; color: var(--faint); margin-top: 10px; }
.sim { color: var(--gold); font: 600 .72rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.mission { white-space: pre-wrap; color: var(--muted); font-size: .95rem; }

.log-panel { padding: 0; overflow: hidden; }
.log-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.log-head h2 { margin: 0; }
.live { display: inline-flex; gap: 6px; align-items: center; font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ember-2); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); animation: pulse 1.4s infinite; }
.live.off { color: var(--faint); } .live.off::before { background: var(--ash); animation: none; }
.log { list-style: none; margin: 0; padding: 6px 0; max-height: min(78vh, 900px); overflow-y: auto; font-family: var(--mono); font-size: .82rem; scroll-behavior: smooth; }
.ev { display: grid; grid-template-columns: 64px 26px minmax(0, 1fr); gap: 4px 8px; padding: 7px 16px; border-left: 2px solid transparent; }
.ev.new { animation: flash 1.6s ease-out; }
.ev time { color: var(--faint); font-size: .74rem; padding-top: 1px; font-variant-numeric: tabular-nums; }
.ev .ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .7rem; background: var(--surface-2); color: var(--muted); }
.ev .t { color: var(--text); overflow-wrap: anywhere; }
.ev details { grid-column: 3; }
.ev summary { cursor: pointer; color: var(--faint); font-size: .74rem; list-style: none; }
.ev summary::-webkit-details-marker { display: none; }
.ev summary::before { content: "▸ "; } .ev details[open] summary::before { content: "▾ "; }
.ev pre { margin: 6px 0 2px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; color: var(--muted); font-size: .78rem; }
.ev.k-thought .t { color: var(--muted); font-style: italic; font-family: var(--sans); font-size: .9rem; }
.ev.k-tool_call .ico { background: color-mix(in srgb, var(--ember) 18%, var(--surface-2)); color: var(--ember-2); }
.ev.k-output { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.ev.k-output .ico { background: color-mix(in srgb, var(--gold) 25%, var(--surface-2)); color: var(--gold); }
.ev.k-draft .ico { background: color-mix(in srgb, var(--cold) 22%, var(--surface-2)); color: var(--cold); }
.ev.k-treasury .ico { background: color-mix(in srgb, var(--ok) 20%, var(--surface-2)); color: var(--ok); }
.ev.k-error .ico, .ev.k-refusal .ico { background: color-mix(in srgb, var(--blood) 25%, var(--surface-2)); color: #ff9b8a; }
.ev.k-refusal { border-left-color: var(--blood); }
.ev.k-plan, .ev.k-system { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.ev.k-plan .t, .ev.k-system .t { font-weight: 700; }
.log-empty { padding: 40px 16px; color: var(--faint); text-align: center; font-family: var(--sans); }
.more { display: block; margin: 8px auto 12px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list li { min-width: 0; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.item:hover { border-color: var(--line-2); }
.item b { font-weight: 650; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item small { color: var(--faint); font-size: .76rem; grid-column: 1 / -1; }
.badge { font: 600 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); align-self: start; }
.badge.pending { color: var(--gold); } .badge.approved { color: var(--ok); } .badge.rejected { color: var(--ash); text-decoration: line-through; }
.draft { padding: 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.draft p { white-space: pre-wrap; font-size: .88rem; overflow-wrap: anywhere; }
.draft .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.controls { display: grid; gap: 10px; }
.controls .row { display: flex; gap: 8px; flex-wrap: wrap; }
.creator-locked { color: var(--faint); font-size: .86rem; }

/* reader dialog */
dialog { width: min(820px, 100% - 24px); max-height: 88vh; padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7); }
dialog::backdrop { background: rgba(8, 5, 3, .72); backdrop-filter: blur(4px); }
.reader-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.reader-body { padding: 8px 24px 28px; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { margin: 22px 0 10px; } .md h1 { font-size: 1.6rem; } .md h2 { font-size: 1.2rem; } .md h3 { font-size: 1.02rem; }
.md p, .md ul, .md ol, .md blockquote, .md pre { margin: 0 0 12px; color: var(--muted); }
.md blockquote { border-left: 3px solid var(--ember); padding-left: 12px; }
.md pre { background: var(--bg); padding: 12px; border-radius: 10px; overflow-x: auto; border: 1px solid var(--line); }
.md code { background: var(--bg); padding: 1px 5px; border-radius: 5px; }
.md pre code { background: none; padding: 0; }
.md li { margin: 3px 0; }

/* ---------- how / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 70px; counter-reset: s; }
.step { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); counter-increment: s; }
.step::before { content: "0" counter(s); font: 700 .78rem/1 var(--mono); color: var(--ember-2); display: block; margin-bottom: 14px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .9rem; }
.prose { max-width: 760px; padding: 40px 0 80px; }
.prose h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 850; margin-bottom: 18px; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 12px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--text); font-weight: 650; }
.callout { border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); background: color-mix(in srgb, var(--gold) 7%, transparent); border-radius: var(--radius); padding: 14px 16px; color: var(--muted); font-size: .92rem; }

/* ---------- launch form ---------- */
.launch { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; padding: 40px 0 80px; align-items: start; }
.stepper { position: sticky; top: 88px; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stepper button { width: 100%; text-align: left; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--muted); font: 500 .95rem/1.2 var(--sans); cursor: pointer; }
.stepper button span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font: 600 .78rem/1 var(--mono); }
.stepper button[aria-current="step"] { background: var(--surface); border-color: var(--line); color: var(--text); }
.stepper button[aria-current="step"] span { background: var(--flame); color: #1a0b03; border: 0; }
.stepper button.done span { background: var(--surface-2); color: var(--ok); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 18px; min-width: 0; }
legend { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--display); letter-spacing: -0.03em; margin-bottom: 6px; padding: 0; }
.field { display: grid; gap: 7px; }
.field label, .field .label { font-weight: 650; font-size: .93rem; }
.field .hint { color: var(--faint); font-size: .83rem; }
.field .err { color: #ff9b8a; font-size: .85rem; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 13px; font: 15px/1.45 var(--sans); }
textarea { min-height: 120px; resize: vertical; }
input.mono, textarea.mono { font-family: var(--mono); font-size: 13px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 22%, transparent); }
[aria-invalid="true"] { border-color: #ff6b5b !important; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.opt { position: relative; display: grid; gap: 4px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { font-size: .95rem; } .opt small { color: var(--faint); font-size: .8rem; }
.opt:has(input:checked) { border-color: var(--ember); box-shadow: inset 0 0 0 1px var(--ember); background: color-mix(in srgb, var(--ember) 7%, var(--bg-2)); }
.opt:has(input:focus-visible) { outline: 2px solid var(--ember-2); outline-offset: 2px; }
.opt.locked { opacity: .55; cursor: default; }
.form-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.review { display: grid; gap: 10px; }
.review div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.review dt { color: var(--faint); } .review dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.keybox { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--ember); font-family: var(--mono); font-size: .86rem; overflow-wrap: anywhere; }
.keybox code { flex: 1; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--ember); width: 17px; height: 17px; flex: none; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--faint); font-size: .84rem; }
.foot .wrap { display: grid; gap: 10px; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; z-index: 60; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes flow { to { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes flash { from { background: color-mix(in srgb, var(--ember) 16%, transparent); } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .launch { grid-template-columns: 1fr; }
  .stepper { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .stepper button { white-space: nowrap; }
}
@media (max-width: 640px) {
  .nav a.hide-sm { display: none; }
  .devnet { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .agent-hero { grid-template-columns: auto 1fr; }
  .agent-hero .hero-actions { grid-column: 1 / -1; }
  .ev { grid-template-columns: 50px 22px minmax(0, 1fr); padding: 7px 12px; }
  .review div { grid-template-columns: 1fr; gap: 2px; }
  .stepper button { grid-template-columns: 26px; } .stepper button em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- small utilities ---------- */
.spaced { margin-top: 72px; }
.push { margin-left: auto; }
.grow { min-width: 0; flex: 1; display: grid; gap: 5px; justify-items: start; }
.row-flex { display: flex; gap: 8px; align-items: center; }
.row-flex input { flex: 1; min-width: 0; }
.muted { color: var(--faint); }
.ico-sm { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--surface); color: var(--ember-2); font-size: .72rem; }
.ticker li.static { animation: none; }
.ticker .when { color: var(--faint); font-size: .74rem; }
.item.static { cursor: default; }
.done { max-width: 640px; display: grid; gap: 16px; padding: 30px 0; }
.done-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 850; }
.done p { color: var(--muted); }
.done .cta { display: flex; gap: 12px; }
@media (max-width: 640px) { .log-head .push { margin-left: 0; } }
[hidden] { display: none !important; }
.nav a { white-space: nowrap; }
.nav a.btn[aria-current="page"] { background: var(--flame); color: #1a0b03; }
.stepper em { font-style: normal; }
@media (max-width: 640px) {
  .top .wrap { gap: 10px; }
  .nav a { padding: 8px 9px; font-size: .88rem; }
  .nav .long { display: none; }
}
.ticker li > span:last-child { min-width: 0; }
.preview-note { margin: 0; padding: 9px 0; background: color-mix(in srgb, var(--gold) 9%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); color: var(--muted); font-size: .84rem; }
.preview-note .wrap { display: block; }
.compute-line { margin: 0 0 56px; color: var(--faint); font: .78rem/1.4 var(--mono); }
