/* ============================================================
   Criteria Simulator — app-specific styles
   Extends shared/design.css v2.0
   ============================================================ */

/* Set sidebar width to match .control-sidebar's actual width.
   shared/design.css default is 240px; we widen to 300px for the filter density. */
:root { --sidebar-w: 300px; }
body { background: var(--bg); color: var(--ink); overflow-x: hidden; }
html { overflow-x: hidden; }

/* CRITICAL: shared design.css and our flex containers override the
   browser's default [hidden] { display:none }. Force it back. */
[hidden] { display: none !important; }

/* Force the 2-column grid even at narrower widths (shared @media at 680px
   collapses to 1fr; we want to keep sidebar+workspace until 900px instead) */
.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}
@media (max-width: 760px) {
  .app-body { grid-template-columns: 1fr; }
}

/* mainContent fills the workspace column completely */
#mainContent { width: 100%; min-width: 0; }

/* Reset panel-head — shared/design.css makes it dark navy by default;
   we want light cards with dark-ink headers (better contrast for body content). */
.panel-head {
  display: block;
  background: var(--surface);
  padding: 14px 18px 8px;
  border-bottom: 1px solid var(--line-2);
}
.panel-head h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
  letter-spacing: .02em;
  text-transform: none;
}
.panel-head p { font-size: 12px; color: var(--ink-3); margin: 0; }

/* ── Filter chip strip (above content) ───────────────────────── */
.filter-strip {
  position: sticky;
  top: var(--topbar-h);
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 5px 8px;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  white-space: nowrap;
}
.filter-chip b { color: var(--ink-3); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.filter-chip em { font-style: normal; color: var(--brand-blue); font-weight: 700; }
.filter-chip.active   { background: rgba(23,31,105,.07); border-color: rgba(23,31,105,.18); }
.cs2-chip-pool { background: var(--brand-blue); border-color: var(--brand-blue); }
.cs2-chip-pool b { color: rgba(255,255,255,.75); }
.cs2-chip-pool em { color: #fff; }
.filter-chip-reset {
  background: transparent; border: 1px solid var(--line); color: var(--ink-3);
  padding: 5px 10px; border-radius: 999px; font-size: 12px; cursor: pointer;
}
.filter-chip-reset:hover { color: var(--brand-red); border-color: var(--brand-red); }

/* Quick-jump nav */
.section-nav { display: flex; gap: 4px; margin-left: auto; }
.section-nav a {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.section-nav a:hover { background: var(--surface-2); color: var(--brand-blue); }

/* ── Topbar polish (the original was overlapping) ────────────── */
.app-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  min-height: 60px;
}
.topbar-brand { display: flex; align-items: center; }
.topbar-logo { height: 32px; width: auto; display: block; }
.topbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,.18);
}
.topbar-identity { line-height: 1.15; min-width: 0; }
.topbar-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.topbar-spacer { flex: 1; }
.topbar-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}
.topbar-pill {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.topbar-pill b {
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.topbar-source {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.topbar-source[data-source="neon"]     { background: rgba(5,150,105,.22); border-color: rgba(5,150,105,.4); }
.topbar-source[data-source="cache"]    { background: rgba(217,119,6,.22);  border-color: rgba(217,119,6,.4); }
.topbar-source[data-source="fallback"] { background: rgba(227,25,55,.22);  border-color: rgba(227,25,55,.4); }

/* ── Scenario strip below topbar ────────────────────────────── */
.scenario-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 20px;
  background: var(--brand-blue);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.scenario-strip-name { display: flex; flex-direction: column; min-width: 220px; }
.scenario-strip-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.scenario-strip-name strong { font-size: 15px; font-weight: 700; }
.scenario-strip-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,.88);
}
.scenario-strip-metrics b {
  font-weight: 600;
  color: rgba(255,255,255,.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 4px;
}
.scenario-strip-metrics em {
  font-style: normal;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.scenario-strip-actions { display: flex; gap: 8px; }

/* ── Sidebar additions ──────────────────────────────────────── */
.cs2-scope-section {
  background: rgba(0,154,199,.08);
  border-left: 3px solid var(--brand-pool);
}
.cs2-scope-section .sidebar-section-title { color: rgba(255,255,255,.85); }
.cs2-scope-note { margin-top: 0; }
.control-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  color: var(--nav-ink);
}
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 10px;
}
.sidebar-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--nav-ink);
  letter-spacing: .02em;
  margin: 10px 0 4px;
}
.sidebar-help {
  font-size: 11px;
  color: var(--nav-muted);
  line-height: 1.4;
  margin: 6px 0;
}
.sidebar-input,
.sidebar-select {
  width: 100%;
  background: rgba(255,255,255,.04);
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.sidebar-input:focus,
.sidebar-select:focus {
  border-color: var(--brand-sky);
  background: rgba(255,255,255,.08);
}
.sidebar-input::placeholder { color: rgba(255,255,255,.35); }
.sidebar-select option { background: var(--brand-blue-950); color: #fff; }

.sidebar-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}
.sidebar-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.sidebar-actions-row {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}
.sidebar-wide-btn {
  width: 100%;
  margin-top: 8px;
}

/* ── Buttons (extends shared) ──────────────────────────────── */
.btn {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-sm { font-size: 11px; padding: 5px 9px; }
.btn-primary {
  background: #fff;
  color: var(--brand-blue);
  border-color: rgba(255,255,255,.18);
}
.btn-primary:hover { background: var(--brand-sky); color: var(--brand-blue-900); }
.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--nav-ink);
  border-color: rgba(255,255,255,.14);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-danger {
  background: rgba(227,25,55,.12);
  color: #ffb3bf;
  border-color: rgba(227,25,55,.36);
}
.btn-danger:hover { background: var(--brand-red); color: #fff; }
.btn:disabled { opacity: .35; cursor: not-allowed; }

/* Workspace area ── on light bg, ghost buttons need different treatment */
.app-workspace .btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
}
.app-workspace .btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

/* ── Meet picker ───────────────────────────────────────────── */
.meet-picker {
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 6px;
  padding: 4px;
}
.meet-picker::-webkit-scrollbar { width: 6px; }
.meet-picker::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
.meet-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--nav-ink);
  line-height: 1.3;
}
.meet-pick:hover { background: rgba(255,255,255,.06); }
.meet-pick input[type="checkbox"] {
  accent-color: var(--brand-sky);
  flex-shrink: 0;
}
.meet-pick-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-pick-count {
  color: var(--nav-muted);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

/* ── Workspace ─────────────────────────────────────────────── */
.app-workspace {
  display: block;
  padding: 14px 18px 40px;
  background: var(--bg);
  overflow-y: auto;
  min-width: 0;
  width: 100%;
}
/* Force-override the shared .kpi-row grid rule so 4-up cards work at our widths */
#mainContent .kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px;
  padding: 0;
  margin-bottom: 14px;
}
@media (max-width: 1100px) {
  #mainContent .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  #mainContent .kpi-row { grid-template-columns: 1fr !important; }
}

