/* theSitrep — shell + widgets. Self-contained, no link to theSitrep 2.1 styles. */

/* ─── App shell ────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w, 240px) 1fr;
  min-height: calc(100vh / var(--app-zoom, 1));
  position: relative;
  z-index: 1;
  transition: grid-template-columns 220ms var(--ease-out);
}
[data-collapsed="1"] .app { grid-template-columns: 56px 1fr; }

.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: calc(100vh / var(--app-zoom, 1));
  overflow: hidden;
}
.sidebar-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px 8px;
}
.workspace {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
  padding: 4px 6px;
  border-radius: var(--r-sm);
}
.workspace:hover { background: var(--surface-2); }
.workspace .ws-logo {
  height: 18px; width: 76px; max-width: 100%;
  background-image: url(../assets/logo.svg?v=2);
  background-repeat: no-repeat; background-position: left center; background-size: contain;
}
[data-theme="dark"] .workspace .ws-logo { background-image: url(../assets/logo-white.svg?v=3); }
.workspace .ws-name { font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.workspace .ws-sub { font-size: 11px; color: var(--text-3); }
.workspace .ws-tag { font-family: var(--font-mono); font-weight: 600; font-size: 9.5px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.collapse-btn {
  width: 24px; height: 24px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-3);
}
.collapse-btn:hover { background: var(--surface-2); color: var(--text); }

[data-collapsed="1"] .ws-name, [data-collapsed="1"] .ws-sub, [data-collapsed="1"] .ws-tag,
[data-collapsed="1"] .nav-label, [data-collapsed="1"] .nav-label-text,
[data-collapsed="1"] .nav-kbd, [data-collapsed="1"] .nav-count, [data-collapsed="1"] .nav-disengaged, [data-collapsed="1"] .nav-signals,
[data-collapsed="1"] .nav-caret, [data-collapsed="1"] .nav-devs-layer,
[data-collapsed="1"] .ss-text, [data-collapsed="1"] .ss-kbd,
[data-collapsed="1"] .sidebar-foot-content { display: none; }
[data-collapsed="1"] .sidebar-search { justify-content: center; }
[data-collapsed="1"] .nav-row { justify-content: center; padding: 6px; }

.sidebar-search {
  margin: 4px 8px 10px; padding: 6px 8px;
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  font-size: 12.5px;
}
.sidebar-search:hover { background: var(--surface-hover); color: var(--text-2); }
.sidebar-search .ss-text { flex: 1; }
.sidebar-search .ss-kbd { display: flex; gap: 3px; }

.nav-section { padding: 6px 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.nav-label { font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; color: var(--text-3); padding: 8px 8px 4px; }
.nav-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  position: relative;
}
.nav-row:hover { background: var(--surface-2); color: var(--text); }
.nav-row.active { background: var(--surface-2); color: var(--text); }
.nav-row.active::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); border-radius: 999px; }
.nav-icon { color: var(--text-3); display: inline-flex; }
.nav-row.active .nav-icon { color: var(--accent); }
.nav-label-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-kbd { font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-4); letter-spacing: 0.04em; }
.nav-count { font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--bad); background: var(--bad-tint); padding: 1px 6px; border-radius: 999px; }
.nav-row.locked { opacity: 0.45; pointer-events: none; }
/* Disengagement badge — amber, dim by default. Lights up only when active. */
.nav-disengaged { font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-4); background: var(--surface-3); padding: 1px 6px; border-radius: 999px; }
.nav-disengaged.active { color: var(--warn); background: var(--warn-tint); border: 1px solid var(--warn-border); }
/* Signals firing badge — mirrors the disengagement badge, accent-toned. */
.nav-signals { font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-4); background: var(--surface-3); padding: 1px 6px; border-radius: 999px; }
.nav-signals.active { color: var(--accent); background: var(--accent-tint); border: 1px solid var(--accent-border); }

/* ─── Developer Profiles · drill-in sidebar layer + searchable selects ── */
.nav-row-btn { width: 100%; background: transparent; border: 0; font: inherit; font-size: 13px; text-align: left; }
.nav-caret { color: var(--text-4); display: inline-flex; margin-left: auto; }
.nav-row-btn.active .nav-caret { color: var(--accent); }

.nav-devs-layer { display: flex; flex-direction: column; gap: 6px; }
.nav-back {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-3); font-size: 12px; padding: 4px 6px; border-radius: var(--r-sm);
}
.nav-back:hover { color: var(--text); background: var(--surface-2); }
.nav-layer-title {
  font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 10px; color: var(--text-3); padding: 0 6px 2px;
}

