/* Consent Warehouse - plain, serious, readable.  No build step. */
:root {
  --ink: #16191d;
  --ink-soft: #4a5159;
  --ink-faint: #767d85;
  --line: #dfe3e8;
  --line-soft: #eef1f4;
  --paper: #ffffff;
  --canvas: #f5f7f9;
  --accent: #1c4f8b;
  --accent-soft: #e8f0fa;
  --good: #16724a;
  --good-soft: #e4f3ec;
  --warn: #8a5300;
  --warn-soft: #fdf1dc;
  --bad: #a32020;
  --bad-soft: #fbe9e9;
  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* --- top bar ------------------------------------------------------------ */
.topbar {
  background: #10233b;
  color: #e8eef6;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  min-height: 54px;
}
.topbar a { color: #cddcec; text-decoration: none; padding: 16px 0; display: inline-block; font-size: 14px; }
.topbar a:hover { color: #fff; }
.topbar a.active { color: #fff; box-shadow: inset 0 -3px 0 #6ea8e8; }
.brand { font-weight: 700; color: #fff !important; letter-spacing: .2px; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: #8fa8c4; letter-spacing: .06em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.whoami { font-size: 13px; color: #9fb4cc; }
.whoami strong { color: #fff; font-weight: 600; }

.envbar { background: var(--warn-soft); color: var(--warn); font-size: 12px; padding: 5px 24px; border-bottom: 1px solid #f0dcb4; }

/* --- layout ------------------------------------------------------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 24px 80px; }
.wrap.narrow { max-width: 720px; }
.wrap.wide { max-width: 1440px; }

h1 { font-size: 25px; margin: 0 0 6px; letter-spacing: -.2px; }
h2 { font-size: 18px; margin: 30px 0 12px; }
h3 { font-size: 15px; margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.lede { color: var(--ink-soft); margin: 0 0 22px; max-width: 70ch; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card.tight { padding: 14px 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }

/* --- forms -------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
label .hint { display: block; font-weight: 400; color: var(--ink-faint); font-size: 12px; margin-top: 2px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local],
input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c8cfd6; border-radius: 5px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea { min-height: 90px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1 1 200px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-weight: 700; font-size: 13px; padding: 0 6px; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  padding: 9px 16px; border-radius: 5px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #17406f; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* --- tables ------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:hover { background: #fafbfc; }
.table-scroll { overflow-x: auto; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- badges ------------------------------------------------------------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.a, .badge.ok, .badge.contemporaneous, .badge.approved { background: var(--good-soft); color: var(--good); }
.badge.b, .badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.c, .badge.late, .badge.late_received, .badge.bad, .badge.revoked { background: var(--bad-soft); color: var(--bad); }
.badge.neutral { background: var(--line-soft); color: var(--ink-soft); }

.mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.hash { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); word-break: break-all; }
.muted { color: var(--ink-faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* --- notices ------------------------------------------------------------ */
.notice { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 16px; }
.notice.ok { border-color: var(--good); background: var(--good-soft); }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.error { border-color: var(--bad); background: var(--bad-soft); }
.notice p:last-child { margin-bottom: 0; }
.notice p:first-child { margin-top: 0; }

/* --- verdict panel ------------------------------------------------------ */
.verdict { border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; border: 1px solid; }
.verdict h2 { margin: 0 0 6px; font-size: 21px; }
.verdict p { margin: 0; font-size: 15px; }
.verdict.timely { background: var(--good-soft); border-color: #a9d6bf; color: #10402b; }
.verdict.found_no_dates { background: var(--accent-soft); border-color: #b6cde8; color: #16375c; }
.verdict.late, .verdict.after_calls { background: var(--warn-soft); border-color: #e8cf9f; color: #6d4200; }
.verdict.after_suit, .verdict.revoked, .verdict.not_found { background: var(--bad-soft); border-color: #e7b6b6; color: #7d1a1a; }

/* --- timeline ----------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 18px; }
.timeline li::before {
  content: ""; position: absolute; left: -33px; top: 5px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; border: 3px solid var(--ink-faint);
}
.timeline li.consent_received::before, .timeline li.revocation_received::before { border-color: var(--accent); }
.timeline li.consent_claimed::before { border-color: var(--ink-faint); background: var(--line-soft); }
.timeline li.calls::before { border-color: var(--warn); }
.timeline li.suit::before { border-color: var(--bad); }
.timeline li.revocation::before { border-color: var(--bad); background: var(--bad-soft); }
.timeline .when { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.timeline .what { font-weight: 600; }
.timeline .detail { font-size: 13px; color: var(--ink-soft); }
.stamped { font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 3px; font-weight: 700; }

/* --- stats -------------------------------------------------------------- */
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .value { font-size: 27px; font-weight: 700; line-height: 1.1; }
.stat .label { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }

/* --- definition lists --------------------------------------------------- */
dl.fields { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 0; margin: 0; }
dl.fields dt { font-weight: 600; font-size: 13px; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
dl.fields dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }

pre.raw { background: #12171d; color: #d6e2ee; padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: 12px; line-height: 1.5; }

.dropzone { border: 2px dashed #b9c3cd; border-radius: var(--radius); padding: 32px; text-align: center; background: #fbfcfd; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type=file] { margin-top: 12px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 14px 40px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}

footer.page { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; color: var(--ink-faint); font-size: 12px; }

@media print {
  .topbar, .envbar, .actions, footer.page { display: none; }
  body { background: #fff; }
  .card { border: 1px solid #999; break-inside: avoid; }
}
