/* ══════════════════════════════════════════════════════════════════
   CTROLL — ctroll.com landing
   Palette locked by DEC-0014 / docs/BRAND_DIRECTION.md.
   Electric blue is the environment light of the hero; cyan is the
   sharp functional accent that matches the wordmark.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --gunmetal:   #0B1016;
  --void:       #070A0E;
  --slate:      #131B24;
  --slate-line: #1E2A36;
  --frost:      #EAF7F6;
  --mute:       #93A6B4;
  --dim:        #64788A;
  --cyan:       #20E6E0;
  --blue:       #3D8BFF;
  --violet:     #8E63FF;

  --shell: min(1200px, 92vw);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --step-0: clamp(1rem, .96rem + .2vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.5vw, 3.75rem);
  --step-4: clamp(2.6rem, 1.7rem + 4.4vw, 5.5rem);

  /* Aliases used by the control-plane rules below. */
  --bg: var(--void);
  --panel: rgba(15, 20, 28, .86);
  --line: var(--slate-line);
  --text: var(--frost);
  --muted: var(--mute);
  --green: #89F4BD;
  color-scheme: dark;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .08;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, transparent, black 40%, transparent 92%);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--frost);
  font: 400 var(--step-0)/1.68 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cyan); color: var(--void);
  padding: .7rem 1.1rem; font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.wrap { width: var(--shell); margin-inline: auto; }
.wrap--narrow { width: min(760px, 92vw); }

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.hero .eyebrow { text-shadow: 0 1px 14px rgba(4, 7, 10, .9); }
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  max-width: 90px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 55%, transparent), transparent);
}

/* ── Nav ───────────────────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.15rem clamp(1.1rem, 4vw, 3rem);
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--void) 86%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--slate-line);
}
.nav__brand img { width: clamp(112px, 13vw, 168px); }
.nav__links {
  display: flex; gap: 1.9rem; margin-left: auto;
  font-size: .885rem; color: var(--mute);
}
.nav__links a { text-decoration: none; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--frost); }
@media (max-width: 860px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }

/* ── Buttons ───────────────────────────────────────────────────── */

.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .82rem 1.5rem;
  font: 600 .92rem/1 "Space Grotesk", sans-serif;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1px solid var(--slate-line);
  background: var(--btn-bg);
  transition: transform .18s var(--ease), border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  --btn-bg: var(--cyan);
  color: var(--void);
  border-color: var(--cyan);
}
.btn--primary:hover { --btn-bg: #4bf2ec; }
.btn--ghost { color: var(--frost); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--cyan) 60%, transparent); }

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

.hero { position: relative; isolation: isolate; }

.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 50%;
  display: block;
}
/* Left scrim keeps the text-safe area readable, matching the locked
   composition: calm on the left, character action centre-right. */
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg,
      color-mix(in srgb, var(--void) 68%, transparent) 0%,
      color-mix(in srgb, var(--void) 52%, transparent) 30%,
      color-mix(in srgb, var(--void) 20%, transparent) 58%,
      transparent 82%),
    linear-gradient(0deg,
      var(--void) 0%,
      color-mix(in srgb, var(--void) 32%, transparent) 26%,
      transparent 52%);
}
.hero__edge {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--blue) 45%, transparent) 40%, transparent);
}

.hero__body {
  width: var(--shell); margin-inline: auto;
  padding: clamp(9rem, 17vh, 13rem) 0 clamp(5rem, 12vh, 8rem);
  max-width: none;
}
.hero__title {
  text-shadow: 0 2px 28px rgba(4, 7, 10, .92), 0 1px 4px rgba(4, 7, 10, .8);
  font-size: var(--step-4);
  font-weight: 700;
  max-width: 14ch;
  margin-bottom: 1.6rem;
}
.hero__title em {
  font-style: normal;
  color: var(--cyan);
}
.hero__lede {
  text-shadow: 0 1px 16px rgba(4, 7, 10, .95);
  font-size: var(--step-1);
  color: #A9BAC6;
  max-width: 44ch;
  line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.4rem; }
