:root {
  --ink: #18211f;
  --muted: #64736e;
  --subtle: #f2f6f3;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --line: #dbe5df;
  --line-strong: #bfd0c8;
  --accent: #166c5d;
  --accent-strong: #0f5146;
  --blue: #315f9f;
  --blue-soft: #e9f0fa;
  --green-soft: #e6f2ee;
  --gold: #a56a20;
  --gold-soft: #fbefd9;
  --red: #a94343;
  --red-soft: #f7e6e5;
  --shadow: 0 18px 42px rgba(24, 33, 31, .08);
  --radius: 8px;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  text-rendering: geometricPrecision;
}

::selection {
  background: #eaece9;
  color: #1c2e1e;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 5.1vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  font-size: 16px;
  line-height: 1.25;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px 22px;
  background: rgba(251, 252, 250, .72);
  border-bottom: 1px solid rgba(219, 229, 223, .68);
  backdrop-filter: blur(18px);
}

.brand,
.run-actions,
.badge-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, .55) 48% 54%, transparent 54%),
    linear-gradient(180deg, var(--accent), #7aa898);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8), 0 8px 22px rgba(22, 108, 93, .18);
}

.tool-button,
.icon-button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: #283631;
  font-weight: 750;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.tool-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--green-soft);
}

.language-toggle {
  min-width: 82px;
}

.app-frame {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  width: min(1780px, calc(100% - 36px));
  margin: 0 auto;
}

.site-sidebar {
  position: sticky;
  top: 74px;
  z-index: 20;
  min-width: 0;
  padding-top: 30px;
}

.sidebar-sticky {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}

.sidebar-sticky .eyebrow {
  margin-bottom: 8px;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  color: #33423d;
  font-size: 14px;
  font-weight: 820;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-nav a:hover,
.side-nav a:focus {
  background: var(--green-soft);
  color: var(--accent-strong);
  outline: none;
  transform: translateX(2px);
}

.shell {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 0 52px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  min-height: calc(100vh - 58px);
  padding: clamp(56px, 9vh, 112px) 0 clamp(34px, 8vh, 82px);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.primary-action {
  border-color: rgba(22, 108, 93, .34);
  background: var(--accent);
  color: #f7fbf8;
}

.primary-action:hover {
  background: var(--accent-strong);
  color: #f7fbf8;
}

.showcase-visual {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  min-width: 0;
  align-self: end;
}

.hero-video-layer {
  position: absolute;
  inset: 0 0 0 54%;
  z-index: 0;
  overflow: hidden;
  border-left: 1px solid rgba(219, 229, 223, .7);
  background: #f5f8f6;
  pointer-events: none;
}

.hero-video-layer::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(90deg, rgba(251, 252, 250, .96), rgba(251, 252, 250, .48) 34%, rgba(251, 252, 250, .08));
}

.hero-video-layer::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 32%;
  content: "";
  background: linear-gradient(180deg, rgba(251, 252, 250, 0), rgba(251, 252, 250, .88));
}

.hero-video-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  filter: saturate(.82) contrast(.98);
}

#page-title {
  min-height: calc(2.16em + 2px);
  white-space: pre-wrap;
  text-align: left;
  text-wrap: auto;
}

#heroTypewriter {
  display: block;
  text-align: left;
}

.type-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -.08em;
  background: var(--ink);
  animation: blink 1s step-end infinite;
}

.type-cursor.done {
  opacity: .36;
}

.hero-selector {
  display: grid;
  gap: 8px;
  max-width: 690px;
  margin-top: clamp(28px, 5vh, 56px);
}

.hero-selector p {
  font-size: 24px;
  font-weight: 840;
  line-height: 1.2;
}

.hero-selector > span {
  color: #68786f;
  font-size: 14px;
  font-weight: 720;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.hero-pill {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #e7eee9;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #1c2e1e;
  font-weight: 820;
  box-shadow: 0 8px 24px rgba(24, 33, 31, .04);
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.hero-pill:hover {
  transform: translateY(-1px);
  background: #f1f3f1;
}

.hero-pill.selected {
  border-color: #1c2e1e;
  background: #1c2e1e;
  color: #fff;
  box-shadow: 0 12px 26px rgba(28, 46, 30, .14);
}

.hero-pill.selected::after {
  margin-left: 8px;
  content: "✓";
}

.hero-pill-status {
  min-height: 43px;
  width: min(100%, 680px);
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #edf1ed;
  border-radius: 16px;
  color: #738273;
  font-size: 13px;
}

.hero-pill-status.empty {
  opacity: .65;
  font-style: italic;
}

.hero-pill-status.active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafbf9;
  color: #40504a;
}

.hero-pill-status a {
  flex: 0 0 auto;
  color: #4d6d47;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lead {
  max-width: 860px;
  margin-top: 16px;
  color: #3d4b46;
  font-size: 17px;
}

.detail-panel,
.content-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.metric-grid,
.summary-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric,
.summary-band div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
}

