/* ============================================================================
   Drivemode Pulse — "Drive Mode" design system
   Cockpit-dark by default (zero-gaze, high-contrast); day/night via [data-theme].
   ========================================================================== */

:root, :root[data-theme="dark"] {
  /* Honda Drive Mode HMI — deep blue-black cockpit */
  --bg: #0A0E16;
  --surface: #121826;
  --surface-2: #18202F;
  --surface-3: #212B40;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #FFFFFF;
  --text-dim: #AEB8CA;
  --muted: #7A8599;
  --accent: #2E86F0;          /* Honda HMI blue (SPORT) */
  --accent-ink: #FFFFFF;
  --accent-2: #3FBFA3;        /* Drivemode teal */
  --track: #263044;
  --grid: #1E2638;
  --shadow: 0 8px 28px rgba(0,0,0,0.5);
  /* Drivemode brand categorical (validated for dark surface) */
  --series-1: #3FBFA3; --series-2: #E08A3B; --series-3: #E0315A; --series-4: #9B4DD4;
  --series-5: #C98500; --series-6: #2FAE66; --series-7: #D55181;
  /* status */
  --status-good: #31d07a; --status-warning: #f5b53d; --status-serious: #ec835a; --status-critical: #ff5c5c;
  --rag-green: #31d07a; --rag-amber: #f5b53d; --rag-red: #ff5c5c;
}
:root[data-theme="light"] {
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --surface-2: #F5F8FC;
  --surface-3: #EAF0F8;
  --border: rgba(13,23,38,0.10);
  --border-strong: rgba(13,23,38,0.18);
  --text: #15233B;            /* Drivemode slate */
  --text-dim: #49566B;
  --muted: #6B7689;
  --accent: #1F6FE0;
  --accent-ink: #FFFFFF;
  --accent-2: #1BA088;
  --track: #E2E8F1;
  --grid: #E1E7EF;
  --shadow: 0 6px 20px rgba(13,23,38,0.10);
  --series-1: #1BA088; --series-2: #d9772a; --series-3: #E0315A; --series-4: #8B3FC4;
  --series-5: #b87700; --series-6: #1f9e56; --series-7: #c54d7d;
  --status-good: #0ca30c; --status-warning: #d98a00; --status-serious: #ec835a; --status-critical: #d03b3b;
  --rag-green: #0ca30c; --rag-amber: #d98a00; --rag-red: #d03b3b;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
button { font-family: inherit; }
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.app { display: flex; flex-direction: column; height: 100vh; }

/* ── Topbar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { display: inline-flex; align-items: center; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.brand-name { font-size: 16px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.brand-name b { font-weight: 800; }
.sprint-pill { margin-left: 6px; padding: 3px 10px; border: 1px solid var(--border-strong); border-radius: 0; font-size: 12px; color: var(--text-dim); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.source-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 0; border: 1px solid var(--border); }
.source-badge .sb-dot { width: 7px; height: 7px; border-radius: 50%; }
.source-badge.seed { color: var(--text-dim); } .source-badge.seed .sb-dot { background: var(--muted); }
.source-badge.live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); } .source-badge.live .sb-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.last-sync { font-size: 12px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); padding: 7px 13px; border-radius: 0; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .14s; }
.btn:hover { border-color: var(--accent); background: var(--surface-3); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn-ghost { background: transparent; }
.btn-icon { padding: 7px 10px; font-size: 15px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.sync-btn .sync-ico { display: inline-block; }
.sync-btn.spinning .sync-ico { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Shell ── */
.shell { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 216px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: space-between; padding: 14px 12px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 0; border: none; background: transparent; color: var(--text-dim); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; transition: all .14s; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.nav-ico { width: 18px; text-align: center; color: var(--accent); font-size: 15px; }
.nav-item:not(.active) .nav-ico { color: var(--muted); }
.side-foot { font-size: 12px; color: var(--muted); padding: 12px; border-top: 1px solid var(--border); }
.sf-title { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 9px; }
.sf-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; color: var(--text-dim); }
.sf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.sf-dot.ok { background: var(--status-good); box-shadow: 0 0 7px color-mix(in srgb, var(--status-good) 70%, transparent); }
.sf-note { margin-top: 10px; font-size: 11px; color: var(--muted); }

.main { flex: 1; overflow-y: auto; padding: 22px 26px 60px; }
.view { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

/* ── Sprint banner ── */
.sprint-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-radius: 0; background: var(--surface); border: 1px solid var(--border); }
.sb-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.sb-dates { font-weight: 500; text-transform: none; letter-spacing: 0; }
.sb-goal { font-size: 21px; margin-top: 6px; letter-spacing: -0.02em; }
.sb-right { display: flex; align-items: center; gap: 18px; }
.sb-days { font-size: 13px; color: var(--text-dim); } .sb-days b { font-size: 22px; color: var(--text); font-weight: 800; margin-right: 4px; }

/* ── RAG pill/dot ── */
.rag-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 0; font-size: 12px; font-weight: 700; }
.rag-pill.rag-green { background: color-mix(in srgb, var(--rag-green) 16%, transparent); color: var(--rag-green); }
.rag-pill.rag-amber { background: color-mix(in srgb, var(--rag-amber) 18%, transparent); color: var(--rag-amber); }
.rag-pill.rag-red { background: color-mix(in srgb, var(--rag-red) 16%, transparent); color: var(--rag-red); }
.rag-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rag-dot.rag-green { background: var(--rag-green); } .rag-dot.rag-amber { background: var(--rag-amber); } .rag-dot.rag-red { background: var(--rag-red); }

