:root {
  color-scheme: light;
  --navy: #101b2d;
  --navy-soft: #1d2b42;
  --ink: #172235;
  --muted: #66758a;
  --line: #e0e6ee;
  --paper: #f5f7fa;
  --white: #fff;
  --teal: #137c78;
  --teal-dark: #0d625f;
  --amber: #8d5710;
  --amber-bg: #fff7e8;
  --shadow: 0 18px 54px rgb(16 27 45 / 7%);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
.shell { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--teal); font: 800 18px Manrope, sans-serif; }
.brand-light { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; margin-left: 6px; }
.local-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-dark); background: #e6f4f2; padding: 8px 11px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.status-dot { width: 7px; height: 7px; background: #18a184; border-radius: 50%; }
.hero { padding: 60px 0 34px; }
.eyebrow { margin: 0 0 13px; color: var(--teal-dark); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
h1, h2 { font-family: Manrope, "Segoe UI", sans-serif; }
h1 { color: var(--navy); font-size: clamp(34px, 5vw, 53px); line-height: 1.13; letter-spacing: -.045em; margin: 0; }
h1 span { color: #718096; }
.hero-copy { max-width: 720px; line-height: 1.7; color: var(--muted); font-size: 15px; margin: 19px 0 0; }
.notice { display: flex; align-items: flex-start; gap: 14px; padding: 17px 19px; border: 1px solid #efdbb4; border-radius: 10px; background: var(--amber-bg); color: #654410; }
.notice-icon { display: grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; color: white; background: #bb7b20; font-size: 13px; font-weight: 800; }
.notice strong { font-size: 13px; }
.notice p { margin: 5px 0 0; font-size: 12px; line-height: 1.6; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.scan-panel { margin-top: 22px; padding: 27px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h2 { margin: 0; color: var(--navy); font-size: 23px; letter-spacing: -.035em; }
.section-heading .eyebrow { margin-bottom: 7px; }
.step-label { color: var(--muted); font-size: 11px; }
.muted { max-width: 770px; color: var(--muted); font-size: 13px; line-height: 1.65; margin: 14px 0 19px; }
.file-actions, .download-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { display: inline-flex; align-items: center; background: var(--navy); color: white; }
.button-primary:hover { background: var(--navy-soft); }
.button-secondary { border-color: var(--line); background: white; color: var(--navy); }
.button-secondary:hover { border-color: #b8c4d2; background: #f8fafc; }
.button-scan { min-width: 174px; background: var(--teal); color: white; }
.button-scan:hover:not(:disabled) { background: var(--teal-dark); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.selection-summary { color: var(--navy); font-size: 12px; font-weight: 600; margin: 16px 0 13px; }
.consent { display: flex; align-items: flex-start; gap: 10px; max-width: 800px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.consent input { margin: 2px 0 0; accent-color: var(--teal); }
.scan-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 21px; }
.limits-hint { color: var(--muted); font-size: 10px; }
.app-status { min-height: 18px; margin: 12px 0 0; color: var(--teal-dark); font-size: 12px; }
.app-status.error { color: #a12c2c; }
.results { margin: 31px 0 0; }
.results-heading { margin-bottom: 17px; }
.notice-incomplete { margin-bottom: 16px; border-color: #f0c9c4; background: #fff1ef; color: #822c25; }
.notice-incomplete .notice-icon { background: #ba4439; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 15px; }
.metric { padding: 15px 17px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.metric span { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 5px; color: var(--navy); font: 700 22px Manrope, sans-serif; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 9px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 13px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: top; font-size: 11px; }
th { color: #68788b; background: #f9fafc; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
td code { white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.55 "Cascadia Code", Consolas, monospace; }
tbody tr:last-child td { border-bottom: 0; }
.report-details { margin-top: 13px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--navy); font-size: 12px; }
.report-details summary { cursor: pointer; font-weight: 700; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 13px; }
.details-grid h3 { font-size: 11px; margin: 0 0 7px; }
.details-grid ul { margin: 0; padding-left: 17px; color: var(--muted); line-height: 1.65; }
.report-caveat { color: var(--muted); font-size: 11px; line-height: 1.65; margin: 12px 1px; }
.hidden { display: none !important; }
footer { display: flex; justify-content: space-between; gap: 10px; padding: 25px 0 32px; margin-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

@media (max-width: 680px) {
  .shell { padding: 0 17px; }
  .topbar { min-height: 66px; }
  .brand { font-size: 11px; }
  .brand-light { display: block; margin: 3px 0 0; font-size: 8px; }
  .hero { padding: 42px 0 25px; }
  .scan-panel { padding: 20px 17px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .step-label { margin-top: -8px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .download-actions { width: 100%; }
  footer { flex-direction: column; }
  .details-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
