:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --text: #1b1f27;
  --muted: #646b78;
  --faint: #9aa1ad;
  --accent: #5b5bd6;
  --accent-soft: rgba(91, 91, 214, 0.12);
  --data: #e5484d;           /* broken data */
  --data-soft: rgba(229, 72, 77, 0.12);
  --biz: #1f9d6b;            /* real business change */
  --biz-soft: rgba(31, 157, 107, 0.12);
  --warn: #d98a00;
  --warn-soft: rgba(217, 138, 0, 0.14);
  --up: #3e8ed0;
  --down: #8e4ec6;
  --line: #2b2f3a;
  --grid: #eceef2;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1e222b;
    --border: #2a2f3a;
    --text: #e8eaef;
    --muted: #a0a7b4;
    --faint: #6b7280;
    --accent: #8b8bf5;
    --accent-soft: rgba(139, 139, 245, 0.16);
    --data: #ff6b6f;
    --data-soft: rgba(255, 107, 111, 0.15);
    --biz: #3dd68c;
    --biz-soft: rgba(61, 214, 140, 0.14);
    --warn: #f5b13d;
    --warn-soft: rgba(245, 177, 61, 0.16);
    --up: #6cb6f5;
    --down: #c08cf2;
    --line: #e8eaef;
    --grid: #232833;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
