:root {
  --navy: #09131f;
  --navy-2: #101f2e;
  --slate: #1f3445;
  --orange: #ff7a45;
  --orange-text: #96350f;
  --mint: #53d6b1;
  --cream: #f4f0e8;
  --paper: #fbfaf6;
  --ink: #172431;
  --muted: #64727c;
  --line: #d4d9d8;
  --red: #d14f4f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px clamp(18px, 5vw, 78px); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(9,19,31,.96); color: white; backdrop-filter: blur(16px); }
.atlas-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.atlas-brand img { width: 112px; height: 30px; object-fit: contain; object-position: left center; }
.atlas-brand span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.25); color: #aebac2; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; gap: 25px; color: #c7d0d6; font-size: 11px; font-weight: 800; }
nav a { text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--mint); }
.builder-marks { display: flex; align-items: center; gap: 8px; color: #83929d; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.builder-marks img { width: 28px; height: 28px; object-fit: contain; filter: brightness(0) invert(1); }
.hero { min-height: 690px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); align-items: center; gap: clamp(48px, 8vw, 130px); padding: clamp(70px, 10vw, 140px) clamp(22px, 7vw, 110px); background: var(--navy); color: white; position: relative; }
.hero::before { content: ""; position: absolute; left: 7vw; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.06); box-shadow: 18vw 0 rgba(255,255,255,.035), 36vw 0 rgba(255,255,255,.035), 54vw 0 rgba(255,255,255,.035), 72vw 0 rgba(255,255,255,.035), 86vw 0 rgba(255,255,255,.035); pointer-events: none; }
.hero-copy, .radar-card { position: relative; z-index: 1; }
.kicker { display: flex; align-items: center; gap: 13px; margin: 0; color: #9babb5; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kicker span { padding: 6px 9px; border: 1px solid var(--orange); color: var(--orange); }
h1, h2 { margin: 0; font-weight: 400; letter-spacing: -.055em; line-height: .96; }
h1 { max-width: 960px; margin-top: 26px; font-size: clamp(54px, 7.5vw, 112px); }
h1 strong { color: var(--orange); font-weight: 500; }
.lede { max-width: 760px; margin: 30px 0 0; color: #bdc8ce; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.button { min-width: 180px; padding: 14px 18px; text-align: center; text-decoration: none; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.button.signal { background: var(--orange); color: var(--navy); border: 1px solid var(--orange); }
.button.quiet { border: 1px solid #667580; color: white; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.boundary-note { max-width: 760px; margin: 28px 0 0; color: #8f9ea8; font-size: 11px; line-height: 1.65; }
.boundary-note b { color: var(--mint); }
.radar-card { padding: 25px; border: 1px solid #38505f; background: var(--navy-2); box-shadow: 14px 14px 0 rgba(83,214,177,.12); }
.radar-head { display: flex; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid #304656; color: #93a3ad; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.radar-head b { color: var(--mint); }
.radar-visual { width: 210px; height: 210px; margin: 28px auto; display: grid; place-content: center; position: relative; border: 1px solid #345062; border-radius: 50%; text-align: center; }
.radar-visual::before, .radar-visual::after { content: ""; position: absolute; background: #304757; }
.radar-visual::before { left: 0; right: 0; top: 50%; height: 1px; }
.radar-visual::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.radar-visual i { position: absolute; border: 1px solid #29404f; border-radius: 50%; }
.radar-visual i:nth-child(1) { inset: 22px; }
.radar-visual i:nth-child(2) { inset: 49px; }
.radar-visual i:nth-child(3) { width: 9px; height: 9px; left: 37px; top: 56px; background: var(--orange); border: 0; box-shadow: 111px 65px var(--mint), 55px 91px var(--orange); }
.radar-visual i:nth-child(4) { inset: 0 50% 50% 0; border: 0; border-right: 2px solid rgba(83,214,177,.7); transform-origin: bottom right; animation: sweep 4s linear infinite; }
.radar-visual b, .radar-visual small { z-index: 1; background: var(--navy-2); }
.radar-visual b { color: white; font-size: 38px; }
.radar-visual small { padding-top: 4px; color: #8da0ab; font-size: 8px; letter-spacing: .12em; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-card dl { margin: 0; }
.radar-card dl div { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid #29404f; }
.radar-card dt { color: #91a1aa; font-size: 10px; }
.radar-card dd { margin: 0; color: white; font-size: 12px; font-weight: 900; }
.status-rail { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--orange); color: var(--navy); }
.status-rail span { padding: 17px 10px; border-right: 1px solid rgba(9,19,31,.22); text-align: center; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.workbench, .architecture, .assurance { padding: clamp(72px, 9vw, 130px) clamp(20px, 6vw, 92px); }
.section-head { max-width: 900px; }
.section-head > div { display: flex; align-items: center; gap: 12px; }
.section-number { display: grid; place-items: center; width: 34px; height: 34px; background: var(--navy); color: var(--mint); font-size: 9px; font-weight: 900; }
.section-head > div p { color: var(--slate); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.section-head h2 { margin-top: 22px; font-size: clamp(45px, 6vw, 82px); }
.section-head > p { max-width: 750px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.preset-row { display: flex; gap: 7px; margin: 42px 0 15px; overflow-x: auto; padding-bottom: 4px; }
.preset { flex: 0 0 auto; padding: 10px 13px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 900; }
.preset.active, .preset:hover, .preset:focus-visible { border-color: var(--orange); background: var(--orange); color: var(--navy); }
.control-shell { display: grid; grid-template-columns: minmax(0, .92fr) minmax(400px, 1.08fr); border: 1px solid var(--line); box-shadow: 0 28px 80px rgba(21,40,52,.13); }
.fleet-form, .output-panel { padding: clamp(22px, 3.3vw, 46px); }
.fleet-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: var(--cream); border-right: 1px solid var(--line); }
.output-panel { min-height: 820px; background: white; }
.panel-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--slate); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.panel-heading b { color: var(--orange-text); }
label { display: flex; flex-direction: column; gap: 6px; color: #56646d; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
label.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #bdc5c4; border-radius: 0; background: var(--paper); color: var(--ink); outline: 0; font-size: 13px; text-transform: none; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,122,69,.16); }
textarea { resize: vertical; }
label.toggle { flex-direction: row; align-items: center; align-self: center; gap: 9px; padding: 7px 0; }
label.toggle input { width: 16px; height: 16px; accent-color: var(--orange); }
.run-button { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding: 15px 17px; border: 0; background: var(--navy); color: white; cursor: pointer; font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.run-button:hover, .run-button:focus-visible { background: var(--orange); color: var(--navy); }
.run-button:disabled { opacity: .55; cursor: progress; }
.run-button b { font-size: 20px; }
.fine-print { grid-column: 1 / -1; margin: 0; color: #59666e; font-size: 9px; line-height: 1.55; }
.empty-state { min-height: 700px; display: grid; place-content: center; text-align: center; }
.empty-state h3 { margin: 24px 0 7px; font-size: 25px; font-weight: 600; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.pulse-grid { width: 128px; margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; transform: rotate(45deg); }
.pulse-grid i { aspect-ratio: 1; border: 1px solid #c9d0d0; }
.pulse-grid i:nth-child(5) { background: var(--orange); border-color: var(--orange); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.55); background: var(--mint); } }
#result-state { padding-top: 28px; }
.decision-title { display: flex; justify-content: space-between; gap: 20px; }
.decision-title small, .metric-grid small, .proposal-card small, .approval-card small, .trace-head small, .score-card small { display: block; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.decision-title h3 { margin: 7px 0 0; color: var(--orange-text); font-size: 31px; font-weight: 650; text-transform: capitalize; }
.confidence { text-align: right; }
.confidence strong { display: block; margin-top: 4px; color: var(--navy); font-size: 27px; }
.summary { padding: 18px 0; border-bottom: 1px solid var(--line); color: #56646d; font-size: 13px; line-height: 1.7; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 17px 0; }
.metric-grid div { min-height: 78px; padding: 12px; border: 1px solid #e0e3e1; background: var(--paper); }
.metric-grid strong { display: block; margin-top: 9px; color: var(--slate); font-size: 15px; }
.proposal-card { padding: 18px; border-left: 4px solid var(--orange); background: #fff2ea; }
.proposal-card h4 { margin: 7px 0; color: var(--navy); font-size: 22px; text-transform: capitalize; }
.proposal-card p { margin: 0 0 11px; color: #65727b; font-size: 11px; line-height: 1.55; }
.proposal-card span { display: inline-block; padding: 5px 8px; background: white; color: #a62d2d; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.approval-chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; margin: 16px 0; }
.approval-chain span { padding: 9px; border: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.approval-chain span.current { border-color: var(--orange); background: var(--orange); color: var(--navy); }
.approval-chain span.approve { border-color: var(--mint); background: #e7f9f3; color: #136b56; }
.approval-chain span.reject { border-color: var(--red); background: #fff0f0; color: var(--red); }
.approval-chain i { color: #9da8ad; font-style: normal; }
.approval-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--orange); }
.approval-card strong { display: block; margin-top: 4px; }
.approval-card > div:last-child { display: flex; gap: 6px; }
.approval-card button { padding: 9px 11px; border: 1px solid var(--navy); background: white; color: var(--navy); cursor: pointer; font-size: 9px; font-weight: 900; }
.approval-card button:last-child { background: var(--navy); color: white; }
.trace-wrap { margin-top: 20px; }
.trace-head { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.trace-head b { color: var(--muted); font-size: 9px; }
#trace-list { max-height: 255px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
#trace-list li { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #edf0ee; font-size: 10px; }
#trace-list i { display: grid; place-items: center; width: 22px; height: 22px; background: var(--navy); color: var(--mint); font-style: normal; font-size: 8px; }
#trace-list b { display: block; }
#trace-list small { color: var(--muted); }
.architecture { background: var(--navy); color: white; }
.inverse .section-number { background: var(--orange); color: var(--navy); }
.inverse > div p { color: var(--mint); }
.inverse > p { color: #a8b5bd; }
.diagram-frame { margin-top: 50px; padding: 16px; background: white; border: 1px solid #405564; }
.diagram-frame img { display: block; width: 100%; height: auto; }
.decision-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 30px; background: #334958; }
.decision-grid article { padding: 25px; background: var(--navy-2); }
.decision-grid span { color: var(--orange); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.decision-grid h3 { margin: 15px 0 9px; font-size: 20px; }
.decision-grid p { margin: 0; color: #9baab3; font-size: 11px; line-height: 1.7; }
.assurance { background: var(--cream); }
.assurance-grid { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 10px; margin-top: 45px; }
.assurance-grid article { min-height: 240px; padding: 25px; border: 1px solid var(--line); background: var(--paper); }
.assurance-grid article > b { color: var(--orange-text); font-size: 11px; }
.assurance-grid h3 { margin: 24px 0 12px; color: var(--navy); font-size: 21px; }
.assurance-grid p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.score-card { background: var(--orange) !important; color: var(--navy); border-color: var(--orange) !important; }
.score-card small, .score-card span { color: var(--navy); }
.score-card strong { display: block; margin: 24px 0 4px; font-size: 52px; }
.score-card span { font-size: 10px; }
.meter { height: 6px; margin-top: 34px; background: rgba(9,19,31,.2); }
.meter i { display: block; width: 0; height: 100%; background: var(--navy); transition: width .5s ease; }
.production-note { max-width: 920px; margin: 28px 0 0; padding-left: 16px; border-left: 3px solid var(--orange); color: #56646d; font-size: 12px; line-height: 1.7; }
.production-note b { color: var(--navy); }
footer { display: flex; justify-content: space-between; align-items: center; gap: 36px; padding: 40px clamp(20px, 6vw, 92px); background: #050c13; color: white; }
footer strong { font-size: 17px; }
footer p { max-width: 700px; color: #7f909a; font-size: 10px; line-height: 1.6; }
.footer-marks { display: flex; gap: 12px; }
.footer-marks img { width: 38px; height: 38px; object-fit: contain; filter: brightness(0) invert(1); }
@media (max-width: 1050px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .radar-card { max-width: 460px; }
  .status-rail { grid-template-columns: repeat(2, 1fr); }
  .control-shell { grid-template-columns: 1fr; }
  .fleet-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .decision-grid, .assurance-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .topbar { padding: 11px 14px; }
  .atlas-brand img { width: 92px; }
  .atlas-brand span, .builder-marks span { display: none; }
  .builder-marks img { width: 23px; height: 23px; }
  .hero { min-height: auto; padding: 64px 20px; }
  h1 { font-size: 49px; }
  .radar-card { width: 100%; box-shadow: 7px 7px 0 rgba(83,214,177,.12); }
  .radar-visual { width: 180px; height: 180px; }
  .status-rail { grid-template-columns: 1fr; }
  .status-rail span { border-right: 0; border-bottom: 1px solid rgba(9,19,31,.2); }
  .workbench, .architecture, .assurance { padding-left: 16px; padding-right: 16px; }
  .fleet-form { grid-template-columns: 1fr; }
  .panel-heading, label.wide, .run-button, .fine-print { grid-column: auto; }
  .output-panel { min-height: 650px; }
  .empty-state { min-height: 510px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .approval-card { align-items: flex-start; flex-direction: column; }
  .decision-grid, .assurance-grid { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.theme-switch { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #405564; background: transparent; color: #d8e0e5; cursor: pointer; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.theme-switch:hover, .theme-switch:focus-visible { border-color: var(--mint); color: var(--mint); }
.theme-switch span { font-size: 14px; line-height: 1; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; --cream: #151c22; --paper: #0c1218; --ink: #edf2f5; --muted: #a5b0b7; --line: #33414a; --slate: #c6d2d9; --orange-text: #ff956b; }
html[data-theme="dark"] .workbench, html[data-theme="dark"] .assurance { background: var(--paper); }
html[data-theme="dark"] .fleet-form, html[data-theme="dark"] .output-panel, html[data-theme="dark"] .assurance-grid article { background: var(--cream); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea, html[data-theme="dark"] .metric-grid div, html[data-theme="dark"] .approval-card button, html[data-theme="dark"] .proposal-card span { background: #0d141a; }
html[data-theme="dark"] .proposal-card { background: #251711; }
html[data-theme="dark"] .production-note, html[data-theme="dark"] .fine-print, html[data-theme="dark"] .summary { color: #aab4ba; }
@media (max-width: 720px) { .theme-switch b { display: none; } }