.metric b,
.summary-band b {
  display: block;
  margin-bottom: 5px;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric span,
.summary-band span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.detail-panel {
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 92px);
  overflow: auto;
}

.run-header,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.main-panel {
  min-width: 0;
}

.run-header {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow);
}

.run-header h2 {
  overflow-wrap: anywhere;
}

.run-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.control-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
}

.search-field {
  grid-column: span 2;
}

.control-strip label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.control-strip input[type="search"],
.control-strip select {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  outline: none;
}

.control-strip input:focus,
.control-strip select:focus,
.tree-node:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 108, 93, .14);
}

.toggle {
  align-self: stretch;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink) !important;
}

.summary-band {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0;
}

.summary-band div {
  background: #fff;
}

.summary-band b {
  font-size: 23px;
}

.showcase-grid,
.evidence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.compact-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compact-metrics span {
  min-width: 96px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
  text-align: right;
}

.compact-metrics b,
.compact-metrics small {
  display: block;
}

.compact-metrics b {
  font-size: 20px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.compact-metrics small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bottleneck-board {
  display: grid;
  gap: 9px;
}

.bottleneck-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.bottleneck-row:first-child {
  border-top: 0;
}

.bottleneck-rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(165, 106, 32, .32);
  border-radius: 8px;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.bottleneck-copy {
  min-width: 0;
}

.bottleneck-titleline {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.bottleneck-titleline h3 {
  flex: 1 1 320px;
  overflow-wrap: anywhere;
}

.bottleneck-copy p {
  margin-top: 6px;
  color: #43514c;
  font-size: 13px;
}

.proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.proof-list li {
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #47564f;
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.bottleneck-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 230px;
}

.subtle-action {
  color: var(--muted);
}

.synthesis-panel {
  position: sticky;
  top: 74px;
}

.synthesis-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
}

.synthesis-list div {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.synthesis-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.synthesis-list dd {
  margin: 4px 0 0;
  color: #34423d;
  overflow-wrap: anywhere;
}

.content-band {
  margin-top: 14px;
  padding: 14px;
  scroll-margin-top: 76px;
}

.canvas-band {
  padding: 0;
  overflow: hidden;
}

.canvas-band .section-head {
  align-items: center;
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
}

.canvas-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  width: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.zoom-label {
  min-width: 54px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.canvas-viewport {
  position: relative;
  height: min(72vh, 760px);
  min-height: 540px;
  overflow: hidden;
  cursor: grab;
  outline: none;
  background:
    linear-gradient(90deg, rgba(219, 229, 223, .62) 1px, transparent 1px),
    linear-gradient(180deg, rgba(219, 229, 223, .62) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcfa, #f5f8f5);
  background-size: 40px 40px, 40px 40px, auto;
  touch-action: none;
}

.canvas-viewport:active {
  cursor: grabbing;
}

.canvas-viewport:focus {
  box-shadow: inset 0 0 0 3px rgba(22, 108, 93, .14);
}

.canvas-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-edge {
  fill: none;
  stroke: #aebfb7;
  stroke-width: 1.5;
}

.canvas-edge.related {
  stroke-dasharray: 5 5;
}

.canvas-node {
  cursor: pointer;
}

.canvas-node rect {
  fill: #fff;
  stroke: #98ada4;
  stroke-width: 1.2;
  filter: drop-shadow(0 8px 14px rgba(24, 33, 31, .08));
}

.canvas-node:hover rect {
  stroke: var(--accent);
  stroke-width: 2;
}

.canvas-node.selected rect {
  fill: var(--green-soft);
  stroke: var(--accent);
  stroke-width: 2.2;
}

.canvas-node.frontier rect {
  stroke: var(--blue);
}

.canvas-node.scored rect {
  fill: var(--gold-soft);
}

.canvas-node.missing rect {
  stroke: var(--red);
}

.canvas-node text {
  fill: #1f2d28;
  font-size: 12px;
  pointer-events: none;
}

.canvas-node .node-label {
  font-weight: 850;
}

.canvas-node .node-meta {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
}

.canvas-node.selected .node-meta {
  fill: var(--accent-strong);
}

.canvas-score {
  fill: var(--gold);
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.section-head {
  margin-bottom: 12px;
}

.section-head p {
  max-width: 540px;
  color: var(--muted);
  font-size: 13px;
}

.tree-view {
  display: grid;
  gap: 8px;
}

.tree-branch {
  display: grid;
  gap: 8px;
}

.tree-children {
  display: grid;
  gap: 8px;
  margin-left: 22px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.tree-node {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  text-align: left;
  outline: none;
}

.tree-node:hover {
  border-color: var(--line-strong);
  background: #f8faf8;
}

.tree-node.selected {
  border-color: rgba(22, 108, 93, .5);
  background: var(--green-soft);
}

.tree-node.active-node {
  box-shadow: inset 4px 0 0 var(--accent);
}

.tree-node.frontier-node {
  box-shadow: inset 4px 0 0 var(--blue);
}

.node-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.twisty {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--subtle);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.node-title {
  min-width: 0;
}

.node-title strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.28;
}

.node-title small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.node-summary {
  margin-top: 8px;
  color: #485751;
  font-size: 13px;
}

.score-pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--subtle);
  color: #35433e;
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.score-pill {
  border-color: rgba(165, 106, 32, .28);
  background: var(--gold-soft);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge-row {
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.badge.evidence {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.bottleneck {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge.status {
  background: var(--green-soft);
  color: var(--accent-strong);
}

.badge.warning {
  background: var(--red-soft);
  color: var(--red);
}

.detail-panel {
  padding: 16px;
}

.detail-sticky {
  display: grid;
  gap: 14px;
}

.detail-summary {
  color: #3f4e49;
}

.detail-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.detail-list div {
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-list dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.rank-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 22px;
}

.rank-list button {
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  text-align: left;
}

.rank-list button:hover {
  background: var(--gold-soft);
}

.research-content-panel {
  display: grid;
  gap: 8px;
}

.research-content {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  color: #26352f;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.content-notice {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.report-stage,
.file-stage {
  margin-top: 16px;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.report-shelf {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
}

.report-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  width: 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  text-align: left;
}

.report-card:hover {
  border-color: var(--line-strong);
  background: #f8faf8;
}

.report-card.active {
  border-color: rgba(22, 108, 93, .45);
  background: var(--green-soft);
}

.report-rank {
  grid-row: span 3;
  align-self: start;
  min-width: 34px;
  padding: 4px 6px;
  border: 1px solid rgba(49, 95, 159, .24);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.report-card strong,
.report-card small,
.report-card .muted {
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-card strong {
  line-height: 1.28;
}

.report-card small {
  color: #40504a;
  font-size: 12px;
}

.report-frame-wrap {
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-frame {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: #fff;
}

.evidence-layout {
  margin-top: 16px;
}

.evidence-ledger {
  display: grid;
  gap: 9px;
}

.evidence-group {
  border-top: 1px solid var(--line);
}

.evidence-group:first-child {
  border-top: 0;
}

.evidence-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  cursor: pointer;
}

.evidence-group summary strong {
  text-transform: capitalize;
}

.evidence-group summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.evidence-group ol {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding-left: 22px;
}

.evidence-group li {
  min-width: 0;
}

.evidence-group a {
  color: var(--blue);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.evidence-group span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.evidence-group p {
  margin-top: 2px;
  color: #40504a;
  font-size: 13px;
}

.gap-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding-left: 22px;
}

.gap-list li {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: #3f4e49;
}

.file-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.file-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-row:hover {
  border-color: var(--line-strong);
  background: var(--subtle);
}

.file-row span {
  overflow-wrap: anywhere;
  font-weight: 800;
  line-height: 1.3;
}

.file-row small {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1320px) {
  .app-frame {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 14px;
  }

  .side-nav a {
    font-size: 13px;
  }
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 1fr;
  }

  .detail-panel,
  .synthesis-panel {
    position: static;
    grid-column: 1 / -1;
    max-height: none;
  }

  .showcase-grid,
  .evidence-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    overflow-x: hidden;
  }

  .app-frame {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1540px);
    gap: 0;
  }

  .site-sidebar {
    position: static;
    padding-top: 12px;
  }

  .sidebar-sticky {
    padding: 10px;
  }

  .side-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: #fff;
    white-space: nowrap;
    transform: none;
  }

  .side-nav a:hover,
  .side-nav a:focus {
    transform: none;
  }

  .shell {
    width: 100%;
    padding-top: 18px;
  }

  .hero,
  .workbench,
  .control-strip,
  .summary-band,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-video-layer {
    position: relative;
    inset: auto;
    order: 3;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    margin-top: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .hero-video-layer::before {
    background: rgba(251, 252, 250, .08);
  }

  .hero-video-layer::after {
    display: none;
  }

  #page-title {
    min-height: calc(2.16em + 2px);
  }

  .hero-selector {
    margin-top: 28px;
  }

  .search-field {
    grid-column: auto;
  }

  .run-header,
  .section-head {
    display: grid;
  }

  .tree-children {
    margin-left: 8px;
    padding-left: 10px;
  }

  .node-line {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .score-pill {
    grid-column: 2;
    justify-self: start;
  }

  .canvas-band .section-head {
    display: grid;
  }

  .canvas-tools {
    justify-content: flex-start;
  }

  .canvas-viewport {
    height: 64vh;
    min-height: 430px;
  }

  .bottleneck-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .bottleneck-actions {
    grid-column: 2;
    justify-content: flex-start;
    max-width: none;
  }

  .compact-metrics {
    justify-content: flex-start;
  }

  .report-shelf {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    max-height: none;
  }

  .report-frame-wrap {
    min-height: 560px;
  }

  .report-frame {
    height: 560px;
  }
}
