/* Kejas FinOps — design tokens + components.
   Look: dark green-black surfaces, mint accent, mono uppercase labels, tight corners (see the v2 block at the end).
   Dark when the OS asks for it or [data-theme="dark"]; a matching light theme otherwise.
   Chart colours: categorical order aqua, orange, blue, yellow, magenta, green, violet, red - validated for
   colour-blind separation on both surfaces (dataviz validator); never reorder without re-running it. */
:root {
  color-scheme: light;
  --page: #f1f5f2;
  --surface: #fbfdfc;
  --surface-2: #e9f0ec;
  --field: #ffffff;
  --ink: #0b1511;
  --ink-2: #44554c;
  --ink-3: #75867d;
  --line: #dbe5df;
  --line-strong: #bfcec5;
  --ring: rgba(11, 21, 17, 0.09);
  --brand: #0c8a5e;
  --brand-ink: #ffffff;
  --brand-soft: #dcf2e8;
  --nav-bg: #0c1411;
  --nav-ink: #98a69e;
  --nav-ink-strong: #f1f6f2;
  --nav-active: rgba(84, 211, 160, 0.11);
  --good: #0ca30c;  --good-ink: #006300;
  --warning: #fab219; --warning-ink: #8a5a00;
  --serious: #ec835a;
  --critical: #d03b3b; --critical-ink: #b12a2a;
  --series-1: #1baf7a; --series-2: #eb6834; --series-3: #2a78d6; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948;
  --series-other: #b4b2a9;
  --radius: 6px;
  --radius-sm: 4px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(11, 21, 17, 0.04), 0 4px 16px rgba(11, 21, 17, 0.05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --page: #0d1210;
  --surface: #151b18;
  --surface-2: #1c2420;
  --field: #0f1512;
  --ink: #e9efea;
  --ink-2: #b2bdb6;
  --ink-3: #7b8780;
  --line: #232c27;
  --line-strong: #34413a;
  --ring: rgba(255, 255, 255, 0.07);
  --brand: #54d3a0;
  --brand-ink: #062116;
  --brand-soft: rgba(84, 211, 160, 0.13);
  --nav-bg: #0a0f0d;
  --nav-ink: #98a69e;
  --nav-ink-strong: #f1f6f2;
  --nav-active: rgba(84, 211, 160, 0.10);
  --good: #0ca30c;  --good-ink: #3fcf8c;
  --warning: #fab219; --warning-ink: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b; --critical-ink: #ef7373;
  --series-1: #199e70; --series-2: #d95926; --series-3: #3987e5; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --series-other: #5f6b64;
  --radius: 6px;
  --radius-sm: 4px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d1210;
  --surface: #151b18;
  --surface-2: #1c2420;
  --field: #0f1512;
  --ink: #e9efea;
  --ink-2: #b2bdb6;
  --ink-3: #7b8780;
  --line: #232c27;
  --line-strong: #34413a;
  --ring: rgba(255, 255, 255, 0.07);
  --brand: #54d3a0;
  --brand-ink: #062116;
  --brand-soft: rgba(84, 211, 160, 0.13);
  --nav-bg: #0a0f0d;
  --nav-ink: #98a69e;
  --nav-ink-strong: #f1f6f2;
  --nav-active: rgba(84, 211, 160, 0.10);
  --good: #0ca30c;  --good-ink: #3fcf8c;
  --warning: #fab219; --warning-ink: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b; --critical-ink: #ef7373;
  --series-1: #199e70; --series-2: #d95926; --series-3: #3987e5; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --series-other: #5f6b64;
  --radius: 6px;
  --radius-sm: 4px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.muted { color: var(--ink-3); }
.secondary { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.small { font-size: 12px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--nav-bg); color: var(--nav-ink); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; color: var(--nav-ink-strong); }
.brand-k { width: 30px; height: 30px; flex: none; color: var(--brand); }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.brand-sub { font-size: 11px; color: var(--nav-ink); display: block; margin-top: -3px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); padding: 0 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--nav-ink); font-weight: 500; }
.nav-link:hover { background: var(--nav-active); color: var(--nav-ink-strong); text-decoration: none; }
.nav-link.active { background: var(--nav-active); color: var(--nav-ink-strong); }
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.07); padding: 12px 8px 0; font-size: 12px; }
.sidebar-foot .who { color: var(--nav-ink-strong); font-weight: 600; }
.linkish { background: none; border: 0; color: var(--nav-ink); padding: 0; cursor: pointer; font: inherit; text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 12px 28px; }
.filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.filterbar .field { display: flex; flex-direction: column; gap: 3px; }
.filterbar label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1600px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pill.native { background: color-mix(in srgb, var(--series-3) 16%, transparent); color: var(--ink); }

/* ---------- form controls */
input, select, textarea, button { font: inherit; color: inherit; }
.input, select.input { height: 36px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); min-width: 0; }
.input:focus, select.input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 1px; border-color: var(--brand); }
.btn { height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--critical-ink); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid .field { display: flex; flex-direction: column; gap: 4px; }
.form-grid label, .stack label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg a { padding: 7px 12px; color: var(--ink-2); font-weight: 600; font-size: 13px; border-right: 1px solid var(--line-strong); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--brand); color: var(--brand-ink); }
.seg a:hover { text-decoration: none; }

/* ---------- cards & grid */
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card-head p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }
.card.flush { padding: 0; }
.card.flush .card-head { padding: 18px 20px 0; }