.hero__actions--center { justify-content: center; margin-top: 2.8rem; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  list-style: none; margin: 3.4rem 0 0; padding: 0;
  font-size: .82rem; letter-spacing: .04em; color: var(--dim);
}
.hero__meta li { display: flex; align-items: center; gap: .55rem; }
.hero__meta li::before {
  content: ""; width: 5px; height: 5px;
  background: var(--cyan);
  box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) 70%, transparent);
}

/* Full-bleed 16:9 shows roughly a quarter of the frame on a phone, so the
   hero becomes a stacked 16:9 block with the copy beneath it instead. */
@media (max-width: 780px) {
  .hero { display: flex; flex-direction: column; }
  .hero__media {
    position: relative; inset: auto; z-index: 0;
    aspect-ratio: 16 / 9; width: 100%;
    margin-top: 4.6rem;
  }
  .hero__video { object-position: 58% 50%; }
  .hero__scrim {
    background: linear-gradient(0deg, var(--void) 2%, transparent 62%);
  }
  .hero__body { padding: 2.4rem 0 3.5rem; }
  .hero__title { max-width: none; }
  .hero__lede { max-width: none; }
}

/* ── Sections ──────────────────────────────────────────────────── */

.section { padding: clamp(5.5rem, 12vw, 9.5rem) clamp(1.1rem, 4vw, 3rem); position: relative; }
.section + .section { border-top: 1px solid var(--slate-line); }
.section__title { font-size: var(--step-3); max-width: 20ch; }
.section__lede {
  font-size: var(--step-1); color: var(--mute);
  max-width: 56ch; margin-top: 1.5rem; line-height: 1.6;
}

/* ── Story ─────────────────────────────────────────────────────── */

.section--story { background: linear-gradient(180deg, var(--void), var(--gunmetal)); }
.story { max-width: 62ch; margin-top: 2.4rem; display: grid; gap: 1.35rem; color: var(--mute); }
.story__lead { font-size: var(--step-1); color: var(--frost); line-height: 1.55; }
.story__turn {
  font-family: "Space Grotesk", sans-serif;
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--frost);
  letter-spacing: -.02em;
  line-height: 1.18;
  margin: 1.1rem 0 .3rem;
  padding-left: 1.4rem;
  border-left: 2px solid var(--cyan);
  text-wrap: balance;
}

.ledger {
  list-style: none; padding: 0;
  margin: 3.6rem 0 0;
  border-top: 1px solid var(--slate-line);
}
.ledger li {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--slate-line);
}
.ledger__k {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600; font-size: .95rem;
  color: var(--frost);
}
.ledger__v { color: var(--dim); font-size: .95rem; }
@media (max-width: 620px) { .ledger li { grid-template-columns: 1fr; gap: .3rem; } }

/* ── Steps ─────────────────────────────────────────────────────── */

.section--how { background: var(--gunmetal); }
.steps {
  list-style: none; padding: 0;
  margin: 3.8rem 0 0;
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  background: var(--slate-line);
  border: 1px solid var(--slate-line);
}
.step {
  background: var(--gunmetal);
  padding: 2.1rem 1.9rem 2.3rem;
  position: relative;
  transition: background .25s var(--ease);
}
.step:hover { background: var(--slate); }
.step__n {
  font-family: "Space Grotesk", sans-serif;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em;
  color: var(--cyan);
  display: block; margin-bottom: 1.4rem;
}
.step h3 { font-size: 1.28rem; margin-bottom: .7rem; }
.step p { color: var(--dim); font-size: .95rem; line-height: 1.65; }
.step em { font-style: normal; color: var(--mute); }

/* ── Cinematic band ────────────────────────────────────────────── */

/* The page is text-dense by design; this is the one place it breathes.
   No copy sits on top of it, so nothing competes with the image. */
.band {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--slate-line);
  background: var(--void);
}
.band img {
  width: 100%;
  aspect-ratio: 2.7 / 1;
  object-fit: cover;
  object-position: 50% 42%;
}
.band::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--void) 55%, transparent), transparent 26%),
    linear-gradient(0deg, color-mix(in srgb, var(--void) 60%, transparent), transparent 30%);
}
@media (max-width: 780px) {
  .band img { aspect-ratio: 16 / 10; object-position: 56% 45%; }
}