.sb-select { display: flex; flex-direction: column; }
.sb-select-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 7px 9px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.sb-select-btn:hover { background: var(--surface-3); }
.sb-select.open .sb-select-btn { border-color: var(--accent); }
.sb-select-ic { color: var(--text-3); flex-shrink: 0; }
.sb-select-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.sb-select-eyebrow { font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; font-size: 9.5px; color: var(--text-4); }
.sb-select-value { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-select-caret { color: var(--text-4); flex-shrink: 0; }

.sb-select-panel { margin-top: 2px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.sb-select-search { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.sb-select-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-size: 12px; color: var(--text); }
.sb-select-search input::placeholder { color: var(--text-4); }
.sb-select-opts { max-height: 220px; overflow-y: auto; padding: 3px; display: flex; flex-direction: column; gap: 1px; }
.sb-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 6px 7px; border: 0; background: transparent; border-radius: var(--r-sm);
  color: var(--text-2); cursor: pointer;
}
.sb-opt:hover { background: var(--surface-2); color: var(--text); }
.sb-opt.active { background: var(--surface-2); }
.sb-opt.active .sb-opt-label { color: var(--accent); }
.sb-opt-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.sb-opt-label { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-opt-sub { font-size: 10.5px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-opt-check { color: var(--accent); flex-shrink: 0; }
.sb-select-empty { padding: 8px 10px; font-size: 11.5px; color: var(--text-3); }

/* Full developer list shown directly under the team filter (no dropdown). */
.nav-dev-list { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 8px;
}
.profile-row { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: var(--r-sm); }
.profile-row:hover { background: var(--surface-2); }
.profile-row .pn { font-size: 12.5px; font-weight: 500; }
.profile-row .pr { font-size: 11px; color: var(--text-3); }
.profile-row .profile-meta { flex: 1; min-width: 0; }

/* ─── Main column + topbar ─────────────────────────────────────── */
.main-col { display: flex; flex-direction: column; min-width: 0; }
.content-scroll { flex: 1; overflow-y: auto; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); min-width: 0; }
.crumbs .cur { color: var(--text); font-weight: 500; }
.crumbs .sep { display: inline-flex; color: var(--text-4); }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Role switcher segmented control — top-bar Manager / PM / EM / Self */
.role-switcher {
  display: inline-flex;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  gap: 1px;
}
.role-switcher button {
  padding: 4px 10px;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 5px;
}
.role-switcher button:hover { color: var(--text); }
.role-switcher button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.role-switcher button .role-glyph { color: var(--text-4); }
.role-switcher button.active .role-glyph { color: var(--accent); }

.page { padding: 18px 24px 60px; }
.page-fade { animation: pageFadeIn 220ms var(--ease-out); }

/* Section heads (used everywhere) */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; gap: 10px; }
.section-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.section-eyebrow { font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.section-sub { font-size: 12px; color: var(--text-3); }

/* Layout grids matching the brief's wireframe */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-grid .span-2 { grid-column: 1 / -1; }
.dash-grid > * { min-width: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.g-cols-23 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* Toned cards */
.toned-card { position: relative; overflow: hidden; }
.toned-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, var(--toned-glow, var(--accent-tint)), transparent 55%);
}
.toned-card.tone-accent { --toned-glow: var(--accent-tint); border-color: var(--accent-border); }
.toned-card.tone-good   { --toned-glow: var(--good-tint);   border-color: var(--good-border); }
.toned-card.tone-warn   { --toned-glow: var(--warn-tint);   border-color: var(--warn-border); }
.toned-card.tone-bad    { --toned-glow: var(--bad-tint);    border-color: var(--bad-border); }
.toned-card.tone-human  { --toned-glow: var(--human-tint);  border-color: var(--human-border); }
.toned-card > * { position: relative; z-index: 1; }

/* Card header used inside every widget */
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; gap: 10px; }
.card-head .ch-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.card-head .ch-eyebrow { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.card-head .ch-actions { display: flex; align-items: center; gap: 6px; }
.card-body { padding: 0 14px 14px; }
.card-foot { padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; justify-content: space-between; }

/* Pills / tags / chips */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-sans); font-size: 10px; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-3);
  white-space: nowrap;
}
/* `.tag` declares font-sans after tokens.css, so without this the `mono`
   class on tags loses the source-order battle and chips render Inter. */
.tag.mono { font-family: var(--font-mono); font-weight: 600; }
.tag.tone-good   { color: var(--good); }
.tag.tone-warn   { color: var(--warn); }
.tag.tone-bad    { color: var(--bad); }
.tag.tone-accent { color: var(--accent); }
.tag.tone-human  { color: var(--human); }

/* Evidence chip — used everywhere "evidence" needs to render compact */
.evidence-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-2);
}
.evidence-chip .ev-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--text-3); }
.evidence-chip.tone-warn { background: var(--warn-tint); border-color: var(--warn-border); color: var(--warn); }
.evidence-chip.tone-warn .ev-dot { background: var(--warn); }
.evidence-chip.tone-bad  { background: var(--bad-tint);  border-color: var(--bad-border);  color: var(--bad); }
.evidence-chip.tone-bad .ev-dot { background: var(--bad); }
.evidence-chip.tone-good { background: var(--good-tint); border-color: var(--good-border); color: var(--good); }
.evidence-chip.tone-good .ev-dot { background: var(--good); }
.evidence-chip.tone-accent { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent); }

/* ─── Window State widget ──────────────────────────────────────── */
.window-state-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.window-stat {
  padding: 12px 12px;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}
