:root {
  color-scheme: dark;
  --bg: #090a0b;
  --panel: #101214;
  --panel-2: #15181a;
  --panel-3: #1b1e20;
  --line: #2b3033;
  --line-bright: #434a4e;
  --ink: #f3efe5;
  --muted: #9ba1a2;
  --dim: #666d70;
  --fail: #ff4d3d;
  --fail-dark: #7c201a;
  --amber: #f4b83f;
  --cyan: #4dd9d0;
  --lime: #b4db52;
  --paper: #d8d2c4;
  --display: "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  --body: "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 77, 61, 0.09), transparent 31rem),
    radial-gradient(circle at 92% 18%, rgba(244, 184, 63, 0.045), transparent 28rem),
    linear-gradient(180deg, #090a0b 0%, #0d0f10 62%, #08090a 100%);
  font-family: var(--body);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.noise {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: 0.19;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 7px);
  mix-blend-mode: screen;
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  max-width: 1920px;
  margin: 0 auto;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.masthead::after {
  position: absolute;
  right: 28px;
  bottom: -1px;
  width: min(36vw, 560px);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--fail));
}

.lab-mark {
  position: relative;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line-bright);
  background: #111315;
  text-decoration: none;
  box-shadow: inset 0 0 0 5px #0b0c0d;
}

.lab-mark span {
  position: relative;
  z-index: 1;
  font: 800 29px/1 var(--display);
  transform: skewX(-8deg);
}

