/* WideOpen Control — admin console design system (ported from the Industry DS +
   the WideOpen Control prototype). Dark-first; [data-theme="light"] toggles. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600&family=Barlow+Condensed:wght@500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-body: "Barlow", system-ui, sans-serif;
  --font-head: "Barlow Condensed", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --radius: 4px;
}

/* Dark is the default. */
:root, :root[data-theme="dark"] {
  --bg: #0b0e11; --surface: #141a1f; --text: #e6eaee; --muted: #8a949e;
  --accent: #6f9bc9; --accent-600: #5c88b8; --accent-700: #4b7099;
  --divider: color-mix(in srgb, #e6eaee 12%, transparent);
  --panel: #0f1418; --panel-2: #151c22; --panel-3: #1b242b;
  --st-ok: #57bd8b; --st-warn: #d69b3f; --st-down: #e26a63; --st-idle: #7e8790;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f2f2f3; --surface: #e9e9ea; --text: #1d1f20; --muted: #5d5d60;
  --accent: #5980a6; --accent-600: #4b6d90; --accent-700: #3d5a78;
  --divider: color-mix(in srgb, #1d1f20 15%, transparent);
  --panel: #ffffff; --panel-2: #ececed; --panel-3: #e2e2e3;
  --st-ok: #2f9d67; --st-warn: #b9822a; --st-down: #cf5147; --st-idle: #8a9198;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
h2 { font-size: 26px; } h3 { font-size: 19px; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 0.9rem; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }

/* Shell: sidebar (grouped nav) + main column (topbar / content / footer). */
.app { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar { width: 220px; flex: none; display: flex; flex-direction: column;
  background: var(--panel); border-right: 1px solid var(--divider); }
.sidebar-brand { display: flex; align-items: center; gap: 9px; padding: 15px 14px 13px; border-bottom: 1px solid var(--divider); }
.sidebar-brand .brand-mark, .auth-brand .brand-mark { width: 27px; height: 27px; border: 1.5px solid var(--accent); flex: none; }
.sidebar-brand .brand-name, .auth-brand .brand-name { font-family: var(--font-head); font-weight: 600; font-size: 15px; line-height: 1.05; letter-spacing: -0.01em; }

/* Bare auth shell (sign-in): branded header + theme toggle, no app chrome —
   unauthenticated visitors must not see the console's nav structure. */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-6); height: 56px; border-bottom: 1px solid var(--divider); background: var(--panel); }
.auth-brand { display: flex; align-items: center; gap: 9px; }

.sidebar-nav { padding: 8px 0; flex: 1; overflow: auto; display: flex; flex-direction: column; }
.sidebar-nav .nav-group { padding: 14px 14px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.sidebar-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 14px; color: var(--muted); font-size: 13.5px; }
.sidebar-nav a:hover, .sidebar-nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); text-decoration: none; }

.sidebar-user { padding: 12px 13px; border-top: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: space-between; gap: 9px; font-size: 12px; color: var(--muted); }
.sidebar-user form { display: inline; }
.sidebar-user-info { min-width: 0; overflow-wrap: anywhere; }
.sidebar-user-link { display: block; font-size: 11px; margin-top: 2px; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: var(--space-4); padding: 0 var(--space-6); height: 56px;
  border-bottom: 1px solid var(--divider); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.topbar .section-title { font-family: var(--font-head); font-weight: 600; font-size: 16px; line-height: 1.1; }
.topbar .section-caption { color: var(--muted); font-size: 11px; }
.topbar-spacer { flex: 1; }
main { padding: var(--space-6); }
footer { padding: var(--space-4) var(--space-6); color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; padding: 4px 8px; }
  .sidebar-nav .nav-group { padding: 6px 6px 2px; width: 100%; }
  main { padding: var(--space-4); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-size: 14px;
  padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--divider); background: var(--panel-2); color: var(--text); }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #06121f; font-weight: 500; }
