/* PQC Secure: shared styles, matched to the PQC Standards Manager (same tokens, layout and controls).
   Light and dark follow the operating system setting, unless the user picks Light or Dark in the account menu
   (stored per browser; base.html sets html[data-theme] before the first paint). */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f9fafb; --border: #e3e6ea; --border-strong: #cfd4da;
  --text: #1c2430; --muted: #5d6877; --faint: #8a94a3;
  --brand: #1f4f8f; --brand-2: #2e6ac0; --brand-soft: #e8f0fb; --navy: #0f2747;
  --green: #1a7f4b; --green-soft: #e3f4ea; --amber: #9a5b00; --amber-soft: #fdf1dc;
  --red: #b42318; --red-soft: #fde8e6; --purple: #6941c6; --purple-soft: #efeafc;
  --gray-soft: #eef0f3; --track: #eef0f3; --bar: #5b7fbf;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --radius: 8px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* names used by older page styles */
  --fg: var(--text); --line: var(--border); --card: var(--panel); --accent: var(--brand); --bad: var(--red); --ok: var(--green);
  color-scheme: light;
}
/* Dark tokens: used when the system is dark and no Light choice is stored, or when Dark is chosen.
   The two lists must stay the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --panel: #161d26; --panel-2: #1b2430; --border: #283241; --border-strong: #37445a;
    --text: #e6eaf0; --muted: #a3adbb; --faint: #7a8596;
    --brand: #6aa3ff; --brand-2: #8db8ff; --brand-soft: #1a2a44;
    --green: #4cc38a; --green-soft: #143024; --amber: #f0b44c; --amber-soft: #33270f;
    --red: #ff7b6e; --red-soft: #3a1714; --purple: #b69cff; --purple-soft: #2a2145;
    --gray-soft: #222b37; --track: #222b37; --bar: #6f95d6; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --panel: #161d26; --panel-2: #1b2430; --border: #283241; --border-strong: #37445a;
  --text: #e6eaf0; --muted: #a3adbb; --faint: #7a8596;
  --brand: #6aa3ff; --brand-2: #8db8ff; --brand-soft: #1a2a44;
  --green: #4cc38a; --green-soft: #143024; --amber: #f0b44c; --amber-soft: #33270f;
  --red: #ff7b6e; --red-soft: #3a1714; --purple: #b69cff; --purple-soft: #2a2145;
  --gray-soft: #222b37; --track: #222b37; --bar: #6f95d6; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); font-size: 13px; } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.nowrap, td.nowrap, th.nowrap { white-space: nowrap; }
.bad { color: var(--red); } .ok { color: var(--green); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--panel); padding: 6px 10px; border-radius: 6px; }
.skip:focus { left: 8px; }
.icon { width: 16px; height: 16px; flex: none; }

/* ---------- app shell: sidebar + main ---------- */
/* The sidebar holds everything (navigation, organisation, account), so pages start at the top with no header row.
   Spacing is sized so the full menu fits a 650px-high laptop window without scrolling. */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 10px 10px 8px; position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.brand { display: flex; gap: 9px; align-items: center; padding: 0 6px 8px; font-weight: 650; color: var(--text); line-height: 1.25; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; object-fit: contain; }
.brand small { display: block; font-weight: 450; color: var(--muted); font-size: 11.5px; }
.org-switch { padding: 0 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.org-switch select { width: 100%; font-weight: 600; padding: 5px 8px; font-size: 13px; }
.org-switch .org-name { display: flex; gap: 8px; align-items: center; padding: 3px 8px; font-weight: 600; font-size: 13px; }
.org-switch .org-name svg { color: var(--muted); }
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 4px 9px; border-radius: 6px; color: var(--text); font-size: 13px; line-height: 1.45; }
.nav a:hover { background: var(--gray-soft); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav .section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 7px 9px 1px; }
.nav .section:first-child { padding-top: 2px; }
.nav svg { width: 15px; height: 15px; flex: none; }
.sidebar-foot { flex: none; margin-top: 4px; border-top: 1px solid var(--border); padding: 6px 0 0; font-size: 12px; }
.sf-links { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px 0; font-size: 11.5px; white-space: nowrap; }
.powered-by { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 11.5px; }
.powered-by img { width: 14px; height: 14px; }
.powered-by:hover { color: var(--muted); text-decoration: none; }
.powered-by b { color: var(--muted); font-weight: 600; }