.lab-mark i {
  position: absolute;
  width: 70px;
  height: 8px;
  background: var(--fail);
  transform: rotate(-45deg);
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font: 700 10px/1.3 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.masthead-title h1 {
  margin: 0;
  font: 800 clamp(29px, 3.5vw, 57px)/0.88 var(--display);
  letter-spacing: 0.015em;
}

.masthead-title h1 em {
  color: var(--fail);
  font-style: normal;
}

.masthead-title > p:last-child {
  max-width: 850px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.case-stamp {
  min-width: 205px;
  padding: 13px 16px 12px;
  border: 1px solid var(--fail-dark);
  background:
    linear-gradient(135deg, rgba(255,77,61,0.08), transparent 58%),
    #101214;
  transform: rotate(-0.65deg);
}

.case-stamp span,
.case-stamp small {
  display: block;
  color: var(--muted);
  font: 700 9px/1.4 var(--mono);
  letter-spacing: 0.12em;
}

.case-stamp strong {
  display: block;
  margin: 4px 0 2px;
  color: var(--fail);
  font: 800 20px/1 var(--display);
  letter-spacing: 0.05em;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1920px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.summary-strip > div,
.summary-strip > a {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 10px;
  min-height: 72px;
  align-content: center;
  padding: 13px 22px;
  color: inherit;
  border-right: 1px solid var(--line);
  text-decoration: none;
}

.summary-strip > *:last-child {
  border-right: 0;
}

.summary-strip span {
  grid-column: 1 / -1;
  color: var(--dim);
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.14em;
}

.summary-strip strong {
  align-self: end;
  font: 800 27px/1 var(--display);
}

.summary-strip small {
  align-self: end;
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
}

.summary-strip .summary-warning strong {
  color: var(--fail);
}

.summary-strip > a {
  background: linear-gradient(100deg, rgba(244,184,63,0.08), transparent);
  transition: background 160ms ease, color 160ms ease;
}

.summary-strip > a:hover {
  color: var(--amber);
  background: rgba(244,184,63,0.11);
}

.review-shell {
  display: grid;
  grid-template-columns: minmax(235px, 300px) minmax(500px, 1fr) minmax(300px, 390px);
  max-width: 1920px;
  min-height: 790px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.queue-panel,
.findings-panel,
.player-panel {
  min-width: 0;
}

.queue-panel,
.findings-panel {
  padding: 20px;
  background: rgba(12, 14, 15, 0.88);
}

.queue-panel {
  border-right: 1px solid var(--line);
}

.findings-panel {
  border-left: 1px solid var(--line);
}

.player-panel {
  padding: 20px 22px 34px;
  background:
    linear-gradient(rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: 24px 24px;
}

.panel-heading,
.clip-header,
.section-title-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-heading {
  margin-bottom: 15px;
}

.panel-heading h2,
.clip-header h2,
.section-title-row h3,
.next-section h3,
.record-section h3,
.principles h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: 0.02em;
}

.panel-heading h2 {
  font-size: 22px;
}

.panel-heading > span {
  color: var(--muted);
  font: 700 10px/1 var(--mono);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.filter-button {
  min-height: 36px;
  padding: 8px;
  color: var(--dim);
  border: 0;
  border-right: 1px solid var(--line);
  background: #0c0e0f;
  font: 700 10px/1 var(--mono);
  cursor: pointer;
}

.filter-button:last-child {
  border-right: 0;
}

.filter-button:hover {
  color: var(--ink);
}

.filter-button.is-active {
  color: #130b08;
  background: var(--amber);
}

.attempt-list {
  display: grid;
  gap: 8px;
  max-height: 745px;
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}

.attempt-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 10px 10px 10px 9px;
  text-align: left;
  border: 1px solid var(--line);
  background: #111315;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.attempt-card::before {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 3px;
  content: "";
  background: transparent;
}

.attempt-card:hover {
  border-color: var(--line-bright);
  background: #181b1d;
  transform: translateX(2px);
}

.attempt-card.is-selected {
  border-color: var(--fail-dark);
  background:
    linear-gradient(95deg, rgba(255,77,61,0.12), transparent 68%),
    #17191b;
}

.attempt-card.is-selected::before {
  background: var(--fail);
}

.attempt-code {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line-bright);
  background: #090a0b;
  font: 800 15px/1 var(--display);
}

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

.attempt-copy span {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.12em;
}

.attempt-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attempt-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.attempt-fail {
  padding: 5px 6px;
  color: var(--fail);
  border: 1px solid var(--fail-dark);
  font: 800 8px/1 var(--mono);
}

.queue-note {
  margin-top: 15px;
  padding: 13px;
  border: 1px dashed var(--line-bright);
  background: rgba(255,255,255,0.018);
}

.queue-note strong {
  color: var(--amber);
  font: 700 10px/1 var(--mono);
}

.queue-note p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.clip-header {
  min-height: 58px;
  margin-bottom: 14px;
}

.clip-header h2 {
  font-size: clamp(24px, 2.3vw, 38px);
}

.clip-verdict {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 8px 12px;
  text-align: right;
  border-right: 3px solid var(--fail);
  background: linear-gradient(90deg, transparent, rgba(255,77,61,0.08));
}

.clip-verdict span {
  display: block;
  color: var(--dim);
  font: 700 8px/1 var(--mono);
}

.clip-verdict strong {
  color: var(--fail);
  font: 800 25px/1 var(--display);
}

.video-shell {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background:
    linear-gradient(45deg, #1b1e20 25%, transparent 25%),
    linear-gradient(-45deg, #1b1e20 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1b1e20 75%),
    linear-gradient(-45deg, transparent 75%, #1b1e20 75%),
    #141719;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  box-shadow: var(--shadow);
}

.video-shell::before,
.video-shell::after {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 64px;
  pointer-events: none;
  content: "";
  border-color: var(--amber);
  opacity: 0.72;
}

.video-shell::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.video-shell::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

#motion-video {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 700px);
  max-height: 64vh;
  object-fit: contain;
  image-rendering: auto;
}

.video-grid {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(255,255,255,.14) 50%, transparent calc(50% + .5px)),
    linear-gradient(transparent calc(50% - .5px), rgba(255,255,255,.14) 50%, transparent calc(50% + .5px));
  opacity: 0.48;
}

.frame-hud {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 1px;
  background: rgba(8, 9, 10, 0.78);
  backdrop-filter: blur(8px);
}

.frame-hud div {
  min-width: 74px;
  padding: 8px 9px 7px;
  border: 1px solid rgba(255,255,255,.12);
}

.frame-hud span,
.frame-hud strong {
  display: block;
  font-family: var(--mono);
}

.frame-hud span {
  margin-bottom: 4px;
  color: var(--dim);
  font-size: 7px;
}

.frame-hud strong {
  color: var(--ink);
  font-size: 10px;
}

.active-alert {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 14px;
  max-width: min(72%, 560px);
  padding: 8px 11px;
  color: var(--muted);
  border: 1px solid var(--line-bright);
  background: rgba(8, 9, 10, 0.84);
  font: 700 9px/1.45 var(--mono);
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.active-alert.is-flagged {
  color: #fff5ee;
  border-color: var(--fail);
  background: rgba(87, 20, 15, 0.9);
}

.video-loading {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--amber);
  background: rgba(9, 10, 11, 0.86);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.13em;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.video-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.transport {
  display: flex;
  gap: 7px;
  align-items: stretch;
  padding: 10px 0 9px;
  border-bottom: 1px solid var(--line);
}

.transport button {
  border: 1px solid var(--line-bright);
  background: #111315;
  cursor: pointer;
}

.transport button:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.transport-button {
  min-width: 46px;
  min-height: 38px;
  padding: 7px 9px;
  color: var(--muted);
  font: 700 9px/1 var(--mono);
}

.play-button {
  display: flex;
  gap: 8px;
  min-width: 94px;
  align-items: center;
  justify-content: center;
  color: #130d07;
  border-color: var(--amber) !important;
  background: var(--amber) !important;
}

.play-button:hover {
  color: #130d07 !important;
  filter: brightness(1.08);
}

.play-button strong {
  font: 800 11px/1 var(--display);
}

.speed-group {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--line);
}

.speed-group button {
  min-width: 45px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--dim);
  font: 700 9px/1 var(--mono);
}

.speed-group button:last-child {
  border-right: 0;
}

.speed-group button.is-active {
  color: #080a0a;
  background: var(--cyan);
}

.loop-control {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 700 9px/1 var(--mono);
  cursor: pointer;
}

.loop-control input {
  width: 13px;
  height: 13px;
  accent-color: var(--amber);
}

.timeline-block {
  padding: 10px 0 15px;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--dim);
  font: 700 8px/1 var(--mono);
}

.timeline-labels strong {
  color: var(--muted);
  font-weight: 700;
}

.issue-rail {
  position: relative;
  height: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255,255,255,.08) calc(10% - 1px) 10%),
    #111315;
}

