:root {
  --ink: #071114;
  --panel: #0b1a1e;
  --panel-2: #0f2328;
  --lime: #c8ff4d;
  --cyan: #61d7ff;
  --coral: #ff7256;
  --white: #fffdf8;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --shell: min(1180px, calc(100vw - 48px));
  --display: "Arial Narrow", "Aptos Display", "Helvetica Neue", Arial, sans-serif;
  --body: Inter, Aptos, "Segoe UI", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color: var(--white);
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
em { color: var(--coral); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
::selection { color: var(--ink); background: var(--lime); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  color: var(--ink);
  background: var(--lime);
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }
.lab-shell { width: var(--shell); margin-inline: auto; }
.section-pad { padding: clamp(88px, 11vw, 150px) 0; }

.lab-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 78px;
  padding: 14px clamp(20px, 4vw, 58px);
}

.brand { display: inline-flex; gap: 12px; align-items: center; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); background: var(--lime); border-radius: 50%; font-size: 0.72rem; }
.back-link { padding: 8px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.back-link:hover { color: var(--lime); }

.lab-hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(146px, 18vh, 210px) 0 64px;
  background:
    radial-gradient(circle at 80% 18%, rgba(97, 215, 255, 0.16), transparent 28%),
    radial-gradient(circle at 12% 78%, rgba(200, 255, 77, 0.11), transparent 30%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
}

.lab-hero::after {
  position: absolute;
  right: -8vw;
  bottom: -30vw;
  width: 58vw;
  height: 58vw;
  content: "";
  border: 1px solid rgba(200, 255, 77, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 7vw rgba(97, 215, 255, 0.025), 0 0 0 14vw rgba(200, 255, 77, 0.018);
  pointer-events: none;
}

.hero-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); gap: clamp(48px, 8vw, 110px); align-items: center; }
.eyebrow, .section-index, .panel-label { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.66rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
h1 { max-width: 900px; font-size: clamp(4.1rem, 9vw, 8.8rem); letter-spacing: -0.072em; line-height: 0.84; }
h2 { font-size: clamp(3.2rem, 7vw, 7rem); letter-spacing: -0.068em; line-height: 0.9; }
h3 { letter-spacing: -0.04em; }
.hero-copy { max-width: 700px; margin: 34px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 50px; padding: 13px 20px; border: 1px solid var(--line); cursor: pointer; font-size: 0.7rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.button-primary:hover { background: #d6ff78; }
.button-quiet { color: var(--white); background: transparent; }
.button-quiet:hover { color: var(--cyan); border-color: var(--cyan); }
.full-button { width: 100%; }

.trust-panel { position: relative; padding: 30px; background: rgba(10, 27, 31, 0.82); border: 1px solid rgba(97, 215, 255, 0.25); box-shadow: 0 32px 90px rgba(0, 0, 0, 0.3); backdrop-filter: blur(14px); }
.status-line { display: flex; gap: 11px; align-items: center; margin: 22px 0 27px; }
.status-dot { width: 9px; height: 9px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 6px rgba(200, 255, 77, 0.1); }
.trust-panel dl { margin: 0; }
.trust-panel dl div { display: flex; justify-content: space-between; gap: 22px; padding: 14px 0; border-top: 1px solid var(--line); }
.trust-panel dt { color: rgba(255, 255, 255, 0.48); font-size: 0.76rem; }
.trust-panel dd { margin: 0; color: var(--white); font-size: 0.76rem; font-weight: 750; text-align: right; }

.proof-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: clamp(70px, 12vh, 120px); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.proof-strip p { display: grid; gap: 3px; padding: 20px 22px; margin: 0; background: rgba(7, 17, 20, 0.92); }
.proof-strip strong { color: var(--lime); font-family: var(--display); font-size: 2.1rem; letter-spacing: -0.04em; line-height: 1; }
.proof-strip span { color: rgba(255, 255, 255, 0.48); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }

.section-heading { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.45fr); gap: 70px; align-items: end; }
.section-heading > p:last-child, .split-heading > p { margin: 0 0 8px; color: var(--muted); }
.section-index { margin: 0 0 22px; }
.sandbox { background: #0a1518; }

.lab-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-top: 72px; border: 1px solid var(--line); }
.lab-tabs button { min-height: 58px; padding: 14px 20px; color: rgba(255, 255, 255, 0.56); background: transparent; border: 0; cursor: pointer; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; }
.lab-tabs button + button { border-left: 1px solid var(--line); }
.lab-tabs button[aria-selected="true"] { color: var(--ink); background: var(--lime); }

.simulator { display: grid; grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr); border: 1px solid var(--line); border-top: 0; }
.simulator[hidden] { display: none; }
.control-panel, .output-panel { padding: clamp(24px, 4vw, 42px); }
.control-panel { background: #0c1d21; border-right: 1px solid var(--line); }
.output-panel { background: linear-gradient(150deg, #0b171a, #0c2328); }
.control-heading, .output-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 30px; }
.control-heading p, .output-head p { margin: 0; }
.mode-chip, .output-head > span { padding: 6px 9px; color: var(--ink); background: var(--lime); border-radius: 999px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.6rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
.control-panel > label, .control-panel fieldset, .control-panel > .range-control { display: grid; gap: 9px; padding: 0; margin: 0 0 24px; border: 0; }
.control-panel > label > span, .control-panel legend, .range-control > label > span { color: rgba(255, 255, 255, 0.58); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.control-panel input[type="number"], .control-panel select { width: 100%; min-height: 49px; padding: 10px 13px; color: var(--white); background: #071316; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 0; }
.control-panel select { appearance: auto; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); }
.segmented label, .result-options label { position: relative; cursor: pointer; }
.segmented input, .result-options input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 48px; color: rgba(255, 255, 255, 0.58); background: #071316; border: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.72rem; font-weight: 850; }
.segmented label + label span { border-left: 0; }
.segmented input:checked + span { color: var(--ink); background: var(--cyan); }
.segmented input:focus-visible + span, .result-options input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 3px; }
.result-options { display: grid; gap: 8px; }
.result-options span { display: block; padding: 11px 13px 11px 36px; color: rgba(255, 255, 255, 0.58); border: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.76rem; }
.result-options span::before { position: absolute; top: 50%; left: 14px; width: 9px; height: 9px; content: ""; border: 1px solid rgba(255, 255, 255, 0.46); border-radius: 50%; transform: translateY(-50%); }
.result-options input:checked + span { color: var(--white); border-color: var(--lime); }
.result-options input:checked + span::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200, 255, 77, 0.12); }
.control-panel input[type="range"] { width: 100%; accent-color: var(--lime); }
.control-panel output { color: var(--lime); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.72rem; }

.audit-stage-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0 0 26px;
  list-style: none;
}

.audit-stage-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 11px 13px;
  color: rgba(255, 255, 255, 0.56);
  background: #071316;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.audit-stage-list li > span {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.66rem;
}