.stat .label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 650; margin-top: 4px; letter-spacing: -0.02em; }
.stat.hero .value { font-size: 44px; }
.stat .delta { font-size: 12px; margin-top: 4px; color: var(--ink-3); }
.delta .up { color: var(--critical-ink); font-weight: 600; }     /* cost up = bad */
.delta .down { color: var(--good-ink); font-weight: 600; }

.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 360px; }
.chart-box.short { height: 220px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tfoot td { font-weight: 700; border-top: 1px solid var(--line-strong); border-bottom: 0; }
table.data th.num { text-align: right; }
.truncate { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--series-1); }

/* ---------- status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status.good::before, .status.completed::before { background: var(--good); }
.status.warning::before, .status.processing::before, .status.queued::before { background: var(--warning); }
.status.superseded { color: var(--ink-3); }
.status.critical::before, .status.failed::before { background: var(--critical); }
.meter { height: 8px; border-radius: 4px; background: var(--brand-soft); overflow: hidden; position: relative; }
.meter > span { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.meter.warning > span { background: var(--warning); }
.meter.critical > span { background: var(--critical); }
.meter .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }

/* ---------- flash / empty */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); display: flex; gap: 10px; align-items: center; }
.flash.success { border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.flash.error { border-color: color-mix(in srgb, var(--critical) 55%, transparent); }
.flash .icon { font-weight: 700; }
.flash.success .icon { color: var(--good-ink); }
.flash.error .icon { color: var(--critical-ink); }
.empty { text-align: center; padding: 56px 20px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 520px; margin: 0 auto 16px; }
.note { font-size: 12px; color: var(--ink-3); border-left: 3px solid var(--line-strong); padding-left: 10px; }
.profile-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.profile-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface-2); }
.profile-card h3 { margin-bottom: 6px; }
.profile-card ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: ui-monospace, Menlo, monospace; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.chip.bad { border-color: color-mix(in srgb, var(--critical) 50%, transparent); }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: radial-gradient(1200px 640px at 8% 6%, #17402f 0%, #0b120f 62%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero h1 { font-size: 40px; line-height: 1.1; margin: 24px 0 12px; }
.auth-hero p { color: var(--nav-ink); max-width: 460px; font-size: 15px; }
.auth-hero ul { color: var(--nav-ink); padding-left: 18px; }
.auth-panel { display: grid; place-items: center; padding: 32px 16px; background: var(--page); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 22px; margin-bottom: 4px; }
.auth-card .input { width: 100%; }
.auth-card .btn { width: 100%; justify-content: center; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
  .nav-group { flex-direction: row; flex-wrap: wrap; }
  .nav-title, .sidebar-foot, .brand-sub { display: none; }
  .brand { padding: 0 8px 0 0; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .stat.hero .value { font-size: 34px; }
}

/* ---------- tags */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: -4px; }
.tabs a { padding: 8px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.card-link { color: inherit; display: block; }
.card-link:hover { text-decoration: none; border-color: var(--brand); }
.pill.warn { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--ink); }
.pill.virtual { background: color-mix(in srgb, var(--series-7) 18%, transparent); color: var(--ink); }
.pill { margin-left: 4px; }
table.data tr.selected { background: var(--brand-soft); }
.bad-link { color: var(--critical-ink); }
.chip-key { border-color: var(--brand); background: var(--brand-soft); }
.map-form { display: flex; gap: 6px; align-items: center; }
details.inline-edit { display: inline-block; position: relative; }
details.inline-edit summary { list-style: none; }
details.inline-edit summary::-webkit-details-marker { display: none; }
details.inline-edit[open] form { position: absolute; right: 0; z-index: 10; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.spin { display: inline-block; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* ---------- tag governance */
.gov-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr); gap: 24px; }
.gov-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 8px; font-weight: 600; }
.value-list { display: flex; flex-direction: column; }
.value-row { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto; gap: 12px; align-items: center; padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--ink); border-radius: 6px; }
.value-row:hover { background: var(--surface-2); text-decoration: none; }
.value-name { font-weight: 600; }
.value-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.value-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.value-group .input { font-weight: 600; }
label.chip { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
label.chip input { margin: 0; }
label.chip.removable input { display: none; }
label.chip.removable:has(input:checked) { text-decoration: line-through; opacity: 0.55; border-color: var(--critical); }
details.card summary { cursor: pointer; }
@media (max-width: 960px) { .gov-grid { grid-template-columns: 1fr; } }

/* ---------- explorer filters / multi-select */
.explorer-filters { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; }
.ef-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 16px; align-items: end; }
.ef-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ef-label { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.ef-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); height: 38px; }
.ef-pair:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.ef-pair > select.input, .ef-pair .ms-summary { border: 0; height: 36px; border-radius: 0; background: transparent; outline: none; width: 100%; min-width: 0; max-width: none; }
.ef-pair > select.input { border-right: 1px solid var(--line); border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-weight: 600; }
.ef-pair .ms { min-width: 0; }
.ef-pair .ms[open] .ms-summary { outline: none; background: var(--surface-2); }
.ef-pair .ms-summary { color: var(--ink); }
.ms-disabled { color: var(--ink-3) !important; cursor: not-allowed; font-style: italic; }
.ms-disabled::after { display: none; }
.ef-seg { height: 38px; }
.ef-seg button { border: 0; border-right: 1px solid var(--line-strong); background: var(--surface); padding: 0 14px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ef-seg button:last-child { border-right: 0; }
.ef-seg button.on { background: var(--brand); color: var(--brand-ink); }
.ef-seg button:hover:not(.on) { background: var(--surface-2); }
.ef-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.ef-active .ef-label { margin-right: 4px; }
.ef-active .chip { font-family: var(--font); font-size: 12px; padding: 3px 10px; border-radius: 999px; color: var(--ink); }
.ef-active .chip:hover { border-color: var(--critical); text-decoration: none; }
@media (max-width: 1280px) { .ef-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ef-narrow { justify-self: start; } }
@media (max-width: 720px) { .ef-grid { grid-template-columns: 1fr; } .ef-pair { grid-template-columns: 1fr 1fr; } }
.ms { position: relative; }
.ms-summary { display: flex; align-items: center; min-width: 170px; max-width: 260px; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 28px; position: relative; }
.ms-summary::-webkit-details-marker { display: none; }
.ms-summary::after { content: "▾"; position: absolute; right: 10px; color: var(--ink-3); }
.ms[open] .ms-summary { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.ms-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 320px; max-width: 86vw; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ms-search { width: 100%; }
.ms-actions { display: flex; gap: 12px; font-size: 12px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 600; font-size: 12px; }
.ms-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; }
.ms-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 6px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ms-item:hover { background: var(--surface-2); }
.ms-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-cost { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ms-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 8px; }
.ms-item { text-transform: none; letter-spacing: normal; font-size: 13px; color: var(--ink); }
.ms-item .ms-cost { font-size: 12px; color: var(--ink-3); }
.ms-item input { accent-color: var(--brand); }
.ef-pair > select.input:focus, .ef-pair .ms-summary:focus { outline: none; }

/* ---------- forecast */
.fc-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.fc-model { align-self: center; }
.scenario-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scenario-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.scenario-head h2 { margin-right: auto; }
.scenario dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.scenario dt { font-size: 12px; color: var(--ink-3); }
.scenario dd { margin: 2px 0 0; font-size: 18px; font-weight: 650; }
.scenario.medium { border-color: color-mix(in srgb, var(--series-2) 45%, transparent); }
.scen-low { background: var(--series-3); } .scen-medium { background: var(--series-2); } .scen-high { background: var(--series-7); }
table.data tr.fc-start td { border-top: 2px solid var(--brand); }
@media (max-width: 1100px) { .scenario-cards { grid-template-columns: 1fr; } .fc-grid { grid-template-columns: 1fr; } }

/* ---------- forecast v2 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fc-controls { display: flex; flex-direction: column; gap: 16px; }
.fc-controls .card-head { margin: 0; align-items: center; }
.presets { display: flex; align-items: center; gap: 6px; }
.presets .ef-label { margin-right: 4px; }
.scenario-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.scenario-inputs .scenario { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.scenario-inputs .scenario.medium { border-color: color-mix(in srgb, var(--series-2) 55%, transparent); background: color-mix(in srgb, var(--series-2) 6%, var(--surface)); }
.scenario-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.scenario-inputs .scenario-head { margin-bottom: 0; }
.scenario-inputs .scenario-head h3 { font-size: 14px; }
.pct-input { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.pct-input .input { width: 92px; height: 40px; font-size: 22px; font-weight: 650; padding: 0 8px; text-align: right; }
.pct-input .unit { color: var(--ink-3); font-weight: 600; }
.scenario-inputs dl { grid-template-columns: repeat(3, auto); gap: 8px 14px; justify-content: space-between; }
.scenario-inputs dd { font-size: 16px; white-space: nowrap; }
.basis-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.dirty-bar { border-color: color-mix(in srgb, var(--warning) 60%, transparent); }
.fc-stats { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-bottom: 8px; }
.fc-stats > div { display: flex; flex-direction: column; gap: 2px; }
.fc-stats strong { font-size: 20px; letter-spacing: -0.01em; }
.chart-box.fc-chart { height: 400px; }
.seg button { border: 0; border-right: 1px solid var(--line-strong); background: var(--surface); padding: 7px 12px; color: var(--ink-2); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.rc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); }
.tile strong { font-size: 20px; letter-spacing: -0.01em; }
.rc-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
tr.in-basis td { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.basis-mark { color: var(--brand); font-weight: 700; width: 24px; }
.basis-form { display: flex; flex-direction: column; gap: 10px; }
.basis-option { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; background: var(--surface); }
.basis-option:hover { background: var(--surface-2); }
.basis-option.on, .basis-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.basis-option input { accent-color: var(--brand); }
.bo-body { display: flex; flex-direction: column; }
.bo-title { font-weight: 650; }
.bo-help { font-size: 12px; color: var(--ink-2); }
.bo-value { text-align: right; font-weight: 650; display: flex; flex-direction: column; }
.bo-value small { color: var(--ink-3); font-weight: 500; font-size: 11px; }
@media (max-width: 1100px) { .scenario-inputs { grid-template-columns: 1fr; } .rc-grid { grid-template-columns: 1fr; } .chart-box.fc-chart { height: 340px; } }

@media (max-width: 1280px) { .fc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .fc-grid { grid-template-columns: 1fr; } .presets { flex-wrap: wrap; } }
.grid > *, .rc-grid > *, .scenario-inputs > *, .profile-cards > * { min-width: 0; }
table.data.compact th, table.data.compact td { padding: 8px 8px; }
table.data.compact td.num { font-size: 13px; }
.seg button { white-space: nowrap; }

/* ---------- usage optimization */
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 700; text-align: center; border: 1px solid var(--line); }
.tabs a.on .tab-count { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.stat .value .per { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.evidence-rows { display: flex; flex-direction: column; gap: 14px; }
.evidence-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; }
.evidence-row .pill { justify-content: center; margin: 0; }
dl.rules { margin: 0; display: grid; grid-template-columns: 100px 1fr; gap: 10px 14px; }
dl.rules dt { font-weight: 650; }
dl.rules dd { margin: 0; color: var(--ink-2); }
.opt-table td { vertical-align: top; }
.opt-find { min-width: 280px; max-width: 460px; }
.opt-filters { grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) auto; }
details.thresholds { border-top: 1px solid var(--line); padding-top: 10px; }
details.thresholds summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
@media (max-width: 1100px) { .opt-filters { grid-template-columns: 1fr 1fr; } .evidence-row { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .opt-filters { grid-template-columns: 1fr; } dl.rules { grid-template-columns: 1fr; } }
.opt-table .chip { font-family: var(--font); font-size: 11px; white-space: normal; }
.opt-table .pill, .opt-table .status { white-space: nowrap; }
.opt-evidence { white-space: nowrap; }
.opt-evidence .status { margin-top: 4px; }
.opt-find { min-width: 260px; max-width: 380px; }
.tabs { overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; }
.opt-find { min-width: 230px; max-width: 340px; }
.opt-table td:first-child { max-width: 210px; }
.opt-table td:last-child { padding-right: 14px; }

/* ---------- lifecycle chips, hover cards, notifications */
.lc { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; margin-top: 3px; }
.lc.good { border-color: color-mix(in srgb, var(--good) 45%, transparent); color: var(--good-ink); }
.lc.warning { border-color: color-mix(in srgb, var(--warning) 70%, transparent); background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--ink); }
.lc.critical { border-color: color-mix(in srgb, var(--critical) 60%, transparent); background: color-mix(in srgb, var(--critical) 12%, transparent); color: var(--critical-ink); }
.opt-sku { min-width: 150px; }
.sku { font-size: 12px; font-weight: 600; word-break: break-all; }
.tab-count.tab-alert { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--critical-ink); border-color: transparent; }
.flash.eol-alert { border-color: color-mix(in srgb, var(--critical) 50%, transparent); }
.status.notice::before { background: var(--series-1); }
.eol-card { display: block; }
.eol-mini { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.eol-mini > div { display: flex; align-items: center; gap: 8px; }
.eol-mini strong { font-size: 20px; }
tr[data-pop] { cursor: help; }
tr[data-pop]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.kj-pop { position: fixed; z-index: 60; width: 360px; max-width: 92vw; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.28); padding: 12px 14px; font-size: 12.5px; pointer-events: none; }
.kj-pop[hidden] { display: none; }
.pop-title { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
.pop-rows { margin: 0 0 8px; display: grid; gap: 3px; }
.pop-rows > div { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.pop-rows dt { color: var(--ink-3); }
.pop-rows dd { margin: 0; word-break: break-word; }
.pop-bars { display: grid; gap: 6px; margin: 8px 0; }
.pop-bar-row { display: grid; grid-template-columns: 104px 1fr 44px; gap: 8px; align-items: center; }
.pop-bar-row em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pop-bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: visible; }
.pop-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--series-1); }
.pop-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }
.pop-legend { font-size: 11px; color: var(--ink-3); }
.pop-checks { list-style: none; padding: 8px 0 0; margin: 4px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.pop-checks li::before { display: inline-block; width: 16px; font-weight: 700; }
.pop-checks li.ok::before { content: "✓"; color: var(--good-ink); }
.pop-checks li.warn::before { content: "!"; color: var(--critical-ink); }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--critical); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.notif { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: start; }
.notif:last-child { border-bottom: 0; }
.notif .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--ink-3); }
.notif.critical .dot { background: var(--critical); } .notif.warning .dot { background: var(--warning); } .notif.info .dot { background: var(--series-1); }
.notif.unread { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.notif.unread h3 { font-weight: 700; }
.notif pre { margin: 6px 0 0; white-space: pre-wrap; font-family: var(--font); font-size: 12.5px; color: var(--ink-2); }
.recent-alerts { display: grid; gap: 6px; }
.recent-alert { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; color: var(--ink); padding: 6px 8px; border-radius: 8px; }
.recent-alert:hover { background: var(--surface-2); text-decoration: none; }
.recent-alert .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--series-1); }
.recent-alert.critical .dot { background: var(--critical); } .recent-alert.warning .dot { background: var(--warning); }
.opt-find { min-width: 220px; max-width: 320px; }
.opt-table td:first-child { max-width: 190px; }

