:root {
  --bg: #f3f1ec; --surface: #ffffff; --ink: #1d1f22; --muted: #5d636b; --line: #d9d5cc;
  --brand: #1f3a5f; --brand-ink: #ffffff; --accent: #f2b705; --ok: #1e7a3c; --ok-bg: #e3f3e8;
  --bad: #b3261e; --bad-bg: #fbe7e5; --warn-bg: #fff4cc; --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15171a; --surface: #1f2226; --ink: #eceae6; --muted: #a2a7ad; --line: #33373d;
    --brand: #8fb3e0; --brand-ink: #0f1a28; --ok: #6fd18f; --ok-bg: #173323; --bad: #ff8a80; --bad-bg: #3a1a18; --warn-bg: #3a3218;
    color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.demo { background: var(--accent); color: #1d1f22; text-align: center; font-size: 13px; font-weight: 700; padding: 4px 12px; letter-spacing: .02em; }
header.top { background: var(--brand); color: var(--brand-ink); padding: 12px 16px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; }
header.top .logo { font-weight: 800; font-size: 19px; flex: 1; cursor: pointer; line-height: 1.15; }
header.top .logo small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }
header.top button { background: transparent; color: inherit; border: 1.5px solid currentColor; border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
main { max-width: 760px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 14px; }
h2 { font-size: 21px; margin: 26px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.muted { color: var(--muted); }
label.field { display: block; margin-bottom: 14px; font-weight: 600; }
label.field input, select, textarea, input[type=text], input[type=number], input[type=password], input[type=url] {
  display: block; width: 100%; margin-top: 6px; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 22px; border-radius: 12px; border: 0;
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.block { width: 100%; }
.btn.secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 15px; border-radius: 9px; }
.btn.danger { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 10px 0; font-weight: 600; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); }
.tlist { list-style: none; padding: 0; margin: 0; }
.tlist li a { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; color: var(--ink); text-decoration: none; min-height: 64px; }
.tlist .t { flex: 1; font-weight: 650; }
.badge { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.no { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.warn { background: var(--warn-bg); color: var(--ink); }
.material h2 { font-size: 20px; margin-top: 20px; }
.material ul { padding-left: 22px; } .material li { margin: 4px 0; }
.links a { display: block; padding: 12px 0; font-weight: 600; border-bottom: 1px solid var(--line); }
.q { margin-bottom: 18px; }
.q .qn { font-size: 14px; color: var(--muted); font-weight: 700; }
.q .qt { font-weight: 700; font-size: 19px; margin: 4px 0 10px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: var(--surface); }
.opt input { width: 24px; height: 24px; accent-color: var(--brand); flex: none; margin: 0; }
.opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.q.wrong .qt { color: var(--bad); }
.result { text-align: center; padding: 28px 18px; }
.result .icon { font-size: 64px; line-height: 1; }
.cert { border: 3px double var(--brand); padding: 28px 22px; text-align: center; background: var(--surface); border-radius: 6px; }
.cert .name { font-size: 28px; font-weight: 800; margin: 10px 0; }
.cert .title { font-size: 22px; font-weight: 700; color: var(--brand); margin: 10px 0 18px; }
.cert dl { display: grid; grid-template-columns: auto auto; gap: 4px 14px; justify-content: center; text-align: left; margin: 0; }
.cert dt { color: var(--muted); } .cert dd { margin: 0; font-weight: 650; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.lang { display: flex; gap: 6px; }
.lang button[aria-pressed=true] { background: var(--brand-ink); color: var(--brand); }
footer { text-align: center; font-size: 13px; color: var(--muted); padding: 20px; }
@media print {
  header.top, .demo, .noprint, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .cert { border-color: #000; }
}
/* v0.3 status colours + confirmation form */
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.tlist a.st-expired, .tlist a.st-failed { border-left: 6px solid var(--bad); }
.tlist a.st-soon, .tlist a.st-updated { border-left: 6px solid var(--accent); }
.tlist a.st-ok { border-left: 6px solid var(--ok); }
.kind { text-transform: uppercase; font-size: 13px; font-weight: 700; letter-spacing: .05em; margin: 0; }
.confirm .agree { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; margin: 4px 0 14px; cursor: pointer; }
.confirm .agree input { width: 28px; height: 28px; flex: none; margin-top: 2px; accent-color: var(--brand); }
.hist { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }
details.card summary { cursor: pointer; }
.tlist .badge { white-space: normal; text-align: center; max-width: 48%; }
@media (max-width: 440px) {
  header.top { gap: 6px; padding: 10px 12px; }
  header.top .logo { font-size: 16px; }
  header.top .logo small { display: none; }
  header.top button { padding: 6px 8px; font-size: 14px; }
}