.audit-stage-list li strong,
.audit-stage-list li small {
  display: block;
}

.audit-stage-list li strong {
  color: var(--white);
  font-size: 0.78rem;
}

.audit-stage-list li small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.66rem;
}

.audit-stage-list li em {
  color: rgba(255, 255, 255, 0.35);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-stage-list li[data-state="working"] {
  color: var(--white);
  background: rgba(97, 215, 255, 0.08);
  border-color: var(--cyan);
}

.audit-stage-list li[data-state="working"] em { color: var(--cyan); }

.audit-stage-list li[data-state="complete"] {
  color: var(--white);
  background: rgba(200, 255, 77, 0.06);
  border-color: rgba(200, 255, 77, 0.48);
}

.audit-stage-list li[data-state="complete"] em { color: var(--lime); }

.control-note {
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.43);
  font-size: 0.68rem;
}

.queue-legend {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
}

.queue-legend p {
  display: grid;
  grid-template-columns: 10px 62px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
}

.queue-legend strong { color: var(--white); }
.priority-dot { width: 8px; height: 8px; border-radius: 50%; }
.priority-high { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 114, 86, 0.1); }
.priority-medium { background: var(--cyan); box-shadow: 0 0 0 4px rgba(97, 215, 255, 0.1); }

.plan-command { padding-bottom: 23px; margin: 0; color: rgba(255, 255, 255, 0.5); border-bottom: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(1.35rem, 3vw, 2.4rem); letter-spacing: -0.03em; }
.plan-command strong { color: var(--cyan); }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 25px 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.metric-grid div { padding: 18px; background: #0a181c; }
.metric-grid dt { color: rgba(255, 255, 255, 0.46); font-size: 0.61rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.metric-grid dd { margin: 7px 0 0; color: var(--white); font-family: var(--display); font-size: 1.65rem; font-weight: 850; letter-spacing: -0.04em; }
.settlement-card { padding: 22px; background: rgba(97, 215, 255, 0.055); border-left: 2px solid var(--cyan); }
.settlement-card span { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.6rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.settlement-card strong { display: block; margin-top: 8px; font-family: var(--display); font-size: 1.55rem; letter-spacing: -0.035em; }
.settlement-card p { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; }
.asset-metrics dd[data-asset-name] { font-size: 1.05rem; letter-spacing: -0.015em; line-height: 1.15; overflow-wrap: anywhere; }
.reason-group { margin-top: 24px; }
.reason-group > span { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.6rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.reason-group > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.reason-group b { padding: 7px 9px; color: rgba(255, 255, 255, 0.72); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.58rem; letter-spacing: 0.04em; text-transform: uppercase; }
.decision-log { padding: 0; margin: 25px 0 0; list-style: none; }
.decision-log li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; color: rgba(255, 255, 255, 0.56); border-top: 1px solid var(--line); font-size: 0.75rem; }
.decision-log li span { color: var(--lime); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.evidence { background: #f2eee7; color: #071114; }
.evidence em { color: #d44931; }
.evidence .section-index { color: #087aa0; }
.evidence .section-heading > p:last-child { color: rgba(7, 17, 20, 0.62); }
.evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 70px; }
.evidence-card { padding: clamp(25px, 4vw, 40px); background: #fffdf8; border: 1px solid rgba(7, 17, 20, 0.15); box-shadow: 0 26px 70px rgba(7, 17, 20, 0.08); }
.evidence-top { display: flex; justify-content: space-between; gap: 18px; align-items: center; color: rgba(7, 17, 20, 0.48); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.6rem; font-weight: 850; letter-spacing: 0.08em; }
.evidence-top strong { padding: 6px 9px; color: #071114; background: var(--lime); border-radius: 999px; }
.evidence-card h3 { margin-top: 28px; font-size: clamp(2.2rem, 4vw, 4rem); }
.evidence-card > p { color: rgba(7, 17, 20, 0.63); }
.evidence-card dl { margin: 28px 0 0; }
.evidence-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid rgba(7, 17, 20, 0.13); }
.evidence-card dt { color: rgba(7, 17, 20, 0.52); font-size: 0.72rem; }
.evidence-card dd { margin: 0; font-size: 0.72rem; font-weight: 850; text-align: right; }
.evidence-card dd a { text-decoration: underline; text-decoration-color: rgba(8, 122, 160, 0.45); text-underline-offset: 3px; }
.evidence-card dd a:hover { color: #087aa0; text-decoration-color: currentColor; }
.meaning-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 22px; background: rgba(7, 17, 20, 0.13); border: 1px solid rgba(7, 17, 20, 0.13); }
.meaning-grid article { padding: clamp(24px, 4vw, 38px); background: #e9e2d8; }
.meaning-grid .panel-label { color: #087aa0; }
.meaning-grid h3 { max-width: 430px; font-size: 1.75rem; }
.meaning-grid article > p:last-child { color: rgba(7, 17, 20, 0.62); }

.path { background: #0b1a1e; }
.path-list { padding: 0; margin: 70px 0 0; border-top: 1px solid var(--line); list-style: none; }
.path-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.path-list > li > span { color: var(--lime); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.7rem; }
.path-list h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.path-list p { max-width: 620px; margin: 8px 0 0; color: var(--muted); }

.story { background: var(--lime); color: #071114; }
.story .section-index { color: #365100; }
.story em { color: #b13f2a; }
.story-grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(340px, 0.72fr); gap: clamp(50px, 9vw, 130px); }
.story-copy { align-self: end; }
.story-copy p { margin: 0; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.story-copy p + p { margin-top: 24px; }

.disclosure { background: #071114; }
.disclosure-box { padding: clamp(30px, 6vw, 76px); background: #0c1d21; border: 1px solid var(--line); }
.disclosure-box h2 { max-width: 920px; font-size: clamp(2.8rem, 6vw, 6rem); }
.disclosure-box > p:not(.section-index) { max-width: 72ch; margin: 28px 0 0; color: var(--muted); }
.reference-links { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 34px; }
.reference-links a { padding: 11px 14px; color: var(--cyan); border: 1px solid rgba(97, 215, 255, 0.28); font-size: 0.68rem; font-weight: 800; }
.reference-links a:hover { color: var(--ink); background: var(--cyan); }

footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; color: rgba(255, 255, 255, 0.48); font-size: 0.7rem; }
.footer-row p { margin: 0; }
.footer-row a:hover { color: var(--lime); }

@media (max-width: 900px) {
  .hero-layout, .section-heading, .story-grid { grid-template-columns: 1fr; }
  .trust-panel { max-width: 620px; }
  .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .simulator { grid-template-columns: 1fr; }
  .control-panel { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  :root { --shell: min(100% - 30px, 1180px); }
  .section-pad { padding-block: 76px; }
  .lab-header { padding-inline: 15px; }
  .brand > span:last-child { display: none; }
  .lab-hero { padding-top: 124px; }
  h1 { font-size: clamp(3.7rem, 18vw, 5.4rem); }
  .section-heading { gap: 24px; }
  .lab-tabs, .evidence-grid, .meaning-grid { grid-template-columns: 1fr; }
  .lab-tabs button + button { border-top: 1px solid var(--line); border-left: 0; }
  .metric-grid { grid-template-columns: 1fr; }
  .evidence-grid { margin-top: 46px; }
  .path-list li { grid-template-columns: 46px 1fr; }
  .story-grid { gap: 42px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .proof-strip { grid-template-columns: 1fr; }
  .control-panel, .output-panel { padding: 21px; }
  .trust-panel { padding: 22px; }
  .audit-stage-list li { grid-template-columns: 27px minmax(0, 1fr); }
  .audit-stage-list li em { grid-column: 2; }
  .queue-legend p { grid-template-columns: 10px minmax(0, 1fr); }
  .queue-legend p strong { grid-column: 2; }
  .queue-legend p { row-gap: 1px; }
}

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