/* =====================================================================================
   Look & feel v2 - visual only. Dark green-black surfaces, mint accent, small mono
   uppercase labels, tight corners. Layout, content and behaviour are unchanged.
   ===================================================================================== */
body { font-family: var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: color-mix(in srgb, var(--brand) 32%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }

/* micro-labels: mono, uppercase, tracked */
.nav-title, .ef-label, .filterbar label, .stat .label, table.data th, .gov-label, .brand-sub,
.card-head h2, .card-head h3 { font-family: var(--mono); text-transform: uppercase; }
.nav-title { font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-3); padding-left: 10px; }
.filterbar label, .ef-label, .gov-label { font-size: 10.5px; letter-spacing: 0.1em; font-weight: 600; color: var(--ink-3); }
.card-head h2, .card-head h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; color: var(--ink); }
.card-head p { text-transform: none; }
.stat .label { font-size: 10.5px; letter-spacing: 0.1em; font-weight: 600; color: var(--ink-3); }
.stat .value { font-weight: 600; letter-spacing: -0.025em; }
.stat.hero .value { font-size: 46px; }

/* brand */
.brand { gap: 11px; padding: 2px 8px 14px; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; text-transform: lowercase; line-height: 1; }
.brand-sub { font-size: 9.5px; letter-spacing: 0.17em; color: var(--nav-ink); margin-top: 5px; }
.auth-hero .brand-k { width: 36px; height: 36px; }
.auth-hero h1 { font-weight: 600; letter-spacing: -0.03em; }
.auth-hero .brand-sub { color: var(--nav-ink); }