/* Fall back to 4-up on narrow viewports so the single row doesn't cramp. */
@media (max-width: 1180px) {
  .window-state-grid { grid-template-columns: repeat(3, 1fr); }
  .window-state-grid .window-stat:nth-child(3n) { border-right: 0; }
  .window-state-grid .window-stat:nth-child(n+4) { border-top: 1px solid var(--border); }
}
.window-stat:last-child { border-right: 0; }
.window-stat:hover { background: var(--surface-2); }
.window-stat .ss-label { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 6px; }
.window-stat .ss-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; line-height: 1; }
.window-stat .ss-sub { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.window-stat.tone-good .ss-value { color: var(--good); }
.window-stat.tone-warn .ss-value { color: var(--warn); }
.window-stat.tone-bad  .ss-value { color: var(--bad); }
/* Window-size chip — small mono-caps pill rendered in widget headers
   to pick the rolling window size (or trend bucket size / count). */
.window-chip {
  display: inline-flex; align-items: center;
  gap: 10px;
}
.window-chip-opt {
  padding: 0;
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1.4;
}
.window-chip-opt:hover { color: var(--text); }
.window-chip-opt:disabled { opacity: 0.4; cursor: default; }
.window-chip-opt.active {
  color: var(--accent);
  font-weight: 600;
}
.window-chip-opt.label-toggle {
  margin-left: 6px;
}

/* ─── At-Risk Tickets ──────────────────────────────────────────── */
.risk-list { display: flex; flex-direction: column; }
.risk-row {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.risk-row:hover { background: var(--surface-2); }
.risk-row .rr-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.risk-row .rr-key {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0; flex: 1;
}
.risk-row .rr-id { font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.risk-row .rr-title { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.risk-row .rr-stage { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; }
.risk-row .rr-days {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  flex-shrink: 0;
}
.risk-row .rr-days.tone-warn { background: var(--warn-tint); border-color: var(--warn-border); color: var(--warn); }
.risk-row .rr-days.tone-bad  { background: var(--bad-tint);  border-color: var(--bad-border);  color: var(--bad); }
.risk-row .rr-bottom { display: flex; align-items: center; gap: 8px; padding-left: 0; }
.risk-row .rr-evidence { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.risk-row .rr-owner { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Auto-tag root-cause chip */
.rootcause-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-sans); font-size: 10px; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-3);
  white-space: nowrap;
}
.rootcause-tag.tone-warn   { color: var(--warn); }
.rootcause-tag.tone-bad    { color: var(--bad); }
.rootcause-tag.tone-accent { color: var(--accent); }

/* ─── Daily Standup · live feed ────────────────────────────────── */
/* Pulsing LIVE indicator in the card eyebrow. */
.live-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 0 var(--good-tint);
  animation: pulse 1.8s var(--ease-in-out) infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--good-border); opacity: 1; }
  70%  { box-shadow: 0 0 0 6px transparent; opacity: 0.7; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* Daily standup · vertical stack of "questions" (replaces the old 4-col grid).
   Each section: a collapsible header, a plain-English summary sentence, then
   the list of expandable deliverable rows. */
.pulse-stack {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.pulse-section { border-bottom: 1px solid var(--border); }
.pulse-section:last-child { border-bottom: 0; }

.pulse-section-head {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 11px 14px;
  border: 0; background: transparent;
  font: inherit; text-align: left; cursor: pointer; user-select: none;
  transition: background var(--t-fast);
}
.pulse-section-head:hover { background: var(--surface-2); }
.pulse-section-head .psh-caret { color: var(--text-3); flex-shrink: 0; }
.pulse-section-head .psh-icon { flex-shrink: 0; color: var(--text-2); }
.pulse-section-head .psh-label {
  font-size: 14.5px; font-weight: 600; line-height: 1.3;
  color: var(--text-2); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pulse-section-head .psh-count { margin-left: auto; flex-shrink: 0; }
.pulse-section.tone-accent .psh-icon, .pulse-section.tone-accent .psh-label { color: var(--accent); }
.pulse-section.tone-good   .psh-icon, .pulse-section.tone-good   .psh-label { color: var(--good); }
.pulse-section.tone-warn   .psh-icon, .pulse-section.tone-warn   .psh-label { color: var(--warn); }
.pulse-section.tone-bad    .psh-icon, .pulse-section.tone-bad    .psh-label { color: var(--bad); }

.pulse-section-body { padding-bottom: 4px; }

/* The natural-language summary sentence — sits under the header, indented to
   align with the label (past the caret + icon). */
.pulse-summary-text {
  margin: 0; padding: 2px 14px 9px 33px;
  font-size: 12.5px; line-height: 1.45; color: var(--text-2);
}

.pulse-list { display: flex; flex-direction: column; padding: 2px 0; }

.pulse-item { animation: feedIn 0.4s var(--ease-out) both; }
.pulse-item + .pulse-item { border-top: 1px solid var(--border); }
@keyframes feedIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* The collapsed row is a full-width button so it's keyboard-reachable and the
   whole line is the expand target. */
.pi-row {
  display: flex; align-items: flex-start; gap: 9px; width: 100%;
  padding: 11px 14px;
  border: 0; background: transparent;
  font: inherit; text-align: left; cursor: pointer;
  transition: background var(--t-fast);
}
.pi-row:hover { background: var(--surface-2); }
.pulse-item.expanded .pi-row { background: var(--surface-2); }
.pi-row .pi-caret {
  margin-left: auto; margin-top: 1px; color: var(--text-3); flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease-out);
}
.pulse-item.expanded .pi-caret { transform: rotate(180deg); }

.pulse-item .pi-body { min-width: 0; flex: 1; }
.pulse-item .pi-line { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.pulse-item .pi-id {
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--text-3); flex-shrink: 0;
  white-space: nowrap; margin-top: 1px;
}
.pulse-item .pi-text {
  font-size: 12.5px; line-height: 1.35; color: var(--text); min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pulse-item .pi-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 5px; padding-left: 0; min-width: 0;
}
.pulse-item .pi-meta-text {
  font-size: 11.5px; line-height: 1.3; color: var(--text-3); min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.pulse-empty {
  padding: 14px 13px;
  font-size: 11.5px; color: var(--text-3);
  font-style: italic;
}


/* Chip strip on each standup item (replaces the old run-on meta line). */
.pulse-item .pi-chips {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  margin-top: 5px; min-width: 0;
}
.pulse-item .pi-dev {
  display: inline-flex; align-items: center; gap: 5px; min-width: 0;
}
.pulse-item .pi-dev-name {
  font-size: 11.5px; color: var(--text-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pulse-item .pi-tag {
  font-size: 10px; line-height: 1.4; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.pulse-item .pi-tag.tone-good   { color: var(--good); }
.pulse-item .pi-tag.tone-warn   { color: var(--warn); }
.pulse-item .pi-tag.tone-bad    { color: var(--bad); }
.pulse-item .pi-tag.tone-accent { color: var(--accent); }
.pulse-item .pi-cause {
  font-size: 11px; color: var(--text-3); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* StatusCircle replaces the dot for tickets — align it to the first text line. */
.pi-row > svg { margin-top: 1px; flex-shrink: 0; }
/* Severity spine on the attention-worthy questions draws the eye. */
.pulse-section.tone-warn .pulse-item { box-shadow: inset 2px 0 0 var(--warn-border); }
.pulse-section.tone-bad  .pulse-item { box-shadow: inset 2px 0 0 var(--bad-border); }

/* Expanded detail · the deliverable's natural-language statements, indented to
   line up under the title (past the status glyph). */
.pi-detail {
  padding: 2px 14px 12px 32px;
  animation: feedIn 0.25s var(--ease-out) both;
}
.pi-statements {
  list-style: none; margin: 0 0 8px; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.pi-statement {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; line-height: 1.4; color: var(--text-2);
  padding-left: 8px; border-left: 2px solid var(--border-2);
}
.pi-stmt-dot {
  width: 5px; height: 5px; border-radius: 999px; margin-top: 6px;
  flex-shrink: 0; background: var(--text-3);
}
.pi-statement .pi-stmt-text { min-width: 0; }
.pi-statement.tone-good   { border-left-color: var(--good-border);   color: var(--text); }
.pi-statement.tone-good   .pi-stmt-dot { background: var(--good); }
.pi-statement.tone-warn   { border-left-color: var(--warn-border);   color: var(--text); }
.pi-statement.tone-warn   .pi-stmt-dot { background: var(--warn); }
.pi-statement.tone-bad    { border-left-color: var(--bad-border);    color: var(--text); }
.pi-statement.tone-bad    .pi-stmt-dot { background: var(--bad); }
.pi-statement.tone-accent { border-left-color: var(--accent-border); color: var(--text); }
.pi-statement.tone-accent .pi-stmt-dot { background: var(--accent); }

.pi-detail-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0; border: 0; background: transparent;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--accent);
  cursor: pointer;
}
.pi-detail-link:hover { text-decoration: underline; }

/* Lead statement · the first "why" line, surfaced onto the collapsed row.
   Text stays neutral; the small dot carries the tone so it matches bullet #1. */
.pi-lead {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0;
  font-size: 12px; line-height: 1.4; color: var(--text-2);
}
.pi-lead .pi-stmt-dot { margin-top: 0; }
.pi-lead .pi-stmt-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-lead.tone-good   .pi-stmt-dot { background: var(--good); }
.pi-lead.tone-warn   .pi-stmt-dot { background: var(--warn); }
.pi-lead.tone-bad    .pi-stmt-dot { background: var(--bad); }
.pi-lead.tone-accent .pi-stmt-dot { background: var(--accent); }

/* Whole-feed collapse bar (sits between the KPI strip and the columns). */
.pulse-bar {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 14px;
  border: 0; border-top: 1px solid var(--border);
  background: transparent; color: var(--text-2);
  font: inherit; text-align: left; cursor: pointer;
  transition: background var(--t-fast);
}
.pulse-bar:hover { background: var(--surface-2); }
.pulse-bar .pb-caret { color: var(--text-3); flex-shrink: 0; }
.pulse-bar .pb-label {
  font-family: var(--font-mono); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2);
}
.pulse-bar .pb-hint {
  margin-left: auto; font-size: 11px; color: var(--text-3);
}

/* ─── Ticket Forensics Gantt ───────────────────────────────────── */
.gantt-card { padding: 14px; }
.gantt { display: flex; flex-direction: column; position: relative; }
.gantt-head {
  display: grid;
  grid-template-columns: 260px 1fr;
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em;
}
.gantt-head-grid {
  display: grid;
  grid-template-columns: repeat(var(--gantt-days, 14), 1fr);
}
.gantt-head-grid > span { padding: 0 4px; border-left: 1px dashed var(--border); }
.gantt-head-grid > span:first-child { border-left: 0; }

.gantt-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  padding: 8px 0;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.gantt-row:last-child { border-bottom: 0; }
.gantt-row-label { font-size: 12.5px; color: var(--text); overflow: hidden; display: flex; flex-direction: column; gap: 3px; }
.gantt-row-label .grl-top { display: flex; align-items: center; gap: 6px; }
.gantt-row-label .grl-key { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); }
.gantt-row-label .grl-title { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-row-label .grl-bottom { display: flex; align-items: center; gap: 6px; }

.gantt-track {
  position: relative;
  height: 46px;
  display: grid;
  grid-template-columns: repeat(var(--gantt-days, 14), 1fr);
}
.gantt-track > .gt-bg { grid-column: 1 / -1; grid-row: 1; background: transparent; }
.gantt-track .gt-grid {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; grid-template-columns: repeat(var(--gantt-days, 14), 1fr);
}
.gantt-track .gt-grid > span { border-left: 1px dashed var(--border); }
.gantt-track .gt-grid > span:first-child { border-left: 0; }

.gantt-bar {
  position: absolute; top: 6px; height: 22px;
  border-radius: 7px; overflow: hidden; display: flex;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.gantt-bar:hover { transform: translateY(-1px); }
.gantt-seg-ai {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: flex-start;
  padding-left: 10px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap; overflow: hidden;
}
.gantt-seg { height: 100%; position: relative; }
.gantt-seg.seg-dev    { background: var(--ph-dev); }
.gantt-seg.seg-review { background: var(--ph-review); }
.gantt-seg.seg-rework { background: var(--ph-rework); }
.gantt-seg.seg-bug    { background: var(--ph-bug); }
.gantt-seg.seg-deploy { background: var(--ph-deploy); }
/* Queue / wait sub-segment — diagonal hatch overlay */
.gantt-seg.seg-queue {
  background-image: repeating-linear-gradient(135deg,
    var(--ph-queue) 0 4px, transparent 4px 8px);
  background-color: transparent;
}
.gantt-seg.seg-queue.on-dev    { background-color: color-mix(in oklab, var(--ph-dev) 28%, transparent); }
.gantt-seg.seg-queue.on-review { background-color: color-mix(in oklab, var(--ph-review) 30%, transparent); }
.gantt-seg.seg-queue.on-rework { background-color: color-mix(in oklab, var(--ph-rework) 30%, transparent); }
.gantt-seg.seg-queue.on-bug    { background-color: color-mix(in oklab, var(--ph-bug) 28%, transparent); }

/* Authorship band — AI + human dual-strip beneath the bar */
.gantt-ai-band {
  position: absolute; left: 0; right: 0;
  height: 4px; bottom: -7px;
  display: flex;
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-3);
}
.gantt-ai-band .gab-ai    { background: var(--accent); height: 100%; }
.gantt-ai-band .gab-human { background: var(--human); height: 100%; }

/* Commit marker · glowing dot on the lane below the stage pills */
.gantt-commit {
  position: absolute; top: 34px;
  width: 7px; height: 7px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--commit-dot);
  box-shadow:
    0 0 0 2px color-mix(in oklab, var(--commit-dot) 22%, transparent),
    0 0 8px color-mix(in oklab, var(--commit-dot) 45%, transparent);
  pointer-events: auto;
  transition: transform var(--t-fast);
}
.gantt-commit.is-ai { background: color-mix(in oklab, var(--commit-dot) 80%, white); }
.gantt-commit:hover { transform: translateX(-50%) scale(1.35); }

/* Today line */
.gantt-today {
  position: absolute; top: 0; bottom: 0;
  width: 1.5px; background: var(--accent);
  pointer-events: none; z-index: 2;
  box-shadow: 0 0 6px color-mix(in oklab, var(--accent) 60%, transparent);
}
.gantt-today-label {
  position: absolute; top: -16px; left: 5px;
  padding: 1px 6px;
  background: var(--accent); color: white;
  font-size: 9px; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 3;
}

/* Gantt legend */
.gantt-legend {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  flex-wrap: wrap;
}
.gantt-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.gantt-legend-swatch { width: 12px; height: 8px; border-radius: 2px; }
.gantt-legend-swatch.seg-dev    { background: var(--ph-dev); }
.gantt-legend-swatch.seg-review { background: var(--ph-review); }
.gantt-legend-swatch.seg-rework { background: var(--ph-rework); }
.gantt-legend-swatch.seg-bug    { background: var(--ph-bug); }
.gantt-legend-swatch.seg-deploy { background: var(--ph-deploy); }
.gantt-legend-swatch.seg-queue  {
  background-image: repeating-linear-gradient(135deg, var(--text-3) 0 3px, transparent 3px 6px);
  background-color: var(--surface-3);
}
.gantt-legend-swatch.ai-band-mini { background: linear-gradient(to right, var(--accent) 50%, var(--human) 50%); }

/* Commit tooltip */
.commit-tip {
  position: absolute;
  background: var(--bg-elev);
  border: 1px solid var(--border-3);
  border-radius: var(--r-md);
  padding: 8px 10px;
  font-size: 11.5px;
  z-index: 30;
  width: 280px;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
.commit-tip .ct-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.commit-tip .ct-msg { color: var(--text); margin-bottom: 6px; }
.commit-tip .ct-meta { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); display: flex; gap: 6px; flex-wrap: wrap; }
.commit-tip .ct-files { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-2); }

/* Stage tooltip · names the lifecycle phase under the cursor */
.stage-tip {
  position: absolute;
  background: var(--bg-elev);
  border: 1px solid var(--border-3);
  border-radius: var(--r-md);
  padding: 7px 10px;
  z-index: 30;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  white-space: nowrap;
}
.stage-tip .st-name { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.stage-tip .st-swatch { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.stage-tip .st-meta { margin-top: 4px; font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); }

/* ─── Meeting Load + Fragmentation ─────────────────────────────── */
.meeting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--border); }
.meeting-stat { padding: 12px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.meeting-stat:nth-child(2n) { border-right: 0; }
.meeting-stat:last-child { border-bottom: 0; }
.meeting-grid > .meeting-stat:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.meeting-stat .ms-label { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.meeting-stat .ms-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; line-height: 1; }
.meeting-stat .ms-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.meeting-stat .ms-value.tone-good { color: var(--good); }
.meeting-stat .ms-value.tone-warn { color: var(--warn); }
.meeting-stat .ms-value.tone-bad  { color: var(--bad); }

/* Stacked horizontal bar — meeting type split + carryover */
.stack-bar {
  display: flex; width: 100%;
  height: 12px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.stack-bar.tall { height: 22px; }
.stack-bar-seg { height: 100%; transition: width 320ms var(--ease-out); position: relative; }
.stack-bar-seg .sbs-label {
  position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-weight: 600; font-size: 10px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.stack-bar-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-3);
}
.stack-bar-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.stack-bar-legend .sbl-dot { width: 8px; height: 8px; border-radius: 2px; }

/* Context-switch sparkline */
.csw-spark {
  display: flex; align-items: flex-end; gap: 3px;
  height: 28px; margin-top: 6px;
}
.csw-spark > i { flex: 1; background: var(--text-3); border-radius: 2px; min-height: 3px; }
.csw-spark > i.peak { background: var(--warn); }

/* ─── Signal rows (.coach-* · shared by signals page/card/profile) ── */
.coach-list { display: flex; flex-direction: column; }
.coach-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.coach-row:hover { background: var(--surface-2); }
.coach-row .cr-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.coach-row .cr-signal { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.coach-row .cr-dev { font-size: 11.5px; color: var(--text-3); }
.coach-row .cr-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px;
  color: var(--text-3);
}
.coach-row .cr-meta .cr-count {
  padding: 1px 7px; border-radius: 999px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 10px;
}

/* ─── Six-gate disengagement panel ─────────────────────────────── */
.gate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.gate-cell {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.gate-cell:nth-child(3n) { border-right: 0; }
.gate-cell:nth-last-child(-n+3) { border-bottom: 0; }
.gate-cell .gc-head { display: flex; align-items: center; justify-content: space-between; }
.gate-cell .gc-label { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.gate-cell .gc-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.gate-cell .gc-status .gc-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.gate-cell .gc-status.tone-warn { background: var(--warn-tint); border-color: var(--warn-border); color: var(--warn); }
.gate-cell .gc-status.tone-good { background: var(--good-tint); border-color: var(--good-border); color: var(--good); }
.gate-cell .gc-detail { font-size: 11.5px; color: var(--text-2); }
.gate-cell .gc-time {
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px;
  color: var(--text-4); margin-top: 2px;
}

.gate-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--warn-tint);
  border: 1px solid var(--warn-border);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.gate-banner .gb-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--warn-tint); color: var(--warn);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.gate-banner .gb-text { font-size: 13px; color: var(--text); }
.gate-banner .gb-sub { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.gate-banner.calm {
  background: var(--surface-2);
  border-color: var(--border);
}
.gate-banner.calm .gb-icon { background: var(--surface-3); color: var(--text-3); }

/* ─── Hotspot list ─────────────────────────────────────────────── */
.hotspot-list { display: flex; flex-direction: column; }
.hotspot-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.hotspot-row:hover { background: var(--surface-2); }
.hotspot-row .hs-icon {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--text-3);
}
.hotspot-row .hs-icon.tone-bad  { background: var(--bad-tint);  color: var(--bad); }
.hotspot-row .hs-icon.tone-warn { background: var(--warn-tint); color: var(--warn); }
.hotspot-row .hs-text { font-size: 12.5px; color: var(--text); }
.hotspot-row .hs-sub  { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ─── Table ─────────────────────────────────────────────────────── */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table thead th {
  text-align: left; padding: 10px 14px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 10.5px; font-weight: 600; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.cell-num { text-align: right; }
.table thead th.cell-num { text-align: right; }

/* ─── Side-panel (right-slide drill) ───────────────────────────── */
.drill-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 60; backdrop-filter: blur(2px); animation: scrimIn 200ms var(--ease-out); }
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.drill-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 540px; max-width: 92vw;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  z-index: 61;
  display: flex; flex-direction: column;
  animation: drawerIn 260ms var(--ease-out);
  box-shadow: var(--shadow-lg);
}
@keyframes drawerIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drill-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.drill-head .dh-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.drill-head .dh-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.drill-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drill-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }
.row-action {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: var(--r-xs);
  color: var(--text-3); cursor: pointer;
}
.row-action:hover { background: var(--surface-2); color: var(--text); }

/* Drill section heads */
.drill-section { margin-bottom: 18px; }
.drill-section-h { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.drill-section .ds-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-sm);
  margin-bottom: 5px;
  font-size: 12px;
}
.drill-section .ds-row.tone-warn { background: var(--warn-tint); border-color: var(--warn-border); }
.drill-section .ds-row .ds-meta { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); }

/* ─── Developer Profile ─────────────────────────────────────────── */
.profile-hero {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 20px;
}
.profile-hero .ph-avatar { flex-shrink: 0; }
.profile-hero .ph-identity { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.profile-hero .ph-eyebrow { color: var(--text-3); font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-hero .ph-name { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.profile-hero .ph-meta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.profile-hero .ph-meta .ph-dot { color: var(--text-4); }
.profile-hero .ph-status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.profile-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.profile-stat {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}
.profile-stat:last-child { border-right: 0; }
.profile-stat .pst-label { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.profile-stat .pst-value { font-family: var(--font-mono); font-size: 18px; font-weight: 600; margin-top: 4px; line-height: 1; }
.profile-stat .pst-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* AI usage profile cards */
.ai-usage-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.ai-usage-card { padding: 14px; }
.ai-usage-card .auc-title { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ai-usage-card .auc-big { font-family: var(--font-mono); font-size: 28px; font-weight: 600; margin-top: 6px; }
.ai-usage-card .auc-spark { margin-top: 8px; }

/* Donut for tool attribution */
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--ds-stops));
  flex-shrink: 0;
}
.donut::after {
  content: ""; position: absolute; inset: 14px;
  background: var(--surface);
  border-radius: 50%;
}
.donut-legend { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; }
.donut-legend > div { display: inline-flex; align-items: center; gap: 6px; }
.donut-legend .dl-dot { width: 8px; height: 8px; border-radius: 999px; }

/* Cohort positioning */
.cohort-row {
  display: grid; grid-template-columns: 160px 1fr 64px; gap: 12px;
  align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--border);
}
.cohort-row:last-child { border-bottom: 0; }
.cohort-row .cr-label { font-size: 12px; color: var(--text-2); }
.cohort-row .cr-track {
  position: relative; height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
}
.cohort-row .cr-mark {
  position: absolute; top: -3px; width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--bg);
  z-index: 2;
}
.cohort-row .cr-cohort-band {
  position: absolute; top: 1px; bottom: 1px;
  background: color-mix(in oklab, var(--text-2) 20%, transparent);
  border-radius: 999px;
}
.cohort-row .cr-val {
  font-family: var(--font-mono); font-weight: 600; font-size: 11.5px;
  color: var(--text-2);
  text-align: right;
}
.cohort-caption {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-3);
  font-style: italic;
}

