:root {
  --bg: #FAF8F5;
  --bg-sunken: #F3F0EA;
  --surface: #FFFFFF;
  --ink: #16150F;
  --ink-2: #3B3A32;
  --ink-3: #6F6D62;
  --ink-4: #9A9788;
  --line: #E7E3D9;
  --line-2: #D9D4C6;

  /* accents — share ~0.13 chroma, ~52-58 lightness */
  --accent: oklch(52% 0.12 155);       /* evergreen */
  --accent-soft: oklch(92% 0.04 155);
  --accent-ink: oklch(32% 0.08 155);

  --warn: oklch(72% 0.14 75);
  --warn-soft: oklch(94% 0.05 75);
  --warn-ink: oklch(42% 0.12 60);

  --neg: oklch(58% 0.16 30);
  --neg-soft: oklch(94% 0.05 30);
  --neg-ink: oklch(42% 0.14 30);

  --pos: oklch(52% 0.12 155);
  --pos-soft: oklch(92% 0.05 155);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 0 rgba(22,21,15,0.04), 0 1px 2px rgba(22,21,15,0.04);
  --shadow-md: 0 1px 0 rgba(22,21,15,0.04), 0 4px 16px rgba(22,21,15,0.06);

  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: "IBM Plex Serif", Georgia, serif;
}

[data-accent="cobalt"] {
  --accent: oklch(52% 0.14 255);
  --accent-soft: oklch(92% 0.04 255);
  --accent-ink: oklch(32% 0.10 255);
  --pos: var(--accent);
  --pos-soft: var(--accent-soft);
}
[data-accent="terracotta"] {
  --accent: oklch(58% 0.14 40);
  --accent-soft: oklch(93% 0.04 40);
  --accent-ink: oklch(36% 0.10 40);
}
[data-accent="plum"] {
  --accent: oklch(48% 0.14 330);
  --accent-soft: oklch(93% 0.04 330);
  --accent-ink: oklch(30% 0.10 330);
}

[data-theme="dark"] {
  --bg: #0F0E0A;
  --bg-sunken: #16150F;
  --surface: #1B1A13;
  --ink: #F3F0E8;
  --ink-2: #CCC8B8;
  --ink-3: #8F8C7E;
  --ink-4: #5F5D52;
  --line: #2B2A22;
  --line-2: #3B3A32;
  --accent-soft: oklch(28% 0.06 155);
  --warn-soft: oklch(28% 0.06 75);
  --neg-soft: oklch(28% 0.06 30);
  --pos-soft: oklch(28% 0.06 155);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; letter-spacing: inherit; }
input { font: inherit; color: inherit; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1, "zero" 1; letter-spacing: -0.02em; }
.serif { font-family: var(--font-serif); }
.tnum { font-variant-numeric: tabular-nums; }

/* ========= Shell ========= */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
[data-sidebar="rail"] .shell { grid-template-columns: 64px 1fr; }

/* ========= Sidebar ========= */
.side {
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.side-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 4px;
}
.brand-lockup { display: block; height: auto; }
.brand-lockup-dark { display: none; }
[data-theme="dark"] .brand-lockup-light { display: none; }
[data-theme="dark"] .brand-lockup-dark { display: block; }
.side-logo-lockup { width: 168px; max-width: 100%; }
.side-logo-mark {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
[data-sidebar="rail"] .side-logo-lockup { display: none; }
[data-sidebar="rail"] .side-logo-mark { display: block; }

.login-brand {
  display: grid;
  width: min(280px, 72vw);
  min-height: 78px;
  align-items: center;
}
.login-brand .brand-lockup {
  grid-area: 1 / 1;
  width: 100%;
}

.side-section {
  display: flex; flex-direction: column; gap: 2px;
}
.side-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  padding: 6px 10px 4px;
}
[data-sidebar="rail"] .side-label { display: none; }

.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.side-item:hover { background: var(--bg-sunken); color: var(--ink); }
.side-item[data-active="true"] {
  background: var(--ink);
  color: var(--bg);
}
.side-item-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: grid; place-items: center;
  color: currentColor;
}
[data-sidebar="rail"] .side-item { justify-content: center; padding: 9px; }
[data-sidebar="rail"] .side-item-label { display: none; }

.side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(62% 0.12 30), oklch(52% 0.12 10));
  color: white;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.side-foot-meta { display: flex; flex-direction: column; line-height: 1.2; }
.side-foot-name { font-size: 13px; font-weight: 500; }
.side-foot-role { font-size: 11px; color: var(--ink-3); }
[data-sidebar="rail"] .side-foot-meta { display: none; }

/* ========= Top bar ========= */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0;
  z-index: 5;
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-3);
  font-size: 13px;
}
.crumbs strong { color: var(--ink); font-weight: 500; }
.crumbs .sep { color: var(--ink-4); }

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 280px;
  color: var(--ink-3);
  font-size: 13px;
  cursor: text;
  transition: border 0.12s;
}
.search:hover { border-color: var(--line-2); }
.search input {
  border: 0; outline: none; background: transparent;
  flex: 1; min-width: 0;
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--ink-3);
  background: var(--bg-sunken);
}

.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background 0.12s;
  position: relative;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--ink); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--neg);
  border: 2px solid var(--bg);
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  transition: background 0.12s, border 0.12s;
  letter-spacing: -0.005em;
}
.btn:hover { background: var(--bg-sunken); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-sunken); color: var(--ink); }
.btn-sm { padding: 4px 8px; font-size: 12px; border-radius: 6px; }

/* ========= Tabs (under top bar) ========= */
.tabs {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 57px;
  z-index: 4;
}
.tab {
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.12s;
}
.tab:hover { color: var(--ink); }
.tab[data-active="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}
.tab-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-sunken);
  color: var(--ink-3);
}

/* ========= Content ========= */
.content {
  padding: 28px 32px 80px;
  max-width: 1440px;
  width: 100%;
}
[data-density="compact"] .content { padding: 20px 24px 80px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.page-title-group h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-title-group .sub {
  color: var(--ink-3);
  font-size: 14px;
}
.page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--font-mono);
}
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
/* Stale: pipeline hasn't written in 26-36h. Amber, slower pulse so it
   reads as "attention" rather than "alarm". */
