.eval-dashboard {
  --sidebar-bg: #0a1330;
  --sidebar-bg-raised: #101c45;
  --sidebar-border: #1c2a5e;
  --sidebar-text: #aab4d6;
  --sidebar-text-muted: #6b76a3;
  --sidebar-active-bg: #14b8a6;
  --sidebar-active-text: #05221d;

  --content-bg: #f3f5fb;
  --card-bg: #ffffff;
  --card-border: #e6e9f4;
  --card-shadow: 0 1px 2px rgba(16, 24, 64, 0.04), 0 1px 12px rgba(16, 24, 64, 0.04);

  --text-primary: #10162f;
  --text-secondary: #5c6482;
  --text-muted: #939ab8;

  --teal: #0ea5c9;
  --teal-strong: #0b8aa8;
  --purple: #7c6ff0;
  --amber: #f59e0b;

  --green: #16a34a;
  --green-bg: #e9f9ef;
  --green-border: #b8ecc9;
  --red: #dc2626;
  --red-bg: #fdedec;
  --red-border: #f6c2be;
  --amber-dark: #b45309;
  --amber-bg: #fef4e2;
  --amber-border: #f7dba3;
  --slate-bg: #eef0f7;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  font-family: var(--font-sans);
  background: var(--content-bg);
  color: var(--text-primary);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;

  * {
    box-sizing: border-box;
  }

  a {
    color: inherit;
  }

  button {
    font-family: inherit;
  }

  .app-shell {
  display: flex;
  min-height: 100vh;
}

.app-content {
  flex: 1;
  min-width: 0;
  padding: 20px 28px 40px;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 22px;
  text-decoration: none;
  color: inherit;
}

.sidebar-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sidebar-text);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.sidebar-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-link:hover {
  background: var(--sidebar-bg-raised);
  color: #eef1fb;
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}

.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding-top: 14px;
  margin-top: 10px;
}

.sidebar-help {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  font-size: 12.5px;
  color: var(--sidebar-text-muted);
}

