/* ClaimEvidence app — same system as claimevidence.co.uk:
   sans for our voice, serif only for verbatim source text. Green = verified, amber = gap. */
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-wght-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --paper: #F6F8F7; --surface: #FFFFFF; --ink: #16212B; --ink-2: #3D4A55; --muted: #5F6B74; --rule: #D6DDDA;
  --verified: #1E6B52; --verified-soft: #E3F0EA; --gap: #9A5A0C; --gap-soft: #FBF1E2; --routine: #7A8590;
  --danger: #A3312A; --danger-soft: #F8E7E5; --radius: 6px; --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1rem; line-height: 1.55; }
a { color: var(--verified); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--verified); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--ink); color: #fff; padding: 8px; }

header.top { border-bottom: 1px solid var(--rule); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; }
.brand span { color: var(--verified); } .brand small { font-weight: 400; color: var(--muted); font-size: .78rem; margin-left: 6px; }
nav.main { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: .93rem; }
nav.main a { color: var(--ink-2); text-decoration: none; } nav.main a:hover { text-decoration: underline; }
nav.main form { display: inline; }
.pilot { background: var(--gap-soft); color: var(--gap); border-bottom: 1px solid #EBD9BC; font-size: .85rem; padding: 6px 0; }

main { padding: 28px 0 64px; }
h1 { font-size: 1.7rem; letter-spacing: -0.02em; margin: 0 0 6px; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 32px 0 10px; } h3 { font-size: 1.02rem; margin: 18px 0 6px; }
.lede { color: var(--ink-2); margin: 0 0 22px; max-width: 70ch; }
.muted { color: var(--muted); } .small { font-size: .87rem; }

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; }
.card.narrow { max-width: 460px; margin: 40px auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 4px; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; display: block; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; font: inherit; padding: 9px 10px; border: 1px solid #B9C3BF; border-radius: var(--radius); background: #fff; color: var(--ink); }
textarea { min-height: 80px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; } .check input { margin-top: 4px; }
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: .95rem; padding: 9px 16px; border-radius: var(--radius);
  border: 1px solid var(--verified); background: var(--verified); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); } .btn.secondary { background: #fff; color: var(--verified); }
.btn.quiet { background: none; border-color: var(--rule); color: var(--ink-2); font-weight: 500; }
.btn.danger { background: var(--danger); border-color: var(--danger); } .btn.small { padding: 5px 10px; font-size: .85rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--verified); text-decoration: underline; cursor: pointer; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

.flash { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 16px; border: 1px solid; }
.flash.error { background: var(--danger-soft); border-color: #E7C2BE; color: var(--danger); }
.flash.ok { background: var(--verified-soft); border-color: #BFDCCF; color: var(--verified); }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #EEF1F0; color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--verified-soft); color: var(--verified); } .pill.gap { background: var(--gap-soft); color: var(--gap); }
.pill.routine { background: #EEF0F2; color: var(--routine); } .pill.bad { background: var(--danger-soft); color: var(--danger); }

ol.steps { list-style: none; padding: 0; margin: 0 0 22px; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: s; }
ol.steps li { counter-increment: s; font-size: .85rem; padding: 6px 12px 6px 8px; border-radius: 99px; border: 1px solid var(--rule); background: #fff; color: var(--muted); }
ol.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #EEF1F0; margin-right: 6px; font-size: .75rem; font-weight: 700; }
ol.steps li.done { color: var(--verified); } ol.steps li.done::before { content: "✓"; background: var(--verified-soft); }
ol.steps li.now { color: var(--ink); border-color: var(--verified); font-weight: 600; } ol.steps li.now::before { background: var(--verified); color: #fff; }

.cluster { border-left: 4px solid var(--verified); } .cluster.routine { border-left-color: var(--routine); }
.cluster header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.cluster h3 { margin: 0; }

.stmt { margin: 10px 0 14px; }
.cite { margin: 4px 0 0 18px; font-size: .9rem; }
.cite .id { color: var(--verified); font-weight: 700; font-size: .82rem; }
.cite .id.out { color: var(--gap); }
.quote { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 1.02rem; }
.gapbox { background: var(--gap-soft); border: 1px solid #EBD9BC; border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
.gapbox strong { color: var(--gap); }
.removed { background: #F4F5F5; border-radius: var(--radius); padding: 10px 14px; font-size: .88rem; }
details summary { cursor: pointer; font-weight: 600; }
.qr { width: 200px; height: 200px; background: #fff; padding: 8px; border: 1px solid var(--rule); border-radius: var(--radius); }
code.secret { font-size: .9rem; word-break: break-all; background: #EEF1F0; padding: 3px 6px; border-radius: 4px; }
footer.foot { border-top: 1px solid var(--rule); padding: 18px 0; font-size: .82rem; color: var(--muted); }
.actions select { width: auto; max-width: 280px; padding: 6px 8px; }
td .actions { flex-wrap: nowrap; gap: 6px; } td .actions select { max-width: 190px; }
td.key, th.key { white-space: nowrap; }
.cluster .actions form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.btn[disabled] { background: #C9D2CE; border-color: #C9D2CE; color: #fff; cursor: not-allowed; filter: none; }
.card > header h2, .card > header { margin-top: 0; }
.u-between { justify-content: space-between; } .u-m0 { margin: 0; } .u-mb8 { margin: 0 0 8px; } .u-mb12 { margin-bottom: 12px; }
.u-mt0 { margin-top: 0; } .u-mt16 { margin-top: 16px; } .u-w150 { max-width: 150px; } .u-w160 { max-width: 160px; }
.u-w220 { max-width: 220px; } .u-pre { white-space: pre-wrap; }
