:root {
  color-scheme: light;
  --paper: #f5f2ea;
  --paper-deep: #eee9df;
  --card: #fffefa;
  --ink: #272a3d;
  --muted: #777986;
  --line: #e4dfd5;
  --brand: #3d405b;
  --brand-deep: #30334b;
  --accent: #e07a5f;
  --accent-soft: #f9e8e1;
  --mint: #75948a;
  --green-soft: #eaf0eb;
  --amber: #a66b3d;
  --amber-soft: #f7eddf;
  --shadow: 0 22px 55px rgba(47, 45, 61, .055);
  font-family: "Noto Sans", "Be Vietnam Pro", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); min-height: 100vh; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(1280px, calc(100% - 76px)); margin: 0 auto; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(61,64,91,.13); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--brand); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand); }
.brand-mark svg { width: 26px; height: 26px; fill: none; stroke: #fffefa; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.brand-mark svg circle { stroke: rgba(255,254,250,.56); stroke-width: 1.1; }
.brand-name { font-size: 18px; font-weight: 740; letter-spacing: -.8px; }
.brand-name span { color: var(--accent); }
.topbar-meta { color: #646777; display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 600; letter-spacing: .035em; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(117,148,138,.13); }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 56px 0 42px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--accent); font-size: 10px; line-height: 1; font-weight: 750; letter-spacing: .15em; }
.eyebrow-line { width: 25px; height: 1px; background: var(--accent); }
h1 { margin: 0; color: var(--brand); font-size: clamp(33px, 4vw, 51px); line-height: 1.15; letter-spacing: -2.3px; font-weight: 680; }
h1 span { color: #888796; font-weight: 430; }
.intro-description { max-width: 530px; margin: 17px 0 0; color: #737584; font-size: 14px; line-height: 1.75; }
.intro-note { position: relative; max-width: 232px; padding: 13px 0 3px 19px; border-left: 1px solid #d4cfc6; color: #777986; }
.note-index { color: #a9a5a0; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.intro-note p { margin: 9px 0 0; font-size: 11px; line-height: 1.7; }
.note-rule { position: absolute; top: 0; left: -1px; width: 2px; height: 28px; background: var(--accent); }
.workspace { display: grid; grid-template-columns: minmax(290px, 356px) minmax(0, 1fr); gap: 38px; align-items: start; padding-bottom: 50px; }
.input-column { min-width: 0; }
.results-column { min-width: 0; }
.section-heading { display: flex; align-items: center; gap: 11px; min-height: 29px; margin-bottom: 14px; }
.section-number { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.section-heading h2 { margin: 0; color: var(--brand); font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.upload-card { padding: 18px 18px 13px; background: var(--card); border: 1px solid rgba(61,64,91,.1); border-radius: 4px; box-shadow: var(--shadow); }
.upload-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tiny-label { color: #9a9aa0; font-size: 9px; font-weight: 760; letter-spacing: .12em; }
.local-pill { display: inline-flex; align-items: center; gap: 6px; color: #678075; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.local-pill span { width: 5px; height: 5px; border-radius: 50%; background: #79a18b; }
.dropzone { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 23px 14px 21px; border: 1px dashed #cfcac1; background: #fcfaf6; text-align: center; outline: none; transition: border-color .18s, background .18s, transform .18s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-dragging { border-color: var(--accent); background: #fff8f3; }
.dropzone.is-dragging { transform: translateY(-2px); }
.upload-icon { width: 47px; height: 47px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.upload-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { margin: 0; color: var(--brand); font-size: 13px; font-weight: 700; }
.drop-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.text-button { padding: 0; border: 0; background: none; color: var(--accent); font-size: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.file-types { margin-top: 22px; color: #a09fa3; font-size: 9px; letter-spacing: .015em; }
.upload-foot { display: flex; align-items: center; gap: 7px; padding-top: 13px; color: #85878b; font-size: 9px; line-height: 1.5; }
.check-icon { display: grid; place-items: center; flex: 0 0 14px; height: 14px; border-radius: 50%; color: #fff; background: var(--mint); font-size: 9px; }
.privacy-card { display: flex; gap: 12px; margin-top: 15px; padding: 15px 15px 14px; border: 1px solid rgba(117,148,138,.14); background: #eef1ec; }
.privacy-icon { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; color: #648172; }
.privacy-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.privacy-card h3 { margin: 1px 0 5px; color: #556c60; font-size: 10px; font-weight: 750; }
.privacy-card p { margin: 0; color: #78857b; font-size: 9px; line-height: 1.7; }
.file-card { display: flex; align-items: center; gap: 11px; margin-top: 15px; padding: 12px; background: #fffefa; border: 1px solid var(--line); }
.file-card[hidden] { display: none; }
.file-badge { display: grid; place-items: center; width: 36px; height: 38px; background: #f5eee5; color: #997659; font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.file-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.file-copy strong { overflow: hidden; color: var(--brand); font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.file-copy > span:last-child { color: #9a9aa0; font-size: 9px; }
.icon-button { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); background: transparent; color: #8b8990; cursor: pointer; transition: color .18s, border .18s; }
.icon-button:hover { color: var(--accent); border-color: var(--accent); }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.results-heading { margin-bottom: 14px; }
.result-status { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: #9999a0; font-size: 8px; font-weight: 760; letter-spacing: .09em; }
.result-status i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #bab8b2; }
.result-status.ready { color: #688578; }
.result-status.ready i { background: #78a08c; box-shadow: 0 0 0 3px rgba(120,160,140,.12); }
.result-status.warn { color: var(--amber); }
.result-status.warn i { background: #c68d54; }
.empty-state { position: relative; min-height: 337px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 36px 25px 28px; background: #eeebe4; text-align: center; }
.empty-state::before, .empty-state::after { position: absolute; width: 160px; height: 1px; content: ""; background: #dedad1; }
.empty-state::before { top: 25px; left: 0; }
.empty-state::after { right: 0; bottom: 24px; }
.empty-stamp { position: relative; display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 17px; color: var(--brand); font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.empty-stamp::before { position: absolute; inset: 2px; border: 1px solid #d6d0c4; border-radius: 50%; content: ""; }
.stamp-ring { position: absolute; inset: 7px; border: 1px solid #e0a18d; border-radius: 50%; }
.empty-kicker { margin: 0; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.empty-state h3 { margin: 12px 0 7px; color: var(--brand); font-size: 20px; line-height: 1.38; letter-spacing: -.65px; font-weight: 620; }
.empty-copy { max-width: 350px; margin: 0; color: #81818a; font-size: 10px; line-height: 1.75; }
.empty-caption { display: flex; align-items: center; gap: 7px; margin-top: 27px; color: #9a999d; font-size: 8px; }
.empty-caption span:nth-of-type(odd) { color: var(--accent); font-size: 8px; font-weight: 800; }
.empty-caption b { width: 20px; height: 1px; margin: 0 2px; background: #d3cdc3; }
.error-box { margin-bottom: 12px; padding: 13px 15px; border-left: 3px solid var(--accent); color: #755247; background: var(--accent-soft); font-size: 11px; line-height: 1.6; }
.error-box[hidden] { display: none; }
.results { display: flex; flex-direction: column; gap: 13px; }
.results[hidden], .empty-state[hidden] { display: none; }
.report-overview { padding: 19px 20px 18px; border: 1px solid rgba(61,64,91,.1); background: var(--card); box-shadow: var(--shadow); }
.report-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.report-eyebrow { margin: 0 0 8px; color: #9b9aa0; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.report-overview h3 { margin: 0; color: var(--brand); font-size: 20px; line-height: 1.35; letter-spacing: -.6px; font-weight: 650; }
.priority-badge { flex: 0 0 auto; padding: 7px 9px; background: var(--amber-soft); color: var(--amber); font-size: 8px; font-weight: 780; letter-spacing: .035em; }
.priority-badge.neutral { background: #eeedf1; color: #6b6d7d; }
.report-summary { max-width: 740px; margin: 11px 0 0; color: #737582; font-size: 11px; line-height: 1.75; }
.meta-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.meta-chip { padding: 5px 8px; border: 1px solid #e8e4db; color: #747583; background: #fbfaf6; font-size: 8px; }
.meta-chip b { color: #4d5067; font-weight: 720; }
.report-section { padding: 17px 19px; border: 1px solid rgba(61,64,91,.1); background: var(--card); }
.report-section-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--brand); font-size: 11px; font-weight: 760; }
.report-section-head .section-number { font-size: 8px; }
.signal-list { display: flex; flex-direction: column; gap: 10px; }
.signal-card { padding: 13px 14px 12px; background: #faf8f3; border-left: 2px solid #d79a83; }
.signal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.signal-top strong { color: var(--brand); font-size: 10px; font-weight: 750; }
.signal-tag { white-space: nowrap; color: #a27560; font-size: 8px; font-weight: 760; letter-spacing: .04em; }
.signal-copy { margin: 7px 0 0; color: #737582; font-size: 10px; line-height: 1.65; }
.evidence { margin: 10px 0 0; padding: 9px 10px; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid #ebe6dd; background: #f3f0e9; color: #656675; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; line-height: 1.6; }
.cause-list { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; }
.cause-item { display: flex; gap: 10px; align-items: flex-start; color: #70727f; font-size: 10px; line-height: 1.65; }
.cause-label { flex: 0 0 auto; min-width: 72px; color: #80624f; font-size: 8px; font-weight: 760; }
.steps { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 0 0 13px; color: #727481; font-size: 10px; line-height: 1.7; counter-increment: steps; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(steps, decimal-leading-zero); display: grid; place-items: start center; padding-top: 1px; color: var(--accent); font-size: 8px; font-weight: 800; }
.disclaimer { padding: 12px 14px; border: 1px solid #e8ddcd; background: #f5efe5; color: #81745f; font-size: 9px; line-height: 1.7; }
.report-actions { display: flex; justify-content: flex-end; }
.copy-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #d9d5cd; background: transparent; color: #666878; font-size: 9px; font-weight: 650; cursor: pointer; }
.copy-button:hover { border-color: var(--brand); color: var(--brand); }
.copy-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 25px; border-top: 1px solid rgba(61,64,91,.13); color: #9a999c; font-size: 8px; letter-spacing: .06em; }
.footer > span:last-child { letter-spacing: 0; }
.footer-separator { padding: 0 5px; color: var(--accent); }
.toast { position: fixed; right: 25px; bottom: 22px; z-index: 5; max-width: min(360px, calc(100vw - 36px)); padding: 11px 14px; color: #fffefa; background: var(--brand); box-shadow: 0 10px 30px rgba(47,45,61,.2); font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(224,122,95,.42); outline-offset: 3px; }
@media (max-width: 860px) {
  .app-shell { width: min(100% - 40px, 700px); }
  .intro { align-items: flex-start; flex-direction: column; padding: 42px 0 29px; gap: 20px; }
  .intro-note { max-width: 430px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 31px; }
  .dropzone { min-height: 210px; }
}
@media (max-width: 500px) {
  .app-shell { width: calc(100% - 30px); }
  .topbar { height: 67px; }
  .topbar-meta { font-size: 9px; }
  h1 { font-size: 33px; letter-spacing: -1.5px; }
  .intro-description { font-size: 12px; }
  .intro { padding-top: 35px; }
  .section-heading { margin-bottom: 12px; }
  .upload-card { padding: 14px 13px 11px; }
  .dropzone { min-height: 196px; }
  .empty-state { min-height: 310px; padding-right: 15px; padding-left: 15px; }
  .empty-caption { gap: 5px; font-size: 7px; }
  .empty-caption b { width: 11px; }
  .report-overview, .report-section { padding: 15px; }
  .report-overview h3 { font-size: 18px; }
  .priority-badge { padding: 6px 7px; font-size: 7px; }
  .footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.match-method { margin: 10px 0 0; color: #9a765e; font-size: 9px; line-height: 1.6; font-weight: 650; letter-spacing: .025em; }
.panic-excerpt { max-height: 390px; overflow: auto; color: #4c4d5d; background: #f0eee8; font-size: 9px; }
.checklist-note { margin: -3px 0 12px; color: #85848b; font-size: 9px; line-height: 1.55; }
.tech-checklist { display: flex; flex-direction: column; border-top: 1px solid #ece8df; }
.tech-check-item { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 11px; align-items: start; padding: 12px 2px; border-bottom: 1px solid #ece8df; cursor: pointer; }
.tech-check-item input { width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.tech-check-copy { display: flex; flex-direction: column; gap: 4px; }
.tech-check-copy strong { color: var(--brand); font-size: 10px; line-height: 1.45; font-weight: 750; }
.tech-check-copy > span { color: #777986; font-size: 9px; line-height: 1.65; overflow-wrap: anywhere; }
.tech-check-item:has(input:checked) .tech-check-copy strong { color: var(--mint); }
.tech-check-item:has(input:checked) .tech-check-copy > span { color: #92958f; }
@media (max-width: 500px) {
  .panic-excerpt { max-height: 300px; }
  .tech-check-item { gap: 8px; }
}

.inspection-copy { display: flex; flex-direction: column; gap: 4px; }
.inspection-copy strong { color: var(--brand); font-size: 10px; line-height: 1.45; font-weight: 750; }
.inspection-copy > span { color: #777986; font-size: 9px; line-height: 1.65; overflow-wrap: anywhere; }
.panic-details summary, .secondary-signals summary { color: #7f6758; font-weight: 700; cursor: pointer; }
.panic-details { padding: 12px 14px; border: 1px solid rgba(61,64,91,.1); color: #727481; background: var(--card); font-size: 9px; }
.panic-details[open] { padding-bottom: 15px; }
.panic-details > p { margin: 8px 0; }
.hash-line { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.secondary-signals { margin-top: 11px; color: #737582; font-size: 9px; }
.secondary-signals summary { padding: 6px 0; }
.secondary-signals .signal-card { margin-top: 8px; }


.usb-card { margin-top: 12px; padding: 14px 15px 12px; border: 1px solid rgba(61,64,91,.13); background: #f8f6f0; }
.usb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.usb-tag { color: #7d8072; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.usb-copy { margin: 9px 0 10px; color: #777986; font-size: 9px; line-height: 1.65; }
.usb-button { width: 100%; padding: 10px 12px; border: 1px solid var(--brand); background: var(--brand); color: #fffefa; font-size: 9px; font-weight: 700; cursor: pointer; transition: background .18s, opacity .18s; }
.usb-button:hover:not(:disabled) { background: var(--brand-deep); }
.usb-button:disabled { cursor: wait; opacity: .58; }
.usb-button[hidden] { display: none; }
.usb-status { margin: 9px 0 0; color: #8a8277; font-size: 8px; line-height: 1.55; }
