/* Checker — Verve visual language.
   Acid Grotesk (self-hosted) + JetBrains Mono. White, flat, 6px corners. */

@font-face {
  font-family: "Acid Grotesk";
  src: url("/fonts/FFF-AcidGrotesk-Regular.woff2") format("woff2"),
       url("/fonts/FFF-AcidGrotesk-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Acid Grotesk";
  src: url("/fonts/FFF-AcidGrotesk-Medium.woff2") format("woff2"),
       url("/fonts/FFF-AcidGrotesk-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Acid Grotesk";
  src: url("/fonts/FFF-AcidGrotesk-ExtraBold.woff2") format("woff2"),
       url("/fonts/FFF-AcidGrotesk-ExtraBold.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface-alt: #f4f4f5;
  --surface-alt-strong: #ececee;
  --border: #e4e4e7;
  --accent: #84cc16;
  --text: #09090b;
  --text-muted: #52525b;
  --text-dim: #a1a1aa;
  --score-high: #46B770;
  --score-mid: #FEF254;
  --score-low: #FF316B;

  --font-body: "Acid Grotesk", Inter, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
}
.hdr-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hdr-right { position: relative; }
.hdr-logo {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hdr-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 2px;
}
.hdr-right { display: flex; align-items: center; gap: 14px; }
.hdr-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 5px 9px;
  font-weight: 500;
  white-space: nowrap;
}
.inline-form { display: inline; }

/* Avatar + user-menu */
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; display: block; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-initials {
  display: grid;
  place-items: center;
  background: var(--text);
  color: #fafafa;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.user-wrap { position: relative; }
.user-menu {
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 230px;
  z-index: 30;
  animation: menuIn 0.14s ease-out;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.user-menu-email {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 10px 12px 9px;
  border-bottom: 1px solid var(--surface-alt);
  margin-bottom: 4px;
  white-space: nowrap;
}
.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 4px;
  padding: 9px 12px;
  cursor: pointer;
}
.user-menu-item:hover { background: var(--surface-alt); }

/* ---------- Layout ---------- */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 32px 80px;
}
.wrap-narrow { max-width: 640px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 28px;
}
.page-title {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.page-actions { display: flex; gap: 8px; }
.section-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 36px 0 16px;
}
.project-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.project-url:hover { color: var(--text); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary { background: var(--text); color: #fafafa; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: var(--surface-alt); color: var(--text); }
.btn-ghost:hover { background: var(--surface-alt-strong); }
.btn-danger-ghost {
  background: transparent;
  color: #b91c1c;
  font-size: 12px;
  padding: 8px 10px;
}
.btn-danger-ghost:hover { background: #fef1f2; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---------- Dashboard: volle-breedte rijen ---------- */
.wrap-wide { max-width: 1180px; }
.page-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin: 6px 0 0;
}
.project-rows { display: flex; flex-direction: column; gap: 10px; }
.project-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  column-gap: 20px;
  align-items: center;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 18px 24px 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease, transform 0.15s ease;
}
.project-row:hover { background: var(--surface-alt-strong); transform: translateY(-1px); }

.row-bhi {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  row-gap: 2px;
  font-size: 21px;
  font-weight: 700;
  color: #1a1a18;
  letter-spacing: -0.01em;
  line-height: 1;
}
.row-bhi.is-high { background: var(--score-high); }
.row-bhi.is-mid  { background: var(--score-mid); }
.row-bhi.is-low  { background: var(--score-low); }
.row-bhi.is-none { background: var(--bg); color: var(--text-dim); font-weight: 400; }
.row-bhi .bhi-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0.72;
}

.row-id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.row-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta { display: flex; gap: 18px; align-items: center; justify-content: flex-end; }
.row-facts {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  white-space: nowrap;
}
.row-facts .sep { opacity: 0.4; margin: 0 7px; }

.sched-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg);
  border-radius: 6px;
  padding: 9px 14px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  min-width: 92px;
  text-align: center;
}
.sched-pill.is-live { color: var(--text); }
.sched-pill.is-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1px;
}

/* legacy card-classes (admin page still uses meta-chip) */
.project-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg);
  border-radius: 4px;
  padding: 4px 7px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Empty state ---------- */
.empty {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
}
.empty-title { font-size: 18px; font-weight: 500; margin: 0 0 8px; }
.empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 420px;
  margin: 0 auto 20px;
}

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.field .optional {
  margin-left: 6px;
  text-transform: lowercase;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.field-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}
input[type="text"], select {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  width: 100%;
}
input[type="text"]:focus, select:focus {
  border-color: var(--text);
}