.btn-primary:hover { background: var(--accent-600); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.danger, button.danger, .btn-danger { background: var(--st-down); border-color: var(--st-down); color: #1a0605; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Tags / status */
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 3px; font-size: 11px; font-weight: 500;
  background: var(--panel-3); color: var(--muted); }
.tag-active, .tag-ok { background: color-mix(in srgb, var(--st-ok) 22%, transparent); color: var(--st-ok); }
.tag-warn, .tag-expired { background: color-mix(in srgb, var(--st-warn) 22%, transparent); color: var(--st-warn); }
.tag-revoked, .tag-down { background: color-mix(in srgb, var(--st-down) 22%, transparent); color: var(--st-down); }
.tag-unactivated, .tag-idle { background: color-mix(in srgb, var(--st-idle) 20%, transparent); color: var(--st-idle); }

/* Release rollout states + attempt outcomes (releases_list / release_detail) */
.tag-pending { background: color-mix(in srgb, var(--st-idle) 20%, transparent); color: var(--st-idle); }
.tag-beta { background: color-mix(in srgb, var(--st-warn) 22%, transparent); color: var(--st-warn); }
.tag-stable_ramp_10, .tag-stable_ramp_30, .tag-stable_ramp_60 { background: color-mix(in srgb, var(--st-idle) 20%, transparent); color: var(--st-idle); }
.tag-stable { background: color-mix(in srgb, var(--st-ok) 22%, transparent); color: var(--st-ok); }
.tag-paused { background: color-mix(in srgb, var(--st-warn) 22%, transparent); color: var(--st-warn); }
.tag-superseded { background: color-mix(in srgb, var(--st-idle) 20%, transparent); color: var(--st-idle); }
.tag-success { background: color-mix(in srgb, var(--st-ok) 22%, transparent); color: var(--st-ok); }
.tag-failed, .tag-migrate_failed { background: color-mix(in srgb, var(--st-down) 22%, transparent); color: var(--st-down); }

/* Cards + stat tiles + grid */
.card { background: var(--panel); border: 1px solid var(--divider); border-radius: var(--radius); padding: var(--space-4); }
.grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--divider); border-radius: var(--radius); padding: var(--space-4); }
.stat .n { font-family: var(--font-head); font-size: 34px; line-height: 1; color: var(--text); }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 6px; }

.stat .sub { margin-top: 8px; font-size: 11.5px; display: flex; gap: 9px; flex-wrap: wrap; }
.stat .n.warn { color: var(--st-warn); }
.stat .n small { font-family: var(--font-body); font-size: 12px; }
.c-ok { color: var(--st-ok); } .c-warn { color: var(--st-warn); }
.c-down { color: var(--st-down); } .c-idle { color: var(--st-idle); }

/* Dashboard panel cards (2-col rows of the overview) */
.grid-2 { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; margin-top: var(--space-4); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.pcard { background: var(--panel); border: 1px solid var(--divider); border-radius: var(--radius); padding: var(--space-4); }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.pcard-head h3 { margin: 0; font-size: 17px; }
.pcard-head a { font-size: 12px; }
.pcard-note { font-size: 11.5px; margin: 0 0 var(--space-2); }
.pcard-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; border-top: 1px solid var(--divider); }
.pcard-row .row-label { flex: 1; font-size: 13px; text-transform: capitalize; }
.pcard-row .row-count { font-size: 13px; font-weight: 600; }
.pcard-row .row-meta { font-size: 11px; white-space: nowrap; }
.pcard-row .fp { flex: 1; min-width: 0; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-row .act-main { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; }
.pcard-row .act-target { font-size: 11px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ok { background: var(--st-ok); } .dot-warn { background: var(--st-warn); }
.dot-down { background: var(--st-down); } .dot-idle { background: var(--st-idle); }
.pcard-row.flight { display: block; }
.flight-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.flight-head a { flex: 1; font-size: 13px; font-weight: 600; }
.flight-meta { font-size: 11px; margin-top: 5px; }
.bar-track { height: 5px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); }

/* Fleet health (fleet.gohtml) */
.pcard-full { margin-top: var(--space-4); }
.pcard-subtitle { font-weight: 400; font-size: 11px; }
.ver-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ver-row .ver-label { width: 90px; flex: none; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver-row .ver-bar { flex: 1; }
.ver-row .row-count { font-size: 12.5px; font-weight: 600; min-width: 22px; text-align: right; }
.btn-secondary { font-size: 11.5px; padding: 5px 10px; }
.cell-action { text-align: right; }

/* Clinic detail (clinic_detail.gohtml) */
.backlink { font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; margin-bottom: var(--space-3); }
.detail-head { display: flex; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4); }
.detail-ident { flex: 1; min-width: 260px; }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h2 { margin: 0; }
.detail-slug { margin-top: 4px; font-size: 12.5px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-outline { background: transparent; border: 1px solid var(--divider); color: var(--text); }
.warn-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: var(--space-4);
  padding: 13px 15px; border-radius: var(--radius);
  border: 1px dashed color-mix(in srgb, var(--st-warn) 55%, transparent);
  background: color-mix(in srgb, var(--st-warn) 8%, transparent); }
.warn-banner > div { flex: 1; min-width: 220px; }
.warn-banner .muted { font-size: 12.5px; margin-top: 2px; }
.kv-grid { display: grid; grid-template-columns: 110px 1fr; gap: 7px 12px; font-size: 13px; align-items: baseline; }
.kv-grid .kv-l { color: var(--muted); font-size: 12px; }
.kv-break { word-break: break-all; font-size: 11.5px; }
.rebind-form { margin-top: var(--space-4); }

/* Provision one-liner actions (clinic detail, license card) */
.provision-forms { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: var(--space-4); }
.provision-forms form { display: flex; gap: 6px; align-items: center; }
.provision-version { max-width: 210px; font-size: 12px; padding: 5px 8px; }
.provision-help { flex-basis: 100%; font-size: 12px; margin: 0; }
.tel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
@media (max-width: 720px) { .tel-grid { grid-template-columns: 1fr 1fr; } }
.tel-cell { border: 1px solid var(--divider); border-radius: var(--radius); padding: 10px 12px; background: var(--panel-2); }
.tel-lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 5px; }
.tel-val { font-size: 17px; font-weight: 600; }
.tel-sub { font-size: 11px; margin-left: 7px; }
.err-nums { display: flex; gap: 24px; margin-bottom: var(--space-2); }
.err-big { font-size: 24px; font-weight: 600; }
.err-num .muted { font-size: 11px; }
.err-fps-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; margin: 10px 0 4px; }