.issue-range {
  position: absolute;
  top: 1px;
  bottom: 1px;
  min-width: 2px;
  opacity: 0.85;
  border-right: 1px solid rgba(255,255,255,.4);
  border-left: 1px solid rgba(255,255,255,.4);
}

.issue-range[data-category="motion"] { background: var(--amber); }
.issue-range[data-category="topology"] { background: var(--fail); }
.issue-range[data-category="bounds"] { background: #ff785b; }
.issue-range[data-category="camera"] { background: var(--cyan); }
.issue-range[data-category="layer"] { background: #e7d257; }
.issue-range[data-category="event"] { background: #b89eff; }

.frame-scrubber {
  width: 100%;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--fail);
  cursor: ew-resize;
}

.worked-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin: 0 0 20px;
  padding: 13px 15px;
  border: 1px solid rgba(77,217,208,.32);
  background: linear-gradient(100deg, rgba(77,217,208,.08), transparent 70%);
}

.worked-card span {
  padding: 5px 7px;
  color: #07100f;
  background: var(--cyan);
  font: 800 8px/1 var(--mono);
}

.worked-card p {
  margin: 0;
  color: #c9d5d4;
  font-size: 11px;
  line-height: 1.65;
}

.sheet-panel {
  padding-top: 6px;
}

.section-title-row {
  align-items: end;
  margin-bottom: 10px;
}

.section-title-row.compact {
  margin-bottom: 8px;
}

.section-title-row h3,
.next-section h3,
.record-section h3 {
  font-size: 19px;
}

.outline-button {
  padding: 8px 11px;
  color: var(--amber);
  border: 1px solid var(--amber);
  background: transparent;
  font: 700 9px/1 var(--mono);
  cursor: pointer;
}

.outline-button:hover {
  color: #0c0d0e;
  background: var(--amber);
}

.sheet-preview {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: #08090a;
  cursor: zoom-in;
}

.sheet-preview img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 220ms ease, filter 220ms ease;
}

