:root {
  color-scheme: light dark;
  --ink: #0f1113;
  --ink-2: #171a1e;
  --paper: #ece8df;
  --paper-2: #f7f4ed;
  --red: #ff4655;
  --cyan: #55d7de;
  --gold: #d9b66f;
  --violet: #a879f0;
  --line: rgba(15, 17, 19, 0.18);
  --line-dark: rgba(255, 255, 255, 0.18);
  --nav-height: 72px;
  --max-width: 1480px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--ink);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
select,
input,
textarea {
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--paper-2);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 clamp(20px, 3vw, 48px);
  background: rgba(15, 17, 19, 0.96);
  color: white;
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-weight: 900;
  font-size: 20px;
}

.brand small {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink);
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 32px);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding: 26px 0 24px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 15px;
  height: 3px;
  background: var(--red);
  transition: right 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  right: 0;
}

.nav-action {
  justify-self: end;
  padding: 12px 18px;
  background: var(--red);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 91% 100%, 0 100%);
}

.hero {
  position: relative;
  height: calc(100svh - var(--nav-height) - 32px);
  min-height: 560px;
  margin-top: var(--nav-height);
  overflow: hidden;
  background: #0c0e10;
  color: white;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 10px;
  z-index: -3;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: contain;
  object-position: center center;
  background: #0c0e10;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(4, 5, 6, 0.2);
  pointer-events: none;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  left: 0;
  top: 13%;
  width: 8px;
  height: 44%;
  background: var(--red);
}

.hero::after {
  right: 0;
  bottom: 12%;
  width: 22%;
  height: 1px;
  background: rgba(255, 255, 255, 0.55);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 5.8vw, 96px);
  top: clamp(72px, 11vh, 140px);
  max-width: min(540px, 44vw);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.9);
}

.eyebrow {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: rgba(15, 17, 19, 0.62);
}

.hero h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(88px, 13vw, 220px);
  line-height: 0.76;
  font-weight: 900;
}

.hero-lede {
  max-width: 460px;
  margin: 28px 0 0;
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.55;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 0;
  color: inherit;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 94% 100%, 0 100%);
}

.button-primary {
  background: var(--red);
  color: var(--ink);
  border-color: var(--red);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: white;
  border-color: white;
}

.button-ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(15, 17, 19, 0.5);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: white;
  color: var(--ink);
}

.hero-status {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(20px, 4vh, 48px);
  display: grid;
  gap: 8px;
  width: min(330px, 32vw);
  padding: 18px 20px;
  background: rgba(15, 17, 19, 0.78);
  border-left: 3px solid var(--cyan);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
}

.hero-status span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.hero-status b {
  color: var(--cyan);
}

.mission-band {
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.4fr;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(20px, 4vw, 64px);
  background: var(--red);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-band span {
  color: rgba(15, 17, 19, 0.5);
}

.section {
  padding: clamp(72px, 8vw, 130px) clamp(20px, 5vw, 80px);
}

.section-heading {
  width: min(100%, var(--max-width));
  margin: 0 auto 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 40px;
  align-items: end;
}

.section-heading h2,
.studio-copy h2 {
  margin: 0;
  max-width: 850px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(46px, 6vw, 96px);
  line-height: 0.92;
  text-transform: uppercase;
}

.section-intro {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
}

.on-dark {
  color: white;
}

.command-section,
.workflow-section {
  background: var(--paper-2);
}

.mode-switch {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: flex;
  border-bottom: 1px solid var(--line);
}

.mode-button {
  min-width: 160px;
  padding: 16px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-button.is-active {
  background: var(--ink);
  color: white;
}

.command-grid {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 650px;
  border: 1px solid var(--line);
  border-top: 0;
  background: white;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: #e3ded4;
}

.filters label,
.draft-form label,
.search-field {
  display: grid;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid rgba(15, 17, 19, 0.35);
  border-radius: 0;
  background: white;
  color: var(--ink);
}

select,
input {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.reset-button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.reset-button:hover,
.reset-button:focus-visible {
  background: var(--ink);
  color: white;
}

.boundary-note {
  margin-top: auto;
  padding: 18px;
  border-left: 3px solid var(--red);
  background: var(--ink);
  color: white;
}

.boundary-note span {
  color: var(--red);
  font: 800 10px Consolas, monospace;
}

.boundary-note p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.command-panel {
  min-width: 0;
  padding: 28px;
}

.view-panel {
  min-height: 100%;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  font-size: 22px;
  text-transform: uppercase;
}

.panel-head span {
  color: rgba(15, 17, 19, 0.55);
  font: 800 10px Consolas, monospace;
}

.signal-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.signal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.48fr);
  gap: 12px 26px;
  padding: 26px 22px 26px 28px;
  background: white;
}

.signal-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--gold);
}