.live-dot--stale {
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--warn) 25%, transparent);
  animation: pulse 3s ease-in-out infinite;
}
/* Late: >36h since last write. Red, no pulse so it reads as a hard alert
   rather than a heartbeat. */
.live-dot--late {
  background: var(--neg);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--neg) 25%, transparent);
  animation: none;
}
/* Cached: live fetch failed and we're rendering off the data.jsx fixtures.
   Grey, no pulse — this is "frozen design-time data", not live truth. */
.live-dot--cached {
  background: var(--ink-4);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink-4) 20%, transparent);
  animation: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========= Grid layouts ========= */
.grid-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
[data-layout="stacked"] .grid-split { grid-template-columns: 1fr; }

.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }

/* ========= Card ========= */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
}
.card-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.card-head .hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-body { padding: 0 18px 18px; }
.card-section + .card-section {
  border-top: 1px solid var(--line);
}

/* ========= Pacing grid ========= */
.pace-rail {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.pace-location {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  padding: 18px 18px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.pace-location:last-child { border-bottom: 0; }
.pace-loc-name {
  display: flex; flex-direction: column; gap: 2px;
}
.pace-loc-code {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pace-loc-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pace-metric-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pace-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  min-width: 0;
}
.pace-metrics-funnel {
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.pace-metrics-funnel .metric-value {
  font-size: 18px;
}
.pace-metrics-funnel .metric-label {
  color: var(--ink-3);
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.metric-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.metric-delta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: inline-flex; align-items: center; gap: 3px;
}
.metric-delta.pos { color: var(--pos); }
.metric-delta.neg { color: var(--neg); }
.metric-delta.neu { color: var(--ink-3); }

.pace-sparkbar {
  width: 120px;
  height: 40px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.pace-sparkbar .bar {
  flex: 1;
  background: var(--line-2);
  border-radius: 1px;
  min-height: 2px;
}
.pace-sparkbar .bar.hi { background: var(--ink-2); }

.pace-actions {
  display: flex; align-items: center; gap: 6px;
}

/* ========= Attention feed ========= */
.attention {
  display: flex;
  flex-direction: column;
}
.attn-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.12s;
  cursor: pointer;
}
.attn-item:last-child { border-bottom: 0; }
.attn-item:hover { background: var(--bg-sunken); }
.attn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.attn-dot.warn { background: var(--warn); }
.attn-dot.neg { background: var(--neg); }
.attn-dot.pos { background: var(--pos); }
.attn-dot.info { background: var(--ink-4); }

.attn-main { flex: 1; min-width: 0; }
.attn-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -0.005em;
}
.attn-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.45;
}
.attn-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.attn-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

/* ========= Status strip ========= */
.status-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.status-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer;
  transition: background 0.12s;
}
.status-cell:last-child { border-right: 0; }
.status-cell:hover { background: var(--bg-sunken); }
.status-cell-head {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pos);
}
.status-dot.warn { background: var(--warn); }
.status-dot.neg { background: var(--neg); }
.status-dot.gray { background: var(--ink-4); opacity: 0.5; }
.status-dot.live { background: var(--accent, #3b82f6); }

/* Material Symbols icon font (UI polish 2026-07-01). Font linked in index.html.
   text-transform:none is required so uppercased contexts (cohort headers) do
   not break ligature matching (e.g. "STORE" would not resolve to the glyph). */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr;
  font-feature-settings: 'liga'; -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}
.status-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.status-meta {
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ========= Library ========= */
.lib-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-chips {
  display: flex;
  gap: 4px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: 8px;
}
.chip {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 6px;
  color: var(--ink-3);
}
.chip:hover { color: var(--ink); }
.chip[data-active="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.lib-section { margin-bottom: 36px; }
.lib-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.lib-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}
.lib-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  min-width: 60px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.report-card {
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.12s;
  cursor: pointer;
  min-height: 140px;
  position: relative;
}
.report-card:hover { background: var(--bg-sunken); }
.report-card.pinned::before {
  content: "";
  position: absolute;
  top: 14px; right: 14px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.report-cadence {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}
.report-fav {
  color: var(--ink-4);
  opacity: 0.6;
}
.report-fav:hover { opacity: 1; color: var(--ink-2); }
.report-fav.active { color: var(--accent); opacity: 1; }

.report-name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.25;
}
.report-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.45;
  flex: 1;
}
.report-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.report-fresh { display: flex; align-items: center; gap: 5px; }
.report-fresh .status-dot { width: 5px; height: 5px; }

/* ========= Pacing deep-dive ========= */
.pd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.loc-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.loc-pill {
  font-family: var(--font-mono);
  padding: 6px 11px;
  font-size: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 6px;
  color: var(--ink-2);
}
.loc-pill[data-active="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.pd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.pd-metric {
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pd-metric-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.pd-metric-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.pd-metric-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.pd-metric-delta.pos { color: var(--pos); }
.pd-metric-delta.neg { color: var(--neg); }

/* Funnel row — secondary tile grid under the core ops grid */
.pd-funnel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: -8px 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.pd-funnel-head .hint {
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.05em;
}
.pd-grid-funnel {
  grid-template-columns: repeat(6, 1fr);
}
.pd-grid-funnel .pd-metric-value {
  font-size: 24px;
}
.pd-grid-funnel .pd-metric-label {
  color: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 4px;
}
/* MTD tile overrides — slightly smaller value text to fit narrower column */
.pd-metric-mtd .pd-metric-value {
  font-size: 20px;
}
/* Avg star rating secondary line in Reviews tile */
.pd-metric-rating {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

/* Tooltip affordances — used on 4 Cs metric tiles.
   `has-tip` sets the help cursor so hover-to-learn is discoverable even
   without a visible glyph (used on dense TodayView tiles).
   `tip-dot` is a small ⓘ glyph shown next to metric labels.
   `has-tip-deep` replaces the native title tooltip with a clickable ⓘ that
   opens the full help drawer at the specific term (Phase 2). */
.has-tip {
  cursor: help;
}
.tip-dot {
  font-size: 10px;
  color: var(--ink-4);
  opacity: 0.6;
  transition: opacity 120ms ease;
  line-height: 1;
}
.has-tip:hover .tip-dot {
  opacity: 1;
  color: var(--ink-3);
}
/* Deep-link variant — clickable ⓘ that opens the drawer at a specific term */
.tip-dot.has-tip-deep {
  cursor: pointer;
  opacity: 0.55;
  border-radius: 50%;
  padding: 0 1px;
  transition: opacity 120ms ease, color 120ms ease;
}
.tip-dot.has-tip-deep:hover,
.tip-dot.has-tip-deep:focus {
  opacity: 1;
  color: var(--accent, #0070f3);
  outline: none;
}

/* Comparison table */
.pd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pd-table th, .pd-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.pd-table th:first-child, .pd-table td:first-child {
  text-align: left;
}
.pd-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 400;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--line);
}
.pd-table td.num { font-family: var(--font-mono); letter-spacing: -0.01em; }
.pd-table tr:last-child td { border-bottom: 0; }
.pd-table tr:hover td { background: var(--bg-sunken); }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}
.delta.pos { color: var(--accent-ink); background: var(--pos-soft); }
.delta.neg { color: var(--neg-ink); background: var(--neg-soft); }
.delta.neu { color: var(--ink-3); background: var(--bg-sunken); }

/* ========= Tweaks panel ========= */
.tweaks-fab {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
}
.tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
  overflow: hidden;
}
.tweaks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.tweaks-head strong {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.tweaks-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tweak-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tweak-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.tweak-options {
  display: flex;
  gap: 4px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: 8px;
}
.tweak-opt {
  flex: 1;
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--ink-3);
  text-align: center;
}
.tweak-opt[data-active="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.accent-swatches {
  display: flex;
  gap: 8px;
}
.accent-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  position: relative;
  cursor: pointer;
}
.accent-swatch[data-active="true"] {
  border-color: var(--ink);
}
.accent-swatch[data-active="true"]::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