/* Hidden work bars */
.hidden-work-row { display: grid; grid-template-columns: 140px 1fr 48px; gap: 12px; align-items: center; padding: 6px 0; }
.hw-track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.hw-fill { height: 100%; background: var(--human); border-radius: 999px; }
.hw-val { font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; color: var(--text-2); text-align: right; }

/* Meeting map */
/* Past 7 / next 7 day meeting strip · profile */
.mlf-week-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 16px;
}
.mlf-wk-chip {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 4px;
}
.mlf-wk-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mlf-wk-eyebrow {
  font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.mlf-wk-val {
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1;
}
.mlf-wk-val.tone-good { color: var(--good); }
.mlf-wk-val.tone-warn { color: var(--warn); }
.mlf-wk-val.tone-bad  { color: var(--bad); }
.mlf-wk-unit { font-size: 11px; color: var(--text-3); margin-left: 5px; font-weight: 600; letter-spacing: 0; }
.mlf-wk-sub { font-size: 11px; color: var(--text-3); }

.mlf-week {
  display: grid; grid-template-columns: repeat(14, 1fr);
  gap: 4px; margin-top: 14px;
}
.mlf-day {
  display: grid; grid-template-rows: auto 1fr auto;
  align-items: center; justify-items: center;
  padding: 7px 2px 5px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  min-height: 90px;
  position: relative;
}
.mlf-day-label {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-family: var(--font-mono); font-weight: 600; font-size: 9.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.mlf-day-num { color: var(--text-2); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.mlf-day-track {
  width: 14px; height: 46px;
  background: var(--surface-3);
  border-radius: 3px;
  margin: 6px 0 4px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.mlf-day-fill {
  width: 100%;
  background: var(--text-3);
  border-radius: 3px 3px 0 0;
  transition: height 0.25s ease;
}
.mlf-day-hrs {
  font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-2); line-height: 1;
}

.mlf-day.tone-empty  .mlf-day-fill { background: var(--text-3); }
.mlf-day.tone-accent .mlf-day-fill { background: var(--accent); }
.mlf-day.tone-warn   .mlf-day-fill { background: var(--warn); }
.mlf-day.tone-bad    .mlf-day-fill { background: var(--bad); }

/* Future days · planned, not yet happened */
.mlf-day-future {
  background: transparent;
  border-style: dashed;
}
.mlf-day-future .mlf-day-fill { opacity: 0.55; }
.mlf-day-future .mlf-day-hrs  { color: var(--text-3); }

/* Weekend cells · dimmed */
.mlf-day-weekend { opacity: 0.55; }

/* Today highlight */
.mlf-day-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, var(--surface-2));
}
.mlf-day-today .mlf-day-num { color: var(--accent); }
.mlf-day-today::after {
  content: 'TODAY';
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-weight: 600; font-size: 8.5px; letter-spacing: 0.08em;
  color: var(--accent); background: var(--surface);
  padding: 0 4px; border-radius: 2px;
}

/* Visual gap between the past 7 (cells 1-7) and next 7 (cells 8-14). */
.mlf-day-pivot { margin-left: 10px; }
.mlf-day-pivot::before {
  content: ''; position: absolute; left: -6px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border);
}