.sheet-preview:hover img {
  filter: brightness(1.08);
  transform: scale(1.008);
}

.sheet-caption {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.6;
}

.fail-pill {
  padding: 5px 7px;
  color: var(--fail);
  border: 1px solid var(--fail-dark);
  font: 800 8px/1 var(--mono);
}

.verdict-summary {
  margin: 0 0 14px;
  padding: 12px 13px;
  color: #e8dfd4;
  border-left: 3px solid var(--fail);
  background: rgba(255,77,61,.07);
  font-size: 11px;
  line-height: 1.7;
}

.issue-list {
  display: grid;
  gap: 8px;
}

.issue-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  width: 100%;
  padding: 11px;
  text-align: left;
  border: 1px solid var(--line);
  background: #121416;
  cursor: pointer;
}

.issue-card:hover,
.issue-card.is-current {
  border-color: var(--fail);
  background: rgba(255,77,61,.07);
}

.issue-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--fail);
  border: 1px solid var(--fail-dark);
  font: 800 10px/1 var(--mono);
}

.issue-card header {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.issue-card h3 {
  margin: 0;
  font-size: 11px;
}

.frame-tag {
  flex: 0 0 auto;
  padding: 4px 5px;
  color: var(--amber);
  background: rgba(244,184,63,.08);
  font: 700 8px/1 var(--mono);
}

.issue-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.issue-card small {
  display: block;
  margin-top: 6px;
  color: var(--fail);
  font-size: 8px;
  line-height: 1.45;
}

.gate-section,
.next-section,
.record-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.gate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.gate-item {
  padding: 8px 9px;
  border: 1px solid var(--line);
  background: #0e1011;
}

.gate-item span,
.gate-item strong {
  display: block;
}

.gate-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gate-item strong {
  margin-top: 4px;
  font: 800 9px/1 var(--mono);
}

.gate-item.is-pass strong { color: var(--cyan); }
.gate-item.is-candidate strong { color: var(--amber); }
.gate-item.is-fail strong { color: var(--fail); }

.gate-legend {
  display: flex;
  gap: 12px;
  margin-top: 9px;
  color: var(--dim);
  font: 700 7px/1 var(--mono);
}

.gate-legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}

.gate-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.gate-legend i.pass { background: var(--cyan); }
.gate-legend i.candidate { background: var(--amber); }
.gate-legend i.fail { background: var(--fail); }

.next-section p:last-child {
  margin: 8px 0 0;
  color: var(--paper);
  font-size: 10px;
  line-height: 1.7;
}

.record-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 9px;
}

.record-links a {
  padding: 8px 5px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  font: 700 8px/1.25 var(--mono);
  text-decoration: none;
}

.record-links a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.record-links a.is-missing {
  pointer-events: none;
  opacity: .32;
}

.principles {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 2fr);
  gap: 30px;
  max-width: 1920px;
  margin: 0 auto;
  padding: 34px 28px 50px;
}

.principles h2 {
  max-width: 410px;
  font-size: clamp(27px, 3vw, 45px);
  line-height: 1.02;
}

.principles ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.principles li {
  min-height: 150px;
  padding: 16px;
  background: #111315;
}

.principles li span {
  display: block;
  margin-bottom: 23px;
  color: var(--fail);
  font: 800 20px/1 var(--display);
}

.principles li strong {
  display: block;
  font-size: 12px;
}

.principles li p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.sheet-dialog {
  width: min(96vw, 1680px);
  max-width: none;
  height: min(94vh, 1180px);
  max-height: none;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line-bright);
  background: #0b0d0e;
  box-shadow: 0 40px 120px rgba(0,0,0,.76);
}

.sheet-dialog::backdrop {
  background: rgba(0,0,0,.84);
  backdrop-filter: blur(7px);
}