/* ========= Misc ========= */
.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 10px;
}

hr.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.quick-item {
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.12s;
}
.quick-item:hover { background: var(--bg-sunken); }
.quick-item-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
}
.quick-item-name {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}
.quick-item-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* =========================================================================
   Phase 0 inline-style migration (desktop defaults)
   -------------------------------------------------------------------------
   Every rule below is the desktop-default CSS that replaces an inline style
   removed from views.jsx / components.jsx during the Phase 0 refactor. Per
   the Desktop Protection Charter (spec v1.2 §0.1 rule 2), values are copied
   verbatim from the prior inline source — do not "improve" or round.
   Mobile media queries (>= §3, §6.x, §7, §11) layer on top of these.
   ========================================================================= */

/* §12.1 — Report viewer frame (views.jsx ~802-812 inline → class) */
.report-viewer-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  height: calc(100vh - 220px);
  min-height: 600px;
  position: relative;
}

/* §12.2 — Library toolbar search (views.jsx ~854, ~938 inline → drop) */
.lib-toolbar .search {
  min-width: 320px;
}

/* §12.3 — Viewer back-bar wrapper (views.jsx ~762-765 inline → class) */
.viewer-back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

/* §12.4 — "All folders" button modifier hook. No desktop CSS; mobile §7.2
   is the sole consumer (display: none on phone). */

/* §12.5 — Side-foot sign-out button (components.jsx ~136 inline → drop).
   Explicit narrowing inside .side-foot preserves the 28x28 desktop visual
   that the inline style provided; without this rule, removing the inline
   would size up to the .icon-btn base 32x32 and shift side-foot rhythm. */
.side-foot .icon-btn {
  width: 28px;
  height: 28px;
}

/* §12.6 — Today's Schedule rows (views.jsx ~204-208 inline → class) */
.schedule-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.schedule-row:not(:first-child) {
  border-top: 1px solid var(--line);
}

/* Scheduler P4 protected wage summary. Presentation only; all values and
   visibility are selected by the trusted cost endpoint. */
