:root {
  --ink: #1B365D; --accent: #487A7B; --accent-light: rgba(72,122,123,0.09);
  --muted: #707372; --line: #D9DEE3; --bg: #F6F7F8; --card: #fff;
  --red: #B83A4B; --teal: #009681; --orange: #E87722; --yellow: #F3D54E;
  --head: 'Nunito Sans', system-ui, sans-serif; --body: 'Source Sans 3', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: #222; font: 17px/1.55 var(--body); }
h1, h2 { font-family: var(--head); color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 0 0 14px; }
a { color: var(--accent); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 18px var(--head); }
.bar nav { font-size: 15px; display: flex; gap: 14px; align-items: center; }
.bar nav a, .bar .link { color: #fff; }

main { max-width: 860px; margin: 0 auto; padding: 28px 16px 40px; }
.hero p { margin: 0 0 10px; }
.note { color: var(--ink); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin: 22px 0; }

label { display: block; font: 600 15px var(--head); color: var(--ink); margin-bottom: 14px; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: 16px var(--body);
  border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 11px 20px;
  font: 700 16px var(--head); text-decoration: none; cursor: pointer; }
.btn:hover { background: #3c6869; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: var(--accent); }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
progress { width: 180px; }
.muted { color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.error { color: var(--red); font-weight: 600; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks .title { font: 700 16px var(--head); color: var(--ink); }
.checks .meta { font-size: 14px; color: var(--muted); }
.status { font: 700 13px var(--head); text-transform: uppercase; letter-spacing: .04em; }
.status.ready { color: var(--teal); } .status.failed { color: var(--red); } .status.working { color: var(--orange); }
.checks .err { color: var(--red); font-size: 14px; flex-basis: 100%; }
.row-actions { display: flex; gap: 12px; align-items: center; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); color: var(--ink); }
.scroll { overflow-x: auto; }

.foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 24px 16px 36px; color: var(--muted); font-size: 14px; }

.eyebrow { font: 700 13px var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.lead { font-size: 18px; margin: 0 0 14px; max-width: 68ch; }
.btn.big { padding: 13px 24px; font-size: 17px; margin: 8px 0 4px; }
.steps, .gets { margin: 0; padding-inline-start: 22px; }
.steps li, .gets li { margin-bottom: 10px; }
.principle { border-inline-start: 4px solid var(--accent); background: var(--accent-light); }
.principle p { margin: 0; }
.center { text-align: center; }

[hidden] { display: none !important; }

/* Admin: wider, for the people and checks tables and the check detail. */
.admin main { max-width: 1200px; }
h3 { font: 700 16px var(--head); color: var(--ink); margin: 22px 0 8px; }

/* The walkthrough (tour.js). The highlight's shadow dims the page around it; the layer
   underneath blocks clicks on the page while the walkthrough is open. */
.tour { position: fixed; inset: 0; z-index: 50; }
.tour::before { content: ''; position: absolute; inset: 0; }
.tour:has(.tour-spot[hidden])::before { background: rgba(15, 30, 50, .55); }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 30, 50, .55); outline: 3px solid var(--yellow); pointer-events: none; transition: all .2s ease; }
.tour-card { position: fixed; width: min(420px, calc(100vw - 32px)); background: var(--card); border-radius: 12px; padding: 20px 22px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.tour-card.centered { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.tour-card.docked { left: 16px; right: 16px; bottom: 16px; width: auto; max-height: 55vh; overflow-y: auto; }
.tour-card h2 { margin: 0 0 8px; }
.tour-body { font-size: 16px; }
.tour-body p { margin: 0 0 10px; }
.tour-body ul { margin: 0 0 10px; padding-inline-start: 20px; }
.tour-body li { margin-bottom: 6px; }
.tour-count { margin: 0 0 6px; font: 700 13px var(--head); color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.tour-skip { font-size: 15px; }
.tour-nav { display: flex; gap: 8px; margin-inline-start: auto; }
.tour-back { background: var(--muted); }
/* Room to scroll the last section on the page clear of the card. */
body.touring { overflow-anchor: none; padding-bottom: 60vh; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

/* The language menu a signed-out visitor sees in the header. */
#siteLang { width: auto; padding: 4px 8px; font-size: 14px; }