/* sidebar: mint dot marks the current page */
.sidebar { border-right: 1px solid rgba(255, 255, 255, 0.06); padding: 18px 12px; }
.nav-link { border-radius: var(--radius-sm); padding: 7px 10px; font-size: 13.5px; }
.nav-link.active { background: var(--nav-active); color: var(--nav-ink-strong); }
.nav-link.active::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.nav-link.active:has(.nav-badge)::after { margin-left: 8px; }
.nav-link.active svg { color: var(--brand); opacity: 1; }
.nav-badge { border-radius: 4px; }

/* surfaces */
.topbar { border-bottom-color: var(--line); }
.card { border-color: var(--line); border-radius: var(--radius); }
.card-link:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.kj-pop { border-radius: var(--radius); }
.flash { border-radius: var(--radius-sm); }
.note { border-left-color: var(--brand); }
.profile-card, .tile, .value-group, .scenario-inputs .scenario { border-radius: var(--radius); }

/* tables */
table.data th { font-size: 10.5px; letter-spacing: 0.08em; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--line-strong); }
table.data tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
table.data tfoot td { border-top-color: var(--line-strong); }
.bar-track, .bar-fill, .meter, .meter > span, .pop-bar, .pop-bar i { border-radius: 2px; }

/* controls */
.btn { border-radius: var(--radius-sm); background: var(--surface-2); border-color: var(--line-strong); font-size: 13px; }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 78%, var(--brand) 9%); border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong)); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand); filter: brightness(1.08); }
.btn.danger { color: var(--critical-ink); }
.input, select.input { background: var(--field); border-color: var(--line-strong); border-radius: var(--radius-sm); }
.ef-pair { background: var(--field); border-radius: var(--radius-sm); }
.ef-pair > select.input, .ef-pair .ms-summary { background: transparent; }
.ms-panel { border-radius: var(--radius); }
.seg, .ef-seg { border-radius: var(--radius-sm); }
.tabs a { font-size: 13px; }