.scheduler-cost-card {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.scheduler-cost-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.scheduler-cost-kicker {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.scheduler-cost-title {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.scheduler-cost-status {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--bg-sunken);
  font-size: 11px;
  font-weight: 600;
}
.scheduler-cost-complete .scheduler-cost-status {
  color: var(--accent-ink);
  border-color: var(--pos);
  background: var(--pos-soft);
}
.scheduler-cost-partial .scheduler-cost-status,
.scheduler-cost-stale .scheduler-cost-status,
.scheduler-cost-freshness-warning .scheduler-cost-status {
  color: var(--warn-ink);
  border-color: var(--warn);
  background: var(--warn-soft);
}
.scheduler-cost-unavailable .scheduler-cost-status,
.scheduler-cost-freshness-blocked .scheduler-cost-status,
.scheduler-cost-timeout .scheduler-cost-status,
.scheduler-cost-error .scheduler-cost-status {
  color: var(--neg-ink);
  border-color: var(--neg);
  background: var(--neg-soft);
}
.scheduler-cost-amount {
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.scheduler-cost-detail {
  max-width: 860px;
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}
.scheduler-cost-components {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
.scheduler-cost-components > div {
  padding: 9px 10px;
  border-radius: var(--radius);
  background: var(--bg-sunken);
}
.scheduler-cost-components dt {
  color: var(--ink-3);
  font-size: 10.5px;
}
.scheduler-cost-components dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.scheduler-cost-meta {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 11px;
}
@media (max-width: 640px) {
  .scheduler-cost-components { grid-template-columns: 1fr; }
}

/* §12.7 / §12.8 — Total Members + Opportunities card flex
   (views.jsx ~364, ~471 inline → class) */
.metric-row {
  display: flex;
  gap: 24px;
  padding: 0 18px 18px;
  flex-wrap: wrap;
}

/* §12.9 — Fleet breakdown bars (views.jsx ~408-419, ~503-514 inline → class).
   Active state (location matches active loc) lifts label color + weight and
   swaps fill from var(--line-2) → var(--accent). Width on .fleet-bar-fill
   stays inline (data-driven percentage). */
.fleet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.fleet-bar-label {
  width: 52px;
  color: var(--ink-3);
  font-weight: 400;
}
.fleet-bar.is-active .fleet-bar-label {
  color: var(--ink);
  font-weight: 500;
}
.fleet-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}
.fleet-bar-fill {
  height: 100%;
  background: var(--line-2);
}
.fleet-bar.is-active .fleet-bar-fill {
  background: var(--accent);
}
.fleet-bar-value {
  width: 52px;
  text-align: right;
  color: var(--ink-3);
}

/* §12.10 — File list rows (views.jsx ~888-901 inline → class).
   :hover replaces the prior onMouseEnter/onMouseLeave handlers (per §12.12).
   .is-loading replaces the prior cursor:wait + opacity:0.6 inline state. */
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
}
.file-row:not(:first-child) {
  border-top: 1px solid var(--line);
}
.file-row:hover {
  background: var(--bg-sunken);
}
.file-row.is-loading {
  cursor: wait;
  opacity: 0.6;
}

/* §12.11 — Quick grid container (views.jsx ~159 inline → class).
   Defined after .quick-grid above so the .radius-sm override wins on the
   shared element (.quick-grid .quick-grid-inner). */
.quick-grid-inner {
  margin: 0 18px 18px;
  border-radius: var(--radius-sm);
}

/* §12.13.B — RevenueTrend component (views.jsx ~297-403 inline → class).
   Ported 2026-04-25 evening as part of Phase 0 + Path A parity.
   Values copied verbatim from the prior inline source per Charter §0.1 #2.
   Mobile media queries (Phase 1+) layer on top of these rules. */
.revenue-trend {
  margin-top: 24px;
}
.revenue-trend-body {
  margin: 0 18px 18px;
}
.revenue-trend-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
  min-height: 28px;
}
.revenue-trend-state {
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.revenue-trend-state.is-error {
  color: var(--neg);
}
.revenue-trend-latest {
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.revenue-trend-meta {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.revenue-trend-delta {
  font-size: 11px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.revenue-trend-delta[data-direction="up"]   { color: var(--pos); }
.revenue-trend-delta[data-direction="down"] { color: var(--neg); }
.revenue-trend-frame {
  height: 220px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.revenue-trend-frame svg {
  width: 100%;
  height: 100%;
  display: block;
}
.revenue-trend-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 1100px) {
  .grid-split { grid-template-columns: 1fr; }
  .pace-location { grid-template-columns: 1fr; gap: 12px; }
  .pace-metrics { grid-template-columns: repeat(2, 1fr); }
  /* 6-column funnel collapses to 3 columns on medium screens */
  .pd-grid-funnel { grid-template-columns: repeat(3, 1fr); }
}

/* Cross-location comparison wrapper: enables horizontal scroll on mobile
   without breaking desktop. Default is a no-op pass-through; the phone
   breakpoint below (max-width: 640px) gives it scroll behavior + sticky
   first column so the location code stays anchored while the user scrolls
   numeric columns. Promoted from preview 2026-04-25. */
.pd-table-wrap { width: 100%; }

@media (max-width: 640px) {
  /* Mobile sidebar: force rail behavior even when TWEAKS.sidebarStyle is
     "full". Desktop keeps full-mode labels (so the Admin Panel entry is
     visible); mobile collapses to 64px icons-only so the main content has
     room to breathe. Specificity matches the existing rail-mode rules
     (lines 99, 133, 146, 171, 172, 195) so neither needs !important.
     Promoted from preview 2026-04-25 after preview validation on iPhone. */
  [data-sidebar="full"] .shell { grid-template-columns: 64px 1fr; }
  [data-sidebar="full"] .side-logo-lockup,
  [data-sidebar="full"] .side-label,
  [data-sidebar="full"] .side-item-label,
  [data-sidebar="full"] .side-foot-meta { display: none; }
  [data-sidebar="full"] .side-logo-mark { display: block; }
  [data-sidebar="full"] .side-item { justify-content: center; padding: 9px; }
  [data-sidebar="full"] .side-foot { justify-content: center; }

  /* Cross-location comparison wrapper (Pacing tab) */
  .pd-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Bleed the wrapper to the card edges so the scroll affordance reaches
       the visible right edge instead of dying at the card padding. */
    margin: 0 -16px;
    padding: 0 16px;
  }
  .pd-table { min-width: 560px; font-size: 12px; }
  .pd-table th, .pd-table td { padding: 9px 8px; }
  .pd-table th:first-child, .pd-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--surface);
    z-index: 1;
    box-shadow: 1px 0 0 var(--line);
  }
  .pd-table thead th:first-child { background: var(--bg-sunken); }
  .pd-table tr:hover td:first-child { background: var(--bg-sunken); }
}

/* ========= Settings drawer ========= */
.settings-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 15, 10, 0.28);
  z-index: 150;
  display: flex;
  justify-content: flex-end;
  animation: settings-fade 120ms ease-out;
}
[data-theme="dark"] .settings-drawer-overlay {
  background: rgba(0, 0, 0, 0.5);
}
.settings-drawer {
  width: 360px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(22,21,15,0.08);
  display: flex;
  flex-direction: column;
  animation: settings-slide-in 180ms ease-out;
}
@keyframes settings-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes settings-slide-in {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.settings-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.settings-drawer-head strong {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.settings-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-section-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settings-row-label {
  font-size: 13px;
  color: var(--ink-2);
}
.settings-row-hint {
  font-size: 11.5px;
  color: var(--ink-4);
  line-height: 1.45;
}
.settings-row-stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.settings-row-stacked:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.settings-kv-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-4);
}
.settings-kv-value {
  font-size: 13px;
  color: var(--ink);
}
.settings-seg {
  display: flex;
  gap: 3px;
  background: var(--bg-sunken);
  padding: 3px;
  border-radius: 8px;
}
.settings-seg-opt {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
  color: var(--ink-3);
}
.settings-seg-opt[data-active="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ========= Site drill-down drawer (Sprint 4.1) =========
   Wider variant of .settings-drawer used by SiteDrillDownDrawer in views.jsx.
   Reuses .settings-drawer-overlay for the backdrop + fade animation; bumps
   width from 360px to 560px so per-metric sparklines + value column have
   room to breathe. Mobile (<640px) collapses to full width. */
.site-drill-drawer {
  width: 560px;
}
@media (max-width: 640px) {
  .site-drill-drawer {
    width: 100vw;
  }
}
.site-drill-drawer .settings-drawer-body {
  gap: 14px;
  padding-top: 14px;
}
.site-drill-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.site-drill-row:last-of-type {
  border-bottom: 0;
}
.site-drill-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.site-drill-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-transform: capitalize;
  letter-spacing: -0.005em;
}
.site-drill-target {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-drill-body {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-drill-value-col {
  flex: 0 0 auto;
  min-width: 96px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-drill-value {
  font-size: 18px;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.site-drill-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-drill-spark {
  flex: 1 1 auto;
  height: 40px;
  min-width: 0;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.site-drill-footnote {
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.5;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

/* Clickable cross-location row (Sprint 4.1).
   Pairs with row.onClick + tabIndex=0 + role=button in views.jsx. Hover
   color comes from existing .pd-table tr:hover; this rule adds keyboard
   focus visibility and a subtle "click affordance" indicator. */
.pd-row-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 2px;
}
.pd-row-clickable td:last-child::after {
  content: " >";
  font-family: var(--font-mono);
  color: var(--ink-4);
  margin-left: 6px;
  font-size: 11px;
  opacity: 0;
  transition: opacity 120ms ease-out;
}
.pd-row-clickable:hover td:last-child::after,
.pd-row-clickable:focus-visible td:last-child::after {
  opacity: 1;
}

/* ========= Mobile InsightsCard strip + role filter (Sprint 4.2) =========
   Wrapper for the per-site InsightsCard rendering on TodayView. Desktop
   renders three cards stacked (no .mobile-insights-strip wrapper renders
   children directly). Mobile (<=720px) shows one card at a time with a
   pill picker + swipe hint footer. */
.mobile-insights-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  touch-action: pan-y;             /* allow vertical scroll, capture horizontal */
}
.mobile-insights-pills {
  display: flex;
  gap: 6px;
  padding: 4px 4px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-insights-pills::-webkit-scrollbar { display: none; }
.mobile-insights-pill {
  flex: 1 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.mobile-insights-pill[data-active="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.mobile-insights-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px 8px;
  font-size: 11px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

/* Role-filter pill row (Sprint 4.2) — appears inside InsightsCard above
   the action items when the action set spans more than one role. Tighter
   styling than .mobile-insights-pill so it nests cleanly under the card. */
.role-filter-pills {
  -webkit-overflow-scrolling: touch;
}
.role-pill {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.role-pill[data-active="true"] {
  background: var(--bg-sunken);
  font-weight: 600;
}
.role-pill:hover {
  background: var(--bg-sunken);
}

/* ============================================================================
 * Reviews tab (ReviewSentimentView) — Spec: Marketing/Yext/REVIEW_SENTIMENT_SPEC.md
 * Reuses --accent (positive), --warn (mixed), --neg (negative) semantic colors.
 * No new color tokens.
 * ============================================================================ */

.sent-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0 20px;
}
@media (max-width: 900px) {
  .sent-cards { grid-template-columns: repeat(2, 1fr); }
}

.sent-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 120ms, border-color 120ms, box-shadow 120ms;
  position: relative;
}
.sent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sent-card--active {
  border-color: var(--ink);
  border-width: 1.5px;
}
.sent-card-title {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sent-card-score {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sent-card--pos .sent-card-score { color: var(--accent); }
.sent-card--mix .sent-card-score { color: var(--warn); }
.sent-card--neg .sent-card-score { color: var(--neg); }
.sent-card--nodata .sent-card-score { color: var(--ink-4); }
.sent-card-alertdot {
  font-size: 16px;
  color: var(--neg);
}
.sent-card-delta {
  font-size: 12px;
  color: var(--ink-3);
}
.sent-card-meta {
  font-size: 11px;
  color: var(--ink-4);
  font-family: var(--font-mono);
}
.sent-card--alert {
  border-color: color-mix(in oklab, var(--neg) 60%, var(--line));
  background: color-mix(in oklab, var(--neg) 4%, var(--surface));
}

/* === Trend chart section === */
.sent-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.sent-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.sent-section-head .sub {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.sent-spark {
  width: 100%;
  height: auto;
  display: block;
}
.sent-spark-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

/* === Narrative === */
.sent-narrative {
  background: color-mix(in oklab, var(--accent) 4%, var(--surface));
  border-color: color-mix(in oklab, var(--accent) 30%, var(--line));
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* === Alert banner === */
.sent-alert-banner {
  background: color-mix(in oklab, var(--neg) 8%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--neg) 50%, var(--line));
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--ink);
}
.sent-alert-banner strong {
  color: var(--neg);
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}
.sent-alert-banner ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

/* === Topic table === */
.sent-topic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sent-topic-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sent-topic-table td {
  padding: 10px;
  border-bottom: 1px solid color-mix(in oklab, var(--line) 50%, transparent);
  vertical-align: middle;
}
.sent-topic-table tr:last-child td {
  border-bottom: none;
}
.sent-topic-label {
  font-weight: 500;
  width: 160px;
  color: var(--ink);
}
.sent-topic-strength {
  width: 64px;
  white-space: nowrap;
}
.sent-topic-text {
  color: var(--ink-2);
}

/* === Signal dots === */
.sent-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 3px;
  background: var(--ink-4);
  opacity: 0.25;
}
.sent-dot--on { opacity: 1; }
.sent-dot--on.sent-dot--pos { background: var(--accent); }
.sent-dot--on.sent-dot--mix { background: var(--warn); }
.sent-dot--on.sent-dot--neg { background: var(--neg); }
.sent-dot--off { background: var(--ink-4); opacity: 0.2; }

/* === Sentiment chip === */
.sent-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.sent-chip--pos {
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--accent-ink, var(--accent));
}
.sent-chip--mix {
  background: color-mix(in oklab, var(--warn) 18%, transparent);
  color: var(--warn-ink, var(--warn));
}
.sent-chip--neg {
  background: color-mix(in oklab, var(--neg) 18%, transparent);
  color: var(--neg-ink, var(--neg));
}
.sent-chip--nodata {
  background: var(--bg-sunken);
  color: var(--ink-4);
}

/* === Stale / loading === */
.sent-stale-badge {
  color: var(--warn);
  font-size: 12px;
  margin-left: 6px;
}
.sent-skel {
  height: 320px;
  background: linear-gradient(90deg, var(--bg-sunken), var(--surface), var(--bg-sunken));
  background-size: 200% 100%;
  animation: skelShimmer 1.5s ease-in-out infinite;
  border-radius: 10px;
}
@keyframes skelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sent-empty {
  padding: 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

/* === Reviews tab: trend chart legend + SVG text overrides ================ */
.sent-spark-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  font-style: normal;
}
.sent-spark-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
  letter-spacing: 0.04em;
  transition: opacity 200ms;
}
.sent-spark-legend-item--dim {
  opacity: 0.35;
}
.sent-spark-legend-swatch {
  display: inline-block;
  height: 3px;
  border-radius: 2px;
}
.sent-spark-legend-hint {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Force consistent typography on remaining SVG axis labels.
   Without this they inherit serif italic from .sent-narrative or page CSS. */
.sent-spark .sent-axis-text {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-style: normal;
  font-size: 10px;
  fill: var(--ink-3);
}

/* Override .sent-spark default height so the SVG fills a fixed band rather
   than letterboxing into the card's full height. preserveAspectRatio="none"
   on the SVG element pairs with this to give a compact predictable trend strip. */
.sent-spark {
  width: 100%;
  height: 240px !important;
  display: block;
}

/* Latest override: viewBox is now 1200x220 (~5.45:1). With width:100% and
   default preserveAspectRatio=meet, natural height tracks the container:
   ~220px at typical 1100px card width, capped at 280px on very wide screens. */
.sent-spark {
  width: 100%;
  height: auto !important;
  max-height: 280px;
  display: block;
}

/* ========= Help drawer (Phase 1, 2026-05-08) =========
   The component returns a React Fragment: backdrop overlay + drawer panel
   as SIBLINGS (not nested). Each is independently position: fixed.
   Mobile (<768px): drawer becomes a bottom-sheet modal. */

/* ? icon in TopBar */
.help-icon-glyph {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Backdrop — full-screen dimmer, sibling of .help-drawer */
.help-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 15, 10, 0.28);
  z-index: 150;
  animation: settings-fade 120ms ease-out;
}
[data-theme="dark"] .help-drawer-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* Drawer panel — fixed to right edge, independent of overlay sibling */
.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 151;
  width: 720px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(22, 21, 15, 0.1);
  display: flex;
  flex-direction: column;
  animation: settings-slide-in 180ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .help-drawer,
  .help-drawer-overlay { animation: none; }
}

/* Header row */
.help-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.help-drawer-head-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  flex-shrink: 0;
}
.help-close-btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* Mobile tab bar (hidden on desktop) */
.help-mobile-tabs {
  display: none;
  gap: 4px;
}
.help-mobile-tab {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  color: var(--ink-3);
  background: transparent;
  border: none;
  cursor: pointer;
}
.help-mobile-tab[data-active="true"] {
  background: var(--bg-sunken);
  color: var(--ink);
}

/* Body: flex row — pane--rail + pane--detail */
.help-drawer-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Pane base */
.help-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.help-pane--rail {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
}
.help-pane--detail {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

/* Rail inner — flex column so term-list scrolls */
.help-rail {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Search wrap */
.help-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.help-search-icon {
  position: absolute;
  left: 18px;
  color: var(--ink-4);
  pointer-events: none;
}
.help-search-input {
  flex: 1;
  height: 28px;
  padding: 0 28px 0 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 100ms;
  -webkit-appearance: none;
  appearance: none;
}
.help-search-input:focus { border-color: var(--accent); }
.help-search-input::placeholder { color: var(--ink-4); }
.help-search-input::-webkit-search-cancel-button { display: none; }
.help-search-clear {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  padding: 2px;
  color: var(--ink-4);
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 4px;
}
.help-search-clear:hover { color: var(--ink); }

/* Term list — scrollable */
.help-term-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

/* Loading / error states */
.help-loading,
.help-error {
  padding: 16px;
  font-size: 12px;
  color: var(--ink-4);
  text-align: center;
}

/* Rail section labels */
.help-rail-label {
  padding: 8px 14px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}
.help-rail-label--page {
  color: var(--accent);
}

/* Term list items */
.help-term-item {
  width: 100%;
  text-align: left;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--ink-2);
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 80ms, color 80ms;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.help-term-item:hover {
  background: var(--bg-sunken);
  color: var(--ink);
}
.help-term-item[data-active="true"] {
  background: var(--bg-sunken);
  color: var(--ink);
  font-weight: 500;
}

/* No results */
.help-no-results {
  padding: 16px;
  font-size: 13px;
  color: var(--ink-4);
  text-align: center;
}

/* TermDetail — rendered inside .help-pane--detail */
.help-detail {
  padding: 20px 24px 32px;
}
.help-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 32px;
}
.help-detail-hint {
  font-size: 13px;
  color: var(--ink-4);
  text-align: center;
}

/* Detail header block */
.help-detail-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.help-detail-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}
.help-aliases {
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  margin-top: 6px;
}

/* Targets pill strip */
.help-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.help-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
}
.help-target-chip--goal {
  background: oklch(93% 0.06 155);
  color: oklch(35% 0.1 155);
}
.help-target-chip--floor {
  background: oklch(93% 0.06 40);
  color: oklch(38% 0.1 40);
}
[data-theme="dark"] .help-target-chip--goal {
  background: oklch(25% 0.06 155);
  color: oklch(80% 0.08 155);
}
[data-theme="dark"] .help-target-chip--floor {
  background: oklch(25% 0.06 40);
  color: oklch(78% 0.08 40);
}

/* Plain definition (lead paragraph) */
.help-plain {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 20px;
}

/* Spec link */
.help-spec-link {
  margin: 16px 0 8px;
}
.help-spec-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background 80ms;
}
.help-spec-pill:hover {
  background: var(--bg);
  text-decoration: underline;
}

/* Collapsible sections */
.help-section {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.help-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}
.help-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
  margin-bottom: 0;
}
.help-section-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  font-weight: 500;
}
.help-section-chevron {
  font-size: 10px;
  color: var(--ink-4);
  transition: transform 150ms;
  flex-shrink: 0;
}
.help-section-chevron[data-open="true"] { transform: rotate(90deg); }
.help-section-body {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* Body content rendered by renderBodySection */
.help-para { margin: 0 0 8px; }
.help-para:last-child { margin-bottom: 0; }
.help-list {
  margin: 0 0 8px 16px;
  padding: 0;
}
.help-list li { margin-bottom: 2px; }
.help-code-block {
  background: var(--bg-sunken);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
}
.help-blockquote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg-sunken);
  border-radius: 0 4px 4px 0;
  color: var(--ink-2);
}
.help-inline-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-sunken);
  border-radius: 4px;
  padding: 1px 4px;
  color: var(--ink);
}

