:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1c1b19;
  --muted: #6b6862;
  --border: #e4e1db;
  --accent: #2357c6;
  --accent-text: #ffffff;
  --code-bg: #f2f0ec;
  --critical: #b42318;
  --critical-bg: #fdecea;
  --high: #b54708;
  --high-bg: #fdf0e3;
  --medium: #8a6a00;
  --medium-bg: #fbf3d6;
  --low: #55524c;
  --low-bg: #efede9;
  --good: #1f7a3f;
  --good-bg: #e5f4e4;
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1d1c1a;
    --text: #ecebe8;
    --muted: #a19e97;
    --border: #33312d;
    --accent: #7fa6ff;
    --accent-text: #0f1420;
    --code-bg: #262521;
    --critical: #ff8a7a;
    --critical-bg: #3b1a16;
    --high: #ffad66;
    --high-bg: #3a2414;
    --medium: #f0cf5b;
    --medium-bg: #342c10;
    --low: #c9c5bd;
    --low-bg: #2b2a26;
    --good: #7ad49a;
    --good-bg: #16301f;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.example-banner {
  background: var(--medium-bg);
  color: var(--medium);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
}

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 4px 18px; flex-wrap: wrap; padding: 8px 0; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }
.site-header nav a[aria-current="page"] { font-weight: 600; }

main { padding: 32px 16px 48px; }

h1 { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-size: 21px; margin: 36px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 16px; margin: 0 0 4px; overflow-wrap: anywhere; }
.lead { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }

.hero { padding: 16px 0 8px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: transparent; color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 8px; }
.stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.stat { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }

.table-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.table-tools label { font-size: 14px; color: var(--muted); }
input[type="search"], input[type="text"] {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 0;
  flex: 1;
  max-width: 420px;
}
input:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
tr.withdrawn td { opacity: 0.6; }

.badge { display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap; background: var(--low-bg); color: var(--low); }
.badge-severity-critical { background: var(--critical-bg); color: var(--critical); }
.badge-severity-high { background: var(--high-bg); color: var(--high); }
.badge-severity-medium { background: var(--medium-bg); color: var(--medium); }
.badge-status-fixed, .badge-status-removed { background: var(--good-bg); color: var(--good); }
.badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.card dl { margin: 12px 0 0; }
.card dt { font-size: 13px; color: var(--muted); margin-top: 10px; }
.card dd { margin: 2px 0 0; }
.card ul { margin: 4px 0 0; padding-left: 18px; overflow-wrap: anywhere; }

code { font-family: var(--mono); font-size: 0.9em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
code.hash { display: block; width: fit-content; max-width: 100%; overflow-wrap: anywhere; margin: 2px 0; }
pre { background: var(--code-bg); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; margin: 4px 0 0; }
pre code { background: none; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence { margin: 12px 0; }

.timeline { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.timeline dt { color: var(--muted); }
.timeline dd { margin: 0; }

.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.notice { border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }
.notice-withdrawn { background: var(--high-bg); color: var(--text); border: 1px solid var(--border); }

.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }

.checker { padding: 20px; }
.file-drop { display: flex; align-items: center; justify-content: center; min-height: 120px; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer; text-align: center; padding: 16px; position: relative; }
.file-drop.dragging { border-color: var(--accent); background: var(--code-bg); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.or { text-align: center; margin: 14px 0 10px; }
.hash-row { display: flex; gap: 8px; justify-content: center; }
.hash-row input { max-width: 520px; font-family: var(--mono); font-size: 14px; }
.result-hit { border-color: var(--critical); }
.result-clear { border-color: var(--border); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; padding: 20px 0 32px; }
.site-footer p { margin: 4px 0; }

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .lead { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  th, td { padding: 9px 10px; }
  .hash-row { flex-direction: column; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline dd { margin-bottom: 8px; }
}