/* badges: squared, mono */
.pill { border-radius: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.pill.native { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.status { border-radius: 4px; font-family: var(--mono); font-size: 11px; background: transparent; }
.chip, .lc, .tab-count { border-radius: 4px; }
.lc { font-family: var(--mono); font-size: 10.5px; }
.lc.good { background: color-mix(in srgb, var(--good) 10%, transparent); }
.swatch { border-radius: 2px; }
.status.good::before, .status.completed::before { background: var(--brand); }
.opt-table th, .opt-table td { padding-left: 8px; padding-right: 8px; }
table.data.compact .bar-cell { min-width: 70px; }
table.data.compact th { letter-spacing: 0.06em; }
.grid.fc-tables { grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.3fr); }
.opt-find { min-width: 200px; max-width: 290px; }
@media (max-width: 1100px) { .grid.fc-tables { grid-template-columns: 1fr; } }
.grid.fc-tables { grid-template-columns: 1fr; }
.opt-find { min-width: 190px; }
/* informational dots are blue so they never read as "healthy" next to the mint brand colour */
.status.notice::before, .notif.info .dot, .recent-alert .dot { background: var(--series-3); }
.recent-alert.critical .dot, .notif.critical .dot { background: var(--critical); }
.recent-alert.warning .dot, .notif.warning .dot { background: var(--warning); }

/* ---------- commitments inventory */
.commit-table td { vertical-align: top; }
.commit-table .applied { min-width: 200px; max-width: 300px; }
.commit-table .util { min-width: 150px; white-space: nowrap; }
.util-bar { height: 6px; width: 110px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-bottom: 4px; }
.util-bar i { display: block; height: 100%; border-radius: 2px; background: var(--good); }
.util-bar i.good { background: var(--brand); } .util-bar i.warning { background: var(--warning); } .util-bar i.critical { background: var(--critical); }
.exp { width: 26px; height: 26px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2); border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 1; }
.exp:hover { border-color: var(--brand); color: var(--brand); }
tr.detail-row > td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); padding: 14px 16px 18px; border-bottom: 1px solid var(--line-strong); }
.cdetail { display: grid; gap: 12px; }
.cd-top { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.cd-top > div { display: flex; flex-direction: column; gap: 2px; }
.cd-top strong { font-size: 18px; }
.cd-applied { display: grid; gap: 6px; }
.cd-applied .chips .muted { margin-right: 4px; min-width: 62px; }

/* ---------- integrations */
.int-card { display: flex; flex-direction: column; }
.int-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
pre.code { background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; font-family: var(--mono); font-size: 11.5px; overflow-x: auto; margin: 6px 0; }
details.card > summary { cursor: pointer; }
section > .card-head { margin: 0 0 10px; }
.good-text { color: var(--good-ink); }
.rec { padding: 12px 0; border-top: 1px solid var(--line); }
.rec:first-of-type { border-top: 0; padding-top: 0; }
.rec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .form-grid .field[style*="span 2"] { grid-column: auto !important; }
  .form-grid .field input.input, .form-grid .field select.input { min-width: 0; max-width: 100%; }
  .chips { flex-wrap: wrap; }
}
.data tfoot td { position: sticky; bottom: 0; background: var(--surface-2); }