.signal-card.priority-p0::before {
  background: var(--red);
}

.signal-card.priority-p1::before {
  background: var(--cyan);
}

.signal-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font: 800 10px Consolas, monospace;
  text-transform: uppercase;
  color: rgba(15, 17, 19, 0.62);
}

.signal-meta span,
.signal-meta time {
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.signal-meta .priority {
  color: var(--red);
}

.signal-card h4 {
  margin: 2px 0 0;
  font-size: clamp(19px, 2vw, 28px);
}

.signal-card > p {
  margin: 0;
  color: rgba(15, 17, 19, 0.72);
  line-height: 1.55;
}

.next-action {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #f0ede5;
  font-size: 13px;
  line-height: 1.5;
}

.next-action b {
  color: var(--red);
  font-size: 10px;
  text-transform: uppercase;
}

.signal-card > a {
  width: fit-content;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 2px solid var(--red);
}

.empty-state {
  margin: 0;
  padding: 40px 24px;
  background: white;
  text-align: center;
}

.search-field {
  margin: 24px 0;
}

.watchlist-table {
  border: 1px solid var(--line);
}

.watch-row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr 0.8fr 0.8fr;
  min-height: 58px;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.watch-row:last-child {
  border-bottom: 0;
}

.watch-header {
  min-height: 42px;
  background: var(--ink);
  color: white;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--cyan);
  border-radius: 50%;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
}

.metric-grid article {
  display: grid;
  gap: 9px;
  min-height: 160px;
  padding: 26px;
  background: #f7f5ef;
}

.metric-grid span,
.metric-grid small {
  font-size: 11px;
  text-transform: uppercase;
}

.metric-grid b {
  color: var(--red);
  font: 900 25px Consolas, monospace;
}

.account-policy {
  margin-top: 18px;
  padding: 22px;
  background: var(--ink);
  color: white;
  line-height: 1.65;
}

.account-policy p {
  margin: 0;
}

.agents-section {
  background: var(--ink);
}

.agent-grid {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.agent-card {
  position: relative;
  min-width: 0;
  background: var(--ink-2);
  color: white;
  border: 1px solid var(--line-dark);
  transition: transform 180ms ease, border-color 180ms ease;
}

.agent-card:hover,
.agent-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--red);
}

.agent-image-frame {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #090a0c;
  border-bottom: 1px solid var(--line-dark);
}

.agent-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.agent-card-copy {
  min-height: 190px;
  padding: 22px;
  border-top: 4px solid var(--red);
}

.agent-card.blue .agent-card-copy { border-top-color: var(--cyan); }
.agent-card.gold .agent-card-copy { border-top-color: var(--gold); }
.agent-card.violet .agent-card-copy { border-top-color: var(--violet); }

.agent-card-copy span {
  color: rgba(255, 255, 255, 0.58);
  font: 800 10px Consolas, monospace;
}

.agent-card-copy h3 {
  margin: 10px 0 6px;
  font: 900 clamp(40px, 4vw, 66px) Impact, sans-serif;
}

.agent-card-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
}

