:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee9;
  --paper: #ffffff;
  --wash: #f5f7fb;
  --blue: #2759d7;
  --pass: #18794e;
  --warn: #9a6700;
  --fail: #c4322b;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--wash); color: var(--ink); font: 15px/1.45 Calibri, "Segoe UI", sans-serif; }
main { width: min(1080px, calc(100% - 32px)); margin: 28px auto 64px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.eyebrow { color: var(--blue); font-weight: 700; letter-spacing: .14em; margin: 0; font-size: 12px; }
h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -.04em; margin: 2px 0 0; }
.subtitle { color: var(--muted); margin: 2px 0 0; font-size: 17px; }
.privacy { white-space: nowrap; background: #eaf8f1; color: var(--pass); border: 1px solid #b8dfcc; border-radius: 99px; padding: 8px 12px; font-weight: 700; }
.privacy span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pass); margin-right: 6px; }
.notice { background: #fff8e6; border: 1px solid #ead49a; color: #684f00; padding: 11px 14px; border-radius: 10px; }
.tabs { display: flex; gap: 4px; margin-top: 20px; }
.tabs button { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tabs button.active { background: var(--paper); color: var(--blue); border-bottom-color: var(--paper); }
button, input, select { font: inherit; }
button { border: 1px solid var(--line); color: var(--ink); background: #eef1f6; border-radius: 8px; padding: 9px 13px; cursor: pointer; }
button:hover { filter: brightness(.98); }
button:disabled { cursor: wait; opacity: .55; }
button.primary { background: var(--blue); color: white; border-color: var(--blue); font-weight: 700; }
.input-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 0 12px 12px 12px; padding: 18px; display: flex; flex-wrap: wrap; gap: 14px; align-items: end; box-shadow: 0 8px 26px rgba(26, 37, 65, .06); }
.field { display: grid; gap: 5px; }
.field.grow { flex: 1 1 360px; }
.field.compact { flex: 0 1 170px; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input[type="file"], input[type="number"], select { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: white; }
.check { display: flex; gap: 7px; align-items: center; min-height: 40px; color: var(--ink); }
.hint { flex: 1 0 100%; margin: -2px 0 0; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 8px; }
.toolbar p { color: var(--muted); margin: 0; }
.toolbar div { display: flex; gap: 8px; }
.results { display: grid; gap: 14px; }
.empty { padding: 50px 16px; text-align: center; color: var(--muted); border: 1px dashed #b9c1cf; border-radius: 12px; background: rgba(255,255,255,.55); }
.result { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 18px; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--pass); border-radius: 12px; }
.result.warning { border-left-color: var(--warn); }
.result.fail { border-left-color: var(--fail); }
.result > img { width: 100%; height: 200px; object-fit: contain; border: 1px solid var(--line); background: white; border-radius: 7px; }
.result-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.result-title h2 { margin: 0; font-size: 19px; }
.badge { border-radius: 99px; padding: 4px 9px; color: white; background: var(--pass); font-weight: 700; font-size: 12px; }
.warning .badge { background: var(--warn); }
.fail .badge { background: var(--fail); }
.meta { margin: 2px 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 6px; }
.metric { display: flex; justify-content: space-between; gap: 8px; background: var(--wash); border-radius: 6px; padding: 5px 7px; font-size: 12px; }
.metric.warning b { color: var(--warn); }
.metric.fail b { color: var(--fail); }
.issues { margin: 10px 0 0; padding-left: 20px; color: var(--fail); font-size: 13px; }
.clean { color: var(--pass); font-size: 13px; }

@media (max-width: 720px) {
  .hero, .toolbar { align-items: flex-start; flex-direction: column; }
  .result { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

@media print {
  body { background: white; }
  main { width: 100%; margin: 0; }
  .notice, .tabs, .input-panel, .toolbar div { display: none !important; }
  .result { break-inside: avoid; }
}