/* ── Stat grid / visibility cards (large, glanceable, clickable) ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 16px 16px 14px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; display: flex; flex-direction: column; gap: 4px; min-height: 118px; }
.stat-card:hover:not(.no-drill) { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.stat-card.no-drill { cursor: default; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-ico { color: var(--muted); }
.stat-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.stat-unit { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-left: 4px; }
.stat-sub { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.stat-drill { margin-top: auto; font-size: 11px; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity .12s; }
.stat-card:hover .stat-drill { opacity: 1; }
.stat-card.rag-amber:hover { border-color: var(--rag-amber); }
.stat-card.rag-red:hover { border-color: var(--rag-red); }

/* ── Panels ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 14px; font-weight: 700; }
.panel-sub { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.panel-body { padding: 16px 18px; }
.panel-body.no-pad { padding: 0; }

/* ── Charts ── */
.viz { display: block; overflow: visible; }
.viz-legend { display: flex; gap: 16px; margin-top: 10px; padding-left: 4px; }
.viz-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); font-weight: 500; }
.viz-legend-item i { width: 12px; height: 12px; border-radius: 0; display: inline-block; }
.chart-tip { position: fixed; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .1s; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 0; padding: 9px 11px; font-size: 12px; box-shadow: var(--shadow); min-width: 130px; }
.tip-title { font-weight: 700; margin-bottom: 5px; color: var(--text); }
.tip-row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-dim); padding: 1px 0; }
.tip-row b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ── Epic bars ── */
.epic-bars { display: flex; flex-direction: column; gap: 13px; }
.epic-bar-row { display: flex; flex-direction: column; gap: 5px; }
.ebr-top { display: flex; align-items: center; justify-content: space-between; }
.ebr-pct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ebr-track { height: 8px; background: var(--track); border-radius: 0; overflow: hidden; }
.ebr-fill { height: 100%; border-radius: 0; }
.ebr-sub { font-size: 11px; color: var(--muted); }

/* ── Epic tag / status / type / priority ── */
.epic-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-dim); padding: 2px 9px 2px 7px; border-radius: 0; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.epic-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 0; }
.st-todo .status-dot { background: var(--muted); } .st-todo { color: var(--text-dim); }
.st-prog .status-dot { background: var(--accent-2); } .st-prog { color: var(--accent-2); }
.st-review .status-dot { background: var(--series-7); } .st-review { color: var(--series-7); }
.st-done .status-dot { background: var(--status-good); } .st-done { color: var(--status-good); }
.st-blocked .status-dot { background: var(--rag-red); } .st-blocked { color: var(--rag-red); }
.type-ico { font-size: 11px; width: 15px; display: inline-block; text-align: center; }
.type-story { color: var(--accent-2); } .type-task { color: var(--status-good); } .type-bug { color: var(--rag-red); } .type-spike { color: var(--series-4); }
.prio { font-size: 11px; font-weight: 700; }
.prio-highest { color: var(--rag-red); } .prio-high { color: var(--status-serious); } .prio-medium { color: var(--muted); } .prio-low { color: var(--text-dim); }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; letter-spacing: -0.02em; }
.ready { display: inline-flex; gap: 4px; }
.ready-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid var(--border-strong); }
.ready-dot.ok { background: var(--status-good); border-color: transparent; }
.ready-dot.no { background: transparent; border-color: var(--muted); }

