/* The portal's design system: tokens, shell, components. No inline styles
   anywhere; the Content Security Policy allows only this file. */

@font-face {
  font-family: "Inter";
  src: url("inter-latin-var.260c81a4759b.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --brand: #0b7a7a;            /* the logo's teal, dark enough for white text */
  --brand-strong: #075e5e;
  --brand-soft: #e3f3f2;
  --side: #062c2c;             /* sidebar */
  --side-text: #cfe6e4;
  --side-muted: #7fa7a4;
  --side-active: #0f4a4a;

  --bg: #f4f6f7; --surface: #ffffff; --surface-2: #f8fafb;
  --text: #17222b; --muted: #5b6b78; --line: #dde3e8; --line-strong: #c5ced6;

  --ok: #1b7a43; --ok-bg: #e4f4ea;
  --warn: #8a5a00; --warn-bg: #fff3d1; --warn-line: #e3b83a;
  --bad: #b3261e; --bad-bg: #fde9e7;
  --info-bg: #e8f1fb;

  --radius: 8px;
  --shadow: 0 1px 2px rgb(16 24 32 / 6%), 0 1px 6px rgb(16 24 32 / 5%);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-width: 15rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #4fc3bf; --brand-strong: #7ad8d4; --brand-soft: #12383a;
  --side: #071d1e; --side-text: #cfe6e4; --side-muted: #7fa7a4; --side-active: #11393a;
  --bg: #0f1418; --surface: #171e24; --surface-2: #1c242b;
  --text: #e6ebef; --muted: #98a6b2; --line: #2a343d; --line-strong: #3a4651;
  --ok: #6fd39a; --ok-bg: #153325; --warn: #f0c35a; --warn-bg: #3a3013; --warn-line: #8a6d1a;
  --bad: #ff8f86; --bad-bg: #3d1d1b; --info-bg: #172a3d;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4fc3bf; --brand-strong: #7ad8d4; --brand-soft: #12383a;
    --side: #071d1e; --side-text: #cfe6e4; --side-muted: #7fa7a4; --side-active: #11393a;
    --bg: #0f1418; --surface: #171e24; --surface-2: #1c242b;
    --text: #e6ebef; --muted: #98a6b2; --line: #2a343d; --line-strong: #3a4651;
    --ok: #6fd39a; --ok-bg: #153325; --warn: #f0c35a; --warn-bg: #3a3013; --warn-line: #8a6d1a;
    --bad: #ff8f86; --bad-bg: #3d1d1b; --info-bg: #172a3d;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1rem/1.5 var(--font); font-feature-settings: "tnum", "cv11";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
h1 { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; font-weight: 650; margin: 1.75rem 0 .6rem; }
code, .mono { font-family: var(--mono); font-size: .86em; }
.mono { word-break: break-all; }
.muted { color: var(--muted); }
.bad { color: var(--bad); font-weight: 600; }
.nowrap { white-space: nowrap; }
time { white-space: nowrap; }
.icon { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.15em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: .5rem; top: .5rem; }

/* A thin bar across the top while results are being fetched. */
.loadbar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 30; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 40% 100%; background-repeat: no-repeat; }
body:has(.htmx-request) .loadbar { opacity: 1; animation: loadbar 1s linear infinite; }
@keyframes loadbar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
#results { transition: opacity .12s; }
body:has(form.htmx-request) #results { opacity: .5; }

/* ── Shell ──────────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--side); color: var(--side-text);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: .9rem .7rem 1.5rem;
}
.sidebar .brand {
  display: flex; align-items: center; gap: .65rem; padding: .2rem .4rem 1rem;
  color: #fff; text-decoration: none; font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em;
}
.sidebar .brand img { border-radius: 7px; background: #f0f0f0; display: block; }
.nav-group {
  margin: 1.1rem .55rem .3rem; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; color: var(--side-muted);
}
.nav-link {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 6px;
  color: var(--side-text); text-decoration: none; font-size: .95rem;
}
.nav-link:hover { background: var(--side-active); color: #fff; }
.nav-link[aria-current="page"] { background: var(--side-active); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #4fc3bf; }
.sidebar .nav-toggle, .sidebar .nav-button { display: none; }

.page { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding: .55rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; font-size: .88rem;
}
.topbar .spacer { flex: 1; }
.topbar form { margin: 0; }
.topbar .as-of, .topbar .who { color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.env-badge {
  display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-weight: 650; font-size: .78rem;
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line);
}
/* Anything but prod wears a stripe, so it is never mistaken for it. */
body:not(.env-prod) .topbar { box-shadow: inset 0 3px 0 var(--warn-line); }
body:not(.env-prod) .entrance-card { border-top: 4px solid var(--warn-line); }

main { padding: 1.5rem; width: 100%; max-width: 100rem; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; display: flex; flex-wrap: wrap; align-items: center; padding: .5rem .7rem; }
  .sidebar .brand { padding: .2rem .4rem; flex: 1; }
  .sidebar .nav-button { display: inline-flex; margin: 0; font-weight: 500; align-items: center; gap: .4rem; padding: .4rem .6rem; border-radius: 6px; cursor: pointer; color: var(--side-text); }
  .sidebar .nav-toggle { display: block; position: absolute; opacity: 0; }
  .nav-toggle:focus-visible + .nav-button { outline: 2px solid #4fc3bf; }
  .sidebar nav { display: none; width: 100%; padding-bottom: .5rem; }
  .nav-toggle:checked ~ nav { display: block; }
  .topbar { padding: .5rem .9rem; position: static; }
  main { padding: 1rem .9rem 2rem; }
}

/* ── Entrance (signed out) ──────────────────────────────────────────────── */
body.signed-out { background: linear-gradient(160deg, var(--side) 0%, #0b4a4a 100%); min-height: 100vh; }
main.entrance { display: flex; justify-content: center; align-items: flex-start; padding: 8vh 1rem 3rem; max-width: none; }
.entrance-card {
  width: 100%; max-width: 26rem; background: var(--surface); border-radius: 12px;
  padding: 1.75rem 1.75rem 1.5rem; box-shadow: 0 10px 40px rgb(0 0 0 / 30%);
}
.entrance-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.25rem; }
.entrance-brand img { border-radius: 10px; background: #f0f0f0; }
.entrance-brand strong { font-size: 1.3rem; letter-spacing: -.01em; display: block; }
.entrance-card h1 { font-size: 1.15rem; }
.entrance-card input:not([type=checkbox]):not([type=radio]) { max-width: none; }
.entrance-card button, .entrance-card .button { width: 100%; text-align: center; margin-top: .35rem; }
.entrance-card hr { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }

/* ── Notices, cards ─────────────────────────────────────────────────────── */
.notice { padding: .65rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 1rem; }
.notice.warning { background: var(--warn-bg); border-color: var(--warn-line); }
.notice.success { background: var(--ok-bg); border-color: transparent; }
.notice.error { background: var(--bad-bg); border-color: var(--bad); }
.notice.info { background: var(--info-bg); border-color: transparent; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 1rem; box-shadow: var(--shadow);
}
.cards .card { margin: 0; }
a.card { color: inherit; text-decoration: none; transition: border-color .12s, transform .12s; }
a.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.card h2 { margin: 0 0 .3rem; }
.card p { margin: .3rem 0 0; color: var(--muted); }
.actions, .card .actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  background: var(--surface-2); white-space: nowrap;
}
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }
tbody tr:last-child td { border-bottom: 0; }
table.data { font-size: .9rem; }
table.data thead th { position: sticky; top: 2.75rem; z-index: 5; box-shadow: 0 1px 0 var(--line-strong); }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data td.meta { color: var(--muted); font-size: .82rem; word-break: break-word; }
table.data td.meta span { margin-right: .5rem; }
table.data td.meta b { font-weight: 600; color: var(--text); }
table.data tr.seed td { background: var(--brand-soft); }
table.data tr.seed td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
table.data tr:target td { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (max-width: 860px) { table.data { display: block; overflow-x: auto; } table.data thead th { position: static; } }

table.facts { width: auto; max-width: 100%; margin-bottom: 1rem; }
table.facts th { text-transform: none; letter-spacing: 0; font-size: .88rem; font-weight: 600; white-space: nowrap; width: 1%; color: var(--muted); background: var(--surface-2); }
table.facts td { word-break: break-word; }
table.facts tr:last-child th { border-bottom: 0; }

/* ── Status ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .55rem; border-radius: 999px;
  font-size: .78rem; font-weight: 650; white-space: nowrap; background: var(--ok-bg); color: var(--ok);
}
.badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.badge.flagged { background: var(--bad-bg); color: var(--bad); }
.badge.flagged::before { border-radius: 1px; transform: rotate(45deg); }   /* a diamond: not colour alone */
.badge.busy { background: var(--warn-bg); color: var(--warn); }

/* ── Forms ──────────────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date],
input[type=number], input:not([type]), select, textarea {
  width: 100%; max-width: 26rem; padding: .45rem .65rem; font: inherit; line-height: 1.3;
  color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand-soft); outline-offset: 0; }
input[type=checkbox] + label, input[type=radio] + label { display: inline; font-weight: 400; font-size: 1rem; }
ul.errorlist { list-style: none; padding: 0; margin: 0 0 .3rem; color: var(--bad); font-size: .88rem; }
main p > span:only-child { color: var(--muted); font-size: .86rem; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .45rem .95rem; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.3;
  color: #fff; background: var(--brand); border: 1px solid var(--brand); border-radius: 6px; text-decoration: none;
}
:root[data-theme="dark"] button:not(.quiet):not(.segmented button), :root[data-theme="dark"] .button:not(.secondary) { color: #062c2c; }
button:hover, .button:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.button.secondary, button.secondary { color: var(--brand); background: transparent; border-color: var(--line-strong); }
.button.secondary:hover, button.secondary:hover { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand); }
.button.danger, button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.quiet, button.link {
  padding: .3rem .5rem; border: 0; background: none; color: var(--muted); font-weight: 500;
}
button.quiet:hover, button.link:hover { color: var(--text); background: var(--surface-2); }
button:disabled { opacity: .5; cursor: not-allowed; }

.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.segmented button {
  padding: .22rem .6rem; border: 0; border-radius: 0; background: transparent; color: var(--muted);
  font-size: .82rem; font-weight: 600;
}
.segmented button + button { border-left: 1px solid var(--line-strong); }
.segmented button:hover { background: var(--surface-2); color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-strong); }

form.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
form.filters .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .65rem 1rem; }
form.filters .field input, form.filters .field select { max-width: none; }
form.filters .field.check { align-self: end; padding-bottom: .45rem; display: flex; align-items: center; gap: .45rem; grid-column: span 2; }
form.filters .field.check input { margin: 0; width: 1rem; height: 1rem; accent-color: var(--brand); }
form.filters .field.check label { margin: 0; font-size: .95rem; }
form.filters .actions { margin: .85rem 0; }
form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin: 0 0 1rem; }
form.inline label { margin: 0; }
form.inline input { width: 24rem; max-width: 100%; }
.pager { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }

pre.document {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; overflow-x: auto; font: .84rem/1.45 var(--mono); box-shadow: var(--shadow);
}
img { max-width: 100%; }
main img[src^="data:"] { background: #fff; padding: .5rem; border-radius: var(--radius); }

/* ── Home dashboard ─────────────────────────────────────────────────────── */
.board h2 { margin-top: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1rem; }
.stat {
  display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1.1rem; min-height: 6.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit; text-decoration: none; border-left: 4px solid var(--line-strong);
}
a.stat { transition: border-color .12s, transform .12s; }
a.stat:hover { transform: translateY(-1px); border-color: var(--brand); color: inherit; }
.stat .value { font-size: 2rem; font-weight: 650; line-height: 1.1; letter-spacing: -.02em; }
.stat .label { font-weight: 600; }
.stat .hint { color: var(--muted); font-size: .84rem; }
.stat.ok { border-left-color: var(--ok); }
.stat.attention { border-left-color: var(--warn-line); }
.stat.attention .value { color: var(--warn); }
.stat.problem { border-left-color: var(--bad); }
.stat.problem .value { color: var(--bad); }
.stat.trend { grid-column: span 2; border-left-color: var(--brand); }
svg.bars { width: 100%; height: 3rem; display: block; margin-bottom: .3rem; }
svg.bars rect { fill: var(--brand); opacity: .75; }
svg.bars rect:hover { opacity: 1; }
.card h3 { margin: 0 0 .3rem; font-size: 1rem; font-weight: 650; }
table.compact { width: auto; min-width: 28rem; max-width: 100%; }

/* ── Above a list: filters in force and how much is shown ───────────────── */
.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin: 0 0 .6rem; min-height: 1.6rem; }
.results-bar .count { color: var(--muted); font-size: .86rem; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .12rem .3rem .12rem .65rem; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-strong); font-size: .84rem; text-decoration: none;
  border: 1px solid transparent;
}
.chip b { font-weight: 650; }
.chip span[aria-hidden] { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; font-size: 1rem; line-height: 1; }
.chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.chip:hover span[aria-hidden] { background: var(--brand); color: var(--surface); }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; }
.empty p { margin: .2rem 0; }