/* ---------- cost variance */
.grid.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.kpis.four { grid-template-columns: 1fr; } }
.value.vsm { font-size: 20px; line-height: 1.3; }
.vtext.up, .vpct.up { color: var(--critical-ink); } .vtext.down, .vpct.down { color: var(--good-ink); } .vtext.flat, .vpct.flat { color: var(--ink-3); }
.vtext { font-weight: 600; }
.export-group { display: flex; gap: 8px; }
.periodbar { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; }
.periodbar .field select { min-width: 210px; }
.periodbar .vs { padding-bottom: 8px; }
.mover { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.mover:first-of-type { border-top: 0; }
.vhead { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.vtools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vtable { font-variant-numeric: tabular-nums; }
.vtable tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.vtable tbody tr:hover { background: var(--surface-2); }
.vtable tbody tr[hidden] { display: none; }
.vtable thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.vname { max-width: 340px; }
.vname strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cloud { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--line-strong); color: var(--ink-2); }
.cloud[data-cloud="AWS"] { border-color: var(--series-2); color: var(--series-2); }
.cloud[data-cloud="Microsoft"] { border-color: var(--series-3); color: var(--series-3); }
.cloud[data-cloud="Google Cloud"] { border-color: var(--series-6); color: var(--series-6); }
.vchip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.vchip.up { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--critical-ink); }
.vchip.down { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good-ink); }
.vchip.flat { background: var(--surface-2); color: var(--ink-3); }
.vbar-c { width: 130px; } .vbar-h { width: 130px; }
.vbar { position: relative; height: 8px; background: var(--surface-2); border-radius: 4px; }
.vbar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.vbar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.vbar i.up { background: var(--critical); } .vbar i.down { background: var(--good); }
.vtable tfoot td { font-weight: 700; padding-top: 12px; padding-bottom: 12px; border-top: 2px solid var(--line-strong); background: var(--surface-2); position: sticky; bottom: 0; }
.vfoot { padding: 8px 20px 14px; }

.card.hero .value.vsm { font-size: 20px; line-height: 1.3; }

/* ---------- scheduler */
.sch-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.preset { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.preset span { font-size: 12px; color: var(--ink-3); }
.preset.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.sch-custom { margin-bottom: 12px; }
.sch-grid-wrap { overflow-x: auto; }
.sch-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(14px, 1fr)); gap: 2px; min-width: 520px; }
.sch-grid .gh, .sch-grid .gd { font-size: 10px; color: var(--ink-3); line-height: 16px; }
.sch-grid .gc { height: 16px; border-radius: 3px; background: var(--surface-2); }
.sch-grid .gc.on { background: var(--good); } .sch-grid .gc.q { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 3px, var(--line) 3px, var(--line) 5px); }
.sch-legend { display: flex; gap: 16px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.sch-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--surface-2); vertical-align: -2px; margin-right: 4px; border: 1px solid var(--line); }
.sch-legend i.on { background: var(--good); border-color: var(--good); }
.sch-table tr.sel { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.spark { width: 120px; height: 28px; display: block; } .spark .bon { fill: var(--series-1); } .spark .boff { fill: var(--line-strong); }
.risk { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.risk.ok { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good-ink); }
.risk.busy { background: color-mix(in srgb, var(--critical) 18%, transparent); color: var(--critical-ink); }

/* ---------- recommendation source */
.src-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 5px; }
.src { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; border: 1px solid; }
.src-kejas { color: var(--brand); border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.src-advisor { color: var(--series-3); border-color: var(--series-3); background: color-mix(in srgb, var(--series-3) 12%, transparent); }
.src-plus { color: var(--ink-3); font-weight: 700; }
.adv-note { margin-top: 8px; padding: 7px 9px; border-left: 3px solid var(--series-3); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.adv-note.agree { border-left-color: var(--good); } .adv-note.differ { border-left-color: var(--warning, #d8a31a); }
.adv-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.src-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.src-summary strong { font-size: 22px; margin-left: 6px; }
.opt-table { table-layout: auto; }
.opt-table .opt-find { width: 27%; min-width: 230px; }
.opt-table .opt-sku { min-width: 150px; max-width: 230px; }
.opt-table .opt-evidence { min-width: 140px; max-width: 170px; }
.opt-table td.num { min-width: 110px; white-space: nowrap; }
.pay-chip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); white-space: nowrap; }
.pay-all { color: var(--series-3); border-color: var(--series-3); } .pay-partial { color: var(--series-4); border-color: var(--series-4); }
.pay-none { color: var(--good-ink); border-color: var(--good); } .pay-unknown { color: var(--ink-3); }
.paymix { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }

/* ---------- forecast accuracy & near term */
.near-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.near-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.near-tile strong { font-size: 22px; }
.near-tile.hl { border-color: var(--brand); }
.acc-badge { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); white-space: nowrap; }
.acc-good { color: var(--good-ink); border-color: var(--good); } .acc-fair { color: var(--series-4); border-color: var(--series-4); } .acc-weak { color: var(--critical-ink); border-color: var(--critical); }

/* ---------- pill pickers + add-filter (cost explorer style) */
.fp { position: relative; display: inline-block; }
.fpill, .fadd { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fpill:hover, .fadd:hover { background: var(--surface-2); }
.fpill[aria-expanded="true"], .fadd[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 28%, transparent); }
.fpill .ico { width: 15px; height: 15px; color: var(--ink-3); }
.fpill .fp-key { color: var(--ink-3); } .fpill .fp-val { font-weight: 600; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.fpill .caret { width: 11px; height: 11px; color: var(--ink-3); }
.fadd { border-style: dashed; color: var(--brand); font-weight: 600; }
.fpanel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 300px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); padding: 8px; }
.fpanel[hidden] { display: none; }
.fpanel.wide { width: 360px; } .fpanel.narrow { width: 170px; }
.fp-list { list-style: none; margin: 0; padding: 0; }
.fp-list li[hidden], .fp-cap[hidden], .fp-list[hidden] { display: none; }
.fp-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.fp-item:hover:not(:disabled) { background: var(--surface-2); } .fp-item:disabled { color: var(--ink-3); cursor: not-allowed; }
.fp-item .tick { width: 14px; color: var(--brand); font-weight: 700; } .fp-item.sel { font-weight: 600; }
.fp-cap { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 10px 10px 4px; }
.fp-sep { height: 1px; background: var(--line); margin: 6px 0; }
.fp-search { width: 100%; margin-bottom: 4px; }
.fp-scroll { max-height: 320px; overflow-y: auto; }
.fp-title { font-weight: 700; padding: 4px 6px 8px; }
.fp-custom { padding: 4px 6px 2px; }
.fp-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.fp-dates label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--ink-3); }
.fp-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.fp-foot.split { justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 6px; }
.fp-values .ms-item { grid-template-columns: 18px 1fr auto; }
.ex-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.ex-sep { width: 1px; height: 24px; background: var(--line-strong); margin: 0 2px; }
.ex-chips { display: contents; }
.fchip { display: inline-flex; align-items: center; height: 36px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent); background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--ink); font-size: 13px; overflow: hidden; }
.fchip-main, .fchip-x { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; height: 100%; }
.fchip-main { padding: 0 6px 0 12px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip-x { padding: 0 10px; font-size: 16px; line-height: 1; color: var(--ink-2); } .fchip-x:hover { color: var(--critical-ink); }
.ex-clear { display: inline-flex; align-items: center; gap: 6px; height: 36px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.ex-clear:hover { color: var(--critical-ink); }
.ex-note { flex-basis: 100%; }
.topbar .filterbar .fp { align-self: end; }
@media (max-width: 720px) { .fpanel, .fpanel.wide { position: fixed; left: 12px; right: 12px; top: auto; width: auto; max-width: none; bottom: 12px; max-height: 70vh; overflow: auto; } }

/* ---------- tags page */
.grid.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 800px) { .grid.kpis.three { grid-template-columns: 1fr; } }
.pies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 800px) { .pies { grid-template-columns: 1fr; } }
.pie-wrap { margin: 0; display: flex; align-items: center; gap: 22px; }
.pie-box { position: relative; width: 190px; height: 190px; flex: none; }
.pie-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.pie-center strong { font-size: 28px; } .pie-center span { font-size: 12px; color: var(--ink-3); }
.pie-wrap h3 { margin: 0 0 8px; font-size: 14px; }
.pie-key { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.pie-key:hover { text-decoration: underline; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; } .dot.yes { background: var(--series-1); } .dot.no { background: var(--series-2); }
.tagcell { max-width: 460px; }
.tagchip { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 11.5px; margin: 2px 4px 2px 0; overflow: hidden; max-width: 220px; white-space: nowrap; }
.tagchip b { background: var(--surface-2); padding: 1px 7px; font-weight: 600; color: var(--ink-2); } .tagchip { color: var(--ink); }
.tagchip { padding-right: 7px; } .tagchip b { margin-right: 6px; }
.tagchip.virt { border-style: dashed; border-color: var(--series-7); } .tagchip.virt b { color: var(--series-7); }
.tagchip.more { padding: 1px 8px; color: var(--ink-3); }
.notags { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical-ink); margin-right: 6px; }
.tagchip .tv { overflow: hidden; text-overflow: ellipsis; padding-right: 7px; }
.tagchip { padding-right: 0; max-width: 190px; }
.tagcell { min-width: 300px; white-space: normal; }