/* ── Agents ────────────────────────────────────────────────────── */

.section--agents { background: linear-gradient(180deg, var(--gunmetal), var(--void)); }
.agents {
  margin-top: 3.8rem;
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  background: var(--slate-line);
  border: 1px solid var(--slate-line);
}
.agent {
  background: var(--void);
  padding: 1.85rem 1.7rem 2rem;
  transition: background .25s var(--ease);
}
.agent:hover { background: var(--slate); }
.agent h3 { font-size: 1.14rem; }
.agent__role {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); margin: .55rem 0 1rem;
}
.agent p:last-child { color: var(--mute); font-size: .92rem; line-height: 1.6; }

.agent--lead {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, var(--slate), var(--void) 62%);
  border-left: 2px solid var(--cyan);
}
.agent--lead h3 { font-size: var(--step-2); }
.agent--lead .agent__role { color: var(--cyan); }
.agent--lead p:last-child { max-width: 54ch; font-size: 1.02rem; }

/* ── Control cards ─────────────────────────────────────────────── */

.section--control { background: var(--void); }
.cards {
  margin-top: 3.8rem;
  display: grid; gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
}
.card {
  border: 1px solid var(--slate-line);
  background: linear-gradient(160deg, var(--gunmetal), var(--void));
  padding: 1.9rem 1.75rem 2rem;
  position: relative;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: -1px auto auto -1px;
  width: 34px; height: 2px; background: var(--cyan);
  opacity: .8;
}
.card:hover { border-color: color-mix(in srgb, var(--cyan) 40%, var(--slate-line)); transform: translateY(-2px); }
.card h3 { font-size: 1.16rem; margin-bottom: .8rem; }
.card p { color: var(--dim); font-size: .93rem; line-height: 1.65; }

/* ── Honest status ─────────────────────────────────────────────── */

.section--status { background: linear-gradient(180deg, var(--void), var(--gunmetal)); text-align: center; }
.section--status .eyebrow { justify-content: center; }
.section--status .hero .eyebrow { text-shadow: 0 1px 14px rgba(4, 7, 10, .9); }
.eyebrow::after { display: none; }
.section--status .section__title { max-width: none; margin-inline: auto; }
.status { margin-top: 2.4rem; display: grid; gap: 1.25rem; color: var(--mute); }
.status p { font-size: 1.02rem; line-height: 1.68; }
.status__limit {
  border-top: 1px solid var(--slate-line);
  padding-top: 1.5rem; margin-top: .5rem;
  color: var(--dim); font-size: .93rem;
}

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

.foot {
  padding: 3rem clamp(1.1rem, 4vw, 3rem);
  border-top: 1px solid var(--slate-line);
  background: var(--gunmetal);
}
.foot__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.4rem;
}
.foot__logo { width: 104px; opacity: .55; }
.foot__note { color: var(--dim); font-size: .84rem; }

/* ── Reveal ────────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
}

/* ══════════════════════════════════════════════════════════════════
   EVIDENCE RECEIPT
   The record shape the control plane actually writes, rendered as real
   markup rather than a screenshot, so it stays readable and selectable.
   ══════════════════════════════════════════════════════════════════ */

.section--evidence { background: var(--gunmetal); }

.receipt {
  margin-top: 3.4rem;
  border: 1px solid var(--slate-line);
  background: var(--panel);
}
.receipt__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem 1.3rem;
  border-bottom: 1px solid var(--slate-line);
}
.receipt__head h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.receipt__cost {
  font: 600 .68rem ui-monospace, monospace;
  letter-spacing: .1em;
  color: var(--green);
  white-space: nowrap;
}
.receipt__body { display: grid; grid-template-columns: 1.15fr 1fr; }
.receipt__col { padding: 1.5rem 1.4rem; }
.receipt__col--trace { border-left: 1px solid var(--slate-line); }
.receipt__note {
  margin-top: 1.6rem; padding-top: 1.1rem;
  border-top: 1px solid var(--slate-line);
  color: var(--dim); font-size: .82rem; line-height: 1.6;
}
.receipt__foot {
  padding: .9rem 1.3rem;
  border-top: 1px solid var(--slate-line);
  color: var(--dim);
  font: .74rem/1.6 ui-monospace, monospace;
}