/* Locked fields (edit form): unmistakably grey and inert */
input:disabled, select:disabled {
  background: var(--surface-alt);
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted); /* Safari keeps text grey */
  border-color: transparent;
  cursor: not-allowed;
  opacity: 1; /* normalise iOS default dimming */
}
.lens-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lens-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.12s ease;
}
.lens-check:hover { box-shadow: inset 0 0 0 1px var(--border-strong, #d4d4d8); }
.lens-check input { accent-color: var(--text); margin-top: 2px; flex-shrink: 0; }
.lens-check-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lens-check-name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--text);
}
.lens-check-desc {
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  font-weight: 400;
}
.radio-row { display: flex; gap: 18px; }
.radio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}
.radio input { accent-color: var(--text); }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}
.form-error {
  background: #fef1f2;
  color: #a01230;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- Project detail ---------- */
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.detail-meta .meta-wide { grid-column: 1 / -1; }
.meta-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 5px;
}
.meta-value { font-size: 14px; font-weight: 500; display: flex; gap: 6px; flex-wrap: wrap; }

.audit-list { display: flex; flex-direction: column; gap: 8px; }
.audit-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px 90px;
  align-items: center;
  gap: 14px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
}
.audit-row:hover { background: var(--surface-alt-strong); }
.audit-status {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.status-done { color: #1f8b4c; }
.status-running, .status-pending { color: #8a7a00; }
.status-failed { color: #b91c1c; }
.audit-date { font-size: 13px; }
.audit-trigger {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-align: right;
}
.score-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 26px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 13px;
  color: #1a1a18;
}
.score-pip.is-high { background: var(--score-high); }
.score-pip.is-mid  { background: var(--score-mid); }
.score-pip.is-low  { background: var(--score-low); }

.danger-zone {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-alt);
  display: flex;
  justify-content: flex-end;
}

/* ---------- Brand Health Index ---------- */
.bhi-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 20px 24px;
}
.bhi-score { display: flex; flex-direction: column; gap: 2px; }
.bhi-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.bhi-denom {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dim);
  margin-left: 3px;
}
.bhi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}
.bhi-delta { text-transform: none; letter-spacing: 0.02em; }
.bhi-delta.up { color: #1f8b4c; }
.bhi-delta.down { color: #b91c1c; }
.bhi-chart { flex-shrink: 0; display: flex; align-items: center; }

/* ---------- Audit matrix ---------- */
.matrix-scroll { overflow-x: auto; }
.audit-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.audit-matrix th {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  text-align: center;
  padding: 0 8px 2px;
  white-space: nowrap;
}
.audit-matrix th.col-date { text-align: left; padding-left: 18px; }
.audit-matrix th.col-trigger { width: 70px; }
.matrix-row { cursor: pointer; }
.matrix-row td {
  background: var(--surface-alt);
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
}
.matrix-row:hover td { background: var(--surface-alt-strong); }
.matrix-row td:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
  text-align: left;
  padding-left: 18px;
  white-space: nowrap;
}
.matrix-row td:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.col-bhi { font-weight: 500; }
.col-trigger {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}
.mini-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 500;
  color: #1a1a18;
}
.mini-pip.is-high { background: var(--score-high); }
.mini-pip.is-mid  { background: var(--score-mid); }
.mini-pip.is-low  { background: var(--score-low); }
.mini-pip.is-empty { background: transparent; color: var(--text-dim); }

/* ---------- Delta badges & panel ---------- */
.delta-badge {
  display: inline-flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.d-resolved { color: #1f8b4c; }
.d-added { color: #8a7a00; }

.delta-panel {
  background: var(--surface-alt);
  border-radius: var(--radius);
  margin-bottom: 32px;
}
.delta-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}
.delta-panel summary::-webkit-details-marker { display: none; }
.delta-summary-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.delta-summary-label::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: var(--text-dim);
  transition: transform 0.15s ease;
}
.delta-panel[open] .delta-summary-label::before { transform: rotate(90deg); }
.delta-body { padding: 4px 20px 18px; }
.delta-body .block-label { margin: 12px 0 8px; }
.delta-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.delta-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 9px 12px;
}
.delta-item.resolved { color: var(--text-muted); }
.delta-item.resolved .delta-mark { color: #1f8b4c; font-weight: 700; }
.delta-item.added .delta-mark { color: #8a7a00; font-weight: 700; }
.delta-lens {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 2px;
}
.delta-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  margin: 14px 0 0;
  line-height: 1.5;
}

/* ---------- Audit detail ---------- */
.crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 8px;
}
.crumb:hover { color: var(--text); }
.page-title-date {
  font-size: 18px;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 10px;
}
.avg-tile {
  width: 68px;
  height: 68px;
  border-radius: var(--radius);
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 20px;
  color: #1a1a18;
  flex-shrink: 0;
}
.avg-tile.is-high { background: var(--score-high); }
.avg-tile.is-mid  { background: var(--score-mid); }
.avg-tile.is-low  { background: var(--score-low); }
.avg-num { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.avg-denom { font-family: var(--font-mono); font-size: 11px; opacity: 0.55; margin-left: 2px; }

.audit-status-line { margin: -10px 0 30px; }
.audit-status-line .sep { opacity: 0.4; margin: 0 8px; }
.audit-status-line a { color: var(--text-muted); text-decoration: none; }
.audit-status-line a:hover { color: var(--text); text-decoration: underline; }

/* Subtiele copy-as-markdown link in de status-regel */
.copy-md {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--text-dim);
  text-underline-offset: 3px;
}
.copy-md:hover { color: var(--text); }

