/* IPPC Ledger: restrained Logical Knight styling. Desktop-first, responsive, keyboard-visible focus, AA contrast. */
:root { --ink: #1b1d22; --muted: #5a5f6b; --line: #d9dce3; --bg: #f6f7f9; --panel: #fff; --brand: #12151c; --gold: #7f5e26;
        --ok: #1f6f43; --warn: #a3261b; --attn: #8a5a00; --unk: #4a4f8c; --focus: #1a56db; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: #1d4ed8; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px; z-index: 9; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 10px 24px; background: var(--brand); color: #fff; }
.brand { font-weight: 700; letter-spacing: .02em; } .mark { display: inline-block; background: var(--gold); color: #fff; border-radius: 4px; padding: 0 6px; margin-right: 4px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; } .top nav a { color: #e8e9ed; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.top nav a.on, .top nav a:hover { background: #2a2f3a; color: #fff; }
.top .search { flex: 1 1 220px; } .top .search input { width: 100%; padding: 7px 10px; border-radius: 6px; border: 0; }
.top .logout { display: flex; gap: 8px; align-items: center; } .who { color: #c9ccd4; font-size: 13px; }
main { max-width: 1200px; margin: 0 auto; padding: 24px; }
h1 { font-size: 26px; margin: 0 0 14px; } h2 { font-size: 18px; margin: 26px 0 10px; } h3 { font-size: 16px; margin: 0; }
.head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.muted { color: var(--muted); } .indent { margin-left: 18px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); margin: 6px 0 12px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: #fafbfc; }
tr.superseded td { color: var(--muted); }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; border: 1px solid; }
.badge-complete, .badge-valid { color: var(--ok); border-color: var(--ok); background: #e9f6ef; }
.badge-incomplete, .badge-expired, .badge-missing { color: var(--warn); border-color: var(--warn); background: #fdecea; }
.badge-attention, .badge-expiring { color: var(--attn); border-color: var(--attn); background: #fff6e0; }
.badge-unknown { color: var(--unk); border-color: var(--unk); background: #eef0fb; }
.findings { margin: 8px 0; padding-left: 20px; } .finding .rule { color: var(--muted); font-size: 12px; margin-left: 6px; font-family: ui-monospace, monospace; }
.box, .summary { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 10px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 10px 0; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; text-decoration: none; color: var(--ink); }
.card .num { font-size: 30px; font-weight: 700; } .card.warn .num { color: var(--warn); } .card.attn .num { color: var(--attn); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
form.grid, fieldset.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; align-items: end; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; background: var(--panel); padding: 12px 16px; }
legend { font-weight: 700; padding: 0 6px; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--muted); } label.check { flex-direction: row; align-items: center; gap: 8px; }
.wide { grid-column: 1 / -1; }
input, select, textarea { font: inherit; color: var(--ink); padding: 7px 9px; border: 1px solid #b9bec9; border-radius: 6px; background: #fff; }
.stack { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: end; margin: 4px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 6px 0 12px; }
button, .button { font: inherit; font-weight: 600; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 6px; padding: 7px 14px;
  cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .button.secondary { background: #fff; color: var(--ink); border-color: #b9bec9; }
button.small { padding: 4px 10px; font-size: 13px; }
.error { color: var(--warn); font-weight: 600; } .ok { color: var(--ok); font-weight: 600; } .warn { color: var(--attn); font-weight: 600; }
.narrow { max-width: 520px; margin: 40px auto; }
.secret code { font-size: 20px; background: #fff; border: 1px dashed var(--gold); padding: 6px 12px; border-radius: 6px; }
.pager { display: flex; gap: 16px; align-items: center; }
.row-error td { background: #fff6f5; } .row-possible_duplicate td { background: #fffbea; }
table.lines input { width: 100%; }
.foot { max-width: 1200px; margin: 30px auto; padding: 0 24px 30px; color: var(--muted); font-size: 12.5px; }
@media (max-width: 720px) { main { padding: 14px; } .facts { grid-template-columns: 1fr; } table { display: block; overflow-x: auto; } }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-left: 4px solid #2e7d32; padding: .5rem .75rem; background: #eef7ee; }
button.danger { background: #b3261e; }
.mail { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }

.demo-banner { background: #fff3cd; color: #5c4400; border-bottom: 2px solid #c99a00; padding: .45rem 1rem; text-align: center; font-size: .92rem; }
.onboarding { margin-bottom: 1.5rem; }
.steps-list { list-style: none; padding: 0; margin: .5rem 0; }
.steps-list li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.steps-list li.done { color: var(--muted); }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 1rem 1.25rem; background: var(--panel); }
.help h2 { margin-top: 1.75rem; }

/* language switch: readable on the dark header and on the plain logged-out pages (WCAG AA contrast) */
.top .lang-switch { color: #fff; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; }
.lang-top { max-width: 1200px; margin: 10px auto 0; padding: 0 24px; text-align: right; }
.lang-top .lang-switch { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* phone widths: long identifiers (rule codes, file names, references) wrap; form controls never exceed the screen */
main { overflow-wrap: anywhere; }
input, select, textarea { max-width: 100%; }
