:root {
  --ink: #0b0d12;
  --ink-soft: #141a24;
  --paper: #ffffff;
  --paper-soft: #f5f5f7;
  --accent: #ec2024;
  --accent-soft: #fdecec;
  --good: #1e8e3e;
  --good-bg: #e9f7ed;
  --warn: #a8710e;
  --warn-bg: #fff5e0;
  --bad: #d93025;
  --bad-bg: #fdecea;
  --info: #6e7180;
  --info-bg: #f0f0f3;
  --line: rgba(11, 13, 18, 0.08);
  --line-strong: rgba(11, 13, 18, 0.14);
  --muted: #6e7180;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(11, 13, 18, 0.04), 0 1px 1px rgba(11, 13, 18, 0.03);
  --shadow-md: 0 10px 30px rgba(11, 13, 18, 0.08), 0 2px 8px rgba(11, 13, 18, 0.04);
  --shadow-lg: 0 24px 60px rgba(11, 13, 18, 0.14), 0 4px 16px rgba(11, 13, 18, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper-soft);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { height: 20px; width: auto; display: block; }
.brand-name { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.header-title { font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 160% at 15% -10%, #23283a 0%, var(--ink) 55%, #000 100%);
  color: #fff;
  padding: 72px 0 128px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(236, 32, 36, 0.22), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f3b4b5;
  background: rgba(236, 32, 36, 0.14);
  border: 1px solid rgba(236, 32, 36, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  max-width: 720px;
}
.hero p.sub {
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  max-width: 560px;
  margin: 0;
}

/* ---------- Layout ---------- */
main.wrap { padding: 0 24px 80px; }
.content-shell { margin-top: -84px; position: relative; z-index: 5; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}
.scan-form.card { box-shadow: var(--shadow-lg); }

.card h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---------- Form ---------- */
.row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.grow { flex: 1; min-width: 260px; }
.field.small { width: 150px; }
label { font-size: 12px; font-weight: 600; color: var(--muted); }

input[type=text], input[type=number] {
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper-soft);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input[type=text]:focus, input[type=number]:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

button {
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}
button:hover { background: var(--accent); box-shadow: var(--shadow-md); }
button:active { transform: scale(0.96); }
button:disabled { background: #c7c9d2; cursor: not-allowed; box-shadow: none; transform: none; }

.hint { font-size: 13px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.checkbox-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500;
  color: var(--muted); margin-top: 16px; cursor: pointer; width: fit-content;
}
.checkbox-row input {
  width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer;
}

/* ---------- Progress ---------- */
.progress-head { display: flex; gap: 16px; align-items: center; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin 0.7s cubic-bezier(0.55, 0, 0.45, 1) infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
#progress-message { font-weight: 600; font-size: 15px; }
.progress-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.error-card { border-color: rgba(217, 48, 37, 0.3); background: var(--bad-bg); color: var(--bad); }

/* ---------- Report head + stat cards ---------- */
.report-head .meta { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
#report-title { margin-bottom: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card {
  border-radius: var(--radius-md);
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.stat-card.goed::before { background: var(--good); }
.stat-card.kan_beter::before { background: var(--warn); }
.stat-card.niet_goed::before { background: var(--bad); }
.stat-num { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stat-card.goed .stat-num { color: var(--good); }
.stat-card.kan_beter .stat-num { color: var(--warn); }
.stat-card.niet_goed .stat-num { color: var(--bad); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 500; }

@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- Category groups + check items ---------- */
.cat-group { margin-bottom: 22px; }
.cat-group:last-child { margin-bottom: 0; }
.cat-title {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0 2px 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}

.check-item {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 16px 18px; margin-bottom: 10px; background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.check-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.check-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.check-item-title { font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.status-pill.goed { background: var(--good-bg); color: var(--good); }
.status-pill.goed::before { background: var(--good); }
.status-pill.kan_beter { background: var(--warn-bg); color: var(--warn); }
.status-pill.kan_beter::before { background: var(--warn); }
.status-pill.niet_goed { background: var(--bad-bg); color: var(--bad); }
.status-pill.niet_goed::before { background: var(--bad); }
.status-pill.info { background: var(--info-bg); color: var(--info); }
.status-pill.info::before { background: var(--info); }

.check-detail { font-size: 13.5px; color: #3a3d47; margin-top: 8px; line-height: 1.5; }
.check-explain { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.issues-toggle {
  font-size: 12.5px; color: var(--accent); cursor: pointer; margin-top: 10px;
  display: inline-block; font-weight: 600;
}
.issues-list {
  display: none; margin-top: 10px; font-size: 12.5px; color: #555;
  max-height: 220px; overflow-y: auto; background: var(--paper-soft);
  border-radius: var(--radius-sm); padding: 4px 12px;
}
.issues-list.open { display: block; }
.issues-list div { padding: 6px 0; border-bottom: 1px dashed var(--line); word-break: break-all; }
.issues-list div:last-child { border-bottom: none; }

.prompt-box {
  background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 12.5px; color: #333; margin-top: 10px;
  white-space: pre-wrap; word-break: break-word; line-height: 1.5;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.copy-btn {
  margin-top: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line-strong);
  padding: 7px 14px; font-size: 12.5px; border-radius: 999px; cursor: pointer; font-weight: 600;
  box-shadow: none;
}
.copy-btn:hover { background: var(--ink); color: #fff; }
.copy-btn:active { transform: scale(0.96); }

/* ---------- Table ---------- */
/* overflow-x: auto (i.p.v. hidden) zodat brede tabellen horizontaal scrollen i.p.v.
   dat de laatste kolom(men) onzichtbaar afgekapt worden door de ronde-hoeken-clip. */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
}
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13.5px; table-layout: fixed; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--paper-soft); font-weight: 700; position: sticky; top: 0;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafafb; }

/* Vaste kolombreedtes (via table-layout: fixed) zodat lange, aaneengesloten URL's
   niet meer de hele tabel breder duwen dan de kaart - ze breken nu netjes af. */
th:nth-child(1), td:nth-child(1) { width: 30%; }
th:nth-child(2), td:nth-child(2) { width: 20%; }
th:nth-child(3), td:nth-child(3) { width: 10%; }
th:nth-child(4), td:nth-child(4) { width: 40%; }

td.url-cell {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
td.url-cell a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
td.url-cell a:hover { color: var(--accent); border-color: var(--accent); }
td.found-on-cell { word-break: break-all; font-size: 12.5px; color: #3a3d47; }
td.found-on-cell div { padding: 2px 0; }
td.status-cell { word-break: break-word; }
td.status-cell small { display: block; word-break: break-all; }

.tag {
  font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--info-bg);
  color: var(--muted); font-weight: 600;
}
.tag.internal { background: var(--accent-soft); color: var(--accent); }

.pages-list { max-height: 320px; overflow-y: auto; font-size: 13px; border-radius: var(--radius-sm); }
.pages-list .row-item {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px;
  border-bottom: 1px dashed var(--line);
}
.pages-list .row-item:last-child { border-bottom: none; }
.pages-list .row-item span:first-child {
  word-break: break-all; margin-right: 10px; color: #3a3d47;
}
.pages-list .row-item span:last-child { font-weight: 600; white-space: nowrap; }

.footer {
  text-align: center; color: var(--muted); font-size: 12.5px; padding: 32px 0 48px;
}
.footer svg { height: 14px; vertical-align: -2px; margin: 0 4px; }