.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
  color: var(--ink-3);
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--ink-2); }

/* ── KPI cards ─────────────────────────────────────────────── */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.kpi-accent-blue::before  { background: var(--brand-blue); }
.kpi-accent-red::before   { background: var(--brand-red); }
.kpi-accent-green::before { background: var(--status-direct); }
.kpi-accent-amber::before { background: var(--status-replace); }
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 6px 0 4px;
}
.kpi-foot {
  font-size: 11px;
  color: var(--ink-3);
}

/* ── Panels ────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* ── Source impact bars ────────────────────────────────────── */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) { .dual-grid { grid-template-columns: 1fr; } }

/* ── Qualification Pipeline funnel ─────────────────────────── */
.funnel { padding: 14px 18px; }
.funnel-row {
  display: grid;
  grid-template-columns: 170px 1fr 80px 70px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.funnel-row .label { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.funnel-row .bar { height: 26px; background: var(--surface-2); border-radius: 4px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.funnel-row .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-pool));
  display: flex; align-items: center; padding-left: 10px;
  color: rgba(255,255,255,.96); font-size: 11.5px; font-weight: 700;
  transition: width .2s;
}
.funnel-row.stage-final .bar-fill { background: linear-gradient(90deg, var(--status-direct, #16a34a), #1ec7a5); }
.funnel-row .count { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); text-align: right; font-size: 14px; }
.funnel-row .pct   { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 11px; text-align: right; }

/* ── Heatmap matrix (year × discipline / etc.) ─────────────── */
.cs-heatmap { padding: 14px 18px; }
.cs-heatmap-grid { display: grid; gap: 4px; }
.cs-heatmap-cell {
  text-align: center;
  padding: 10px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cs-heatmap-cell.head {
  background: transparent; color: var(--ink-3);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; padding: 6px 4px;
}
.cs-heatmap-cell.row-label {
  background: transparent; color: var(--ink-2); text-align: right;
  font-weight: 700; padding-right: 12px; font-size: 12px;
}
.cs-heatmap-cell.data { background: var(--surface-2); color: var(--ink); }
.cs-heatmap-cell.zero { color: var(--ink-4); font-weight: 400; }

/* ── SVG histogram ─────────────────────────────────────────── */
.histo { padding: 14px 18px; }
.histo svg { display: block; width: 100%; height: 200px; }
.histo .bar { fill: var(--brand-pool); opacity: .85; }
.histo .bar.qualified { fill: var(--status-direct, #16a34a); opacity: .9; }
.histo .axis-line { stroke: var(--line); stroke-width: 1; }
.histo .axis-label { fill: var(--ink-3); font-size: 10px; }
.histo .threshold-line { stroke: var(--brand-red); stroke-width: 2; stroke-dasharray: 5 3; }
.histo .threshold-label { fill: var(--brand-red); font-size: 10.5px; font-weight: 700; }
.histo-legend { display: flex; gap: 14px; padding: 0 18px 12px; font-size: 11px; color: var(--ink-3); }
.histo-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

/* ── Collapsible panel ─────────────────────────────────────── */
details.panel { padding: 0; }
details.panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface);
  position: relative;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after {
  content: '▾';
  position: absolute;
  right: 18px; top: 14px;
  color: var(--ink-3);
  font-size: 14px;
  transition: transform .15s;
}
details.panel[open] > summary::after { transform: rotate(180deg); }
details.panel > summary h2 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700; color: var(--ink);
  margin: 0 0 2px;
}
details.panel > summary p {
  font-size: 12px; color: var(--ink-3); margin: 0;
}

.source-impact { padding: 14px 18px; max-height: 320px; overflow-y: auto; }
.source-impact-row {
  display: grid;
  grid-template-columns: 220px 1fr 60px;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
}
.source-impact-row .name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-impact-row .bar-track {
  height: 8px;
  background: var(--line-2);
  border-radius: 4px;
  overflow: hidden;
}
.source-impact-row .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-pool));
  border-radius: 4px;
}
.source-impact-row .count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink-2);
}
.source-impact-empty {
  padding: 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table thead th {
  background: var(--surface-2);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
  user-select: none;
}
.data-table thead th.sortable { cursor: pointer; }
.data-table thead th.sortable:hover { background: var(--line-2); }
.data-table thead th.sortable::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--ink-4);
  opacity: 0;
  transition: opacity .15s, transform .15s;
  vertical-align: middle;
}
.data-table thead th.sortable.sort-asc::after,
.data-table thead th.sortable.sort-desc::after { opacity: 1; }
.data-table thead th.sortable.sort-asc::after { transform: rotate(180deg); }
.data-table thead th.num { text-align: right; }
.data-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
}
.data-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr.row-clickable { cursor: pointer; }
.data-table tbody tr.row-clickable:hover td { background: var(--surface-2); }
.data-table tbody tr.row-empty td {
  text-align: center;
  color: var(--ink-3);
  padding: 24px;
  font-style: italic;
}
.dd-status-pass { color: var(--status-direct); font-weight: 600; }
.dd-status-fail { color: var(--status-flag); font-weight: 600; }
.dd-status-ignored,
.dd-status-unknownPass,
.dd-status-unknownFail { color: var(--ink-3); }