/* ── Board ── */
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.view-title { font-size: 20px; letter-spacing: -0.02em; }
.view-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.board-stats { display: flex; gap: 20px; }
.bstat { text-align: right; } .bstat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; } .bstat span { font-size: 11px; color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 0; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-dim); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .12s; letter-spacing: .01em; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 45%, transparent); }
.chip.active .chip-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--surface); border: 1px solid var(--border); border-radius: 0; display: flex; flex-direction: column; min-height: 120px; }
.board-col.col-blocked { border-color: color-mix(in srgb, var(--rag-red) 40%, transparent); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.col-count { font-size: 11px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.issue-card { text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: all .12s; }
.issue-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.issue-card.flagged { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rag-red) 40%, transparent); }
.ic-top { display: flex; align-items: center; gap: 8px; }
.ic-key { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: auto; }
.ic-title { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text); }
.ic-flag { font-size: 11px; color: var(--rag-red); font-weight: 600; background: color-mix(in srgb, var(--rag-red) 12%, transparent); padding: 5px 8px; border-radius: 0; }
.ic-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ic-right { display: flex; align-items: center; gap: 8px; }
.pts { font-size: 11px; font-weight: 800; background: var(--surface-3); color: var(--text); border-radius: 0; padding: 2px 7px; font-variant-numeric: tabular-nums; }
.pts.none { color: var(--muted); }

/* ── Tables ── */
.issue-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.issue-table thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.issue-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.issue-tr:hover { background: var(--surface-2); }
.issue-table tbody tr:last-child td { border-bottom: none; }
.ta-center { text-align: center; }
.row-key { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-title { color: var(--text); max-width: 420px; }
.row-flag { color: var(--rag-red); margin-left: 7px; }
.rank { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; width: 34px; }
.assignee { display: inline-flex; align-items: center; gap: 7px; } .assignee-name { color: var(--text-dim); font-size: 12px; }
.empty { color: var(--muted); font-size: 12px; text-align: center; padding: 14px; }
.mt { margin-top: 16px; }

/* ── AI narrative / insights ── */
.ai-narrative { display: flex; flex-direction: column; gap: 12px; }
.ai-body p { margin: 0 0 9px; color: var(--text-dim); } .ai-body p:last-child { margin-bottom: 0; }
.ai-body strong { color: var(--text); font-weight: 700; }
.ai-body ul { margin: 0 0 9px; padding-left: 18px; color: var(--text-dim); } .ai-body li { margin: 3px 0; }
.ai-body code { background: var(--surface-3); padding: 1px 6px; border-radius: 0; font-size: 12px; }
.ai-refs, .inc-refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.ref-chip { font: inherit; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: none; border-radius: 0; padding: 3px 8px; cursor: pointer; }
.ref-chip:hover { background: color-mix(in srgb, var(--accent-2) 22%, transparent); }

.insight-feed { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.insight-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; }
.inc-head { display: flex; align-items: center; justify-content: space-between; }
.inc-type { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.inc-ico { font-size: 13px; }
.inc-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.inc-body { font-size: 13px; }
.inc-body p { margin: 0 0 7px; color: var(--text-dim); } .inc-body ul { margin: 0; padding-left: 17px; color: var(--text-dim); }
.inc-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.inc-model { font-size: 10.5px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 2px 8px; border-radius: 0; }
.inc-time { font-size: 11px; color: var(--muted); }

/* ── Agent run ── */
.agent-run { display: flex; flex-direction: column; gap: 2px; }
.agent-step { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; position: relative; }
.agent-step:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 26px; bottom: -2px; width: 2px; background: var(--border); }
.as-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; margin-top: 2px; background: var(--surface); z-index: 1; }
.agent-step.done .as-dot { border-color: var(--status-good); background: var(--status-good); }
.agent-step.running .as-dot { border-color: var(--accent); animation: pulse 1s infinite; }
.agent-step.pending .as-dot { opacity: .5; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.as-label { font-size: 13px; font-weight: 700; }
.as-detail { font-size: 12px; color: var(--muted); margin-top: 1px; }
.as-check { margin-left: auto; color: var(--status-good); font-weight: 800; }

/* ── Proposed actions ── */
.actions-list { display: flex; flex-direction: column; gap: 10px; }
.action-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface-2); }
.action-row.action-approved { border-color: color-mix(in srgb, var(--status-good) 45%, transparent); }
.action-row.action-dismissed { opacity: .55; }
.action-kind { font-size: 15px; }
.action-body { flex: 1; min-width: 0; }
.action-summary { font-size: 13px; } .action-summary b { font-variant-numeric: tabular-nums; }
.action-detail { font-size: 12px; color: var(--muted); margin-top: 3px; }
.action-btns { display: flex; gap: 6px; flex-shrink: 0; }
.action-state { font-size: 12px; font-weight: 700; } .action-state.approved { color: var(--status-good); } .action-state.dismissed { color: var(--muted); }
.sev { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 0; }
.sev-sev2 { color: var(--status-serious); background: color-mix(in srgb, var(--status-serious) 14%, transparent); }
.sev-sev3 { color: var(--status-warning); background: color-mix(in srgb, var(--status-warning) 14%, transparent); }