.mlf-week-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 12px; font-size: 11px; color: var(--text-3);
}
.mlf-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.mlf-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.mlf-swatch.tone-accent { background: var(--accent); }
.mlf-swatch.tone-warn   { background: var(--warn); }
.mlf-swatch.tone-bad    { background: var(--bad); }
.mlf-swatch.outlined    { background: transparent; border: 1px dashed var(--text-2); }

@media (max-width: 720px) {
  .mlf-week-summary { grid-template-columns: 1fr; }
  .mlf-week { grid-template-columns: repeat(7, 1fr); row-gap: 6px; }
  .mlf-day-pivot { margin-left: 0; }
  .mlf-day-pivot::before { display: none; }
}

/* Meeting load + focus time · profile gauges */
.mlf-assess { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mlf-tile {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.mlf-tile .mlf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mlf-tile .mlf-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.mlf-tile .mlf-value { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; margin-top: 8px; }
.mlf-tile .mlf-value.tone-good { color: var(--good); }
.mlf-tile .mlf-value.tone-warn { color: var(--warn); }
.mlf-tile .mlf-value.tone-bad  { color: var(--bad); }
.mlf-tile .mlf-unit { font-size: 12px; color: var(--text-3); margin-left: 5px; letter-spacing: 0; }
.mlf-gauge {
  position: relative; height: 8px; margin-top: 12px;
  background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden;
}
.mlf-gauge-fill { position: absolute; inset: 0; border-radius: var(--r-pill); transition: width 0.3s ease; }
.mlf-gauge-fill.tone-good { background: var(--good); }
.mlf-gauge-fill.tone-warn { background: var(--warn); }
.mlf-gauge-fill.tone-bad  { background: var(--bad); }
.mlf-gauge-tick { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text-2); opacity: 0.7; border-radius: 1px; }
.mlf-scale {
  display: flex; justify-content: space-between; margin-top: 5px;
  font-family: var(--font-mono); font-weight: 600; font-size: 9.5px; color: var(--text-3); letter-spacing: 0.04em;
}
.mlf-tile .mlf-note { font-size: 11.5px; line-height: 1.45; color: var(--text-2); margin-top: 10px; }
.mlf-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 12px; padding: 9px 12px;
  font-size: 11.5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
}
.mlf-meta .tone-good { color: var(--good); }
.mlf-meta .tone-warn { color: var(--warn); }
.mlf-meta .tone-bad  { color: var(--bad); }
.mlf-grid-head {
  font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-top: 16px; margin-bottom: 8px;
}
@media (max-width: 720px) { .mlf-assess { grid-template-columns: 1fr; } }

