/* RSA Consent - mobile first, no external fonts, no inline styles (the CSP
   forbids both). Colour is never the only signal: every state also carries a
   word or an icon character. Focus is always visible. */

:root {
  --ink: #16202c;
  --muted: #5a6672;
  --line: #d7dde4;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --brand: #0f3057;
  --brand-ink: #ffffff;
  --ok-bg: #e6f4ea;
  --ok-ink: #14532d;
  --ok-line: #86c79b;
  --err-bg: #fdeaea;
  --err-ink: #7f1d1d;
  --err-line: #e59a9a;
  --warn-bg: #fdf6e3;
  --warn-ink: #6b4e07;
  --warn-line: #e3c76a;
  --radius: 10px;
  --focus: #a4560a;
}

* { box-sizing: border-box; }

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

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

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1rem; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brand);
  color: var(--brand-ink); padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

header.site {
  background: var(--brand); color: var(--brand-ink); padding: .75rem 0;
}
header.site .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .6rem; color: inherit;
  text-decoration: none; }
.brand-mark {
  font-weight: 700; letter-spacing: .08em; border: 2px solid currentColor;
  border-radius: 6px; padding: .1rem .4rem; font-size: .95rem;
}
.brand-name { font-size: .95rem; font-weight: 600; }
.staffnav { display: flex; gap: 1rem; align-items: center; font-size: .9rem;
  flex-wrap: wrap; }
.staffnav a { color: var(--brand-ink); }
.inline { display: inline; }
.linkish {
  background: none; border: 0; color: var(--brand-ink); cursor: pointer;
  font: inherit; text-decoration: underline; padding: 0;
}

main { padding: 1.5rem 1rem 3rem; }

h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 .35rem; }
p { margin: 0 0 .9rem; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}

.lede { font-size: 1.05rem; color: var(--muted); }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem; margin: 0 0 1.25rem;
}

.steps { display: flex; gap: .4rem; list-style: none; padding: 0;
  margin: 0 0 1.25rem; font-size: .8rem; flex-wrap: wrap; }
.steps li { border: 1px solid var(--line); border-radius: 999px;
  padding: .15rem .7rem; background: var(--panel); color: var(--muted); }
.steps li[aria-current="step"] { border-color: var(--brand);
  background: var(--brand); color: var(--brand-ink); font-weight: 600; }

.field { margin: 0 0 1rem; }
.field label, .field .label { display: block; font-weight: 600;
  margin-bottom: .25rem; }
.field .hint { display: block; color: var(--muted); font-size: .875rem;
  margin-bottom: .35rem; }
input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=search], input:not([type]), input[type=datetime-local], select, textarea {
  width: 100%; padding: .65rem .7rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #97a2ad; border-radius: 8px;
}
input[aria-invalid="true"] { border-color: var(--err-line);
  background: var(--err-bg); }
.err { color: var(--err-ink); font-size: .875rem; margin: .3rem 0 0;
  font-weight: 600; }
.err::before { content: "! "; }

.honey { position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; }

