/* #151, restyled by #179 (Haden, 28 Oct): the whole site's styles. No inline styles anywhere (the CSP allows only
   this file). Near-black blue ground, CSI blue accent, Matrix green for anything live. Fonts are self-hosted (OFL). */
@font-face { font-family: "Inter Tight"; src: url("/inter-tight-latin.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/inter-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --bg: #05080c; --surface: #0a1018; --surface-2: #0e1620; --line: #16222e; --line-2: #1e3040; --line-3: #24384a;
  --fg: #e8f1f8; --fg-2: #cfdce7; --muted: #93a4b5; --faint: #7e91a3;
  --blue: #1fa8ff; --blue-hi: #5cc2ff; --green: #12a33d; --green-soft: #8fcb9e; --red: #ff6b5a;
  --draft-bg: #2a1d05; --draft-fg: #ffd98a;
  --display: "Inter Tight", "Inter", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--body); overflow-x: hidden; }
a { color: var(--blue); }
a:hover { color: var(--blue-hi); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 2.4rem; line-height: 1.1; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.45rem; line-height: 1.2; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.4rem; }
li { margin: 0.25rem 0; }

/* Header and footer */
.top { position: sticky; top: 0; z-index: 5; background: rgba(5, 8, 12, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid #13202c; }
.top .bar-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 18px; }
.brand:hover { color: var(--fg); }
.top nav { display: flex; gap: 26px; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a[aria-current="page"], .top nav a:hover { color: var(--fg); }
.foot { border-top: 1px solid #13202c; color: var(--faint); font-size: 0.85rem; margin-top: 4rem; }
.foot .bar-in { max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px; }
.foot p { margin: 0.3rem 0; }
.foot .links a { color: var(--muted); text-decoration: none; }
.foot .links a:hover { color: var(--fg); }
@media (max-width: 720px) { .top .bar-in { flex-wrap: wrap; row-gap: 0; } .top nav { order: 3; width: 100%; gap: 22px; padding: 0 0 12px; overflow-x: auto; } .top .bar-in, .foot .bar-in { padding-left: 16px; padding-right: 16px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; background: var(--blue); color: #03111c; font-weight: 500; text-decoration: none; border: 0; font: 500 16px/1.2 var(--body); cursor: pointer; }
.btn:hover { background: var(--blue-hi); color: #03111c; }
.btn-ghost { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--line); color: var(--fg); }
.btn-small { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-big { min-height: 54px; padding: 16px 30px; font-size: 17px; }
.btn-red { background: var(--red); }
.btn-red:hover { background: #ff8a7c; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

/* Shared bits */
.eyebrow, .label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin: 0 0 16px; }
.label { color: var(--faint); font-size: 11px; margin-bottom: 10px; }
.eyebrow.green, .label.green, .green { color: var(--green); }
.label.blue, .blue { color: var(--blue); }
.red { color: var(--red); }
.dim { color: var(--faint); }
.muted { color: var(--muted); font-size: 15px; margin: 0; }
.struck { text-decoration: line-through; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.card-green { border-color: var(--green); }

/* Home: hero */
.home main { max-width: none; padding: 0; }
.hero { position: relative; }
.rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; display: flex; justify-content: space-between; opacity: 0.22;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 92%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 92%); }
.rain span { display: block; writing-mode: vertical-rl; text-orientation: upright; font: 14px/1 var(--mono); letter-spacing: 2px; color: var(--green); text-shadow: 0 0 8px rgba(18, 163, 61, 0.6);
  animation: rain linear infinite; animation-duration: 12s; }
.rain span:nth-child(3n) { animation-duration: 9s; animation-delay: -4s; }
.rain span:nth-child(3n+1) { animation-duration: 15s; animation-delay: -9s; }
.rain span:nth-child(4n) { animation-duration: 11s; animation-delay: -2s; }
.rain span:nth-child(5n) { animation-duration: 17s; animation-delay: -13s; }
.rain span:nth-child(7n) { animation-duration: 10s; animation-delay: -6s; }
@keyframes rain { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.hero-in { position: relative; max-width: 1200px; margin: 0 auto; padding: 96px 24px 40px; }
.hero h1 { font-size: clamp(44px, 7.4vw, 104px); line-height: 0.98; letter-spacing: -0.035em; max-width: 13ch; margin: 0; }
.eyebrow.live { display: flex; align-items: center; gap: 10px; }
.lede { margin: 28px 0 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); max-width: 40rem; }

/* Home: the console illustration */
.demo { position: relative; max-width: 1200px; margin: 0 auto; padding: 40px 24px 24px; }
.glow { position: absolute; left: 10%; right: 10%; top: 18%; height: 70%; background: radial-gradient(closest-side, rgba(31, 168, 255, 0.32), rgba(31, 168, 255, 0)); filter: blur(40px); pointer-events: none; }
.console { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 0 0 1px rgba(31, 168, 255, 0.12), 0 40px 120px rgba(0, 0, 0, 0.6); overflow: hidden; }
.console .bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--faint); }
.fleet { display: flex; align-items: center; gap: 8px; }
.console.halted .fleet .pulse { background: var(--red); box-shadow: 0 0 10px var(--red); }
.panes { display: flex; flex-wrap: wrap; }
.pane { padding: 20px; min-width: 0; }
.agents-pane { flex: 1 1 300px; border-right: 1px solid var(--line); }
.feed-pane { flex: 2 1 380px; display: flex; flex-direction: column; }
.agent-list, .feed { list-style: none; margin: 0; padding: 0; }
.agent { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 10px; background: var(--surface-2); border: 1px solid #18242f; border-radius: 12px; }
.agent .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--green); }
.agent[data-state="wait"] .dot { background: var(--blue); }
.agent[data-state="stop"] .dot, .agent.off .dot { background: var(--red); }
.agent .who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.agent .id { font: 13px var(--mono); }
.agent .task { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent.off .task { color: var(--red); }
.agent .stop { flex: none; background: transparent; color: #c3d2df; border: 1px solid var(--line-3); border-radius: 999px; padding: 0 14px; min-height: 36px; font: 12px var(--body); cursor: pointer; }
.feed li { display: flex; gap: 14px; font: 13px/1.5 var(--mono); padding: 7px 0; margin: 0; border-bottom: 1px solid #101a24; }
.feed li:nth-child(n+4) { opacity: 0.75; }
.feed li:nth-child(n+6) { opacity: 0.5; }
.feed .t { flex: none; width: 44px; color: #6f8193; }
.feed .who { flex: none; width: 104px; color: var(--green); overflow: hidden; text-overflow: ellipsis; }
.feed .who.me { color: var(--blue); }
.feed .what { flex: 1 1 auto; min-width: 0; color: var(--green-soft); }
.queue { margin: auto 0 0; padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.queue .label { margin: 0 6px 0 0; }
.chip { font: 12px var(--mono); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-3); color: var(--fg-2); }
.chip.on { background: var(--blue); border-color: var(--blue); color: #03111c; }
.chip.paused { border-color: var(--red); color: var(--red); }
.chip.dim { border-color: var(--line); color: var(--faint); }
/* Phone: after the console rules so it wins (#179 review) */
@media (max-width: 560px) { .feed .t { display: none; } .feed li { gap: 10px; font-size: 12px; } .feed .who { width: 84px; } .agents-pane { border-right: 0; border-bottom: 1px solid var(--line); } }
.note { margin: 14px 0 0; font-size: 13px; color: var(--faint); text-align: center; }

/* Home: sections */
.sec { max-width: 1200px; margin: 0 auto; padding: 120px 24px 40px; }
.sec h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -0.03em; max-width: 20ch; margin: 0; }
.sec .intro { margin: 20px 0 0; color: var(--muted); font-size: 18px; max-width: 42rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 16px; margin-top: 48px; }
.grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid .card { display: flex; flex-direction: column; gap: 16px; }
.grid h3 { margin: 0; font-size: 20px; }
.screen { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font: 12px/1.7 var(--mono); color: var(--muted); }
.screen p { margin: 0; }
.screen .w { color: var(--fg); }
.screen.rows p { display: flex; justify-content: space-between; gap: 12px; }
.meter { height: 6px; background: var(--line); border-radius: 3px; margin: 14px 0 8px; overflow: hidden; }
.meter span { display: block; width: 82%; height: 100%; background: var(--blue); }
.meter.empty span { width: 0; }
.code { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font: 11.5px/1.7 var(--mono); color: var(--fg-2); overflow-x: auto; white-space: pre; scrollbar-color: var(--line-3) transparent; scrollbar-width: thin; }
.kill { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px; }
.kill .state { font: 600 22px var(--display); color: var(--green); }
.kill .state.off { color: var(--red); }
.try[hidden] { display: none; }
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.step { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.step.gate { border-color: var(--green); }
.step .n { font: 12px var(--mono); color: var(--blue); }
.step.gate .n { color: var(--green); }
.step .name { font: 600 17px/1.25 var(--display); }
.step .role { font: 12px var(--mono); color: var(--faint); }
.compare { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 48px; }
.compare .card { flex: 1 1 340px; min-width: 0; padding: 28px; }
.big { margin: 14px 0; font: 600 clamp(36px, 4.4vw, 56px)/1 var(--display); letter-spacing: -0.03em; }
.big span, .amount span { font: 500 18px var(--body); color: var(--muted); letter-spacing: 0; }
.muted-big { color: var(--fg-2); }
.source { margin: 14px 0 0; font-size: 13px; color: var(--faint); }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split > div:first-child { flex: 3 1 420px; min-width: 0; }
.todo { flex: 2 1 320px; min-width: 0; }
.todo ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 15px; }
.todo li { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo li span:last-child { font: 12px var(--mono); }
.roles { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.roles li { margin: 0; font: 13px var(--mono); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg-2); }
.roles li.you { background: var(--blue); border-color: var(--blue); color: #03111c; }
.prices { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: stretch; margin-top: 56px; }
.price { flex: 1 1 320px; max-width: 560px; padding: 40px; text-align: center; border-radius: 24px; }
.price .amount { margin: 16px 0; font: 600 clamp(44px, 5vw, 64px)/1 var(--display); letter-spacing: -0.04em; }
.price .actions { justify-content: center; }
.option { text-align: left; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.option .opt { display: flex; justify-content: space-between; gap: 12px; font-weight: 500; margin: 0 0 4px; }
.finale { text-align: center; padding-bottom: 80px; }
.finale h2 { margin: 0 auto; max-width: 16ch; font-size: clamp(36px, 5.4vw, 72px); }
.finale .intro { margin-left: auto; margin-right: auto; }
.finale .actions { justify-content: center; }
.finale-crown { display: flex; justify-content: center; margin-bottom: 32px; filter: drop-shadow(0 0 22px rgba(31, 168, 255, 0.45)); }

/* Code Crown */
.crown { display: block; flex: none; }
.cc-digits { font-family: var(--mono); font-weight: 800; fill: var(--blue); }
.cc-gems { fill: var(--green); }
.cc-fall { animation-timing-function: linear; animation-iteration-count: infinite; }

/* Prose pages (beta, security, legal, apply) */
main.wrap { padding-top: 3rem; padding-bottom: 1rem; }
.draft { background: var(--draft-bg); color: var(--draft-fg); padding: 0.75rem 16px; text-align: center; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
th, td { border: 1px solid var(--line-2); padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; }
th { background: var(--surface-2); }
code, pre { font-family: var(--mono); font-size: 0.88em; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--surface); border: 1px solid var(--line); padding: 1rem; border-radius: 12px; color: var(--fg-2); }
section.agents { max-width: 46rem; margin: 4rem auto 0; padding: 0 16px; }
.home section.agents { max-width: 1200px; padding: 0 24px; }
.apply-grid { display: grid; gap: 2rem; }
form.apply { background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 1.5rem; }
form.apply label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
form.apply input[type="email"], form.apply input[type="number"] { width: 100%; font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--line-3); border-radius: 10px; background: var(--bg); color: var(--fg); }
form.apply .consent { display: flex; gap: 0.6rem; align-items: flex-start; }
form.apply .consent input { margin-top: 0.4rem; }
form.apply .consent label { font-weight: 400; }
form.apply button { font: 500 16px var(--body); min-height: 48px; padding: 0.6rem 1.6rem; border: 0; border-radius: 999px; background: var(--blue); color: #03111c; cursor: pointer; }
form.apply button:hover { background: var(--blue-hi); }
.notice { font-size: 0.93rem; color: var(--muted); }
.notice h2 { color: var(--fg); margin-top: 0; }
.small { font-size: 0.88rem; color: var(--muted); }
@media (min-width: 60rem) { .apply-grid { grid-template-columns: 1fr 1fr; } main.wrap { max-width: 50rem; } }

@media (prefers-reduced-motion: reduce) {
  .pulse, .rain span, .cc-fall { animation: none; }
}
/* Code Crown columns (generated by site/src/crown.js) */
@keyframes cc-drop-142_5{from{transform:translateY(0)}to{transform:translateY(142.5px)}}
.cc-small-0{animation-name:cc-drop-142_5;animation-duration:3.75s;animation-delay:-0.00s}
@keyframes cc-drop-85_5{from{transform:translateY(0)}to{transform:translateY(85.5px)}}
.cc-small-1{animation-name:cc-drop-85_5;animation-duration:2.25s;animation-delay:-0.61s}
.cc-small-2{animation-name:cc-drop-142_5;animation-duration:3.75s;animation-delay:-1.22s}
.cc-small-3{animation-name:cc-drop-85_5;animation-duration:2.25s;animation-delay:-1.83s}
.cc-small-4{animation-name:cc-drop-142_5;animation-duration:3.75s;animation-delay:-2.44s}
@keyframes cc-drop-120{from{transform:translateY(0)}to{transform:translateY(120px)}}
.cc-large-0{animation-name:cc-drop-120;animation-duration:3.16s;animation-delay:-0.00s}
@keyframes cc-drop-100{from{transform:translateY(0)}to{transform:translateY(100px)}}
.cc-large-1{animation-name:cc-drop-100;animation-duration:2.63s;animation-delay:-0.61s}
@keyframes cc-drop-80{from{transform:translateY(0)}to{transform:translateY(80px)}}
.cc-large-2{animation-name:cc-drop-80;animation-duration:2.11s;animation-delay:-1.22s}
.cc-large-3{animation-name:cc-drop-100;animation-duration:2.63s;animation-delay:-1.83s}
@keyframes cc-drop-140{from{transform:translateY(0)}to{transform:translateY(140px)}}
.cc-large-4{animation-name:cc-drop-140;animation-duration:3.68s;animation-delay:-2.44s}
.cc-large-5{animation-name:cc-drop-100;animation-duration:2.63s;animation-delay:-0.42s}
.cc-large-6{animation-name:cc-drop-80;animation-duration:2.11s;animation-delay:-1.55s}
.cc-large-7{animation-name:cc-drop-100;animation-duration:2.63s;animation-delay:-1.64s}
.cc-large-8{animation-name:cc-drop-120;animation-duration:3.16s;animation-delay:-1.72s}
@media (prefers-reduced-motion: reduce){.cc-fall{animation:none}}
