/* EPiC – calm, accessible, colour-blind-safe palette (muted Okabe–Ito). Status never by colour alone. */
@font-face {
  font-family: "Inter";
  src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --navy: #24364b; --navy-2: #3b5a7a; --ink: #2b3544; --muted: #606b78; --line: #e3e7ec; --bg: #f4f6f8; --card: #fff;
  --accent: #c9a45a;
  --pass: #2e7a5f; --pass-bg: #e8f4ee; --watch: #82601a; --watch-bg: #fbf4e3; --fail: #a8423a; --fail-bg: #fbeeec;
  --na: #606b78; --na-bg: #eff2f5;
  --c1: #44729f; --c2: #d6a24a; --c3: #82b6d6; --c4: #a7b0ba;
  --tint: #eef3f8; --tint-line: #d3deea; --field: #cfd6de; --head-text: #d5dee9; --soft-text: #3d4855;
  --watch-line: #ecd39b; --pass-line: #b5dcc9; --fail-line: #efc3be; --fail-row: #fdf6f5;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(36, 54, 75, .04), 0 1px 4px rgba(36, 54, 75, .05);
  --shadow-hover: 0 6px 18px rgba(36, 54, 75, .09);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--c1); text-underline-offset: 2px; }
a:hover { color: var(--navy-2); }
a:focus-visible, button:focus-visible, select:focus-visible, .tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
header.top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 28px; height: 44px; box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 10px rgba(36, 54, 75, .12); }
header.top .brand { font-weight: 700; font-size: 16px; letter-spacing: .3px; color: #fff; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: baseline; }
header.top .brand .brand-logo { display: block; height: 20px; width: auto; padding-right: 10px; margin-right: 10px; border-right: 1px solid rgba(255, 255, 255, .28); }
header.top .brand:hover { color: #fff; text-decoration: none; }
header.top .brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
header.top .brand span { color: inherit; }
header.top .brand span.i { color: var(--accent); }
header.top nav a { color: var(--head-text); text-decoration: none; padding: 10px 11px; display: inline-block; border-bottom: 2px solid transparent; font-weight: 500; transition: color .15s, border-color .15s; }
header.top nav a.on, header.top nav a:hover { color: #fff; border-bottom-color: var(--accent); }
header.top .right { margin-left: auto; display: flex; gap: 14px; align-items: center; color: var(--head-text); font-size: 13px; }
header.top button.link { background: none; border: 0; color: var(--head-text); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
header.top button.link:hover { color: #fff; background: none; }
main { padding: 26px 28px 56px; max-width: 1480px; margin: 0 auto; }
h1 { font-size: 23px; font-weight: 650; margin: 0 0 4px; color: var(--navy); letter-spacing: -.2px; }
h2 { font-size: 14px; font-weight: 650; margin: 0 0 12px; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; }
.sub { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 14px 0 20px; }
.toolbar label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 5px; font-weight: 500; }
select, input[type=text], textarea { font: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid var(--field); border-radius: var(--radius-sm); background: #fff; min-width: 220px; transition: border-color .15s, box-shadow .15s; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--c1); box-shadow: 0 0 0 3px rgba(68, 114, 159, .15); }
button, .btn { font: inherit; font-weight: 500; background: var(--navy-2); color: #fff; border: 1px solid var(--navy-2); border-radius: var(--radius-sm); padding: 7px 15px; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s, border-color .15s, box-shadow .15s; }
button:hover, .btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
button.link { background: none; border: 0; padding: 0; color: var(--c1); text-decoration: underline; text-underline-offset: 2px; font-weight: 400; }
button.link:hover { background: none; color: var(--navy-2); }
button.secondary, .btn.secondary { background: #fff; color: var(--navy-2); border: 1px solid var(--tint-line); }
button.secondary:hover, .btn.secondary:hover { background: var(--tint); color: var(--navy); border-color: var(--tint-line); }
.pill { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 11px; border-radius: 99px; background: var(--na-bg); color: var(--ink); border: 1px solid var(--line); }
.pill.prov { background: var(--watch-bg); border-color: var(--watch-line); }
.pill.frozen { background: var(--tint); border-color: var(--tint-line); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g2, .g3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tiles.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tiles.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { border: 1px solid var(--line); border-left: 4px solid var(--na); border-radius: 10px; padding: 12px 14px; background: #fff; cursor: pointer; text-align: left; color: var(--ink); width: 100%; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.tile:hover { box-shadow: var(--shadow-hover); background: #fff; color: var(--ink); border-color: var(--line); transform: translateY(-1px); }
.tile .lbl { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.tile .val { font-size: 24px; font-weight: 650; margin: 3px 0 4px; color: var(--navy); font-variant-numeric: tabular-nums; }
.tile .info { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tile.s-pass, .tile.s-pass:hover { border-left-color: var(--pass); } .tile.s-watch, .tile.s-watch:hover { border-left-color: var(--accent); }
.tile.s-fail, .tile.s-fail:hover { border-left-color: var(--fail); border-color: var(--fail-line); background: var(--fail-row); }
.tile.s-na:hover { border-left-color: var(--na); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.badge.s-pass { background: var(--pass-bg); color: var(--pass); } .badge.s-watch { background: var(--watch-bg); color: var(--watch); }
.badge.s-fail { background: var(--fail-bg); color: var(--fail); } .badge.s-na { background: var(--na-bg); color: var(--na); }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8f9fb; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.cell { white-space: nowrap; }
td.cell.s-fail { background: var(--fail-bg); } td.cell.s-watch { background: var(--watch-bg); } td.cell.s-pass { background: var(--pass-bg); }
tr.org td { font-weight: 650; border-top: 2px solid var(--tint-line); background: var(--tint); }
tr.pending-bug td { background: var(--fail-row); }
tr.pending-bug td:first-child { border-left: 3px solid var(--fail); }
.chart { width: 100%; height: 260px; }
.chart.tall { height: 320px; }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto auto; gap: 5px 16px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.notice { padding: 11px 15px; border-radius: 10px; background: var(--watch-bg); border: 1px solid var(--watch-line); margin: 10px 0; }
.notice.info { background: var(--tint); border-color: var(--tint-line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a:hover { color: var(--navy); }
.tabs a.on { color: var(--navy); border-bottom-color: var(--accent); font-weight: 600; }
#drawer { position: fixed; top: 0; right: 0; width: min(760px, 96vw); height: 100vh; background: #fff; box-shadow: -10px 0 32px rgba(36, 54, 75, .14); transform: translateX(105%); transition: transform .2s ease; z-index: 20; display: flex; flex-direction: column; border-radius: 14px 0 0 14px; }
#drawer.open { transform: none; }
#drawer .head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
#drawer .body { overflow: auto; padding: 0 0 20px; }
.stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--na-bg); min-width: 180px; }
.stack span { display: block; height: 100%; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.login { max-width: 420px; margin: 10vh auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- Admin area */
.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: start; }
.admin-nav { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.admin-nav a { color: var(--ink); text-decoration: none; padding: 7px 10px; border-radius: var(--radius-sm); border-left: 3px solid transparent; }
.admin-nav a:hover { background: var(--bg); color: var(--navy); }
.admin-nav a.on { background: var(--tint); color: var(--navy); font-weight: 600; border-left-color: var(--accent); }
.admin-nav a.back { color: var(--c1); font-size: 13px; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; padding-bottom: 10px; }
.admin-nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 12px 10px 4px; font-weight: 600; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .admin-nav .grp { display: none; }
  .admin-nav a.back { width: 100%; }
}
.admin-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.admin-main > .grid, .admin-main > section, .admin-main > form { margin-top: 0 !important; }
.crumbs { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs > * + *::before { content: "\203A"; margin-right: 6px; color: var(--c4); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
h2 .count { font-size: 12px; background: var(--na-bg); color: var(--muted); border-radius: 99px; padding: 1px 8px; margin-left: 6px; letter-spacing: 0; }
.msgs .notice { margin: 0 0 8px; }
.notice.ok { background: var(--pass-bg); border-color: var(--pass-line); color: #1f5a45; }
.notice.err { background: var(--fail-bg); border-color: var(--fail-line); color: #7f2e27; }
.notice ul.errorlist { margin: 0; padding-left: 18px; }
.ok-text { color: var(--pass); } .err-text { color: var(--fail); }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--na-bg); border-radius: 10px; padding: 13px 15px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
a.stat:hover { box-shadow: var(--shadow-hover); color: var(--ink); transform: translateY(-1px); }
.stat .lbl { font-size: 12px; color: var(--muted); }
.stat .val { font-size: 22px; font-weight: 650; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 11.5px; color: var(--muted); }
.stat.s-pass { border-left-color: var(--pass); } .stat.s-watch { border-left-color: var(--accent); } .stat.s-fail { border-left-color: var(--fail); }
.stat.s-na { border-left-color: var(--na); }

/* jobs */
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.job { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fafbfc; }
button:disabled, button:disabled:hover { opacity: .55; cursor: not-allowed; }

/* tables, filters, paging */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap table th, .table-wrap table td { border-bottom-color: #edf0f3; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap.short { max-height: 320px; overflow-y: auto; }
table.compact td { padding: 7px 9px; }
tbody tr:hover td { background: #f7f9fb; }
tr.inactive td { color: var(--muted); }
td.empty, p.empty { color: var(--muted); text-align: center; padding: 24px 10px; }
td.center { text-align: center; } td.right, .right { text-align: right; } .nowrap { white-space: nowrap; }
details summary { cursor: pointer; }
details pre { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin: 6px 0 0; font-size: 12px; max-height: 300px; overflow: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 14px; }
.filters label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 5px; font-weight: 500; }
.filters select, .filters input { min-width: 180px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin: 14px 0 0; }
code { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }

/* buttons */
button.sm, .btn.sm { padding: 4px 11px; font-size: 12.5px; }
button.danger, .btn.danger { background: #fff; color: var(--fail); border: 1px solid var(--fail-line); }
button.danger:hover, .btn.danger:hover { background: var(--fail-bg); color: var(--fail); border-color: var(--fail-line); }
form.inline { display: inline; }

/* chips and roles */
.chip { display: inline-block; font-size: 12px; padding: 2px 10px; margin: 2px 4px 2px 0; border-radius: 99px; background: var(--tint); color: var(--navy); border: 1px solid var(--tint-line); }
.chip.off { background: var(--na-bg); color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.chip.link, button.chip { cursor: pointer; text-decoration: none; font: inherit; font-size: 12px; }
.chip.link:hover, button.chip:hover { background: #e2eaf3; color: var(--navy); border-color: var(--tint-line); }
.chips { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.role { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--na-bg); }
.role.r-admin { background: var(--fail-bg); color: #7f2e27; }
.role.r-senior_leader, .role.r-executive { background: var(--tint); color: var(--navy); }
.role.r-em, .role.r-pm { background: var(--pass-bg); color: #1f5a45; }

/* forms */
.form-page { display: flex; flex-direction: column; gap: 18px; }
.form-page.narrow { max-width: 640px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-grid .field { margin-bottom: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.field.check { justify-content: center; }
.field.check label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.field input:not([type=checkbox]), .field select, .field textarea { width: 100%; min-width: 0; }
.field .help { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--fail); margin-top: 2px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--fail); }
.req { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
input[type=number], input[type=date], input[type=email], input[type=search] { font: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid var(--field); border-radius: var(--radius-sm); background: #fff; }
input.num-input { width: 72px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy-2); }
.form-table td { vertical-align: middle; }
.form-table input[type=text] { width: 100%; min-width: 220px; }
.form-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.form-actions label.grow { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; min-width: 260px; }
.form-actions label.grow input { width: 100%; }
.stack-form { display: flex; flex-direction: column; gap: 10px; }
.stack-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; }
.stack-form select, .stack-form input { width: 100%; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.check-card { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: pointer; transition: background .15s, border-color .15s; }
.check-card:hover { background: #fafbfc; }
.check-card:has(input:checked) { border-color: var(--tint-line); background: var(--tint); }
.role-help { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 8px 0 0; padding: 11px 13px; background: var(--bg); border-radius: 10px; }
.role-help dt { font-weight: 600; } .role-help dd { margin: 0 0 6px; color: var(--muted); }
textarea.code { width: 100%; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; line-height: 18px; tab-size: 2; resize: vertical; }
.diff .old { color: var(--fail); text-decoration: line-through; } .diff .new { color: var(--pass); font-weight: 600; }

/* toggle switch (team active) */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cad2db; border-radius: 99px; cursor: pointer; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.switch input:checked + span { background: var(--pass); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Phase 2 / 3 */
.obs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.obs { border: 1px solid var(--line); border-left: 4px solid var(--c4); border-radius: 10px; padding: 13px 15px; background: #fff; box-shadow: var(--shadow); }
.obs.s-pass { border-left-color: var(--pass); } .obs.s-watch { border-left-color: var(--accent); } .obs.s-fail { border-left-color: var(--fail); }
.obs-head { display: flex; align-items: center; gap: 8px; }
.obs-cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.obs h3 { font-size: 14px; font-weight: 600; margin: 8px 0 6px; line-height: 1.4; color: var(--navy); }
.obs-figs { margin: 0 0 6px 16px; padding: 0; font-size: 12.5px; color: var(--soft-text); }
.obs-recs { font-size: 12.5px; background: #f7f9fb; border-radius: var(--radius-sm); padding: 7px 11px; }
.obs-recs ul { margin: 4px 0 0 16px; padding: 0; }
.sub-h { font-size: 13px; font-weight: 600; margin: 18px 0 6px; color: var(--navy); }
.exports { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.exports a { white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; background: #fff; box-shadow: var(--shadow); }
.kpi .v { font-size: 24px; font-weight: 650; margin: 4px 0; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi .q { font-size: 12px; color: var(--muted); }
.kpi.s-pass { border-top: 3px solid var(--pass); } .kpi.s-watch { border-top: 3px solid var(--accent); } .kpi.s-fail { border-top: 3px solid var(--fail); }
.search-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.search-layout form.filters-col label { display: block; margin-bottom: 8px; font-size: 12.5px; }
.search-layout form.filters-col select, .search-layout form.filters-col input { width: 100%; box-sizing: border-box; }
.saved li { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
iframe.email-preview { width: 100%; min-height: 900px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }
a.kpi { color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.kpi:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); color: var(--ink); }
a.kpi:hover .q:first-child { color: var(--c1); text-decoration: underline; text-underline-offset: 2px; }
/* Wide content (tables, charts) never spills into the neighbouring column */
.grid > * { min-width: 0; }
.grid > .card { overflow-x: auto; }
td.cell .badge { margin-left: 4px; }

/* ---------------------------------------------------------------- Calmer reading (visual only)
   Status lives in the ✓ / ! / ✕ badges; cells and tiles only carry a faint wash, so a page
   full of Fails is still easy on the eyes. */
:root { --pass-wash: #f2f8f5; --watch-wash: #fdf9ef; --fail-wash: #fdf5f4; }
body { font-size: 14.5px; background: linear-gradient(180deg, #eef2f6 0, var(--bg) 260px) no-repeat, var(--bg); }
header.top { background: linear-gradient(180deg, #2a3d54 0, var(--navy) 100%); }
h1 { font-size: 24px; }
h2 { text-transform: none; letter-spacing: 0; font-size: 15.5px; font-weight: 650; color: var(--navy); }
.card { border-color: #e7ebef; padding: 20px 22px; }
td.cell.s-fail { background: var(--fail-wash); } td.cell.s-watch { background: var(--watch-wash); } td.cell.s-pass { background: var(--pass-wash); }
.tile.s-fail, .tile.s-fail:hover { background: #fff; border-color: var(--line); }
tr.pending-bug td { background: var(--fail-wash); }
th { background: #f7f9fb; color: #5b6673; font-weight: 600; letter-spacing: .1px; }
th, td { border-bottom-color: #eceff3; }
.table-wrap { border-color: #e7ebef; }
.badge { font-weight: 600; padding: 2px 9px; }
.badge.s-pass { background: #e6f3ec; } .badge.s-watch { background: #faf0d9; } .badge.s-fail { background: #f9e6e4; }
.notice { border-radius: 10px; }
.tile .val, .stat .val, .kpi .v { letter-spacing: -.3px; }
::selection { background: #d9e6f3; }
.tile.s-fail, .tile.s-fail:hover { border-left-color: var(--fail); } /* FR-27: Fail stays visibly flagged */

/* ---------------------------------------------------------------- Chart expand / collapse */
.chart-box { position: relative; }
.chart-ctl { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 0 0 4px; }
.chart-ctl .chart-title { display: none; margin-right: auto; font-weight: 650; color: var(--navy); font-size: 15.5px; }
.chart-ctl button { padding: 2px 10px; font-size: 12px; }
.chart-box.max { position: fixed; inset: 4vh 4vw; z-index: 41; background: #fff; border-radius: 14px; padding: 18px 22px;
  box-shadow: 0 20px 60px rgba(36, 54, 75, .25); display: flex; flex-direction: column; }
.chart-box.max .chart-title { display: block; }
.chart-box.max .chart { flex: 1; height: auto !important; min-height: 0; }
.chart-backdrop { position: fixed; inset: 0; background: rgba(36, 54, 75, .35); z-index: 40; backdrop-filter: blur(2px); }
.chart-backdrop[hidden] { display: none; }

/* ---------------------------------------------------------------- Settings form editor */
.settings-tabs { flex-wrap: wrap; }
.settings-tabs a { padding: 8px 12px; font-size: 13.5px; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 20px; align-items: start; }
.sf-grid .field { margin: 0; }
.sf-grid .field.wide { grid-column: 1 / -1; }
.sf-grid textarea { width: 100%; font: inherit; }
.sf-grid textarea.code { font-family: "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.sf-group { grid-column: 1 / -1; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--navy); }
.sf-group.d1:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.sf-group.d2 { border-top: 0; padding-top: 2px; font-size: 13px; color: var(--soft-text); }
.sf-group.d3, .sf-group.d4 { border-top: 0; padding-top: 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.sf-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; padding-top: 22px; }
.sf-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- Admin → Azure DevOps token */
.token-kv { grid-template-columns: 200px 1fr; }
.token-kv dd { text-align: left; }
.token-form { max-width: 560px; }
.token-form input[type=password], .token-form input[type=date], .token-form input[type=text] { width: 100%; font: inherit; color: var(--ink); padding: 7px 10px; border: 1px solid var(--field); border-radius: var(--radius-sm); background: #fff; }
/* Chart info (ⓘ), top right of the chart title like the sprint tiles */
.has-ci { display: flex; align-items: center; gap: 8px; }
.ci { position: relative; display: inline-flex; flex: none; margin-left: auto; }
.ci-btn { font: 600 11px/1 Inter, "Segoe UI", sans-serif; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 50%;
  width: 16px; height: 16px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: help; text-transform: none; }
.ci-btn:hover, .ci-btn:focus-visible, .ci:hover .ci-btn { color: var(--navy); border-color: var(--navy-2); background: var(--tint); }
.ci-pop { display: none; position: absolute; right: -8px; top: 24px; z-index: 30; width: min(340px, 80vw); background: var(--navy); color: #fff;
  font: 400 12.5px/1.5 Inter, "Segoe UI", sans-serif; text-transform: none; letter-spacing: 0; text-align: left; white-space: normal;
  padding: 10px 12px; border-radius: 8px; box-shadow: 0 8px 24px rgba(36, 54, 75, .22); }
.ci-pop::before { content: ""; position: absolute; top: -6px; right: 10px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--navy); }
.ci-pop b { display: block; margin-bottom: 3px; font-weight: 600; color: #fff; }
.ci-pop .t { display: block; margin-top: 6px; font-size: 11.5px; color: var(--head-text); }
.ci:hover .ci-pop, .ci:focus-within .ci-pop { display: block; }
.ci.hide .ci-pop { display: none; }