.sidebar-help strong {
  display: block;
  color: var(--sidebar-text);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.topbar-breadcrumb {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.topbar-breadcrumb .crumb-current {
  color: var(--text-secondary);
}

.topbar h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  color: var(--text-primary);
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.topbar-back:hover {
  border-color: var(--accent, #0d9488);
  color: var(--accent, #0d9488);
  background: color-mix(in srgb, var(--accent, #0d9488) 8%, #fff);
}

.topbar-back svg {
  width: 18px;
  height: 18px;
}

.topbar-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.topbar-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-meta.is-live {
  color: var(--accent, #0d9488);
  font-weight: 600;
}

.topbar-actions .refresh-spin {
  animation: page-spin 0.8s linear infinite;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:hover {
  border-color: #c9cfe4;
  color: var(--text-primary);
}

/* Declared after `.btn` on purpose: this sheet loads after the app stylesheet,
   so a plain `.btn` here would otherwise repaint the primary button white. */
.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14, 165, 201, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--teal-strong);
  border-color: var(--teal-strong);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-select {
  color: var(--text-secondary);
}

/* ---------- Cards ---------- */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.card-pad {
  padding: 18px 20px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 12px;
}

.btn-policy-reset {
  flex-shrink: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--accent, #0d9488);
  color: #fff;
  border-color: transparent;
}

.btn-policy-reset:hover:not(:disabled) {
  filter: brightness(0.95);
  background: var(--accent, #0d9488);
  color: #fff;
}

.btn-policy-reset:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.card-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Badges & status ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.5;
  white-space: nowrap;
}

.badge svg {
  width: 11px;
  height: 11px;
}

.badge-pass {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.badge-fail {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}

.badge-review {
  background: var(--amber-bg);
  color: var(--amber-dark);
  border-color: var(--amber-border);
}

.badge-neutral {
  background: var(--slate-bg);
  color: var(--text-secondary);
  border-color: var(--card-border);
}

.badge-evaluator-deterministic {
  background: var(--slate-bg);
  color: var(--text-secondary);
  border-color: var(--card-border);
}

.badge-evaluator-llm_judge {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.badge-evaluator-code_execution {
  background: var(--amber-bg);
  color: var(--amber-dark);
  border-color: var(--amber-border);
}

.badge-evaluator-human_review {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.tag-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--slate-bg);
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.result-icon {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-icon svg {
  width: 11px;
  height: 11px;
}

.result-icon.pass {
  background: var(--green-bg);
  color: var(--green);
}

.result-icon.fail {
  background: var(--red-bg);
  color: var(--red);
}

.result-icon.warn {
  background: var(--amber-bg);
  color: var(--amber-dark);
}

/* ---------- Tables ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-primary);
  vertical-align: top;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr.clickable {
  cursor: pointer;
}

.data-table tbody tr.clickable:hover {
  background: #fafbff;
}

.data-table tbody tr.selected-row {
  background: #eefaf9;
}

.data-table tbody tr.selected-row td:first-child {
  box-shadow: inset 3px 0 0 var(--teal);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.scroll-x {
  overflow-x: auto;
}
}
/* ---------- Stat cards ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.stat-card.clickable-card {
  cursor: pointer;
}
.stat-card.clickable-card:hover {
  box-shadow: 0 0 0 1px #99f6e4;
}

.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: 19px;
  height: 19px;
}

.stat-card-body {
  min-width: 0;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.stat-card-suffix {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 3px;
}

.stat-card-delta {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 5px;
}

.stat-card-delta.good {
  color: var(--green);
}

.stat-card-delta.bad {
  color: var(--red);
}

/* ---------- Dashboard grid ---------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
  align-items: stretch;
}

.dashboard-grid > .compliance-by-policy {
  grid-column: 1 / -1;
  min-width: 0;
}

/* Five rows of cards are visible; the rest scroll. */
.compliance-by-policy .compliance-bars {
  --compliance-row: 46px;
  --compliance-gap: 10px;
  grid-auto-rows: var(--compliance-row);
  max-height: calc(5 * var(--compliance-row) + 4 * var(--compliance-gap) + 4px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.trend-focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 70%;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.trend-focus-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-row.is-selected {
  background: #f1f5f9;
  border-radius: 6px;
}

.compliance-scale {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compliance-bars {
  list-style: none;
  margin: 10px 0 0;
  padding: 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--compliance-gap, 10px) 16px;
}

.compliance-bars > li {
  min-height: 0;
}

.compliance-bars .compliance-bar-row {
  height: 100%;
}

.compliance-bar-row {
  --policy-color: #14b8a6;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px 7px 14px;
  border: 1px solid #edf0f4;
  border-left: 5px solid var(--policy-color);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.compliance-bar-row:hover {
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}

.compliance-bar-row.is-selected {
  background: color-mix(in srgb, var(--policy-color) 6%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--policy-color) 45%, transparent);
}

.compliance-bar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.compliance-bar-meter {
  flex: 0 0 auto;
  width: 124px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

.compliance-bar-track {
  position: relative;
  height: 12px;
  padding: 2px;
  border: 1.5px solid color-mix(in srgb, var(--policy-color) 55%, #fff);
  background: color-mix(in srgb, var(--policy-color) 12%, #fff);
  border-radius: 999px;
  overflow: hidden;
}

/* Midpoint marker at 50 / 100. */
.compliance-bar-track::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #fff;
}

.compliance-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--policy-color);
}

.compliance-bar-value {
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .compliance-bars {
    grid-template-columns: minmax(0, 1fr);
  }
}

.eval-metric-health {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow: hidden;
}
.eval-metric-health .health-by-task {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.eval-metric-health .health-list {
  min-height: 0;
}
.health-task-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 6px;
}

/* ---------- Donut chart ---------- */

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.donut-legend-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 190px;
  gap: 6px;
  min-height: 0;
}

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  min-height: 0;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.donut-legend-row.clickable {
  cursor: pointer;
  border-radius: 6px;
}
.donut-legend-row.clickable:hover {
  background: #f8fafc;
}

/* Dual-column (quality + compliance) mode: the header and every row share one
   grid template, so the two value columns line up exactly instead of relying on
   matching padding/margins across two separately-laid-out flex rows. */
.donut-legend-header,
.donut-legend-dual .donut-legend-row {
  display: grid;
  grid-template-columns: 8px 1fr 56px 56px;
  align-items: center;
  gap: 7px;
}
.donut-legend-header {
  padding-right: 4px;
}
.donut-legend-header-spacer {
  grid-column: span 2;
}
.donut-legend-header-value {
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.donut-legend-dual .legend-count,
.donut-legend-dual .legend-count-secondary {
  margin-left: 0;
  min-width: 0;
  text-align: right;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.legend-count {
  margin-left: auto;
  min-width: 56px;
  text-align: right;
  font-weight: 700;
  color: var(--text-primary);
}
.legend-count-secondary {
  margin-left: 0;
  color: var(--text-secondary);
}

.legend-pct {
  min-width: 32px;
  text-align: right;
  font-size: 11.5px;
}

/* ---------- Trend chart ---------- */

.trend-window-select {
  padding: 6px 10px;
  min-width: 132px;
}

.trend-wrap-quality {
  padding-top: 2px;
}

.trend-chart-shell {
  position: relative;
}

.trend-focus-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f5fc;
  border: 1px solid #e3e7f5;
}

.trend-focus-label {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.trend-focus-clear {
  border: none;
  background: transparent;
  color: var(--accent, #4f46e5);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.trend-focus-clear:hover {
  text-decoration: underline;
}

.trend-tooltip-unit {
  font-weight: 600;
  opacity: 0.72;
}

.trend-legend-item-overall {
  font-weight: 700;
  color: var(--text-primary);
}

.trend-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.trend-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.trend-tooltip {
  position: absolute;
  transform: translateX(-50%);
  background: #101635;
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  min-width: 128px;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(10, 15, 40, 0.25);
  z-index: 5;
}

.trend-tooltip-bucket {
  min-width: 168px;
  max-width: 240px;
}

.trend-tooltip-interactive {
  pointer-events: auto;
}

.trend-tooltip-time {
  font-weight: 700;
  margin-bottom: 5px;
  color: #cfd4ef;
}

.trend-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1.5px 0;
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.trend-tooltip-row strong {
  margin-left: auto;
}

.trend-tooltip-row-clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 6px;
  transition: background 0.12s ease;
}

.trend-tooltip-row-clickable:hover {
  background: rgba(255, 255, 255, 0.08);
}

.trend-tooltip-row-clickable.is-focused {
  background: rgba(255, 255, 255, 0.14);
  outline: 1px solid rgba(207, 212, 239, 0.35);
}

.trend-tooltip-row-overall {
  font-weight: 700;
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(207, 212, 239, 0.18);
}

.trend-tooltip-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trend-tooltip-missing {
  font-weight: 600;
  opacity: 0.55;
}

.trend-tooltip-hint {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(207, 212, 239, 0.18);
  font-size: 10px;
  color: #aab4d6;
}

.trend-tooltip-dot {
  min-width: 176px;
  max-width: 260px;
}

.trend-tooltip-dot .trend-tooltip-time {
  margin: 5px 0 0;
  font-weight: 600;
}

/* ---------- Metric health ---------- */

.health-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.health-group {
  list-style: none;
}

.health-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.health-group-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.health-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 1fr 52px;
  align-items: start;
  gap: 10px;
  font-size: 12px;
}
.health-row.clickable {
  cursor: pointer;
  border-radius: 6px;
}
.health-row.clickable:hover {
  background: #f8fafc;
}

.health-label {
  color: var(--text-secondary);
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
}

.health-track {
  height: 7px;
  border-radius: 999px;
  background: var(--slate-bg);
  overflow: hidden;
}

.health-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.health-value {
  font-weight: 700;
  text-align: right;
}

/* ---------- Filter bar ---------- */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.eval-dashboard .eval-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin-bottom: 16px;
  grid-template-columns: none;
}

.eval-dashboard .eval-filter-bar .filter-select {
  min-width: 180px;
  flex: 0 0 auto;
}

.eval-dashboard .eval-filter-bar .filter-select select {
  min-width: 160px;
  width: 100%;
  max-width: none;
  border: none;
  padding: 0 20px 0 0;
  background: transparent;
}

.filter-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.filter-search svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.filter-search input {
  border: none;
  outline: none;
  font-size: 13px;
  width: 100%;
  color: var(--text-primary);
}

.filter-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-select svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-select select {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding-right: 20px;
}

/* ---------- Two-column evaluations layout ---------- */

.evals-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  align-items: start;
}

.evals-layout-single {
  grid-template-columns: 1fr;
}

.evals-table-scroller {
  max-height: 430px;
  overflow-y: auto;
}
.evals-table-scroller.is-updating {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.evals-table-wrap {
  position: relative;
}

.evals-loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  overflow: hidden;
  z-index: 3;
  background: color-mix(in srgb, var(--teal-strong, #14b8a6) 15%, transparent);
}

.evals-loading-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  background: var(--teal-strong, #14b8a6);
  border-radius: 999px;
  animation: evals-loading-slide 1.1s ease-in-out infinite;
}

@keyframes evals-loading-slide {
  from { left: -35%; }
  to { left: 100%; }
}

.evals-loading-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.evals-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid color-mix(in srgb, var(--teal-strong, #14b8a6) 25%, transparent);
  border-top-color: var(--teal-strong, #14b8a6);
  border-radius: 50%;
  animation: evals-spin 0.7s linear infinite;
}

.evals-spinner-sm {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

@keyframes evals-spin {
  to { transform: rotate(360deg); }
}

.data-table td.linkish {
  color: var(--teal-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.view-all-link {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal-strong);
  text-decoration: none;
  border-top: 1px solid var(--card-border);
}

.view-all-link:hover {
  background: #fafbff;
}

/* ---------- Detail preview panel (right column mini metric table) ---------- */

.preview-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--card-border);
  padding: 0 20px;
}

.preview-tab {
  padding: 10px 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.preview-tab.active {
  color: var(--teal-strong);
  border-bottom-color: var(--teal-strong);
}

.preview-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 4px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.preview-score-row strong {
  font-size: 14px;
  color: var(--text-primary);
}

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .evals-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.eval-dashboard {
/* ---------- Evaluation Details ---------- */

.details-info-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1.3fr;
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

.details-info-card {
  padding: 14px 16px;
}

.details-info-card .info-field-list {
  margin-top: 10px;
  gap: 6px;
}

.details-info-card .info-field-list--left .info-field {
  gap: 2px;
}

.details-info-card .info-field-label {
  font-size: 11.5px;
}

.details-info-card .info-field-value {
  font-size: 12px;
}

.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 16px;
}
.result-card.clickable-card {
  cursor: pointer;
}
.result-card.clickable-card:hover {
  box-shadow: 0 0 0 1px #99f6e4;
}

.result-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 10px;
}

.result-ring svg {
  width: 34px;
  height: 34px;
}

.result-status-label {
  font-size: 17px;
  font-weight: 700;
}

.result-status-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.result-score-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.result-score-max {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.result-score-caption {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.info-field-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}
.info-field.clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 6px;
}
.info-field.clickable:hover {
  background: #f8fafc;
}

.info-field-label {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.info-field-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.info-field-value.emphasis {
  color: var(--teal-strong);
  background: #e6f6fa;
  padding: 1px 8px;
  border-radius: 6px;
}

.info-field-value.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
}

.info-field-list--left .info-field {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.info-field-list--left .info-field-value {
  text-align: left;
}

.info-field-list--compact .info-field {
  justify-content: flex-start;
  gap: 8px;
}

.info-field-list--compact .info-field-value {
  text-align: left;
}

.io-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.io-split--triple {
  grid-template-columns: 1fr 1fr 1fr;
}

.io-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.io-body {
  margin-top: 10px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.io-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 8px 0 4px;
}

.io-label:first-child {
  margin-top: 0;
}

.io-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.details-score-split {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.details-score-split > .weight-pane,
.details-score-split > .details-metrics-card {
  align-self: start;
  height: fit-content;
}

.details-metrics-card {
  min-width: 0;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.details-metrics-card .card-subtitle {
  margin-bottom: 10px;
}

.details-metrics-overall {
  margin: 6px 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.3;
}

.details-metrics-overall span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.details-metrics-table {
  margin-top: 0;
}

.weight-pane {
  min-width: 0;
}

.weight-formula {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.weight-mix {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--slate-bg);
  margin-top: 10px;
}

.weight-mix-seg.det {
  background: var(--teal);
}

.weight-mix-seg.judge {
  background: var(--purple);
}

.weight-mix-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.weight-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.weight-dot.det {
  background: var(--teal);
}

.weight-dot.judge {
  background: var(--purple);
}

.weight-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.weight-bucket {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.weight-bucket-title {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.weight-row {
  padding: 6px 0;
}

.weight-row.excluded {
  opacity: 0.72;
}

.weight-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.weight-row-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.weight-row-score {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.weight-row-math {
  margin-top: 2px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.weight-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.weight-total-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.weight-total-value {
  font-size: 22px;
  font-weight: 800;
}

.metric-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--slate-bg);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.metric-name-cell {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.metric-name-text {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.metric-name-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 260px;
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.response-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.response-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  margin-top: 10px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 7px;
  padding: 4px 9px;
  cursor: pointer;
}

.copy-btn svg {
  width: 12px;
  height: 12px;
}

.note-block {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding-top: 4px;
}

.note-block + .note-block {
  margin-top: 10px;
}

.note-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.note-icon svg {
  width: 12px;
  height: 12px;
}

.note-icon.pass {
  background: var(--green-bg);
  color: var(--green);
}

.note-icon.warn {
  background: var(--amber-bg);
  color: var(--amber-dark);
}

.note-icon.info {
  background: var(--slate-bg);
  color: var(--text-secondary);
}

.note-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.note-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* coverage breakdown */

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.coverage-tile {
  padding: 16px 18px;
}

.coverage-tile-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.coverage-tile-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.coverage-tile-skipped {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  font-style: italic;
}

.coverage-tile-max {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.coverage-tile-caption {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.coverage-tile-formula {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 8px;
}

@media (max-width: 1180px) {
  .details-info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .io-split,
  .io-split--triple {
    grid-template-columns: 1fr;
  }
  .details-main-grid {
    grid-template-columns: 1fr;
  }
  .details-score-split {
    grid-template-columns: 1fr;
  }
  .coverage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
}
:root {
  --navy: #0b1b2b;
  --navy-800: #16324f;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --amber: #f59e0b;
  --red: #ef4444;
  --green: #059669;
  --purple: #7c3aed;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e6eaf0;
  --sidebar: #0b1726;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.04);
  --radius: 12px;
  --sans: Inter, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
}

button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  height: 100vh;
  /* Mobile browsers collapse the URL bar, so 100vh overshoots the visible area. */
  min-height: 100dvh;
  height: 100dvh;
}

.sidebar {
  background: var(--sidebar);
  color: #cbd5e1;
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  -webkit-font-smoothing: antialiased;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: white;
  padding: 4px 8px 18px;
  margin: 0 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand:hover { color: white; }
.nav a.brand.active {
  background: transparent;
  color: white;
  font-weight: inherit;
  box-shadow: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.brand-mark img,
.brand-mark svg {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand-copy strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}
.brand-copy span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #5eead4;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 13px;
}
.nav a.active {
  background: var(--teal);
  color: white;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.28);
}
.nav a.active {
  background: var(--teal);
  color: white;
  font-weight: 600;
}
.nav a:hover:not(.active) { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.nav svg { width: 16px; height: 16px; }

.main {
  overflow: auto;
  padding: 20px 24px 28px;
}

.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  justify-content: flex-end;
  isolation: isolate;
}
/* Two-finger touchpad scrolls must stay inside an open panel: without this they chain past
   its edge, and a sideways swipe becomes the browser's back/forward navigation. */
.drawer-body,
.drawer-edit-panel,
.trace-drawer-body {
  overscroll-behavior: contain;
  min-height: 0;
}
/* Tables only scroll sideways; vertical swipes over them must still reach the panel. */
.drawer-root .table-wrap {
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}
html:has(.drawer-root),
html:has(.drawer-root) body {
  overscroll-behavior: none;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  background: rgba(11, 23, 38, 0.35);
  cursor: pointer;
  animation: drawer-fade 0.18s ease-out;
}
.drawer-panel {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  height: 100%;
  background: white;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: drawer-in 0.22s ease-out;
  pointer-events: auto;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.drawer-head-copy { min-width: 0; }
.drawer-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.drawer-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 6px;
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 650;
}
.drawer-head h2 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}
.drawer-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.drawer-body {
  overflow: auto;
  padding: 16px 18px 24px;
  min-width: 0;
  flex: 1;
}
.drawer-panel.drawer-chart {
  width: min(620px, 100%);
}
.drawer-panel.trace-drawer {
  width: min(960px, 96vw);
  max-height: none;
  overflow: hidden;
}
.trace-drawer-body {
  padding: 0;
  overflow: auto;
}
.trace-drawer-body .jaeger-trace {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* The eval-dashboard theme paints a page background; keep it flat inside the drawer. */
.quality-drawer-charts {
  background: transparent;
  min-height: 0;
  margin: 0;
}
.quality-drawer-donut .donut-wrap {
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  min-height: 0;
}
.quality-drawer-donut .donut-legend {
  min-width: 0;
  gap: 11px;
}
.quality-drawer-donut .legend-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-edit-panel {
  overflow: auto;
  padding: 16px 18px 24px;
  min-width: 0;
  flex: 1;
}
.drawer-edit-panel h3 { margin: 0 0 8px; color: var(--navy); }
.drawer-edit-panel p { margin: 0 0 12px; color: var(--muted); }
.policy-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.policy-edit .field.is-changed input,
.policy-edit .field.is-changed select,
.policy-edit .field.is-changed textarea {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: inset 3px 0 0 #f59e0b;
}
.policy-edit-block {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
}
.policy-edit-block.is-changed,
.policy-edit-condition.is-changed {
  background: #fffbeb;
  box-shadow: inset 3px 0 0 #f59e0b;
}
.policy-edit-note {
  font-size: 12px;
}
.policy-edit-conditions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.policy-edit-condition {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.policy-edit-condition-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}
.policy-edit-condition-label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.policy-edit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.policy-edit-chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.policy-edit-chip:hover {
  border-color: #94a3b8;
}
.policy-edit-chip.on {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: #fff;
  font-weight: 600;
}
.policy-edit-actions {
  position: sticky;
  bottom: -24px;
  align-items: center;
  margin: 16px -18px -24px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--card, #fff);
}
.policy-edit-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
@keyframes drawer-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes drawer-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.drill-progress {
  margin: 0 0 12px;
  font-size: 13px;
}
.drill-breakdown {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drill-breakdown .legend-btn {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.page-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 750;
}
.page-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.header-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn {
  border: 1px solid var(--border);
  background: white;
  color: var(--navy);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: #f8fafc; }
.btn:disabled,
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary { background: var(--teal); border-color: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled:hover { background: var(--teal); }
.btn-danger { color: var(--red); border-color: transparent; background: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.9s linear infinite; }
.btn.btn-danger-outline { color: var(--red); border-color: var(--red); background: white; }
.btn.btn-danger-outline:hover { color: var(--red); border-color: var(--red); background: #fef2f2; }
.btn.btn-danger-solid,
.btn.btn-danger-solid:hover { color: white; border-color: var(--red); background: var(--red); }
.btn.btn-danger-solid:hover:not(:disabled) { background: #b91c1c; border-color: #b91c1c; }
.btn-ghost { background: transparent; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.card h2, .card h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.kpi-row-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-overview-mid {
  margin-bottom: 14px;
}
.overview-policies {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  max-height: 260px;
  margin-bottom: 14px;
}
.overview-policies .policy-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.overview-policies .policy-list::-webkit-scrollbar {
  width: 6px;
}
.overview-policies .policy-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.overview-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}
.range-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--navy);
}
.range-bar {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--navy);
  min-height: 38px;
}
.range-bar-preset,
.range-bar-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  min-width: 168px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
}
.range-bar-trigger span {
  flex: 1;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.range-bar-caret {
  flex-shrink: 0;
  margin-left: 4px;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.range-bar-trigger.is-open .range-bar-caret {
  transform: rotate(180deg);
}
.range-bar-preset select {
  border: 0;
  background: transparent;
  color: var(--navy);
  padding: 8px 0;
  flex: 1;
}
.range-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: min(620px, calc(100vw - 24px));
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  padding: 0 12px 12px;
  overflow: visible;
}
.range-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 8px;
}
.range-pop-head strong {
  font-size: 13px;
  color: var(--navy);
}
.range-pop-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.range-pop-close:hover { background: #f1f5f9; }
.range-pop-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.range-pop-presets button {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.range-pop-presets button.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.range-pop-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.range-pop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.range-pop-col {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  min-width: 0;
}
.range-pop-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.range-pop-col-head strong {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.range-pop-col-head span {
  color: var(--navy);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.range-pop-selects {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.range-pop-selects select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--navy);
  padding: 6px 8px;
}
.range-pop-selects span {
  color: var(--muted);
  font-weight: 700;
}
.range-cal-nav {
  flex: 0 0 28px;
  width: 28px;
  height: 32px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--navy);
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.range-cal-nav:hover { background: #eef2f6; }
.range-pop-time {
  margin-bottom: 0;
}
.range-pop-time label {
  flex: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.range-pop-time label select {
  width: 100%;
}
.range-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}
.range-cal-dow,
.range-cal-day {
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.range-cal-dow {
  color: var(--muted);
  font-weight: 700;
}
.range-cal-day {
  border: 0;
  background: transparent;
  border-radius: 6px;
  color: var(--navy);
  cursor: pointer;
  padding: 0;
}
.range-cal-day:disabled {
  visibility: hidden;
}
.range-cal-day:hover {
  background: #eef2f6;
}
.range-cal-day.is-active {
  background: var(--navy);
  color: white;
}
.range-pop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.range-pop-actions .btn.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.range-pop-actions .btn.btn-primary:hover {
  background: var(--teal-dark);
  color: white;
}
@media (max-width: 720px) {
  .range-pop-grid { grid-template-columns: 1fr; }
}
.range-control select {
  border: 0;
  padding: 8px 4px 8px 0;
  background: transparent;
}
.kpi-icon.tone-blue { background: #e8f1ff; color: #2563eb; }
.kpi-icon.tone-navy { background: #e8eef5; color: var(--navy); }
.kpi-icon.tone-purple { background: #f3e8ff; color: var(--purple); }
.kpi-icon.tone-teal { background: #ecfdf8; color: var(--teal-dark); }
.kpi-icon.tone-gold { background: #fff4e5; color: #f59e0b; }
.policy-icon.tone-blue { background: #e8f1ff; color: #2563eb; }
.policy-icon.tone-purple { background: #f3e8ff; color: var(--purple); }
.policy-icon.tone-teal { background: #ecfdf8; color: var(--teal-dark); }
.policy-list li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid #eef2f6;
}
.donut-center {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 6px #f8fafc;
  color: var(--navy);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.code-preview {
  background: #f6f8fb;
  border: 1px solid var(--border);
  color: #1e293b;
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  max-height: 160px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace;
  margin: 0;
}
.detail-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.detail-footer span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.detail-footer strong { font-size: 14px; color: var(--navy); }
.detail-id strong { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.card-head h2 { margin: 0; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.donut-wrap { position: relative; min-height: 250px; }
.overview-charts > .card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.overview-routing h2 {
  flex-shrink: 0;
}
.donut-with-legend {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  padding: 4px 4px 8px;
}
.donut-with-legend .donut-wrap {
  flex: 0 0 210px;
  width: 210px;
  height: 210px;
  max-width: 210px;
  min-height: 210px;
  aspect-ratio: auto;
  position: relative;
}
.donut-with-legend .donut-center {
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  box-shadow: 0 0 0 5px #f8fafc;
}
.donut-with-legend .js-plotly-plot,
.donut-with-legend .plot-container,
.donut-with-legend .svg-container {
  width: 100% !important;
  height: 100% !important;
}
.model-routing-legend,
.chart-count-legend {
  list-style: none;
  margin: 0;
  padding: 0 2px 0 0;
  flex: 1 1 168px;
  min-width: 148px;
  max-width: 240px;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.model-routing-legend::-webkit-scrollbar,
.chart-count-legend::-webkit-scrollbar {
  width: 5px;
}
.model-routing-legend::-webkit-scrollbar-thumb,
.chart-count-legend::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.model-routing-legend .legend-btn,
.chart-count-legend .legend-btn {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: start;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.policy-list li.clickable { cursor: pointer; }
.policy-list li.clickable:hover { background: #f8fafc; }
.model-routing-legend li,
.chart-count-legend li {
  display: block;
  font-size: 11px;
  color: var(--navy);
  line-height: 1.25;
}
.model-routing-legend i,
.chart-count-legend i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-top: 4px;
  flex-shrink: 0;
}
.model-routing-legend span,
.chart-count-legend span {
  min-width: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.model-routing-legend strong,
.chart-count-legend strong {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 11px;
  color: var(--navy);
  white-space: nowrap;
  padding-top: 1px;
}
.chart-count-legend em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 1px;
}
.policy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.policy-list li:last-child { border-bottom: 0; }
.policy-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ecfdf8;
  color: var(--teal-dark);
  display: grid;
  place-items: center;
}
.policy-name { font-weight: 650; color: var(--navy); }
.policy-aside {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.policy-calls {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.model-name { font-weight: 700; color: #0b1b2b; }
.model-openai { color: #0b1b2b; }
.model-gemini { color: #0f766e; }
.model-claude { color: #7c3aed; }
.model-local { color: #0b1b2b; }
.overview-bottom { margin-top: 0; }
.detail-id { margin-bottom: 10px; }
.detail-id span { display: block; color: var(--muted); font-size: 11px; }
.prompt-text { margin: 0; color: var(--text); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.payload-markdown {
  max-height: min(60vh, 560px);
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.payload-markdown .payload-md-h {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.payload-markdown .payload-md-p {
  margin: 0 0 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.payload-markdown .payload-md-ul,
.payload-markdown .payload-md-ol {
  margin: 0 0 12px;
  padding-left: 18px;
}
.payload-markdown li { margin: 0 0 6px; }
.payload-markdown li:last-child { margin-bottom: 0; }
.payload-markdown strong { color: var(--navy); font-weight: 700; }
.payload-markdown code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: #f6f8fb;
  padding: 1px 4px;
  border-radius: 4px;
}
.payload-table-wrap {
  overflow: auto;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.payload-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.payload-md-table th,
.payload-md-table td {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.payload-md-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.payload-md-table tr:last-child td { border-bottom: 0; }
.payload-markdown .code-preview { max-height: min(40vh, 360px); margin-bottom: 12px; }
.teal-text { color: var(--teal-dark); }
.sidebar { justify-content: flex-start; }
.nav { flex: 1; }
.nav-bottom { margin-top: auto; padding-top: 12px; }
.kpi {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.card.clickable-card {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card.clickable-card:hover { border-color: #99f6e4; }
.card.clickable-card.selected { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.card.clickable-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ecfdf8;
  color: var(--teal-dark);
  flex-shrink: 0;
}
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi-value { font-size: 24px; font-weight: 750; color: var(--navy); line-height: 1.15; margin-top: 4px; }
.kpi-value.teal { color: var(--teal-dark); }
.score-suffix {
  font-size: 0.6em;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}
.kpi-delta {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 650;
}
.kpi-delta span { color: var(--muted); font-weight: 500; }
.kpi-delta.down { color: #dc2626; }
.kpi-delta.up { color: #16a34a; }
.kpi-delta.flat { color: #16a34a; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 + .grid-2 { margin-top: 12px; }
.insights-center {
  margin-top: 12px;
}
.insights-center .js-plotly-plot,
.insights-center .plotly {
  width: 100%;
}
.insights-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}
.insights-bottom .insights-stack {
  min-height: 0;
}
.insights-eval,
.insights-health {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}
.grid-2 > .insights-eval {
  min-height: 280px;
}
.insights-eval .eval-task-donut {
  flex: 1;
  min-height: 0;
  align-items: center;
}
.insights-eval .eval-task-legend {
  overflow-y: auto;
  max-height: 268px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.insights-eval .eval-task-legend::-webkit-scrollbar {
  width: 6px;
}
.insights-eval .eval-task-legend::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.insights-health .metric-health {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  max-height: none;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}
.insights-health .metric-health::-webkit-scrollbar {
  width: 6px;
}
.insights-health .metric-health::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.insights-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.insights-stack > .card {
  flex: 1;
  min-height: 0;
}
.insights-reasons {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.insights-reasons-plot {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.insights-eval .donut-with-legend {
  align-items: center;
  padding: 0;
  gap: 16px;
}
.insights-eval .task-legend {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.fabric-quality-charts {
  margin: 14px 0;
}
.fabric-quality-charts .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.fabric-quality-charts .card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
@media (max-width: 1100px) {
  .fabric-quality-charts .grid-2 {
    grid-template-columns: 1fr;
  }
}
.grid-3 { display: grid; grid-template-columns: 1.1fr 1.3fr 0.9fr; gap: 12px; }
.grid-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
  gap: 14px;
  align-items: start;
}
.pricing-page {
  min-width: 0;
  margin-top: 18px;
}
.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.pricing-table-card {
  min-width: 0;
  overflow: hidden;
}
.pricing-table-card .table-wrap {
  overflow-x: auto;
}
.pricing-table {
  min-width: 720px;
}
.pricing-table td,
.pricing-table th {
  vertical-align: top;
}
.pricing-table .num-cell,
.pricing-table .status-cell {
  white-space: nowrap;
}
.pricing-table .task-cell {
  white-space: normal;
  min-width: 220px;
  max-width: 420px;
}
.task-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.task-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f1f5f9;
  color: var(--navy);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}
.pricing-editor-card {
  max-width: 640px;
}
.pricing-editor-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.pricing-editor-heading {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--navy);
}
.explorer-split {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: stretch;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(6, minmax(108px, 0.85fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
}
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--navy);
  min-width: 0;
  width: 100%;
}
.filter-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}
.filter-select-wrap select {
  width: 100%;
}
.filter-select-wrap.is-active select {
  padding-right: 28px;
}
.filter-clear-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: #eef2f6;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.filter-clear-btn:hover {
  background: #dbe4ee;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.pager { display: flex; gap: 4px; }
.pager button {
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: white;
  color: var(--navy);
  border-radius: 6px;
  cursor: pointer;
}
.pager button.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.pager button:disabled { opacity: 0.45; cursor: default; }
.explorer-detail { max-height: calc(100vh - 270px); overflow: auto; }
.drawer-panel.explorer-detail {
  width: min(640px, 100%);
  max-height: none;
  overflow: hidden;
}
.drawer-head-copy p {
  overflow-wrap: anywhere;
}
.detail-description {
  margin: 0 0 16px;
}
.detail-description .detail-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.detail-description p {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 20px;
  margin: 0 0 4px;
  align-items: start;
}
.detail-grid .span-2 { grid-column: span 2; }
.detail-grid dt, .routing-meta span, .metrics-row span, .evaluation-row span {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.detail-grid dd {
  margin: 0;
  font-weight: 650;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.routing-decision {
  margin: 14px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.routing-decision h4 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.routing-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 20px;
  align-items: start;
  margin: 0;
}
.routing-field { min-width: 0; }
.routing-field-full { grid-column: 1 / -1; }
.routing-meta strong {
  display: block;
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.routing-copy { white-space: pre-wrap; }
.failure-reason { margin-top: 12px; }
.failure-reason p {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.candidate-list .prompt-text { margin: 0; color: var(--muted); }
.candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}
.candidate.is-selected {
  background: #ecfdf8;
  border-color: #99f6e4;
}
.candidate-cost {
  color: var(--navy);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.pill-selected { background: #dbeafe; color: #1d4ed8; font-size: 10px; letter-spacing: 0.06em; }
.metrics-row,
.evaluation-row {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.metrics-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.evaluation-row { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; }
.metrics-row strong, .evaluation-row strong { display: block; margin-top: 4px; font-size: 14px; color: var(--navy); }
.evaluation-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filters input, .field input, .field select, .field textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  background: white;
  color: var(--text);
  min-width: 0;
}
.filters input { flex: 1; min-width: 220px; }

.table-wrap { overflow: auto; }
.table-wrap-scroll {
  max-height: 280px;
  overflow: auto;
}
.table-wrap-scroll thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 9px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.source-cell {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  color: var(--navy);
  vertical-align: bottom;
}
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f8fafc; }
tr.selected { background: #e8faf6; box-shadow: inset 3px 0 0 var(--teal); }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 650;
}
.pill-ok, .pill-active, .pill-pass { background: #d1fae5; color: #047857; }
.pill-warn, .pill-review { background: #fef3c7; color: #b45309; }
.pill-draft { background: #ede9fe; color: #6d28d9; }
.pill-fail { background: #fee2e2; color: #b91c1c; }
.pill-info, .pill-agent { background: #ccfbf1; color: #0f766e; }
.pill-user { background: #ede9fe; color: #6d28d9; }
.pill-muted { background: #f1f5f9; color: var(--muted); }

.wired {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-weight: 650;
  font-size: 12px;
}
.wired-block {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  background: #fafbfc;
}
.wired-block strong { color: var(--amber); display: block; margin-bottom: 6px; }

.banner {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.banner.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.banner.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.page-header-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.page-header-banner {
  grid-column: 1 / -1;
  margin: 0;
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
.empty h3 { margin: 0 0 6px; color: var(--navy); }

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}
.page-loading h3 {
  margin: 16px 0 6px;
  color: var(--navy);
  font-size: 16px;
}
.page-loading p { margin: 0; font-size: 13px; }
.page-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: page-spin 0.8s linear infinite;
}
.page-loading-compact {
  min-height: 180px;
  padding: 24px 16px;
}
@keyframes page-spin {
  to { transform: rotate(360deg); }
}
.refresh-spin {
  animation: page-spin 0.8s linear 2;
}
@media (prefers-reduced-motion: reduce) {
  .page-loading-spinner {
    animation: none;
    border-top-color: var(--teal);
    opacity: 0.85;
  }
}

.detail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 12px; }
.detail dt { color: var(--muted); font-size: 11px; }
.detail dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); word-break: break-word; }
.block { margin-top: 12px; }
.block h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.pre {
  background: #0d1b2a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  overflow: auto;
  max-height: 180px;
  font-size: 12px;
  white-space: pre-wrap;
}
.hidden-note {
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.tab.active { background: #ecfdf8; color: var(--teal-dark); font-weight: 650; }
.policies-page .tabs { margin: 0; gap: 4px; }
.policies-page .tab { border-radius: 0; border-bottom: 2px solid transparent; padding: 8px 10px; }
.policies-page .tab.active {
  background: transparent;
  color: var(--navy);
  border-bottom-color: var(--teal);
}
.policy-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.policy-filters { display: flex; gap: 8px; align-items: center; }
.policy-buckets { margin-bottom: 14px; }
.policy-bucket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.policy-bucket {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fafc;
}
.policy-bucket-security { background: #fff1f2; border-color: #fecdd3; }
.policy-bucket-approval { background: #fff7ed; border-color: #fed7aa; }
.policy-bucket-sensitive { background: #f5f3ff; border-color: #ddd6fe; }
.policy-bucket-workload { background: #f0fdf4; border-color: #bbf7d0; }
.policy-bucket-performance { background: #eff6ff; border-color: #bfdbfe; }
.policy-bucket-outcome { background: #f8fafc; border-color: #cbd5e1; }
.policy-bucket h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 13px;
}
.policy-bucket h3 span {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.policy-bucket ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Six single-line rows, then the list scrolls inside the panel. */
  max-height: 148px;
  overflow-y: auto;
}
.policy-bucket button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border: 0;
  background: white;
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
}
.policy-bucket button.policy-bucket-shared {
  outline: 1px solid #111;
  outline-offset: -1px;
}
.policy-bucket-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.policy-bucket button:hover { background: #f8fafc; }
.policy-bucket-security button:hover { background: #ffe4e6; }
.policy-bucket-approval button:hover { background: #ffedd5; }
.policy-bucket-sensitive button:hover { background: #ede9fe; }
.policy-bucket-workload button:hover { background: #dcfce7; }
.policy-bucket-performance button:hover { background: #dbeafe; }
.policy-bucket-outcome button:hover { background: #e2e8f0; }
.policy-bucket-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.policy-review-card { margin-top: 14px; }
.policy-review-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.policy-filters .filter-select-wrap { min-width: 140px; }
.policy-filters select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--navy);
}
.search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
}
.search-field input {
  border: 0;
  padding: 8px 0;
  min-width: 180px;
  background: transparent;
}
.row-actions { display: flex; align-items: center; gap: 2px; position: relative; }
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: #f1f5f9; color: var(--navy); }
.action-menu {
  position: absolute;
  right: 0;
  top: 30px;
  min-width: 160px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 8;
}
.action-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--navy);
}
.action-menu button:hover { background: #f8fafc; }
.require-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  color: var(--navy);
  font-weight: 600;
}
.switch {
  width: 38px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
}
.switch.on { background: var(--teal); }
.switch::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: left 0.15s ease;
}
.switch.on::after { left: 19px; }
.condition-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.condition-pills span {
  background: #ecfdf8;
  color: #0f766e;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
}
.detail-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.version-list { margin: 0; padding-left: 16px; color: var(--navy); }
.decision-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.decision-card { display: flex; gap: 12px; align-items: flex-start; }
.decision-card.clickable { cursor: pointer; border-radius: 10px; padding: 8px; }
.decision-card.clickable:hover { background: #f8fafc; }
.decision-card strong { display: block; color: var(--navy); }
.decision-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12px; }
.decision-meta span { color: var(--muted); }
.decision-meta em { font-style: normal; font-weight: 700; }
.simulate-result {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  border-radius: 10px;
}
.policy-modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; }
.modal-hint { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.policy-description { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.form-section {
  grid-column: span 2;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.clause-list { grid-column: span 2; display: flex; flex-direction: column; gap: 8px; }
.clause-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; align-items: end; }
.budget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.budget-head h2 { margin: 0; }
.budget-stats { display: flex; gap: 16px; }
.budget-stats span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.budget-stats strong { color: var(--navy); font-size: 14px; }
.budget-stats > div.clickable { cursor: pointer; border-radius: 8px; padding: 4px 6px; }
.budget-stats > div.clickable:hover { background: #f8fafc; }
.budget-status { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.spend-row.clickable { cursor: pointer; }
.spend-row.clickable:hover { background: #f8fafc; }
.spend-list { display: flex; flex-direction: column; gap: 4px; }
.spend-head,
.spend-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(72px, 1fr) 88px 72px;
  gap: 12px;
  align-items: center;
}
.spend-head {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0 8px 6px;
}
.spend-row {
  min-height: 36px;
  padding: 8px;
  border-radius: 8px;
}
.spend-name {
  font-weight: 650;
  color: var(--navy);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spend-track {
  height: 10px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
  min-width: 48px;
}
.spend-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}
.spend-track i.teal-bar { background: var(--teal); }
.fail-list { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.fail-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
}
.fail-row span { color: var(--navy); font-size: 13px; }
.fail-row strong { text-align: right; color: var(--navy); }
.details-link { color: #2563eb; font-weight: 650; }
.eval-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}
.eval-mid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}
.eval-health-below {
  margin-bottom: 14px;
  max-height: 280px;
  overflow: auto;
}
.eval-donut { min-height: 210px; }
.eval-task-donut {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-width: 0;
}
.eval-task-donut svg {
  display: block;
  flex: 0 0 168px;
}
.eval-task-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  min-width: 130px;
}
.eval-task-legend li button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.eval-task-legend li button:hover,
.eval-task-legend li button.active {
  background: #f8fafc;
}
.eval-task-legend li button.active {
  box-shadow: inset 0 0 0 1px #14b8a6;
}
.eval-task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.eval-task-label {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eval-task-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.eval-task-pct {
  min-width: 42px;
  text-align: right;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.task-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.task-legend li button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 3px 4px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.task-legend li button:hover,
.task-legend li button.active { background: #e8faf6; }
.task-legend li button.active {
  box-shadow: inset 0 0 0 1px #14b8a6;
  font-weight: 650;
}
.task-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: block;
  flex: none;
}
.task-legend li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-legend strong {
  font-weight: 650;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.drill-center {
  border: 0;
  cursor: pointer;
  z-index: 2;
}
.drill-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.drill-link:hover,
.drill-link.active { color: var(--teal-dark); }
.drill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 12px;
}
.drill-chips button {
  border: 1px solid var(--border);
  background: #ecfdf8;
  color: var(--navy);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.drill-chips button:hover { border-color: var(--teal); }
.evaluations-page .card h2 {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eval-filters {
  grid-template-columns: minmax(200px, 1.6fr) repeat(4, minmax(100px, 0.65fr)) auto;
  align-items: center;
}
.eval-filters .search-field input {
  border: 0;
  padding: 8px 0;
  background: transparent;
}
.metric-health { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.metric-health-by-task { gap: 14px; max-height: 280px; overflow-y: auto; }
.metric-health-task-group { display: flex; flex-direction: column; gap: 8px; }
.metric-health-task-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #5c6482);
  margin-top: 2px;
}
.health-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 52px;
  gap: 8px;
  align-items: center;
}
button.health-row {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
button.health-row:hover,
button.health-row.active { background: #e8faf6; }
.health-name { font-size: 12px; color: var(--navy); }
.health-track {
  height: 8px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}
.health-track i { display: block; height: 100%; border-radius: 999px; background: #22c55e; }
.health-track.warn i { background: #f59e0b; }
.health-track.fail i { background: #ef4444; }
.health-row strong { font-size: 12px; text-align: right; color: var(--navy); }
.eval-stack { display: flex; flex-direction: column; gap: 14px; }
.chart-legend {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.spend-row .num, .spend-head span:nth-child(3), .spend-head span:nth-child(4) { text-align: right; }
.budget-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.budget-ring span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
}
.var-up { color: var(--red); font-weight: 650; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: grid;
  place-items: center;
  z-index: 20;
}
.modal-over-drawer {
  z-index: 5000;
}
.modal {
  width: min(560px, calc(100vw - 32px));
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.18);
}
.modal h3 { margin: 0 0 8px; color: var(--navy); }
.modal-policy {
  width: min(760px, calc(100vw - 32px));
  max-height: 88vh;
  overflow: auto;
}
.modal-compare {
  width: min(1080px, calc(100vw - 32px));
}
.policy-form-grid input,
.policy-form-grid select,
.policy-form-grid textarea {
  background: #f8fafc;
}
.policy-form-heading {
  margin: 18px 0 4px;
  color: var(--navy);
  font-size: 13px;
}
.policy-category-field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.policy-category-field legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 13px;
}
.policy-category-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.policy-category-picks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.policy-form-grid textarea {
  min-height: 88px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.policy-form-grid > .span-2 {
  grid-column: span 2;
}
.policy-suggestion-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
}
.policy-recommend-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 650;
}
.policy-suggestion-message {
  margin: 0;
}
.policy-suggestion {
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--navy);
}
.policy-suggestion > strong {
  display: block;
  margin-bottom: 6px;
}
.policy-suggestion p {
  margin: 0 0 10px;
  color: var(--muted);
}
.policy-suggestion dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 5px 12px;
  margin: 0 0 12px;
}
.policy-suggestion dt {
  font-weight: 600;
}
.policy-suggestion dd {
  margin: 0;
}
.policy-suggestion-condition {
  display: contents;
}
.policy-suggestion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.policy-conflict-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policy-conflict-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dbeafe;
}
.policy-conflict-label {
  font-weight: 600;
}
.policy-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.policy-ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: middle;
}
.policy-ai-badge-lg {
  padding: 2px 8px;
  font-size: 11px;
}
.policy-form-grid input.ai-filled,
.policy-form-grid select.ai-filled {
  border-color: #c4b5fd;
  background: #f5f3ff;
  box-shadow: inset 3px 0 0 var(--purple);
}
.policy-category-picks label.checked {
  font-weight: 600;
  color: var(--navy);
}
.policy-ai-card {
  padding: 14px 16px;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f3ff, #eef2ff);
  color: var(--navy);
}
.policy-ai-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.policy-ai-card-head strong {
  font-size: 14px;
}
.policy-ai-progress {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
}
.policy-ai-progress.done {
  background: #d1fae5;
  color: #065f46;
}
.policy-ai-reasoning {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.policy-ai-hint {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.policy-ai-subhead {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--navy);
}
.policy-choice-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policy-choice-list li {
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  background: #fff;
}
.policy-choice-list li.is-resolved {
  border-color: #a7f3d0;
}
.policy-choice-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.policy-choice-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}
.policy-choice-status.pending {
  color: #b45309;
}
.policy-choice-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.policy-choice-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.policy-choice-option:hover {
  border-color: #94a3b8;
}
.policy-choice-option.selected {
  border-color: var(--teal-dark);
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
.policy-choice-option.ai.selected {
  border-color: var(--purple);
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.policy-choice-radio {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
}
.policy-choice-option.selected .policy-choice-radio {
  border-color: var(--teal-dark);
  background: radial-gradient(circle, var(--teal-dark) 45%, #fff 50%);
}
.policy-choice-option.ai.selected .policy-choice-radio {
  border-color: var(--purple);
  background: radial-gradient(circle, var(--purple) 45%, #fff 50%);
}
.policy-choice-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.policy-choice-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.policy-choice-value {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .policy-choice-options {
    grid-template-columns: 1fr;
  }
}
.policy-form-grid input::placeholder,
.policy-form-grid textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* Policy compare subview (Policies page only) */
.policy-compare-subview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.policy-compare-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.policy-compare-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.policy-compare-header h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 20px;
}
.policy-compare-header p {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}
.policy-compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}
.policy-compare-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.policy-compare-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policy-compare-card {
  text-align: left;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.policy-compare-match {
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.policy-compare-match:hover {
  border-color: #94a3b8;
}
.policy-compare-match.selected {
  border: 2px solid var(--teal-dark);
  padding: 13px 15px;
  background: #f0fdfa;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}
.policy-compare-match.selected::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  width: 16px;
  height: 16px;
  background: #f0fdfa;
  border-top: 2px solid var(--teal-dark);
  border-right: 2px solid var(--teal-dark);
  transform: translateY(-50%) rotate(45deg);
}
.policy-compare-match-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.policy-compare-radio {
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
}
.policy-compare-match.selected .policy-compare-radio {
  border-color: var(--teal-dark);
  background: radial-gradient(circle, var(--teal-dark) 45%, #fff 50%);
}
.policy-compare-viewing {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.policy-compare-view-hint {
  display: block;
  margin-top: 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
}
.policy-compare-list-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.policy-compare-list-head strong {
  color: var(--navy);
  font-size: 13px;
}
.policy-compare-list-head span {
  color: var(--muted);
  font-size: 12px;
}
.policy-compare-draft {
  cursor: default;
  background: #f8fafc;
  border-style: dashed;
  border-color: #c4b5fd;
}
.policy-compare-detail-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.policy-compare-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.policy-compare-meter-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.policy-compare-meter-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.policy-compare-meter strong {
  color: var(--navy);
  font-size: 13px;
  white-space: nowrap;
}
.policy-compare-detail-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.policy-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 6px;
}
.policy-compare-table th,
.policy-compare-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.policy-compare-table thead th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.policy-compare-table tbody th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.policy-compare-table td {
  color: var(--navy);
}
.policy-compare-table tr.same td {
  background: #fff7ed;
  font-weight: 600;
}
.policy-compare-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}
.policy-compare-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.policy-compare-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.policy-compare-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 16px;
}
.policy-compare-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 8px;
}
.policy-compare-meta > div {
  min-width: 0;
}
.policy-compare-meta .pill {
  max-width: 100%;
  line-height: 1.35;
}
.policy-compare-draft .policy-compare-meta > div:nth-child(2) {
  text-align: center;
}
.policy-compare-meta dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.policy-compare-meta dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: var(--navy);
  overflow-wrap: break-word;
}
.policy-compare-desc,
.policy-compare-muted {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.policy-compare-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.policy-compare-detail {
  position: sticky;
  top: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.policy-compare-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.policy-compare-detail-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}
.policy-compare-detail-rows {
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.policy-compare-detail-rows > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: start;
}
.policy-compare-detail-rows dt {
  color: var(--muted);
  font-size: 12px;
}
.policy-compare-detail-rows dd {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
}
.policy-compare-detail-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}
.policy-compare-detail-block h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.policy-compare-detail-block p {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.45;
}
.policy-compare-detail-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.policy-compare-detail-block li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
.policy-compare-detail-block li strong {
  color: var(--navy);
}
.policy-compare-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -4px;
  padding: 12px 4px 4px;
  border-top: 1px solid var(--border);
  background: var(--card, #fff);
}
.modal-compare {
  width: min(1240px, calc(100vw - 32px));
}
.policy-compare-layout-wide {
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
}
.policy-compare-card-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 6px;
  font-size: 12px;
}
.policy-compare-card-stats strong {
  color: var(--navy);
}
.policy-compare-mini-meter {
  width: 80px;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.policy-compare-mini-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.policy-compare-fields-count {
  color: var(--muted);
}
.policy-compare-scorecard {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.policy-compare-scorecard .policy-compare-meter {
  margin-bottom: 6px;
}
.policy-compare-why,
.policy-compare-winner {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}
.policy-compare-winner {
  color: var(--muted);
}
.policy-cmp-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.policy-cmp-table thead th {
  padding: 8px 10px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: bottom;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
}
.policy-cmp-table td,
.policy-cmp-table tbody th {
  padding: 8px 10px;
  border-top: 1px solid #eef2f7;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.policy-cmp-table tbody th[scope='row'] {
  width: 22%;
  color: var(--navy);
  font-weight: 600;
  box-shadow: inset 3px 0 0 transparent;
}
.policy-cmp-table td {
  color: var(--text);
}
.policy-cmp-table td:last-child {
  width: 30%;
}
.policy-cmp-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.policy-cmp-group th {
  padding: 6px 10px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-top: 1px solid #eef2f7;
}
.policy-cmp-row.is-same th[scope='row'] { box-shadow: inset 3px 0 0 #059669; }
.policy-cmp-row.is-overlap th[scope='row'] { box-shadow: inset 3px 0 0 #f59e0b; }
.policy-cmp-row.is-any th[scope='row'] { box-shadow: inset 3px 0 0 #94a3b8; }
.policy-cmp-row.is-different th[scope='row'] { box-shadow: inset 3px 0 0 #ef4444; }
.policy-cmp-row.is-same td { background: #f0fdf4; }
.policy-cmp-row.is-overlap td { background: #fffbeb; }
.policy-verdict {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.policy-verdict-same { background: #d1fae5; color: #065f46; }
.policy-verdict-overlap { background: #fef3c7; color: #92400e; }
.policy-verdict-any { background: #e2e8f0; color: #334155; }
.policy-verdict-different { background: #fee2e2; color: #991b1b; }
.policy-verdict-unset { background: #f1f5f9; color: #64748b; }
.policy-cmp-unset {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.policy-cmp-unset summary {
  cursor: pointer;
  font-weight: 600;
}
.policy-cmp-unset p {
  margin: 6px 0 0;
}
.policy-cmp-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
}
.policy-cmp-legend > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.policy-cmp-legend dt {
  margin: 0;
}
.policy-cmp-legend dd {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}
.policy-cmp-answer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.policy-cmp-answer strong {
  font-size: 14px;
}
.policy-cmp-answer.is-covered {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}
.policy-cmp-answer.is-partial {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.policy-cmp-answer span {
  color: var(--text);
}
.policy-compare-meter-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.policy-cmp-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.policy-cmp-table td.is-any {
  color: #94a3b8;
  font-style: italic;
}
.policy-compare-fields-count {
  font-weight: 600;
  color: #b45309;
}
.policy-compare-fields-count.is-covered {
  color: var(--green);
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 4px;
  vertical-align: middle;
}
@media (max-width: 960px) {
  .policy-compare-layout {
    grid-template-columns: 1fr;
  }
  .policy-compare-detail {
    position: static;
  }
  .policy-compare-match.selected::after {
    display: none;
  }
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.span-2 { grid-column: span 2; }
.field label { color: var(--muted); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.source { color: var(--muted); font-size: 11px; margin-top: 6px; }

/* —— Observability / Jaeger Trace Timeline —— */
.observability-page .jt-search-card {
  padding: 0;
  overflow: hidden;
}
.jt-timeline-card {
  border: 1px solid #d0d7e2;
}
.jaeger-trace {
  background: #fff;
  overflow: hidden;
}
.jt-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}
.jt-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.jt-trace-name {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}
.jt-trace-svc { font-weight: 700; }
.jt-trace-op { color: #334155; font-weight: 500; }
.jt-trace-id {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.jt-trace-id:hover { color: #0f172a; text-decoration: underline; }
.jt-view-label {
  font-size: 12px;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px 10px;
  background: #f8fafc;
}
.jt-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.jt-tech-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}
.jt-tech-toggle input {
  margin: 0;
}
.jt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 13px;
  color: #0f172a;
}
.jt-meta em {
  font-style: normal;
  color: #64748b;
  margin-right: 6px;
  font-weight: 500;
}
.jt-minimap {
  position: relative;
  margin: 10px 16px 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.jt-minimap i {
  position: absolute;
  border-radius: 1px;
}
.jt-failure-note {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid #fecdd3;
  background: #fff1f2;
  color: #9f1239;
  font-size: 13px;
  line-height: 1.45;
}
.jt-service-path {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
}
.jt-path-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.jt-path-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.jt-path-step { display: inline-flex; align-items: center; gap: 6px; }
.jt-path-arrow { color: #94a3b8; font-size: 12px; }
.jt-path-chip {
  border: 1.5px solid;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.jt-path-chip:hover { filter: brightness(0.97); }
.jt-path-clear { margin-left: 6px; }
.jt-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding: 8px 16px 4px;
  font-size: 12px;
}
.jt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 2px 0;
  font: inherit;
  color: #334155;
  cursor: pointer;
}
.jt-legend-item.dim { opacity: 0.35; }
.jt-legend-item.active { font-weight: 600; }
.jt-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.jt-legend-clear {
  border: 0;
  background: transparent;
  color: #0d9488;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}
.jt-tick-track {
  position: relative;
  height: 18px;
  margin: 4px 16px 0;
}
.jt-tick-track .jt-tick:first-child { transform: none; }
.jt-tick-track .jt-tick:last-child { transform: translateX(-100%); }
.jt-grid-head {
  display: grid;
  grid-template-columns: minmax(240px, 32%) 1fr;
  gap: 0;
  padding: 6px 16px;
  font-size: 12px;
  color: #64748b;
  border-bottom: 1px solid #e8edf4;
  background: #fafbfc;
}
.jt-col-bars {
  position: relative;
  min-height: 18px;
}
.jt-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.jt-rows {
  max-height: min(68vh, 780px);
  overflow: auto;
  background: #fff;
}
.jt-row {
  border-bottom: 1px solid #eef2f7;
}
.jt-row.error .jt-row-main {
  background: #fff8f8;
}
.jt-row.open {
  background: #f8fafc;
}
.jt-row-main {
  display: grid;
  grid-template-columns: minmax(240px, 32%) 1fr;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
}
.jt-row-main:hover {
  background: #f1f5f9;
}
.jt-col-ops {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 8px 4px 0;
  font-size: 12.5px;
  overflow: hidden;
}
.jt-collapse {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex: 0 0 auto;
}
.jt-collapse.spacer { visibility: hidden; }
.jt-err-icon { color: #dc2626; flex: 0 0 auto; }
.jt-svc {
  font-weight: 700;
  white-space: nowrap;
}
.jt-op {
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jt-row-main .jt-col-bars {
  position: relative;
  min-height: 34px;
  overflow: hidden;
}
.jt-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eef2f7;
  pointer-events: none;
}
.jt-bar {
  position: absolute;
  top: 9px;
  height: 16px;
  border-radius: 2px;
  min-width: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  overflow: visible;
}
.jt-bar.err {
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.45);
}
.jt-bar em {
  position: absolute;
  left: calc(100% + 6px);
  font-style: normal;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.jt-detail {
  margin: 0 16px 12px;
  padding: 12px 14px 10px;
  border-left: 3px solid #64748b;
  background: #fff;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.jt-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.jt-detail-svc {
  margin-left: 10px;
  font-weight: 600;
  font-size: 13px;
}
.jt-detail-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.jt-section { margin-top: 10px; }
.jt-section h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.jt-kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.jt-kv th {
  text-align: left;
  width: 36%;
  max-width: 280px;
  padding: 2px 12px 2px 0;
  color: #64748b;
  font-weight: 500;
  vertical-align: top;
}
.jt-kv td {
  padding: 2px 0;
  color: #0f172a;
  word-break: break-word;
}
.jt-err-val { color: #dc2626; font-weight: 600; }
.jt-logs-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}
.jt-logs {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12px;
}
.jt-logs li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}
.jt-logs pre {
  width: 100%;
  margin: 4px 0 0;
  padding: 8px;
  background: #f8fafc;
  border-radius: 4px;
  font-size: 11px;
}
.jt-span-id {
  margin-top: 12px;
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.jt-linkish {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: #0369a1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.obs-header-search {
  display: flex;
  gap: 8px;
  align-items: center;
}
.obs-header-search input {
  width: min(220px, 42vw);
  min-width: 0;
  border: 1px solid #d8dee9;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
.observability-page .kpi-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.obs-service-section {
  margin-bottom: 14px;
}
.obs-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.obs-drawer-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.obs-drawer-row:hover { border-color: var(--teal); }
.obs-drawer-row-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--navy);
  flex-shrink: 0;
}
.obs-drawer-row-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.obs-drawer-row-copy strong {
  font-size: 13px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.obs-drawer-row-copy small {
  font-size: 11px;
  color: var(--muted);
}
.obs-drawer-row-value {
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.obs-drawer-subhead {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
}
.obs-service-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.obs-service-section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #0f172a;
}
.obs-latency-card .kpi-label {
  line-height: 1;
}
.obs-latency-menu {
  position: relative;
}
.header-actions-under .obs-latency-select {
  padding: 6px 22px 6px 10px;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  background-color: #fff;
  background-position: right 8px center;
}
.header-actions-under .obs-latency-options {
  left: auto;
  right: 0;
}
.obs-latency-select {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0 14px 0 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
}
.obs-latency-select:hover,
.obs-latency-select:focus {
  color: var(--navy);
  outline: none;
}
.obs-latency-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 148px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.obs-latency-options button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 12px 8px 14px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
}
.obs-latency-options button:hover,
.obs-latency-options button.is-active {
  background: #f1f5f9;
}
.obs-service-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
.obs-service-kpi .kpi-delta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.obs-service-kpi .kpi-value.obs-service-error {
  color: var(--red);
}
@media (max-width: 900px) {
  .obs-service-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .obs-service-tiles {
    grid-template-columns: 1fr;
  }
}
.obs-service-tile {
  padding: 14px 16px;
}
.obs-service-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.obs-service-tile-head strong {
  font-size: 13px;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.obs-service-tile-label {
  margin: 0 0 2px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.obs-service-tile-meta {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.obs-service-tile-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #64748b;
}
.obs-flow-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.observability-page tr.row-error td {
  background: #fff7f7;
}
.obs-split {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.obs-flow-list {
  padding: 12px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.obs-list-caption {
  margin: 0 0 8px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.obs-inline-search {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}
.obs-inline-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d8dee9;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
.obs-flows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.obs-flow-item {
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.obs-flow-item:hover { border-color: #94a3b8; background: #f8fafc; }
.obs-flow-item.active {
  border-color: #64748b;
  background: #f1f5f9;
}
.obs-flow-item.has-error { border-color: #fecaca; }
.obs-flow-top, .obs-flow-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.obs-flow-top strong {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}
.obs-flow-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}
.obs-flow-mid code {
  font-size: 11px;
  color: #475569;
}
.obs-req-link {
  border: 0;
  background: #ecfeff;
  color: #0f766e;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10px;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.obs-req-link:hover { background: #cffafe; }
.obs-req-pill {
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.obs-flow-services {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.obs-flow-services span {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.obs-flow-top span {
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.obs-flow-bottom {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}
.obs-main .jt-search-card { min-height: 420px; }
@media (max-width: 1100px) {
  .obs-split { grid-template-columns: 1fr; }
  .obs-flow-list { position: static; max-height: 280px; }
}
@media (max-width: 900px) {
  .jt-grid-head,
  .jt-row-main {
    grid-template-columns: 1fr;
  }
  .jt-col-bars { min-height: 28px; }
  .jt-bar em { display: none; }
}

@media (max-width: 1280px) {
  .kpi-row, .kpi-row-5, .kpi-row-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-overview-mid { grid-template-columns: 1fr; }
  .overview-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid-explorer, .explorer-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr 1fr; }
  .metrics-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; height: auto; }
  .sidebar { flex-direction: row; overflow: auto; align-items: center; }
  .brand { border-bottom: 0; padding: 0 8px 0 0; margin: 0; }
  .nav { flex-direction: row; }
  .kpi-row, .kpi-row-4, .kpi-row-5, .grid-2, .form-grid { grid-template-columns: 1fr 1fr; }
  .policy-bucket-grid { grid-template-columns: 1fr 1fr; }
  .clause-row { grid-template-columns: 1fr; }
  .eval-columns, .eval-mid, .insights-split, .insights-bottom { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .candidate-list, .metrics-row, .evaluation-row, .decision-grid { grid-template-columns: 1fr 1fr; }
  .explorer-detail { max-height: none; }
}

/* Phones. Without this the 900px tablet rules apply down to 360px and keep
   forcing two columns into a screen that only fits one. */
@media (max-width: 640px) {
  .policy-bucket-grid { grid-template-columns: 1fr; }
  .shell { height: auto; min-height: 0; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 10px;
    padding: 10px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark img, .brand-mark svg { width: 24px; height: 24px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy span { font-size: 10px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; white-space: nowrap; }

  .main { padding: 14px 12px 22px; }

  .kpi-row, .kpi-row-4, .kpi-row-5,
  .grid-2, .grid-3, .form-grid, .filter-bar,
  .candidate-list, .metrics-row, .evaluation-row, .decision-grid,
  .overview-charts, .grid-explorer, .explorer-split {
    grid-template-columns: 1fr;
  }
  .field.span-2,
  .policy-form-grid > .span-2 { grid-column: auto; }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }
  .page-header h1 { font-size: 21px; }
  .header-actions { justify-content: flex-start; }

  /* Search inputs and selects held rigid widths that overflow a phone. */
  .policy-toolbar, .policy-filters, .filters { flex-wrap: wrap; }
  .policy-filters { width: 100%; }
  .policy-filters > *,
  .policy-filters .filter-select-wrap,
  .search-field { flex: 1 1 100%; min-width: 0; }
  .filters input { flex: 1 1 100%; min-width: 0; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Headers are nowrap, so tables already size to their content. Keep them
     scrollable inside the card instead of pinning a width. */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .pricing-table { min-width: 0; }

  .card { padding: 14px; }
  .kpi-value { font-size: 20px; }
  .pager { flex-wrap: wrap; }
  .drawer-panel,
  .drawer-panel.drawer-chart,
  .drawer-panel.explorer-detail { width: 100%; }
  .modal-actions { flex-wrap: wrap; }

  /* The action buttons refuse to shrink, so on a phone they squeezed the title
     column to zero width and the text wrapped one letter per line. Give the
     copy and the buttons a row each, and pin the close button to the corner. */
  .drawer-head {
    position: relative;
    flex-wrap: wrap;
    padding: 14px 52px 14px 14px;
    gap: 10px;
  }
  .drawer-head-copy { flex: 1 1 100%; }
  .drawer-head h2 { font-size: 15px; overflow-wrap: anywhere; }
  .drawer-head-actions {
    flex: 1 1 100%;
    flex-shrink: 1;
    flex-wrap: wrap;
    gap: 6px;
  }
  .drawer-head-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 12px;
    padding: 6px 10px;
  }
  /* Model Pricing puts the close button straight in the header; the other
     drawers nest it beside the actions. */
  .drawer-head > .icon-btn,
  .drawer-head-actions .icon-btn {
    position: absolute;
    top: 12px;
    right: 12px;
  }
  .drawer-body { padding: 14px 14px 20px; }
}

/* Plotly disables pointer events on its SVG layers; re-enable them on category tick labels. */
.plot-tick-click-ytick .ytick text,
.plot-tick-click-xtick .xtick text {
  pointer-events: all;
  cursor: pointer;
}

.plot-tick-click-ytick .ytick text:hover,
.plot-tick-click-xtick .xtick text:hover {
  fill: var(--teal-dark) !important;
  text-decoration: underline;
}
