/* ============================================================================
 * Property Suite — dashboard UI.
 * Locked template skin (authorized 2026-10-11, Shawn): Harbor & Pine tokens,
 * light sidebar + topbar chrome, compact navy band page headers, zebra
 * tables with sticky thead, blue links, exception-only badges, IBM Plex
 * Sans, tabular numerals, single scroll container (the page scrolls).
 *
 * Desktop-first dense (office work). Row-height ceiling: v5 rows (~38px).
 * Data rows never exceed 44px; controls keep the 44px tap floor.
 * ========================================================================== */

:root {
  --bg: #f2f5f4;
  --card: #ffffff;
  --ink: #12212b;
  --mut: #5f7480;
  --line: #dde5e6;
  --soft: #eaf0ef;
  --band: #10303f;
  --link: #1f4e79;
  --zebra: #f3f6f5;
  --ok: #14855a;
  --warn: #b86e00;
  --bad: #c93b2e;
  --tap: 44px;
  /* legacy aliases (older markup referenced these names) */
  --muted: #5f7480;
  --accent: #1f4e79;
  --accent-soft: #e4eefb;
  --good: #14855a;
  --good-soft: #e6f4ec;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1.45;
}

.app { display: flex; min-height: 100vh; align-items: stretch; }

/* ---------------- sidebar ---------------- */

.side {
  width: 224px; flex: 0 0 224px;
  background: var(--card); border-right: 1px solid var(--line);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--band);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex: 0 0 34px;
}
.brand .t1 { font-weight: 700; font-size: 14px; line-height: 1.2; }
.brand .t2 { font-size: 12px; color: var(--mut); }
.nav-sec {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--mut); padding: 12px 8px 4px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; color: var(--ink); font-size: 14px; text-decoration: none;
}
.nav-item:hover { background: var(--soft); }
.nav-item svg {
  width: 16px; height: 16px; flex: 0 0 16px;
  fill: none; stroke: var(--mut); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.on { background: var(--soft); font-weight: 600; }
.nav-item.on svg { stroke: var(--ink); }
.nav-item .bdg {
  margin-left: auto; background: var(--bad); color: #fff; font-size: 11px;
  font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}

/* ---------------- main column + topbar ---------------- */

.maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
select.bizpick {
  font-size: 14px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
  background: #fff; font-family: inherit; min-height: 38px;
}
.gsearch {
  flex: 0 1 400px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px;
  background: #fff; color: var(--mut); font-size: 14px;
}
.gsearch input {
  border: 0; outline: 0; flex: 1; min-width: 0; font-size: 14px;
  color: var(--ink); background: transparent; font-family: inherit;
}
.gsearch svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none;
  stroke: var(--mut); stroke-width: 2; stroke-linecap: round; }
.kbd {
  font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; color: var(--mut); background: var(--soft);
  white-space: nowrap;
}
.topbar .date { margin-left: auto; font-size: 13px; color: var(--mut); white-space: nowrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--soft);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: 0 0 32px;
}

/* ---------------- compact band page header ---------------- */