/* Row spacing, chosen in the top bar. */
:root[data-density="compact"] table.data th, :root[data-density="compact"] table.data td { padding: .22rem .6rem; }
:root[data-density="compact"] table.data { font-size: .84rem; }
table.data td a.open { font-weight: 500; }
table.data tbody tr:has(a.open:focus-visible) td { background: var(--brand-soft); }

/* ── Side panel ─────────────────────────────────────────────────────────── */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(34rem, 100vw); z-index: 40;
  background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -12px 0 32px rgb(0 0 0 / 18%);
  overflow-y: auto; padding: 1.1rem 1.25rem 2rem; transform: translateX(100%); transition: transform .16s ease-out;
  visibility: hidden;
}
.drawer:not(:empty) { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .9rem; }
.drawer-head h2 { margin: 0; flex: 1; font-size: 1.1rem; word-break: break-word; }
.drawer table.facts { width: 100%; box-shadow: none; }
.drawer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.2rem 0 .4rem; }
.drawer ul.plain, ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .25rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .drawer, a.card, a.stat { transition: none; } }

/* ── Lineage as a timeline ──────────────────────────────────────────────── */
ol.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px solid var(--line-strong); max-width: 60rem; }
ol.timeline > li { position: relative; margin: 0 0 .7rem; }
ol.timeline > li::before {
  content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .95rem; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
ol.timeline > li.in::before { border-color: var(--brand); }
ol.timeline > li.out::before { background: var(--brand); border-color: var(--brand); }
ol.timeline > li.problem::before { background: var(--bad); border-color: var(--bad); border-radius: 2px; transform: rotate(45deg); }
ol.timeline > li.seed .step { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand), var(--shadow); background: var(--brand-soft); }
.step {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: .1rem .9rem; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; box-shadow: var(--shadow);
}
.step .stage { font-weight: 650; text-transform: capitalize; }
.step .when { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.step .where { grid-column: 2 / -1; color: var(--muted); font-size: .86rem; }
.step .from { grid-column: 2 / -1; font-size: .84rem; color: var(--muted); }
ol.timeline details > summary {
  cursor: pointer; list-style: none; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: .5rem .8rem; font-weight: 600;
}
ol.timeline details > summary::-webkit-details-marker { display: none; }
ol.timeline details > summary::before { content: "▸ "; color: var(--muted); }
ol.timeline details[open] > summary::before { content: "▾ "; }
ol.timeline details[open] > summary { margin-bottom: .6rem; }
ol.timeline details .step { margin-bottom: .5rem; }
ol.timeline li:target .step { outline: 2px solid var(--brand); }
@media (max-width: 700px) { .step { grid-template-columns: minmax(0, 1fr); } .step .where, .step .from { grid-column: 1; } }
.standalone-panel { max-width: 44rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.standalone-panel [data-drawer-close] { display: none; }
.standalone-panel table.facts { width: 100%; box-shadow: none; }
.standalone-panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.2rem 0 .4rem; }

/* Tables inside the side panel, and any table on a narrow screen, scroll
   sideways rather than squeezing their cells. */
.drawer table.data { display: block; overflow-x: auto; box-shadow: none; }
.drawer table.data thead th { position: static; }
.drawer table.data td, .drawer table.data th { white-space: nowrap; }
@media (max-width: 860px) { table.data td, table.data th { white-space: nowrap; } }

/* ── Administration: forms and panels ───────────────────────────────────── */
.page-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin: 0 0 1rem; }
.panel.narrow { max-width: 34rem; }
.panel h2 { margin: 0 0 .5rem; }
.panel p { margin: .4rem 0 .8rem; }
.panel table.facts { width: 100%; box-shadow: none; margin: 0; }
.columns { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 26rem); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .columns { grid-template-columns: minmax(0, 1fr); } }
form.stack .field { margin-bottom: .9rem; }
form.stack .field input:not([type=checkbox]) { max-width: none; }
form.stack .field.check { display: grid; grid-template-columns: auto 1fr; gap: .1rem .55rem; align-items: center; }
form.stack .field.check input { margin: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }
form.stack .field.check label { margin: 0; font-size: 1rem; font-weight: 600; }
form.stack .field .help { display: block; grid-column: 2; color: var(--muted); font-size: .86rem; }
form.stack .field.check ul.errorlist { grid-column: 2; }
.secret { font-size: 1.25rem; padding: .7rem .9rem; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--radius); user-select: all; word-break: break-all; }
.yes { color: var(--ok); display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