/* Error triage (error_triage.gohtml) */
.phi-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: var(--space-4);
  padding: 12px 15px; border-radius: var(--radius); font-size: 12.5px; line-height: 1.5;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent); }

/* Clinics list (clinics_list.gohtml) */
.list-toolbar { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.list-toolbar .input { max-width: 320px; }
.list-count { font-size: 12px; white-space: nowrap; }
.list-new { margin-left: auto; }
.pcard-table { padding: 0; }
.cell-clinic { display: block; color: inherit; }
.cell-clinic:hover { text-decoration: none; }
.cell-clinic:hover .cell-name { color: var(--accent); }
.cell-name { font-weight: 600; font-size: 13.5px; }
.cell-slug { font-size: 11px; }

/* Tables */
.table, table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--panel); }
.table th, table th { text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  padding: 9px 12px; border-bottom: 1px solid var(--divider); }
.table td, table td { padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
tbody tr:hover td { background: var(--panel-2); }

/* Forms */
.field > label { display: block; margin: var(--space-4) 0 6px; font-size: 12px; color: var(--muted); }
.input {
  width: 100%; max-width: 480px; padding: 8px 10px; font: inherit; font-size: 14px;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--divider); border-radius: var(--radius); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field-error { color: var(--st-down); font-size: 12px; margin: 9px 0 0; }

/* Flash */
.flash { background: var(--panel-2); border: 1px solid var(--st-warn); border-left-width: 3px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: var(--space-4); }
.flash.error { border-color: var(--st-down); }
.flash.success { border-color: var(--st-ok); }

/* Blueprint frame (ported from the Industry DS): square hairline card with
   corner registration marks — the prototype's sign-in card wears this. */
.blueprint { position: relative; border: 1px solid var(--divider); border-radius: 0; }
.blueprint > .corner { position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--text) 55%, transparent); }
.blueprint > .corner::before, .blueprint > .corner::after { content: ""; position: absolute; background: currentColor; }
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* Auth card (sign-in): PAGES-MAP §1 — centered blueprint card with the
   product mark + caption inside it. */
.auth-card { width: min(408px, 100%); margin: 9vh auto; background: var(--panel); padding: 34px 32px; }
.auth-product { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.auth-mark { width: 34px; height: 34px; border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; flex: none; }
.auth-product-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 19px;
  line-height: 1; letter-spacing: -0.01em; }