/* ─── Ticket Forensics ──────────────────────────────────────────── */
.tf-hero { padding: 20px 24px; margin-bottom: 16px; }
.tf-hero .tfh-key { font-family: var(--font-mono); font-weight: 600; font-size: 12px; color: var(--text-3); }
.tf-hero .tfh-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 10px; }
.tf-hero .tfh-meta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }

.tf-timeline { padding: 14px; }
.tf-event {
  display: grid;
  grid-template-columns: 90px 28px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tf-event:last-child { border-bottom: 0; }
.tf-event .tfe-time { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); padding-top: 2px; }
.tf-event .tfe-icon {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--text-3);
}
.tf-event.kind-commit .tfe-icon { background: var(--accent-tint); color: var(--accent); }
.tf-event.kind-pr .tfe-icon { background: var(--info-tint); color: var(--info); }
.tf-event.kind-review .tfe-icon { background: var(--warn-tint); color: var(--warn); }
.tf-event.kind-deploy .tfe-icon { background: var(--good-tint); color: var(--good); }
.tf-event.kind-bug .tfe-icon { background: var(--bad-tint); color: var(--bad); }
.tf-event .tfe-body { font-size: 12.5px; color: var(--text); }
.tf-event .tfe-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.tf-event .tfe-link { color: var(--accent); cursor: pointer; }

