:root {
  color-scheme: light;
  --ink: #171a20;
  --body: #393c41;
  --muted: #5c5e62;
  --line: #e2e3e3;
  --paper: #fff;
  --soft: #f4f4f4;
  --accent: #e82127;
  --pass: #2f6a45;
  --fail: #b3261e;
  --radius: 2px;
  --page-width: 1520px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
h1, h2, h3, strong, .brand { color: var(--ink); font-weight: 500; }
h1, h2, h3, p, figure { margin-top: 0; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  z-index: 200;
  top: -100px;
  left: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 12px; color: #fff; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 56px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand { font-size: 13px; font-weight: 600; letter-spacing: .14em; }
.desktop-nav { display: flex; align-items: center; gap: 24px; }
.desktop-nav a, .mobile-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--body);
  font-size: 13px;
  font-weight: 500;
}
.desktop-nav a:hover { color: var(--ink); }
.mobile-menu { display: none; }

main { max-width: var(--page-width); margin: 0 auto; }
.intro {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
  padding: clamp(54px, 7vw, 88px) clamp(24px, 5vw, 76px) 64px;
  border-bottom: 1px solid var(--line);
}
.intro-copy { max-width: 560px; }
.kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: .01em;
}
.intro h1 {
  max-width: 11ch;
  margin: 0 0 18px;
  font-size: clamp(42px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.intro-copy > p:not(.kicker) {
  max-width: 43ch;
  margin: 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
.intro-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease;
}
.primary-link:hover { background: #c91b21; color: #fff; }
.primary-link:active { transform: translateY(1px); }
.evidence-button {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
}
.evidence-button:hover { border-color: #aeb1b5; background: var(--soft); }
.evidence-button span { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.intro-image { min-width: 0; margin: 0; }
.intro-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1052 / 961;
  object-fit: cover;
  background: var(--soft);
}
.intro-image figcaption { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.workspace, .browse-section, .confidence-section { padding: 72px clamp(20px, 5vw, 76px); }
.section-head { max-width: 780px; margin: 0 0 28px; }
.section-head h2, .evidence-strip h2 {
  margin: 0;
  font-size: clamp(34px, 3.8vw, 48px);
  line-height: 1.08;
  letter-spacing: -.03em;
}
.section-aside { max-width: 54ch; margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.toolhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.frame-heading { min-width: 170px; }
.frame-heading strong { display: block; font-size: 15px; line-height: 1.35; }
.frame-heading span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.frame-navigation { display: flex; align-items: center; gap: 10px; width: min(520px, 48%); }
.frame-navigation input { flex: 1; min-width: 80px; accent-color: var(--accent); }
.frame-navigation button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 17px;
}
.frame-navigation button:hover, .mode-button:hover { background: var(--soft); }
.mode-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.condition-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.condition-tabs button {
  flex: 1 0 106px;
  min-height: 52px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--body);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.condition-tabs button:hover { background: #fafafa; color: var(--ink); }
.condition-tabs button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px 24px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  font-size: 12px;
}
.toolbar label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; }
.toolbar input[type="checkbox"], .check-filter input { accent-color: var(--accent); }
.toolbar .locked { color: #80848a; }
.toolbar .locked span { padding: 2px 5px; border: 1px solid var(--line); font-size: 9px; letter-spacing: .04em; }
.local-picker { position: relative; margin-left: auto; color: var(--accent); font-weight: 500; cursor: pointer; }
.folder-picker { margin-left: 0; }
.local-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.local-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.local-note { padding: 10px 12px; background: var(--soft); color: var(--body); font-size: 11px; line-height: 1.5; }
.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 2px 4px; }
.text-button:hover { color: var(--ink); }
.local-note a, .aggregate-footnote a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.box-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 0 2px; color: var(--muted); font-size: 10px; }
.box-legend span { display: inline-flex; align-items: center; gap: 6px; }
.box-legend i { width: 12px; height: 12px; border: 2px solid var(--pass); }
.box-legend .ground-truth { border: 2px dashed var(--accent); }
.box-legend .false-positive { border-color: var(--fail); }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 3vw, 42px); margin-top: 24px; }
.comparison.stacked { grid-template-columns: minmax(0, 1fr); }
.model-panel { min-width: 0; background: #fff; }
.model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 50px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
}
.model-head strong { color: var(--pass); font-size: 11px; font-weight: 500; }
.model-head strong.failed { color: var(--fail); }
.scene {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1052 / 961;
  overflow: hidden;
  background: var(--soft);
}
.scene-surface { position: absolute; inset: 0; overflow: hidden; background: var(--soft); }
.scene img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; }
.scene img[hidden], .scene-placeholder[hidden] { display: none; }
.scene-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  max-width: 34ch;
  margin: auto;
  padding: 24px;
  place-content: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.box-layer { position: absolute; inset: 0; pointer-events: none; }
