/* AuroraLens - one stylesheet, tokens first. Every colour below is a token so the dark theme (Settings > Appearance, the
   header button, or the operating system) is a second block of values, not a second stylesheet. Badge / banner tones are
   measured for >= 6:1 on their backgrounds in both themes; text pairs >= 4.5:1, checked by
   tests/AuroraLens.UnitTests/ContrastTests.cs, which reads this file. Icons: Tabler Icons (MIT) - the sprite img/icons.svg for
   markup (<icon name="..." />) and single files in img/i/ for CSS masks, both built by scripts/make-icons.js. */
:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f0f3f8;
  --hover: #f6f8fc;
  --ink: #172033;
  --muted: #586174;
  --line: #e1e6ee;
  --input-bg: #ffffff;
  --input-border: #c3ccd9;
  --accent: #2257d1;
  --accent-strong: #1c3d8c;
  --accent-fill: #2563d9;   /* filled buttons with white text: >= 4.5:1 in both themes (tests/ContrastTests) */
  --accent-soft: #e8efff;   /* selected / active surfaces under --accent text */
  --on-accent: #ffffff;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --err: #c0392b;
  --ok-bg: #dcf5e6;    --ok-ink: #166534;    --ok-line: #b7e4c7;
  --warn-bg: #fff1d6;  --warn-ink: #92400e;  --warn-line: #f3dca3;
  --err-bg: #fde4e1;   --err-ink: #991b1b;   --err-line: #f5c2bd;
  --info-bg: #e8e8f7;  --info-ink: #4b3f8f;
  --chip-bg: #e8efff;  --chip-ink: #1d3f8f;
  --badge-bg: #e5e7eb; --badge-ink: #374151;
  --err-row: #fff5f4;
  --warn-row: #fffbf0;
  --topbar: #0f1729;
  --topbar-2: #131d33;
  --topbar-ink: #c9d4e8;
  --topbar-muted: #9fb3d9;
  --topbar-line: #25324f;
  --topbar-input: #172340;
  --brand: #7fb0ff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-md: 0 8px 20px -6px rgba(16, 24, 40, .16), 0 2px 6px -2px rgba(16, 24, 40, .08);
  --ring: 0 0 0 3px rgba(37, 99, 217, .22);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  color-scheme: light;
}