/* ── Roadmap ── */
.roadmap { display: flex; flex-direction: column; gap: 4px; }
.rm-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; padding: 7px 0; cursor: pointer; border-radius: 0; }
.rm-row:not(.rm-header):hover { background: var(--surface-2); }
.rm-header { cursor: default; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.rm-label { min-width: 0; }
.rm-epic { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.rm-meta { font-size: 11px; color: var(--muted); margin-top: 3px; margin-left: 16px; }
.epic-status { color: var(--text-dim); }
.rm-track { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: relative; height: 34px; }
.rm-colhead { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.rm-colhead.now { color: var(--accent); }
.rm-bar { position: relative; height: 26px; border-radius: 0; background: color-mix(in srgb, var(--epic) 18%, transparent); border: 1px solid color-mix(in srgb, var(--epic) 45%, transparent); display: flex; align-items: center; overflow: hidden; z-index: 2; }
.rm-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; opacity: .4; }
.rm-bar-label { position: relative; z-index: 1; font-size: 11px; font-weight: 700; padding: 0 10px; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.rm-now { border-left: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); grid-row: 1; height: 100%; z-index: 0; }

/* ── Drill / modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 40px; z-index: 1000; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0; max-width: 820px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: hidden; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 17px; }
.modal-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.modal-x { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); width: 30px; height: 30px; border-radius: 0; cursor: pointer; font-size: 13px; }
.modal-x:hover { color: var(--text); border-color: var(--border-strong); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.drill-group { margin-bottom: 20px; } .drill-h { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.drill-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.drill-stats { display: flex; gap: 22px; margin-bottom: 16px; }
.readiness-key { display: flex; gap: 22px; margin-bottom: 14px; } .rk { font-size: 12px; } .rk b { display: block; }
.readiness-legend { display: flex; gap: 14px; margin-left: auto; } .rl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.kv { display: flex; flex-direction: column; gap: 3px; } .kv-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; } .kv-v { font-size: 13px; font-weight: 600; }

/* ── Issue detail ── */
.issue-detail { display: flex; flex-direction: column; gap: 14px; }
.id-top { display: flex; align-items: center; gap: 10px; }
.id-key { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.id-title { font-size: 20px; letter-spacing: -0.02em; }
.id-flag { font-size: 13px; color: var(--rag-red); font-weight: 600; background: color-mix(in srgb, var(--rag-red) 12%, transparent); padding: 10px 12px; border-radius: 0; }
.id-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.id-ready { display: flex; align-items: center; gap: 10px; font-size: 12px; } .id-ready-labels { color: var(--text-dim); }
.id-link { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Toggle ── */
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.toggle.on { color: var(--text); border-color: var(--accent); }
.toggle-box { width: 15px; height: 15px; border-radius: 0; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--accent-ink); }
.toggle.on .toggle-box { background: var(--accent); border-color: var(--accent); }

/* ── Toasts ── */
.toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 9px; z-index: 2000; }
.toast { padding: 11px 15px; border-radius: 0; font-size: 13px; font-weight: 600; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); transform: translateX(120%); transition: transform .3s; max-width: 340px; }
.toast.in { transform: translateX(0); }
.toast { display: flex; align-items: center; gap: 9px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.toast-ok::before { background: var(--status-good); } .toast-bad::before { background: var(--rag-red); } .toast-muted::before { background: var(--muted); }

/* ── Product switcher ── */
.brand-div { color: var(--muted); font-size: 16px; opacity: .6; }
.product-select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: 0; padding: 6px 10px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; max-width: 230px; }
.product-select:hover { border-color: var(--accent); }

/* ── Portfolio product cards ── */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px; }
.product-card { text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; padding: 15px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 13px; transition: transform .12s, border-color .12s, box-shadow .12s; }
.product-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.product-card.rag-green:hover { border-color: var(--rag-green); } .product-card.rag-amber:hover { border-color: var(--rag-amber); } .product-card.rag-red:hover { border-color: var(--rag-red); }
.pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-ident { display: flex; align-items: flex-start; gap: 10px; }
.pc-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.pc-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.pc-brand { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pc-reason { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.pc-preview { display: flex; flex-direction: column; gap: 5px; }
.pc-prebar { display: flex; height: 6px; background: var(--track); overflow: hidden; gap: 1px; }
.pcb { display: block; min-width: 2px; }
.pcb-done { background: var(--status-good); } .pcb-review { background: var(--series-4); } .pcb-prog { background: var(--accent-2); } .pcb-todo { background: var(--muted); } .pcb-blocked { background: var(--rag-red); }
.pc-prelabel { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 6px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pc-metric { display: flex; flex-direction: column; gap: 2px; } .pc-metric b { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .pc-metric b.bad { color: var(--rag-red); } .pc-metric span { font-size: 10.5px; color: var(--muted); }
.pc-spark { display: block; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; }
.pc-key { font-size: 11px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-open { font-size: 11px; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity .12s; }
.product-card:hover .pc-open { opacity: 1; }

/* ── Icons ── */
.ico { display: block; }
.nav-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; }
.panel-titlewrap { display: flex; align-items: flex-start; gap: 10px; }
.panel-ico { display: inline-flex; color: var(--accent); margin-top: 1px; flex-shrink: 0; }
.inc-ico { display: inline-flex; }
.action-kind { display: inline-flex; color: var(--accent-2); margin-top: 1px; }
.btn-ico { display: inline-flex; }
.sync-ico { display: inline-flex; }
.btn-icon svg, .sync-ico svg { display: block; }

/* ── Hero focus-metric tiles (designed meters) ── */
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-hero { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 17px 18px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 11px; transition: transform .12s, border-color .12s, box-shadow .12s; }
.metric-hero:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.mh-top { display: flex; align-items: center; justify-content: space-between; }
.mh-label { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mh-dot { width: 9px; height: 9px; border-radius: 0; }
.mh-value { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--text); }
.mh-unit { font-size: 16px; font-weight: 600; color: var(--text-dim); margin-left: 5px; letter-spacing: 0; }
.mh-meter { height: 8px; background: var(--track); border-radius: 0; overflow: hidden; }
.mh-fill { height: 100%; border-radius: 0; transition: width 1s cubic-bezier(.22,.61,.36,1); }
.mh-sub { font-size: 12px; color: var(--text-dim); }

/* ── Custom sprint page: burndown hero + "at a glance" list ── */
.ov-split { grid-template-columns: 1.45fr 1fr; }
.glance { display: flex; flex-direction: column; }
.glance-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; border: none; border-bottom: 1px solid var(--border); background: transparent; width: 100%; text-align: left; color: inherit; font: inherit; cursor: default; border-radius: 0; }
.glance-row.clickable { cursor: pointer; }
.glance-row.clickable:hover { background: var(--surface-2); }
.glance-row:last-child { border-bottom: none; }
.glance-k { font-size: 13px; color: var(--text-dim); }
.glance-v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.glance-meta { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.glance-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Reliability panel ── */
.reliability { display: flex; flex-direction: column; gap: 16px; }
.rel-top { display: flex; gap: 32px; }
.rel-stat { display: flex; flex-direction: column; gap: 3px; }
.rel-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.rel-v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.rel-u { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-left: 3px; }

/* ── Gauge cluster ── */
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; }
.gauge { overflow: visible; }
.gauge-prog { transition: stroke-dashoffset 1.15s cubic-bezier(.22,.61,.36,1); }
.gauge-label { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 2px; }
.gauge-sub { font-size: 11px; color: var(--muted); }

/* ── Mode segmented control (ECON / NORMAL / SPORT) ── */
.mode-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 0; padding: 2px; gap: 2px; }
.seg-btn { border: none; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 5px 11px; border-radius: 0; cursor: pointer; transition: all .12s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 6px color-mix(in srgb, var(--accent) 45%, transparent); }

/* ── Team workload (SPORT) ── */
.workload { display: flex; flex-direction: column; gap: 11px; }
.wl-row { display: grid; grid-template-columns: 150px 1fr 56px; align-items: center; gap: 14px; }
.wl-who { display: flex; align-items: center; gap: 9px; }
.wl-name { font-size: 13px; font-weight: 700; } .wl-role { font-size: 11px; color: var(--muted); }
.wl-bar { position: relative; height: 16px; background: var(--surface-3); border-radius: 0; overflow: hidden; }
.wl-cap { position: absolute; left: 0; top: 0; bottom: 0; background: var(--track); }
.wl-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); opacity: .5; border-radius: 0; }
.wl-fill.over { background: var(--rag-red); opacity: .55; }
.wl-done { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 0; }
.wl-pts { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; } .wl-pts b { font-weight: 800; } .wl-pts span { color: var(--muted); font-size: 11px; }

