/* awscloudreports.com AWS Report # 1: the AD Report # 1 style (soft neumorphic cream + deep teal), cut down for AWS */
/* Fonts are self-hosted in site/shared/fonts (SIL Open Font License, OFL-*.txt there): no requests to a third party. */
@font-face { font-family: "Manrope"; src: url("../../../shared/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../../../shared/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --ground: #E9E2D5;
  --surface: #F1ECE3;
  --well: #ECE6DB;
  --track: #E3DCCE;
  --primary: #0E4F4F;
  --primary-dark: #0A3838;
  --teal-2: #2F8A7E;
  --ink: #26231E;
  --ink-2: #3B362E;
  --muted: #6A6255;
  --rule: rgba(160, 146, 120, .24);

  --pass-bg: #D5E3DD; --pass-fg: #0B4743;
  --warn-bg: #F1DFC0; --warn-fg: #7A4E0B; --warn-strong: #8A5A0F;
  --fail-bg: #F2D3CB; --fail-fg: #8E2A1E; --fail-strong: #9A2F22;
  --info-bg: #DCE3EC; --info-fg: #2F4A68; --info-strong: #3D5A80;
  --fail-solid: #B5452F; --warn-solid: #C98A2B; --info-solid: #5C7896;

  /* categorical chart palette: fixed order, validated (lightness, chroma, CVD, contrast) on --surface */
  /* muted palette for bar charts (one colour per bar) */
  --m1: #5E9F97; --m2: #C99567; --m3: #7E95C4; --m4: #A97FA3; --m5: #9AA25C; --m6: #7FA0AE;
  --c1: #008A7E; --c2: #D27A2C; --c3: #3F6FC4; --c4: #A24F96; --c5: #7C8C1F; --c-other: #A79E8E;
  /* status colours: reserved for state, always shown with a label */
  --s-good: #0E4F4F; --s-warn: #C98A2B; --s-bad: #B5452F; --s-info: #5C7896;
  --r-emea: var(--c1); --r-apac: var(--c2); --r-na: var(--c3); --r-latam: var(--c4);
  --alert-red: #E0261B;

  --sh-raised: 8px 8px 20px rgba(160,146,120,.38), -8px -8px 20px rgba(255,253,248,.95);
  --sh-control: 4px 4px 10px rgba(160,146,120,.34), -4px -4px 10px rgba(255,253,248,.9);
  --sh-small: 3px 3px 8px rgba(160,146,120,.32), -3px -3px 8px rgba(255,253,248,.9);
  --sh-inset: inset 3px 3px 7px rgba(160,146,120,.42), inset -3px -3px 7px rgba(255,253,248,.9);
  --sh-inset-sm: inset 2px 2px 5px rgba(160,146,120,.4), inset -2px -2px 5px rgba(255,253,248,.9);
  --sh-primary: 4px 4px 10px rgba(14,79,79,.32), -4px -4px 10px rgba(255,253,248,.9);

  --link: #0E4F4F; --link-hover: #0A3838;
  --tint: #D9E9E5; --field: #FFF8EA; --edge: rgba(255,255,255,.6);
  --row-hover: rgba(255,253,248,.45); --row-open: rgba(255,253,248,.55);
  --teal-rgb: 14,79,79; --shade-rgb: 14,79,79; --lo-rgb: 160,146,120; --lo-a: 1; --hi-rgb: 255,253,248; --hi-a: 1;
  --tip-bg: #26231E; --tip-edge: transparent;
  --yes-bg: #D3ECDA; --yes-fg: #1B7A40; --no-bg: #E6E1D8; --no-fg: #7D7466;
  --sea: #DCE6E6; --land: #EFE9DF; --land-edge: #A99E89; --land-edge-strong: #6F6555; --land-dim: #E6DFD3;
  --hub-line: #4A4337; --repl-ok: #2E6B66; --map-ring: #FFFFFF; --halo: rgba(255,253,248,.9);
  --topo-bg: #EFE8DA; --topo-land: #E4DCCB; --topo-land-edge: #CDBFA6; --topo-node: rgba(246,242,234,.94); --glass: rgba(246,242,234,.9);
  color-scheme: light;

  --font: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
button, input, select { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.layout { min-height: 100vh; padding: 24px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.layout > .sidebar { flex: 1 1 260px; max-width: 100%; }
.layout > main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 900px) { .layout > .sidebar { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; } }
@media (max-width: 600px) { .layout { padding: 16px; gap: 20px; } }

/* ---------- sidebar (menu A) ---------- */
.sidebar { background: var(--surface); border-radius: 24px; padding: 22px 16px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--sh-raised); border: 1px solid var(--edge); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--primary); display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-primary); flex-shrink: 0; }
.brand-name { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.menu-toggle { display: none; min-height: 44px; padding: 0 14px; border: none; border-radius: 12px; background: var(--well); box-shadow: var(--sh-inset); font-weight: 700; font-size: 13px; cursor: pointer; align-items: center; gap: 8px; }
.forest-chip { display: flex; flex-direction: column; gap: 1px; padding: 9px 14px; border-radius: 12px; background: var(--well); box-shadow: var(--sh-inset); font-size: 13px; font-weight: 700; }
.forest-chip small { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.nav-collapsible { display: flex; flex-direction: column; gap: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-group-label { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 4px 14px 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .09em; color: var(--ink-2); cursor: pointer; border-radius: 10px; }
.nav-group-label:hover { color: var(--ink); background: var(--well); }
.nav-group-label:focus-visible { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: 0; }
.nav-group-label .chev { flex: none; color: var(--muted); transition: transform .18s; }
.nav-group.folded .nav-group-label .chev { transform: rotate(-90deg); }
.nav-group.folded .nav-item { display: none; }
/* a folded section that holds the page you are on: its heading is tinted so you can still see where you are */
.nav-group.folded:has(.nav-item[aria-current="page"]) .nav-group-label { color: var(--link); background: rgba(var(--teal-rgb), .1); }
.nav-group.folded .freshness { display: none; }
.nav-group .freshness { margin-top: 6px; }
.rail-toggle { display: none; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border: none; border-radius: 11px; background: var(--well); box-shadow: var(--sh-inset-sm); color: var(--link); cursor: pointer; }
.rail-toggle:hover { color: var(--ink); }
.rail-toggle svg { transition: transform .2s; }
@media (min-width: 900px) {
  .rail-toggle { display: inline-flex; }
  /* collapsed: an icon rail */
  .layout.nav-rail > .sidebar { flex: 0 0 auto; width: 84px; padding: 18px 12px; align-items: center; }
  .nav-rail .forest-row { justify-content: center; }
  .nav-rail .forest-row .rail-toggle { width: 38px; height: 38px; }
  .nav-rail .brand { padding: 0; }
  .nav-rail .brand > span:not(.brand-mark), .nav-rail .forest-chip, .nav-rail .freshness, .nav-rail .nav-item span.label { display: none; }
  .nav-rail .rail-toggle svg { transform: rotate(180deg); }
  .nav-rail .nav-collapsible { align-items: center; gap: 10px; }
  .nav-rail .nav-group { align-items: center; padding-top: 10px; border-top: 1px solid var(--rule); }
  .nav-rail .nav-group:first-of-type { border-top: 0; padding-top: 0; }
  .nav-rail .nav-group-label { display: none; }
  .nav-rail .nav-group.folded .nav-item { display: flex; }
  .nav-rail .nav-item { position: relative; width: 48px; justify-content: center; padding: 10px 0; }
  .nav-rail .nav-badge { position: absolute; top: 3px; right: 1px; min-width: 8px; padding: 1px 5px; font-size: 9.5px; }
}
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 44px; border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background .15s, box-shadow .15s; }
.nav-item:hover { background: var(--well); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.nav-item svg { flex-shrink: 0; }
.nav-item span.label { flex-grow: 1; }
.nav-badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.nav-badge.fail { background: var(--fail-bg); color: var(--fail-fg); }
.nav-badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.freshness { padding: 14px; border-radius: 16px; background: var(--well); display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh-inset); font-size: 12px; }
.freshness .head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--link); }
.freshness .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.freshness .when { font-size: 13px; font-weight: 700; color: var(--ink); }
@media (max-width: 899px) {
  .menu-toggle { display: inline-flex; }
  .sidebar[data-open="false"] .nav-collapsible { display: none; }
}