/* dark: the same tokens, lighter text on dark surfaces; status tones stay recognisable (desaturated, not inverted) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141c; --panel: #171e2a; --panel-2: #1f2836; --hover: #1b2432; --ink: #e6e9ef; --muted: #9aa4b5; --line: #2a3344;
    --input-bg: #121923; --input-border: #3a465a; --accent: #7fb0ff; --accent-strong: #2f6fed; --accent-fill: #2b66dc; --accent-soft: #1b2a4b; --on-accent: #ffffff;
    --ok: #4ade80; --warn: #fbbf24; --err: #f87171;
    --ok-bg: #12331f; --ok-ink: #86efac; --ok-line: #1f5a35;
    --warn-bg: #3a2a0a; --warn-ink: #fcd34d; --warn-line: #6b4a0e;
    --err-bg: #3b1515; --err-ink: #fca5a5; --err-line: #7f1d1d;
    --info-bg: #26244a; --info-ink: #c4b5fd;
    --chip-bg: #1d2b4a; --chip-ink: #bfdbfe;
    --badge-bg: #2a3344; --badge-ink: #d1d5db;
    --err-row: #2a1717; --warn-row: #2a2312;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 24px -8px rgba(0, 0, 0, .6);
    --ring: 0 0 0 3px rgba(127, 176, 255, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141c; --panel: #171e2a; --panel-2: #1f2836; --hover: #1b2432; --ink: #e6e9ef; --muted: #9aa4b5; --line: #2a3344;
  --input-bg: #121923; --input-border: #3a465a; --accent: #7fb0ff; --accent-strong: #2f6fed; --accent-fill: #2b66dc; --accent-soft: #1b2a4b; --on-accent: #ffffff;
  --ok: #4ade80; --warn: #fbbf24; --err: #f87171;
  --ok-bg: #12331f; --ok-ink: #86efac; --ok-line: #1f5a35;
  --warn-bg: #3a2a0a; --warn-ink: #fcd34d; --warn-line: #6b4a0e;
  --err-bg: #3b1515; --err-ink: #fca5a5; --err-line: #7f1d1d;
  --info-bg: #26244a; --info-ink: #c4b5fd;
  --chip-bg: #1d2b4a; --chip-ink: #bfdbfe;
  --badge-bg: #2a3344; --badge-ink: #d1d5db;
  --err-row: #2a1717; --warn-row: #2a2312;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 10px 24px -8px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(127, 176, 255, .3);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
code, .mono, pre { font-family: var(--mono); font-size: 12.5px; }
:is(p, li, dd, label, .banner) > code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.banner > code { background: rgba(255, 255, 255, .35); border-color: currentColor; }
:is(p, li, dd, label, .banner) > code:empty { display: none; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--panel-2); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--r-sm); max-height: 420px; overflow: auto; }
main { flex: 1 0 auto; width: 100%; max-width: 1440px; margin: 0 auto; padding: 20px 28px 56px; }
h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 22px; font-weight: 650; letter-spacing: -.2px; line-height: 1.25; margin: 10px 0 10px; }
h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15.5px; font-weight: 650; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h2.first { margin-top: 0; }
h3 { font-size: 14px; font-weight: 650; margin: 16px 0 6px; }
h1 > .icon { box-sizing: content-box; width: 20px; height: 20px; padding: 8px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
h2 > .icon { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.muted { color: var(--muted); }
main > p.muted, .lede { max-width: 120ch; }
.empty { color: var(--muted); font-style: normal; }
.empty::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; background: currentColor; -webkit-mask: url("../img/i/inbox.svg") center / contain no-repeat; mask: url("../img/i/inbox.svg") center / contain no-repeat; opacity: .8; }
.nowrap { white-space: nowrap; }
.wrap { word-break: break-word; }
.count { font-weight: 400; color: var(--muted); font-size: 12.5px; letter-spacing: 0; }
.small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* icons: 1em, the text colour, stroke style from Tabler */
.icon { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.125em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* ---------------------------------------------------------------- form controls and buttons */
input, select, button, textarea { font: inherit; }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="url"], input[type="email"], select, textarea {
  color: var(--ink); background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 8px; padding: 6px 10px; min-height: 34px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent-fill); box-shadow: var(--ring); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-fill); width: 15px; height: 15px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::placeholder { color: var(--muted); opacity: .85; }