.verdicts { list-style: none; margin: .5rem 0 1.6rem; padding: 0 0 0 1.45rem; }
.verdicts li {
  display: grid;
  grid-template-columns: 5.2rem auto;
  gap: .2rem .7rem;
  padding: .5rem 0 .5rem .9rem;
  border-left: 1px solid var(--slate-line);
  font: .74rem ui-monospace, monospace;
}
.verdicts span { color: var(--dim); }
.verdicts b { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.verdicts em {
  grid-column: 2; font-style: normal;
  color: var(--mute); font-family: Inter, sans-serif; font-size: .82rem;
}
.verdicts__no b { color: #FFC66D; }
.verdicts__no { border-left-color: #FFC66D; }
.verdicts__yes b { color: var(--green); }
.verdicts__yes { border-left-color: color-mix(in srgb, var(--green) 55%, transparent); }

.label {
  color: var(--muted);
  font: 800 .6rem ui-monospace, monospace;
  letter-spacing: .14em;
  margin-bottom: .9rem;
}
.label--spaced { margin-top: 2rem; }

@media (max-width: 820px) {
  .receipt__body { grid-template-columns: 1fr; }
  .receipt__col--trace { border-left: 0; border-top: 1px solid var(--slate-line); }
  .receipt__head { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   MISSION CONTROL
   The live control plane, sharing one page and one service with the
   public copy above. Only this section is gated by the owner session.
   ══════════════════════════════════════════════════════════════════ */

.section--console {
  background:
    radial-gradient(circle at 84% 6%, #142536 0, transparent 30%),
    radial-gradient(circle at 12% 42%, #151023 0, transparent 30%),
    var(--void);
  position: relative; z-index: 2;
}
.console__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: var(--step-3);
  letter-spacing: -.03em;
  line-height: 1.04;
}
.console__title em { font-style: normal; color: var(--cyan); }

.console-state {
  display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center;
  margin-top: 2.2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-line);
  font: 700 .64rem ui-monospace, monospace; letter-spacing: .14em;
  color: var(--muted);
}
.system-state i {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 12px var(--green); margin-right: 8px;
}
.scope-chip, .owner-chip { color: var(--dim); }

/* Owner lock. Inline, not an overlay: the public page must stay readable. */
.lock { margin-top: 2.4rem; }
.lock[hidden] { display: none; }
.lock__card {
  width: min(440px, 100%);
  border: 1px solid var(--slate-line);
  background: var(--gunmetal);
  padding: 1.9rem;
}
.lock__card h3 { font-size: 1.25rem; margin: .7rem 0 .6rem; }
.lock__card p { color: var(--muted); line-height: 1.6; font-size: .92rem; }
.lock__card input {
  width: 100%; border: 1px solid var(--slate-line); background: var(--void);
  color: var(--frost); padding: .85rem; margin: 1rem 0 .75rem; outline: none;
  font: inherit;
}
.lock__card button {
  width: 100%; border: 0; background: var(--cyan); color: #031313;
  padding: .9rem; font: 900 .64rem ui-monospace, monospace; letter-spacing: .1em;
  cursor: pointer;
}
#control-surface[hidden] { display: none; }

.step { color: var(--cyan); font: 700 .64rem ui-monospace, monospace; letter-spacing: .1em; }

.command-panel {
  margin-top: 2.4rem;
  border: 1px solid var(--slate-line);
  background: linear-gradient(135deg, rgba(22,31,40,.92), rgba(12,15,22,.92));
  box-shadow: 0 25px 80px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.03);
}
.panel-heading, .section-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--slate-line);
}
.panel-heading > div:first-child { display: flex; align-items: center; gap: .8rem; }
.panel-heading h3, .section-title h3 {
  margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em;
}
.mode-switch { border: 1px solid var(--slate-line); padding: 3px; display: flex; }
.mode {
  background: transparent; color: var(--muted); border: 0; padding: .45rem .8rem;
  font: 800 .62rem ui-monospace, monospace; cursor: pointer;
}
.mode.active { color: #061011; background: var(--cyan); }

#mission-form textarea {
  width: 100%; min-height: 125px; resize: vertical; border: 0; outline: 0;
  padding: 1.5rem; background: transparent; color: var(--text);
  font: 500 1.15rem/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
}
.command-footer {
  min-height: 66px; padding: .75rem 1rem .75rem 1.5rem;
  border-top: 1px solid var(--slate-line);
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
}
.limits {
  display: flex; gap: 1.25rem; color: var(--muted);
  font: 600 .62rem ui-monospace, monospace; text-transform: uppercase;
}
.limits span::before { content: "\2713"; color: var(--green); margin-right: 6px; }
.launch {
  border: 0; background: var(--cyan); color: #031313; padding: .95rem 1.15rem;
  font: 900 .68rem ui-monospace, monospace; letter-spacing: .08em; cursor: pointer;
  box-shadow: 0 0 28px rgba(32,230,224,.16);
}
.launch:hover { filter: brightness(1.12); }
.launch:disabled { opacity: .5; cursor: wait; }
.launch b { margin-left: 1.1rem; }

.overview { margin-top: 3.4rem; }
.section-title { padding-left: 0; padding-right: 0; }
.section-title h3 { margin-right: auto; }
#refresh {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: 700 .62rem ui-monospace, monospace; letter-spacing: .12em;
}
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--slate-line); margin: 1.4rem 0;
}
.metrics article {
  padding: 1.25rem; border: 1px solid var(--slate-line); border-left: 0;
  background: rgba(14,18,25,.58);
}
.metrics small {
  display: block; color: var(--muted);
  font: 700 .56rem ui-monospace, monospace; letter-spacing: .16em;
}
.metrics strong { display: block; font: 500 2rem ui-monospace, monospace; margin: .6rem 0 .2rem; }
.metrics span { color: var(--dim); font-size: .7rem; }
.metrics .safe strong { color: var(--green); }