.band {
  background: var(--band); color: #fff;
  border-radius: 0 0 14px 14px;
  padding: 16px 24px 18px; margin: 0 20px 16px;
}
.band h1 { margin: 0 0 4px; font-size: 20px; color: #fff; letter-spacing: -0.01em; }
.band p { margin: 0; color: #b7cbd4; font-size: 13px; max-width: 680px; }
.band-stats { display: flex; gap: 28px; margin-top: 12px; flex-wrap: wrap; }
.band-stats .stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.band-stats .stat .k { font-size: 12px; color: #b7cbd4; }
.band .backlink { display: inline-block; margin-bottom: 8px; font-size: 13px;
  color: #b7cbd4; text-decoration: none; }
.band .backlink:hover { color: #fff; text-decoration: underline; }

.band .muted { color: #b7cbd4; }

.maincol .page { padding: 0 20px 48px; max-width: 1180px; width: 100%; margin: 0 auto; }

.lede { color: var(--mut); margin: 0 0 20px; }
.section-title {
  font-size: 16px; font-weight: 700; margin: 28px 0 12px; letter-spacing: -0.01em;
}
.muted { color: var(--mut); }
.foot { color: var(--mut); font-size: 13px; margin: 32px 0 0; }

/* ---------------- index: nav cards + data sources ---------------- */

.nav-cards {
  display: grid; gap: 12px; margin: 0 0 8px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.nav-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; text-decoration: none; color: var(--ink);
}
.nav-card:hover { border-color: var(--link); }
.nav-card h2 { font-size: 16px; margin: 0 0 4px; }
.nav-card p { margin: 0; color: var(--mut); font-size: 13.5px; }
.nav-card .go { color: var(--link); font-weight: 600; font-size: 13.5px; display: inline-block; margin-top: 8px; }

.mod-list {
  list-style: none; margin: 0; padding: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.mod-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 16px; border-bottom: 1px solid #eef1f1; font-size: 14px;
}
.mod-list li:last-child { border-bottom: 0; }
.mod-list li:nth-child(even) { background: var(--zebra); }
.mod-count { font-size: 13px; color: var(--mut); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mod-asof { font-size: 12px; color: var(--mut); white-space: nowrap; }

/* ---------------- KPI cards ---------------- */

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

button.kpi, a.kpi {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px 10px; text-decoration: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; width: 100%;
}
button.kpi:hover, a.kpi:hover { border-color: var(--link); }
.k-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.k-label { font-size: 13px; color: var(--mut); font-weight: 600; }
.k-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.k-value.na { font-size: 15px; font-weight: 500; color: var(--mut); }
.k-hint { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: var(--link); font-weight: 600; }

/* ---------------- manager: action rows ---------------- */

.actions { display: grid; gap: 8px; }
.action-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 16px; text-decoration: none; color: var(--ink);
}
.action-row:hover { border-color: var(--link); }
.action-count {
  font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 52px; text-align: center; color: var(--bad);
}
.action-count.zero { color: var(--ok); }
.action-label { flex: 1; font-weight: 600; font-size: 14.5px; }
.action-sub { display: block; font-weight: 400; font-size: 13px; color: var(--mut); }
.action-go { color: var(--mut); font-size: 18px; }

.close-card {
  display: flex; align-items: center; gap: 14px; margin-top: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--link); border-radius: 12px;
  padding: 10px 16px; text-decoration: none; color: var(--ink);
}
.close-card:hover { border-color: var(--link); border-left-color: var(--link); }
.close-card .action-label { font-weight: 600; }
.close-card .action-count { color: var(--ink); }

/* ---------------- trend cards ---------------- */

.trends { display: grid; gap: 12px; }
button.trend-card, a.trend-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px 10px; text-decoration: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; width: 100%;
}
button.trend-card:hover, a.trend-card:hover { border-color: var(--link); }
.t-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-label { font-size: 13px; color: var(--mut); font-weight: 600; }
.t-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-asof { font-size: 12.5px; color: var(--mut); margin: 2px 0 6px; }
svg.spark { display: block; width: 100%; height: 56px; }
svg.spark polyline { stroke: var(--link); }
.t-empty { font-size: 13px; color: var(--mut); padding: 8px 0; }
.t-row { margin: 2px 0 0; }

/* ---------------- range selector ---------------- */

.range-bar {
  position: sticky; z-index: 15;
  display: inline-flex; flex-wrap: wrap; gap: 3px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; margin: 0 0 16px;
}
.range-btn {
  border: 0; background: none; color: var(--mut);
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: var(--tap); min-width: var(--tap);
  padding: 6px 14px; border-radius: 8px; cursor: pointer;
}
.range-btn.on { background: var(--band); color: #fff; }

/* ---------------- pulse band (navy KPI band) ---------------- */

.pulse-band {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px; background: #0b2530; border-radius: 14px; overflow: hidden;
  margin: 0 0 12px;
}
.pulse-tile {
  display: flex; flex-direction: column; gap: 3px; align-items: stretch;
  text-align: left; background: var(--band); color: #eef1f5; border: 0;
  padding: 14px 16px 12px; font: inherit; cursor: pointer;
}
.pulse-tile:hover { background: #0c2733; }
.pulse-tile:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
.p-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-label { font-size: 12.5px; color: #9db4be; font-weight: 600; }
.p-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: #fff; }
.p-na { font-size: 15px; font-weight: 500; color: #9db4be; }
.p-delta { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.p-delta em { font-style: normal; color: #9db4be; }
.p-delta .d.up { color: #7fe0b0; }
.p-delta .d.dn { color: #ff9d8f; }
.p-delta .d { font-weight: 700; color: #c7d2da; }
.pulse-tile svg.spark { max-height: 44px; margin-top: 6px; }
.pulse-tile svg.spark polyline { stroke: #8fd3c0; }
.p-asof { font-size: 11.5px; color: #7d909b; }
.p-link { font-size: 12.5px; color: #b7cbd4; text-decoration: underline;
  text-underline-offset: 3px; margin-top: 4px; }

/* Two-across pulse tiles below desktop widths. */
@media (max-width: 1099px) {
  .pulse-band { grid-template-columns: 1fr 1fr; }
  .pulse-tile:last-child { grid-column: span 2; }
}
/* Collapse guard: below 380px the tiles stack single-column. */
@media (max-width: 379px) {
  .pulse-band { grid-template-columns: 1fr; }
  .pulse-tile:last-child { grid-column: auto; }
}
@media (min-width: 380px) {
  .pulse-band { grid-auto-rows: minmax(0, auto); }
}

/* ---------------- staleness badges ---------------- */

.stale-badge {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.stale-badge.fresh { background: var(--good-soft); color: var(--good); }
.stale-badge.stale { background: #fdeaea; color: var(--bad); }
.pulse-tile .stale-badge.fresh { background: rgba(127, 224, 176, 0.16); color: #7fe0b0; }
.pulse-tile .stale-badge.stale { background: rgba(255, 157, 143, 0.18); color: #ff9d8f; }

/* ---------------- feed health row ---------------- */

.feed-health {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fdf3e3; border: 1px solid #f0dcb8; color: var(--warn);
  border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 600;
  margin: 0 0 12px;
}
.fh-icon { font-size: 16px; line-height: 1.2; }

/* ---------------- v5 tables ---------------- */

.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
table.dense {
  border-collapse: collapse; width: 100%; min-width: 560px;
  font-size: 14px; background: var(--card);
  font-variant-numeric: tabular-nums;
}
table.dense thead th {
  position: sticky; top: 0; z-index: 5; background: var(--card);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--mut); border-bottom: 1px solid var(--line);
  padding: 9px 12px; text-align: left; white-space: nowrap;
}
table.dense tbody td {
  padding: 9px 12px; border-bottom: 1px solid #eef1f1;
  vertical-align: middle; white-space: nowrap;
}
table.dense tbody tr:last-child td { border-bottom: 0; }
table.dense tbody tr:nth-child(even) td,
table.dense tbody tr:nth-child(even) th { background: var(--zebra); }
table.dense tbody tr:hover td, table.dense tbody tr:hover th { background: #e4eefb; }
/* row-label header cells inside the body (pivot / report tables) */
table.dense tbody th {
  padding: 9px 12px; border-bottom: 1px solid #eef1f1;
  vertical-align: middle; text-align: left; font-weight: 600;
  white-space: nowrap; position: static; background: transparent;
}
table.dense td.num, table.dense th.num { text-align: right; }
table.dense td a { color: var(--link); text-decoration: none; }
table.dense td a:hover { text-decoration: underline; }
table.dense th.rowhead, table.dense td.rowhead { white-space: normal; }
table.dense tfoot td, table.dense tfoot th {
  border-top: 2px solid var(--ink); font-weight: 700; padding: 9px 12px;
  background: var(--card); white-space: nowrap;
}
table.dense td .na, table.dense .na { color: var(--mut); }

/* exception-only pills: only problems get a badge; normal states are plain */
.pill {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.pill.bad { background: #fdeceb; color: var(--bad); }
.pill.warn { background: #fdf3e3; color: var(--warn); }

.grid-block { margin-bottom: 32px; }
.grid-block h2 { font-size: 17px; margin: 0 0 10px; }
.grid-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.grid-tools input[type="search"], .grid-tools select {
  font-size: 14px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--ink);
  font-family: inherit; min-height: 40px;
}
.grid-tools input[type="search"] { flex: 1 1 200px; min-width: 0; }
.rowcount { font-size: 13px; color: var(--mut); margin-top: 8px; }
.empty { color: var(--mut); font-size: 14px; padding: 16px; text-align: center; }

/* ---------------- buttons / inputs ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: var(--soft); }
/* NOTE: .btn is re-declared later in this file (Today section). The doubled
 * class below keeps primary buttons navy regardless of source order. */
.btn.btn-primary { background: var(--band); border-color: var(--band); color: #fff; }
.btn.btn-primary:hover { background: #0c2733; }
.btn-mini { font-size: 12.5px; padding: 4px 10px; min-height: 0; }
a.btn { color: var(--ink); }
a.btn.btn-primary { color: #fff; }

input.filterbox, select.filterbox, .builder select, .builder input[type="date"] {
  font-size: 14px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); font-family: inherit;
  min-height: 40px;
}

/* ---------------- drilldown ---------------- */

.drill-sub { color: var(--mut); margin: 0 0 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--soft); color: var(--ink);
  font-size: 13px; font-weight: 600;
}
.events { display: grid; gap: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.ev { padding: 9px 14px; border-bottom: 1px solid #eef1f1; }
.ev:last-child { border-bottom: 0; }
.ev:nth-child(even) { background: var(--zebra); }
.e-type { font-weight: 700; font-size: 14px; }
.e-time { color: var(--mut); font-size: 13px; margin-top: 2px; }
.e-meta { color: var(--mut); font-size: 12.5px; margin-top: 4px; }
.back-link {
  display: inline-flex; align-items: center; min-height: var(--tap);
  color: var(--link); font-weight: 600; text-decoration: none; margin-bottom: 12px;
}
.grid-link { display: inline-block; color: var(--link); font-weight: 600; text-decoration: none; margin-top: 12px; }
.grid-link:hover { text-decoration: underline; }
.empty-state {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 32px 20px; text-align: center;
}
.empty-state h1 { font-size: 20px; }
.empty-state p { color: var(--mut); }

/* ---------------- drilldown drawer ---------------- */

.drawer-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 15, 20, 0.45); opacity: 0; transition: opacity 0.2s ease;
}
.drawer-scrim.open { opacity: 1; }
/* author display:flex would override the UA [hidden] rule — keep it hidden */
.drawer[hidden], .drawer-scrim[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: min(560px, 100%); background: var(--card);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.25);
  transform: translateX(24px); opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; opacity: 1; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--line);
}
.drawer-titles h2 { font-size: 18px; margin: 0 0 2px; letter-spacing: -0.01em; }
.drawer-sub { margin: 0; color: var(--mut); font-size: 13px; }
.drawer-close {
  flex: none; width: var(--tap); height: var(--tap);
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--ink); font-size: 18px; cursor: pointer;
}
.drawer-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; }
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-scrim { transition: none; }
}

/* ---------------- report library ---------------- */

.search-row { margin: 0 0 8px; }
.search-row .lbl { display: block; font-weight: 600; font-size: 13px; color: var(--mut); margin-bottom: 6px; }
.search-row input[type="search"] {
  font-size: 14px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card); color: var(--ink);
  min-height: 40px; width: 100%; max-width: 420px; font-family: inherit;
}
.rep-group { margin: 20px 0; }
.rep-group > h2 { font-size: 15px; margin: 0 0 8px; }
.rep-rows { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rep-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 9px 14px; border-bottom: 1px solid #eef1f1; }
.rep-row:last-child { border-bottom: 0; }
.rep-row:nth-child(even) { background: var(--zebra); }
.rep-main { flex: 1 1 220px; min-width: 0; }
.rep-main b { display: block; font-size: 14px; font-weight: 600; }
.rep-main span { font-size: 13px; color: var(--mut); }
.kind-badge { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 9px; color: var(--mut); white-space: nowrap; background: var(--card); }
.band .kind-badge { border-color: rgba(255,255,255,.35); color: #dbe7ec; background: transparent; }
.rep-actions { display: flex; gap: 8px; margin-left: auto; }
.empty-note { color: var(--mut); padding: 18px 0; }

/* ---------------- report viewer ---------------- */

.crumbs { margin: 0 0 4px; font-size: 14px; }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.rep-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.rep-head h1 { margin: 0; font-size: 20px; }
.page-card { background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px; margin: 16px 0; }

/* ---------------- demo callout (prototype-only engine-call display) ---------------- */

#demo-callout .callout { border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px; margin-top: 12px; background: var(--card); font-size: 14px; }
#demo-callout pre { white-space: pre-wrap; font-size: 12.5px;
  background: var(--bg); padding: 8px; border-radius: 8px; }

/* ---------------- pivot builder ---------------- */

.builder { display: grid; gap: 12px; margin: 0 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.builder .lbl { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.builder select { max-width: 100%; }
.axis-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.axis-pick label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff;
}
.axis-pick input { width: 16px; height: 16px; accent-color: var(--band); }
.range-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.range-row .btn[aria-pressed="true"] { background: var(--band); border-color: var(--band); color: #fff; }
.range-row label { font-size: 14px; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }
#pivot-note { min-height: 1.2em; font-size: 13.5px; color: var(--mut); margin: 0; }
#pivot-table td.na { color: var(--mut); text-align: right; }
#pivot-table .grid-link { display: inline; margin-top: 0; }
#pivot-table.dense { min-width: 0; }
#filters h3 { font-size: 14px; margin: 4px 0; }

/* ---------------- focus ---------------- */

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--link); outline-offset: 2px;
}

/* ---------------- responsive: desktop-first, sidebar collapses ---------------- */

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 900px) {
  .side { display: none; }
  .band { margin: 0 12px 12px; padding: 14px 16px; }
  .maincol .page { padding: 0 12px 40px; }
  .topbar { padding: 10px 12px; }
  .topbar .date { display: none; }
}

/* ---------------- Executive v2: feed-aware cards ---------------- */

.exec-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
button.exec-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px 12px; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; width: 100%;
}
button.exec-card:hover { border-color: var(--link); }
.exec-card.stale { border-color: #e3a82b; }
.exec-card.failed { border-color: var(--bad); }
.x-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.x-label { font-size: 13.5px; font-weight: 600; }
.x-value {
  font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.x-value.na { color: var(--mut); font-weight: 500; }
.x-trend { min-height: 52px; display: flex; align-items: center; }
.x-trend.t-empty { color: var(--mut); font-size: 13px; }
.x-trend .spark { width: 100%; height: 52px; color: var(--ok); }
.x-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-top: 1px solid var(--line); padding-top: 8px;
  font-size: 12.5px; color: var(--mut);
}
.x-link { color: var(--link); font-weight: 600; white-space: nowrap; }
.sec-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 8px; vertical-align: baseline;
}

/* Freshness tags: exceptions stand out; live cards show no tag. */
.fresh-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; border-radius: 999px;
  padding: 3px 10px; white-space: nowrap;
}
.fresh-tag.stale { background: #fdf0d7; color: #8a5a00; }
.fresh-tag.failed { background: #fdecea; color: var(--bad); }
.fresh-tag.live { background: var(--good-soft); color: var(--good); }

/* ---------------- Executive banner + feed table ---------------- */

.exec-banner {
  border-radius: 12px; padding: 14px 16px; margin: 0 0 16px;
  font-size: 14px;
}
.exec-banner.failed { background: #fdf0ef; border: 1px solid #f0b8b0; }
.exec-banner.stale { background: #fdf6e7; border: 1px solid #ecd9a4; }
.xb-head { margin-bottom: 10px; }
.feed-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
  background: rgba(255,255,255,.55); border-radius: 8px; overflow: hidden;
  font-variant-numeric: tabular-nums; margin-bottom: 10px;
}
.feed-table th, .feed-table td { text-align: left; padding: 8px 12px; }
.feed-table thead th {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mut); border-bottom: 1px solid var(--line);
}
.feed-table tbody tr + tr td { border-top: 1px solid var(--line); }
.xb-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: 13px; color: var(--mut); flex-wrap: wrap;
}
.xb-foot a { color: var(--link); font-weight: 600; white-space: nowrap; }

/* ---------------- Today: feed-failure attention items ---------------- */

.feed-attn {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--bad); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 10px;
}
.fa-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tag-pill {
  font-size: 11.5px; font-weight: 700; border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; color: var(--link); white-space: nowrap;
}
.fa-since { font-size: 12.5px; color: var(--mut); }
.fa-badge {
  margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--bad);
  white-space: nowrap;
}
.fa-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.fa-desc { font-size: 13.5px; color: var(--mut); margin-bottom: 10px; }
.fa-actions { display: flex; gap: 8px; }
.btn {
  font-size: 13.5px; font-weight: 600; padding: 8px 18px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  text-decoration: none; cursor: pointer; min-height: var(--tap);
  display: inline-flex; align-items: center;
}
.btn.pri { background: var(--band); border-color: var(--band); color: #fff; }

/* ---------------- Today: data sources panel ---------------- */

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-top: 16px;
}
.sec-link { font-size: 13px; font-weight: 600; color: var(--link); margin-left: auto; }
.section-title .sec-link { float: right; }
.ds-list { display: grid; gap: 2px; margin-top: 8px; }
.ds-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 4px; border-bottom: 1px solid #eef1f1; font-size: 14px;
}
.ds-row:last-child { border-bottom: 0; }
.ds-row:nth-child(even) { background: var(--zebra); }
.ds-name { font-weight: 600; min-width: 150px; }
.ds-meta { color: var(--mut); font-size: 13px; flex: 1; font-variant-numeric: tabular-nums; }