.overlay-box { position: absolute; border: 2px solid var(--pass); background: rgb(47 106 69 / 5%); }
.overlay-box.fp { border-color: var(--fail); background: rgb(179 38 30 / 4%); }
.overlay-box.gt { border: 2px dashed var(--accent); background: rgb(232 33 39 / 5%); }
.overlay-box em {
  position: absolute;
  top: -18px;
  left: -2px;
  padding: 2px 4px;
  background: var(--pass);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  line-height: 1.2;
  white-space: nowrap;
}
.overlay-box.fp em { background: var(--fail); }
.scene-index {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  overflow: hidden;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pending-scene { display: grid; place-items: center; padding: 28px; background: var(--soft); text-align: center; }
.pending-scene.has-image { padding: 0; }
.pending-scene.has-image::after { position: absolute; inset: 42% 0 0; background: linear-gradient(180deg, transparent, rgb(20 23 27 / 40%)); content: ""; pointer-events: none; }
.pending-image-placeholder { position: relative; z-index: 1; max-width: 36ch; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pending-image-placeholder[hidden], .pending-scene img[hidden] { display: none; }
.pending-image-badge { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 7px 10px; background: rgb(255 255 255 / 94%); color: var(--ink); font-size: 10px; font-weight: 600; }
.pending-image-copy { position: relative; z-index: 1; max-width: 34ch; }
.pending-scene.has-image .pending-image-copy { position: absolute; right: 12px; bottom: 12px; left: 12px; max-width: none; padding: 13px 15px; background: rgb(255 255 255 / 94%); text-align: left; }
.pending-scene.has-image .pending-image-copy p { margin-top: 5px; font-size: 11px; }
.pending-scene.has-image .pending-status { margin-bottom: 6px; }
.pending-status { display: block; margin-bottom: 12px; color: var(--muted); font-size: 11px; font-weight: 500; }
.pending-scene strong { display: block; font-size: 19px; line-height: 1.25; }
.pending-scene p { margin: 9px 0 0; color: var(--body); font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.metrics span { min-width: 0; padding: 12px 7px; border-right: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }
.metrics span:last-child { border-right: 0; }
.metrics b { display: block; margin-top: 3px; color: var(--ink); font-size: 19px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; }
.muted-metrics span { color: #777b80; }
.muted-metrics b { color: var(--muted); font-size: 12px; }
.aggregate-footnote { padding: 0 10px 12px; color: var(--muted); font-size: 10px; }
.under-scene { display: flex; justify-content: space-between; gap: 22px; padding: 15px 0 0; font-size: 11px; }
.under-scene > span:first-child { color: var(--fail); font-weight: 500; }
.under-scene > span:first-child.pass { color: var(--pass); }
.under-scene > span:last-child { max-width: 72ch; color: var(--muted); text-align: right; }

.browse-section { border-top: 1px solid var(--line); background: var(--soft); }
.filterbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filterbar label { display: flex; align-items: center; gap: 8px; color: var(--body); font-size: 11px; font-weight: 500; }
.filterbar select { min-height: 38px; max-width: 180px; padding: 0 28px 0 10px; border: 1px solid #c9cbcd; border-radius: var(--radius); background: #fff; color: var(--ink); }
.check-filter { margin-left: auto; }
.browse-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 22px; }
.browse-layout > div:first-child { min-width: 0; padding: 20px; background: #fff; }
.matrix-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 14px; font-size: 12px; }
.matrix-head span { color: var(--muted); }
.frame-matrix { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; max-height: 332px; overflow: auto; padding: 3px; }
.frame-matrix button { min-width: 0; height: 26px; border: 0; border-radius: 2px; background: #dcebe1; color: #215c38; font-size: 10px; font-weight: 500; }
.frame-matrix button.missed { background: #f4dfdd; color: #8a2c25; }
.frame-matrix button.dimmed { background: #e5e5e5; color: #777b80; }
.frame-matrix button.selected { outline: 2px solid var(--ink); outline-offset: 1px; }
.matrix-key { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.matrix-key i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; background: #b9d8c2; vertical-align: -1px; }
.matrix-key i.missed { background: #d9948c; }
.matrix-key i.dimmed { background: #d4d4d4; }
.transition { align-self: start; padding: 20px; background: #fff; }
.transition .kicker { margin-bottom: 5px; }
.transition h3 { margin: 0 0 16px; font-size: 22px; line-height: 1.2; }
.transition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.transition-grid > div { min-height: 80px; padding: 13px; background: #fff; color: var(--muted); font-size: 10px; }
.transition-grid strong { display: block; margin-top: 7px; color: var(--ink); font-size: 19px; font-variant-numeric: tabular-nums; }
.transition > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.confidence-section { background: #fff; }
.confidence-section .section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: none; }
.confidence-section button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.confidence-section button:hover { background: var(--soft); }
.confidence-section button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.chart-wrap { position: relative; padding: 18px; border: 1px solid var(--line); background: #fff; }
.chart-wrap canvas { display: block; width: 100%; height: 360px; cursor: crosshair; }
.chart-axis-y, .chart-axis-x { color: var(--muted); font-size: 10px; }
.chart-axis-x { text-align: right; }
.point-detail { min-height: 42px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--body); font-size: 12px; }
.fineprint { max-width: 90ch; margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.evidence-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr); gap: 36px; align-items: center; padding: 58px clamp(20px, 5vw, 76px); border-top: 1px solid var(--line); }
.evidence-strip h2 { margin-bottom: 12px; }
.evidence-strip p:last-child { max-width: 58ch; margin: 0; color: var(--body); font-size: 14px; }
.evidence-links { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; font-size: 12px; }
.evidence-links button { min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; font-weight: 500; }
.evidence-links button:hover { background: #393c41; }
.evidence-links a { min-height: 28px; display: inline-flex; align-items: center; color: var(--accent); }
.evidence-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 16px clamp(20px, 5vw, 76px); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer a:first-child { color: var(--ink); font-weight: 600; letter-spacing: .12em; }
dialog { width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 720px); padding: 30px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); box-shadow: 0 14px 48px rgb(23 26 32 / 20%); }
dialog::backdrop { background: rgb(23 26 32 / 48%); }
dialog h2 { margin: 0 0 18px; font-size: 32px; line-height: 1.1; letter-spacing: -.025em; }
dialog dl { margin: 0; }
dialog dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
dialog dd { margin: 0; color: var(--muted); text-align: right; }
dialog dd b { display: block; margin-bottom: 2px; color: var(--accent); font-size: 10px; font-weight: 500; }
dialog > a { display: inline-flex; min-height: 40px; align-items: center; margin-top: 16px; color: var(--accent); font-size: 12px; font-weight: 500; }
.dialog-close { float: right; width: 34px; height: 34px; border: 0; border-radius: var(--radius); background: var(--soft); font-size: 20px; }

@media (max-width: 980px) {
  .intro { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 52px; }
  .intro-copy { max-width: 680px; }
  .intro-image { width: 100%; max-width: 760px; }
  .comparison, .browse-layout { grid-template-columns: minmax(0, 1fr); }
  .browse-layout { gap: 16px; }
  .transition { max-width: none; }
  .workspace, .browse-section, .confidence-section { padding-block: 56px; }
}
@media (max-width: 820px) {
  .desktop-nav { display: none; }
  .mobile-menu { position: relative; display: block; }
  .mobile-menu summary { padding: 0 4px; list-style: none; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after { content: ""; width: 7px; height: 7px; margin: -4px 0 0 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
  .mobile-menu[open] summary::after { margin-top: 4px; transform: rotate(225deg); }
  .mobile-menu nav { position: absolute; top: 48px; right: -4px; display: grid; width: min(280px, calc(100vw - 32px)); padding: 8px 16px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 28px rgb(23 26 32 / 12%); }
  .mobile-menu nav a { display: flex; align-items: center; min-height: 46px; border-bottom: 1px solid var(--line); color: var(--body); font-size: 13px; }
  .mobile-menu nav a:last-child { border-bottom: 0; }
}
@media (max-width: 620px) {
  .site-header { height: 52px; padding-inline: 18px; }
  .intro { gap: 24px; padding: 42px 18px 38px; }
  .intro h1 { max-width: 12ch; font-size: clamp(38px, 11vw, 48px); }
  .intro-copy > p:not(.kicker) { font-size: 15px; }
  .intro-actions { align-items: stretch; margin-top: 22px; }
  .primary-link, .evidence-button { width: 100%; }
  .workspace, .browse-section, .confidence-section { padding: 46px 18px; }
  .section-head h2, .evidence-strip h2 { font-size: 36px; }
  .toolhead { flex-wrap: wrap; gap: 10px 14px; }
  .frame-heading { flex: 1; }
  .frame-navigation { order: 3; width: 100%; }
  .mode-button { margin-left: auto; }
  .condition-tabs { margin-inline: -18px; padding-inline: 10px; }
  .condition-tabs button { flex-basis: 98px; min-height: 48px; }
  .toolbar { gap: 4px 12px; flex-wrap: wrap; padding-block: 8px; }
  .box-legend { gap: 6px 12px; }
  .toolbar label { min-height: 36px; }
  .local-picker { margin-left: 0; }
  .comparison { gap: 22px; }
  .scene-placeholder { padding: 18px; font-size: 12px; }
  .metrics span { padding: 10px 3px; font-size: 9px; }
  .metrics b { font-size: 16px; }
  .under-scene { flex-direction: column; gap: 4px; }
  .under-scene > span:last-child { text-align: left; }
  .filterbar { align-items: stretch; }
  .filterbar label { justify-content: space-between; width: 100%; }
  .filterbar select { width: 56%; max-width: 220px; }
  .check-filter { margin-left: 0; }
  .browse-layout > div:first-child, .transition { padding: 14px; }
  .frame-matrix { gap: 3px; }
  .frame-matrix button { height: 24px; font-size: 9px; }
  .confidence-section .section-head { display: block; }
  .confidence-section button { margin-top: 16px; }
  .chart-wrap { padding: 10px; }
  .chart-wrap canvas { height: 280px; }
  .evidence-strip { grid-template-columns: 1fr; gap: 22px; padding: 44px 18px; }
  footer { align-items: flex-start; flex-direction: column; padding: 18px; }
  dialog { padding: 22px 18px; }
  dialog dl div { flex-direction: column; gap: 4px; }
  dialog dd { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