.disclosure {
  margin-bottom: 1rem; border-left: 2px solid #FFC66D;
  background: rgba(255,198,109,.07); color: var(--mute); padding: .75rem .95rem;
  font: .64rem/1.55 ui-monospace, monospace;
}
.disclosure b { color: #FFC66D; margin-right: .5rem; }
.empty {
  border: 1px dashed var(--slate-line); padding: 2.6rem; text-align: center;
  color: var(--muted);
}
.empty[hidden] { display: none; }

.mission-grid { display: grid; gap: 1rem; }
.mission { border: 1px solid var(--slate-line); background: var(--panel); overflow: hidden; }
.mission-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 1.1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--slate-line);
}
.status {
  padding: .35rem .55rem; border: 1px solid currentColor; color: var(--cyan);
  font: 800 .56rem ui-monospace, monospace; text-transform: uppercase;
  white-space: nowrap;
}
.status.succeeded { color: var(--green); }
.status.paused, .status.awaiting_plan_approval { color: #FFC66D; }
.mission h3 { margin: 0 0 .3rem; font-size: 1rem; }
.mission-head > div { min-width: 0; }
.mission h3, .mission-id { overflow-wrap: anywhere; }
.mission-id { color: var(--muted); font: .62rem ui-monospace, monospace; }
.actions { display: flex; gap: .45rem; }
.actions button {
  border: 1px solid #3A4A54; background: #121923; color: var(--text);
  padding: .5rem .6rem; font: 700 .56rem ui-monospace, monospace; cursor: pointer;
}
.mission-body { display: grid; grid-template-columns: 1fr 1fr; }
.tasks, .trace { padding: 1.1rem 1.25rem; }
.trace { border-left: 1px solid var(--slate-line); }

.task { display: grid; grid-template-columns: 13px 1fr auto; gap: .65rem; align-items: start; margin: .7rem 0; }
.task-dot { margin-top: 4px; width: 8px; height: 8px; border: 1px solid var(--cyan); border-radius: 50%; }
.task.accepted .task-dot { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(137,244,189,.5); }
.task strong { font-size: .82rem; display: block; }
.task small { color: var(--muted); font-size: .68rem; }
.attempts { color: var(--violet); font: .58rem ui-monospace, monospace; white-space: nowrap; }

.trace-row {
  display: grid; grid-template-columns: 4.6rem 1fr auto; gap: .65rem;
  padding: .45rem 0; border-bottom: 1px solid rgba(30,42,54,.6);
  font: .68rem ui-monospace, monospace; color: var(--mute);
}
.trace-row span:first-child { color: var(--cyan); }
.trace-row i { font-style: normal; color: var(--green); }

.timeline { display: flex; flex-wrap: wrap; gap: .4rem; }
.mission-body .timeline {
  grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto;
  padding: .75rem 1.25rem; border-top: 1px solid var(--slate-line);
}
.event {
  flex: 0 0 auto; color: var(--dim); border: 1px solid #263740;
  padding: .3rem .5rem; font: .55rem ui-monospace, monospace; text-transform: uppercase;
}

#toast {
  position: fixed; right: 24px; bottom: 32px; max-width: 360px;
  padding: .85rem 1.1rem; color: #071112; background: var(--cyan);
  font-size: .8rem; opacity: 0; transform: translateY(12px);
  transition: .2s; pointer-events: none; z-index: 40;
}
#toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .mission-head { grid-template-columns: 1fr; align-items: start; }
  .actions { flex-wrap: wrap; }
  .mission-body { grid-template-columns: 1fr; }
  .trace { border-left: 0; border-top: 1px solid var(--slate-line); }
  .command-footer { align-items: stretch; flex-direction: column; }
  .limits { flex-wrap: wrap; }
  .launch { width: 100%; }
}