/* buttons: primary (filled), plain buttons are secondary; both 34 px high with an optional leading icon */
.actions button, button.primary, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--accent-fill); background: var(--accent-fill); color: var(--on-accent); font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.actions button:hover, button.primary:hover, .btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); text-decoration: none; }
button:where(:not([class])), .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--input-border); background: var(--panel); color: var(--ink); font-weight: 500; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
button:where(:not([class])):hover, .btn:hover { background: var(--hover); border-color: var(--accent); text-decoration: none; }
button:disabled { opacity: .6; cursor: progress; }
.link-button { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- header: brand, scope, search, tools; then the page tabs */
.topbar { background: linear-gradient(180deg, var(--topbar) 0%, var(--topbar-2) 100%); color: #fff; border-bottom: 1px solid var(--topbar-line); }
.topbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; max-width: 1440px; margin: 0 auto; padding: 12px 28px 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .2px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex: 0 0 auto; }
/* the brand: the Aurora Digital gradient (#EC008C to #2E3192) on "Lens"; the end is lifted to violet so it stays readable on the dark bar */
.brand span span, .brand-word span { color: #d04bff; background: linear-gradient(135deg, #ec008c 0%, #a855f7 55%, #6d6cff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.quick { flex: 1 1 320px; min-width: 0; display: flex; gap: 8px; max-width: 760px; }
.quick-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.quick-field > .icon { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--topbar-muted); pointer-events: none; }
.quick input { flex: 1; min-width: 0; min-height: 38px; padding: 8px 40px 8px 36px; border: 1px solid var(--topbar-line); border-radius: 10px; background: var(--topbar-input); color: #fff; }
.quick input::placeholder { color: var(--topbar-muted); opacity: .9; }
.quick input:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(127, 176, 255, .25); }
.quick-key { position: absolute; right: 9px; background: transparent; border-color: var(--topbar-line); color: var(--topbar-muted); font-size: 11px; padding: 0 6px; }
.quick button { min-height: 38px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent-fill); color: var(--on-accent); font-weight: 600; cursor: pointer; }
.quick button:hover { filter: brightness(1.1); }
.topbar-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tool-button, .settings-link { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px; border-radius: 8px; color: var(--topbar-ink); font-size: 13px; white-space: nowrap; border: 1px solid transparent; }
.tool-button { width: 36px; justify-content: center; padding: 0; }
.tool-button .icon, .settings-link .icon { width: 18px; height: 18px; }
.tool-button:hover, .settings-link:hover { color: #fff; background: var(--topbar-input); border-color: var(--topbar-line); text-decoration: none; }
.settings-link.on { color: #fff; background: var(--topbar-input); border-color: var(--topbar-line); }
.mode { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--topbar-muted); border: 1px solid var(--topbar-line); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.mode .icon { width: 12px; height: 12px; }
.scope { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--topbar-line); border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: 12px; font-weight: 600; letter-spacing: .4px; }
.scope a { display: inline-flex; align-items: center; gap: 6px; color: var(--topbar-muted); padding: 5px 11px; border-radius: 7px; text-decoration: none; }
.scope a .icon { width: 15px; height: 15px; }
.scope a:hover { background: var(--topbar-input); color: #fff; text-decoration: none; }
.scope a.on { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.topnav { display: flex; gap: 2px; max-width: 1440px; margin: 0 auto; padding: 0 22px; overflow-x: auto; scrollbar-width: none; font-size: 14px; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { display: inline-flex; align-items: center; gap: 7px; color: var(--topbar-ink); padding: 9px 12px 10px; border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 8px 8px 0 0; }
.topnav a .icon { width: 16px; height: 16px; opacity: .85; }
.topnav a.on { color: #fff; border-bottom-color: var(--brand); background: rgba(255, 255, 255, .04); }
.topnav a.on .icon { color: var(--brand); opacity: 1; }
.topnav a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .05); }
.topnav a.external::after { content: ""; width: 11px; height: 11px; background: currentColor; opacity: .6; -webkit-mask: url("../img/i/external-link.svg") center / contain no-repeat; mask: url("../img/i/external-link.svg") center / contain no-repeat; }

/* ---------------------------------------------------------------- footer */
.site-footer { flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 14px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.footer-inner > span { display: inline-flex; align-items: center; gap: 6px; }
.footer-brand { font-weight: 600; color: var(--ink); }
.footer-brand img { border-radius: 4px; }
.footer-links { margin-left: auto; gap: 14px !important; }
.footer-links a, .footer-links .link-button { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.footer-links a:hover, .footer-links .link-button:hover { color: var(--accent); }

/* ---------------------------------------------------------------- banners: a leading icon per tone */
.banner { position: relative; padding: 11px 16px 11px 42px; border-radius: var(--r); margin: 12px auto; max-width: 1440px; border: 1px solid transparent; }
.banner::before { content: ""; position: absolute; left: 15px; top: 13px; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.banner.error { --i: url("../img/i/alert-circle.svg"); background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); }
.banner.warn { --i: url("../img/i/alert-triangle.svg"); background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.banner.ok { --i: url("../img/i/circle-check.svg"); background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
body > .banner { margin: 12px 28px 0; }
.banner ul { margin: 6px 0 0 18px; padding: 0; }
.banner a { color: inherit; text-decoration: underline; }
.suggestions { margin: 8px 0 12px 18px; }
.suggestions a { font-weight: 600; }

/* ---------------------------------------------------------------- surfaces */
.hero, .card, .chart-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.hero { padding: 26px 30px; }
.card { padding: 16px 20px; margin: 14px 0; }
.card > h2:first-child, .card > h2.first { margin-top: 0; }
.card-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.keys li { margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--chip-bg); color: var(--chip-ink); border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 500; margin-right: 4px; }
a.chip:hover { text-decoration: none; filter: brightness(.97); box-shadow: inset 0 0 0 1px var(--chip-ink); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
dl { display: grid; grid-template-columns: 180px 1fr; margin: 0; }
dt { color: var(--muted); padding: 4px 0; }
dd { margin: 0; padding: 4px 0; word-break: break-word; }

/* ---------------------------------------------------------------- tables */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.grid tbody tr:last-child > td, table.grid tbody tr:last-child > th { border-bottom: 0; }
table.grid thead th { background: var(--panel-2); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap; }
table.grid thead tr:first-child th:first-child { border-top-left-radius: calc(var(--r) - 1px); }
table.grid thead tr:first-child th:last-child { border-top-right-radius: calc(var(--r) - 1px); }
table.grid tbody tr { transition: background-color .1s ease; }
table.grid tbody tr:hover { background: var(--hover); }
table.kv th { width: 240px; color: var(--muted); font-weight: 500; }
table.logs td { font-size: 12.5px; }
tr.lvl-error td, tr.lvl-fatal td { background: var(--err-row); }
tr.lvl-warn td, tr.lvl-warning td { background: var(--warn-row); }
table.grid td { font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.good { color: var(--ok-ink); }
td.bad { color: var(--err-ink); }

/* ---------------------------------------------------------------- badges: darker text tones (>= 6:1) and an icon, so the meaning never rests on colour alone */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; background: var(--badge-bg); color: var(--badge-ink); white-space: nowrap; }
.badge.success { --i: url("../img/i/check.svg"); background: var(--ok-bg); color: var(--ok-ink); }
.badge.successnotcaptured { --i: url("../img/i/alert-triangle.svg"); background: var(--warn-bg); color: var(--warn-ink); }
.badge.failed, .badge.disputed { --i: url("../img/i/x.svg"); background: var(--err-bg); color: var(--err-ink); }
.badge.refunded, .badge.voided, .badge.canceled { --i: url("../img/i/arrow-back-up.svg"); background: var(--info-bg); color: var(--info-ink); }
.badge.success::before, .badge.successnotcaptured::before, .badge.failed::before, .badge.disputed::before,
.badge.refunded::before, .badge.voided::before, .badge.canceled::before {
  content: ""; width: 12px; height: 12px; flex: 0 0 auto; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.badge.scope { background: var(--chip-bg); color: var(--chip-ink); letter-spacing: .4px; }
.badge.scope.dcb { background: var(--ok-bg); color: var(--ok-ink); }
.badge.unknown { background: var(--badge-bg); color: var(--badge-ink); }

/* ---------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.tl { position: relative; margin: 0 0 10px 12px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.tl::before { content: ""; position: absolute; left: -26px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--bg); }
.tl.success::before { background: var(--ok); }
.tl.warning::before { background: var(--warn); }
.tl.error::before { background: var(--err); }
.tl-time { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 10px; }
.tl-src { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; margin-right: 8px; }
.tl-src .icon { width: 12px; height: 12px; }
.tl-detail { color: var(--muted); font-size: 12.5px; margin-top: 3px; word-break: break-word; }
/* long stored text (_LongText): a preview, then the whole text on "see more" */
.long-more summary { display: inline-block; font-size: 12px; margin-top: 2px; }
.long-more .less, .long-more[open] .more { display: none; }
.long-more[open] .less { display: inline; }
.long-more pre { margin: 6px 0 0; }
.long-text:has(.long-more[open]) .long-preview { display: none; }

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  dl { grid-template-columns: 140px 1fr; }
  main { padding: 14px 16px 40px; }
  .topbar-row { padding: 10px 16px 8px; }
  .topnav { padding: 0 10px; }
  .footer-inner { padding: 12px 16px; }
  .footer-links { margin-left: 0; }
  body > .banner { margin: 12px 16px 0; }
}
@media (max-width: 640px) {
  .quick { order: 3; flex-basis: 100%; max-width: none; }
  .tool-label, .quick-key { display: none; }
  .mode { padding: 3px 8px; }
  h1 { font-size: 19px; }
  .hero { padding: 18px; }
}

/* ---------------------------------------------------------------- filters (advanced search, compare, settings) */
/* the groups of a filter form sit side by side on wide screens; the buttons get their own row */
form.filters { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: stretch; }
form.filters > fieldset { flex: 1 1 380px; min-width: 0; align-content: flex-start; }
form.filters > :not(fieldset) { flex: 1 1 100%; }
.filters fieldset { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow-sm); padding: 12px 16px 14px; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.filters legend { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 0 6px; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.filters input, .filters select { min-width: 120px; }
.filters select { max-width: 320px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 6px 0 20px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.stat { min-width: 130px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; }
.stat-value { font-size: 24px; font-weight: 650; letter-spacing: -.3px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat.success .stat-value { color: var(--ok); }
.stat.warning .stat-value { color: var(--warn); }
.stat.error .stat-value { color: var(--err); }

/* ---------------------------------------------------------------- breadcrumbs, delta chips */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 2px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 14px; height: 14px; margin: 0 4px; background: currentColor; opacity: .6; -webkit-mask: url("../img/i/chevron-right.svg") center / contain no-repeat; mask: url("../img/i/chevron-right.svg") center / contain no-repeat; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-current="page"] { color: var(--ink); font-weight: 500; }
.delta { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--badge-bg); color: var(--badge-ink); white-space: nowrap; }
.delta.good { background: var(--ok-bg); color: var(--ok-ink); }
.delta.bad { background: var(--err-bg); color: var(--err-ink); }
.delta .glyph { font-size: 9px; margin-right: 4px; }

/* ---------------------------------------------------------------- compare tab */
.compare-controls .presets { font-size: 13px; color: var(--muted); align-self: center; }
.compare-controls .presets a { margin: 0 2px; }
.deltas { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.delta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.delta-row .delta-label { color: var(--muted); min-width: 260px; }
.chart-wrap { padding: 14px 18px 10px; margin: 0 0 18px; }
.metric-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.metric-switch button { font-size: 12.5px; padding: 4px 12px; border: 1px solid var(--input-border); border-radius: 999px; background: var(--panel); color: var(--ink); cursor: pointer; transition: background-color .15s ease; }
.metric-switch button:hover { border-color: var(--accent); }
.metric-switch button[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
table.compare th.series { border-top: 3px solid var(--muted); }
table.compare th.series-anchor { border-top-color: #0072B2; }
table.compare th.series-previous { border-top-color: #D55E00; }
table.compare th.series-lastweek { border-top-color: #009E73; }
table.compare tr.pending td { color: var(--muted); }
table.compare td.num a { color: inherit; text-decoration: underline dotted; }
.note { max-width: 1100px; }

/* ---------------------------------------------------------------- dashboards */
.tiles .tile { min-width: 210px; flex: 1 1 210px; }
.tile .stat-label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tile-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.tile-head .icon { width: 16px; height: 16px; }
.spark-wrap, .spark { display: block; color: var(--muted); margin-top: 6px; }
.stat.success .spark, .stat.success .spark-wrap { color: var(--ok-ink); }
.stat.error .spark, .stat.error .spark-wrap { color: var(--err-ink); }
.attention { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.attention li { position: relative; background: var(--err-bg); border: 1px solid var(--err-line); border-left: 4px solid var(--err-ink); border-radius: var(--r); padding: 10px 14px 10px 40px; color: var(--ink); }
.attention li::before { content: ""; position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; background: var(--err-ink); -webkit-mask: url("../img/i/alert-triangle.svg") center / contain no-repeat; mask: url("../img/i/alert-triangle.svg") center / contain no-repeat; }
.attention .reasons { display: block; color: var(--err-ink); font-size: 13px; margin-top: 2px; }
.attention .ai-button { margin-top: 6px; }
table.dashboard tr.flagged td { background: var(--err-row); }
table.dashboard .badge { margin-left: 6px; }
table.dashboard td .spark { color: var(--muted); }
.row-actions { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.row-actions a { display: inline-flex; align-items: center; gap: 4px; }
.row-actions a .icon { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- settings */
.theme-form fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.theme-form legend { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 0 6px; }
.theme-form label { display: flex; gap: 8px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.theme-form label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
table.settings input[type="text"] { width: 100%; min-width: 160px; }
table.settings td { vertical-align: middle; }
table.settings tr.disabled-row > td:nth-child(2), ul.merchants li.disabled-row > label { text-decoration: line-through; text-decoration-color: var(--err-ink); }
ul.merchants { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 4px; }
ul.merchants li { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(160px, 260px) auto; gap: 8px; align-items: center; }
ul.merchants label { display: flex; gap: 6px; align-items: center; }
.filter-box { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; color: var(--muted); }
.filter-box input { min-width: 0; width: min(280px, 100%); }
/* long values (file paths, ids) wrap instead of widening the page on a phone */
p code, li code, dd code { overflow-wrap: anywhere; }
table.settings tr.unlisted > td { background: var(--warn-row); }
/* phones: each gateway / carrier becomes a stacked block (tick + name on one line, then merchants, reason, since) */
@media (max-width: 700px) {
  table.settings thead { display: none; }
  table.settings, table.settings tbody, table.settings tr, table.settings td { display: block; width: 100%; }
  table.settings tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.settings td { border: 0; padding: 2px 10px; }
  table.settings td:first-child, table.settings td:nth-child(2) { display: inline-block; width: auto; }
  table.settings input[type="text"] { min-width: 0; }
  ul.merchants li { grid-template-columns: 1fr; }
}
details summary { cursor: pointer; color: var(--accent); font-weight: 500; }
details summary::marker { color: var(--muted); }

/* ---------------------------------------------------------------- accessibility helpers */
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 100; background: var(--panel); color: var(--accent); padding: 8px 14px; border: 2px solid var(--accent); border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* tables: their own sideways scroll box (no page scroll); when the table fits, the box opens up and the header sticks */
.table-wrap { overflow-x: auto; max-width: 100%; border-radius: var(--r); }
.table-wrap.fits { overflow: visible; }
.table-wrap[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-wrap.fits > table.grid > thead th { position: sticky; top: 0; z-index: 1; box-shadow: inset 0 -1px 0 var(--line); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit; cursor: pointer; }
.th-sort:hover { color: var(--ink); }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.sort-mark::after { content: ""; display: inline-block; width: 12px; height: 12px; vertical-align: -2px; background: currentColor; opacity: .45; -webkit-mask: url("../img/i/selector.svg") center / contain no-repeat; mask: url("../img/i/selector.svg") center / contain no-repeat; }
th[aria-sort="ascending"] .sort-mark::after { opacity: 1; -webkit-mask-image: url("../img/i/arrow-up.svg"); mask-image: url("../img/i/arrow-up.svg"); }
th[aria-sort="descending"] .sort-mark::after { opacity: 1; -webkit-mask-image: url("../img/i/arrow-down.svg"); mask-image: url("../img/i/arrow-down.svg"); }
th[aria-sort] { color: var(--ink); }

/* copy buttons (site.js adds one after every [data-copy]) */
.copy-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-left: 2px; padding: 0; vertical-align: middle; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn:hover { color: var(--accent); border-color: var(--line); background: var(--panel-2); }
.copy-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.copy-btn.done { color: var(--ok-ink); }
@media (pointer: coarse) { .copy-btn { width: 36px; height: 36px; } }

/* times: the absolute value is primary, the relative one a muted suffix or tooltip */
.ago { color: var(--muted); font-size: 12px; white-space: nowrap; }
time[title] { cursor: help; }

/* CSV links, keyboard shortcuts */
.csv-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; margin-left: auto; white-space: nowrap; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.csv-link::before { content: ""; width: 13px; height: 13px; background: currentColor; -webkit-mask: url("../img/i/download.svg") center / contain no-repeat; mask: url("../img/i/download.svg") center / contain no-repeat; }
.csv-link:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1px solid var(--input-border); border-bottom-width: 2px; border-radius: 5px; background: var(--panel-2); color: var(--ink); white-space: nowrap; }
dialog#shortcuts { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); padding: 20px 24px; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-md); }
dialog#shortcuts::backdrop { background: rgba(8, 12, 20, .55); backdrop-filter: blur(2px); }
dl.keys-list { grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; }
dl.keys-list dt { color: var(--ink); }
.retention { color: var(--muted); }

/* advanced search: what this search is, what was restored, what was searched before */
.filter-summary { margin: 4px 0 2px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.restored { background: var(--chip-bg); color: var(--chip-ink); border-radius: var(--r); padding: 10px 14px; margin: 0 0 12px; }
.restored a { color: var(--chip-ink); text-decoration: underline; }
.recent-searches { margin: 0 0 16px; }
.recent-searches ol { margin: 6px 0 8px 20px; padding: 0; }
.recent-searches li { margin: 3px 0; }
.recent-searches a[aria-current] { font-weight: 600; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.inline-form label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
input[size], .inline-form input, .inline-form select { max-width: 100%; min-width: 0; }

/* ---------------------------------------------------------------- home: search hero and start cards */
.hero-search { display: flex; gap: 10px; max-width: 820px; margin: 16px 0 6px; }
.hero-field { position: relative; flex: 1; display: flex; align-items: center; }
.hero-field > .icon { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.hero-field input { flex: 1; min-height: 46px; padding: 10px 14px 10px 44px; font-size: 15px; border-radius: 12px; }
.hero-search button { min-height: 46px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.key-types { list-style: none; margin: 18px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.key-types li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.key-types li > .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }
.key-types b { display: block; }
.key-types span { color: var(--muted); font-size: 13px; }
.start-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 22px 0 0; }
.start-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-sm); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.start-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.start-card > .icon { box-sizing: content-box; width: 22px; height: 22px; padding: 9px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); }
.start-card b { display: block; font-size: 15px; margin-bottom: 2px; }
.start-card span { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- AI investigations */
a.ai-button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--panel); color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color .15s ease; }
a.ai-button .icon { width: 15px; height: 15px; }
a.ai-button:hover { background: var(--accent-soft); text-decoration: none; }
a.ai-button.compact { min-height: 24px; padding: 0 9px; font-size: 12px; gap: 4px; }
a.ai-button.compact .icon { width: 13px; height: 13px; }
a.ai-button.off { border-style: dashed; border-color: var(--input-border); color: var(--muted); font-weight: 500; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -2px 0 14px; }
.sev { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .3px; background: var(--info-bg); color: var(--info-ink); }
.sev.warning { background: var(--warn-bg); color: var(--warn-ink); }
.sev.high, .sev.critical { background: var(--err-bg); color: var(--err-ink); }
.sev.critical { box-shadow: inset 0 0 0 1px var(--err-ink); }
.badge.ai-status.succeeded { background: var(--ok-bg); color: var(--ok-ink); }
.badge.ai-status.failed, .badge.ai-status.rejected_budget, .badge.ai-status.rejectedbudget { background: var(--err-bg); color: var(--err-ink); }
.badge.ai-status.queued, .badge.ai-status.running, .badge.ai-status.needsinput { background: var(--warn-bg); color: var(--warn-ink); }
.ai-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ai-summary { border-left: 4px solid var(--info-ink); }
.ai-summary.sev-warning { border-left-color: var(--warn); }
.ai-summary.sev-high, .ai-summary.sev-critical { border-left-color: var(--err); }
.ai-summary-text { font-size: 15px; line-height: 1.6; margin: 0; }
.finding { border-left: 3px solid var(--line); padding: 4px 0 4px 16px; margin: 20px 0; }
.finding.sev-warning { border-left-color: var(--warn); }
.finding.sev-high, .finding.sev-critical { border-left-color: var(--err); }
.finding h3 { margin: 0 0 4px; font-size: 15px; }
.ai-cites .chip { margin: 2px 4px 2px 0; }
table.ai-actions { margin-top: 8px; }
table.ai-actions tr.urgency-now td:last-child { color: var(--err-ink); font-weight: 600; }
/* the Watch tab: one card per rule, its state on the left edge and in a badge */
.watch-rule { border-left: 4px solid var(--line); }
.watch-rule.breached { border-left-color: var(--err); }
.watch-rule.ok { border-left-color: var(--ok); }
.watch-rule.unknown { border-left-color: var(--warn); }
.watch-rule h2 .icon { color: var(--muted); }
.watch-rule.breached h2 .icon { color: var(--err); }
.watch-rule.ok h2 .icon { color: var(--ok); }
.watch-rule.unknown h2 .icon { color: var(--warn); }
.badge.watch-breached { background: var(--err-bg); color: var(--err-ink); }
.banner.identity .meter { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .35); margin: 8px 0 2px; overflow: hidden; }
.banner.identity .meter span { display: block; height: 100%; background: currentColor; border-radius: 4px; }
.banner.identity dl.identity-metrics { display: grid; grid-template-columns: 150px 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: 13px; }
.banner.identity dl.identity-metrics dd { margin: 0; }
.ack-form { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ack-form select, .ack-form input[type="text"] { font-size: 12px; padding: 2px 4px; max-width: 150px; }
.ack-form button { font-size: 12px; padding: 3px 8px; }
table.incidents td.small { font-size: 12px; }
.badge.watch-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.watch-unknown { background: var(--warn-bg); color: var(--warn-ink); }
.watch-rule details { margin-top: 10px; }
.watch-rule summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.watch-rule .banner { margin: 8px 0 0; }

/* the pre-check of one transaction / subscriber: a card (no script) or the same card inside a modal (ai.js) */
.ai-precheck { border-left: 4px solid var(--ok); }
.ai-precheck.found { border-left-color: var(--warn); }
.ai-precheck.confirmed { border-left-color: var(--line); }
.ai-precheck h2 .icon { color: var(--ok); }
.ai-precheck.found h2 .icon { color: var(--warn); }
.ai-precheck p .icon { width: 14px; height: 14px; vertical-align: -2px; }
.ai-checks { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 6px; }
.ai-checks li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; line-height: 1.45; }
.ai-checks li .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--ok); }
.ai-checks li.reason .icon { color: var(--err); }
.ai-checks li b { margin-right: 4px; }
.ai-checks li.reason b { color: var(--err-ink); }
.ai-checks li.ok span { color: var(--muted); }
.ai-checks li.ok b { color: var(--ink); font-weight: 500; }
.ai-precheck .actions { margin: 14px 0 0; }
.ai-precheck .actions a { text-decoration: none; }
.ai-precheck [hidden] { display: none; }   /* .actions is display: flex, which would otherwise beat the hidden attribute once the choice is made */
dialog.ai-dialog { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); padding: 0; width: min(680px, calc(100vw - 32px)); box-shadow: var(--shadow-md); }
dialog.ai-dialog::backdrop { background: rgba(8, 12, 20, .55); backdrop-filter: blur(2px); }
dialog.ai-dialog .ai-precheck { margin: 0; border-radius: var(--r-lg); box-shadow: none; border-width: 0 0 0 4px; }
.ai-preview dl { margin-bottom: 14px; }
.ai-send label { display: block; margin: 8px 0 6px; }
.ai-send textarea { width: 100%; max-width: 900px; min-height: 84px; padding: 8px 10px; }
.ai-send .actions { margin: 12px 0 0; }
.ai-json pre { max-height: 520px; overflow: auto; font-size: 12px; }
.ai-prompt pre { max-height: 640px; overflow: auto; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-prompt summary { cursor: pointer; }
.ai-prompt summary h2 { display: inline; }
.ai-sent-links .icon { width: 14px; height: 14px; vertical-align: -2px; }
.ai-question { margin: 4px 0 14px; }
.ai-working { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-working .icon { width: 20px; height: 20px; color: var(--accent); animation: ai-spin 1s linear infinite; }
.ai-dots { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: ai-pulse 1.2s ease-in-out infinite; }
@keyframes ai-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-lists h2 { font-size: 15px; }
.ai-export { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-export a { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 13px; font-weight: 500; }
.ai-export a:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.ai-feedback button .icon, .ai-send button .icon { width: 16px; height: 16px; }

/* print: a story pasted into a ticket - light colours whatever the theme, no navigation or buttons, every section open */
@media print {
  :root[data-theme], :root:not([data-theme]) {
    --bg: #ffffff; --panel: #ffffff; --panel-2: #f0f2f5; --hover: #ffffff; --ink: #1f2430; --muted: #5f6673; --line: #d5d9df;
    --input-bg: #ffffff; --input-border: #c9ced6; --accent: #1d3f8f; --accent-strong: #1d3f8f; --accent-fill: #2563d9; --accent-soft: #eef3ff; --on-accent: #ffffff;
    --ok: #1f8a4c; --warn: #b7791f; --err: #c0392b;
    --ok-bg: #dcf5e6; --ok-ink: #166534; --ok-line: #b7e4c7;
    --warn-bg: #fff1d6; --warn-ink: #92400e; --warn-line: #f3dca3;
    --err-bg: #fde4e1; --err-ink: #991b1b; --err-line: #f5c2bd;
    --info-bg: #e8e8f7; --info-ink: #4b3f8f;
    --chip-bg: #e8efff; --chip-ink: #1d3f8f;
    --badge-bg: #e5e7eb; --badge-ink: #374151;
    --err-row: #fff5f4; --warn-row: #fffbf0;
    --shadow-sm: none; --shadow-md: none;
    color-scheme: light;
  }
  .topbar, footer, .site-footer, .filters, .metric-switch, .actions, .skip-link, .copy-btn, .csv-link, .presets, #shortcuts, .sort-mark,
  .recent-searches, .restored, [data-copy-button], .ai-button, .ai-feedback, .ai-export, .hero-search, .start-cards { display: none !important; }
  main { max-width: none; padding: 0; }
  .table-wrap { overflow: visible !important; }
  table.grid thead { display: table-header-group; }
  table.grid tr, .stat, .tl, .card-head, .attention li { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  pre { max-height: none; overflow: visible; }
  a { color: inherit; text-decoration: underline; }
  .badge, .delta, .attention li, table.dashboard tr.flagged td, tr.lvl-error td, tr.lvl-warn td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
