:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202e;
  background: #f4f6f9;
  --ink: #17202e;
  --muted: #526174;
  --line: #dce2ea;
  --accent: #2458d3;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2458d3; outline-offset: 3px; }
.shell { max-width: 1040px; margin: auto; padding: 0 32px; }
header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; font-weight: 750; letter-spacing: -.6px; text-decoration: none; }
.brand-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: white; background: var(--ink); font-size: 19px; }
.prototype { color: var(--muted); font-size: .875rem; }
.intro { padding: 28px 0 20px; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; letter-spacing: -1px; margin: 0 0 8px; font-weight: 700; }
.lede { margin: 0; color: var(--muted); }
h2 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -.4px; margin: 4px 0 0; font-weight: 650; }
h3 { font-size: 1rem; line-height: 1.4; }
p { overflow-wrap: anywhere; }
.mode-banner { border-left: 3px solid #b7790e; background: #fff5dd; color: #714d0c; padding: 10px 14px; font-size: .875rem; margin-bottom: 20px; overflow-wrap: anywhere; }
.mode-banner.live { border-color: #24805d; color: #235d48; background: #edf7f1; }
.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.upload-card, .result-card, .content-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; min-width: 0; }
.card-heading, .content-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-label { color: var(--muted); font-size: .875rem; font-weight: 600; }
.format-tag { color: var(--muted); font-size: .875rem; }
.format-tag:empty { display: none; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 146px; padding: 20px 12px; border: 1px dashed #94a4bb; border-radius: 8px; background: #f8faff; color: var(--muted); text-align: center; }
.dropzone:hover, .dropzone.drag-over { background: #edf3ff; border-color: var(--accent); }
.dropzone strong { color: var(--ink); font-size: 1rem; font-weight: 600; }
.dropzone > span { font-size: .875rem; }
.browse-link { color: var(--accent); text-decoration: underline; }
.formats { margin-top: 8px; }
.file-help, .privacy-small { font-size: .875rem; color: var(--muted); line-height: 1.5; margin: 12px 0; }
.privacy-small { margin-bottom: 0; }
.file-error { color: #a62929; background: #fff2f2; padding: 10px; border-radius: 6px; font-size: .875rem; }
.primary-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 12px 16px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.primary-button:hover:enabled { background: #1945af; }
.primary-button:disabled { background: #e6eaf0; color: #596577; }
.fixture-controls { margin: 16px 0; padding: 12px; border: 1px solid #dec587; border-radius: 6px; background: #fffaf0; }
.fixture-controls legend { font-size: .8125rem; font-weight: 600; padding: 0 5px; }
.fixture-controls label { display: block; font-size: .875rem; margin: 5px 0; }
select { width: 100%; min-height: 40px; padding: 7px; border: 1px solid var(--line); background: white; border-radius: 5px; }
#audio-fixture-row { margin-top: 10px; }
.result-card { border-top: 3px solid #b9c4d4; }
.empty-result { padding: 28px 0; }
.empty-result p, .loading p { margin: 8px 0 0; color: var(--muted); font-size: .9375rem; }
.result-footnote { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; font-size: .875rem; color: var(--muted); }
.result-footnote i { display: none; }
.auth-result { padding-top: 18px; }
.result-source { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.6; letter-spacing: .2px; overflow-wrap: anywhere; }
.verdict-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: 16px 0 10px; border-radius: 6px; background: #eef1f6; font-weight: 700; }
.auth-result h2 { font-size: 1.75rem; margin: 0 0 20px; }
.guidance { border-left: 2px solid var(--line); padding-left: 14px; }
.guidance > span { font-size: .8125rem; font-weight: 650; color: var(--muted); }
.guidance p { margin: 6px 0 0; }
.detail { font-size: .875rem; color: var(--muted); margin: 18px 0 0; }
.result-card[data-state="likely"] { border-top-color: #ba3636; }
.result-card[data-state="likely"] .verdict-icon { background: #fff0ef; color: #a52b2b; }
.result-card[data-state="unlikely"] { border-top-color: #24805d; }
.result-card[data-state="unlikely"] .verdict-icon { background: #edf7f1; color: #235d48; }
.result-card[data-state="unclear"] { border-top-color: #b7790e; }
.result-card[data-state="unavailable"] { border-top-color: #748094; }
.loading { padding: 30px 0; }
.spinner { display: block; width: 26px; height: 26px; border: 2px solid #dbe4f7; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 16px; }
.spinner.small { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.media-preview { display: flex; align-items: center; justify-content: center; min-height: 100px; max-height: 240px; background: #f3f5f9; border-radius: 8px; overflow: hidden; }
.media-preview img { max-width: 100%; max-height: 240px; object-fit: contain; }
.media-preview audio { width: 100%; min-width: 0; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.file-details { min-width: 0; display: flex; flex-direction: column; }
.file-details strong { font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-details > span { color: var(--muted); font-size: .8125rem; }
.text-button { border: 0; color: var(--accent); background: none; padding: 8px; font-size: .875rem; text-decoration: underline; flex-shrink: 0; }
.content-card { margin-top: 20px; }
.content-intro { color: var(--muted); margin: 0 0 18px; font-size: .9375rem; }
.transcript-loading { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.service-error { background: #fff4ee; padding: 16px; border-radius: 6px; }
.service-error h3 { margin: 0 0 8px; }
.service-error p { margin: 6px 0; }
.transcript-note { font-size: .875rem; color: var(--muted); }
#transcript-status { border-left: 3px solid #b7790e; padding: 8px 12px; background: #fffaf0; }
summary { cursor: pointer; font-size: .875rem; color: var(--muted); padding: 8px 0; }
blockquote { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 16px; padding: 14px; background: #f4f6fa; border-left: 2px solid #a4b5cf; max-height: 300px; overflow: auto; }
label[for="transcript-edit"] { display: block; margin-top: 18px; font-size: .9375rem; font-weight: 600; }
#transcript-edit { display: block; width: 100%; resize: vertical; margin: 8px 0 14px; padding: 12px; border: 1px solid #aab7c8; border-radius: 6px; color: var(--ink); background: white; line-height: 1.6; }
.review-confirmation { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-size: .9375rem; }
.review-confirmation input { width: 18px; height: 18px; flex-shrink: 0; margin: 3px 0 0; accent-color: var(--accent); }
.trace-details { margin-top: 12px; }
#trace-status { overflow-wrap: anywhere; }
.content-summary { margin: 18px 0 12px; }
.findings { list-style: none; padding: 0; margin: 0; }
.findings li { padding: 16px 0; border-top: 1px solid var(--line); }
.findings h3 { margin: 0 0 8px; }
.findings p { margin: 8px 0; }
.findings .excerpt { border-left: 3px solid #d0a345; padding-left: 12px; }
.findings a { font-size: .875rem; }
mark { background: #ffebaf; color: #493609; }
.privacy { margin: 22px 0; }
.privacy p { color: var(--muted); font-size: .875rem; }
footer { padding: 16px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .shell { padding: 0 16px; }
  header { min-height: 64px; }
  .prototype { display: none; }
  .intro { padding: 22px 0 16px; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .upload-card, .result-card, .content-card { padding: 20px; }
  .content-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