.auth-product-caption { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; margin-top: 3px; }
.auth-heading { margin: 0 0 3px; font-size: 24px; }
.auth-card .lede { font-size: 13px; margin: 0 0 2px; }
.btn-block { display: block; width: 100%; margin-top: 16px; }

/* Legacy badge → status tag (kept so un-swept markup still reads correctly) */
.badge { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 11px; }
.badge.active { background: color-mix(in srgb, var(--st-ok) 22%, transparent); color: var(--st-ok); }
.badge.revoked { background: color-mix(in srgb, var(--st-down) 22%, transparent); color: var(--st-down); }
.badge.expired { background: color-mix(in srgb, var(--st-warn) 22%, transparent); color: var(--st-warn); }
.badge.unactivated { background: color-mix(in srgb, var(--st-idle) 20%, transparent); color: var(--st-idle); }

/* License form (create / edit / revoke) */
.license-form .pcard { margin-top: var(--space-4); }
.license-form .pcard:first-of-type { margin-top: 0; }
.pcard-title { margin: 0 0 4px; font-size: 17px; }
.lede { color: var(--muted); font-size: 12.5px; margin: 0; max-width: 62ch; line-height: 1.55; }
.bound-card { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 10px 12px; margin-top: 14px;
  border: 1px solid var(--divider); background: var(--panel-2); }
.bound-ident { flex: 1; min-width: 150px; }
.bound-name { font-size: 13px; font-weight: 600; }
.bound-slug { font-size: 11px; margin-top: 2px; }
.bound-note { color: var(--muted); font-size: 11.5px; }
.key-row { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 10px 12px; margin-top: 9px; border: 1px solid var(--divider); }
.key-inline { flex: 1; font-size: 13px; letter-spacing: 0.04em; }
.mark { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 6px; }
.pcard-head .mark { margin-top: 0; }
.mark-enforced { color: var(--st-ok); }
.mark-recorded { color: var(--st-idle); }
.chip-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; margin: 14px 0 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; font-size: 12.5px; cursor: pointer; border: 1px solid var(--divider); }
.chip input { margin: 0; accent-color: var(--accent); }
.chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-3 .field > label { margin-top: 0; }
.field-narrow { max-width: 260px; }
.field-help { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.45; }
.air-hint { font-size: 11.5px; margin-top: 5px; color: var(--accent); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: var(--space-4); }

/* Issued-key interstitial ("License created") */
.keycard { max-width: 680px; margin: 4vh auto 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: var(--space-8); background: var(--panel); border: 1px solid var(--divider); border-radius: var(--radius); }
.keycard-title { margin: 12px 0 4px; }
.keycard-check { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--st-ok); border: 1.6px solid var(--st-ok); }
.keycard-sub { font-size: 12.5px; margin: 0; max-width: 52ch; line-height: 1.55; }
.key-once { color: var(--st-warn); font-size: 12.5px; margin: 4px 0 14px; }
.key-box { width: 100%; max-width: 520px; margin-top: 6px; padding: 20px 18px; border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent); }
.key-box .key-lbl { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.11em; margin-bottom: 8px; }
.key-box .key-value { width: 100%; text-align: center; font-size: 20px; font-weight: 600; letter-spacing: 0.08em;
  background: transparent; border: 0; color: var(--text); }
.key-box .key-value:focus { outline: none; }
/* Provision one-liner variant: a full command, not a short key — smaller,
   left-aligned, no letter-spacing so it stays legible and copyable. */
.key-box .key-value-cmd { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-align: left; }
.keycard-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 16px; }
.keycard-note { color: var(--muted); font-size: 12px; margin: 18px 0 0; max-width: 52ch; line-height: 1.55; }

/* Users + audit: avatar identity cells and inline row forms */
.cell-user { display: flex; align-items: center; gap: 9px; }
.avatar-sm { width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; }
.inline-form { display: inline-block; }
.inline-form + .inline-form { margin-left: 6px; }
.input-compact { height: 32px; min-height: 0; font-size: 12.5px; padding: 2px 8px; width: 150px; }

/* Audit drill-down */
.audit-drill { margin-bottom: var(--space-4); }
.audit-drill .kv-grid { margin: 6px 0 4px; }
.reason-callout { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; margin: 10px 0 4px; font-size: 12.5px;
  background: color-mix(in srgb, var(--st-warn) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--st-warn) 30%, transparent); }