/* ══════════════════════════════════════════════════════════════════
   GLASS PANELS
   Same construction as the StartFunder panels: generous corner radius,
   translucent fill over a blurred backdrop, one wide soft shadow, and a
   large rotated colour bloom anchored off the top-right corner. Adapted
   to a dark ground, so the bloom is cyan and violet on charcoal rather
   than blue and violet on white.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --r: 28px;
  --r-in: 18px;
  --r-btn: 14px;
  --r-sm: 12px;
  --sh: 0 22px 60px rgba(0, 0, 0, .42);
  --sh2: 0 12px 34px rgba(0, 0, 0, .34);
}

.glass,
.step,
.agent,
.card,
.receipt,
.command-panel,
.lock__card,
.mission {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background:
    linear-gradient(157deg,
      rgba(226, 244, 255, .085) 0%,
      rgba(226, 244, 255, .035) 46%,
      rgba(226, 244, 255, .018) 100%);
  border: 1px solid rgba(176, 216, 238, .19);
  box-shadow: var(--sh), inset 0 1px 0 rgba(255, 255, 255, .09);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  backdrop-filter: blur(18px) saturate(155%);
}

/* The bloom is the signature. Anchored outside the corner and rotated, so
   it reads as light caught in the glass rather than as a gradient fill. */
.glass::before,
.step::before,
.agent::before,
.card::before,
.receipt::before,
.command-panel::before,
.lock__card::before {
  content: "";
  position: absolute;
  inset: -160px -160px auto auto;
  width: 560px;
  height: 560px;
  background:
    radial-gradient(circle at 30% 30%, rgba(32, 230, 224, .26), transparent 58%),
    radial-gradient(circle at 60% 60%, rgba(142, 99, 255, .22), transparent 58%);
  transform: rotate(12deg);
  pointer-events: none;
}
/* Small panels would be swamped by a 560px bloom. */
.step::before,
.agent::before,
.card::before {
  inset: -110px -110px auto auto;
  width: 380px;
  height: 380px;
}
.step > *,
.agent > *,
.card > *,
.receipt > *,
.command-panel > *,
.lock__card > *,
.glass > * { position: relative; }

