/* Mobile first: one column, large touch targets (min 48 px), high contrast. No external fonts or scripts. */
:root {
  --bg: #f4f5f2; --fg: #1d211c; --muted: #5d6459; --card: #fff; --line: #d5d9d0;
  --accent: #2f5d3a; --accent-fg: #fff; --ok: #1f7a3a; --warn: #9a6a00; --bad: #a3242a; --focus: #1d5fd1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* an element with its own display (e.g. .btn, .card) stays hidden */
html { font-size: 18px; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.45; }
header.top { background: var(--accent); color: var(--accent-fg); padding: .7rem 1rem; display: flex;
  align-items: center; justify-content: space-between; gap: 1rem; }
header.top a { color: inherit; text-decoration: none; font-weight: 600; }
header.top .who { font-size: .8rem; opacity: .9; }
main { max-width: 46rem; margin: 0 auto; padding: 1rem; }
main.wide { max-width: 72rem; }
h1 { font-size: 1.6rem; margin: .4rem 0 .8rem; }
h2 { font-size: 1.2rem; margin: 1.2rem 0 .5rem; }
p.lead { font-size: 1.1rem; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin: 0 0 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem;
  padding: .7rem 1.2rem; border-radius: 10px; border: 2px solid var(--accent); background: var(--accent);
  color: var(--accent-fg); font-size: 1.05rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.big { width: 100%; min-height: 4rem; font-size: 1.3rem; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: default; }
form.stack { display: grid; gap: .8rem; }
label { font-weight: 600; display: grid; gap: .3rem; }
input, select, textarea { font: inherit; padding: .7rem .8rem; border: 2px solid var(--line); border-radius: 8px;
  background: #fff; min-height: 3rem; width: 100%; }
input.code { font-size: 2rem; letter-spacing: .3em; text-align: center; text-transform: uppercase; }
.hint { font-weight: 400; font-size: .85rem; color: var(--muted); }
.qr { display: flex; justify-content: center; }
.qr svg { width: min(80vw, 22rem); height: auto; }
.code-show { font-size: 2.6rem; font-weight: 700; letter-spacing: .25em; text-align: center; font-family: ui-monospace, monospace; }
.steps { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.steps li { display: flex; gap: .7rem; align-items: center; padding: .6rem .8rem; border-radius: 8px; background: var(--card);
  border: 1px solid var(--line); }
.steps li .n { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-weight: 700; }
.steps li.done .n { background: var(--ok); color: #fff; }
.steps li.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--line); white-space: nowrap; }
.badge.ready, .badge.roster { background: #f3e6c4; color: #5a4100; }
.badge.issued { background: #d7e6f7; color: #123e6b; }
.badge.connected { background: #cdebd6; color: #0d4a22; }
.badge.rejected, .badge.expired, .badge.revoked { background: #f1d4d5; color: #6b1216; }
.big-ok { font-size: 4rem; color: var(--ok); text-align: center; line-height: 1; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.flash { padding: .8rem 1rem; border-radius: 8px; margin: 0 0 1rem; background: #cdebd6; }
.flash.error { background: #f1d4d5; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.kiosk { font-size: 1.25rem; }
@media print {
  header.top, .noprint { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; border-color: #999; }
}
.step-title { display: flex; align-items: center; gap: .6rem; margin-top: 0; }
.step-title .n { flex: 0 0 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.step-ok { font-size: 1.3rem; font-weight: 700; color: var(--ok); margin: .3rem 0; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }
.badge.tunnel { background: #d9ecec; color: #0f4646; }
.btn.disabled { opacity: .5; cursor: default; }