/* ---------- page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 6px; }
.page-head .titles { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.crumbs { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--muted); padding: 7px 14px; border-radius: 10px; background: var(--surface); box-shadow: var(--sh-small); }
.crumbs b { color: var(--ink); font-weight: 800; }
.crumbs .sep { opacity: .6; margin: 0 4px; }
h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { margin: 0; font-size: 14px; color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 600px) { h1 { font-size: 26px; } }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: none; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--link); box-shadow: var(--sh-control); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 12px; }
.btn:active { box-shadow: var(--sh-inset); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--well); box-shadow: var(--sh-inset); }
.search input { border: none; background: transparent; outline: none; font-size: 13px; width: 200px; min-width: 0; }
.search:focus-within { box-shadow: var(--sh-inset), 0 0 0 2px rgba(var(--shade-rgb), .35); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 14px; background: var(--well); box-shadow: var(--sh-inset); }
.seg button { min-height: 36px; padding: 0 14px; border: none; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--primary); color: #fff; box-shadow: 3px 3px 8px rgba(var(--shade-rgb), .3); }
.seg button .n { opacity: .7; font-weight: 600; margin-left: 2px; }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--sh-raised); border: 1px solid var(--edge); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.card h2 { margin: 0; font-size: 17px; font-weight: 800; }
.card h2 .count { color: var(--muted); font-weight: 600; }
.card-link { font-size: 12px; font-weight: 700; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.row > * { flex: 1 1 300px; }
.row > .wide { flex: 2 1 520px; }
.row > .wider { flex: 3 1 560px; }
@media (max-width: 600px) { .card { padding: 18px; border-radius: 18px; } .grid-auto { grid-template-columns: minmax(0, 1fr); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 20px; background: var(--surface); text-decoration: none; color: var(--ink); box-shadow: var(--sh-raised); border: 1px solid var(--edge); }
a.tile:hover { color: var(--ink); box-shadow: var(--sh-control); }
.tile .label, .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.tile .value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--link); }
.tile .value.warn { color: var(--warn-strong); }
.tile .value.fail { color: var(--fail-strong); }
.tile .value.info { color: var(--info-strong); }
.tile .sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.tiles.with-charts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.tile-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-main > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-self: flex-start; } /* the figure stays at the top, level with the other tiles, whatever the chart beside it */
.tile-chart { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.mini-stack { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--track); }
.mini-stack > span { display: block; height: 100%; min-width: 3px; }
.mini-stack > span:first-child { border-radius: 999px 0 0 999px; }
.mini-stack > span:last-child { border-radius: 0 999px 999px 0; }
.mini-stack > span:only-child { border-radius: 999px; }
.mini-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.mini-legend li { display: inline-flex; align-items: center; gap: 5px; }
.mini-legend i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.mini-legend b { color: var(--ink); font-weight: 800; }
.mini-donut { flex-shrink: 0; }
.mini-donut circle { transition: stroke-width .15s; }
.mini-donut circle:hover { stroke-width: 9; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 62px; }
.mini-bars .col em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--ink-2); }
.mini-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; min-width: 0; }
.mini-bars .col span.b { width: 100%; max-width: 26px; background: var(--c1); border-radius: 4px 4px 0 0; min-height: 2px; }
.mini-bars .col small { font-size: 10px; color: var(--muted); font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; line-height: 1.35; }
.mini-bars:has(.col:nth-child(11)) { gap: 2px; }
.tile-go .mini-bars:has(.col:nth-child(11)) { margin-right: 16px; }
/* compact tiles: four on a row, shorter (Data Collection page) */
.tiles.tiles-compact { grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) { .tiles.tiles-compact { grid-template-columns: 1fr 1fr; } }
/* wide: one row, the bar chart tile gets the extra width */
@media (min-width: 1280px) { .tiles.tiles-compact { grid-template-columns: 1fr 1.55fr 1fr 1.25fr; } }
.tiles-compact .tile { padding: 14px 16px 12px; gap: 4px; border-radius: 16px; }
.tiles-compact .tile .value { font-size: 26px; }
.tiles-compact .tile-main { gap: 8px; }
.tiles-compact .mini-donut { width: 50px; height: 50px; }
.tiles-compact .tile-chart { gap: 6px; margin-top: 2px; }
.tiles-compact .mini-legend { gap: 2px 10px; font-size: 11px; }
.tiles-compact .mini-bars { height: 58px; gap: 2px; }
.tiles-compact .mini-bars .col { gap: 2px; }
.tiles-compact .mini-bars .col em { font-size: 9.5px; }
.tiles-compact .mini-bars .col small { font-size: 9px; letter-spacing: -.2px; }
.tiles-compact .tile-go-arrow { bottom: 8px; right: 10px; }
.mini-bars:has(.col:nth-child(11)) .col small { font-size: 9px; letter-spacing: -.2px; }
.flag { width: 20px; height: 15px; border-radius: 3px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(38,35,30,.12); flex-shrink: 0; display: inline-block; }
.flag.lg { width: 32px; height: 24px; border-radius: 4px; }
.with-flag { display: inline-flex; align-items: center; gap: 7px; }
.country-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.country-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 10px; background: var(--well); box-shadow: var(--sh-inset-sm); font-size: 12px; font-weight: 700; }
.country-chip .n { color: var(--muted); font-weight: 600; }