button, select, textarea, input { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
[hidden] { display: none !important; }

/* -- top bar ------------------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; }
.brand svg rect { fill: var(--accent); }
.brand svg path { stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brand svg circle { fill: #fff; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-tag { color: var(--muted); font-size: 12.5px; }
.tabs { display: flex; gap: 4px; }
.tabs button {
  border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.env { margin-left: auto; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--biz); }
.pill.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); cursor: help; }
.pill.warn .dot { background: var(--warn); }

main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 64px; }
.view { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 8px 2px 0; }
.section-title h2 { font-size: 16px; }
.section-title .muted { font-size: 13px; }

/* -- controls ----------------------------------------------------------------------------- */
.controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
select {
  padding: 7px 30px 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  appearance: none; cursor: pointer; min-width: 160px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.week { display: flex; align-items: center; gap: 8px; }
.week-label { display: flex; flex-direction: column; min-width: 220px; text-align: center; }
.week-current { font-weight: 600; }
.week-baseline { font-size: 12px; color: var(--muted); }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 18px; line-height: 1;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.hint { color: var(--faint); font-size: 12.5px; }
button.primary {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-weight: 600;
}
button.primary:disabled { opacity: 0.5; cursor: default; }
button.ghost {
  background: none; border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; color: var(--muted);
}
button.ghost:hover { color: var(--text); background: var(--surface-2); }

/* -- chart -------------------------------------------------------------------------------- */
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-week { background: var(--accent-soft); border: 1px solid var(--accent); }
.sw-base { background: var(--surface-2); border: 1px dashed var(--faint); }
.sw-crit { background: var(--data-soft); border: 1px solid var(--data); }
.sw-med { background: var(--warn-soft); border: 1px solid var(--warn); }
.sw-up { background: var(--up); }
.sw-down { background: var(--down); }
.chart { position: relative; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; cursor: crosshair; }
.chart .axis text { fill: var(--faint); font-size: 11px; }
.chart .grid line { stroke: var(--grid); }
.chart .series { fill: none; stroke: var(--line); stroke-width: 1.6; }
.chart .area { fill: var(--accent); opacity: 0.06; }
.chart .band-week { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.chart .band-base { fill: var(--surface-2); stroke: var(--faint); stroke-dasharray: 3 3; }
.chart .band-critical, .chart .band-high { fill: var(--data-soft); }
.chart .band-medium, .chart .band-low { fill: var(--warn-soft); }
.chart .marker-critical, .chart .marker-high { fill: var(--data); }
.chart .marker-medium, .chart .marker-low { fill: var(--warn); }
.chart .hover-line { stroke: var(--faint); stroke-dasharray: 2 3; }
.chart .hover-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 340px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 8px 10px; font-size: 12.5px;
}
.tooltip .t-value { font-weight: 600; font-size: 14px; }
.tooltip .t-case { margin-top: 4px; display: flex; gap: 6px; align-items: baseline; }

/* -- verdict ------------------------------------------------------------------------------ */
.verdict-hero { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.kpi { padding: 16px 20px; border-right: 1px solid var(--border); }
.kpi:last-child { border-right: 0; }
.kpi-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.data .kpi-value { color: var(--data); }
.kpi.biz .kpi-value { color: var(--biz); }
.kpi .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kpi.data .dot { background: var(--data); }
.kpi.biz .dot { background: var(--biz); }
.kpi.total .dot { background: var(--line); }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap;
}
.badge.unusual, .badge.critical, .badge.high { background: var(--data-soft); color: var(--data); border-color: transparent; }
.badge.normal { background: var(--biz-soft); color: var(--biz); border-color: transparent; }
.badge.medium, .badge.low { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.replayed { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.story { font-size: 15px; line-height: 1.6; padding: 14px 18px; }
.story strong.data { color: var(--data); }
.story strong.biz { color: var(--biz); }

.bridge { padding: 14px 18px 10px; }
.bridge svg { width: 100%; max-width: 820px; height: auto; display: block; margin: 0 auto; }
.bridge text { font-size: 11.5px; fill: var(--muted); }
.bridge .val { fill: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.bridge .bar-total { fill: var(--faint); opacity: 0.55; }
.bridge .bar-data { fill: var(--data); }
.bridge .bar-biz { fill: var(--biz); }
.bridge .connector { stroke: var(--faint); stroke-dasharray: 2 2; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.finding { display: flex; flex-direction: column; gap: 10px; border-left: 3px solid var(--data); }
.finding-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.finding-cause { font-weight: 600; font-size: 14.5px; line-height: 1.45; }
.finding-impact { font-size: 22px; font-weight: 700; color: var(--data); white-space: nowrap; font-variant-numeric: tabular-nums; }
.finding-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.confidence { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.meter { width: 90px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--data); border-radius: 3px; }
.evidence { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.evidence li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.evidence .lo { height: 6px; border-radius: 3px; background: var(--data); opacity: 0.8; }
.evidence .lo.neg { background: var(--biz); }
details summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
details[open] summary { margin-bottom: 6px; }
.method { font-size: 13px; color: var(--muted); }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day-chip { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--data-soft); color: var(--data); font-variant-numeric: tabular-nums; }
.day-chip.base { background: var(--surface-2); color: var(--muted); }

.drivers { display: flex; flex-direction: column; gap: 6px; }
.driver { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px; gap: 10px; align-items: center; font-size: 13px; }
.driver.child { padding-left: 18px; color: var(--muted); }
.driver .seg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.driver.child .amt { font-weight: 500; }
.driver .bar { height: 8px; border-radius: 4px; background: var(--surface-2); position: relative; overflow: hidden; }
.driver .bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.driver .bar i.pos { background: var(--biz); left: 50%; }
.driver .bar i.neg { background: var(--data); right: 50%; opacity: 0.75; }

.consumers { width: 100%; border-collapse: collapse; font-size: 13px; }
.consumers th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.consumers td { padding: 9px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.consumers tr:last-child td { border-bottom: 0; }
.consumers .num { text-align: right; font-variant-numeric: tabular-nums; }
.kind { display: inline-flex; align-items: center; gap: 6px; }
.kind-icon { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 12px; background: var(--surface-2); }
.notice { margin-top: 6px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.exposure { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.empty { text-align: center; padding: 28px; color: var(--muted); }
.empty .big { font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* loading */
.loading { display: flex; align-items: center; gap: 12px; padding: 22px 18px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { font-size: 12.5px; color: var(--faint); }
.error { border-left: 3px solid var(--data); color: var(--data); }

/* -- incidents ---------------------------------------------------------------------------- */
#timeline svg { width: 100%; display: block; }
#timeline text { fill: var(--faint); font-size: 11px; }
#timeline .tl-bar { cursor: pointer; }
#timeline .tl-critical, #timeline .tl-high { fill: var(--data); }
#timeline .tl-medium, #timeline .tl-low { fill: var(--warn); }
#timeline .tl-axis { stroke: var(--border); }
.case { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.case.selected { outline: 2px solid var(--accent); outline-offset: -1px; }
.case-when { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.case-head { font-weight: 600; line-height: 1.45; word-break: break-word; }
.case-id { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.case ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.case ul li { word-break: break-word; }
.tables { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.table-chip { font-family: var(--mono); font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); cursor: pointer; border: 0; }
.table-chip:hover { color: var(--accent); }
#cases { display: flex; flex-direction: column; gap: 10px; }

/* -- lineage ------------------------------------------------------------------------------ */
.lineage-card { position: relative; }
.lineage { overflow-x: auto; }
.lineage svg { display: block; width: 100%; min-width: 900px; height: auto; }
.lineage .col-title { fill: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lineage .edge { fill: none; stroke: var(--border); stroke-width: 1.4; transition: stroke 0.15s, opacity 0.15s; }
.lineage .edge.loads { stroke-dasharray: 4 3; }
.lineage .node { cursor: pointer; }
.lineage .node rect { fill: var(--surface); stroke: var(--border); stroke-width: 1.2; transition: all 0.15s; }
.lineage .node.actor rect { fill: var(--surface-2); }
.lineage .node text { fill: var(--text); font-size: 12px; }
.lineage .node .sub { fill: var(--faint); font-size: 10.5px; }
.lineage .node:hover rect { stroke: var(--accent); }
.lineage .node.drifted rect { stroke: var(--warn); stroke-width: 2; }
.lineage.focus .node, .lineage.focus .edge { opacity: 0.22; }
.lineage.focus .node.on, .lineage.focus .edge.on { opacity: 1; }
.lineage .node.sel rect { stroke: var(--accent); stroke-width: 2.4; fill: var(--accent-soft); }
.lineage .node.up rect { stroke: var(--up); stroke-width: 1.8; }
.lineage .node.down rect { stroke: var(--down); stroke-width: 1.8; }
.lineage .edge.up { stroke: var(--up); stroke-width: 2; }
.lineage .edge.down { stroke: var(--down); stroke-width: 2; }
.lineage .node.hit rect { stroke: var(--data); stroke-width: 2.2; fill: var(--data-soft); }
.lineage .edge.hit { stroke: var(--data); stroke-width: 2.2; }
.side {
  position: relative; margin-top: 12px; padding: 14px 16px; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 24px; align-items: start;
}
.side .blast-list { grid-column: 1 / -1; }
.side .blast-list ul { columns: 3 260px; column-gap: 24px; }
.side .blast-list li { break-inside: avoid; margin-bottom: 2px; }
.side > .head { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; padding-right: 32px; }
.side .close { position: absolute; top: 8px; right: 8px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 6px; }
.side .close:hover { background: var(--surface-2); color: var(--text); }
.side h3 { font-family: var(--mono); font-size: 13.5px; word-break: break-all; }
.side .kv { display: flex; flex-direction: column; gap: 4px; }
.side .kv-label { font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.side ul { margin: 0; padding-left: 16px; font-size: 13px; }
.side code { word-break: break-all; }
.side .ddl { font-family: var(--mono); font-size: 11.5px; background: var(--surface-2); padding: 6px 8px; border-radius: 6px; word-break: break-word; }

/* -- ask ---------------------------------------------------------------------------------- */
.chat { display: flex; flex-direction: column; gap: 12px; min-height: 60vh; }
.messages { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.msg { max-width: 860px; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; padding: 9px 13px; border-radius: 14px 14px 4px 14px; max-width: 70%; }
.msg.bot { align-self: flex-start; }
.msg.bot .body { line-height: 1.6; }
.msg.bot .body p { margin: 0 0 8px; }
.msg.bot .body ul { margin: 0 0 8px; padding-left: 20px; }
.trace { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.trace .badge { font-family: var(--mono); font-weight: 500; }
.usage { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; }
.suggestions button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; color: var(--muted); }
.suggestions button:hover { color: var(--accent); border-color: var(--accent); }
.ask-form { display: flex; gap: 10px; align-items: flex-end; }
.ask-form textarea { flex: 1; resize: vertical; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; background: var(--surface); }
.ask-form textarea:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: 13px;
}

/* -- small screens ------------------------------------------------------------------------ */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .brand-tag { display: none; }
  .env { margin-left: 0; width: 100%; overflow-x: auto; }
  main { padding: 16px 16px 48px; }
  .verdict-hero { grid-template-columns: 1fr; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--border); }
  .grid-2 { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; gap: 8px; }
  .week-label { min-width: 0; }
  .section-title { flex-direction: column; gap: 0; }
  .finding-head { flex-direction: column; gap: 4px; }
  .driver { grid-template-columns: minmax(0, 1fr) 90px 60px; }
  .consumers .hide-sm { display: none; }
  .consumers th, .consumers td { padding-left: 4px; padding-right: 4px; }
  .consumers td:first-child { overflow-wrap: anywhere; }
}
.story .cost { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* guided tour */
.tour-btn {
  margin-left: auto; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.tour-btn:hover { background: var(--accent); color: #fff; }
.tour-btn + .env { margin-left: 12px; }
.tour-focus { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 12px; transition: outline-color .2s; }
.tour-card {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(380px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22); padding: 16px 18px;
}
.tour-count { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.tour-title { font-weight: 700; font-size: 15.5px; margin: 2px 0 6px; }
.tour-text { font-size: 13.5px; line-height: 1.5; color: var(--text-2, var(--text)); }
.tour-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 8px; }
.tour-actions span { display: flex; gap: 8px; }
.tour-actions button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.tour-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.tour-actions button.link { border: 0; background: none; color: var(--muted); padding-left: 0; }
.spinner.small { width: 12px; height: 12px; border-width: 2px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
@media (max-width: 900px) {
  .tour-card { right: 16px; left: 16px; bottom: 16px; width: auto; }
  .tour-btn { padding: 4px 10px; }
}

/* notifications */
.notice-strip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notice-strip li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.notice-strip li span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* Grid children may shrink below their content's width (long tables scroll inside instead). */
.grid-2 > * { min-width: 0; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