button, .btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand);
  border-radius: 8px; padding: .7rem 1.1rem; text-decoration: none;
  min-height: 44px;
}
button.secondary, .btn.secondary {
  background: #fff; color: var(--brand);
}
button.danger { background: #8a1c1c; border-color: #8a1c1c; }
button[disabled] { opacity: .55; cursor: not-allowed; }
.btnrow { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

.consentbox {
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: .9rem; margin: 0 0 1rem; background: #fff;
}
.consentbox.invalid { border-color: var(--err-line); background: var(--err-bg); }
.consentbox > label { display: grid; grid-template-columns: 1.6rem 1fr;
  gap: .6rem; align-items: start; font-weight: 400; cursor: pointer; }
.consentbox input[type=checkbox] { width: 1.25rem; height: 1.25rem;
  margin-top: .2rem; }
.consentbox .disclosure { font-size: .95rem; }

.flashes { margin: 0 0 1rem; }
.flash { border-radius: 8px; padding: .7rem .9rem; margin: 0 0 .5rem;
  border: 1px solid; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink);
  border-color: var(--ok-line); }
.flash-ok::before { content: "\2713  "; font-weight: 700; }
.flash-error { background: var(--err-bg); color: var(--err-ink);
  border-color: var(--err-line); }
.flash-error::before { content: "\26A0  "; font-weight: 700; }

.notice { background: var(--warn-bg); border: 1px solid var(--warn-line);
  color: var(--warn-ink); border-radius: 8px; padding: .8rem .9rem;
  font-size: .93rem; }
.draft { font-weight: 700; }

.masked { font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: 1.15rem; }

.codeinput { font-size: 1.6rem; letter-spacing: .5rem; text-align: center;
  font-variant-numeric: tabular-nums; }

dl.kv { display: grid; grid-template-columns: 1fr; gap: .1rem .8rem;
  margin: 0 0 1rem; }
dl.kv dt { font-weight: 600; color: var(--muted); font-size: .85rem; }
dl.kv dd { margin: 0 0 .5rem; overflow-wrap: anywhere; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line);
  vertical-align: top; }
th { background: #eef1f4; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .03em; }
tbody tr:hover { background: #f0f4f8; }

.pill { display: inline-block; border-radius: 999px; padding: .05rem .55rem;
  font-size: .78rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.pill-active { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.pill-pending { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.pill-revoked { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); }
.pill-neutral { background: #eef1f4; color: var(--muted); border-color: var(--line); }

.counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem;
  margin: 0 0 1.25rem; }
.count { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .7rem .8rem; }
.count .n { display: block; font-size: 1.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.count .l { font-size: .8rem; color: var(--muted); }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end;
  margin: 0 0 1rem; }
.filters .field { margin: 0; flex: 1 1 10rem; }

.event { border-left: 3px solid var(--line); padding: .1rem 0 .1rem .7rem;
  margin: 0 0 .55rem; font-size: .9rem; }
.event .when { color: var(--muted); font-size: .8rem; }

pre.wording { white-space: pre-wrap; overflow-wrap: anywhere;
  background: #f2f4f7; border: 1px solid var(--line); border-radius: 8px;
  padding: .8rem; font-size: .85rem; font-family: ui-monospace, SFMono-Regular,
  Menlo, Consolas, monospace; }

footer.site { border-top: 1px solid var(--line); background: var(--panel);
  padding: 1.25rem 0 2rem; font-size: .85rem; color: var(--muted); }
footer.site a { color: var(--brand); }
.footlinks { margin-bottom: .4rem; }

.section-note { color: var(--muted); font-size: .875rem; }

/* Two sign-in doors, presented as two choices rather than one option and a
   fallback. The rule between them is a separator, not a hierarchy: neither
   block is styled to look like the only way in. */
.signin-choice { margin-bottom: .75rem; }
.signin-choice h2 { margin-top: 0; font-size: 1.05rem; }
.signin-or {
  display: flex; align-items: center; gap: .75rem;
  color: var(--muted); font-size: .875rem; text-transform: uppercase;
  letter-spacing: .08em; margin: .25rem 0 1rem;
}
.signin-or::before, .signin-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

@media (min-width: 40rem) {
  .counts { grid-template-columns: repeat(4, 1fr); }
  dl.kv { grid-template-columns: 12rem 1fr; }
  dl.kv dt { text-align: right; }
  h1 { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  header.site, footer.site, .btnrow, .steps { display: none; }
  body { background: #fff; }
  .panel { border: 1px solid #999; }
}

.signup-disabled { border: 0; padding: 0; margin: 0; min-width: 0; }
.public-return { flex-basis: 100%; margin: 0 0 .4rem; font-size: .875rem; color: #fff; }
.public-return a { color: #fff; text-underline-offset: .2em; }

.evidence-example { border: 1px solid var(--line); border-radius: .5rem; padding: 1.25rem; background: #f7f9fb; }