.well { padding: 12px 14px; border-radius: 14px; background: var(--well); box-shadow: var(--sh-inset-sm); }
.kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.kv > div { padding: 12px; border-radius: 14px; background: var(--well); box-shadow: var(--sh-inset-sm); min-width: 0; }
.kv dt { font-size: 11px; color: var(--muted); font-weight: 700; }
.kv dd { margin: 2px 0 0; font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.proplist { margin: 0; display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr); }
.proplist dt, .proplist dd { margin: 0; padding: 9px 4px; border-bottom: 1px solid var(--rule); font-size: 13px; }
.proplist dt { color: var(--muted); font-weight: 700; padding-right: 16px; }
.proplist dd { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- status ---------- */
.badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.pass { background: var(--pass-bg); color: var(--pass-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.fail { background: var(--fail-bg); color: var(--fail-fg); }
.badge.info { background: var(--info-bg); color: var(--info-fg); }
.badge.neutral { background: var(--well); color: var(--muted); box-shadow: var(--sh-inset-sm); }
.sev-High { color: var(--fail-strong); font-weight: 700; }
.sev-Medium { color: var(--warn-strong); font-weight: 700; }
.sev-Low { color: var(--info-strong); font-weight: 700; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }

.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 18px; background: var(--primary); color: #fff; box-shadow: 6px 6px 16px rgba(var(--shade-rgb), .3), -6px -6px 16px rgba(var(--hi-rgb), calc(.85 * var(--hi-a))); }
.banner .icon { width: 40px; height: 40px; border-radius: 50%; background: var(--alert-red); box-shadow: 0 0 0 4px rgba(224,38,27,.25), 0 2px 8px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.banner .text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; }
.banner .text span { font-size: 13px; opacity: .88; }
.banner a.btn { background: var(--surface); color: var(--link); min-height: 40px; font-weight: 800; }
.banner.ok .icon { background: rgba(255,255,255,.18); box-shadow: none; }

.bar { height: 10px; border-radius: 999px; background: var(--well); box-shadow: var(--sh-inset-sm); overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.bar.thin { height: 8px; background: var(--track); box-shadow: inset 1px 1px 3px rgba(var(--lo-rgb), calc(.45 * var(--lo-a))); }
.stack { height: 14px; border-radius: 999px; overflow: hidden; display: flex; box-shadow: var(--sh-inset-sm); }
.stack > span { display: block; height: 100%; }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter .top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.meter .top b { color: var(--link); }
.meter .note { font-size: 12px; color: var(--muted); }

.ring { width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 6px 6px 14px rgba(var(--lo-rgb), calc(.4 * var(--lo-a))), -6px -6px 14px rgba(var(--hi-rgb), calc(.95 * var(--hi-a))); flex-shrink: 0; }
.ring .hole { width: 106px; height: 106px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--sh-inset); }
.ring .big { font-size: 28px; font-weight: 800; color: var(--link); line-height: 1; }
.ring .small { font-size: 11px; color: var(--muted); font-weight: 700; }
.legend { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.legend > div { display: flex; align-items: center; gap: 10px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend .grow { flex-grow: 1; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.issue { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--well); box-shadow: var(--sh-inset); }
.issue .what { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.issue .what b { font-size: 13px; }
.issue .what span { font-size: 12px; color: var(--muted); }
.flow { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; }
.flow .node { padding: 6px 10px; border-radius: 8px; background: var(--surface); box-shadow: 2px 2px 5px rgba(var(--lo-rgb), calc(.35 * var(--lo-a))); }
.list-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.list-row:last-child { border-bottom: none; }
.list-row .end { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12px; text-align: right; }

/* ---------- table ---------- */
.dt { display: flex; flex-direction: column; gap: 14px; }
.dt-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.dt-tools .left, .dt-tools .right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dt-scroll { overflow-x: auto; border-radius: 14px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
/* one font for all table data: names, DNs, IPs and event IDs use the body font too (figures line up via tabular numbers) */
table.data td { font-variant-numeric: tabular-nums; }
table.data td .mono, table.data td.mono, table.data td .flow, table.data td a.evt-link, table.data td code { font-family: var(--font); font-size: inherit; }
table.data thead th { position: sticky; top: 0; background: var(--well); text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; white-space: nowrap; }
table.data thead th:first-child { border-radius: 12px 0 0 12px; }
table.data thead th:last-child { border-radius: 0 12px 12px 0; }
table.data thead th button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 5px; width: 100%; padding: 11px 9px; cursor: pointer; }
table.data thead th button:focus-visible { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: -3px; border-radius: 10px; }
table.data thead th .arrow { display: inline-flex; flex: none; color: var(--link); opacity: .55; transition: opacity .12s; }
table.data thead th .arrow svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
table.data thead th button:hover .arrow { opacity: .95; }
table.data thead th[aria-sort="ascending"] .arrow, table.data thead th[aria-sort="descending"] .arrow { opacity: 1; }
table.data thead th[aria-sort="ascending"] .arrow .dn, table.data thead th[aria-sort="descending"] .arrow .up { opacity: .25; }
table.data thead th[aria-sort="ascending"] .arrow svg, table.data thead th[aria-sort="descending"] .arrow svg { stroke-width: 2.3; }
table.data thead tr { box-shadow: var(--sh-small); }
table.data tbody td { white-space: nowrap; padding: 10px 9px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data tbody td.wrap { min-width: 220px; }
table.data tbody td.nowrap { white-space: nowrap; }
table.data tbody tr:hover td { background: var(--row-hover); }
table.data td.num { text-align: left; font-variant-numeric: tabular-nums; }
table.data td .cellbar { display: flex; align-items: center; gap: 6px; min-width: 96px; }
table.data td .cellbar .bar { flex: 1; height: 8px; background: var(--track); box-shadow: none; }
.dt-empty { padding: 28px; text-align: center; color: var(--muted); font-weight: 600; border-radius: 14px; background: var(--well); box-shadow: var(--sh-inset-sm); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pager .range { font-size: 12px; color: var(--muted); font-weight: 600; }
.pager .pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager button { min-width: 40px; height: 40px; padding: 0 10px; border: none; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; color: var(--ink-2); }
.pager button.edge { font-size: 12px; letter-spacing: .06em; color: var(--link); }
.pager button.edge[disabled] { color: var(--muted); opacity: .5; cursor: default; }
.pager button[aria-current="page"] { background: var(--primary); color: #fff; box-shadow: 3px 3px 8px rgba(var(--shade-rgb), .3), -3px -3px 8px rgba(var(--hi-rgb), calc(.9 * var(--hi-a))); }
.pager .gap { color: var(--muted); padding: 0 4px; }
.pager .pg-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.pg-size { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; background: var(--tint); }
.pager .pg-size button { min-width: 0; height: 32px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--link); display: inline-flex; align-items: center; gap: 5px; }
.pager .pg-size button:hover { background: rgba(var(--teal-rgb), .12); }
.pager .pg-size button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.pg-sel select { appearance: none; -webkit-appearance: none; height: 32px; border: none; border-radius: 9px; background: transparent; padding: 0 22px 0 10px; font: inherit; font-size: 12px; font-weight: 800; color: var(--link); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 9px 6px; }
.pg-sel select:hover { background-color: rgba(var(--teal-rgb), .12); }
.pg-sel.on select { background-color: var(--primary); color: #fff; }
.pg-sel select option { color: var(--ink); background: var(--surface); }
@media (max-width: 560px) { .pager .pg-right { justify-content: flex-start; margin-left: 0; } }

/* ---------- one line per row + expand ---------- */
table.data .cl { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 2px 3px; margin: -2px -3px; }
table.data td.wrap .cl { max-width: 460px; }
table.data .cl .line2 { margin-left: 8px; }
table.data tr.open td { vertical-align: top; }
table.data tr.open .cl { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
table.data tr.open td.nowrap .cl { white-space: nowrap; }
table.data tr.open .cl .line2 { display: block; margin: 3px 0 0; }
table.data tr.open td { background: var(--row-open); }
table.data .xcol { width: 30px; padding: 0 0 0 10px !important; text-align: center; }
table.data thead th.xcol { padding: 0 0 0 10px !important; }
table.data:not(.has-x) .xcol { display: none; }
table.data:not(.has-x) thead th:nth-child(2) { border-radius: 12px 0 0 12px; }
table.data:not(.has-x) thead th:nth-child(2) button, table.data:not(.has-x) tbody td:nth-child(2) { padding-left: 14px; }
.row-x { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px; color: var(--link); background: rgba(var(--teal-rgb), .09); cursor: pointer; transition: background .12s, color .12s, transform .15s; }
.row-x svg { transition: transform .15s; }
.row-x:hover { background: var(--primary); color: #FFF; }
.row-x:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.row-x[aria-expanded="true"] svg { transform: rotate(90deg); }
.row-x[aria-expanded="true"] { background: var(--primary); color: #FFF; }
table.data tbody tr:not([data-over="1"]) .row-x { visibility: hidden; }
table.data tr.open .xcol { padding-top: 8px !important; }
thead .row-x.all { width: 22px; height: 22px; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .row-x, .row-x svg { transition: none; } }

/* ---------- Yes / No ---------- */
.yn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; vertical-align: middle; flex-shrink: 0; }
.yn.yes { background: var(--yes-bg); color: var(--yes-fg); }
.yn.no { background: var(--no-bg); color: var(--no-fg); }
dl.proplist dd .yn { margin-top: -2px; }

/* ---------- page navigation buttons ---------- */
.detail-bar .btn-secondary { background: var(--tint); color: var(--link); box-shadow: var(--sh-small); }
.detail-bar .btn-secondary:hover { background: var(--teal-2); color: #FFF; }
.detail-bar .btn-secondary:hover svg { stroke: #FFF; }
.detail-bar .nav-btns:last-child > a.btn { background: var(--primary); color: #FFF; box-shadow: var(--sh-primary); }
.detail-bar .nav-btns:last-child > a.btn:hover { background: var(--primary-dark); }
.detail-bar .select { background: var(--field); box-shadow: var(--sh-inset-sm), 0 0 0 2px rgba(var(--shade-rgb), .18); }
.jump-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.jump-nav .jump { display: inline-flex; align-items: center; gap: 7px; padding: 7px 8px 7px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none; color: var(--link); background: var(--tint); box-shadow: var(--sh-small); transition: background .12s, color .12s; }
.jump-nav .jump .n { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--primary); color: #FFF; font-size: 11px; text-align: center; }
.jump-nav .jump:hover { background: var(--primary); color: #FFF; }
.jump-nav .jump:hover .n { background: #FFF; color: var(--link); }
.jump-nav .jump:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.jump-nav .jump:only-child .n:empty { display: none; }
.pager button.edge:not([disabled]) { background: var(--tint); }
.pager button.edge:not([disabled]):hover { background: var(--primary); color: #FFF; }
.pager button:not(.edge):not([aria-current]):hover { background: rgba(var(--teal-rgb), .09); }
.dt-scroll, .yn { position: relative; }
table.data th, table.data td { text-align: left; }
/* coloured buttons: soft tinted drop shadow only (the white neumorphic highlight looks wrong on colour) */
.detail-bar .btn-secondary, .jump-nav .jump { box-shadow: 0 2px 5px rgba(var(--shade-rgb), .16), 0 1px 1px rgba(var(--shade-rgb), .08); }
.detail-bar .nav-btns:last-child > a.btn { box-shadow: 0 3px 8px rgba(var(--shade-rgb), .28), 0 1px 2px rgba(var(--shade-rgb), .18); }
.detail-bar .btn-secondary:hover, .jump-nav .jump:hover, .detail-bar .nav-btns:last-child > a.btn:hover { box-shadow: 0 4px 10px rgba(var(--shade-rgb), .26); }
.detail-bar .btn:active, .jump-nav .jump:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.18); }
.detail-bar .select { box-shadow: inset 0 1px 3px rgba(var(--shade-rgb), .14), 0 0 0 2px rgba(var(--shade-rgb), .18); }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #111615; --surface: #1A201F; --well: #151B1A; --track: #28312F;
  --primary: #15766B; --primary-dark: #0F5D55; --teal-2: #24978A;
  --link: #6FD0C1; --link-hover: #A3E6DB;
  --ink: #E7ECEA; --ink-2: #C7D0CD; --muted: #95A29E; --rule: rgba(255,255,255,.08);
  --pass-bg: #163A35; --pass-fg: #8FE0CF;
  --warn-bg: #3B2D14; --warn-fg: #F1C47E; --warn-strong: #EBB25C;
  --fail-bg: #43211C; --fail-fg: #FFA899; --fail-strong: #FF8F7E;
  --info-bg: #1D2A3A; --info-fg: #AEC6E8; --info-strong: #9FBBE3;
  --fail-solid: #D9634C; --warn-solid: #D89C3E; --info-solid: #7F9BBA;
  --m1: #4F978E; --m2: #B98555; --m3: #6E87B8; --m4: #9A7194; --m5: #8C9450; --m6: #6F909E;
  --c1: #08A798; --c2: #CD792B; --c3: #688FDC; --c4: #CD69A2; --c5: #8B9B1E; --c-other: #6C7774;
  --s-good: #2BA392; --s-warn: #D89C3E; --s-bad: #D9634C; --s-info: #7F9BBA;
  --tint: #1D3936; --field: #121A19; --edge: rgba(255,255,255,.05);
  --row-hover: rgba(255,255,255,.035); --row-open: rgba(255,255,255,.05);
  --teal-rgb: 111,208,193; --shade-rgb: 0,0,0; --lo-rgb: 0,0,0; --lo-a: 1.35; --hi-rgb: 255,255,255; --hi-a: .045;
  --tip-bg: #0B0F0E; --tip-edge: rgba(255,255,255,.12);
  --yes-bg: #173D2A; --yes-fg: #6FDB9A; --no-bg: #2A3130; --no-fg: #9AA6A3;
  --sea: #13201F; --land: #232C2B; --land-edge: #43504D; --land-edge-strong: #7D8C88; --land-dim: #1C2423;
  --hub-line: #AEB9B6; --repl-ok: #5EC2B3; --map-ring: #111615; --halo: rgba(17,22,21,.9);
  --topo-bg: #151C1B; --topo-land: #222B2A; --topo-land-edge: #3B4745; --topo-node: rgba(28,35,34,.95); --glass: rgba(26,32,31,.92);
  --sh-raised: 8px 8px 20px rgba(0,0,0,.5), -6px -6px 16px rgba(255,255,255,.03);
  --sh-control: 4px 4px 10px rgba(0,0,0,.45), -3px -3px 8px rgba(255,255,255,.03);
  --sh-small: 3px 3px 8px rgba(0,0,0,.4), -2px -2px 6px rgba(255,255,255,.03);
  --sh-inset: inset 3px 3px 7px rgba(0,0,0,.5), inset -2px -2px 6px rgba(255,255,255,.03);
  --sh-inset-sm: inset 2px 2px 5px rgba(0,0,0,.45), inset -2px -2px 5px rgba(255,255,255,.03);
  --sh-primary: 4px 4px 10px rgba(0,0,0,.45), -3px -3px 8px rgba(255,255,255,.03);
}
:root[data-theme="dark"] .flag { box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
:root[data-theme="dark"] .banner { background: #0F4F49; }
:root[data-theme="dark"] .tile .value:not(.warn):not(.fail):not(.info) { color: var(--link); }
html { transition: background-color .2s; }

/* ---------- header rows + theme switch ---------- */
.page-head { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; }
.page-head .head-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-head .head-top .crumbs { align-self: auto; min-width: 0; }
.page-head .head-main { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.theme-toggle { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-small); cursor: pointer; font-size: 12px; font-weight: 800; color: var(--ink-2); flex-shrink: 0; }
.theme-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.theme-toggle .tt-track { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 58px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--well); box-shadow: var(--sh-inset-sm); color: var(--muted); }
.theme-toggle .tt-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #F4C150; box-shadow: 0 2px 5px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.4,1.4,.6,1), background .2s; }
.theme-toggle[aria-checked="true"] .tt-knob { transform: translateX(30px); background: #CFE3F0; }
.theme-toggle .tt-sun, .theme-toggle .tt-moon { position: relative; z-index: 1; transition: color .2s; }
.theme-toggle[aria-checked="false"] .tt-sun { color: #7A4E0B; }
.theme-toggle[aria-checked="true"] .tt-moon { color: #1D3550; }
.theme-toggle:hover .tt-track { box-shadow: var(--sh-inset-sm), 0 0 0 2px rgba(var(--teal-rgb), .25); }
@media (prefers-reduced-motion: reduce) { .theme-toggle .tt-knob { transition: none; } html { transition: none; } }
@media (max-width: 480px) { .theme-toggle .tt-label { display: none; } .theme-toggle { padding: 4px; } }
/* event ID links */
a.evt-link { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--link); text-decoration: none; padding: 2px 7px; margin: -2px -7px; border-radius: 7px; transition: background .12s; }
a.evt-link svg { opacity: .55; }
a.evt-link:hover { background: rgba(var(--teal-rgb), .1); text-decoration: underline; }
a.evt-link:hover svg { opacity: 1; }
a.evt-link:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }


/* ======================================================================
   AWS Report # 1 additions (everything above is AD Report # 1's style)
   ====================================================================== */
.forest-row { display: flex; align-items: center; gap: 8px; }
.forest-row .forest-chip { flex: 1 1 auto; min-width: 0; }
.forest-chip .acct { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.demo-tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--info-bg); color: var(--info-fg); }
.layout > main > footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 6px 4px 12px; font-size: 12px; color: var(--muted); }
.layout > main > footer a { font-weight: 700; }

/* section anchors: land below the top edge */
.card[id] { scroll-margin-top: 20px; }
.card-desc { margin: -8px 0 0; font-size: 12.5px; color: var(--muted); max-width: 900px; }
.card h2 .src { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 8px; letter-spacing: .02em; }

/* glance grid: Overview metrics for a section */
.kv a { color: inherit; text-decoration: none; }
.kv dd.warn { color: var(--warn-strong); }
.kv dd.fail { color: var(--fail-strong); }
.kv dd.good { color: var(--link); }
.kv.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kv.compact > div { padding: 10px 12px; }
.kv.compact dd { font-size: 18px; letter-spacing: -.01em; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--rule); stroke-width: 1; }
.chart .axis text, .chart text.axis { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--font); }
.chart .baseline { stroke: rgba(var(--lo-rgb), calc(.55 * var(--lo-a))); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .col-group.dim rect.seg, .chart .col-group.dim path.seg { opacity: .45; }
.chart .line { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker { fill: var(--c1); stroke: var(--surface); stroke-width: 2; }
.chart .note-mark { fill: var(--surface); stroke: var(--c2); stroke-width: 2; }
.chart .partial { fill: url(#acr-hatch); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.chart-foot { font-size: 12px; color: var(--muted); }
.tip { position: fixed; z-index: 50; pointer-events: none; max-width: 300px; padding: 10px 12px; border-radius: 12px; background: var(--tip-bg); color: #F4F1EA; font-size: 12px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.28); border: 1px solid var(--tip-edge); }
.tip b { color: #fff; }
.tip .t-head { font-weight: 800; margin-bottom: 4px; color: #fff; }
.tip .t-row { display: flex; align-items: center; gap: 8px; }
.tip .t-row i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.tip .t-row .v { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; font-weight: 700; }
.tip .t-total { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.15); }

/* horizontal bar list (spend by service, by region) */
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(80px, 2fr) auto; align-items: center; gap: 12px; font-size: 13px; }
.hbar .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.hbar .track span { display: block; height: 100%; border-radius: 999px; background: var(--c1); }
.hbar .val { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; min-width: 64px; }
.hbar .val small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }

/* findings list */
.findings { display: flex; flex-direction: column; gap: 10px; }
.finding { display: grid; grid-template-columns: 56px minmax(0, auto) minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--well); box-shadow: var(--sh-inset-sm); text-decoration: none; color: var(--ink); font-size: 12.5px; }
.finding:hover { color: var(--ink); background: var(--row-open); }
.finding .badge { justify-self: start; }
.finding b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.finding span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.findings { gap: 8px; }

/* baseline matrix */
table.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.matrix th, table.matrix td { padding: 10px 9px; border-bottom: 1px solid var(--rule); text-align: left; }
table.matrix thead th { background: var(--well); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
table.matrix thead th:first-child { border-radius: 12px 0 0 12px; }
table.matrix thead th:last-child { border-radius: 0 12px 12px 0; }
table.matrix tbody th { font-weight: 700; }

/* region cards on the dashboard */
.regions { display: flex; flex-direction: column; gap: 10px; }
.region { padding: 11px 14px; border-radius: 14px; background: var(--well); box-shadow: var(--sh-inset-sm); display: flex; flex-direction: column; gap: 6px; }
.region .r-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.region .r-head b { font-size: 14px; }
.region .r-head small { color: var(--muted); font-weight: 800; font-size: 10px; letter-spacing: .08em; margin-left: 6px; }
.region .r-cost { font-size: 18px; font-weight: 800; color: var(--link); letter-spacing: -.02em; }
.region .r-list { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--ink-2); }
.region .r-list b { color: var(--ink); }
.region .r-checks { display: flex; flex-wrap: wrap; gap: 4px; }
.region .r-checks .badge { font-size: 10.5px; padding: 2px 8px; }
/* dashboard: four tiles on one row when there is room */
@media (min-width: 1200px) { .tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dash .card { padding: 20px 22px; gap: 14px; }
.dash .hbars { gap: 9px; }

/* table tools */
.dt-tools select { min-height: 40px; padding: 0 12px; border: none; border-radius: 12px; background: var(--well); box-shadow: var(--sh-inset); font-size: 13px; font-weight: 700; }
.dt-count { font-size: 12px; font-weight: 700; color: var(--muted); }
table.data td.neg { color: var(--muted); }
table.data td .none { color: var(--muted); }
table.data tbody tr { cursor: default; }
.empty-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.empty-card .dt-empty { flex: 1 1 260px; padding: 16px; text-align: left; }

/* loader */
.loading { padding: 60px 20px; text-align: center; color: var(--muted); font-weight: 700; }

/* ---------- chart cards on the section pages (charts.js) ---------- */
.chart-row > .card { min-width: 0; }
.chart-card .card-body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.donut-chart { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-chart svg { flex-shrink: 0; overflow: visible; }
.donut-chart .arc { transition: opacity .15s, stroke-width .15s; cursor: default; }
.donut-chart .d-big { font-family: var(--font); font-size: 24px; font-weight: 700; fill: var(--ink); }
.donut-chart .d-sub { font-family: var(--font); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; fill: var(--muted); }
.d-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1 1 150px; min-width: 0; font-size: 13px; }
.d-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 38px; gap: 10px; align-items: center; transition: opacity .15s; }
.d-legend i { width: 10px; height: 10px; border-radius: 3px; }
.d-legend .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-legend b { font-variant-numeric: tabular-nums; text-align: right; }
.d-legend .p { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.donut-chart.hovering .arc:not(.hi), .donut-chart.hovering li:not(.hi) { opacity: .35; }
.donut-chart .arc.hi { stroke-width: 26; }
.chart .bin text.v { font-family: var(--font); font-size: 12px; font-weight: 700; fill: var(--ink); }
.chart .bin path { transition: opacity .15s; }
.chart .bin.dim path, .chart .bin.dim text.v { opacity: .4; }
.count-bars .hbar .val { min-width: 48px; }
.chart-legend + .chart, .chart-legend + .treemap, .chart-legend + .stack100 { margin-top: 2px; }
.d-legend a, .hbar .name a, .s100-row .name a { color: inherit; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
/* 100% stacked bars */
.stack100 { display: flex; flex-direction: column; gap: 10px; }
.s100-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(120px, 2.6fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.s100-row .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s100-bar { display: flex; height: 22px; border-radius: 7px; overflow: hidden; background: var(--track); gap: 2px; }
.s100-bar > span { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #10181C; min-width: 0; overflow: hidden; }
.s100-row .val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
/* treemap */
.treemap { position: relative; width: 100%; }
.tm-cell { position: absolute; box-sizing: border-box; border: 2px solid var(--surface); border-radius: 8px; background: color-mix(in srgb, var(--tm) 78%, var(--surface)); padding: 6px 8px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; color: #10181C; transition: filter .12s; }
.tm-cell:hover { filter: brightness(1.12); }
.tm-l { font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-v { font-size: 11px; font-weight: 600; opacity: .8; }
/* timeline */
.chart .tl-band { fill: rgba(240, 185, 74, .10); }
.chart .tl-band-t { fill: var(--warn-fg); }
.chart .tl-today { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 3; }
.chart .tl-tick { stroke: var(--muted); }
.chart .tl-stem { stroke: var(--rule); stroke-width: 1; }
.chart .tl-dot { stroke: var(--surface); stroke-width: 2; cursor: default; }
.chart .tl-dot:hover { r: 8; }
/* gauge */
.gauge { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gauge svg { overflow: visible; }
/* organisation tree */
.orgtree { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ot-node { border-radius: 14px; padding: 10px 14px; min-width: 150px; }
.ot-root { border: 1.5px solid var(--primary); background: var(--well); text-align: center; position: relative; }
.ot-root::after { content: ""; position: absolute; left: 50%; bottom: -23px; height: 22px; border-left: 1.5px solid var(--rule); }
.ot-kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; padding-top: 14px; border-top: 1.5px solid var(--rule); }
.ot-ou { border: 1px solid var(--rule); background: var(--well); flex: 1 1 150px; max-width: 230px; }
.ot-head { display: flex; flex-direction: column; gap: 1px; }
.ot-head b { font-size: 14px; }
.ot-head small { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ot-node ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.ot-node li { padding: 4px 8px; border-radius: 8px; background: var(--surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-node li.mark { box-shadow: inset 3px 0 0 var(--primary); }
.ot-root ul { align-items: center; }
/* chart fixes: the gauge shares the donut's centre text; wider label columns so names are not cut */
.gauge .d-big { font-family: var(--font); font-size: 24px; font-weight: 700; fill: var(--ink); }
.gauge .d-sub { font-family: var(--font); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; fill: var(--muted); }
.gauge .d-legend { width: 100%; max-width: 360px; }
.s100-row { grid-template-columns: minmax(140px, 1.15fr) minmax(110px, 2.4fr) auto; }
.meters .hbar { grid-template-columns: minmax(120px, 1.3fr) minmax(60px, 1.6fr) minmax(64px, auto); }
.meters .hbar .val small { white-space: nowrap; }
@media (max-width: 600px) { .s100-row { grid-template-columns: minmax(104px, 1fr) minmax(90px, 1.6fr) auto; gap: 8px; } }
/* chart rows with a fixed number of equal cards (ACR.chart.row(..., { cols: 4 })): narrower cards side by side */
.chart-row.cols-4 > *, .chart-row.cols-3 > * { flex: 1 1 0; }
@media (max-width: 1279px) { .chart-row.cols-4 > * { flex: 1 1 calc(50% - 12px); } }
@media (max-width: 899px) { .chart-row.cols-3 > * { flex: 1 1 100%; } }
@media (max-width: 699px) { .chart-row.cols-4 > * { flex: 1 1 100%; } }
.chart-row.cols-4 .card, .chart-row.cols-3 .card { padding: 20px; }
.chart-row.cols-4 .card > .card-head:first-child, .chart-row.cols-3 .card > .card-head:first-child { margin: -20px -20px 0; padding-left: 20px; padding-right: 20px; }
.chart-row.cols-4 .donut-chart { gap: 14px; justify-content: center; }
.chart-row.cols-4 .d-legend { flex-basis: 100%; }
.chart-row.cols-4 .hbar { grid-template-columns: minmax(80px, 1fr) minmax(50px, 1.2fr) auto; gap: 10px; }
.chart-row.cols-4 .card > .card-head:first-child h2, .chart-row.cols-3 .card > .card-head:first-child h2 { letter-spacing: .11em; }
.chart-row.cols-3 .hbar { grid-template-columns: minmax(80px, 1fr) minmax(50px, 1.2fr) auto; gap: 10px; }
.card-more { white-space: nowrap; font-weight: 600; }
/* the gauge stacks its parts, so the list under it must not take the donut legend's 150px flex basis as a height */
.gauge .d-legend { flex: 0 0 auto; }
/* a donut's legend needs room for its labels: below this it wraps under the donut instead of cutting them */
.donut-chart .d-legend { min-width: 180px; }

/* ---------- Guide pages: FAQ, Process, Guide ---------- */
.kv dd.note-dd { font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--ink-2); }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border-radius: 14px; background: var(--well); border: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 16px 14px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); max-width: 80ch; }
/* swimlane flowchart: phase labels, then three lanes; arrows are an SVG drawn over the grid */
.flow-wrap { position: relative; }
.flow-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.flow-lines path { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.flow-lines marker path { fill: var(--muted); stroke: none; }
.flow-grid { display: grid; grid-template-columns: 120px repeat(3, minmax(0, 1fr)); column-gap: 18px; row-gap: 26px; align-items: start; }
.fl-corner { grid-row: 1; grid-column: 1; }
.fl-lane { grid-row: 1; padding: 10px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.fl-lane b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.fl-lane small { font-size: 11.5px; color: var(--muted); }
.fl-phase { grid-column: 1; align-self: stretch; border-left: 2px solid var(--rule); padding: 4px 0 4px 12px; }
.fl-phase span { position: sticky; top: 16px; display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fl-step { position: relative; z-index: 1; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--well); border: 1px solid var(--rule); }
.fl-top { display: flex; align-items: center; gap: 10px; }
.fl-top b { font-size: 14px; line-height: 1.25; }
.fl-n { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--primary); color: #fff; }
.fl-step p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.fl-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.fl-tags span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--rule); }
.fl-lane-tag { display: none; }
.fl-end { border-style: dashed; }
@media (max-width: 899px) {
  .flow-grid { display: flex; flex-direction: column; gap: 18px; }
  .fl-corner, .fl-lane { display: none; }
  .fl-phase { border-left: none; padding: 6px 0 0; }
  .fl-phase span { position: static; }
  .fl-lane-tag { display: inline-block; align-self: flex-start; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
}

/* ---------- frozen columns (ACR.table): the row toggle and first column, and Status when it is second ---------- */
table.data .fz { position: sticky; left: var(--fz-l0, 0); z-index: 1; }
table.data .fz1 { left: var(--fz-l1, 40px); }
table.data .fz2 { left: var(--fz-l2, 200px); }
table.data thead th.fz { z-index: 3; }
:root[data-theme] table.data tbody td.fz { background: var(--fz-bg, var(--surface)); }
:root[data-theme] table.data tbody tr:hover td.fz { background: linear-gradient(var(--row-hover), var(--row-hover)), var(--fz-bg, var(--surface)); }
:root[data-theme] table.data tbody tr.open td.fz { background: linear-gradient(var(--row-open), var(--row-open)), var(--fz-bg, var(--surface)); }
.dt-scroll.fz-scrolled table.data .fz-end { box-shadow: 8px 0 8px -8px rgba(0, 0, 0, .28), inset -1px 0 0 var(--rule); }
.dt-scroll.fz-scrolled table.data .fz-end { clip-path: inset(0 -12px 0 0); }

/* ---------- report-wide search (top right of every page, level with the title) ---------- */
.page-head .head-main { align-items: flex-start; flex-wrap: nowrap; }
.page-head .head-main .titles { flex: 1 1 auto; }
.page-head .head-main .head-actions { flex: none; }
.gsearch { position: relative; margin-top: 4px; }
.gsearch .search { min-height: 44px; padding: 0 14px; }
.gsearch .search input { width: 260px; font-size: 14px; }
.gsearch kbd { font: 600 11px/1 var(--font-mono, monospace); color: var(--muted); border: 1px solid var(--edge); border-radius: 6px; padding: 3px 6px; }
.gsearch .search:focus-within kbd { display: none; }
.gs-results { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(480px, 92vw); max-height: min(70vh, 620px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, .45); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.gs-results[hidden] { display: none; }
.gs-head { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.gs-group { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; border-top: 1px solid var(--edge); }
.gs-group:first-of-type { border-top: 0; }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 13px; min-width: 0; }
.gs-item:hover, .gs-item.active, .gs-more:hover, .gs-more.active { background: var(--well); }
.gs-set b { font-weight: 700; }
.gs-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gs-n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.gs-row { padding-left: 22px; }
.gs-row .gs-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.gs-row .badge { flex: none; }
.gs-more { font-size: 12px; font-weight: 600; color: var(--muted); padding: 5px 10px 5px 22px; border-radius: 10px; text-decoration: underline; text-underline-offset: 3px; }
.gs-note { color: var(--muted); font-size: 13px; padding: 12px 10px; }
.gs-results mark { background: rgba(232, 128, 74, .35); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 899px) { .page-head .head-main { flex-wrap: wrap; } .page-head .head-main .head-actions, .gsearch, .gsearch .search input { width: 100%; } }
.gsearch .search input:focus, .gsearch .search input:focus-visible { outline: none; }