.lens-block { margin-bottom: 52px; }
.lens-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.lens-title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
.score-pip-lg { min-width: 52px; height: 32px; font-size: 15px; }

.lens-card { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.block-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.block-label.standalone { margin: 22px 0 10px; }
.block-body { font-size: 14.5px; line-height: 1.6; }
.block-body + .block-label { margin-top: 12px; }

.md-p { margin: 0 0 8px; line-height: 1.6; }
.md-p:last-child { margin-bottom: 0; }
.md-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.md-list:last-child { margin-bottom: 0; }
.md-list li { position: relative; padding-left: 15px; line-height: 1.55; }
.md-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}
.md-p strong, .md-list strong { font-weight: 500; }

.recs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rec-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  column-gap: 12px;
  row-gap: 5px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.rec-num {
  grid-row: 1 / span 3;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 500;
  padding-top: 3px;
}
.rec-action { font-size: 15px; font-weight: 500; letter-spacing: -0.005em; line-height: 1.35; }
.rec-effort {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a1a18;
  padding: 5px 8px;
  border-radius: var(--radius);
  font-weight: 500;
  white-space: nowrap;
}
.rec-effort.quick  { background: var(--score-high); }
.rec-effort.medium { background: var(--score-mid); }
.rec-effort.deep   { background: #d4d4d8; }
.rec-detail { grid-column: 2 / span 2; font-size: 13.5px; line-height: 1.55; }
.rec-addresses {
  grid-column: 2 / span 2;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.rec-addresses .label {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9px;
  margin-right: 6px;
}

.sources { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sources li {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.src-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.src-snippet { font-size: 13px; line-height: 1.5; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
.login-logo {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.025em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.login-logo .hdr-dot { width: 12px; height: 12px; }
.login-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.btn-google { font-size: 15px; padding: 12px 22px; }
.login-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  margin: 4px 0 0;
}
.login-foot { position: fixed; bottom: 28px; }


/* ---------- Admin ---------- */
.hdr-admin {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
}
.hdr-admin:hover { color: var(--text); }
.admin-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin: 6px 0 0;
}
.admin-user { margin-bottom: 36px; }
.admin-user-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-user-name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.admin-user-email {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 10px;
}
.admin-user-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}
.admin-none {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin: 0;
}
.admin-project-list { display: flex; flex-direction: column; gap: 8px; }
.admin-project {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text);
}
.admin-project:hover { background: var(--surface-alt-strong); }
.admin-project-name { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.admin-project-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-project-meta { display: flex; gap: 6px; }


/* ---------- Scorecard tabs (audit detail) ---------- */
.scorecard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 8px 0 26px;
}
.score-tab {
  border: 0;
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  color: #1a1a18;
  opacity: 0.68;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.score-tab:hover { opacity: 0.9; }
.score-tab.is-active {
  opacity: 1;
  transform: translateY(-2px);
  outline: 2px solid var(--text);
  outline-offset: -2px;
}
.score-tab.is-high { background: var(--score-high); }
.score-tab.is-mid  { background: var(--score-mid); }
.score-tab.is-low  { background: var(--score-low); }
.score-tab.tab-failed { background: var(--surface-alt-strong); color: var(--text-muted); }
.score-tab.tab-actions { background: var(--text); color: #fafafa; }
.score-tab-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.score-tab-denom {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.55;
  margin-left: 2px;
}
.score-tab-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-top: 12px;
}

/* ---------- Panels ---------- */
.panel { display: none; }
.panel.is-active { display: block; animation: panelIn 0.18s ease-out; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel-intro { margin-bottom: 22px; }
.panel-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.panel-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.lens-lead {
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.008em;
  margin-bottom: 14px;
}
.lens-lead .md-p { margin: 0; }
.lens-rationale {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13.5px;
}

/* ---------- Action list (checklist) ---------- */
.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 12px;
  align-items: start;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.action-item.is-done { opacity: 0.55; }
.action-item.is-done .action-title { text-decoration: line-through; }
.rec-check {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--text);
  cursor: pointer;
}
.action-body { min-width: 0; }
.action-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.action-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.action-lens {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.action-detail {
  font-size: 13.5px;
  line-height: 1.55;
  margin-top: 5px;
}
.copy-btn {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  line-height: 0;
  margin-top: 1px;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.action-item:hover .copy-btn,
.copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--text); background: var(--surface-alt-strong); }

/* ---------- Evidence uitklapper ---------- */
.evidence-panel {
  margin-top: 20px;
  background: var(--surface-alt);
  border-radius: var(--radius);
}
.evidence-panel summary {
  padding: 13px 18px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.evidence-panel summary::-webkit-details-marker { display: none; }
.evidence-panel summary::before {
  content: '\25B8';
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s ease;
}
.evidence-panel[open] summary::before { transform: rotate(90deg); }
.evidence-panel .sources { padding: 0 14px 14px; }


/* ---------- App footer ---------- */
.app-foot {
  max-width: 1180px;
  margin: 72px auto 0;
  padding: 18px 32px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--surface-alt);
}
.app-foot .foot-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-foot a { color: var(--text-muted); text-decoration: none; }
.app-foot a:hover { color: var(--text); }

/* ---------- Changelog ---------- */
.hdr-whatsnew {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.hdr-whatsnew:hover { color: var(--text); }
.new-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 5px;
  vertical-align: super;
}
.log-entry { margin-bottom: 38px; }
.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.log-title { font-size: 20px; font-weight: 500; letter-spacing: -0.015em; margin: 0; }
.log-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.log-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-items > li {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.55;
}
.log-items .md-p { margin: 0; }


/* ---------- 404 ---------- */
.notfound-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin: -6px 0 0;
}


/* ---------- Loading dots + disabled buttons ---------- */
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 7px;
  vertical-align: baseline;
}
.dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: dot-hop 1.1s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
.dots-lg { gap: 4px; margin-left: 8px; }
.dots-lg span { width: 6px; height: 6px; }
@keyframes dot-hop {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-4px); opacity: 1; }
}