/* ── Drill-down side panel ─────────────────────────────────── */
.drilldown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,16,64,.42);
  z-index: 80;
}
.drilldown-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(520px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 81;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(13,16,64,.20);
}
.drilldown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.drilldown-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.drilldown-head h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 0;
}
.drilldown-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}
.drilldown-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.drilldown-row dt { color: var(--ink-3); font-weight: 600; }
.drilldown-row dd { color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }
.drilldown-reason {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.drilldown-reason strong { color: var(--ink); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .kpi-row { grid-template-columns: 1fr; }
  .scenario-strip { flex-direction: column; align-items: flex-start; }
}

/* ════════════════════════════════════════════════════════════════════
   v2 overhaul — trust strip, what-if simulator, criteria views
   Brand: blue #171f69, red #e31937 (white bg only), pool #009ac7, sky #8fc3ea
   ════════════════════════════════════════════════════════════════════ */

/* Data-trust strip */
.cs2-trust { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.cs2-trust-tile { background: var(--card, #fff); padding: 10px 14px; }
.cs2-trust-l { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.cs2-trust-tile b { display: block; font-size: 21px; font-weight: 700; color: var(--brand-blue, #171f69); letter-spacing: -.01em; line-height: 1.2; }
.cs2-trust-f { display: block; font-size: 11px; color: var(--ink-4, #94a3b8); }
.cs2-trust-standards b { color: var(--brand-blue, #171f69); }
.cs2-confirm { color: var(--brand-red) !important; font-weight: 600; }

/* What-if simulator */
.cs2-whatif { border-top: 3px solid var(--brand-pool); }
.cs2-wif-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cs2-wif-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-3); }
.cs2-wif-field span em { color: var(--ink-4, #94a3b8); font-style: normal; }
.cs2-wif-result { border-radius: 10px; padding: 14px 16px; background: #f4f5f9; border: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.cs2-wif-result.cs2-wif-yes { background: rgba(31,122,77,.08); border-color: rgba(31,122,77,.3); }
.cs2-wif-result.cs2-wif-no  { background: rgba(227,25,55,.06); border-color: rgba(227,25,55,.28); }
.cs2-wif-verdict { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.cs2-wif-verdict i { font-style: normal; }
.cs2-wif-yes .cs2-wif-verdict { color: #1f7a4d; }
.cs2-wif-no  .cs2-wif-verdict { color: var(--brand-red); }
.cs2-wif-detail { display: grid; gap: 4px; }
.cs2-wif-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.cs2-wif-line b { color: var(--ink); }
.cs2-wif-line b.ok { color: #1f7a4d; }
.cs2-wif-line b.no { color: var(--brand-red); }

/* Standard achievement */
.cs2-ach-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.cs2-ach-big { font-size: 30px; font-weight: 700; color: var(--brand-blue, #171f69); letter-spacing: -.02em; }
.cs2-ach-sub { font-size: 12px; color: var(--ink-3); }
.cs2-ach-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12px; }
.cs2-ach-name { color: var(--ink-2); }
.cs2-ach-bar { background: rgba(23,31,105,.08); border-radius: 5px; height: 14px; overflow: hidden; }
.cs2-ach-fill { display: block; height: 100%; background: var(--brand-blue, #171f69); border-radius: 5px; }
.cs2-ach-val { color: var(--ink-3); white-space: nowrap; }

/* Bubble watch bands */
.cs2-band-caption { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.cs2-band-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.cs2-band-name { color: var(--ink-2); }
.cs2-band-bar { background: #eef0f7; border-radius: 5px; height: 16px; overflow: hidden; }
.cs2-band-fill { display: block; height: 100%; border-radius: 5px; }
.cs2-band-fill.b-hot  { background: var(--brand-blue, #171f69); }
.cs2-band-fill.b-warm { background: var(--brand-pool); }
.cs2-band-fill.b-cool { background: var(--brand-sky); }
.cs2-band-fill.b-far  { background: #b4b7c2; }
.cs2-band-val { font-weight: 600; color: var(--ink-2); }
.cs2-band-foot { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* Standards table */
.cs2-std-note { font-size: 12px; color: var(--ink-3); margin: 0 0 10px; }
.cs2-std-table { margin-bottom: 16px; }
.cs2-std-table th:first-child { color: var(--brand-blue, #171f69); }

/* Path to qualification (drilldown) */
.cs2-path { margin-top: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.cs2-path-ok { background: rgba(31,122,77,.08); color: #1f6e47; }
.cs2-path-no { background: rgba(0,154,199,.08); color: #0a5e78; }

.sidebar-help.sync-error { color: var(--brand-red); }

/* Sensitivity ladders */
.cs2-sensitivity { border-top: 3px solid var(--brand-blue, #171f69); }
.cs2-sens-baseline { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.cs2-sens-baseline b { color: var(--brand-blue, #171f69); font-size: 18px; font-weight: 700; }
.cs2-sens-ladders { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.cs2-sens-title { font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 9px; }
.cs2-sens-row { display: grid; grid-template-columns: 86px 1fr 30px 56px; align-items: center; gap: 9px; margin-bottom: 6px; font-size: 12px; }
.cs2-sens-row.is-current { background: rgba(23,31,105,.06); border-radius: 6px; padding: 3px 6px; margin: 0 -6px 6px; }
.cs2-sens-th { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cs2-sens-bar { background: rgba(23,31,105,.08); border-radius: 5px; height: 14px; overflow: hidden; }
.cs2-sens-fill { display: block; height: 100%; background: var(--brand-pool); border-radius: 5px; }
.cs2-sens-row.is-current .cs2-sens-fill { background: var(--brand-blue, #171f69); }
.cs2-sens-n { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cs2-sens-d { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cs2-sens-d.up   { color: #1f7a4d; }
.cs2-sens-d.down { color: var(--brand-red); }
.cs2-sens-d.flat, .cs2-sens-d.cur { color: var(--ink-4, #94a3b8); }

/* Threshold Explorer */
.cs2-explorer { border-top: 3px solid var(--brand-pool); }
.cs2-ex-head { font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.cs2-ex-head b { color: var(--brand-blue, #171f69); font-weight: 700; }
.cs2-ex-svg { width: 100%; height: auto; display: block; }
.cs2-ex-grid { stroke: rgba(23,31,105,.08); stroke-width: 1; }
.cs2-ex-area { fill: rgba(0,154,199,.14); stroke: none; }
.cs2-ex-line { fill: none; stroke: var(--brand-blue, #171f69); stroke-width: 2.5; }
.cs2-ex-ylab, .cs2-ex-xlab { font-size: 11px; fill: var(--ink-3); }
.cs2-ex-vlab { font-size: 11px; font-weight: 600; }
.cs2-ex-axis { font-size: 11px; fill: var(--ink-4, #94a3b8); }
.cs2-ex-foot { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.cs2-ex-foot b { color: #8a6d1a; }
.cs2-ex-inv { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(23,31,105,.08); font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs2-ex-tin { width: 84px; }
.cs2-ex-invout { font-size: 14px; color: var(--brand-blue, #171f69); }
.cs2-ex-invout b { font-weight: 700; }

/* Decision surface (DD sweep + score×DD grid) */
.cs2-surface { border-top: 3px solid var(--brand-pool); }
.cs2-ex-area2 { fill: rgba(0,154,199,.16); }
.cs2-ex-line2 { stroke: var(--brand-pool); }
.cs2-surf-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 6px; }
.cs2-ex-legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.cs2-ex-legsw { display: inline-block; width: 26px; height: 12px; border-radius: 2px; }

/* ── Decision zone: field context + move-the-bar ladder ──────────────── */
.dz-grid { display:grid; grid-template-columns: 1fr 1.4fr; gap:12px; margin-bottom:16px; align-items:start; }
@media (max-width: 1100px) { .dz-grid { grid-template-columns: 1fr; } }
.dz-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:10px; }
.dz-tile { background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.dz-tile-intl { border-color:var(--brand-pool); background:#eef8fc; }
.dz-tile-l { font-size:11px; font-weight:600; color:var(--ink-2); text-transform:uppercase; letter-spacing:.03em; }
.dz-tile-v { font-family:var(--font-mono); font-size:20px; color:var(--brand-blue); }
.dz-tile-f { font-size:11px; color:var(--ink-3); }
.dz-lad-current { font-size:13px; margin-bottom:8px; color:var(--ink); }
.dz-lad-row { display:grid; grid-template-columns: 112px 74px 1fr; gap:10px; align-items:start; padding:7px 0; border-top:1px solid var(--line); }
.dz-lad-thr { font-family:var(--font-mono); font-size:12.5px; color:var(--ink-2); white-space:nowrap; }
.dz-lad-count { font-family:var(--font-mono); font-size:14px; }
.dz-lad-count em { font-style:normal; font-size:11.5px; margin-left:3px; }
.dz-lad-count em.up { color:#16a34a; } .dz-lad-count em.down { color:var(--brand-red); }
.dz-lad-names { display:flex; flex-wrap:wrap; gap:5px; }
.dz-name { font-size:12px; background:var(--surface-2); border:1px solid var(--line); border-radius:999px; padding:2px 9px; white-space:nowrap; }
.dz-name em { font-style:normal; font-family:var(--font-mono); font-size:11px; color:var(--ink-3); margin-left:3px; }
.dz-name.add { border-color:#16a34a; background:#f0fdf4; }
.dz-name.drop { border-color:var(--brand-red); background:#fef2f2; }
.dz-more, .dz-noone { font-size:11.5px; color:var(--ink-3); align-self:center; }
.dz-lad-foot { font-size:11.5px; color:var(--ink-3); margin-top:8px; }
.dz-ladder-empty { font-size:13px; color:var(--ink-2); padding:8px 0; }
.dz-analytics-divider { display:flex; align-items:center; gap:12px; margin:26px 0 14px; color:var(--ink-3); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.dz-analytics-divider::before, .dz-analytics-divider::after { content:''; flex:1; height:1px; background:var(--line); }
.dz-who summary h2 { color: var(--brand-blue); }

/* ── Drag-the-bar slider ─────────────────────────────────────────────── */
.dz-bar-panel { padding: 16px 20px 34px; }
.dz-bar-row { display: flex; align-items: center; gap: 22px; }
.dz-bar-readout { display: flex; flex-direction: column; gap: 1px; min-width: 148px; }
.dz-bar-label { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.dz-bar-value { font-family: var(--font-mono); font-size: 26px; color: var(--brand-blue); line-height: 1.15; }
.dz-bar-count { font-size: 12.5px; color: var(--ink-2); }
.dz-bar-count b { font-family: var(--font-mono); color: var(--brand-pool); font-size: 15px; }
.dz-bar-track-wrap { position: relative; flex: 1; padding-top: 4px; }
#dzBar {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: var(--line); outline: none; cursor: ew-resize;
}
#dzBar::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-blue); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(13,17,23,.35); cursor: grab;
}
#dzBar:active::-webkit-slider-thumb { cursor: grabbing; box-shadow: 0 0 0 5px rgba(0,154,199,.18); }
#dzBar::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-blue); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(13,17,23,.35); cursor: grab;
}
#dzBar:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }
.dz-bar-ticks { position: absolute; left: 0; right: 0; top: 14px; height: 30px; pointer-events: none; }
.dz-tick { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.dz-tick-mark { width: 2px; height: 8px; background: var(--ink-3); border-radius: 1px; }
.dz-tick-intl .dz-tick-mark { background: var(--brand-pool); }
.dz-tick-label { font-size: 10px; color: var(--ink-3); white-space: nowrap; margin-top: 1px; }
.dz-tick-intl .dz-tick-label { color: var(--brand-pool); font-weight: 600; }
.dz-tick-row2 .dz-tick-label { margin-top: 12px; }
@media (max-width: 820px) { .dz-bar-row { flex-direction: column; align-items: stretch; gap: 10px; } .dz-bar-readout { flex-direction: row; align-items: baseline; gap: 10px; min-width: 0; } }

/* ── Scenario A/B compare ────────────────────────────────────────────── */
.cmp-controls { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 4px 0 14px; }
.cmp-field { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.cmp-field > span { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.cmp-field select { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 13px; }
.cmp-field select:focus { outline: none; border-color: var(--brand-pool); }
.cmp-vs { font-size: 12px; font-weight: 700; color: var(--ink-3); padding-bottom: 9px; }
.cmp-note, .cmp-none { font-size: 12.5px; color: var(--ink-3); }
.cmp-warn { font-size: 12.5px; background: #FEF3C7; border-left: 3px solid #d97706; border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; color: #7c4a03; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 760px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-side { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.cmp-side-a { border-top: 3px solid var(--brand-blue); }
.cmp-side-b { border-top: 3px solid var(--brand-pool); }
.cmp-side-name { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.cmp-side-scope { font-size: 11.5px; color: var(--ink-3); margin: 2px 0 8px; }
.cmp-side-count { font-family: var(--font-mono); font-size: 26px; color: var(--brand-blue); }
.cmp-side-b .cmp-side-count { color: var(--brand-pool); }
.cmp-side-count span { font-family: var(--font-ui); font-size: 12px; color: var(--ink-3); }
.cmp-both { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.cmp-both b { font-family: var(--font-mono); }
.cmp-only { margin-bottom: 10px; }
.cmp-only-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 5px; }
.cmp-only-h-a { color: var(--brand-blue); }
.cmp-only-h-b { color: var(--brand-pool); }
.cmp-chipwrap { display: flex; flex-wrap: wrap; gap: 5px; }
.dz-name.cmp-a { border-color: var(--brand-blue); background: #eef0fa; }
.dz-name.cmp-b { border-color: var(--brand-pool); background: #eef8fc; }
.cmp-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; padding-bottom: 12px; }
#scenarioCompare .cmp-controls, #scenarioCompare .cmp-result { padding-left: 0; }

/* Lazy pool load (NCAA on first use): the spinner sits over the workspace
   instead of replacing it, so the page you were reading stays put. */
.loading-panel.is-overlay {
  position: fixed; inset: 0; z-index: 60; min-height: 0;
  background: rgba(255,255,255,.72); backdrop-filter: blur(2px);
}

/* ════════════════════════════════════════════════════════════════════
   v3 shell (2026-11) — views, context bar, controls drawer.
   Shell/panel/table language comes from shared/hp-shell.css (loaded after
   this file); these rules are the Standards-Studio-specific layout.
   ════════════════════════════════════════════════════════════════════ */
:root { --ss-head: calc(var(--topbar-h) + 55px); }

body.hp-app .app-body {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  padding-top: 0; min-height: calc(100vh - var(--ss-head));
}
body.hp-app .control-sidebar {
  position: sticky; top: var(--ss-head); align-self: start;
  height: calc(100vh - var(--ss-head)); overflow-y: auto;
  background: var(--nav-bg); color: var(--nav-ink);
}
body.hp-app .app-workspace { padding: 16px 20px 48px; background: var(--bg); overflow: visible; }
body.hp-app .panel { margin-bottom: 16px; }
body.hp-app .cs2-trust { margin-bottom: 16px; background: var(--line); }
body.hp-app .cs2-trust-tile b { font: 500 20px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
body.hp-app .cs2-trust-tile b#trustBasis { font: 700 15px/1.3 var(--font-ui); }
body.hp-app .filter-strip { padding: 10px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
body.hp-app #mainContent .kpi-row { margin-bottom: 16px; }
body.hp-app .kpi-card .kpi-value { font-family: var(--font-mono); font-weight: 500; }
body.hp-app .dz-grid { margin-bottom: 16px; }
body.hp-app .dz-grid > .panel { margin-bottom: 0; }
body.hp-app .dual-grid > .panel { margin-bottom: 0; }
body.hp-app .dual-grid { margin-bottom: 16px; }
body.hp-app details.panel.dz-who > summary { gap: 4px; flex-direction: column; align-items: flex-start; position: relative; padding-right: 40px; }
body.hp-app details.panel.dz-who > summary::after { position: absolute; right: 20px; top: 22px; margin: 0; }
body.hp-app details.panel#standardsInUse > summary { flex-direction: column; align-items: flex-start; gap: 4px; position: relative; padding-right: 40px; }
body.hp-app details.panel#standardsInUse > summary::after { position: absolute; right: 20px; top: 22px; margin: 0; }
body.hp-app details.panel#scenarioCompare > summary { flex-direction: column; align-items: flex-start; gap: 4px; position: relative; padding-right: 40px; }
body.hp-app details.panel#scenarioCompare > summary::after { position: absolute; right: 20px; top: 22px; margin: 0; }

/* Context bar pieces */
.ss-ctx { min-height: 55px; }
.ss-views .hp-tab { font-size: 13.5px; padding: 10px 14px; margin-bottom: -11px; }
.ss-tab-count {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font: 500 11px/1.4 var(--font-mono); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.ss-views .hp-tab.active .ss-tab-count { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.ss-scenario-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 320px; min-width: 0;
  padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
}
.ss-scenario-chip span { font: 700 10px/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ss-scenario-chip strong { font: 600 12.5px/1.2 var(--font-ui); color: var(--brand-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-ctx-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ss-drawer-btn { display: none; }
.ss-drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(13,16,64,.45); }

/* Sidebar inputs: keep the dark look but align with the shell's sizing */
body.hp-app .control-sidebar .sidebar-select,
body.hp-app .control-sidebar .sidebar-input { height: 34px; border-radius: 8px; }
body.hp-app .control-sidebar .btn { height: 32px; font-size: 12.5px; border-radius: 8px; }

@media (max-width: 1280px) {
  body.hp-app .hp-ctxbar .ss-ctx-actions .btn:not(.btn-primary) { display: none; }
}
@media (max-width: 900px) {
  :root { --ss-head: var(--topbar-h); }
  body.hp-app .app-body { grid-template-columns: 1fr; }
  .ss-drawer-btn { display: inline-flex; }
  body.hp-app .control-sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0; z-index: 95;
    width: min(320px, 88vw); height: auto;
    transform: translateX(-104%); transition: transform .2s ease;
    box-shadow: var(--shadow-lg);
  }
  body.ss-drawer-open .control-sidebar { transform: translateX(0); }
  .ss-scenario-chip { display: none; }
  body.hp-app .hp-ctxbar .ss-ctx-actions .btn:not(.btn-primary) { display: none; }
  .ss-ctx-actions .btn-primary { font-size: 12px; padding: 0 10px; }
  .ss-views { order: 1; width: 100%; margin-top: 0; }
  :root { --ss-head: var(--topbar-h); }
  .ss-views .hp-tab { padding: 8px 10px; font-size: 13px; }
  body.hp-app .app-workspace { padding: 12px 12px 40px; }
  body.hp-app .cs2-trust { grid-template-columns: repeat(2, 1fr); }
  body.hp-app .cs2-trust-standards { grid-column: 1 / -1; }
  .dz-bar-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .dz-bar-readout { flex-direction: row; align-items: baseline; gap: 10px; }
}
body.hp-app .hp-ctxbar .btn.ss-drawer-btn { display: none; }
@media (max-width: 900px) { body.hp-app .hp-ctxbar .btn.ss-drawer-btn { display: inline-flex; } }
.filter-chip.cs2-chip-pool { background: var(--brand-blue); border-color: var(--brand-blue); }
.filter-chip.cs2-chip-pool b { color: rgba(255,255,255,.7); }
.filter-chip.cs2-chip-pool em { color: #fff; }
body.hp-app .cs2-trust-tile b#trustStandards { font: 700 15px/1.3 var(--font-ui); }

/* World-final equivalent panel (Model 4) */
.we-grid { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 12px; }
.we-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.we-tile span { font: 700 10.5px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.we-tile b { font: 500 28px/1 var(--font-mono); color: var(--ink); }
.we-tile.we-main { border-color: var(--brand-blue); background: #fff; }
.we-tile.we-main b { color: var(--brand-blue); }
.we-tile small { font: 400 11.5px/1.4 var(--font-ui); color: var(--ink-3); }
.we-actions { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.we-actions .small { font-size: 12px; color: var(--ink-3); max-width: 70ch; }
.usad-chart { position: relative; width: 100%; }
.usad-chart-dl { position: absolute; top: 4px; right: 4px; z-index: 3; font: 600 10.5px var(--font-ui); color: var(--ink-3); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; cursor: pointer; }
.usad-chart-dl:hover { color: var(--brand-blue); border-color: var(--brand-pool); }
@media (max-width: 900px) { .we-grid { grid-template-columns: 1fr; } }

/* Inputs that live in the light workspace (what-if, explorer target, compare)
   inherit the dark-sidebar field styling and were white on white. */
body.hp-app .app-workspace .sidebar-input, body.hp-app .app-workspace .sidebar-select,
body.hp-app .app-workspace .cmp-field select {
  height: 36px; padding: 0 12px; border-radius: var(--radius-md); width: 100%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 13px/1 var(--font-ui);
}
body.hp-app .app-workspace .sidebar-input::placeholder { color: var(--ink-4); }
body.hp-app .app-workspace .sidebar-input:focus, body.hp-app .app-workspace .sidebar-select:focus { outline: none; border-color: var(--brand-pool); box-shadow: 0 0 0 3px rgba(0,154,199,.15); }
body.hp-app .app-workspace .sidebar-select option { background: #fff; color: var(--ink); }
body.hp-app .app-workspace .cs2-ex-tin { width: 90px; display: inline-block; height: 32px; }

/* Simulated totals panel (Model 6) */
.sim-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.sim-kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.sim-kpi span { display: block; font: 700 10.5px/1.2 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sim-kpi b { display: block; font: 500 26px/1 var(--font-mono); color: var(--brand-blue); margin: 6px 0 4px; }
.sim-kpi small { font: 400 11.5px var(--font-ui); color: var(--ink-3); }
.sim-table td.small { font-size: 11.5px; }
@media (max-width: 900px) { .sim-head { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .sim-table th:nth-child(5), .sim-table td:nth-child(5), .sim-table th:nth-child(7), .sim-table td:nth-child(7), .sim-table th:nth-child(8), .sim-table td:nth-child(8) { display: none; }
  .sim-table td.small { white-space: normal; }
}