/* ── Mobile: full-screen sheet from bottom (<768px) ── */
@media (max-width: 768px) {
  .help-drawer {
    top: auto;
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 92vh;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    animation: help-slide-up 200ms ease-out;
  }
  @keyframes help-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    .help-drawer { animation: none; }
  }

  /* Show mobile tab bar */
  .help-mobile-tabs { display: flex; }

  /* Panes: full-width, switched by data-mobile-visible */
  .help-drawer-body {
    position: relative;
    overflow: hidden;
  }
  .help-pane {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    display: none;
  }
  .help-pane[data-mobile-visible="true"] { display: flex; }

  /* Rail full width on mobile */
  .help-pane--rail {
    width: 100%;
    border-right: none;
  }
}

/* ── What's New drawer (bell, 2026-05-08) ─────────────────────────────────
   Mirrors help-drawer chrome: right-side 720px desktop, full-screen mobile,
   reuses settings-slide-in / settings-fade keyframes for animation. */

.whats-new-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 15, 10, 0.28);
  z-index: 150;
  animation: settings-fade 120ms ease-out;
}
[data-theme="dark"] .whats-new-drawer-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.whats-new-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 151;
  width: 720px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px rgba(22, 21, 15, 0.1);
  display: flex;
  flex-direction: column;
  animation: settings-slide-in 180ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .whats-new-drawer,
  .whats-new-drawer-overlay { animation: none; }
}