/* ── Detail panes (depth, not modals) ── */
.detail-head { display: flex; flex-direction: column; gap: 14px; }
.back-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 13px; cursor: pointer; transition: all .12s; }
.back-btn:hover { color: var(--text); border-color: var(--accent); }
.back-arrow { font-size: 15px; }

/* ── Drill-downs ── */
.oc.drillable, .gov-fig.drillable { background: transparent; border: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 6px; margin: -6px; transition: background .12s; }
.oc.drillable:hover, .gov-fig.drillable:hover { background: var(--surface-2); }
.hb-seg { cursor: pointer; }
.hb-li { background: transparent; border: none; font: inherit; color: var(--text-dim); cursor: pointer; padding: 2px; display: inline-flex; align-items: center; gap: 6px; }
.hb-li:hover { color: var(--text); }
.drill-team { display: flex; align-items: center; gap: 8px; background: transparent; border: none; color: inherit; font: inherit; cursor: pointer; padding: 8px 0; width: 100%; text-align: left; }
.drill-team b { font-size: 13px; }
.drill-open { margin-left: auto; font-size: 11px; color: var(--accent); font-weight: 700; }

/* ── Portfolio health band ── */
.ph { display: flex; flex-direction: column; gap: 18px; }
.health { display: flex; flex-direction: column; gap: 10px; }
.hb-bar { display: flex; height: 14px; border-radius: 0; overflow: hidden; background: var(--track); gap: 2px; }
.hb-seg { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff; min-width: 20px; }
.hb-green { background: var(--rag-green); } .hb-amber { background: var(--rag-amber); } .hb-red { background: var(--rag-red); }
.hb-legend { display: flex; gap: 20px; }
.hb-li { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.hb-li b { color: var(--text); font-weight: 800; }
.ph-outcomes { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 24px; align-items: end; padding-top: 16px; border-top: 1px solid var(--border); }
.oc { display: flex; flex-direction: column; gap: 6px; }
.oc-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.oc-v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; align-items: baseline; gap: 8px; }
.oc-pct { font-size: 13px; color: var(--text-dim); font-weight: 700; }
.oc-meter { height: 7px; background: var(--track); border-radius: 0; overflow: hidden; }
.oc-fill { height: 100%; border-radius: 0; background: var(--accent); transition: width 1s cubic-bezier(.22,.61,.36,1); }

