:root {
  --ink: #152234;
  --muted: #617083;
  --line: #dbe1e8;
  --paper: #ffffff;
  --ground: #f5f7fa;
  --navy: #19375e;
  --critical: #b42318;
  --high: #d05a16;
  --medium: #9a6500;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(100deg, #f9fafc 0%, #f2f5f9 72%, #edf2f8 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 72px; }
.hero { display: grid; grid-template-columns: 1fr 2.25fr; align-items: end; gap: 27px; max-width: 820px; animation: enter .45s ease-out both; }
.eyebrow { margin: 0 0 10px; color: var(--navy); font: 700 .7rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(2.45rem, 5vw, 4.6rem); line-height: .82; letter-spacing: -.075em; }
.hero > p:last-child { max-width: 410px; margin: 0 0 3px; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.tool-tabs { display: inline-flex; gap: 3px; margin: 42px 0 15px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.tool-tab { appearance: none; border: 0; padding: 8px 14px; border-radius: 3px; background: transparent; color: var(--muted); font-size: .85rem; font-weight: 700; }
.tool-tab[aria-selected="true"] { color: white; background: var(--navy); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; min-height: 58px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.upload-button { display: inline-flex; align-items: center; min-height: 35px; padding: 0 14px; color: white; background: var(--navy); border: 1px solid var(--navy); border-radius: 3px; font-size: .84rem; font-weight: 700; cursor: pointer; }
.upload-button:hover { background: #102a4a; }
.upload-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.hint, .snapshot-meta, .result-count { margin: 0; color: var(--muted); font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.quiet-button { margin-left: auto; padding: 6px 0; background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.quiet-button:hover { color: var(--danger); }
.empty-state { margin-top: 22px; padding: 58px 36px; border: 1px dashed #b7c2cf; background: rgba(255,255,255,.68); text-align: center; }
.empty-state h2 { margin-bottom: 8px; font-size: 1.7rem; }
.empty-state p:last-child { margin: 0; color: var(--muted); }
#report { padding-top: 18px; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 14px 0 19px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: var(--paper); }
.metric { position: relative; padding: 15px 17px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric b { display: block; font-size: 1.8rem; line-height: 1; letter-spacing: -.06em; }
.metric span { display: block; margin-top: 6px; color: var(--muted); font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.metric:nth-child(1) b { color: var(--critical); }.metric:nth-child(2) b { color: var(--high); }.metric:nth-child(3) b { color: var(--medium); }
.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.filters label { display: grid; gap: 5px; color: var(--muted); font: .7rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.filters input, .filters select { width: 100%; min-width: 0; padding: 8px; color: var(--ink); background: white; border: 1px solid #cfd7cd; border-radius: 3px; }
.result-count { margin: 18px 0 8px; }
.findings { border-top: 1px solid var(--line); }
.finding { display: grid; grid-template-columns: 116px minmax(0, 1fr) minmax(160px, .62fr); gap: 20px; width: 100%; padding: 15px 12px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.finding:hover { background: #f8fafc; }
.badges { display: flex; flex-wrap: wrap; align-content: start; gap: 4px; }
.badge { width: max-content; padding: 5px 6px; border: 1px solid #d8dee7; border-radius: 3px; color: var(--muted); background: white; font: 700 .64rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.status-pass { color: #18744a; border-color: #b7dfc9; background: #f3fcf6; }.status-fail, .status-error { color: var(--critical); border-color: #f2c6c2; background: #fff8f7; }
.severity-critical, .severity-danger { color: var(--critical); border-color: #f2c6c2; background: #fff8f7; }.severity-high { color: var(--high); border-color: #f3d2bb; background: #fff9f4; }.severity-medium, .severity-warning { color: var(--medium); border-color: #ead9ad; background: #fffdf5; }
.finding h3 { margin: 0 0 5px; font-size: .96rem; }
.finding p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.finding-meta { max-width: 290px; color: var(--muted); font: .7rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left; overflow-wrap: anywhere; }
.no-results { padding: 32px 4px; color: var(--muted); }
dialog { width: min(610px, 100%); height: 100vh; max-height: none; margin: 0 0 0 auto; padding: 0; color: var(--ink); border: 0; box-shadow: -16px 0 50px rgba(21,34,52,.16); }
dialog::backdrop { background: rgba(21,34,52,.22); }
dialog article { position: relative; min-height: 100%; padding: 37px 34px; }
.dialog-close { position: absolute; top: 13px; right: 16px; width: 34px; height: 34px; border: 0; background: none; font-size: 1.7rem; }
.detail-fields { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; margin: 22px 0; font-size: .9rem; }
.detail-fields dt { color: var(--muted); }
.detail-fields dd { margin: 0; overflow-wrap: anywhere; }
dialog section { margin-top: 23px; } dialog h3 { margin-bottom: 6px; font-size: .95rem; } dialog section p { margin: 0; line-height: 1.5; white-space: pre-wrap; }
pre { max-height: 280px; overflow: auto; padding: 13px; background: #f4f6f1; font: .72rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
@keyframes enter { from { opacity: 0; transform: translateY(11px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) { .shell { width: min(100% - 22px, 1160px); padding: 34px 0; } .hero { display: block; }.hero > p:last-child { margin-top: 18px; }.tool-tabs { width: 100%; margin-top: 30px; }.tool-tab { flex: 1; padding-inline: 7px; font-size: .77rem; } .quiet-button { margin-left: 0; } .summary { grid-template-columns: repeat(2, 1fr); }.metric:nth-child(2) { border-right: 0; }.metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.filters { grid-template-columns: 1fr; } .finding { grid-template-columns: 1fr; gap: 9px; } .finding-meta { max-width: none; } dialog article { padding: 29px 21px; } }