.whats-new-drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.whats-new-drawer-head-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.whats-new-close-btn { margin-left: auto; flex-shrink: 0; }

.whats-new-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.whats-new-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

.whats-new-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--bg);
}
.whats-new-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.whats-new-card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.whats-new-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.whats-new-card-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--ink-2);
}
.whats-new-card-tag[data-tag="feature"] {
  background: color-mix(in oklch, var(--accent) 15%, transparent);
  color: var(--accent);
}
.whats-new-card-tag[data-tag="improvement"] {
  background: color-mix(in oklch, var(--pos) 15%, transparent);
  color: var(--pos);
}
.whats-new-card-tag[data-tag="fix"] {
  background: color-mix(in oklch, var(--warn) 15%, transparent);
  color: var(--warn);
}
.whats-new-card-date {
  font-size: 11px;
  color: var(--ink-3);
}
.whats-new-card-summary {
  font-size: 13px;
  color: var(--ink-2);
  margin: 6px 0 12px;
  line-height: 1.5;
}
.whats-new-card-body { font-size: 13px; line-height: 1.55; color: var(--ink); }
.whats-new-para { margin: 0 0 10px; }
.whats-new-list { margin: 6px 0 12px; padding-left: 20px; }
.whats-new-list li { margin-bottom: 4px; }
.whats-new-blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 2px solid var(--line-2);
  color: var(--ink-2);
}
.whats-new-inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 4px;
}
.whats-new-deep-link {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.whats-new-deep-link:hover {
  background: color-mix(in oklch, var(--accent) 10%, transparent);
}

@media (max-width: 768px) {
  .whats-new-drawer { width: 100vw; max-width: 100vw; }
}

/* ======== Scoreboard tab (2026-07-13, SCOREBOARD_TAB_SPEC.md) ======== */
.sb-month {
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}
.sb-month-fill { height: 100%; background: var(--line-2); }
.sb-hold {
  margin-top: 12px;
  font-size: 12px;
  color: var(--warn-ink);
  background: var(--warn-soft);
  border-radius: 6px;
  padding: 6px 10px;
  display: inline-block;
}
.sb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 1100px) { .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .sb-grid { grid-template-columns: minmax(0, 1fr); } }
.sb-tile {
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.sb-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.sb-value-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sb-value {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
}
.sb-value-side { font-size: 15px; color: var(--ink-2); }
.sb-target { font-size: 12px; color: var(--ink-4); margin-left: auto; }
.sb-bar {
  position: relative;
  height: 8px;
  background: var(--bg-sunken);
  border-radius: 4px;
}
.sb-bar-fill { height: 100%; border-radius: 4px; }
.sb-fill-pos     { background: var(--pos); }
.sb-fill-warn    { background: var(--warn); }
.sb-fill-neutral { background: var(--line-2); }
.sb-tick {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--ink-2);
}
.sb-foot { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-height: 16px; }
.sb-status { font-size: 12.5px; font-weight: 500; }
.sb-status-pos     { color: var(--pos); }
.sb-status-warn    { color: var(--warn-ink); }
.sb-status-neutral { color: var(--ink-3); }
.sb-sub { font-size: 12px; color: var(--ink-3); }
.sb-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-4);
}