/* ---------- virtual tag builder */
.vt-scopes .preset.more { cursor: default; } .vt-scopes .preset.more select { height: 32px; margin-top: 2px; }
.vt-picker { border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.vt-picker-head { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.vt-picker-head .input { max-width: 280px; height: 34px; } .vt-picker-head .linkbtn { margin-left: auto; }
.vt-list { max-height: 300px; overflow-y: auto; }
.vt-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 90px; gap: 10px; align-items: center; padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.vt-row:hover { background: var(--surface-2); } .vt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.vt-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.vt-preview { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--brand); font-size: 13.5px; }
.vt-adv { margin-top: 12px; } .vt-adv summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.chip.pickable { cursor: pointer; font-family: var(--font); } .chip.pickable.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.vt-defined { grid-column: 1 / -1; }
@media (max-width: 560px) { .pie-wrap { flex-direction: column; align-items: flex-start; gap: 10px; } .pie-box { width: 160px; height: 160px; } .vt-row { grid-template-columns: 22px minmax(0, 1fr) 80px; } .vt-row .small { display: none; } }

/* ---------- bill reconcile */
.sec-title { margin: 22px 0 10px; font-size: 15px; letter-spacing: .02em; }
.dbar { position: relative; height: 8px; background: var(--surface-2); border-radius: 4px; margin: 4px 0 5px; }
.dbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--series-1); }
.dbar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.rec-details summary { cursor: pointer; padding: 6px 14px; color: var(--ink-2); font-size: 13px; }
.rec-details > table, .rec-details > .chips { margin: 0 14px; width: calc(100% - 28px); }
tr.detail-row td { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.pie-key { cursor: pointer; border-radius: 6px; padding: 5px 8px; margin-left: -8px; }
.pie-key:hover { background: var(--surface-2); text-decoration: none; }
.pie-key.sel { background: color-mix(in srgb, var(--brand) 14%, transparent); outline: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.showing { padding: 9px 20px; background: color-mix(in srgb, var(--brand) 10%, transparent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.showing a { margin-left: 10px; }
#resources { scroll-margin-top: 70px; }
.tagcell { min-width: 230px; } .tagchip { max-width: 150px; }

/* ---------- cost increases / email */
.email-preview { background: #fff; color: #1c2b27; border-radius: 10px; padding: 22px 26px; overflow-x: auto; }
.email-preview a { color: #0c8a5e; }
.stack .field { display: flex; flex-direction: column; gap: 4px; }
.profile-cards.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.profile-card.choose { display: flex; flex-direction: column; gap: 6px; } .profile-card.choose .btn { margin-top: auto; align-self: flex-start; }

/* Savings tracker */
.linklike { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; }
.linklike:hover { text-decoration: underline; }
.sv-flow { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.sv-note { border-left: 3px solid var(--brand); padding: 8px 12px; margin: 0 0 14px; }

/* Export dropdown (one button, a short menu of formats) */
.export-menu { position: relative; display: inline-block; }
.export-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 270px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); display: flex; flex-direction: column; gap: 2px; }
.export-pop[hidden] { display: none; }
.export-pop > * { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: none;
  color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; }
.export-pop > *:hover, .export-pop > *:focus-visible { background: var(--surface-2); text-decoration: none; }
.export-pop span { color: var(--ink-3); font-size: 12px; font-weight: 400; }

/* Cost variance: reasons panel on the right */
.var-layout { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 20px; align-items: start; }
.var-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.var-aside { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; display: flex; flex-direction: column; gap: 16px; padding-bottom: 8px; }
@media (max-width: 1280px) { .var-layout { grid-template-columns: 1fr; } .var-aside { position: static; max-height: none; overflow: visible; order: -1; } }
.why-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.why-sum strong { display: block; font-size: 16px; }
.why-group { border-top: 1px solid var(--line); padding: 8px 0; }
.why-group > summary { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 10px; align-items: center; cursor: pointer; list-style: none; }
.why-group > summary::-webkit-details-marker { display: none; }
.why-name { font-weight: 600; }
.why-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.why-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--series-1); }
.why-bar i.up { background: var(--bad, #e5484d); } .why-bar i.down { background: var(--good, #2fb67c); }
.why-items { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.why-items li { padding: 6px 8px; background: var(--surface-2); border-radius: 8px; }
.why-item-head { display: flex; justify-content: space-between; gap: 8px; }
.why-pill { font-size: 10.5px; }
.ready-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ready-list li { display: flex; gap: 10px; align-items: flex-start; }
.ready-dot { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--good, #2fb67c); }
.ready-list li.warn .ready-dot { background: #d68910; } .ready-list li.bad .ready-dot { background: var(--bad, #e5484d); }

/* Theme switch: Light / Dark / System */
.theme-switch { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.theme-switch button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 6px; border: 0; border-radius: 7px; background: none;
  color: var(--ink-3); font: inherit; font-size: 11.5px; cursor: pointer; }
.theme-switch button svg { width: 14px; height: 14px; flex: 0 0 14px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button.on { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.auth-theme { position: fixed; top: 14px; right: 14px; width: 250px; z-index: 5; }
.auth-theme .theme-switch { margin: 0; }

/* Cost variance: crisp hover justification */
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.trust-more { flex-basis: 100%; }
.trust-more summary { cursor: pointer; color: var(--ink-3); }
.trust-more .ready-list { margin: 8px 0 0; }
.pop-sec { margin: 8px 0 3px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-family: var(--mono); }
.pop-p { margin: 0 0 4px; line-height: 1.45; }
.pop-who { color: var(--brand); }
.mover[data-pop], tr[data-pop] { cursor: help; }

/* Cost variance: bridge and attention chips */
.bridge-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .bridge-grid { grid-template-columns: 1fr; } }
.chipbtn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chipbtn.attn { border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning-ink); }
.chipbtn.save { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good-ink); }
span.chipbtn { cursor: default; }
.pop-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }

/* Meridian Stratus mark (app/branding.py): the lower strata follow the wordmark beside them - light on the dark
   sidebar and sign-in hero, the page ink on an auth card. */
.brand-k .stratum { fill: var(--nav-ink-strong); }
.auth-card .brand-k .stratum { fill: var(--ink); }

/* Workspace look (app/workspace_theme.py): the uploaded logo in the menu, and the settings controls. */
.ws-logo { padding: 0 8px 12px; }
/* The menu is dark in both themes and most logos are dark-on-transparent, so the logo sits on a light plate. */
.ws-logo img { display: block; max-width: 100%; max-height: 44px; width: auto; height: auto; object-fit: contain;
  background: #ffffff; padding: 6px 10px; border-radius: var(--radius); }
.logo-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.logo-preview { width: 160px; min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 8px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.logo-preview img { max-width: 100%; max-height: 48px; object-fit: contain; }
.accent-picker { border: 0; padding: 0; margin: 0; }
.accent-picker legend { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.accent-options { display: flex; flex-wrap: wrap; gap: 8px; }
.accent-option { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; font-size: 13px; }
.accent-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.accent-option input:focus-visible + .accent-swatch { outline: 2px solid var(--brand); outline-offset: 2px; }
.accent-swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--sw-light); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .accent-swatch { background: var(--sw-dark); } }
:root[data-theme="dark"] .accent-swatch { background: var(--sw-dark); }

/* In-place updates (static/js/live.js): while a recalculation is on its way, the content dims - after 150ms, so fast
   replies never flicker. Reduced motion: no transition, the state change alone. */
main.content { transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1); }
.live-busy main.content { opacity: 0.62; cursor: progress; }
@media (prefers-reduced-motion: reduce) { main.content { transition: none; } }