/* ================= Mobile ================= */
@media (max-width: 720px) {
  .hdr { padding: 14px 18px; }
  .hdr-pill { display: none; }             /* lockup te breed op klein scherm */
  .hdr-logo { font-size: 21px; }

  .wrap, .wrap-wide, .wrap-narrow { padding-left: 18px; padding-right: 18px; }
  .page-title { font-size: 27px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 8px; }
  .page-actions { justify-content: stretch; }
  .page-actions .btn { flex: 1; justify-content: center; }

  /* Dashboard-rijen stapelen */
  .project-row {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "bhi id"
      "meta meta";
    row-gap: 12px;
    padding: 14px 16px;
  }
  .row-bhi { grid-area: bhi; width: 48px; height: 48px; font-size: 18px; }
  .row-id { grid-area: id; }
  .row-meta { grid-area: meta; justify-content: space-between; }

  /* Formulieren */
  .lens-checks { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .detail-meta { grid-template-columns: 1fr; }

  /* Audit-pagina */
  .scorecard { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .score-tab { min-height: 104px; padding: 14px 12px 12px; }
  .score-tab-num { font-size: 34px; }
  .audit-meta-line { flex-wrap: wrap; }
  .action-item { grid-template-columns: 24px 1fr; }
  .action-item .copy-btn { display: none; }  /* copy is desktop-werk */
  .action-head { flex-direction: column; align-items: flex-start; gap: 6px; }

  .app-foot { margin-top: 48px; padding: 16px 18px 28px; }
  .avg-tile { width: 56px; height: 56px; padding-top: 16px; }
  .avg-num { font-size: 21px; }
}

/* ================= Motion discipline ================= */
/* Subtiel en betekenisvol: alleen micro-transities op interactie en de
   bestaande laad-indicatoren. Wie reduced motion vraagt, krijgt stilte. */
a, button { transition: color 0.12s ease, background 0.15s ease, opacity 0.15s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.lens-check:has(input:disabled) { opacity: 0.55; cursor: default; }
.lens-check:has(input:disabled):hover { box-shadow: none; }


/* ---------- Project detail: balans-pas ---------- */
.status-link { color: var(--text-muted); text-decoration: none; }
.status-link:hover { color: var(--text); text-decoration: underline; }
.page-status .sep { opacity: 0.4; margin: 0 8px; }
.lens-line {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 4px 0 0;
  max-width: 640px;
}

.bhi-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.bhi-block { max-width: none; }
.bhi-chart svg { display: block; }

.row-bhi-sm { width: 46px; height: 46px; font-size: 16px; }
.audit-row { padding: 14px 20px 14px 16px; grid-template-columns: 46px 1fr auto; }
.audit-row .row-name { font-size: 14.5px; }
.row-chevron {
  font-size: 15px;
  color: var(--text-dim);
  transition: transform 0.15s ease, color 0.15s ease;
}
.project-row:hover .row-chevron { transform: translateX(3px); color: var(--text); }
.status-failed-label { color: #b91c1c; font-weight: 500; }