.reason-callout .reason-lbl { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em; }
.drill-notes { font-size: 11.5px; margin: 10px 0 0; }
.drill-nochanges { font-size: 12px; margin: 12px 0 0; }
.drill-append { font-size: 11.5px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--divider); }
.audit-pager { margin-top: var(--space-4); }

/* Offline bundles: 2-step exchange */
.bundle-input { min-height: 150px; font-size: 11.5px; }
.bundle-empty { border: 1px dashed var(--divider); padding: 26px 14px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* Releases: card per release (list + detail header) */
.page-note { font-size: 12.5px; margin: 0 0 var(--space-4); }
.release-card { margin-bottom: var(--space-4); }
.release-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.release-head .spacer { flex: 1; }
.release-version { font-size: 16px; font-weight: 600; }
.release-version-lg { font-size: 20px; font-weight: 600; }
.release-meta { font-size: 11.5px; }
.release-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.release-actions form { display: flex; align-items: center; gap: 6px; margin: 0; }
.release-actions-row { margin-top: 10px; }
.art-strip { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 9px 11px; margin: 10px 0;
  border: 1px solid var(--divider); background: color-mix(in srgb, var(--text) 3%, transparent); }
.art-strip .art-main { flex: 1; min-width: 180px; }
.art-strip .art-url { font-size: 12.5px; font-weight: 600; word-break: break-all; }
.art-strip .art-sha { font-size: 10.5px; margin-top: 2px; word-break: break-all; }
.art-none { border-style: dashed; border-color: color-mix(in srgb, var(--st-warn) 55%, transparent);
  background: color-mix(in srgb, var(--st-warn) 8%, transparent); font-size: 12.5px; }
.release-pct { font-size: 11.5px; margin-top: 6px; }
/* Paused/superseded: no numeric claim — striped track instead of a fill. */
.bar-indeterminate { background: repeating-linear-gradient(90deg,
  color-mix(in srgb, var(--st-warn) 40%, transparent) 0 6px, var(--panel-3) 6px 12px); }
.release-ramp-note { font-size: 11.5px; margin: 8px 0 0; }

/* Inline SVG icons — sprite lives at the top of layout.gohtml, referenced via
   <use href="#icon-*">. Line icons stroke with currentColor so they inherit
   text colour in both themes (the prototype's Feather/Lucide-style set). */
/* The <symbol> sprite is a definition block, never rendered. A bare <svg> with
   no width/height defaults to 300x150, so relying on [hidden] alone leaves a
   dead block at the top of every page if any rule wins over the UA stylesheet.
   Take it out of layout entirely. */
.icon-sprite { display: none !important; }

.icon { fill: none; stroke: currentColor; stroke-width: 1.5; flex: none; vertical-align: -2px; }
.btn-icon { padding: 7px; }
.brand-mark { display: grid; place-items: center; color: var(--accent); }
.nav-lock { margin-left: auto; opacity: 0.75; }

/* Theme toggle: sun shown while dark (click → light), moon while light. */
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }

/* Search box with the inline magnifier (clinics list toolbar). */
.search-wrap { position: relative; display: inline-block; flex: none; width: min(320px, 100%); }
.search-wrap .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: 0.5; pointer-events: none; }
.search-wrap .input { max-width: none; padding-left: 32px; }

/* Read-only banner (releases, for operators): look, don't drive. */
.ro-banner { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-4);
  padding: 9px 13px; border-radius: var(--radius); font-size: 12.5px; color: var(--muted);
  border: 1px dashed var(--divider); background: color-mix(in srgb, var(--text) 3%, transparent); }

/* Artifact strip leading icon (releases). */
.art-strip .art-icon { align-self: center; }

/* Full-row links: every cell's content is a block anchor filling the cell
   (negative margins swallow the td padding), so the whole row navigates while
   staying keyboard-accessible (one tab stop per row) and right-clickable. */
.table td > .rowlink { display: block; margin: -9px -12px; padding: 9px 12px; color: inherit; }
.table td > .rowlink:hover { text-decoration: none; }

/* Responsive: never scroll the body sideways; wide tables scroll themselves. */
.tablewrap { overflow-x: auto; }
@media (max-width: 720px) { .topbar { flex-wrap: wrap; gap: var(--space-3); } main { padding: var(--space-4); }
  .grid-3 { grid-template-columns: 1fr; } }