/* ─── Empty state ──────────────────────────────────────────────── */
.empty { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 30px 0; }

/* ─── Self / Me view banner ────────────────────────────────────── */
.me-banner {
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; align-items: center; gap: 12px;
}
.me-banner .mb-text { font-size: 12.5px; color: var(--text-2); }

/* ─── PM/EM overlay layout ─────────────────────────────────────── */
.heatmap-table { width: 100%; border-collapse: collapse; }
.heatmap-table th {
  font-family: var(--font-mono); font-weight: 600; font-size: 10px;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.heatmap-table th.col-name { text-align: left; }
.heatmap-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-weight: 600; font-size: 11.5px;
  text-align: center;
}
.heatmap-table td.col-name { text-align: left; font-family: var(--font-sans); font-weight: 400; font-size: 12.5px; }
.heatmap-table tr:last-child td { border-bottom: 0; }
.heatmap-cell {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.heatmap-cell .hm-num { font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.heatmap-cell .hm-unit { font-size: 9.5px; font-weight: 600; line-height: 1; opacity: 0.6; }
.heatmap-cell.tone-good { color: var(--good); }
.heatmap-cell.tone-warn { color: var(--warn); }
.heatmap-cell.tone-bad  { color: var(--bad); }
.heatmap-cell.tone-accent { color: var(--accent); }

/* ─── Modal (used by commit/pr drill if needed) ────────────────── */
.modal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 70; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); animation: scrimIn 180ms var(--ease-out); }
.modal {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-xl);
  width: min(620px, 92vw); max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}