/* ── Needs attention ── */
.attn { display: flex; flex-direction: column; }
.attn-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border: none; border-bottom: 1px solid var(--border); background: transparent; width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; border-radius: 0; }
.attn-row:last-child { border-bottom: none; }
.attn-row:hover { background: var(--surface-2); }
.attn-main { flex: 1; min-width: 0; }
.attn-name { font-size: 14px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.attn-brand { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.attn-reason { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.attn-figs { display: flex; gap: 16px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.attn-open { font-size: 12px; font-weight: 700; color: var(--accent); flex-shrink: 0; }

/* ── Teams: List / Grid / Full view ── */
.view-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border-strong); padding: 2px; gap: 2px; }
.team-list { display: flex; flex-direction: column; }
.team-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: none; border-bottom: 1px solid var(--border); background: transparent; width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.team-row:last-child { border-bottom: none; }
.team-row:hover { background: var(--surface-2); }
.tr-ident { min-width: 190px; }
.tr-name { font-size: 14px; font-weight: 700; }
.tr-brand { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tr-metrics { display: flex; gap: 26px; margin-left: auto; }
.tr-m { display: flex; flex-direction: column; gap: 1px; min-width: 50px; }
.tr-m b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; } .tr-m b.bad { color: var(--rag-red); }
.tr-m span { font-size: 10.5px; color: var(--muted); }

.team-full { display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.team-pane { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border: 1px solid var(--border); background: var(--surface-2); width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; transition: border-color .12s; }
.team-pane:hover { border-color: var(--accent); }
.tp-head { display: flex; align-items: flex-start; justify-content: space-between; }
.tp-reason { font-size: 13px; color: var(--text-dim); }
.tp-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tp-m { display: flex; flex-direction: column; gap: 3px; }
.tp-k { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.tp-v { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tp-sub { font-size: 11px; color: var(--muted); }
.tp-foot { display: flex; align-items: center; justify-content: space-between; }

/* ── Cards / Full item layouts (Backlog, PRs) ── */
.item-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px; }
.item-full { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.item-pane { text-align: left; background: var(--surface-2); border: 1px solid var(--border); padding: 15px 17px; width: 100%; cursor: pointer; display: flex; flex-direction: column; gap: 10px; font: inherit; color: inherit; transition: border-color .12s; }
.item-pane:hover { border-color: var(--accent); }
.item-pane.flagged { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rag-red) 40%, transparent); }
.ip-top { display: flex; align-items: center; gap: 9px; }
.ip-key { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ip-pts { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ip-title { font-size: 15px; font-weight: 600; }
.ip-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); }
.ip-ready { display: inline-flex; align-items: center; gap: 8px; }
.pr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px; }

/* ── Executive summary ── */
.exec-ico { display: inline-flex; }
.exec { display: flex; flex-direction: column; gap: 16px; }
.exec-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exec-goal { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.exec-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.exec-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.exec-k { font-size: 13px; color: var(--muted); }
.exec-v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.exec-risks h4 { font-size: 13px; margin-bottom: 7px; }
.exec-risks ul { margin: 0; padding-left: 18px; } .exec-risks li { font-size: 13px; color: var(--text-dim); margin: 4px 0; }
.exec-foot { font-size: 11.5px; color: var(--muted); }
.exec-actions { display: flex; gap: 10px; padding-top: 4px; }

/* ── Delivery (GitHub) ── */
.gov-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.gov-fig { display: flex; flex-direction: column; gap: 4px; }
.gov-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.gov-v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 7px; }
.gov-u { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-left: 2px; }

.pr-list, .dep-list { display: flex; flex-direction: column; }
.pr-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.pr-row:last-child, .dep-row:last-child { border-bottom: none; }
.pr-checks { display: inline-flex; flex-shrink: 0; width: 18px; justify-content: center; }
.pr-checks.chk-passing { color: var(--status-good); } .pr-checks.chk-failing { color: var(--rag-red); } .pr-checks.chk-pending { color: var(--status-warning); }
.pr-checks.chk-pending::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--status-warning); }
.pr-main { flex: 1; min-width: 0; }
.pr-title { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.pr-num { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.pr-diff { font-variant-numeric: tabular-nums; }
.pr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pr-status { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 0; white-space: nowrap; }
.prs-open { color: var(--text-dim); background: var(--surface-3); }
.prs-review { color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 14%, transparent); }
.prs-approved { color: var(--status-good); background: color-mix(in srgb, var(--status-good) 14%, transparent); }
.prs-changes { color: var(--status-warning); background: color-mix(in srgb, var(--status-warning) 16%, transparent); }
.prs-merged { color: var(--series-4); background: color-mix(in srgb, var(--series-4) 16%, transparent); }

.dep-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border); }
.dep-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dep-dot.ok { background: var(--status-good); } .dep-dot.bad { background: var(--rag-red); }
.dep-main { flex: 1; min-width: 0; }
.dep-top { display: flex; align-items: center; gap: 9px; }
.dep-ver { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.env { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 0; }
.env-production { color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.env-staging { color: var(--muted); background: var(--surface-3); }
.dep-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.dep-status { font-size: 11px; font-weight: 700; flex-shrink: 0; }
.dep-status.ok { color: var(--status-good); } .dep-status.bad { color: var(--rag-red); }

/* ── Requirements ── */
.rq-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 14px; }
.rq-field { display: flex; flex-direction: column; gap: 5px; }
.rq-field-wide { grid-column: 1 / -1; }
.rq-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rq-input { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); padding: 8px 10px; font: inherit; font-size: 13px; border-radius: 0; }
.rq-input:focus { outline: none; border-color: var(--accent); }
.rq-input::placeholder { color: var(--muted); }
.rq-textarea { resize: vertical; min-height: 40px; }
.rq-select { appearance: none; cursor: pointer; }
.rq-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }

.rq-list { display: flex; flex-direction: column; }
.rq-full { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.rq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px; }

.rq-pane { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 9px; }
.rq-list .rq-pane:last-child { border-bottom: none; }
.rq-pane-full { border: 1px solid var(--border); background: var(--surface-2); }
.rq-pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rq-pane-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rq-title-text { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.rq-pane-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.rq-pane-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-dim); }
.rq-desc { font-size: 13px; color: var(--text-dim); margin: 0; }

.rq-card { padding: 14px; border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 9px; }
.rq-card-top { display: flex; align-items: center; justify-content: space-between; }
.rq-card-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.rq-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-stake { font-size: 12px; color: var(--muted); font-weight: 600; }

.rq-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 0; border: 1px solid var(--border); white-space: nowrap; }
.rq-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rq-draft { color: var(--muted); }
.rq-approved { color: var(--status-good); border-color: color-mix(in srgb, var(--status-good) 35%, transparent); background: color-mix(in srgb, var(--status-good) 10%, transparent); }
.rq-injira { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rq-prio { font-size: 11px; font-weight: 700; } .rq-prio.prio-high { color: var(--status-serious); } .rq-prio.prio-medium { color: var(--muted); } .rq-prio.prio-low { color: var(--text-dim); }

.rq-ac { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rq-ac-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }
.rq-ac-check { color: var(--status-good); flex-shrink: 0; margin-top: 1px; }
.rq-ac-empty { font-size: 12px; color: var(--muted); font-style: italic; }
.rq-ac-drafting { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.rq-spinner { width: 13px; height: 13px; border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: rq-spin .7s linear infinite; flex-shrink: 0; }
@keyframes rq-spin { to { transform: rotate(360deg); } }

.rq-row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.rq-row-actions .btn { font-size: 12px; padding: 6px 11px; }
.rq-jira { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim); }
.rq-jira strong { color: var(--accent); }
.rq-dry { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--border); padding: 1px 6px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .rq-grid { grid-template-columns: repeat(2, 1fr); }
  .rq-form { grid-template-columns: 1fr 1fr; }
  .stat-grid, .metric-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .ov-split, .insight-feed { grid-template-columns: 1fr; }
  .gov-strip { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .ph-outcomes { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .tp-metrics { grid-template-columns: repeat(3, 1fr); }
  .tr-metrics { gap: 16px; }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-grid { grid-template-columns: 1fr; }
  .id-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