.main { padding: 16px 28px 32px; max-width: 1360px; width: 100%; min-width: 0; }
.main-foot { margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; }
.main-foot a { color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.crumbs svg { width: 14px; height: 14px; color: var(--purple); }

/* account menu: bottom of the sidebar, opens upwards */
.account { position: relative; }
.account > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; color: var(--text); }
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover, .account[open] > summary { background: var(--gray-soft); }
.account > summary:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.account-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.account-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 12.5px; }
.account-role { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account .chev { color: var(--muted); width: 14px; height: 14px; flex: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.avatar.lg { width: 38px; height: 38px; font-size: 14px; }
.account-menu { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40; width: 300px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16,24,40,.18); padding: 14px; }
.am-head { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.am-name { font-weight: 600; word-break: break-all; }
.am-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0; font-size: 12.5px; }
.am-facts dt { color: var(--muted); } .am-facts dd { margin: 0; }
.am-links { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.am-links a { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; color: var(--text); }
.am-links a:hover { background: var(--gray-soft); text-decoration: none; }
.am-links svg { width: 16px; height: 16px; color: var(--muted); }
.account-menu form { margin: 0; }
.account-menu .am-signout { width: 100%; justify-content: center; margin-top: 4px; }

/* short windows: tighten the menu a little more so it still fits */
@media (max-height: 640px) and (min-width: 761px) {
  .nav a { padding-top: 2px; padding-bottom: 2px; }
  .nav .section { padding-top: 4px; }
  .brand small { display: none; }
  .brand { padding-bottom: 6px; }
  .org-switch { padding-bottom: 6px; }
}

/* ---------- platform admin (evoAI staff console): purple accent so it is never mistaken for a client view ---------- */
.nav .admin-section { display: flex; align-items: center; gap: 5px; color: var(--purple); font-weight: 600; }
.nav .admin-section svg { width: 12px; height: 12px; }
.shell.admin-mode .sidebar { border-right: 3px solid var(--purple); }
.shell.admin-mode .nav a.active { background: var(--purple-soft); color: var(--purple); }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 14px; padding: 8px 14px; border-radius: var(--radius);
  background: var(--purple-soft); color: var(--purple); border: 1px solid color-mix(in srgb, var(--purple) 25%, transparent); font-size: 13px; }
.admin-bar svg { width: 16px; height: 16px; }
.admin-bar a { color: inherit; }
.admin-bar-note { margin-left: auto; font-size: 12px; opacity: .85; }
.admin-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.admin-stats .stat { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 14px; color: var(--text); border-top: 3px solid var(--purple); }
.admin-stats a.stat:hover { text-decoration: none; border-color: var(--purple); }
.admin-stats .n { font-size: 22px; font-weight: 650; line-height: 1.2; }
.admin-stats .n small { font-size: 15px; color: var(--muted); font-weight: 500; }
.admin-stats .n.warn-n { color: var(--amber); }
.admin-stats .l { font-size: 12px; color: var(--muted); }
@media (max-width: 1100px) { .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-bar-note { margin-left: 0; } }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h1, .card-head h2 { margin: 0; }
.card-head .push { margin-left: auto; }
dl.kv2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
dl.kv2 > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
dl.kv2 > div.wide2 { grid-column: 1 / -1; }
dl.kv2 dt { color: var(--muted); font-size: 12.5px; }
dl.kv2 dd { margin: 0; word-break: break-word; }
@media (max-width: 900px) { dl.kv2 { grid-template-columns: 1fr; } dl.kv2 > div { grid-template-columns: 140px minmax(0, 1fr); } }

/* ---------- panels (pages use .card) ---------- */
.card, .panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card > h1:first-child, .card > div > h1:first-child { margin-bottom: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--panel-2); }
.tile .n { font-size: 26px; font-weight: 650; line-height: 1.2; }
.tile .muted { font-size: 12.5px; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.subnav > strong { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px 8px 0; }
.subnav a { padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 550; margin-bottom: -1px; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.on { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 4px 20px; }
.fields .f { padding: 6px 0; border-bottom: 1px solid var(--border); }
.fields .k { font-size: 12.5px; color: var(--muted); }
.fields .v { white-space: pre-wrap; word-break: break-word; }

/* ---------- list pages: heading with counts, filter toolbar, chips, bulk bar ---------- */
html.js .no-js-only { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.ph-title { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); overflow: hidden; }
.seg a { padding: 3px 12px; font-size: 12.5px; color: var(--muted); border-right: 1px solid var(--border); white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a b { color: var(--text); font-weight: 650; }
.seg a:hover { background: var(--gray-soft); text-decoration: none; }
.seg a.on { background: var(--brand-soft); color: var(--brand); }
.seg a.on b { color: var(--brand); }
.list-card { padding: 0; }
.list-card > .notice { margin: 12px 16px 0 !important; }
.toolbar { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tb-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tb-row select { width: auto; max-width: 220px; padding: 6px 8px; }
.tb-search { position: relative; flex: 1 1 240px; max-width: 340px; }
.tb-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.tb-search input { padding: 6px 9px 6px 30px; }
.tb-spacer { flex: 1; }
.tb-date { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tb-date input { width: auto; padding: 5px 8px; }
.tb-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.tb-link svg { width: 15px; height: 15px; }
.more { position: relative; }
.more > summary { list-style: none; padding: 6px 12px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary svg { width: 15px; height: 15px; }
.more[open] > summary { background: var(--gray-soft); }
.more .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; }
.more-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(560px, calc(100vw - 48px)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px; padding: 12px 14px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16,24,40,.14); }
.more-panel label { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.more-panel select { max-width: none; width: 100%; color: var(--text); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px 2px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; background: var(--panel-2); color: var(--text); }
.chip .muted { font-size: 12.5px; }
.chip .x { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: var(--faint); font-size: 14px; line-height: 1; }
.chip:hover { border-color: var(--red); text-decoration: none; }
.chip:hover .x { background: var(--red-soft); color: var(--red); }
.chip-clear { font-size: 12.5px; margin-left: 4px; }
.list-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 16px; }
.list-card > .scroll, .list-card > .pager, .list-card > .empty { padding-left: 16px; padding-right: 16px; }
.list-card > .pager { padding-bottom: 14px; }
.inline-details { position: relative; }
.inline-details > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inline-details > summary::-webkit-details-marker { display: none; }
.inline-details > summary svg { width: 15px; height: 15px; }
.inline-details .pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(380px, calc(100vw - 48px)); padding: 14px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16,24,40,.14); }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 16px 14px; padding: 8px 12px; border-radius: var(--radius);
  background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.22); position: sticky; bottom: 12px; z-index: 20; }
.bulkbar.ready:not(.open) { display: none; }
.bulkbar select { width: auto; max-width: 340px; padding: 5px 8px; }
.bulkbar .bb-count { font-size: 13px; }
.bulkbar button.link { color: #cfe0ff; }
.bulkbar button:not(.link) { background: #fff; color: var(--navy); border-color: #fff; }
.empty { padding: 24px 16px; text-align: center; color: var(--muted); }
.empty p { margin: 6px 0; }
@media (max-width: 760px) { .tb-row select { max-width: none; flex: 1 1 45%; } .tb-search { max-width: none; flex-basis: 100%; } .more-panel { grid-template-columns: 1fr; position: static; width: 100%; margin-top: 6px; box-shadow: none; } .more { flex-basis: 100%; } }

table.runs th { white-space: nowrap; }
table.runs td { vertical-align: top; }
table.runs td:nth-child(2), table.runs td:nth-child(3), table.runs td:nth-child(4) { white-space: nowrap; }
a.strong { font-weight: 600; }
.outcome { min-width: 220px; }
.obar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin: 5px 0 5px; }
.obar span { display: block; min-width: 3px; }
.ocounts { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ocounts i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel-2); }
tbody tr:hover { background: var(--panel-2); }
tbody tr > th:first-child:not(:only-child), table:not(:has(thead)) tr > th:first-child:not(:only-child) { background: transparent; font-weight: 500; font-size: 12.5px; width: 30%; max-width: 260px; }
tr.team th { background: var(--gray-soft); color: var(--text); font-size: 13px; }
.pager { margin-top: 12px; display: flex; gap: 12px; align-items: center; }

