@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans/InstrumentSans-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono/JetBrainsMono-Variable.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #121821;
  --muted: #64707f;
  --faint: #6f7c8d;
  --line: #dce3ed;
  --line-soft: #e8edf4;
  --line-strong: #bdcee2;
  --surface: #ffffff;
  --raised: #eef2f8;
  --stage: #e5f0fb;
  --stage-line: rgba(109, 164, 198, 0.18);
  --accent: #ff5230;
  --accent-hover: #f0421f;
  --accent-soft: #ffebe6;
  --success: #00a45a;
  --warning: #e08700;
  --failure: #b3001b;
  --dark: #121821;
  --dark-muted: #a6b1bd;
  --panel-radius: 12px;
  --content-radius: 6px;
  --control-radius: 3px;
  --panel-shadow: 0 1px 2px rgba(24, 42, 74, 0.08), 0 3px 8px rgba(24, 42, 74, 0.06);
  --sans: "Instrument Sans", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
html { background: var(--raised); scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
::selection { color: #fff; background: var(--accent); }

.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;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 30;
  transform: translateY(-140%);
  padding: 9px 12px;
  color: #fff;
  border-radius: var(--control-radius);
  background: var(--dark);
  font-size: 12px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-nav {
  width: min(100%, 1440px);
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.landing-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 660;
  letter-spacing: -0.025em;
}
.site-links { display: flex; align-items: center; gap: 28px; }
.site-links a,
.site-footer a {
  color: #45515e;
  font-size: 12px;
  font-weight: 560;
  text-decoration: none;
  transition: color 150ms ease;
}
.site-links a:hover,
.site-footer a:hover { color: #a53520; }
.nav-cta,
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  color: var(--dark);
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  background: var(--accent);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.nav-cta { justify-self: end; }
.nav-cta:hover,
.button-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); transform: translateY(-1px); }
.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 640;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, gap 150ms ease;
}
.button-link span { color: #a53520; font: 650 13px var(--mono); }
.button-link:hover { gap: 11px; color: #a53520; }

.hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.hero-main {
  width: min(100%, 1440px);
  min-height: clamp(590px, calc(100dvh - 176px), 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(410px, 0.88fr) minmax(580px, 1.12fr);
  align-items: center;
}
.hero-copy { padding: 62px 54px 64px 48px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  color: #a53520;
  font: 650 10px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-eyebrow i { width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 {
  max-width: 690px;
  margin: 24px 0 22px;
  font-size: clamp(52px, 5.3vw, 78px);
  font-weight: 630;
  line-height: 0.94;
  letter-spacing: -0.058em;
  text-wrap: balance;
}
.hero-copy > p {
  max-width: 520px;
  margin: 0;
  color: #43505d;
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
}
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 24px; }

.hero-instrument {
  min-width: 0;
  margin: 42px 32px 42px 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}
.instrument-head,
.instrument-foot {
  min-height: 47px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.instrument-head > span,
.instrument-head code,
.instrument-foot span {
  color: var(--muted);
  font: 600 9px var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.instrument-head > span { display: flex; align-items: center; }
.instrument-head i { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(0, 164, 90, 0.1); }
.instrument-head code { color: #26734a; }
.instrument-stage {
  position: relative;
  min-height: 390px;
  padding: 36px 28px;
  display: grid;
  grid-template-columns: minmax(105px, 0.78fr) minmax(150px, 0.9fr) minmax(180px, 1.15fr);
  align-items: center;
  gap: 22px;
  background-color: var(--stage);
  background-image: linear-gradient(var(--stage-line) 1px, transparent 1px), linear-gradient(90deg, var(--stage-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.instrument-stage::after {
  position: absolute;
  top: 50%;
  right: 26px;
  left: 26px;
  height: 1px;
  z-index: 0;
  background: #9ab6cb;
  content: "";
}
.source-stack,
.relay-unit,
.handoff-specimen { position: relative; z-index: 1; }
.diagram-label,
.measure {
  color: #556174;
  font: 600 8px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.source-stack { display: grid; gap: 6px; }
.source-stack .diagram-label { margin-bottom: 3px; }
.source-stack > div {
  min-height: 50px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 22px 1fr;
  border: 1px solid var(--line-strong);
  border-radius: var(--content-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 2px rgba(24, 42, 74, 0.06);
}
.source-stack code { grid-row: 1 / 3; color: #a53520; font: 600 9px var(--mono); }
.source-stack strong { font-size: 9px; font-weight: 680; letter-spacing: 0.04em; }
.source-stack small { color: var(--muted); font-size: 9px; }
.relay-unit { min-height: 230px; display: grid; place-items: center; }
.relay-object { position: relative; width: 148px; height: 154px; filter: drop-shadow(0 12px 8px rgba(63, 92, 116, 0.14)); }
.relay-object span { position: absolute; display: block; }
.relay-top { top: 11px; left: 26px; width: 96px; height: 61px; clip-path: polygon(50% 0, 100% 31%, 50% 62%, 0 31%); background: #ff7050; }
.relay-left { top: 49px; left: 26px; width: 48px; height: 88px; clip-path: polygon(0 0, 100% 21%, 100% 100%, 0 79%); background: var(--accent-hover); }
.relay-right { top: 49px; left: 74px; width: 48px; height: 88px; clip-path: polygon(0 21%, 100% 0, 100% 79%, 0 100%); background: #c42012; }
.relay-object b { position: absolute; top: 70px; left: 62px; z-index: 2; color: var(--dark); font: 700 16px var(--mono); letter-spacing: -0.08em; }
.measure { position: absolute; width: max-content; }
.measure-top { top: 0; left: 50%; transform: translateX(-50%); }
.measure-bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
.handoff-specimen {
  padding: 13px;
  color: #fff;
  border: 1px solid #202c38;
  border-radius: var(--content-radius);
  background: var(--dark);
  box-shadow: 0 8px 20px rgba(18, 24, 33, 0.18);
}
.handoff-specimen > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.handoff-specimen > div span { color: #ff9b87; font: 650 7px var(--mono); letter-spacing: 0.08em; }
.handoff-specimen > div b { padding: 2px 4px; color: var(--dark); border-radius: 2px; background: var(--accent); font: 700 7px var(--mono); }
.handoff-specimen > strong { display: block; margin-top: 16px; font-size: 15px; }
.handoff-specimen > small { display: block; margin-top: 2px; color: var(--dark-muted); font: 500 8px var(--mono); }
.handoff-specimen > p { margin: 14px 0; color: #e8edf2; font-size: 10px; line-height: 1.45; }
.handoff-specimen > code { display: block; padding-top: 9px; color: #ff9b87; border-top: 1px solid #35434f; font: 500 8px var(--mono); }
.instrument-foot { min-height: 53px; border-top: 1px solid var(--line); border-bottom: 0; }
.instrument-foot { display: grid; grid-template-columns: repeat(3, 1fr); }
.instrument-foot span { text-align: center; }
.instrument-foot span + span { border-left: 1px solid var(--line); }
.instrument-foot b { margin-right: 4px; color: var(--ink); font-size: 13px; }

.proof-rail {
  width: min(100%, 1440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.proof-rail article { min-height: 112px; padding: 22px 32px 20px; display: grid; gap: 4px; }
.proof-rail article + article { border-left: 1px solid var(--line); }
.proof-rail code { color: #a53520; font: 650 9px var(--mono); letter-spacing: 0.08em; }
.proof-rail strong { font-size: 14px; font-weight: 650; }
.proof-rail span { color: var(--muted); font-size: 11px; line-height: 1.4; }

.problem-section,
.evidence-section,
.architecture-section,
.site-footer { width: min(100%, 1280px); margin: 0 auto; }
.problem-section,
.workspace-section,
.architecture-section { scroll-margin-top: 64px; }
.problem-section { padding: 116px 48px 126px; }
.section-copy { max-width: 820px; }
.section-copy h2,
.workspace-intro h2,
.evidence-copy h2,
.architecture-head h2 {
  margin: 0;
  font-size: clamp(38px, 4.2vw, 58px);
  font-weight: 630;
  line-height: 0.99;
  letter-spacing: -0.052em;
  text-wrap: balance;
}
.section-copy p,
.workspace-intro > p,
.evidence-copy > p,
.architecture-head > p {
  color: #4b5966;
  font-size: 15px;
  line-height: 1.58;
  text-wrap: pretty;
}
.section-copy p { max-width: 670px; margin: 24px 0 0; }
.process-line { margin-top: 66px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.process-line article { min-height: 230px; padding: 28px 24px 26px 0; display: grid; grid-template-columns: 38px 1fr; gap: 10px; }
.process-line article + article { padding-left: 24px; border-left: 1px solid var(--line); }
.process-line article > span { color: #a53520; font: 650 10px var(--mono); }
.process-line h3 { margin: 0; font-size: 20px; font-weight: 630; letter-spacing: -0.03em; }
.process-line p { min-height: 66px; margin: 12px 0 23px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.process-line code { color: #a53520; font: 550 9px var(--mono); overflow-wrap: anywhere; }

.workspace-section { padding: 94px 24px 110px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--raised); }
.workspace-intro { width: min(100%, 1440px); margin: 0 auto 38px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 410px); align-items: end; gap: 50px; }
.workspace-intro h2 { max-width: 820px; margin-top: 13px; }
.section-index { color: #a53520; font: 650 9px var(--mono); letter-spacing: 0.1em; }
.workspace-intro > p { margin: 0 0 4px; }
.workspace-frame { width: min(100%, 1580px); margin: 0 auto; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--panel-radius); background: var(--surface); box-shadow: var(--panel-shadow); }
.workspace-frame-bar { height: 42px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--surface); }
.workspace-frame-bar span,
.workspace-frame-bar code { color: var(--muted); font: 600 9px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; }
.workspace-frame-bar i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--success); }
.workspace-frame .app-shell { height: clamp(700px, calc(100dvh - 88px), 860px); }

.evidence-section { padding: 132px 48px 142px; display: grid; grid-template-columns: minmax(300px, 0.82fr) minmax(450px, 1.18fr); align-items: center; gap: 90px; }
.evidence-copy h2 { max-width: 540px; }
.evidence-copy > p { max-width: 500px; margin: 25px 0 31px; }
.evidence-demo { padding: 25px; color: #fff; border-radius: var(--content-radius); background: var(--dark); box-shadow: 0 18px 42px rgba(18, 24, 33, 0.19); }
.evidence-demo-head { display: flex; justify-content: space-between; align-items: center; }
.evidence-demo-head span { color: #ff9b87; font: 650 9px var(--mono); letter-spacing: 0.1em; }
.evidence-demo-head b { padding: 3px 6px; color: var(--dark); border-radius: 2px; background: var(--accent); font: 700 8px var(--mono); }
.evidence-demo-target { margin-top: 24px; display: flex; align-items: center; gap: 11px; }
.evidence-demo-target > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--dark); border-radius: 6px; background: var(--accent); font-size: 11px; font-weight: 700; }
.evidence-demo-target strong,
.evidence-demo-target small { display: block; }
.evidence-demo-target strong { font-size: 15px; }
.evidence-demo-target small { margin-top: 3px; color: var(--dark-muted); font: 500 9px var(--mono); }
.evidence-demo > p { margin: 24px 0 18px; color: #eff2f5; font-size: 15px; line-height: 1.55; }
.evidence-next { padding: 13px 14px; display: grid; gap: 7px; border: 1px solid #384653; border-left: 3px solid var(--accent); border-radius: var(--control-radius); background: #17212b; }
.evidence-next span,
.evidence-source > span { color: var(--dark-muted); font: 650 9px var(--mono); letter-spacing: 0.09em; }
.evidence-next strong { font-size: 13px; line-height: 1.45; }
.evidence-source { margin-top: 17px; display: grid; grid-template-columns: auto 90px 1fr; align-items: center; gap: 10px; }
.evidence-source code { padding: 8px; color: #ff9b87; border: 1px solid #3a4754; border-radius: var(--control-radius); font: 500 9px var(--mono); }
.evidence-source p { margin: 0; overflow: hidden; color: #cbd3db; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-demo footer { margin-top: 18px; padding-top: 12px; display: flex; gap: 15px; border-top: 1px solid #35434f; }
.evidence-demo footer code { color: #9eabb7; font: 500 9px var(--mono); }

.architecture-section { padding: 118px 48px 70px; }
.architecture-head { max-width: 880px; }
.architecture-head > p { max-width: 700px; margin: 24px 0 0; }
.architecture-map {
  position: relative;
  min-height: 340px;
  margin-top: 60px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: center;
  gap: 70px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--panel-radius);
  background-color: var(--stage);
  background-image: linear-gradient(var(--stage-line) 1px, transparent 1px), linear-gradient(90deg, var(--stage-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.architecture-map::before { position: absolute; top: 50%; right: 48px; left: 48px; height: 1px; background: #96b0c4; content: ""; }
.architecture-sources,
.architecture-outputs { position: relative; z-index: 1; display: grid; gap: 7px; }
.architecture-sources span,
.architecture-outputs span { min-height: 40px; padding: 10px 12px; display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--control-radius); background: rgba(255, 255, 255, 0.96); font-size: 11px; font-weight: 610; }
.architecture-core { position: relative; z-index: 2; min-height: 150px; padding: 25px; display: grid; place-items: center; align-content: center; border: 1px solid #d93b1d; border-radius: var(--content-radius); background: var(--accent); box-shadow: 0 10px 24px rgba(81, 55, 49, 0.14); text-align: center; }
.architecture-core i { width: 13px; height: 13px; margin-bottom: 12px; border-radius: 2px; background: var(--dark); box-shadow: 18px 0 0 var(--dark), 18px 18px 0 var(--dark); }
.architecture-core strong { font-size: 24px; letter-spacing: -0.04em; }
.architecture-core small { margin-top: 5px; font: 550 9px var(--mono); }
.architecture-boundary { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.architecture-boundary strong { color: var(--ink); }

.site-footer { min-height: 118px; padding: 25px 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; border-top: 1px solid var(--line); }
.site-footer p { color: var(--muted); font-size: 11px; text-align: center; }
.site-footer > div { justify-self: end; display: flex; gap: 20px; }
.site-footer > div span { color: var(--muted); font: 500 9px var(--mono); }

.app-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 232px minmax(420px, 1fr) 356px;
  grid-template-rows: 52px minmax(0, 1fr);
  background: var(--raised);
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 232px minmax(260px, 620px) 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  z-index: 4;
}

.brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: var(--ink);
  border-right: 1px solid var(--line);
  text-decoration: none;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.brand b { color: #a53520; font-weight: 600; }
.brand-mark {
  position: relative;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: block;
  border-radius: 5px;
  background: var(--dark);
}
.brand-mark i { position: absolute; display: block; width: 7px; height: 7px; border-radius: 1px; background: var(--accent); }
.brand-mark i:nth-child(1) { top: 6px; left: 5px; }
.brand-mark i:nth-child(2) { top: 6px; right: 5px; }
.brand-mark i:nth-child(3) { right: 5px; bottom: 5px; }
.brand-mark::after { position: absolute; left: 10px; top: 10px; width: 7px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); content: ""; }

.search-box {
  height: 34px;
  margin: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 82, 48, 0.11); }
.search-box svg { width: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: var(--muted); opacity: 1; }
.search-box kbd { padding: 1px 5px; color: var(--faint); border: 1px solid var(--line); border-radius: 2px; background: var(--raised); font: 500 9px var(--mono); }

.tool-status {
  justify-self: end;
  margin-right: 18px;
  color: var(--muted);
  font: 550 9px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tool-status span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #9aa5af; }
.tool-status.available { color: #26734a; }
.tool-status.available span { background: var(--success); box-shadow: 0 0 0 3px rgba(0, 164, 90, 0.11); }

.sidebar {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar-title { display: flex; justify-content: space-between; align-items: center; padding: 21px 15px 12px; }
.sidebar-title strong { display: block; margin-top: 4px; font-size: 17px; font-weight: 620; letter-spacing: -0.025em; }
.eyebrow { color: var(--muted); font: 600 10px var(--mono); letter-spacing: 0.11em; text-transform: uppercase; }
.icon-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  color: var(--dark);
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  background: var(--accent);
  font: 500 19px/1 var(--sans);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.icon-button:hover { border-color: var(--accent-hover); background: var(--accent-hover); transform: translateY(-1px); }

.space-list { padding: 6px 9px; display: grid; gap: 3px; }
.space-button {
  width: 100%;
  min-height: 39px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 8px;
  color: #43505c;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: transparent;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.space-button:hover { color: var(--ink); background: var(--raised); }
.space-button.active { color: var(--ink); border-color: #b8c8d6; background: var(--stage); }
.space-button.active::before { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ""; }
.space-button.active .hash { display: none; }
.space-button .hash { color: #83909b; font: 500 16px var(--mono); }
.space-button .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-button .count { min-width: 18px; color: var(--faint); font: 500 9px var(--mono); text-align: right; }

.privacy-note {
  margin: auto 11px 12px;
  padding: 12px;
  display: flex;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--content-radius);
  background: var(--raised);
}
.privacy-note svg { width: 17px; flex: 0 0 17px; fill: none; stroke: var(--faint); stroke-width: 1.6; }
.privacy-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.privacy-note strong { color: var(--ink); font-weight: 620; }

.conversation {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  margin: 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--panel-radius);
  background: var(--stage);
  box-shadow: var(--panel-shadow);
  animation: panel-in 260ms ease-out both;
}
.conversation-header {
  grid-row: 1;
  min-height: 76px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}
.channel-line { display: flex; align-items: center; gap: 7px; }
.channel-line > span { color: #a53520; font: 550 18px var(--mono); }
.conversation-header h3 { margin: 0; font-size: 20px; font-weight: 640; letter-spacing: -0.035em; text-wrap: balance; }
.conversation-header p { max-width: 58ch; margin: 4px 0 0 23px; color: var(--muted); font-size: 11px; line-height: 1.35; text-wrap: pretty; }
.avatars { display: flex; padding-left: 8px; }
.avatars span { width: 27px; height: 27px; display: grid; place-items: center; margin-left: -6px; color: var(--ink); border: 2px solid var(--surface); border-radius: 7px; background: #dde5ec; font: 650 9px var(--sans); }
.avatars .agent-avatar { color: var(--dark); background: var(--accent); }

.message-list {
  grid-row: 3;
  min-height: 0;
  overflow: auto;
  list-style: none;
  margin: 0;
  padding: 14px 16px 18px;
  background-color: var(--stage);
  background-image: linear-gradient(var(--stage-line) 1px, transparent 1px), linear-gradient(90deg, var(--stage-line) 1px, transparent 1px);
  background-size: 24px 24px;
  scrollbar-color: #a9bbc9 transparent;
}
.message {
  position: relative;
  max-width: 780px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 8px;
  padding: 11px 12px;
  border: 1px solid rgba(159, 178, 195, 0.78);
  border-radius: var(--content-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--panel-shadow);
}
.message.agent { margin-left: 20px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; color: var(--ink); border-radius: 6px; background: #e4eaf0; font-size: 10px; font-weight: 680; }
.message.agent .avatar { color: var(--dark); background: var(--accent); }
.message-meta { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.message-meta strong { font-size: 13px; font-weight: 620; }
.message-meta time { color: var(--muted); font: 500 9px var(--mono); }
.source-badge { padding: 2px 5px; color: #9b311d; border: 1px solid #ffc0b3; border-radius: 2px; background: var(--accent-soft); font: 650 7px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; }
.message p { margin: 4px 0 0; color: #34414d; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.evidence-focus { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(255, 82, 48, 0.11), var(--panel-shadow); }

.handoff-capsule {
  margin: 12px 0 2px;
  padding: 15px;
  color: #fff;
  border: 1px solid #202c38;
  border-radius: var(--content-radius);
  background: var(--dark);
  box-shadow: 0 8px 22px rgba(18, 24, 33, 0.2);
}
.handoff-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.handoff-label { color: #ff9b87; font: 650 9px var(--mono); letter-spacing: 0.11em; text-transform: uppercase; }
.handoff-status { padding: 3px 6px; color: var(--dark); border: 1px solid var(--accent); border-radius: 2px; background: var(--accent); font: 700 8px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.handoff-target { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.handoff-avatar { width: 30px; height: 30px; display: grid; place-items: center; color: var(--dark); border-radius: 5px; background: var(--accent); font-size: 10px; font-weight: 700; }
.handoff-target strong, .handoff-target span { display: block; }
.handoff-target strong { color: #fff; font-size: 12px; font-weight: 620; }
.handoff-target div > span { margin-top: 2px; color: var(--dark-muted); font: 500 9px var(--mono); }
.handoff-summary { margin: 12px 0 0; color: #f4f6f8; font-size: 13px; line-height: 1.5; }
.handoff-next { margin-top: 10px; padding: 10px; display: grid; gap: 4px; border: 1px solid #384653; border-left: 3px solid var(--accent); border-radius: 3px; background: #17212b; }
.handoff-next span, .handoff-evidence > span { color: var(--dark-muted); font: 650 9px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.handoff-next strong { color: #fff; font-size: 11px; line-height: 1.42; }
.handoff-evidence { margin-top: 10px; display: grid; gap: 5px; }
.evidence-link { min-width: 0; padding: 7px 8px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 7px; color: #d8e0e7; border: 1px solid #3a4754; border-radius: 3px; background: #17212b; text-align: left; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.evidence-link:hover { border-color: var(--accent); background: #1d2833; }
.evidence-link code { color: #ff9b87; font: 500 9px var(--mono); }
.evidence-link span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.handoff-meta { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px 10px; color: #9eabb7; font: 500 9px var(--mono); }
.handoff-meta code { color: #ccd5dd; font: inherit; }
.handoff-boundary { margin: 8px 0 0; color: #9eabb7; font-size: 9px; }

.composer {
  grid-row: 4;
  min-height: 103px;
  margin: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--content-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 82, 48, 0.11), var(--panel-shadow); }
.composer textarea { width: 100%; height: 60px; min-height: 60px; resize: none; padding: 12px 13px 4px; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 13px; line-height: 1.45; }
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer-foot { min-height: 41px; padding: 5px 6px 6px 13px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 500 9px var(--mono); }
.composer-foot button, .dialog-actions button { min-height: 36px; padding: 7px 12px; color: var(--dark); border: 1px solid var(--accent); border-radius: var(--control-radius); background: var(--accent); font-size: 11px; font-weight: 680; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, transform 100ms ease; }
.composer-foot button:hover, .dialog-actions button:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.composer-foot button span { margin-left: 4px; opacity: 0.68; font: 500 8px var(--mono); }

.search-results { grid-row: 2; max-height: 250px; overflow: auto; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.97); }
.search-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.search-head strong { font-size: 12px; font-weight: 620; }
.search-head button { border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.search-hit { width: 100%; padding: 8px 0; display: grid; grid-template-columns: 94px 1fr; gap: 9px; color: #3b4854; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font-size: 11px; cursor: pointer; }
.search-hit span { color: #a53520; font: 500 9px var(--mono); }

.tool-panel {
  grid-column: 3;
  grid-row: 2;
  min-height: 0;
  margin: 12px 12px 12px 0;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  scrollbar-color: #b0bfcb transparent;
  animation: panel-in 300ms 40ms ease-out both;
}
.panel-kicker { color: #a53520; font: 650 9px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.panel-kicker span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.tool-panel h2 { margin: 10px 0 8px; font-size: 29px; font-weight: 630; line-height: 0.98; letter-spacing: -0.048em; text-wrap: balance; }
.panel-intro { max-width: 40ch; margin: 0 0 13px; color: var(--muted); font-size: 11px; line-height: 1.48; text-wrap: pretty; }
.tool-cards { display: grid; gap: 5px; }
.tool-cards details { display: grid; gap: 5px; }
.tool-cards summary { padding: 5px 1px; color: var(--muted); font: 550 9px var(--mono); cursor: pointer; }
.tool-cards details[open] summary { color: #a53520; }
.tool-cards details article + article { margin-top: 5px; }
.tool-cards article { position: relative; padding: 8px 9px 7px; border: 1px solid var(--line); border-radius: var(--content-radius); background: var(--raised); }
.tool-cards code { display: block; max-width: calc(100% - 44px); margin-bottom: 3px; overflow: hidden; color: var(--ink); font: 550 10px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.tool-cards p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.tool-cards article > span { position: absolute; top: 8px; right: 8px; font: 650 8px var(--mono); letter-spacing: 0.07em; }
.tool-cards .read { color: #26734a; }
.tool-cards .write { color: #a53520; }

.mission-card { margin-top: 10px; padding: 11px 12px; color: #fff; border: 1px solid #202c38; border-radius: var(--content-radius); background: var(--dark); }
.mission-card > div { display: flex; justify-content: space-between; color: #fff; font-size: 11px; }
.mission-card > div strong { font-weight: 620; }
.mission-card > div span { color: #ff9b87; font: 650 10px var(--mono); }
.mission-card ol { margin: 8px 0 9px; padding: 0; display: grid; gap: 4px; list-style: none; }
.mission-card li { display: grid; grid-template-columns: 13px 1fr; align-items: center; color: #aab5bf; font-size: 10px; }
.mission-card li > span { width: 10px; height: 10px; border: 1px solid #6e7c89; border-radius: 2px; }
.mission-card li.complete { color: #fff; }
.mission-card li.complete > span { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 2px var(--dark); }
.mission-card button, .activity button { padding: 0; border: 0; background: transparent; font: 650 9px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer; }
.mission-card button { color: #ff9b87; }
.activity button { color: #a53520; }
.mission-card button:hover { color: var(--accent); }
.activity button:hover { color: #7e2818; }

.activity { margin-top: 13px; }
.activity > div { display: flex; justify-content: space-between; }
.activity ul { list-style: none; margin: 8px 0 0; padding: 0; }
.activity li { padding: 7px 0; color: #52606c; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.35; }
.receipt-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.receipt-line code { color: var(--ink); font: 550 9px var(--mono); }
.receipt-line span { font: 650 8px var(--mono); text-transform: uppercase; }
.receipt-line .read { color: #26734a; }
.receipt-line .write { color: #a53520; }
.receipt-detail { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.receipt.failure .receipt-line code { color: var(--failure); }
.receipt-empty { color: var(--muted) !important; }

dialog { width: min(440px, calc(100vw - 32px)); padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--panel-radius); background: var(--surface); box-shadow: 0 24px 70px rgba(25, 40, 53, 0.3); }
dialog::backdrop { background: rgba(18, 24, 33, 0.46); backdrop-filter: blur(3px); }
dialog form { position: relative; padding: 24px; }
dialog h2 { margin: 7px 0 19px; font-size: 26px; font-weight: 630; letter-spacing: -0.04em; }
dialog label { display: grid; gap: 6px; margin: 13px 0; color: var(--muted); font-size: 11px; }
dialog input, dialog textarea { padding: 10px 11px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--control-radius); outline: 0; background: var(--surface); }
dialog input::placeholder, dialog textarea::placeholder { color: var(--muted); opacity: 1; }
dialog input:focus, dialog textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 82, 48, 0.11); }
.dialog-close { position: absolute; top: 12px; right: 14px; border: 0; color: var(--muted); background: transparent; font-size: 21px; cursor: pointer; }
.dialog-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 7px; }
.dialog-actions .secondary { color: var(--ink); border: 1px solid var(--line-strong); background: var(--surface); }
.dialog-actions .secondary:hover { border-color: var(--ink); background: var(--raised); }

.toast { position: fixed; left: 50%; bottom: 20px; z-index: 20; transform: translate(-50%, 12px); padding: 9px 13px; color: #fff; border: 1px solid #263440; border-radius: var(--content-radius); background: var(--dark); box-shadow: 0 10px 28px rgba(18, 24, 33, 0.22); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity 170ms ease, transform 170ms ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--failure); background: var(--failure); }

button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:active { transform: translateY(1px); }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1060px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .topbar { grid-template-columns: 210px minmax(240px, 1fr) auto; }
  .tool-panel { display: none; }
}

@media (max-width: 720px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 50px 52px minmax(0, 1fr); }
  .topbar { grid-column: 1; grid-row: 1; grid-template-columns: 58px minmax(0, 1fr); }
  .brand { padding: 0 13px; }
  .brand > span:last-child { display: none; }
  .search-box { height: 40px; margin: 0 9px; }
  .tool-status { display: none; }
  .sidebar { grid-column: 1; grid-row: 2; min-width: 0; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-title { flex: 0 0 58px; padding: 6px 9px; }
  .sidebar-title > div { display: none; }
  .sidebar-title .icon-button { width: 40px; height: 40px; flex-basis: 40px; margin: auto; }
  .space-list { min-width: 0; flex: 1; padding: 5px 7px 5px 0; display: flex; gap: 4px; overflow-x: auto; }
  .space-button { width: auto; min-width: max-content; min-height: 40px; display: flex; justify-content: center; padding: 7px 10px; font-size: 10px; overflow: hidden; }
  .space-button .hash, .space-button .count, .space-button.active::before { display: none; }
  .privacy-note { display: none; }
  .conversation { grid-column: 1; grid-row: 3; margin: 8px; }
  .conversation-header { min-height: 65px; padding: 12px 13px; }
  .conversation-header h3 { font-size: 18px; }
  .conversation-header p, .avatars { display: none; }
  .message-list { padding: 10px; background-size: 20px 20px; }
  .message { grid-template-columns: 29px minmax(0, 1fr); padding: 9px; }
  .message.agent { margin-left: 8px; }
  .avatar { width: 27px; height: 27px; }
  .handoff-label,
  .handoff-target div > span,
  .handoff-next span,
  .handoff-evidence > span,
  .evidence-link code,
  .handoff-meta,
  .handoff-boundary { font-size: 10px; }
  .handoff-status { font-size: 9px; }
  .composer { margin: 8px; }
  .composer-foot > span { display: none; }
  .composer-foot { justify-content: flex-end; }
  .composer-foot button { min-width: 72px; min-height: 40px; }
  .dialog-actions button { min-height: 40px; }
  .dialog-close { width: 40px; height: 40px; top: 7px; right: 8px; }
}

@media (max-width: 390px) {
  .topbar { grid-template-columns: 54px minmax(0, 1fr); }
  .brand { padding: 0 10px; }
  .space-button { font-size: 9px; }
  .search-box kbd { display: none; }
  .message { grid-template-columns: 1fr; }
  .message .avatar { display: none; }
  .handoff-capsule { margin-left: -2px; margin-right: -2px; padding: 12px; }
}

@media (max-width: 1180px) {
  .site-nav { padding-right: 22px; padding-left: 22px; }
  .hero-main { grid-template-columns: minmax(350px, 0.82fr) minmax(520px, 1.18fr); }
  .hero-copy { padding-right: 38px; padding-left: 36px; }
  .hero h1 { font-size: clamp(48px, 5.7vw, 66px); }
  .hero-instrument { margin-right: 22px; }
  .instrument-stage { padding-right: 18px; padding-left: 18px; gap: 13px; }
  .evidence-section { gap: 55px; }
}

@media (max-width: 940px) {
  .site-nav { grid-template-columns: 1fr auto; }
  .site-links { display: none; }
  .hero-main { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding: 82px 48px 56px; }
  .hero h1 { max-width: 720px; font-size: clamp(52px, 8vw, 72px); }
  .hero-copy > p { max-width: 600px; }
  .hero-instrument { margin: 0 32px 48px; }
  .proof-rail article { padding-right: 22px; padding-left: 22px; }
  .problem-section,
  .evidence-section,
  .architecture-section { padding-right: 32px; padding-left: 32px; }
  .workspace-intro { grid-template-columns: 1fr; gap: 18px; }
  .workspace-intro > p { max-width: 680px; }
  .evidence-section { grid-template-columns: 1fr; }
  .evidence-copy { max-width: 700px; }
  .evidence-demo { max-width: 760px; }
  .architecture-map { gap: 28px; padding: 36px; }
}

@media (max-width: 720px) {
  .site-header { height: 58px; }
  .site-nav { padding: 0 14px; gap: 12px; }
  .landing-brand { font-size: 15px; }
  .site-header .brand-mark { width: 23px; height: 23px; flex-basis: 23px; }
  .nav-cta { min-height: 38px; padding: 8px 11px; font-size: 10px; }
  .hero-copy { padding: 42px 22px 30px; }
  .hero h1 { margin-top: 20px; font-size: clamp(44px, 13vw, 61px); line-height: 0.96; }
  .hero-copy > p { font-size: 15px; }
  .hero-actions { margin-top: 27px; gap: 17px; }
  .button-primary { min-height: 42px; }
  .hero-instrument { margin: 0 14px 34px; }
  .instrument-stage { min-height: 270px; grid-template-columns: minmax(112px, 0.8fr) minmax(155px, 1.2fr); padding: 22px 18px; }
  .source-stack { display: none; }
  .relay-object { transform: scale(0.86); }
  .measure-bottom { max-width: 112px; text-align: center; }
  .handoff-specimen { padding: 11px; }
  .handoff-specimen > p { font-size: 9px; }
  .instrument-foot { min-height: 70px; }
  .instrument-foot span { padding: 0 7px; font-size: 7px; line-height: 1.4; }
  .instrument-foot b { display: block; margin: 0 0 3px; }
  .hero-instrument .instrument-foot { display: none; }
  .proof-rail { grid-template-columns: 1fr; }
  .proof-rail article { min-height: auto; padding: 19px 22px; grid-template-columns: 105px 1fr; align-items: center; }
  .proof-rail article + article { border-top: 1px solid var(--line); border-left: 0; }
  .proof-rail span { grid-column: 2; }
  .problem-section { padding-top: 84px; padding-bottom: 94px; }
  .problem-section,
  .evidence-section,
  .architecture-section { padding-right: 22px; padding-left: 22px; }
  .section-copy h2,
  .workspace-intro h2,
  .evidence-copy h2,
  .architecture-head h2 { font-size: clamp(36px, 10.5vw, 48px); }
  .process-line { margin-top: 45px; grid-template-columns: 1fr; }
  .process-line article { min-height: auto; padding: 24px 0; }
  .process-line article + article { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .process-line p { min-height: 0; margin-bottom: 17px; }
  .workspace-section { padding: 73px 8px 84px; }
  .workspace-intro { padding: 0 14px; }
  .workspace-frame { border-radius: var(--content-radius); }
  .workspace-frame-bar { padding: 0 10px; }
  .workspace-frame-bar code { display: none; }
  .workspace-frame .app-shell { height: 760px; }
  .evidence-section { padding-top: 88px; padding-bottom: 96px; gap: 44px; }
  .evidence-demo { padding: 18px; }
  .evidence-demo > p { font-size: 13px; }
  .evidence-source { grid-template-columns: 1fr auto; }
  .evidence-source p { grid-column: 1 / -1; }
  .architecture-section { padding-top: 88px; }
  .architecture-map { min-height: 0; grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .architecture-map::before { top: 24px; bottom: 24px; left: 50%; width: 1px; height: auto; }
  .architecture-core { min-height: 125px; }
  .architecture-sources,
  .architecture-outputs { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding: 30px 22px; grid-template-columns: 1fr auto; }
  .site-footer p { display: none; }
  .site-footer > div { gap: 14px; }
  .site-footer > div span { display: none; }
}

@media (max-width: 430px) {
  .nav-cta { padding-right: 9px; padding-left: 9px; }
  .hero-copy { padding-top: 42px; }
  .hero h1 { font-size: clamp(42px, 12.7vw, 54px); }
  .hero-actions { gap: 17px; }
  .hero-instrument { margin-right: 8px; margin-left: 8px; }
  .instrument-head { padding: 0 10px; }
  .instrument-stage { grid-template-columns: 105px minmax(145px, 1fr); padding-right: 10px; padding-left: 10px; gap: 4px; }
  .relay-object { transform: scale(0.72); }
  .measure { font-size: 7px; }
  .handoff-specimen > strong { font-size: 13px; }
  .handoff-specimen > p { margin: 10px 0; }
  .proof-rail article { grid-template-columns: 92px 1fr; }
  .workspace-frame .app-shell { height: 720px; }
  .site-footer > div a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