.steps,
.agents {
  background: none;
  border: 0;
  gap: 1.05rem;
}
.step:hover,
.agent:hover,
.card:hover {
  background:
    linear-gradient(157deg,
      rgba(226, 244, 255, .125) 0%,
      rgba(226, 244, 255, .05) 46%,
      rgba(226, 244, 255, .022) 100%);
  border-color: rgba(176, 216, 238, .32);
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5);
}
.step, .agent, .card {
  transition: background .28s var(--ease), border-color .28s var(--ease),
              transform .28s var(--ease), box-shadow .28s var(--ease);
}

/* Rounded corners have to reach the smaller pieces too, or the page reads
   as rounded panels containing square parts. */
.btn { border-radius: var(--r-btn); }
.metrics { border-left: 0; gap: .8rem; display: grid; }
.metrics article {
  border: 1px solid rgba(176, 216, 238, .17);
  border-radius: var(--r-in);
  background: linear-gradient(157deg, rgba(226,244,255,.075), rgba(226,244,255,.02));
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
}
.mode-switch { border-radius: var(--r-btn); overflow: hidden; }
.mode { border-radius: calc(var(--r-btn) - 4px); }
.launch, .lock__card button, .lock__card input, .actions button, #mission-form textarea {
  border-radius: var(--r-btn);
}
.empty { border-radius: var(--r-in); }
.disclosure { border-radius: var(--r-sm); }
.status, .event { border-radius: 999px; }
.band { border-radius: 0; }
#toast { border-radius: var(--r-btn); }

@supports not (backdrop-filter: blur(4px)) {
  /* Without backdrop blur the fill must carry the contrast on its own. */
  .glass, .step, .agent, .card, .receipt,
  .command-panel, .lock__card, .metrics article, .mission {
    background: #16202B;
  }
}

/* ── Hero glass panel ──────────────────────────────────────────────── */

.hero__glass {
  max-width: 39rem;
  padding: 2.3rem 2.4rem 2.5rem;
}
.hero__glass .hero__title {
  /* Inside a panel the line no longer has to carry the whole frame. */
  font-size: var(--step-3);
  max-width: 16ch;
  margin-bottom: 1.15rem;
  text-shadow: none;
}
.hero__glass .hero__lede {
  font-size: 1.02rem;
  max-width: 42ch;
  color: #B6C6D2;
  text-shadow: none;
}
.hero__glass .hero__meta { margin-top: 2rem; }
.hero__glass .hero__actions { margin-top: 1.9rem; }
.hero .eyebrow { text-shadow: none; }

/* The panel carries the contrast, so the wash over the film can drop a long
   way and let the terrace read across the whole frame. */
.hero__scrim {
  background:
    linear-gradient(100deg,
      color-mix(in srgb, var(--void) 34%, transparent) 0%,
      color-mix(in srgb, var(--void) 22%, transparent) 38%,
      transparent 72%),
    linear-gradient(0deg,
      var(--void) 0%,
      color-mix(in srgb, var(--void) 24%, transparent) 22%,
      transparent 46%);
}

/* Wider shell seats the panel further left in the frame. */
.hero__body {
  width: min(1420px, 94vw);
  padding-top: clamp(8rem, 15vh, 11rem);
  padding-bottom: clamp(4.5rem, 11vh, 7rem);
}

/* Bigger wordmark in the corner, where a logo belongs. */
.nav__brand img { width: clamp(148px, 17vw, 226px); }
.nav { padding-block: 1rem; }

@media (max-width: 780px) {
  .hero__glass { max-width: none; padding: 1.7rem 1.5rem 1.9rem; }
  .hero__body { width: min(1420px, 92vw); }
  .nav__brand img { width: clamp(124px, 32vw, 168px); }
}

/* ── Ambient loop in the process section ───────────────────────────── */

.loop {
  margin: 3.4rem 0 0;
  padding: 0;
}
.loop__video {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: 50% 46%;
}
.loop figcaption {
  position: relative;
  padding: .85rem 1.2rem;
  border-top: 1px solid rgba(158, 204, 228, .12);
  color: var(--dim);
  font: .72rem/1.5 ui-monospace, monospace;
  letter-spacing: .04em;
}
.steps { margin-top: 1.05rem; }
@media (max-width: 780px) {
  .loop__video { aspect-ratio: 16 / 10; }
}