/* ---------- forms and buttons ---------- */
label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
input, select, textarea { max-width: 100%; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border-strong); border-radius: 6px; padding: 7px 9px; min-width: 0; }
input[type=email], input[type=text], input[type=date], input[type=number], input[type=search], select, textarea { width: 100%; }
input[type=file] { width: 100%; padding: 6px; background: var(--panel-2); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand); vertical-align: -3px; margin: 0 4px 0 0; }
textarea { resize: vertical; min-height: 70px; }
input.code { font-size: 24px; letter-spacing: 6px; text-align: center; font-family: var(--mono); }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.4; }
button:hover, .button:hover { background: var(--brand-2); border-color: var(--brand-2); text-decoration: none; }
button.secondary, .button.secondary { background: var(--panel); color: var(--text); border-color: var(--border-strong); }
button.secondary:hover, .button.secondary:hover { background: var(--gray-soft); border-color: var(--border-strong); }
button.danger, .button.danger { background: var(--panel); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
button.danger:hover, .button.danger:hover { background: var(--red-soft); }
button.link { background: none; border: none; color: var(--brand); padding: 0; font-weight: 400; }
button.link:hover { background: none; text-decoration: underline; }
button:disabled { opacity: .55; cursor: wait; }
.wide { width: 100%; margin-top: 10px; text-align: center; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline select { width: auto; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > div { flex: 1; min-width: 180px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.formgrid .full { grid-column: 1 / -1; }
.ferr { color: var(--red); font-size: 12.5px; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 0; }
.bulk select { width: auto; }
details summary { cursor: pointer; color: var(--brand); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 16px 0 6px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ---------- messages ---------- */
.error, .notice, .warn { border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; border: 1px solid transparent; }
.error { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.notice { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.warn { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.error a, .notice a, .warn a { color: inherit; text-decoration: underline; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-soft); color: var(--muted); white-space: nowrap; vertical-align: 1px; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.blue { background: var(--brand-soft); color: var(--brand); }
.st-Active { background: var(--green-soft); color: var(--green); } .st-Inactive { background: var(--amber-soft); color: var(--amber); } .st-Retired { background: var(--gray-soft); color: var(--muted); }
.sev-b { background: var(--red-soft); color: var(--red); } .sev-w { background: var(--amber-soft); color: var(--amber); }
.manual { font-size: 11px; color: var(--purple); background: var(--purple-soft); border-radius: 8px; padding: 0 6px; margin-left: 4px; }

/* ---------- busy indicator for slow form posts ---------- */
.busy { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-left: 10px; }
.busy .spin { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.busy .hint { font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .busy .spin { animation-duration: 2.4s; } }

/* ---------- sign-in and other public pages: brand panel + card ---------- */
/* One screen, no page scrollbar: each half scrolls on its own only if a window is very small. */
html.public { overflow-y: auto; scrollbar-gutter: auto; }
.login { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(360px, 44%) 1fr; }
.login-hero, .login-main { overflow-y: auto; }
.login-hero { position: relative; display: flex; flex-direction: column; padding: 36px 48px; color: #e8eef8; overflow: hidden;
  background: radial-gradient(1200px 500px at 110% -10%, rgba(76,140,230,.35), transparent 60%),
              linear-gradient(160deg, #0f2747 0%, #16386a 55%, #1f4f8f 100%); }
.login-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.login-hero > * { position: relative; }
.login-hero .brand { padding: 0; color: #fff; }
.login-hero .brand small { color: #cbd7e8; }
.login-hero .brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.lh-body { margin: auto 0; max-width: 470px; padding: 40px 0; }
.lh-body h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 12px; color: #fff; }
.lh-body > p { color: #dbe4f1; font-size: 15px; margin: 0 0 28px; }
.login-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.login-features li { display: flex; gap: 12px; align-items: flex-start; color: #d9e3f0; font-size: 13.5px; line-height: 1.45; }
.login-features b { display: block; color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 1px; }
.lf-icon { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.lf-icon svg { width: 16px; height: 16px; }
.lh-powered { display: inline-flex; flex-direction: column; gap: 1px; align-self: flex-start; color: #dfe8f5; font-size: 13px; padding: 4px 0; }
.lh-powered:hover { text-decoration: none; }
.lh-powered:hover b { text-decoration: underline; }
.lh-powered b { color: #fff; }
.lh-powered span + span { color: #c0cfe3; font-size: 12px; }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px 20px; }
.login-main > .login-inner { width: min(520px, 100%); margin: auto 0 0; }
.login-logo { display: block; width: 200px; height: auto; margin: 0 0 18px -6px; }
.login-main .card { border-radius: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.08), var(--shadow); padding: 30px 36px; max-width: none; }
.login-main .card h1 { font-size: 22px; margin-bottom: 6px; }
.login-main .button.secondary.wide { padding: 9px 14px; }
.login-foot { margin-top: auto; padding-top: 18px; color: var(--faint); font-size: 12.5px; text-align: center; }
.login-foot a { color: var(--muted); }
@media (max-height: 760px) and (min-width: 901px) {
  .login-hero { padding: 24px 40px; }
  .lh-body { padding: 16px 0; }
  .lh-body h1 { font-size: 25px; margin-bottom: 8px; }
  .lh-body > p { margin-bottom: 18px; font-size: 14px; }
  .login-features { gap: 10px; }
  .login-features li { font-size: 13px; }
  .login-main { padding: 18px 24px 12px; }
  .login-logo { width: 150px; margin-bottom: 10px; }
  .login-main .card { padding: 22px 30px; }
  .login-foot { padding-top: 10px; }
}
@media (max-height: 620px) and (min-width: 901px) {
  .lh-body h1 { font-size: 22px; }
  .lh-body > p { margin-bottom: 10px; }
  .login-features li span:not(.lf-icon) { font-size: 12.5px; }
  .login-logo { width: 120px; margin-bottom: 6px; }
  .login-main .card { padding: 16px 26px; }
  .login-main .card p.muted { margin-bottom: 0; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  .login-hero, .login-main { overflow: visible; }
  .login-hero { padding: 20px 22px; }
  .lh-body { padding: 14px 0 6px; }
  .lh-body h1 { font-size: 22px; }
  .lh-body > p { margin-bottom: 8px; }
  .login-features, .lh-powered { display: none; }
  .login-main .card { padding: 22px 20px; }
}

/* ---------- small screens: sidebar becomes a top block ---------- */
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; padding: 10px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; overflow: visible; }
  .nav .section { display: none; }
  .nav a { padding: 6px 9px; }
  .sidebar-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; padding-top: 8px; }
  .main { padding: 12px 16px 32px; }
  .sidebar-foot .account { flex: 1 1 100%; }
  .account-menu { bottom: auto; top: calc(100% + 6px); width: min(320px, calc(100vw - 32px)); }
}

@media print {
  .sidebar, .main-foot, .pager, .busy { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Status pages in the sign-in layout: no organisation yet, organisation suspended. */
.status-card h1 { display: flex; align-items: center; gap: 12px; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); }
.status-icon .icon { width: 22px; height: 22px; }
.status-icon.amber { background: var(--amber-soft); color: var(--amber); }
.status-icon.red { background: var(--red-soft); color: var(--red); }
.status-card .lead { font-size: 15px; color: var(--text); margin: 14px 0 12px; }
.whoami { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--gray-soft); font-size: 13.5px; margin: 0 0 16px; }
.whoami .avatar { flex: none; }
.whoami small { display: block; color: var(--muted); font-size: 12px; }
.status-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.status-steps li { position: relative; padding-left: 34px; font-size: 13.5px; line-height: 1.45; color: var(--text); counter-increment: step; }
.status-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.status-facts { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid var(--red); background: var(--red-soft); border-radius: 0 8px 8px 0; font-size: 13.5px; }
.status-facts dt { font-weight: 600; color: var(--text); }
.status-facts dd { margin: 0 0 4px; color: var(--text); }
.status-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.status-actions form { margin: 0; }
.status-actions .icon { width: 16px; height: 16px; }
.status-switch { display: flex; gap: 8px; margin: 0 0 16px; }
.status-switch select { flex: 1; }
.status-card .fine { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* Pending invitations: banner on every page until accepted or declined. */
.invite-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border)); background: var(--brand-soft); color: var(--text); font-size: 13.5px; }
.invite-banner > .icon { width: 18px; height: 18px; color: var(--brand); }
.invite-banner span { flex: 1; min-width: 200px; }
.invite-banner .button { padding: 5px 12px; font-size: 13px; }
.am-links .badge { margin-left: auto; }
.invite-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.invite-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; }
.invite-list .who { flex: 1; min-width: 200px; }
.invite-list .who b { display: block; font-size: 15px; }
.invite-list .who small { color: var(--muted); font-size: 12.5px; }
.invite-list form { margin: 0; }

/* ---------- Dashboard (home.html) ----------
   Hero (readiness ring + outcome mix) beside six KPI tiles, then cards in a grid. Status colours come from
   the template (dashboard.BUCKET_COLOURS) and always sit next to their label. Sized for a 1350x575 laptop. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dash-top { align-items: flex-end; margin-bottom: 14px; }
.dash-top h1 { font-size: 21px; letter-spacing: -.01em; }
.dt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.dt-meta > span + span::before { content: "·"; margin: 0 8px; color: var(--faint); }
.dt-meta b { color: var(--text); font-weight: 600; }
/* Run context strip: which run, date and release the dashboard shows; amber when the run is older than the stale limit. */
.dt-ctx { display: inline-flex; flex-wrap: wrap; align-items: stretch; margin-top: 7px; font-size: 13px; line-height: 1.3;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); border-left: 3px solid var(--brand);
  border-radius: 8px; overflow: hidden; }
.dt-ctx .ci { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 13px; }
.dt-ctx .ci + .ci { border-left: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); }
.dt-ctx .ci > small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); opacity: .8; }
.dt-ctx .ci > b { font-weight: 650; color: var(--text); white-space: nowrap; }
.dt-ctx .ci > b a { color: var(--brand); font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.dt-ctx .ci .badge { margin-left: 4px; vertical-align: 1px; font-size: 10.5px; padding: 0 6px; }
.dt-ctx.old { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); border-left-color: var(--amber); }
.dt-ctx.old .ci > small { color: var(--amber); }
.dt-ctx.old .ci + .ci { border-left-color: color-mix(in srgb, var(--amber) 25%, transparent); }
@media (max-width: 640px) {
  .dt-ctx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .dt-ctx .ci { min-width: 0; padding: 5px 10px; }
  .dt-ctx .ci + .ci { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
  .dt-ctx .ci:nth-child(-n+2) { grid-column: 1 / -1; }
  .dt-ctx .ci:nth-child(n+4) { border-left: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
  .dt-ctx .ci > b { white-space: normal; }
}
.dt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-view { display: flex; gap: 6px; align-items: center; margin: 0; }
.dt-view select { width: auto; max-width: 280px; }
.dash-top .button .icon { width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; }

.dash .card, .dash-hero .card, .dash-grid .card { margin-bottom: 0; }
.dash-hero { display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 14px; margin-bottom: 14px; }
.dash-grid { display: grid; gap: 14px; margin-bottom: 14px; align-items: start; }
.dash-grid.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.dash-grid.g-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.dash-grid.flat { margin-bottom: 0; }
section.card + section.card { margin-top: 0; }
.card-head h2 { font-size: 15px; }
.card-head .small { font-weight: 400; }
.card-sub { margin: -4px 0 10px; font-size: 12.5px; color: var(--muted); }
.card-foot { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.card-foot.bad { color: var(--red); }

/* hero */
.hero { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; }
.hero-top { display: flex; gap: 18px; align-items: center; }
.ring { width: 118px; height: 118px; flex: none; }
.ring circle { fill: none; stroke-width: 11; }
.ring-track { stroke: var(--track); }
.ring-fill { stroke-linecap: round; }
.ring-n { text-anchor: middle; font-size: 26px; font-weight: 700; fill: var(--text); letter-spacing: -.02em; }
.ring-l { text-anchor: middle; font-size: 11px; fill: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero-text { min-width: 0; }
.eyebrow { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 2px; }
.verdict { font-size: 19px; font-weight: 650; line-height: 1.3; margin: 0 0 4px; letter-spacing: -.01em; }
.hero-sub { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.hero-delta { margin: 0; }
.spark-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.spark { display: block; overflow: visible; flex: none; }
.spark-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--brand-soft); stroke: none; }
.spark-dot { fill: var(--brand); stroke: var(--panel); stroke-width: 2; }
.mix-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.mixbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--track); }
.mixbar span { display: block; min-width: 4px; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.mix-legend.tight { margin: 0 0 10px; }
.mix-legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mix-legend b { color: var(--text); font-weight: 600; }
.mix-legend i, .kpi-l i, .act-bucket i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 14px 11px; display: flex; flex-direction: column; min-width: 0; }
.kpi-l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-l .icon { width: 14px; height: 14px; color: var(--faint); }
.kpi-n { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 6px 0 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-n.kpi-date { font-size: 20px; line-height: 34px; }
.kpi-f { margin-top: auto; }
.dl { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--faint); white-space: nowrap; }
.dl.good { color: var(--green); }
.dl.bad { color: var(--red); }
.dl-since { color: var(--faint); font-weight: 400; }

/* Act on these first */
.act-list { list-style: none; margin: 0; padding: 0; }
.act-cols, .act-list li { display: grid; grid-template-columns: 62px minmax(0, 1.5fr) minmax(0, 1fr) 116px 92px 72px; gap: 10px; align-items: center; }
.act-cols { padding: 0 4px 6px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.act-list li { padding: 7px 4px; border-top: 1px solid var(--border); font-size: 13px; }
.act-list li:first-child { border-top: 0; }
.act-list li:hover { background: var(--panel-2); }
.act-main, .act-team { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.act-main a { font-weight: 600; }
.act-name, .act-team span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.act-team span.faint { color: var(--faint); font-size: 12px; }
.act-bucket { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; }
.act-due { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.act-risk .badge { padding: 1px 7px; }
.act-risk .badge .icon { width: 12px; height: 12px; }
.prio { display: inline-block; text-align: center; padding: 1px 0; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--gray-soft); color: var(--muted); }
.prio-high { background: var(--red-soft); color: var(--red); }
.prio-medium { background: var(--amber-soft); color: var(--amber); }
.prio-low { background: var(--brand-soft); color: var(--brand); }

/* Deadlines by year */
.years { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 0 2px; border-bottom: 1px solid var(--border-strong); }
.yr { flex: 1 1 0; max-width: 56px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding-bottom: 0; }
.yr-bar { display: block; width: 100%; min-height: 3px; background: var(--bar); border-radius: 4px 4px 0 0; }
.yr-n { font-size: 12px; font-weight: 600; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.yr-l { position: absolute; bottom: -20px; font-size: 11.5px; color: var(--muted); }
.years + .card-foot, .years + p { margin-top: 28px; }
.years:last-child { margin-bottom: 22px; }

/* Trend */
.trend { display: flex; gap: 10px; align-items: flex-end; height: 140px; border-bottom: 1px solid var(--border-strong); padding: 0 4px; }
.trend a.col { flex: 1 0 22px; max-width: 54px; display: flex; flex-direction: column-reverse; gap: 2px; text-decoration: none; }
.trend a.col span { display: block; min-height: 2px; }
.trend a.col span:last-child { border-radius: 4px 4px 0 0; }
.trend a.col:hover { opacity: .85; }
.trend a.col:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.trend-labels { display: flex; gap: 10px; padding: 4px 4px 0; }
.trend-labels div { flex: 1 0 22px; max-width: 54px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; white-space: nowrap; }
.relmark { color: var(--text); font-weight: 700; }
details.table-view { margin-top: 10px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--brand); font-size: 12.5px; }
details.table-view table { margin-top: 8px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* By team */
.teams { display: grid; grid-template-columns: minmax(90px, 32%) minmax(0, 1fr) auto; gap: 9px 12px; align-items: center; font-size: 13px; }
.team-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-bar { height: 12px; }
.team-fill { display: flex; gap: 2px; height: 100%; min-width: 4px; }
.team-fill span { display: block; min-width: 3px; }
.team-fill span:last-child { border-radius: 0 4px 4px 0; }
.team-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12.5px; }

/* Exposure bars */
.mini-h { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.hbars { display: grid; grid-template-columns: minmax(110px, 54%) 1fr auto; gap: 7px 10px; align-items: center; font-size: 12.5px; }
.hb-t { height: 8px; background: var(--track); border-radius: 0 4px 4px 0; }
.hb-f { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 3px; }
.hb-f.zero { min-width: 0; }
.hb-n { text-align: right; font-variant-numeric: tabular-nums; min-width: 2em; font-weight: 600; }

/* Coverage */
.covs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cov { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: var(--panel-2); }
.cov-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 12px; }
.cov-n { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.meter { height: 6px; background: var(--track); border-radius: 3px; margin: 6px 0 6px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--bar); border-radius: 3px; }
.cov-l { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 4px; }
.since { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); font-size: 13px; }
.since.changed { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.since p { margin: 2px 0 0; }
.since-icon { color: var(--brand); margin-top: 2px; }

.dash-empty { text-align: center; padding: 34px 24px; }
.dash-empty .de-icon { display: inline-flex; width: 48px; height: 48px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.dash-empty .de-icon .icon { width: 24px; height: 24px; }
.dash-empty p { max-width: 560px; margin-left: auto; margin-right: auto; }

@media (max-width: 1180px) {
  .dash-hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .act-cols, .act-list li { grid-template-columns: 58px minmax(0, 1.4fr) minmax(0, 1fr) 110px; }
  .act-cols span:nth-child(n+5), .act-due, .act-risk { display: none; }
  .dash-grid.g-2-1, .dash-grid.g-1-1, .dash-grid.g-3 { grid-template-columns: 1fr; }
  .covs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-top { flex-direction: column; align-items: flex-start; }
  .act-cols { display: none; }
  .act-list li { grid-template-columns: 58px minmax(0, 1fr); }
  .act-team, .act-bucket { grid-column: 2; }
}

/* Export menu on the Assets list (a small pop-over under the button). */
.export-menu { position: relative; display: inline-block; }
.export-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu > summary .icon { width: 15px; height: 15px; }
.export-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.12), var(--shadow); padding: 8px; }
.ep-head { margin: 2px 6px 6px; font-size: 12px; color: var(--muted); }
.export-panel a { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; color: var(--text); }
.export-panel a:hover { background: var(--gray-soft); text-decoration: none; }
.export-panel a .icon { margin-top: 2px; color: var(--brand); }
.export-panel a span { display: flex; flex-direction: column; line-height: 1.35; }
.export-panel a small { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .export-panel { right: auto; left: 0; width: min(300px, calc(100vw - 32px)); } }

/* Runs list: link to the release's standards report (PDF) beside "R2 · date". */
.ref-pdf { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 19px; color: var(--brand); background: var(--panel); white-space: nowrap; vertical-align: 1px; }
.ref-pdf .icon { width: 12px; height: 12px; }
a.ref-pdf:hover { background: var(--brand-soft); text-decoration: none; }
.ref-pdf.pending { color: var(--faint); font-weight: 500; }

/* Help (in-app user guide), laid out like the Standards Manager's Help */
.help { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-toc { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; }
.help-toc a { padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: 13.5px; }
.help-toc a:hover { background: var(--gray-soft); text-decoration: none; }
.help-toc a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.help-body { padding: 22px 26px; max-width: 900px; }
.help-body h2 { font-size: 19px; }
.help-body h3 { font-size: 14.5px; margin: 22px 0 8px; }
.help-body h4 { font-size: 13.5px; margin: 16px 0 6px; color: var(--muted); }
.help-body p, .help-body li { line-height: 1.6; }
.help-body .lead { font-size: 15px; color: var(--text); }
.help-body ul, .help-body ol { padding-left: 22px; }
.help-body code { overflow-wrap: anywhere; font-size: 12.5px; background: var(--gray-soft); padding: 1px 5px; border-radius: 4px; }
.help-body a.button { text-decoration: none; }
.help-steps li { margin-bottom: 8px; }
.help-table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 13.5px; }
.help-table th, .help-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--border); border-bottom: 0; }
.help-table th { width: 30%; font-weight: 600; font-size: 13.5px; color: var(--text); background: none; }
.help-table thead th { font-size: 12px; color: var(--muted); background: var(--panel-2); width: auto; }
.help-table td p:first-child { margin-top: 0; } .help-table td p:last-child { margin-bottom: 0; } .help-table td ul { margin: 4px 0; }
.help-table.roles td, .help-table.roles thead th { text-align: center; width: 12%; }
.help-table.roles td:first-child { text-align: left; width: auto; }
.help-table tr.you td, .help-table tr.you th { background: var(--brand-soft); }
.help-yes { color: var(--green); font-weight: 700; } .help-no { color: var(--faint); }
.help-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.help-flow span { padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 13px; }
.help-flow i { color: var(--faint); font-style: normal; }
.help-note { border-left: 3px solid var(--brand); background: var(--panel-2); padding: 8px 12px; border-radius: 0 6px 6px 0; margin: 12px 0; font-size: 13.5px; }
.help-tag { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--amber-soft); color: var(--amber); white-space: nowrap; vertical-align: 1px; }
.help-tag.staff { background: var(--purple-soft); color: var(--purple); }
.help-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: baseline; }
.help-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.help-nav .button { white-space: normal; min-width: 0; text-align: left; } .help-nav .button:last-child { text-align: right; }
a.help-link { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; border-radius: 999px; color: var(--faint); vertical-align: 2px; }
a.help-link:hover, a.help-link:focus-visible { color: var(--brand); background: var(--brand-soft); text-decoration: none; }
a.help-link svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .help { grid-template-columns: minmax(0, 1fr); } .help-toc { position: static; flex-direction: row; flex-wrap: wrap; } .help-body { padding: 16px; } .help-table th { width: 38%; } }
@media (max-width: 560px) { .help-table.roles { font-size: 12.5px; } .help-table.roles th, .help-table.roles td { padding: 6px 4px; } }
@media print { .help-toc, .help-nav { display: none; } .help { display: block; } }
.pick-banner { margin: 0 0 12px; } .pick-banner a { white-space: nowrap; }

/* Activity: asset IDs listed under a bulk or asset group event */
.audit-assets { margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.audit-assets details { display: inline; }
.audit-assets summary { display: inline; cursor: pointer; color: var(--accent); margin-left: 4px; }
.audit-assets details[open] summary { display: block; margin: 2px 0 0; }

/* ---------- Run page (runs/detail.html) ----------
   Same head, hero and KPI tiles as the dashboard. Crypto uses are compact grid rows in collapsible
   groups (by outcome or by asset); a row opens to a details panel. Column heads stick while scrolling.
   Below 900px each row stacks into a small card with inline labels. */
.run-top .dt-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.run-top .dt-actions .button .icon, .run-top .dt-actions .button svg { width: 15px; height: 15px; }
.run-cancel { margin-bottom: 14px; }
.run-legend { margin: -4px 0 14px; font-size: 12px; color: var(--muted); }
.kpi-link { color: inherit; }
.kpi-link:hover { text-decoration: none; border-color: var(--border-strong); }
.kpi-n.bad { color: var(--red); }
.kpi-f.dl { white-space: normal; line-height: 1.35; }
.bdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rhead { display: block; margin-bottom: 10px; }
.rhead h2 { margin: 0 0 3px; }
.rhead .card-sub { margin: 0; }
.cnt { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; margin-left: 4px; border-radius: 999px; background: var(--gray-soft); color: var(--muted); font-size: 12px; font-weight: 600; vertical-align: 2px; }
.faint { color: var(--faint); }
.lbl { display: none; }
.dash-grid.g-1 { grid-template-columns: minmax(0, 1fr); }
.dash-grid > .card { min-width: 0; }
.badge .icon, .badge svg { width: 12px; height: 12px; }

/* crypto uses */
.uses-card { padding: 0; }
.rhead.uses-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px 4px; }
.uses-head h2 { margin: 0 0 6px; }
.uses-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 3px 12px; font-size: 12.5px; }
.ugroup { border-top: 1px solid var(--border); }
.ugroup > summary { list-style: none; }
.ugroup > summary::-webkit-details-marker, .urow > summary::-webkit-details-marker { display: none; }
.ug-head { display: flex; align-items: center; gap: 8px; padding: 10px 18px; cursor: pointer; color: var(--text); background: var(--panel-2); }
.ug-head:hover { background: var(--gray-soft); }
.ug-head b { font-size: 13.5px; }
.ug-name { color: var(--text); font-size: 13px; }
.ug-n { display: inline-grid; place-items: center; min-width: 22px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.ug-help { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-chev { display: inline-flex; color: var(--faint); transition: transform .15s; }
.u-chev svg { width: 15px; height: 15px; }
details[open] > summary .u-chev { transform: rotate(180deg); }
.ugrid { display: grid; grid-template-columns: minmax(110px, .9fr) minmax(140px, 1.3fr) 150px 92px 84px 84px 84px minmax(100px, .9fr) 18px; gap: 10px; align-items: center; padding: 8px 18px; }
.ucols { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--border); padding-top: 7px; padding-bottom: 7px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.urow { border-bottom: 1px solid var(--border); }
.urow:last-child { border-bottom: 0; }
.urow > summary { list-style: none; cursor: pointer; color: var(--text); font-size: 13px; }
.urow > summary:hover, .urow[open] > summary { background: var(--panel-2); }
.urow > summary:focus-visible, .ug-head:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ugrid > span { min-width: 0; }
.ugrid small, .a-main small, .a-team small, .run-facts small, .dl-t small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.u-id b { font-size: 12.5px; font-weight: 650; }
.u-alg { font-weight: 550; overflow-wrap: anywhere; }
.u-alg small { font-weight: 400; }
.u-res { display: flex; flex-wrap: wrap; gap: 4px; }
.u-res .badge { white-space: normal; line-height: 1.35; }
.qx { font-size: 12.5px; }
.qx-vulnerable { color: var(--red); }
.qx-resistant, .qx-mitigated { color: var(--green); }
.qx-unknown { color: var(--faint); }
.u-date { font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }
.u-rep { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.rchip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); font-size: 12px; white-space: nowrap; }
.rchip em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--amber); }
.rchip.big { white-space: normal; padding: 3px 9px; font-size: 12.5px; background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
.rmore { font-size: 12px; color: var(--muted); cursor: help; }
.udetail { padding: 4px 18px 14px 18px; background: var(--panel-2); }
.ufacts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.ufacts dt { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 4px; }
.ufacts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; font-size: 13px; align-items: center; }
.ufacts dd.txt { display: block; }
.rule { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.rule b { font-weight: 650; }

/* assets */
.alist { margin: 0 -18px -16px; }
.agrid { display: grid; grid-template-columns: 70px minmax(150px, 1.5fr) minmax(120px, 1.1fr) 118px minmax(120px, 1fr) 84px 88px 44px; gap: 10px; align-items: center; padding: 8px 18px; font-size: 13px; }
.acols { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--border); padding-top: 7px; padding-bottom: 7px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.arow { border-bottom: 1px solid var(--border); }
.arow:last-child { border-bottom: 0; }
.arow:hover { background: var(--panel-2); }
.arow:target { background: var(--brand-soft); }
.agrid > span { min-width: 0; }
.prio { width: 62px; }
.a-main b { font-size: 12.5px; }
.a-main small, .a-team small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-out { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; }
.a-st { font-size: 12.5px; color: var(--muted); }
.a-due { font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }
.a-uses { text-align: right; font-variant-numeric: tabular-nums; }

/* teams, downloads, run details */
.team-tbl th, .team-tbl td { padding: 7px 8px; font-size: 12.5px; }
.team-tbl th { white-space: nowrap; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); background: var(--panel); }
.team-tbl td.bad { color: var(--red); font-weight: 600; }
.tb-mix { width: 110px; }
.team-tbl .team-fill { height: 8px; border-radius: 4px; overflow: hidden; }
.dlist { list-style: none; margin: 0; padding: 0; }
.dlist li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 6px 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.dlist li:first-child { border-top: 0; padding-top: 2px; }
.dl-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.dl-ic svg { width: 16px; height: 16px; }
.dl-t b { font-size: 13px; font-weight: 600; }
.dl-a { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.dl-a a { padding: 2px 9px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dl-a a:hover { background: var(--gray-soft); text-decoration: none; }
.hash { overflow-wrap: anywhere; font-size: 11.5px !important; }
.run-facts dd small { margin-top: 1px; }

@media (max-width: 1180px) {
  .ugrid { grid-template-columns: minmax(110px, 1.1fr) minmax(100px, 1fr) 140px 90px 80px 84px 84px 18px; }
  .ugrid > .u-rep, .ucols > span:nth-child(8) { display: none; }
}
@media (max-width: 900px) {
  .ucols, .acols { display: none; }
  .lbl { display: inline; color: var(--faint); font-size: 11.5px; }
  .ugrid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id res" "alg alg" "meta meta"; gap: 4px 10px; padding: 10px 16px; }
  .ugrid > .u-id { grid-area: id; } .ugrid > .u-res { grid-area: res; justify-content: flex-end; } .ugrid > .u-alg { grid-area: alg; }
  .ugrid > .u-q, .ugrid > .u-risk, .ugrid > .u-date, .ugrid > .u-rep { grid-row: 3; display: inline-flex; align-items: center; gap: 4px; }
  .urow > summary.ugrid { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 4px; }
  .urow > summary.ugrid > .u-id { flex: 1 1 0; } .urow > summary.ugrid > .u-res { flex: 0 1 auto; } .urow > summary.ugrid > .u-alg { flex: 1 1 100%; }
  .urow > summary.ugrid > .u-chev { display: none; }
  .u-alg small, .u-risk small { display: inline; margin-left: 4px; }
  .ufacts { grid-template-columns: 1fr; }
  .udetail { padding: 4px 12px 12px; }
  .ug-head { padding: 10px 16px; }
  .ug-help { display: none; }
  .agrid { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "prio main uses" "out out out" "team team team"; gap: 4px 10px; padding: 10px 16px; }
  .arow { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 4px; align-items: center; }
  .arow > .a-prio { order: 0; } .arow > .a-main { flex: 1 1 55%; order: 1; } .arow > .a-uses { order: 2; }
  .arow > .a-out { order: 3; } .arow > .a-st { order: 4; } .arow > .a-risk { order: 5; } .arow > .a-due { order: 6; } .arow > .a-team { order: 7; flex: 1 1 100%; }
  .a-team small { display: inline; margin-left: 6px; }
  .alist { margin: 0 -18px -16px; }
}
@media print {
  .uses-tools, .u-chev { display: none !important; }
  .ucols, .acols { position: static; }
}

/* ---------- Asset history (runs/history.html) ----------
   Matrix of assets x runs, newest run first. Asset, Status today and Team are fixed on the left (sticky) while
   the run columns scroll sideways; on a phone only Asset stays fixed. Cells are tinted with the outcome colour. */
.hist-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.matrix { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.matrix th, .matrix td { white-space: nowrap; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; background: var(--panel); }
.matrix thead th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); background: var(--panel-2); vertical-align: bottom; }
.matrix tbody tr:hover > * { background: var(--panel-2); }
.matrix .fx { position: sticky; z-index: 2; }
.matrix .fx1 { left: 0; width: 210px; min-width: 210px; max-width: 210px; }
.matrix .fx2 { left: 210px; width: 104px; min-width: 104px; }
.matrix .fx3 { left: 314px; width: 160px; min-width: 160px; max-width: 160px; box-shadow: 6px 0 6px -6px rgba(16,24,40,.25); }
.matrix.no-team .fx2 { box-shadow: 6px 0 6px -6px rgba(16,24,40,.25); }
.matrix td.fx1 { overflow: hidden; text-overflow: ellipsis; }
.matrix td.fx1 small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.matrix .hid { font-weight: 650; font-size: 12.5px; }
.matrix .hteam { overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.matrix th.latest, .matrix td.latest { min-width: 116px; border-right: 2px solid var(--border-strong); }
.matrix th.run { text-transform: none; letter-spacing: 0; font-size: 12px; min-width: 118px; text-align: left; }
.matrix th.run a { font-weight: 600; font-family: var(--mono); font-size: 11.5px; }
.matrix th.run span { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.matrix th.run[data-newest] span { color: var(--brand); }
.matrix td.cell, .matrix td.latest { padding: 5px 8px; }
.hc { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; border-radius: 6px; color: var(--text); font-size: 12.5px; line-height: 1.3;
  background: color-mix(in srgb, var(--hc) 14%, transparent); border-left: 3px solid var(--hc); }
.hc .bdot { display: none; }
.hc b { font-weight: 600; }
.hc small { color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }
.hc small svg { width: 10px; height: 10px; }
a.hc:hover { text-decoration: none; outline: 2px solid var(--brand); outline-offset: -1px; }
a.hc:focus-visible { outline: 2px solid var(--brand); outline-offset: -1px; }
.td-latest .hc b, .matrix td.latest .hc b { font-weight: 700; }
.hc-ni, .matrix td.ni { color: var(--faint); font-style: italic; font-size: 12px; }
.matrix tr.team > * { background: var(--gray-soft); color: var(--text); font-size: 12.5px; font-weight: 650; text-transform: none; letter-spacing: 0; }
.hist-legend { margin: 0; }
@media (max-width: 760px) {
  .matrix .fx { position: static; }
  .matrix .fx1 { position: sticky; left: 0; width: 150px; min-width: 150px; max-width: 150px; box-shadow: 6px 0 6px -6px rgba(16,24,40,.25); }
  .matrix .fx3, .matrix.no-team .fx2 { box-shadow: none; }
}
@media print { .matrix .fx { position: static; box-shadow: none; } .hist-wrap { overflow: visible; } }

/* Time zone picker (organisation settings, new organisation) */
.tz-pick { display: grid; gap: 6px; }
.tz-pick select { width: 100%; }
.tz-pick .tz-find { width: 100%; }
details.tz-edit { margin-top: 6px; }
details.tz-edit summary { cursor: pointer; color: var(--accent, inherit); }
details.tz-edit form { margin-top: 8px; max-width: 520px; }

/* ---------- theme switch (Light / Dark / System) and account menu stacking ---------- */
/* The sidebar is sticky, which makes it its own stacking layer; without a z-index, later sticky blocks in the page
   (Help topic list, list column headers) painted over the account menu that opens out of it. */
.shell > .sidebar { z-index: 50; }
@media (max-width: 760px) { .shell > .sidebar { position: relative; } }
.theme-switch { display: none; }
html.js .theme-switch { display: flex; }
.am-theme { align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12.5px; }
.am-theme > span { color: var(--muted); }
.theme-seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 7px; background: var(--gray-soft); }
.theme-seg button { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 8px; border: 0; border-radius: 5px;
  background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; box-shadow: none; min-height: 0; }
.theme-seg button:hover { color: var(--text); background: none; }
.theme-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.theme-seg button:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.login-foot .theme-switch { display: none; }
html.js .login-foot .theme-switch { display: inline-flex; vertical-align: middle; margin-left: 8px; }

/* Reference data pull card (0.14.7): top of Reference data and Platform admin overview, platform admins only.
   Brand tint; amber when a newer release is waiting or nothing has been pulled yet. */
.pull-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 18px;
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); border-left: 4px solid var(--brand);
  border-radius: 10px; }
.pull-card.attn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); border-left-color: var(--amber); }
.pull-card .pc-main { flex: 1 1 420px; min-width: 0; }
.pull-card .pc-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; color: var(--text); }
.pull-card .pc-title .icon { width: 17px; height: 17px; color: var(--brand); }
.pull-card.attn .pc-title .icon { color: var(--amber); }
.pull-card .pc-items { display: flex; flex-wrap: wrap; margin-top: 8px; font-size: 13px; line-height: 1.3; }
.pull-card .ci { display: flex; flex-direction: column; gap: 2px; padding: 0 16px; }
.pull-card .ci:first-child { padding-left: 0; }
.pull-card .ci + .ci { border-left: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); }
.pull-card.attn .ci + .ci { border-left-color: color-mix(in srgb, var(--amber) 28%, transparent); }
.pull-card .ci > small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); opacity: .85; }
.pull-card.attn .ci > small { color: var(--amber); }
.pull-card .ci > b { font-weight: 650; font-size: 14px; color: var(--text); white-space: nowrap; }
.pull-card .pc-help { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.pull-card .pc-error { margin: 8px 0 0; font-size: 12.5px; }
.pull-card .pc-action { margin: 0; }
.pull-card .pull-button { padding: 11px 24px; font-size: 15px; font-weight: 650; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 39, 71, .18), 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent); }
.pull-card .pull-button .icon { width: 17px; height: 17px; }
@media (max-width: 640px) {
  .pull-card { padding: 12px 14px; gap: 12px; }
  .pull-card .pc-action, .pull-card .pull-button { width: 100%; }
  .pull-card .pc-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .pull-card .ci, .pull-card .ci:first-child { padding: 0; }
  .pull-card .ci + .ci { border-left: 0; }
  .pull-card .ci > b { white-space: normal; }
}