.dialog-bar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(12,14,15,.95);
}

.dialog-bar strong {
  font: 800 18px/1 var(--display);
}

.dialog-bar button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--fail);
  border: 1px solid var(--fail-dark);
  background: #121416;
  font-size: 23px;
  cursor: pointer;
}

.dialog-canvas {
  min-width: 100%;
  min-height: calc(100% - 63px);
  padding: 16px;
  overflow: auto;
  background:
    linear-gradient(45deg, #16191b 25%, transparent 25%),
    linear-gradient(-45deg, #16191b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #16191b 75%),
    linear-gradient(-45deg, transparent 75%, #16191b 75%),
    #101214;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.dialog-canvas img {
  display: block;
  width: max(100%, 1400px);
  height: auto;
  margin: 0 auto;
}

.deerflow-signature {
  position: fixed;
  z-index: 19;
  right: 12px;
  bottom: 10px;
  padding: 5px 8px;
  color: rgba(255,255,255,.34);
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(8,9,10,.6);
  font: 700 7px/1 var(--mono);
  letter-spacing: .08em;
  text-decoration: none;
  backdrop-filter: blur(7px);
}

.deerflow-signature:hover {
  color: var(--amber);
  border-color: rgba(244,184,63,.35);
}

@media (max-width: 1320px) {
  .review-shell {
    grid-template-columns: 250px minmax(500px, 1fr);
  }

  .findings-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(230px, .8fr) minmax(360px, 1.6fr) minmax(280px, 1fr);
    gap: 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .findings-panel > .panel-heading,
  .findings-panel > .verdict-summary {
    grid-column: 1;
  }

  .findings-panel > .verdict-summary {
    margin-top: -8px;
  }

  .findings-panel > .issue-list {
    grid-column: 2;
    grid-row: 1 / span 4;
  }

  .gate-section,
  .next-section,
  .record-section {
    grid-column: 3;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .next-section,
  .record-section {
    padding-top: 13px;
    border-top: 1px solid var(--line);
  }

  .principles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .masthead {
    grid-template-columns: auto 1fr;
    padding: 18px;
  }

  .case-stamp {
    grid-column: 1 / -1;
    width: 100%;
    transform: none;
  }

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-strip > :last-child {
    grid-column: 1 / -1;
  }

  .review-shell {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .attempt-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 325px;
  }

  .video-shell {
    min-height: 350px;
  }

  .findings-panel {
    display: block;
  }

  .findings-panel > * {
    margin-top: 0;
  }

  .findings-panel > .issue-list,
  .gate-section,
  .next-section,
  .record-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .principles ol {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .masthead {
    gap: 13px;
  }

  .lab-mark {
    width: 47px;
    height: 47px;
  }

  .masthead-title > p:last-child {
    display: none;
  }

  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .summary-strip > div,
  .summary-strip > a {
    padding: 11px 14px;
  }

  .queue-panel,
  .findings-panel,
  .player-panel {
    padding: 16px 13px;
  }

  .attempt-list {
    grid-template-columns: 1fr;
  }

  .clip-header {
    display: block;
  }

  .clip-verdict {
    display: inline-block;
    margin-top: 9px;
    text-align: left;
    border-right: 0;
    border-left: 3px solid var(--fail);
  }

  .video-shell {
    min-height: 310px;
  }

  .frame-hud {
    top: 8px;
    right: 8px;
  }

  .frame-hud div {
    min-width: 57px;
    padding: 6px;
  }

  .transport {
    flex-wrap: wrap;
  }

  .speed-group {
    order: 2;
    width: calc(100% - 79px);
    margin-left: 0;
  }

  .speed-group button {
    flex: 1;
  }

  .loop-control {
    order: 2;
  }

  .worked-card {
    grid-template-columns: 1fr;
  }

  .record-links {
    grid-template-columns: 1fr;
  }

  .principles {
    padding: 28px 14px 50px;
  }

  .principles ol {
    grid-template-columns: 1fr;
  }

  .principles li {
    min-height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