.pipeline {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.pipeline li {
  position: relative;
  min-height: 260px;
  padding: 28px 22px;
  border-right: 1px solid var(--ink);
}

.pipeline li:last-child {
  border-right: 0;
}

.pipeline li::after {
  content: "";
  position: absolute;
  top: 53px;
  right: -7px;
  z-index: 2;
  width: 12px;
  height: 12px;
  background: var(--red);
  transform: rotate(45deg);
}

.pipeline li:last-child::after {
  display: none;
}

.pipeline li > span {
  font: 900 12px Consolas, monospace;
  color: var(--red);
}

.pipeline h3 {
  margin: 36px 0 16px;
  font-size: 24px;
  text-transform: uppercase;
}

.pipeline p {
  margin: 0;
  color: rgba(15, 17, 19, 0.68);
  line-height: 1.65;
}

.pipeline .human {
  background: var(--ink);
  color: white;
}

.pipeline .human p {
  color: rgba(255, 255, 255, 0.7);
}

.studio-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(340px, 0.9fr) minmax(340px, 1.1fr);
  gap: 36px;
  background: #13161a;
  color: white;
}

.studio-copy,
.draft-form,
.draft-results {
  min-width: 0;
}

.studio-copy > p:not(.eyebrow) {
  max-width: 510px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.gate-seal {
  width: fit-content;
  margin-top: 30px;
  padding: 14px 20px;
  border: 2px solid var(--red);
  color: var(--red);
  transform: rotate(-2deg);
}

.gate-seal span,
.gate-seal b {
  display: block;
  font: 900 11px Consolas, monospace;
}

.draft-form {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
  background: #e9e5dc;
  color: var(--ink);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.button.full {
  width: 100%;
}

.draft-results {
  display: grid;
  align-content: start;
  gap: 12px;
}

.draft-card {
  padding: 20px;
  background: #20242a;
  border-left: 3px solid var(--cyan);
}

.draft-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cyan);
  font: 800 9px Consolas, monospace;
}

.draft-card p {
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.55;
}

.copy-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
  color: white;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: white;
  color: var(--ink);
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 44px;
  padding: 34px clamp(20px, 5vw, 80px);
  background: #08090a;
  color: white;
  border-top: 1px solid var(--line-dark);
}

.footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.footer > div:not(:first-child) {
  display: grid;
  gap: 4px;
}

.footer span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
}

.footer b,
.footer a {
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-section {
    grid-template-columns: 1fr 1fr;
  }

  .draft-results {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .signal-card {
    grid-template-columns: 1fr;
  }

  .next-action {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  :root { --nav-height: 62px; }

  .brand small,
  .nav-action {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .hero {
    height: calc(100svh - var(--nav-height) - 24px);
    min-height: 640px;
  }

  .hero-copy {
    top: 28px;
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .hero h1 {
    font-size: 84px;
  }

  .hero-lede {
    max-width: 360px;
    margin-top: 18px;
    font-size: 15px;
  }

  .hero-status {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }

  .mission-band {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 12px 20px;
  }

  .mission-band span {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mode-switch {
    overflow-x: auto;
  }

  .mode-button {
    min-width: 132px;
  }

  .command-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .boundary-note {
    margin-top: 0;
  }

  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline li {
    min-height: 170px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .pipeline li::after {
    top: auto;
    right: 30px;
    bottom: -7px;
  }

  .pipeline li:last-child {
    border-bottom: 0;
  }

  .studio-section {
    grid-template-columns: 1fr;
  }

  .draft-results {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .footer {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    min-height: 610px;
  }

  .hero-image {
    object-position: center 58%;
  }

  .hero-copy .eyebrow {
    max-width: 240px;
  }

  .hero-actions {
    gap: 8px;
  }

  .button {
    min-height: 44px;
    padding: 0 17px;
  }

  .hero-status {
    font-size: 9px;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .command-panel {
    padding: 18px;
  }

  .agent-grid {
    grid-template-columns: 1fr;
  }

  .agent-image-frame {
    aspect-ratio: 3 / 4;
  }

  .watch-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .watch-header {
    display: none;
  }

  .metric-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .footer {
    grid-template-columns: 1fr;
  }
}

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