/* ── Orchestrator portrait ─────────────────────────────────────────── */

.agent--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 21rem) 1fr;
  gap: 0;
  padding: 0;
}
.agent--lead::before { inset: -160px -160px auto auto; width: 560px; height: 560px; }
.agent__portrait {
  width: 100%;
  height: 100%;
  min-height: 15rem;
  object-fit: cover;
  object-position: 52% 32%;
}
.agent__lead-copy { padding: 1.9rem 2rem 2rem; align-self: center; }
.agent--lead h3 { font-size: var(--step-2); }
.agent--lead .agent__role { color: var(--cyan); }
.agent--lead p:last-child { max-width: 52ch; font-size: 1.02rem; }

@media (max-width: 720px) {
  .agent--lead { grid-template-columns: 1fr; }
  .agent__portrait { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  .step:hover, .agent:hover, .card:hover { transform: none; }
}

/* The bloom is rotated per panel so a grid of six does not look stamped from
   one template. Same construction, different angle and corner each time. */
.step:nth-child(2n)::before,
.agent:nth-child(2n)::before,
.card:nth-child(2n)::before {
  transform: rotate(-18deg);
  inset: -120px auto auto -110px;
}
.step:nth-child(3n)::before,
.agent:nth-child(3n)::before,
.card:nth-child(3n)::before {
  transform: rotate(34deg);
  inset: auto -130px -140px auto;
}
.step:nth-child(5n)::before,
.agent:nth-child(5n)::before,
.card:nth-child(5n)::before {
  transform: rotate(-6deg);
  inset: -130px auto auto 40%;
}
.receipt::before { transform: rotate(-14deg); }
.command-panel::before { transform: rotate(22deg); }
.lock__card::before { transform: rotate(-24deg); inset: -140px auto auto -120px; }

/* ── Ground behind the glass ───────────────────────────────────────────
   A translucent panel over a flat surface is just a flat surface. Each
   section gets large, soft colour fields so the panels have something to
   sit on and refract. This is what makes the glass legible at all.       */

.section--how,
.section--agents,
.section--control,
.section--evidence,
.section--console {
  position: relative;
  isolation: isolate;
}
.section--how::before,
.section--agents::before,
.section--control::before,
.section--evidence::before,
.section--console::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.section--how::before {
  background:
    radial-gradient(58% 46% at 14% 12%, rgba(32, 230, 224, .11), transparent 62%),
    radial-gradient(52% 44% at 88% 74%, rgba(61, 139, 255, .12), transparent 62%);
}
.section--agents::before {
  background:
    radial-gradient(56% 48% at 82% 10%, rgba(142, 99, 255, .12), transparent 62%),
    radial-gradient(50% 42% at 8% 78%, rgba(32, 230, 224, .09), transparent 62%);
}
.section--evidence::before {
  background:
    radial-gradient(60% 50% at 76% 16%, rgba(61, 139, 255, .13), transparent 62%),
    radial-gradient(46% 40% at 10% 88%, rgba(142, 99, 255, .08), transparent 62%);
}
.section--control::before {
  background:
    radial-gradient(54% 44% at 20% 84%, rgba(32, 230, 224, .10), transparent 62%),
    radial-gradient(58% 48% at 90% 18%, rgba(61, 139, 255, .10), transparent 62%);
}
.section--console::before {
  background:
    radial-gradient(52% 46% at 12% 16%, rgba(61, 139, 255, .13), transparent 62%),
    radial-gradient(48% 44% at 86% 82%, rgba(142, 99, 255, .10), transparent 62%);
}

/* The flat fills underneath would cancel the colour, so they lighten a step
   and let the fields through. */
.section--how { background: #0C131B; }
.section--agents { background: linear-gradient(180deg, #0C131B, #090E14); }
.section--evidence { background: #0C131B; }
.section--control { background: #090E14; }
