:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #152438;
  background: #f4f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #f7f9fb;
  --line: #d8e0e8;
  --line-soft: #e8edf2;
  --text: #152438;
  --muted: #536477;
  --quiet: #657487;
  --accent: #5146b8;
  --accent-hover: #413991;
  --accent-soft: #f1f0fa;
  --warning: #805211;
  --warning-bg: #fff8e8;
  --success: #176b48;
  --success-bg: #eef7f1;
  --danger: #a52a2a;
  --danger-bg: #fff1f0;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--canvas); color: var(--text); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid #655ad7; outline-offset: 3px; }
h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible { outline: 2px solid #655ad7; outline-offset: 5px; border-radius: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 0 16px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar-top { min-height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.sidebar-brand { display: inline-flex; min-width: 0; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 700; }
.brand-copy { min-width: 0; display: grid; gap: 3px; }
.brand-copy strong { color: var(--text); font-size: 14px; letter-spacing: -.15px; }
.brand-copy span { color: var(--muted); font-size: 12px; }
.sidebar-close { display: none !important; }
.icon-button { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #405167; font-size: 23px; line-height: 1; cursor: pointer; }
.icon-button:hover { border-color: var(--line-soft); background: #f5f7fa; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-label { display: block; margin: 0 0 9px; color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; }
.primary-nav { padding: 22px 0 18px; border-bottom: 1px solid var(--line-soft); }
.primary-nav .sidebar-label { padding: 0 8px; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  margin: 2px 0;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #405167;
  cursor: pointer;
  text-align: left;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span:nth-of-type(1) { min-width: 0; flex: 1; font-size: 13px; font-weight: 550; }
.nav-item:hover { background: #f4f7fa; color: var(--text); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-item.is-active::before { position: absolute; top: 7px; bottom: 7px; left: 0; width: 3px; border-radius: 2px; background: var(--accent); content: ""; }
.nav-count { min-width: 1.5em; color: var(--accent); font-size: 12px; font-weight: 700; text-align: right; }
.sidebar-session { min-height: 0; padding: 20px 1px 14px; flex: 1; overflow: auto; }
.sidebar-session-heading .sidebar-label { margin-bottom: 5px; }
.result-file-name { max-width: 100%; margin: 0 0 18px; overflow-wrap: anywhere; color: #43556b; font-size: 12px; line-height: 1.5; }
.events-title { margin: 0 0 10px; font-size: 16px; letter-spacing: -.2px; }
.event-list { display: grid; gap: 3px; }
.event-item { width: 100%; min-height: 58px; padding: 9px 8px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 7px; border: 0; border-left: 2px solid transparent; border-radius: 3px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.event-item:hover { background: #f5f7fa; }
.event-item[aria-pressed="true"] { border-left-color: var(--accent); background: var(--accent-soft); }
.event-time { padding-top: 2px; color: #315980; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.event-item-copy { min-width: 0; display: grid; gap: 4px; }
.event-item-copy strong { overflow-wrap: anywhere; color: #203249; font-size: 12px; font-weight: 600; line-height: 1.4; }
.event-item-copy span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.rail-note { margin: 16px 0 0; padding: 13px 0 0; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; line-height: 1.55; }
.sidebar-backdrop { display: none; }

.workspace { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.workspace-topbar { position: sticky; top: 0; z-index: 20; min-height: 68px; padding: 0 clamp(20px, 3vw, 44px); display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
.sidebar-toggle { display: none !important; }
.breadcrumbs { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumbs strong { overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-separator { color: #8592a2; }
.button { min-height: 44px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 5px; color: #fff; font-size: 13px; font-weight: 650; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { border-color: #aebaca; background: #fff; color: #24456a; }
.button-secondary:hover:not(:disabled) { border-color: #7188a4; background: #f6f8fb; }
.button:disabled { cursor: not-allowed; opacity: .52; }
.new-check-button { flex: 0 0 auto; }
.workspace-main { width: min(1500px, 100%); min-height: calc(100vh - 68px); margin: 0 auto; padding: 34px clamp(22px, 3.5vw, 54px) 20px; flex: 1; display: flex; flex-direction: column; }
.view { width: 100%; }
.view-heading, .result-heading-row { margin-bottom: 30px; display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.view-heading h1, .result-heading-row h1 { margin: 0 0 10px; font-size: clamp(27px, 2.6vw, 35px); font-weight: 650; letter-spacing: -.9px; line-height: 1.18; }
.eyebrow { margin: 0 0 9px; color: #405d7e; font-size: 11px; font-weight: 700; letter-spacing: .1em; line-height: 1.45; }
.intro-copy { max-width: 690px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.transfer-note { max-width: 300px; margin: 0 0 2px; color: #42546a; font-size: 13px; line-height: 1.5; }
.upload-workspace { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .8fr); align-items: start; gap: clamp(28px, 5vw, 68px); }
.upload-form { min-width: 0; }
.section-title { margin: 0 0 13px; font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
.drop-area { min-height: 230px; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #9ba9b9; border-radius: 3px; background: #fff; text-align: center; }
.drop-area.is-dragging { border-color: var(--accent); background: #f7f6ff; }
.drop-area h3 { margin: 0 0 7px; font-size: 17px; font-weight: 600; }
.drop-area > p:not(.file-requirements) { margin: 0 0 17px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.file-picker { min-width: 156px; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); border: 0; }
.file-requirements { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.selected-file { min-height: 66px; margin-top: 14px; padding: 12px 2px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.selected-file-copy { min-width: 0; flex: 1; display: grid; gap: 5px; }
.selected-file-copy strong { overflow-wrap: anywhere; color: var(--text); font-size: 14px; font-weight: 600; }
.selected-file-copy span { color: var(--muted); font-size: 12px; }
.selected-file-actions { display: flex; align-items: center; gap: 16px; }
.text-button { min-height: 44px; padding: 6px 4px; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button:hover { color: var(--accent-hover); }
.text-button-danger { color: #8a3a36; }
.text-button-danger:hover { color: #71211e; }
.form-message { margin: 11px 0 0; font-size: 13px; line-height: 1.55; }
.error-text { color: var(--danger); }
.upload-actions { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.action-hint { max-width: 410px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.start-button { flex: 0 0 auto; }
.workflow { min-width: 0; padding: 3px 0 0 28px; border-left: 1px solid var(--line); }
.workflow .eyebrow { margin-bottom: 8px; }
.workflow h2 { margin: 0 0 15px; font-size: 19px; letter-spacing: -.3px; }
.workflow-steps { margin: 0; padding: 0; list-style: none; }
.workflow-steps li { min-height: 62px; padding: 13px 0; display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 9px; border-top: 1px solid var(--line-soft); }
.workflow-steps li:last-child { border-bottom: 1px solid var(--line-soft); }
.step-number { padding-top: 1px; color: #536e8d; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.workflow-steps li > span:last-child { display: grid; gap: 4px; }
.workflow-steps strong { color: #23364d; font-size: 13px; font-weight: 650; }
.workflow-steps small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.workflow-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.status-view { min-height: 62vh; display: grid; place-items: center; }
.status-card { width: min(600px, 100%); padding: 28px 0; border-top: 1px solid var(--line); text-align: center; }
.status-card h1 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.6px; }
.status-copy { max-width: 470px; margin: 0 auto 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.spinner { width: 28px; height: 28px; margin: 0 auto 18px; border: 3px solid #dce4ed; border-top-color: var(--accent); border-radius: 50%; animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.processing-file { max-width: 100%; margin: 0 auto; overflow-wrap: anywhere; color: #33465d; font-size: 14px; font-weight: 600; }
.processing-stage { margin: 13px 0 0; color: #344d6b; font-size: 14px; line-height: 1.5; }
.processing-steps { margin: 22px auto 0; display: flex; justify-content: center; gap: 18px; }
.processing-steps span { padding: 0 0 5px; border-bottom: 2px solid #d9e0e8; color: var(--muted); font-size: 13px; }
.processing-steps .is-current { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.processing-steps .is-complete { border-color: #55846c; color: #355f48; }
.elapsed-copy { margin: 14px 0 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.elapsed-copy time { color: var(--text); font-weight: 600; }
.job-reference, .connection-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.connection-note { color: var(--warning); }
.failure-card .eyebrow { color: var(--danger); }
.failure-symbol { margin: 0 auto 14px; display: block; color: var(--danger); font-size: 24px; font-weight: 700; }
.failure-caveat { margin: 18px auto 20px; max-width: 470px; padding: 12px 0; border-top: 1px solid #e4d5d3; border-bottom: 1px solid #e4d5d3; color: #6e413e; font-size: 13px; line-height: 1.55; text-align: left; }
.resume-check { margin: 0 8px 8px; }

.result-heading-row { margin-bottom: 17px; align-items: center; }
.result-heading-row h1 { margin-bottom: 7px; }
.result-summary { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.verdict-badge { flex: 0 0 auto; padding: 7px 0 7px 13px; border-left: 2px solid #59876d; color: #245f40; font-size: 13px; font-weight: 650; }
.verdict-badge.has-events { border-color: #9a6a23; color: #735018; }
.result-note { margin-bottom: 21px; padding: 9px 12px; border-left: 3px solid #91a6bf; background: #edf1f5; color: #3d5269; font-size: 13px; line-height: 1.55; }
.original-video-card { margin: 0 0 22px; padding: 18px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.original-video-heading { margin-bottom: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.original-video-heading h2 { margin: 0 0 5px; font-size: 17px; }
.original-video-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.local-video-badge { flex: 0 0 auto; color: #4b6178; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.original-video-card video { width: min(100%, 960px); max-height: 62vh; display: block; border: 1px solid var(--line); background: #101820; }
.original-video-status { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.review-workspace { min-width: 0; }
.evidence-main { min-width: 0; }
.evidence-heading { margin-bottom: 21px; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.evidence-heading > div:first-child { min-width: 0; }
.event-status { margin-bottom: 7px; display: block; color: var(--warning); font-size: 13px; font-weight: 650; }
.evidence-heading h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(23px, 2.3vw, 30px); letter-spacing: -.65px; line-height: 1.22; }
.event-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }
.time-chip, .frame-count { padding: 0; border: 0; background: transparent; color: #40556d; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.frame-count { color: var(--muted); }
.evidence-grid-heading { margin-bottom: 12px; display: flex; align-items: end; justify-content: space-between; gap: 13px; }
.evidence-grid-heading h3 { margin: 0 0 4px; font-size: 16px; }
.evidence-grid-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.frame-count-label { color: #52677e; font-size: 11px; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.evidence-card { min-width: 0; margin: 0; }
.evidence-open { width: 100%; min-height: 0; padding: 0; display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid #cdd6e0; border-radius: 2px; background: #e8edf2; cursor: zoom-in; }
.evidence-open:focus-visible { outline: 3px solid #655ad7; outline-offset: 3px; }
.evidence-open:disabled { cursor: default; }
.evidence-open img { width: 100%; height: 100%; display: block; object-fit: cover; background: #e8edf2; }
.evidence-card figcaption { min-height: 47px; padding: 8px 0 3px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.frame-caption { color: #344a63; font-size: 13px; line-height: 1.4; }
.frame-time-caption { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.frame-fallback { min-height: 100%; padding: 16px; display: grid; place-items: center; color: #455970; font-size: 13px; line-height: 1.5; text-align: center; }
.support-grid { margin-top: 11px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-card { min-width: 0; padding: 18px 20px 19px 0; }
.info-card + .info-card { padding-left: 20px; border-left: 1px solid var(--line); }
.info-card h3 { margin: 0 0 10px; color: #435a75; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.info-card p { margin: 0; color: #34475d; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.source-link-wrap { margin-top: 10px; }
.source-link-wrap a, .rule-card a { color: var(--accent); font-size: 13px; font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.review-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; line-height: 1.55; }
.empty-result { min-height: 118px; padding: 20px 0; display: flex; align-items: center; gap: 15px; border-top: 1px solid #b9d2c3; border-bottom: 1px solid #b9d2c3; }
.empty-symbol { flex: 0 0 auto; color: var(--success); font-size: 24px; font-weight: 700; }
.empty-result h2 { margin: 0 0 5px; font-size: 17px; }
.empty-result p { margin: 0; color: #466253; font-size: 13px; line-height: 1.5; }

.information-view .view-heading { margin-bottom: 22px; }
.rules-list { display: grid; }
.rule-card { padding: 17px 0; border-top: 1px solid var(--line); }
.rule-card:last-child { border-bottom: 1px solid var(--line); }
.rule-card-meta { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.rule-card h2 { margin: 0 0 8px; color: #253a53; font-size: 17px; line-height: 1.45; }
.rule-card-description { margin: 0 0 9px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.help-steps { max-width: 900px; margin: 0; padding: 0; list-style: none; counter-reset: help-step; }
.help-steps li { padding: 17px 0; border-top: 1px solid var(--line); color: #43556a; font-size: 14px; line-height: 1.65; }
.help-steps li:last-child { border-bottom: 1px solid var(--line); }
.help-steps strong { color: var(--text); }
.api-view { max-width: 1060px; }
.api-view-heading { margin-bottom: 9px; }
.api-health { margin: 0 0 17px; padding: 17px 0; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.api-health-copy { min-width: 0; flex: 1; }
.api-health-copy > .eyebrow { margin-bottom: 9px; }
.api-health-status { display: flex; align-items: flex-start; gap: 11px; }
.api-status-marker { width: 10px; height: 10px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: #8793a1; }
.api-health[data-state="checking"] .api-status-marker { background: var(--accent); animation: api-pulse 1.1s ease-in-out infinite alternate; }
.api-health[data-state="ready"] .api-status-marker { background: #238357; }
.api-health[data-state="not-ready"] .api-status-marker { background: #b87818; }
.api-health[data-state="unavailable"], .api-health[data-state="response-error"] { border-color: #e2c6c4; }
.api-health[data-state="unavailable"] .api-status-marker, .api-health[data-state="response-error"] .api-status-marker { background: var(--danger); }
@keyframes api-pulse { to { opacity: .35; } }
.api-health-status h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.4; }
.api-health-status p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.api-check-button { flex: 0 0 auto; }
.api-health-checks { margin: 13px 0 0; padding: 10px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 18px; border-top: 1px solid var(--line-soft); list-style: none; }
.api-health-checks li { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.api-health-checks strong { flex: 0 0 auto; color: var(--warning); font-size: 12px; font-weight: 650; }
.api-health-checks strong[data-ready="true"] { color: var(--success); }
.api-base-row { min-width: 0; padding: 4px 0 16px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.api-base-row > div { min-width: 0; display: grid; gap: 5px; }
.api-label, .api-endpoint-label { color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.api-base-row code { overflow-wrap: anywhere; color: #293d55; font-size: 14px; font-weight: 600; }
.api-base-row p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }
.api-section { margin-top: 25px; }
.api-section-heading { margin-bottom: 7px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.api-section-heading h2 { margin: 0 0 5px; font-size: 18px; letter-spacing: -.25px; }
.api-section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.api-endpoints { border-top: 1px solid var(--line); }
.api-endpoint { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.api-endpoint-path { min-width: 0; margin-bottom: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.api-endpoint-path > code { min-width: 0; color: #20364f; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.api-method { min-width: 43px; padding: 3px 6px; border-radius: 3px; font-size: 10px; font-weight: 750; letter-spacing: .04em; text-align: center; }
.api-method-get { background: #edf4f0; color: #226342; }
.api-method-post { background: var(--accent-soft); color: #4a419f; }
.api-auth-tag { padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; color: #59697d; font-size: 11px; }
.api-endpoint > p, .api-access-note, .api-limit-note { margin: 0; color: #47596e; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.api-endpoint > p code, .api-access-note code, .api-limit-note code, .api-example-note code { color: #2d4058; font-size: .95em; }
.api-access-note { padding: 11px 13px; border-left: 3px solid #8176cb; background: #f5f4fb; }
.api-limit-note { margin-top: 11px; }
.api-limit-note strong { color: var(--text); }
.api-example-block { min-width: 0; padding: 13px 0 16px; border-top: 1px solid var(--line); }
.api-example-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.api-example-heading h3 { margin: 0; font-size: 14px; font-weight: 650; }
.api-example-heading .text-button { flex: 0 0 auto; }
.api-code { max-width: 100%; margin: 7px 0 0; padding: 13px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 4px; background: #f6f8fa; color: #273a51; font: 12px/1.6 Consolas, "SFMono-Regular", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.api-code code { font: inherit; }
.api-copy-message { margin: 7px 0 0; color: var(--success); font-size: 12px; line-height: 1.5; }
.api-example-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.api-response-example { margin-top: 1px; }
.workspace-footer { margin-top: auto; padding: 24px 1px 0; display: flex; justify-content: space-between; gap: 16px; color: #5c6b7d; font-size: 12px; line-height: 1.5; }

.image-dialog { width: min(1040px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.image-dialog::backdrop { background: rgb(21 36 56 / 62%); }
.dialog-toolbar { min-height: 44px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-toolbar p { min-width: 0; flex: 1; margin: 0; overflow-wrap: anywhere; color: #31465e; font-size: 14px; }
.image-dialog .icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--text); font-size: 24px; cursor: pointer; }
.image-dialog img { width: 100%; max-height: calc(100vh - 120px); display: block; object-fit: contain; background: #edf1f5; }

@media (max-width: 1100px) {
  .app-shell { display: block; }
  body.sidebar-open { overflow: hidden; }
  .app-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, calc(100vw - 44px)); min-height: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 16px 0 32px rgb(21 36 56 / 16%); }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-close { display: grid !important; }
  .sidebar-toggle { display: grid !important; }
  .sidebar-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 35; display: block; border: 0; background: rgb(21 36 56 / 38%); }
  .workspace-topbar { padding: 0 24px; }
  .workspace-main { min-height: calc(100vh - 68px); padding: 30px 26px 18px; }
  .upload-workspace { grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); gap: 28px; }
  .workflow { padding-left: 20px; }
}

@media (max-width: 820px) {
  .view-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .transfer-note { max-width: 620px; }
  .upload-workspace { grid-template-columns: 1fr; gap: 30px; }
  .workflow { padding: 20px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .workflow-steps li { min-height: 58px; }
  .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .api-base-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .api-base-row p { text-align: left; }
}

@media (max-width: 560px) {
  .workspace-topbar { min-height: 60px; padding: 0 12px; gap: 8px; }
  .sidebar-toggle { width: 44px; height: 44px; }
  .sidebar-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .breadcrumbs { gap: 6px; font-size: 12px; }
  .breadcrumbs strong { font-size: 12px; }
  .new-check-button { min-height: 40px; max-width: 132px; padding: 8px 10px; font-size: 11px; }
  .workspace-main { min-height: calc(100vh - 60px); padding: 24px 16px 16px; }
  .view-heading, .result-heading-row { margin-bottom: 22px; gap: 13px; }
  .view-heading h1, .result-heading-row h1 { font-size: 26px; }
  .intro-copy { font-size: 14px; }
  .transfer-note { font-size: 13px; }
  .drop-area { min-height: 210px; padding: 23px 14px; }
  .drop-area h3 { font-size: 16px; }
  .drop-area > p:not(.file-requirements) { font-size: 13px; }
  .file-requirements { font-size: 12px; }
  .selected-file { align-items: flex-start; flex-direction: column; gap: 9px; }
  .selected-file-actions { width: 100%; gap: 20px; }
  .upload-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .action-hint { font-size: 13px; }
  .start-button { width: 100%; }
  .status-view { min-height: 66vh; }
  .status-card { padding: 24px 0; text-align: center; }
  .status-card h1 { font-size: 23px; }
  .status-copy { font-size: 14px; }
  .processing-steps { gap: 11px; }
  .processing-steps span { font-size: 12px; }
  .original-video-heading { align-items: flex-start; flex-direction: column; }
  .original-video-card video { max-height: 45vh; }
  .result-heading-row { align-items: flex-start; }
  .verdict-badge { align-self: flex-start; }
  .result-note { margin-bottom: 17px; font-size: 12px; }
  .evidence-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .evidence-heading h2 { font-size: 23px; }
  .event-meta { gap: 13px; }
  .evidence-grid-heading { align-items: flex-start; }
  .evidence-grid { grid-template-columns: 1fr; gap: 8px; }
  .evidence-card:last-child:nth-child(odd) { grid-column: auto; }
  .evidence-open { aspect-ratio: 4 / 3; }
  .evidence-card figcaption { min-height: 38px; padding-top: 7px; }
  .support-grid { grid-template-columns: 1fr; }
  .info-card { padding: 16px 0; }
  .info-card + .info-card { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .info-card p { font-size: 14px; }
  .workspace-footer { padding-top: 20px; flex-direction: column; gap: 5px; }
  .empty-result { align-items: flex-start; padding: 17px 0; }
  .api-health { align-items: stretch; flex-direction: column; gap: 14px; }
  .api-check-button { width: 100%; }
  .api-health-checks { grid-template-columns: 1fr; gap: 5px; }
  .api-section-heading { align-items: flex-start; }
  .api-example-heading { align-items: flex-start; }
  .api-example-heading h3 { padding-top: 10px; }
  .api-example-heading .text-button { max-width: 130px; text-align: right; }
  .api-code { padding: 10px; font-size: 11px; }
}

@media (max-width: 390px) {
  .workspace-topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 7px; }
  .breadcrumbs > span:first-child, .breadcrumb-separator { display: none; }
  .new-check-button { max-width: 108px; white-space: normal; }
  .processing-steps { justify-content: space-between; gap: 5px; }
  .processing-steps span { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