/* PR review timeline (inside drill) */
.pr-tl { display: flex; flex-direction: column; }
.pr-tl-row {
  display: grid;
  grid-template-columns: 60px 28px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pr-tl-row:last-child { border-bottom: 0; }
.pr-tl-row .ptl-time { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); }
.pr-tl-row .ptl-icon {
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.pr-tl-row .ptl-text { font-size: 12px; color: var(--text); }
.pr-tl-row .ptl-sub { font-size: 11px; color: var(--text-3); }
.pr-tl-row.kind-comment .ptl-icon { color: var(--info); background: var(--info-tint); }
.pr-tl-row.kind-approve .ptl-icon { color: var(--good); background: var(--good-tint); }
.pr-tl-row.kind-change  .ptl-icon { color: var(--warn); background: var(--warn-tint); }
.pr-tl-row.kind-merge   .ptl-icon { color: var(--accent); background: var(--accent-tint); }

/* Latency annotation */
.pr-latency { font-family: var(--font-mono); font-weight: 600; font-size: 10px; color: var(--text-3); margin-left: 6px; }
.pr-latency.tone-warn { color: var(--warn); }
.pr-latency.tone-bad  { color: var(--bad); }

/* ─── Mini-pies for AI usage donuts ────────────────────────────── */
.mini-pie {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface-3);
  position: relative;
}
.mini-pie::after {
  content: ""; position: absolute; inset: 10px;
  background: var(--surface);
  border-radius: 50%;
}

/* ─── Bar by type (chart inside AI usage card) ─────────────────── */
.bytype-row { display: grid; grid-template-columns: 120px 1fr 40px; gap: 8px; align-items: center; padding: 5px 0; font-size: 11.5px; }
.bytype-row .btr-track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bytype-row .btr-fill  { height: 100%; background: var(--accent); border-radius: 999px; }
.bytype-row .btr-val { font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--text-2); text-align: right; }

/* ─── Tweaks panel (minimal port) ──────────────────────────────── */
.tweaks-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 80; }
.tweaks-panel {
  position: fixed; top: 56px; right: 16px;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 81;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.tweaks-panel .tp-section { padding-top: 6px; border-top: 1px solid var(--border); }
.tweaks-panel .tp-section:first-of-type { border-top: 0; padding-top: 0; }
.tweaks-panel .tp-h { font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.tweaks-panel .tp-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 4px 0; }
.tweaks-panel .tp-row .tp-opts { display: flex; gap: 4px; }
.tweaks-panel .tp-row .tp-opts button {
  padding: 3px 8px; border-radius: var(--r-xs);
  background: var(--surface-2); border: 1px solid var(--border-2);
  font-size: 11px; color: var(--text-2);
}
.tweaks-panel .tp-row .tp-opts button.active { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent); }

/* ─── Status / WIP / on-call chips ─────────────────────────────── */
.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.status-chip .sc-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.status-chip.on-call { background: var(--accent-tint); border-color: var(--accent-border); color: var(--accent); }
.status-chip.ramp { background: var(--good-tint); border-color: var(--good-border); color: var(--good); }

/* ─── Compact "kv" grid (used in detail panels) ────────────────── */
.kv-grid { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 12.5px; align-items: center; }
.kv-label { color: var(--text-3); font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── Empty drill state ─────────────────────────────────────────── */
.drill-empty { text-align: center; padding: 24px 16px; color: var(--text-3); font-size: 12.5px; }