/* Kiosk display mode (spec §8): chrome-less full-screen Scoreboard for a
   wall/TV. Bigger type for 10-foot readability; everything else inherits. */
.kiosk-shell {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.kiosk-shell .content { max-width: 1600px; width: 100%; margin: 0 auto; flex: 1; }
.kiosk-shell .sb-value { font-size: 40px; }
.kiosk-shell .sb-label { font-size: 12px; }
.kiosk-shell .sb-status { font-size: 14px; }
.kiosk-shell .sb-sub, .kiosk-shell .sb-target { font-size: 13px; }
.kiosk-shell h1 { font-size: 28px; }
.kiosk-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 24px 10px;
  font-size: 10.5px;
  color: var(--ink-4);
}
.kiosk-signout {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-4);
  opacity: 0.5;
  cursor: pointer;
  padding: 4px 6px;
}
.kiosk-signout:hover { opacity: 1; }

/* ======== Members tab (2026-07-13, MEMBER_360_DRILL_SPEC.md v0.1) ======== */
.mbr-searchwrap { max-width: 560px; margin-top: 4px; }
.mbr-searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  color: var(--ink-4);
}
.mbr-searchbox:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.mbr-searchbox input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
}
.mbr-searching { font-size: 11px; color: var(--ink-4); }
.mbr-results {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-top: 6px;
  overflow: hidden;
}
.mbr-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--bg-sunken);
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.mbr-result:last-child { border-bottom: none; }
.mbr-result:hover { background: var(--accent-soft); }
.mbr-result-init {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.mbr-result-main { display: flex; flex-direction: column; gap: 1px; }
.mbr-result-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.mbr-result-meta { font-size: 12px; color: var(--ink-3); }
.mbr-result-right { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-3); }
.mbr-result-sub { font-size: 11px; color: var(--ink-4); }
.mbr-noresults { padding: 14px; font-size: 12.5px; color: var(--ink-3); }
.mbr-error {
  margin-top: 12px;
  font-size: 12px;
  color: var(--neg-ink);
  background: var(--neg-soft);
  border-radius: 6px;
  padding: 6px 10px;
  display: inline-block;
}
.mbr-head-card { margin-top: 20px; }
.mbr-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.mbr-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.mbr-head-main h2 { font-family: var(--font-serif); font-size: 22px; font-weight: 500; margin: 0; }
.mbr-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 7px 0 8px; }
.mbr-pill {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.mbr-pos     { background: var(--pos-soft); color: var(--pos); }
.mbr-warn    { background: var(--warn-soft); color: var(--warn-ink); }
.mbr-neg     { background: var(--neg-soft); color: var(--neg-ink); }
.mbr-info    { background: var(--accent-soft); color: var(--accent-ink); }
.mbr-neutral { background: var(--bg-sunken); color: var(--ink-2); }
.mbr-site    { background: transparent; border: 1.5px solid var(--accent); color: var(--accent-ink); }
.mbr-plan    { background: var(--accent-soft); color: var(--accent-ink); }
.mbr-sms     { background: var(--bg-sunken); color: var(--ink-2); }
.mbr-sub { font-size: 12px; color: var(--ink-3); }
.mbr-head-actions { margin-left: auto; text-align: right; }
.mbr-btn-stub {
  background: var(--bg-sunken);
  color: var(--ink-4);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 12.5px; font-weight: 600;
  cursor: not-allowed;
}
.mbr-btn-note { font-size: 10.5px; color: var(--ink-4); margin-top: 5px; }
.mbr-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 1100px) { .mbr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .mbr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mbr-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
}
.mbr-kpi-lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.mbr-kpi-val { font-family: var(--font-serif); font-size: 26px; font-weight: 500; color: var(--ink); line-height: 1.1; }
.mbr-val-neg { color: var(--neg); }
.mbr-kpi-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.mbr-sec {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.mbr-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mbr-chip {
  background: var(--warn-soft);
  color: var(--warn-ink);
  border: 1px solid var(--warn);
  border-radius: 8px;
  padding: 4px 11px;
  font-size: 12px; font-weight: 500;
}
.mbr-grid2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 900px) { .mbr-grid2 { grid-template-columns: minmax(0, 1fr); } }
.mbr-grid2 .card, .mbr-head-card + .mbr-kpis + .card { margin-top: 14px; }
.mbr-spark { width: 100%; max-width: 460px; height: auto; display: block; }
.mbr-bar-norm { fill: var(--accent); }
.mbr-bar-low  { fill: var(--warn); }
.mbr-bar-zero { fill: var(--neg); }
.mbr-spark-axis { stroke: var(--line); stroke-width: 1; }
.mbr-note { font-size: 11.5px; color: var(--ink-4); margin-top: 8px; }
.mbr-kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.mbr-kv td { padding: 6px 4px; border-bottom: 1px solid var(--bg-sunken); }
.mbr-kv td:first-child { color: var(--ink-3); width: 44%; }
.mbr-kv td:last-child { font-weight: 600; color: var(--ink); }
.mbr-kv tr:last-child td { border-bottom: none; }
.mbr-tl { list-style: none; margin: 0; padding: 0; }
.mbr-tl li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--bg-sunken);
  font-size: 13px;
}
.mbr-tl li:last-child { border-bottom: none; }
.mbr-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; align-self: center; }
.mbr-dot-blue  { background: var(--accent); }
.mbr-dot-green { background: var(--pos); }
.mbr-dot-red   { background: var(--neg); }
.mbr-dot-amber { background: var(--warn); }
.mbr-tl-date { font-size: 11.5px; color: var(--ink-4); width: 84px; flex-shrink: 0; }
.mbr-tl-body b { font-weight: 600; }
.mbr-tl-sub { color: var(--ink-3); }
.mbr-empty { margin-top: 40px; max-width: 480px; }
.mbr-empty-title { font-family: var(--font-serif); font-size: 18px; color: var(--ink-2); margin-bottom: 6px; }
.mbr-head-card + .mbr-kpis { margin-top: 14px; }
.content .card + .mbr-grid2, .mbr-grid2 + .card { margin-top: 14px; }
