@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-sans-3-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/source-sans-3-700.woff2") format("woff2");
}
@font-face {
  font-family: Lexend;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/lexend-600.woff2") format("woff2");
}
@font-face {
  font-family: Lexend;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/lexend-700.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #fff;
  --text: #020617;
  --muted: #334155;
  --line: #e2e8f0;
  --primary: #1e3a8a;
  --primary-soft: #e8eefc;
  --ok: #166534;
  --warn: #92400e;
  --danger: #9f1239;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Source Sans 3", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); cursor: pointer; }
h1, h2, .brand, .public-brand, .metrics strong {
  font-family: Lexend, "Source Sans 3", sans-serif;
}
h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.05rem; font-weight: 600; line-height: 1.35; margin: 1.5rem 0 0.75rem; }
.lede, .hint, .meta { color: var(--muted); }
.skip {
  position: absolute; left: 0.5rem; top: -3rem;
  background: var(--primary); color: #fff; padding: 0.4rem 0.7rem; z-index: 30;
}
.skip:focus { top: 0.5rem; }
.solo {
  max-width: 26rem; margin: 8vh auto; padding: 1.5rem 1.5rem 1.35rem;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--primary);
}
.public-brand {
  display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1.1rem;
  color: var(--primary); font-weight: 700; letter-spacing: 0.08em;
}
.public-brand .mark { background: var(--primary); color: #fff; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 1rem; align-items: center;
  min-height: 3.6rem; padding: 0.55rem 1.25rem;
  background: var(--primary); color: #fff; border-bottom: 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; letter-spacing: 0.08em; text-decoration: none; color: #fff;
}
.mark {
  display: inline-grid; place-items: center;
  width: 1.75rem; height: 1.75rem; background: #fff; color: var(--primary);
  font-size: 0.95rem; letter-spacing: 0;
}
.who { margin: 0 0 0 auto; color: #d6e0f5; }
.top form { margin: 0; }
.top a:focus, .top button:focus { outline-color: #fff; }
.frame { display: flex; align-items: stretch; min-height: calc(100vh - 3.6rem); }
.side {
  display: flex; flex-direction: column; flex: none; width: 14rem;
  padding: 0.85rem 0.7rem; gap: 0.2rem;
  background: #f7f9fc; border-right: 1px solid var(--line);
}
.side a {
  display: flex; align-items: center; gap: 0.65rem;
  min-height: 2.75rem; padding: 0.45rem 0.7rem;
  text-decoration: none; color: var(--text); border-radius: 6px; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.side a svg {
  width: 1.15rem; height: 1.15rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.side a:hover { background: #f4f7fb; }
.side a[aria-current="page"] {
  background: #fff; color: var(--primary); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}
main { flex: 1; min-width: 0; max-width: 72rem; padding: 1.6rem 1.75rem 3rem; }
main > h1 { font-size: 1.85rem; }
main section, main > form:not(.filters) {
  background: var(--surface); border: 1px solid var(--line);
  padding: 0.15rem 1.1rem 1.1rem; margin: 1rem 0;
}
main section.panel { background: #fff8e8; border-color: #e6d3a1; }
main section.danger-zone { border-color: #efc3ce; border-top: 3px solid var(--danger); }
main section > h2, main > form:not(.filters) > h2 {
  margin: 0.9rem 0 0.75rem; padding-bottom: 0.45rem; border-bottom: 1px solid var(--line);
}
label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }
input, textarea, select {
  width: 100%; max-width: 32rem; min-height: 2.75rem; padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font: inherit; color: inherit;
  transition: border-color 200ms ease;
}
textarea { min-height: 6rem; height: auto; }
input:hover, textarea:hover, select:hover { border-color: #94a3b8; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1rem; min-height: 2.75rem; min-width: 2.75rem;
  background: var(--primary); color: #fff; border: 0; border-radius: 6px;
  padding: 0.5rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
button:hover, .button:hover { background: #1e40af; }
button.link {
  margin: 0; min-height: 2.25rem; background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55); font-weight: 600;
}
button.link:hover { background: #fff; color: var(--primary); border-color: #fff; }
button.danger { background: var(--danger); }
button.danger:hover { background: #881337; }
.actions { margin: 0 0 1rem; }
.actions .button { margin-top: 0; }
button:focus, a:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--primary); outline-offset: 2px;
}
.banner { padding: 0.7rem 0.85rem; border: 1px solid var(--line); background: var(--surface); }
.banner.error { border-color: var(--danger); color: var(--danger); background: #fff5f7; }
.banner.ok { border-color: var(--ok); color: var(--ok); background: #f3faf6; }
.status-line {
  margin: 0 0 1.15rem; padding: 0.65rem 0.85rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary);
  color: var(--text);
}
.status {
  display: inline-block; border-radius: 999px; padding: 0.1rem 0.55rem;
  background: #e2e8f0; font-size: 0.8rem; font-weight: 600;
}
.status-active { color: var(--ok); background: #e7f5ee; }
.status-pending, .status-pending_reenrollment { color: var(--warn); background: #fbf3e0; }
.status-disabled, .status-locked { color: var(--danger); background: #fde8ee; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
th {
  background: #f6f8fb; color: var(--muted); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 200ms ease; }
tbody tr:hover { background: #f1f5f9; }
.metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem; margin: 0 0 0.4rem; padding: 0; list-style: none;
}
.metrics li {
  min-height: 6rem; padding: 1rem 1rem 0.9rem; background: var(--surface);
  border: 1px solid var(--line); border-top: 3px solid var(--primary); color: var(--muted);
  transition: background-color 200ms ease, border-color 200ms ease;
}
.metrics a { display: block; height: 100%; text-decoration: none; color: inherit; cursor: pointer; }
.metrics li:has(a) { cursor: pointer; }
.metrics li:has(a):hover { border-color: #bfdbfe; background: #f8fafc; }
.metrics strong {
  display: block; margin-bottom: 0.25rem;
  font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; color: var(--text);
}
dl { margin: 0; background: var(--surface); border: 1px solid var(--line); }
dl div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.75rem; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); }
dl div:last-child { border-bottom: 0; }
dt { color: var(--muted); }
fieldset { border: 1px solid var(--line); margin: 1rem 0; padding: 0.4rem 0.9rem 0.9rem; background: var(--surface); }
.check { font-weight: 500; }
.optional { font-weight: 400; color: var(--muted); }
.panel { background: #fff8e8; border: 1px solid #e6d3a1; padding: 0.8rem 1rem; margin: 1rem 0; }
.danger-zone { margin-top: 1.25rem; }
.qr { width: 220px; height: 220px; background: #fff; }
.empty { background: var(--surface); padding: 1.1rem 1rem; border: 1px solid var(--line); }
.filters {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end;
  margin-bottom: 1rem; padding: 0.75rem 0.85rem; background: var(--surface); border: 1px solid var(--line);
}
.filters label { margin: 0; font-size: 0.8rem; }
.filters input, .filters select, .filters button { width: auto; margin: 0; }
code { font-size: 0.9rem; }
.step {
  margin: 0 0 0.35rem; color: var(--muted); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.check input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-right: 0.4rem; vertical-align: -0.15rem; }
.guide > h1 { font-size: 1.85rem; }
.guide .toc {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin: 0 0 0.25rem; padding: 0.65rem;
  background: var(--surface); border: 1px solid var(--line);
}
.guide .toc a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  padding: 0.35rem 0.7rem; text-decoration: none; border-radius: 6px;
  transition: background-color 200ms ease;
}
.guide .toc a:hover { background: var(--primary-soft); }
.guide section { scroll-margin-top: 4.5rem; }
.guide h3 { font-size: 1rem; font-weight: 600; margin: 1.15rem 0 0.35rem; scroll-margin-top: 4.5rem; }
.guide pre {
  overflow-x: auto; margin: 0.55rem 0 0.85rem; padding: 0.7rem 0.85rem;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 0.88rem; line-height: 1.45;
}
.guide p, .guide li { max-width: 44rem; }
@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .who { flex: 1 1 12rem; margin-left: 0; }
  .frame { display: block; }
  .side { flex-direction: row; flex-wrap: wrap; width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .side a { flex: 1 1 8rem; }
  .solo { margin: 0; border-left: 0; border-right: 0; }
  main { padding: 1.1rem 1rem 2.5rem; }
  dl div { grid-template-columns: 1fr; gap: 0.15rem; }
  table { display: block; overflow-x: auto; }
}
@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
