:root {
  color-scheme: light;
  --ink: #161816;
  --muted: #68706a;
  --line: #d8ddd9;
  --paper: #f7f8f6;
  --white: #ffffff;
  --green: #14804a;
  --green-soft: #dcefe4;
  --red: #c74338;
  --red-soft: #f3deda;
  --amber: #d18a16;
  --blue: #2878b5;
  --violet: #8057a2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, select, input { font: inherit; }
.topbar { height: 68px; background: #171a18; color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 4px solid var(--green); }
.brand-block { display: flex; align-items: center; gap: 12px; }
.mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #5b625d; border-radius: 4px; font: 700 23px/1 Georgia, serif; }
h1, h2, p { margin: 0; }
h1 { font-size: 17px; font-weight: 700; }
.brand-block p { margin-top: 2px; color: #aab1ac; font-size: 11px; text-transform: uppercase; }
.top-meta { display: flex; align-items: center; gap: 18px; font-size: 10px; font-weight: 700; }
.artifact-link { color: var(--paper); text-decoration: none; border-bottom: 1px solid #6d746f; padding: 4px 0; }
.artifact-link:hover, .artifact-link:focus-visible { color: #54d88c; border-color: #54d88c; }
.scope { color: #aab1ac; }
.run-state { display: flex; align-items: center; gap: 7px; }
.run-state i { width: 7px; height: 7px; border-radius: 50%; background: #36c778; box-shadow: 0 0 0 3px rgba(54, 199, 120, .16); }
main { max-width: 1440px; margin: 0 auto; padding: 0 28px 28px; }
.complete-runs { padding: 24px 0 28px; border-bottom: 1px solid var(--line); }
.section-heading, .evidence-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.truth-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--muted); font-size: 9px; font-weight: 800; }
.truth-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.complete-layout { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.video-shell { min-width: 0; background: #111411; aspect-ratio: 16 / 9; }
.video-shell video, .publication-media video { display: block; width: 100%; height: 100%; background: #111411; object-fit: contain; }
.capture-panel { min-width: 0; }
.capture-tabs { display: grid; border-top: 1px solid var(--line); }
.capture-tabs button { min-height: 54px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.capture-tabs button b { color: var(--ink); font-size: 12px; }
.capture-tabs button span { font-size: 9px; }
.capture-tabs button.active { border-left: 3px solid var(--green); padding-left: 10px; background: var(--white); }
.capture-meta { margin: 17px 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 10px; }
.capture-meta dt { color: var(--muted); text-transform: uppercase; }
.capture-meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.source-note { padding-top: 15px; border-top: 1px solid var(--line); }
.source-note b { color: var(--green); font-size: 11px; }
.source-note p { margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.metric-band { min-height: 118px; display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid var(--line); }
.metric-intro { padding: 24px 24px 18px 0; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.metric-intro strong { margin-top: 5px; font-size: 16px; }
.metric-intro > span:last-child { margin-top: 6px; color: var(--muted); font-size: 11px; }
.eyebrow { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 20px 22px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border-right: 0; }
.metric-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.metric-value { margin: 7px 0 10px; font-size: 25px; font-weight: 750; font-variant-numeric: tabular-nums; }
.metric-value small { color: var(--muted); font-size: 11px; }
.meter { height: 4px; background: #e2e6e3; position: relative; }
.meter i { display: block; height: 100%; background: var(--green); }
.meter b { position: absolute; width: 2px; height: 10px; top: -3px; background: var(--ink); }
.evidence-heading { padding: 26px 0 0; }
.evidence-heading p { max-width: 540px; color: var(--muted); font-size: 11px; line-height: 1.45; text-align: right; }
.suite-tabs { height: 54px; display: flex; align-items: end; gap: 28px; border-bottom: 1px solid var(--line); }
.suite-tabs button { height: 54px; border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 0 2px; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.suite-tabs button.active { color: var(--ink); border-color: var(--green); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .85fr); min-height: 590px; border-bottom: 1px solid var(--line); }
.visual-stage { padding: 24px 26px 24px 0; border-right: 1px solid var(--line); min-width: 0; }
.stage-heading, .panel-heading, .outcome-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
h2 { margin-top: 3px; font-size: 18px; font-weight: 720; }
.sample-counter { display: flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: 12px; }
.sample-counter b { color: var(--ink); font-size: 23px; }
.camera-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
figure { margin: 0; min-width: 0; }
figcaption { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; background: #202421; color: white; font-size: 9px; font-weight: 750; }
figcaption b { color: #aeb5b0; font-weight: 600; }
.image-well { aspect-ratio: 1 / 1; background: #dfe3df; overflow: hidden; }
.image-well img { width: 100%; height: 100%; display: block; object-fit: cover; image-rendering: auto; }
.transport { height: 50px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); cursor: pointer; font-size: 20px; line-height: 1; }
.icon-button.primary { background: var(--ink); border-color: var(--ink); color: white; font-size: 12px; }
.transport input { flex: 1; accent-color: var(--green); min-width: 80px; }
#query-label { color: var(--muted); font-size: 9px; font-weight: 750; min-width: 60px; text-align: right; }
.instruction-line { padding: 15px 0 0; }
.instruction-line p { margin-top: 5px; font-size: 14px; line-height: 1.4; }
.action-panel { padding: 24px 0 24px 26px; min-width: 0; }
.shape-badge { padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; background: white; font: 700 10px ui-monospace, monospace; }
.legend { min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 9px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 4px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }
#action-chart { display: block; width: 100%; height: 176px; background: white; border: 1px solid var(--line); }
.action-table-wrap { margin-top: 12px; max-height: 202px; overflow: auto; border: 1px solid var(--line); background: white; }
#action-table { width: 100%; border-collapse: collapse; font: 9px/1.2 ui-monospace, monospace; font-variant-numeric: tabular-nums; }
#action-table th, #action-table td { padding: 5px 6px; text-align: right; border-bottom: 1px solid #edf0ed; white-space: nowrap; }
#action-table th { position: sticky; top: 0; background: #f0f2f0; color: var(--muted); }
.policy-meta { margin: 15px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 10px; }
.policy-meta dt { color: var(--muted); text-transform: uppercase; }
.policy-meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.outcome-band { padding: 26px 0 30px; }
.outcome-heading label { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.outcome-heading select { margin-left: 8px; height: 32px; padding: 0 28px 0 8px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); }
.outcome-layout { margin-top: 20px; display: grid; grid-template-columns: 1.4fr .8fr; gap: 34px; }
.task-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 18px; }
.task-bar { min-width: 0; cursor: pointer; }
.task-bar header { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.task-bar header b { color: var(--ink); }
.task-bar .meter { margin-top: 6px; height: 6px; }
.task-bar.active header { color: var(--green); }
.episode-summary { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.episode-summary strong { font-size: 25px; }
.episode-summary span { color: var(--muted); font-size: 10px; }
.episode-grid { display: grid; grid-template-columns: repeat(10, minmax(8px, 1fr)); gap: 4px; }
.episode { aspect-ratio: 1 / 1; border-radius: 2px; background: var(--red-soft); border: 1px solid #e5c4bf; }
.episode.success { background: var(--green-soft); border-color: #b9dbc7; }
.publication-media { padding: 28px 0 4px; border-top: 1px solid var(--line); }
.publication-media video { height: auto; margin-top: 18px; aspect-ratio: 16 / 9; }
.download-link { padding: 7px 0; color: var(--ink); border-bottom: 1px solid var(--ink); font-size: 10px; font-weight: 800; text-decoration: none; }
.download-link:hover, .download-link:focus-visible { color: var(--green); border-color: var(--green); }
footer { min-height: 46px; padding: 0 28px; background: white; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 9px; text-transform: uppercase; }

@media (max-width: 900px) {
  .topbar { padding: 0 16px; }
  main { padding: 0 16px 20px; }
  .metric-band { grid-template-columns: 1fr; }
  .complete-layout { grid-template-columns: 1fr; }
  .capture-tabs { grid-template-columns: 1fr 1fr; }
  .capture-tabs button { border-left: 0; }
  .capture-tabs button.active { border-left: 0; border-bottom: 3px solid var(--green); padding-left: 4px; }
  .metric-intro { min-height: 78px; border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric { border-bottom: 1px solid var(--line); }
  .workspace { grid-template-columns: 1fr; }
  .visual-stage { padding-right: 0; border-right: 0; }
  .action-panel { padding-left: 0; border-top: 1px solid var(--line); }
  .outcome-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 16px; }
  .top-meta { gap: 10px; }
  .scope { display: none; }
  .section-heading, .evidence-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .evidence-heading p { text-align: left; }
  .capture-tabs { grid-template-columns: 1fr; }
  .truth-badge { align-self: flex-start; }
  .suite-tabs { gap: 0; justify-content: space-between; }
  .suite-tabs button { font-size: 10px; }
  .metric { padding: 16px 12px; }
  .camera-grid { grid-template-columns: 1fr; }
  .task-bars { grid-template-columns: 1fr 1fr; }
  .outcome-heading { align-items: end; }
  footer { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
}
