/* dbr-ui — PrivacyPath session explorer, light editorial.
   Warm off-white ground, white card surfaces, purple accent.
   No tailwind. No frameworks. Hand-tuned spacing and typography. */

/* ===== reset / base ===================================================== */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f7f5f0;
  color: #1a1a1c;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* very faint purple wash top-right + cooler wash bottom-left — atmosphere
     without competing with content. Saturation kept low so it reads as paper. */
  background-image:
    radial-gradient(900px 600px at 92% -10%, rgba(37,99,235,0.045), transparent 60%),
    radial-gradient(1200px 800px at -10% 110%, rgba(64,102,224,0.025), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

/* ===== type scale ======================================================= */
.h-display { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: #0a0a0c; }
.h1        { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; color: #0a0a0c; }
.h2        { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: #6b6b71; }
.h3        { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.005em; color: #1a1a1c; }
.body      { font-size: 0.9375rem; font-weight: 400; line-height: 1.55; color: #2a2a2e; }
.small     { font-size: 0.8125rem; color: #6b6b71; }
.mono      { font-family: 'Fragment Mono', 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 0.8125rem; letter-spacing: 0; }
.muted     { color: #8a8a90; }
.accent    { color: #2563eb; }

/* ===== attorney-client privilege banner ================================= */
.privilege-banner {
  position: sticky; top: 0; z-index: 60;
  height: 30px; display: flex; align-items: center; justify-content: center;
  background: #2a2a30; color: #f3f1ea;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}

/* ===== header =========================================================== */
.site-header {
  position: sticky; top: 30px; z-index: 50;
  border-bottom: 1px solid #e8e5dc;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.site-header .inner {
  max-width: 1280px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-name {
  font-size: 1.0625rem;
  display: flex; align-items: baseline; gap: 12px;
  color: #0a0a0c;
}
.brand-name .wordmark { font-weight: 700; letter-spacing: -0.03em; }
.brand-name .sep { font-weight: 400; color: #c8c5bd; font-size: 0.875rem; }
.brand-name .product { font-weight: 500; color: #6b6b71; letter-spacing: 0; font-size: 0.8125rem; }

.nav { display: flex; gap: 4px; }
.nav a {
  font-size: 0.8125rem; font-weight: 500; color: #5a5a60;
  padding: 8px 14px; border-radius: 6px;
  transition: color 120ms, background 120ms;
}
.nav a:hover { color: #0a0a0c; background: rgba(15,15,20,0.04); }
.nav a.nav-active { color: #0a0a0c; background: rgba(37,99,235,0.08); }
.nav a.nav-active::before {
  content: ""; display: inline-block; width: 4px; height: 4px; background: #2563eb;
  border-radius: 50%; margin-right: 8px; transform: translateY(-2px);
}
/* Evaluations is the primary working surface — weight it up so the leftmost
   item reads as the main entry point even when another tab is active. */
.nav a.nav-primary { font-weight: 600; color: #0a0a0c; }

/* Plan-management dropdown hanging off the Evaluations nav item. Hover-reveal;
   the parent link still navigates to the evaluations list on click. The menu
   abuts the parent's bottom edge (top:100%) so there's no dead gap to cross. */
.nav-dd { position: relative; display: inline-flex; }
.nav-caret { font-size: 0.625rem; margin-left: 5px; opacity: 0.55; vertical-align: 1px; }
.nav-dd-menu {
  position: absolute; top: 100%; left: 0; min-width: 184px;
  background: #fff; border: 1px solid #e2e2e2; border-radius: 8px;
  box-shadow: 0 8px 28px rgba(10,10,20,0.12); padding: 5px;
  display: none; flex-direction: column; gap: 1px; z-index: 60;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: flex; }
.nav-dd-menu a { font-weight: 500; white-space: nowrap; color: #3a3a42; padding: 7px 12px; }
.nav-dd-menu a:hover { color: #0a0a0c; background: rgba(37,99,235,0.08); }

/* ===== layout =========================================================== */
.main { max-width: 1280px; margin: 0 auto; padding: 40px 32px 96px; }

/* ===== page header (section title + meta row) =========================== */
.page-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; gap: 32px; }
.page-head .label { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.page-head .label::before {
  content: ""; width: 6px; height: 6px; background: #2563eb; border-radius: 50%;
  box-shadow: 0 0 12px rgba(37,99,235,0.45);
}
.page-head .meta { display: flex; gap: 16px; align-items: center; color: #6b6b71; font-size: 0.8125rem; }
.page-head .meta a:hover { color: #2563eb; }
.page-head .meta button { color: #6b6b71; }
.page-head .meta button:hover { color: #0a0a0c; }

/* ===== cards / surfaces ================================================= */
.surface {
  background: #ffffff;
  border: 1px solid #ece9e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,15,20,0.025), 0 4px 14px rgba(15,15,20,0.03);
}
.surface-pad { padding: 24px; }

/* ===== data list (replaces tables) ====================================== */
.data-list { display: flex; flex-direction: column; }
.data-list .row {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) 104px 58px 96px 104px 76px 50px 24px;
  gap: 24px;
  padding: 18px 24px;
  border-top: 1px solid #f0ede4;
  align-items: center;
  cursor: pointer;
  transition: background 100ms;
  animation: rowin 360ms cubic-bezier(.2,.7,.3,1) both;
}
.data-list .row:first-child { border-top: none; }
.data-list .row:hover { background: #fbf9f3; }
.data-list .row:hover .row-arrow { color: #2563eb; transform: translateX(2px); }
.data-list .row .row-arrow { color: #c8c5bd; transition: color 120ms, transform 120ms; text-align: right; }
.data-list .row .primary-title { font-weight: 600; font-size: 0.9375rem; line-height: 1.2; color: #0a0a0c; }
.data-list .row .primary-sub { color: #8a8a90; font-size: 0.75rem; margin-top: 4px; font-family: 'Fragment Mono', monospace; }
.data-list .row .cell-small { font-size: 0.8125rem; color: #5a5a60; }
.data-list .row .cell-num { font-family: 'Fragment Mono', monospace; font-size: 0.8125rem; color: #2a2a2e; }
.header-row {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) 104px 58px 96px 104px 76px 50px 24px;
  gap: 24px;
  padding: 12px 24px;
  background: #faf8f2;
  border-bottom: 1px solid #ece9e0;
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em;
  color: #6b6b71;
  cursor: default;
}
.header-row .text-right { text-align: right; }

/* Stagger first ~10 rows on initial paint. (After that, no per-row delay.) */
.data-list .row:nth-child(1)  { animation-delay: 20ms;  }
.data-list .row:nth-child(2)  { animation-delay: 50ms;  }
.data-list .row:nth-child(3)  { animation-delay: 80ms;  }
.data-list .row:nth-child(4)  { animation-delay: 110ms; }
.data-list .row:nth-child(5)  { animation-delay: 140ms; }
.data-list .row:nth-child(6)  { animation-delay: 170ms; }
.data-list .row:nth-child(7)  { animation-delay: 200ms; }
.data-list .row:nth-child(8)  { animation-delay: 230ms; }
.data-list .row:nth-child(9)  { animation-delay: 260ms; }
.data-list .row:nth-child(10) { animation-delay: 290ms; }

@keyframes rowin {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== pills ============================================================ */
/* Soft tinted background + saturated darker text for readability on light. */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.pill::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: 0.9;
}
.pill.status-recording { background: #fdf0d9; color: #a86a08; }
.pill.status-running   { background: #e7edfa; color: #2548b0; }
.pill.status-starting  { background: #dbeafe; color: #2563eb; }
.pill.status-done      { background: #dff4e6; color: #0f7a37; }
.pill.status-failed    { background: #fbe7e7; color: #b91c1c; }
.pill.status-unknown   { background: #eeece5; color: #5a5a60; }

/* Auth-wall badges — shown next to status when a run completed but never got
   past authentication. 2FA (amber, password worked but OTP blocked) vs
   identity (red, credentials never authenticated). */
.pill.auth-block { margin-left: 6px; }
.pill.auth-2fa      { background: #fdf0d9; color: #a86a08; }
.pill.auth-identity { background: #fbe7e7; color: #b91c1c; }
/* HIGH findings badge in the Detections column. */
.pill.det-high { background: #fbe7e7; color: #b91c1c; margin-left: 6px; }
/* DOM-capture validity gate badges. */
.pill.cov-blank   { background: #fbe7e7; color: #b91c1c; margin-left: 6px; }
.pill.cov-partial { background: #fdf0d9; color: #a86a08; margin-left: 6px; }
.cov-banner { padding: 12px 16px; border-radius: 8px; font-size: 0.875rem; margin: 0 0 20px; }
.cov-banner .mono { font-family: var(--font-mono, monospace); font-size: 0.8125rem; }
.cov-banner-blank   { background: #fbe7e7; color: #8a1414; border: 1px solid #f3c5c5; }
.cov-banner-partial { background: #fdf4e3; color: #8a5a08; border: 1px solid #f0dcb0; }

/* ===== session re-run grouping ========================================== */
/* Re-runs of one sessionSpec collapse behind the latest run. The earlier runs
   are rendered but hidden until the expander is toggled. */
.session-group .rerun-others { display: none; }
.session-group.expanded .rerun-others { display: block; }
.session-group .rerun-others .row { background: #fcfbf7; }
.rerun-bar { padding: 4px 24px; border-top: 1px dashed #ece9e0; background: #faf8f2; }
.rerun-toggle { display: inline-flex; align-items: center; gap: 6px;
                font-size: 0.75rem; color: #6b6b71; padding: 4px 0; }
.rerun-toggle:hover { color: #2563eb; }
.rerun-toggle .rerun-count::before { content: "▸"; display: inline-block; transition: transform 120ms; }
.session-group.expanded .rerun-toggle .rerun-count::before { transform: rotate(90deg); }

/* ===== filter bar additions ============================================= */
.filterbar .flt-search input[type=search] { min-width: 220px; }
.filterbar .flt-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
                        font-size: 0.8125rem; color: #5a5a60; }
.filterbar .flt-check input { cursor: pointer; }

/* ===== buttons ========================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       padding: 11px 22px; border-radius: 8px; font-weight: 600; font-size: 0.875rem;
       transition: background 120ms, color 120ms, transform 80ms, box-shadow 120ms; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #2563eb; color: #ffffff; box-shadow: 0 1px 2px rgba(37,99,235,0.18), 0 4px 12px rgba(37,99,235,0.15); }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: #ffffff; color: #1a1a1c; border: 1px solid #d8d4ca; }
.btn-secondary:hover { border-color: #2563eb; color: #2563eb; }
.btn-ghost { color: #5a5a60; padding: 6px 10px; }
.btn-ghost:hover { color: #0a0a0c; }

/* ===== forms ============================================================ */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.75rem; font-weight: 500; color: #6b6b71;
               text-transform: uppercase; letter-spacing: 0.08em; }
.field input, .field select, .field textarea {
  background: #ffffff; color: #0a0a0c;
  border: 1px solid #d8d4ca; border-radius: 8px;
  padding: 11px 14px;
  font: inherit; font-size: 0.875rem;
  transition: border-color 120ms, box-shadow 120ms;
}
.field input::placeholder, .field textarea::placeholder { color: #b3b0a8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14);
}

/* ===== session detail =================================================== */
.session-hero {
  position: relative; padding: 32px;
  background: #ffffff;
  border: 1px solid #ece9e0; border-radius: 14px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,15,20,0.025), 0 6px 22px rgba(15,15,20,0.04);
}
.session-hero::before {
  content: ""; position: absolute; top: -60%; right: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 60%);
  filter: blur(40px); pointer-events: none;
}
.session-hero .row1 { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 8px; position: relative; }
.session-hero .row1 h2 { margin: 0; }
.session-hero .ids {
  font-family: 'Fragment Mono', monospace; font-size: 0.75rem; color: #8a8a90;
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px;
}
.session-hero .ids a:hover { color: #2563eb; }

.kv-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 32px;
  padding-top: 24px; margin-top: 24px; border-top: 1px solid #f0ede4;
  position: relative;
}
.kv-grid .kv .k { font-size: 0.6875rem; color: #8a8a90; text-transform: uppercase;
                   letter-spacing: 0.12em; margin-bottom: 4px; }
.kv-grid .kv .v { font-size: 0.875rem; color: #0a0a0c; font-weight: 500; }
.kv-grid .kv .v.mono { font-family: 'Fragment Mono', monospace; font-weight: 400; }

/* ===== checklist (testSpecs sidebar) ==================================== */
.checklist { padding: 24px; background: #ffffff;
             border: 1px solid #ece9e0; border-radius: 14px;
             min-height: 100%;
             box-shadow: 0 1px 2px rgba(15,15,20,0.025), 0 6px 22px rgba(15,15,20,0.04); }
.checklist h3 { margin: 0 0 16px; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: start; }
.checklist .mark {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #dbd7cd; display: grid; place-items: center; margin-top: 2px;
  font-size: 11px; font-weight: 700; background: #ffffff;
}
.checklist .mark.done { background: #dff4e6; border-color: #16a34a; color: #0f7a37; }
.checklist .name { font-size: 0.875rem; font-weight: 500; }
.checklist .name.done { color: #0a0a0c; }
.checklist .name.todo { color: #8a8a90; }
.checklist .flags { font-family: 'Fragment Mono', monospace; font-size: 0.6875rem;
                    color: #8a8a90; margin-left: 8px; }
.checklist .instr { font-size: 0.75rem; color: #6b6b71; margin-top: 2px; line-height: 1.5; }

/* ===== tabs ============================================================= */
.tabs { display: flex; gap: 0; border-bottom: 1px solid #ece9e0; margin-bottom: 24px; }
.tabs button {
  padding: 12px 18px; font-size: 0.8125rem; font-weight: 500; color: #6b6b71;
  border-bottom: 2px solid transparent;
  transition: color 120ms, border-color 120ms;
}
.tabs button:hover:not(:disabled) { color: #0a0a0c; }
.tabs button.active { color: #0a0a0c; border-bottom-color: #2563eb; }
.tabs button:disabled { color: #c8c5bd; cursor: not-allowed; }

/* ===== per-test multi-lens view ========================================= */
/* "lenses ›" affordance on each testPlans-index row — opens the test view. */
.ts-open {
  margin-left: auto; margin-right: 10px; white-space: nowrap; flex: 0 0 auto;
  font-weight: 600; opacity: 0; transition: opacity 120ms;
}
.ts-item summary:hover .ts-open, .ts-open:focus { opacity: 1; }
.test-view-head { margin-bottom: 18px; }
.test-view-title { display: flex; flex-direction: column; }
.test-view-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* The per-test sub-tab bar is a lighter, tighter secondary of the main tabs. */
.tabs.subtabs { margin-bottom: 18px; }
.tabs.subtabs button { padding: 9px 14px; font-size: 0.78125rem; }
/* Verify badge as a standalone pill (the .vb-* colours are otherwise scoped to
   the replay feature badge). */
.vbadge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 0.6875rem; font-weight: 600; line-height: 1.6;
}
.vbadge.vb-verifying { background: #eef3fd; color: #2548b0; }
.vbadge.vb-verified  { background: #dff4e6; color: #0f7a37; }
.vbadge.vb-failed    { background: #fbe7e7; color: #b91c1c; }

/* ===== timeline ========================================================= */
.timeline { background: #ffffff; border: 1px solid #ece9e0; border-radius: 14px;
            box-shadow: 0 1px 2px rgba(15,15,20,0.025), 0 6px 22px rgba(15,15,20,0.04); }
.timeline .feature { padding: 24px; border-top: 1px solid #f0ede4; }
.timeline .feature:first-child { border-top: none; }
.timeline .feature-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.timeline .feature-name { font-weight: 600; font-size: 0.9375rem;
                          display: flex; align-items: center; gap: 10px; color: #0a0a0c; }
.timeline .feature-name .idx {
  font-family: 'Fragment Mono', monospace; color: #2563eb; font-size: 0.75rem; font-weight: 600;
}
.timeline .feature-meta { color: #8a8a90; font-size: 0.75rem; margin-bottom: 12px; }
.timeline details { font-size: 0.8125rem; }
.timeline summary { cursor: pointer; color: #6b6b71; font-size: 0.75rem;
                    text-transform: uppercase; letter-spacing: 0.08em; }
.timeline summary:hover { color: #0a0a0c; }
.timeline .event-table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.timeline .event-table th { text-align: left; padding: 8px 12px; font-size: 0.6875rem;
                            color: #8a8a90; font-weight: 600; text-transform: uppercase;
                            letter-spacing: 0.08em; border-bottom: 1px solid #ece9e0; background: #faf8f2; }
.timeline .event-table td { padding: 8px 12px; font-family: 'Fragment Mono', monospace;
                            font-size: 0.75rem; color: #2a2a2e;
                            border-bottom: 1px solid #f5f2ea; }
.timeline .event-table td.truncate { max-width: 320px; overflow: hidden;
                                     text-overflow: ellipsis; white-space: nowrap; color: #6b6b71; }

/* ===== empty / loading states =========================================== */
.empty { padding: 64px 24px; text-align: center; color: #8a8a90; }
.empty .marker { font-family: 'Fragment Mono', monospace; font-size: 0.6875rem;
                  letter-spacing: 0.2em; text-transform: uppercase; color: #b3b0a8;
                  margin-bottom: 12px; }
.empty .msg { font-size: 0.9375rem; color: #5a5a60; margin-bottom: 16px; }
.empty .hint { font-size: 0.8125rem; color: #8a8a90; }
.empty a.accent { color: #2563eb; }
.empty a.accent:hover { color: #1d4ed8; }

.loading { padding: 48px; text-align: center; color: #8a8a90; font-size: 0.875rem; }

/* ===== code / raw ======================================================= */
pre.code {
  background: #f4f1ea;
  border: 1px solid #ece9e0;
  border-radius: 10px;
  padding: 20px 24px;
  font-family: 'Fragment Mono', 'JetBrains Mono', monospace;
  font-size: 0.8125rem; line-height: 1.6;
  color: #1a1a1c;
  overflow: auto; max-height: 640px;
}
pre.code.tail {
  background: #0e0e10; color: #5fe88f;
  border-color: #0e0e10;
  font-size: 0.75rem;
}

/* ===== rrweb player wrap ================================================ */
.replay-frame {
  background: #ffffff; border: 1px solid #ece9e0; border-radius: 14px;
  padding: 24px; position: relative;
  box-shadow: 0 1px 2px rgba(15,15,20,0.025), 0 6px 22px rgba(15,15,20,0.04);
}
.replay-frame::before {
  content: "DOM REPLAY"; position: absolute; top: -8px; left: 24px;
  background: #f7f5f0; color: #8a8a90; font-family: 'Fragment Mono', monospace;
  font-size: 0.6875rem; letter-spacing: 0.18em; padding: 0 8px;
}
.replay-frame.screen-replay::before { content: "SCREEN REPLAY"; }
.replay-frame .player { background: #ffffff; border: 1px solid #ece9e0; border-radius: 6px; overflow: hidden; }
.replay-frame .caption { color: #8a8a90; font-size: 0.75rem; margin-top: 12px;
                         font-family: 'Fragment Mono', monospace; }

/* ===== run trigger card ================================================= */
.trigger-card { max-width: 720px; }
.trigger-card .plan-detail { margin-top: 12px; font-size: 0.8125rem; color: #5a5a60; }
.trigger-card .plan-detail ul { list-style: none; padding: 0; margin: 12px 0 0;
                                 display: flex; flex-direction: column; gap: 14px; }
.trigger-card .plan-detail li {
  padding-left: 16px; border-left: 2px solid #e0ddd3;
}
.trigger-card .plan-detail .pname { font-weight: 600; color: #0a0a0c; }
.trigger-card .plan-detail .pflags { color: #8a8a90; font-family: 'Fragment Mono', monospace;
                                       font-size: 0.6875rem; margin-left: 8px; }
.trigger-card .plan-detail .purl { font-size: 0.75rem; color: #2548b0; word-break: break-all; }
.trigger-card .plan-detail .pinstr { font-size: 0.8125rem; color: #5a5a60; margin-top: 4px; }

.active-run { margin-top: 32px; max-width: 720px; }
.active-run .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.active-run .head .id { font-family: 'Fragment Mono', monospace; }
.active-run .head .meta { font-size: 0.75rem; color: #8a8a90; margin-top: 4px;
                          font-family: 'Fragment Mono', monospace; }
.active-run .session-link { font-size: 0.8125rem; margin-bottom: 12px; color: #5a5a60; }
.active-run .session-link a { color: #2563eb; text-decoration: underline; text-underline-offset: 3px; }

/* ===== utilities ======================================================== */
.flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.hidden { display: none !important; }
.grid-2to1 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.text-right { text-align: right; }

/* replay feature picker — each feature is one continuous rrweb recording */
.replay-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.replay-picker button {
  font: inherit; font-size: 0.8125rem; padding: 6px 12px; border-radius: 8px;
  border: 1px solid #e3e0e8; background: #fff; color: #3a3a40; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; text-align: left;
}
.replay-picker button:hover:not([disabled]) { border-color: #2563eb; color: #2563eb; }
.replay-picker button.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.replay-picker button.active .rp-sub { color: rgba(255,255,255,0.7); }
.replay-picker button[disabled] { opacity: 0.55; cursor: not-allowed; }
.replay-picker .rp-name { font-weight: 500; }
.replay-picker .rp-sub { opacity: 0.7; font-size: 0.6875rem; font-family: 'Fragment Mono', monospace; }
.replay-picker .rp-mark { font-weight: 700; font-size: 0.75rem; }
.replay-picker .rp-mark.ok { color: #16a34a; }
.replay-picker .rp-mark.failed { color: #dc2626; }
.replay-picker .rp-mark.warn { color: #d97706; }
.replay-picker button.active .rp-mark { color: #fff; }

/* Per-feature health strip above the player */
.replay-health {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  margin-bottom: 12px; padding: 8px 12px; border-radius: 8px;
  background: #faf9f6; border: 1px solid #ece9e0; font-size: 0.8125rem;
}
.replay-health .rp-title { font-weight: 600; color: #2a2a30; }
.replay-health .rp-stats { color: #5a5a60; font-family: 'Fragment Mono', monospace; font-size: 0.75rem; }
.replay-health .rp-pages { color: #8a8a90; font-size: 0.75rem; }
.replay-health .rp-stall { color: #d97706; font-weight: 600; }
.rp-reasons { list-style: none; padding: 0; margin: 16px auto 0; max-width: 520px;
  text-align: left; font-size: 0.8125rem; color: #5a5a60; }
.rp-reasons li { padding: 6px 0; border-top: 1px solid #ece9e0; }
.rp-reasons li b { color: #2a2a30; }

/* ---- GPC comparison view ---- */
.compare-pickers { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.compare-pickers .field { flex: 1; min-width: 240px; }
.compare-pickers label { display: block; font-size: 0.6875rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: #8a8a90; margin-bottom: 6px; }
.compare-pickers select { width: 100%; font: inherit; font-size: 0.8125rem; padding: 8px 10px;
  border: 1px solid #e3e0e8; border-radius: 8px; background: #fff; color: #2a2a30; }
.compare-pickers .vs { padding-bottom: 9px; color: #8a8a90; font-weight: 600; }

.compare-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.compare-head .cmp-side { padding: 12px 16px; border: 1px solid #ece9e0; border-radius: 10px; background: #faf9f6; }
.compare-head .cmp-tag { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #2563eb; font-weight: 700; margin-bottom: 4px; }
.compare-head .cmp-id { font-family: 'Fragment Mono', monospace; font-size: 0.875rem; color: #2a2a30; text-decoration: none; }
.compare-head .cmp-id:hover { color: #2563eb; text-decoration: underline; }
.compare-head .cmp-sub { font-size: 0.75rem; color: #8a8a90; margin-top: 2px; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.compare-table th { text-align: left; font-size: 0.6875rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: #8a8a90; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid #ece9e0; }
.compare-table td { padding: 10px 12px; border-bottom: 1px solid #f3f1ea; vertical-align: middle; }
.compare-table .cmp-name { font-weight: 500; color: #2a2a30; }
.compare-table .cmp-stats { font-family: 'Fragment Mono', monospace; font-size: 0.75rem; color: #5a5a60; }
.compare-table .cmp-mark { font-weight: 700; }
.compare-table .cmp-mark.ok { color: #16a34a; }
.compare-table .cmp-mark.failed { color: #dc2626; }
.compare-table .cmp-mark.warn { color: #d97706; }
.compare-table .cmp-none { color: #c4c4ca; }
.compare-table .cmp-total td { font-weight: 600; color: #2a2a30; border-top: 2px solid #ece9e0; border-bottom: none; }
.cmp-delta { font-family: 'Fragment Mono', monospace; font-size: 0.75rem; font-weight: 600; }
.cmp-delta.down { color: #16a34a; }   /* fewer events under GPC = good signal */
.cmp-delta.up { color: #dc2626; }
.cmp-delta.zero { color: #8a8a90; }

.compare-note { margin-top: 20px; padding: 14px 16px; border-radius: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; font-size: 0.8125rem; color: #4a4a52; line-height: 1.5; }
.compare-note b { color: #2563eb; }
.compare-note .mono { font-family: 'Fragment Mono', monospace; font-size: 0.75rem; }

/* ---- Network flows + Detections tabs ---- */
.flows-summary, .det-summary { font-size: 0.8125rem; color: #5a5a60; margin-bottom: 12px; }
.det-summary b { color: #2a2a30; }
.flows-table td, .event-table td { font-size: 0.8125rem; }
.flows-table td.truncate, .event-table td.truncate { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.det-h { font-size: 0.9375rem; font-weight: 600; color: #2a2a30; margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.det-count { font-family: 'Fragment Mono', monospace; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px;
  background: #eceae3; color: #5a5a60; }
.det-count.bad { background: #fde2e2; color: #c0271f; }
.det-none { font-size: 0.8125rem; color: #8a8a90; padding: 8px 0; }
.det-hosts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.det-hosts li { font-family: 'Fragment Mono', monospace; font-size: 0.75rem; padding: 4px 10px;
  background: #faf9f6; border: 1px solid #ece9e0; border-radius: 999px; color: #4a4a52; }
.det-foot { margin-top: 22px; font-size: 0.75rem; color: #9a9aa0; font-style: italic; }
.xform { font-family: 'Fragment Mono', monospace; font-size: 0.6875rem; padding: 1px 7px; border-radius: 4px;
  background: #eff6ff; color: #2563eb; }

/* rule-generated findings (dbr-infra/findings/) — top section on Detections tab */
.det-h-sub { font-size: 0.6875rem; color: #8a8a90; font-weight: 400; font-style: italic; }
.findings-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.finding { border: 1px solid #ece9e0; border-left-width: 3px; border-radius: 6px;
  padding: 12px 14px; background: #faf9f6; }
.finding.sev-high { border-left-color: #c0271f; background: #fff7f6; }
.finding.sev-medium { border-left-color: #d97706; background: #fffaf0; }
.finding.sev-low { border-left-color: #2563eb; }
.finding-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.8125rem; margin-bottom: 8px; }
.sev-badge { font-family: 'Fragment Mono', monospace; font-size: 0.6875rem;
  padding: 1px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.sev-badge.sev-high { background: #fde2e2; color: #c0271f; }
.sev-badge.sev-medium { background: #fef3c7; color: #92400e; }
.sev-badge.sev-low { background: #dbeafe; color: #1e40af; }
.finding-cat { font-weight: 600; color: #2a2a30; }
.finding-host { font-size: 0.75rem; color: #5a5a60; }
.finding-rule { font-size: 0.6875rem; color: #8a8a90; margin-left: auto; }
.finding-rec { font-size: 0.8125rem; color: #2a2a30; line-height: 1.5; margin-bottom: 8px; }
.finding-foot { font-size: 0.6875rem; color: #8a8a90; }

/* v3 detection taxonomy — numeric severity (3=high/red, 2=notice/amber, 1=info/grey) */
.sev-badge.sev-3 { background: #fde2e2; color: #c0271f; }
.sev-badge.sev-2 { background: #fef3c7; color: #92400e; }
.sev-badge.sev-1 { background: #ececf0; color: #5a5a60; }
.sev-badge.sev-unknown { background: #ececf0; color: #8a8a90; }

/* piiFields AND-group chips on a compound */
.pii-chip { font-family: 'Fragment Mono', monospace; font-size: 0.6875rem;
  padding: 2px 8px; border-radius: 4px; background: rgba(127,127,127,0.12); color: #2a2a30; }

/* compound detection cards — the headline finding, rendered above atomic */
.compound-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.compound-card { border: 1px solid #ece9e0; border-left-width: 3px; border-radius: 6px;
  padding: 12px 14px; background: #faf9f6; }
.compound-card.sev-3 { border-left-color: #c0271f; background: #fff7f6; }
.compound-card.sev-2 { border-left-color: #d97706; background: #fffaf0; }
.compound-card.sev-1 { border-left-color: #c4c4cc; }
.compound-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.8125rem; margin-bottom: 8px; }
.compound-rule { font-weight: 600; color: #2a2a30; }
.compound-scope { margin-left: auto; font-size: 0.6875rem; color: #8a8a90;
  font-family: 'Fragment Mono', monospace; }
.compound-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.compound-foot { font-size: 0.75rem; color: #5a5a60; }
.compound-org { font-weight: 600; }
.compound-drill { margin-top: 8px; }
.compound-drill > summary { cursor: pointer; font-size: 0.6875rem; color: #5a5a60; }
.compound-atoms { list-style: none; padding: 6px 0 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px; }
.compound-atoms li { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; }
.atom-id { color: #2a2a30; }
.atom-host { font-size: 0.6875rem; color: #8a8a90; }

/* host diff in the compare view */
.cmp-hostdiff { margin-top: 24px; }
.cmp-hostcols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 10px; }
.cmp-hostcol h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8a90; margin: 0 0 8px; }
.cmp-hostcol ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cmp-hostcol li { font-family: 'Fragment Mono', monospace; font-size: 0.72rem; color: #4a4a52; }
.cmp-hostcol.only-a li { color: #c0271f; }   /* contacted only without GPC — suppressed when GPC on = good */
.cmp-hostcol.only-b li { color: #c0271f; }

/* ---- slim session hero (checklist moved to its own tab) ---- */
.session-hero.slim { display: block; }
.session-hero.slim .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.hero-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.hero-kv { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 0.75rem; color: #8a8a90; font-family: 'Fragment Mono', monospace; }
.hero-error { margin-top: 14px; color: #c0271f; font-size: 0.8125rem; }
/* Tier-2 verification progress line under the hero headline. */
.verify-line { margin-top: 8px; font-size: 0.8125rem; color: #2548b0; font-family: 'Fragment Mono', monospace; }
.verify-line.verifying { animation: vb-pulse 1.2s ease-in-out infinite; }
/* Auth-wall banner on the detail hero — coloured callout matching the list
   badge (amber 2FA, red identity) instead of plain red text. */
.hero-error.auth-2fa, .hero-error.auth-identity {
  display: inline-block; margin-top: 14px; padding: 7px 12px; border-radius: 7px;
  font-weight: 500; border: 1px solid;
}
.hero-error.auth-2fa { background: #fdf0d9; color: #8a5606; border-color: #f0d9a8; }
.hero-error.auth-identity { background: #fbe7e7; color: #a01818; border-color: #f0c2c2; }
.tab-checklist { max-width: 760px; }

/* ---- replay per-feature picker: outcome badges + active highlight ---- */
.rp-feat-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 11px; border: 1px solid #e2ded3; border-radius: 7px;
  background: #fff; font-size: 0.8125rem; color: #3a3a40; cursor: pointer;
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
}
.rp-feat-btn:hover { border-color: #c8c5bd; background: #fbf9f3; }
.rp-feat-active { border-color: #2563eb; background: #eef3fd;
                  box-shadow: 0 0 0 1px rgba(37,99,235,0.25); }
.rp-feat-badge {
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 999px; text-transform: lowercase;
}
.rp-feat-badge.fb-done     { background: #dff4e6; color: #0f7a37; }
.rp-feat-badge.fb-2fa      { background: #fdf0d9; color: #a86a08; }
.rp-feat-badge.fb-identity { background: #fbe7e7; color: #b91c1c; }
.rp-feat-badge.fb-failed   { background: #fbe7e7; color: #b91c1c; }
/* Tier-2 screen-verification badges (per feature). */
.rp-feat-badge.vb-verifying { background: #eef3fd; color: #2548b0; }
.rp-feat-badge.vb-verifying::before { content: ""; }
.rp-feat-badge.vb-verified  { background: #dff4e6; color: #0f7a37; }
.rp-feat-badge.vb-failed    { background: #fbe7e7; color: #b91c1c; }
@keyframes vb-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.rp-feat-badge.vb-verifying { animation: vb-pulse 1.2s ease-in-out infinite; }
/* Black stage behind the player so a clip swap fades through black (not the
   previous clip's last frame) while the new first frame decodes. */
.screen-replay-stage { background: #000; border-radius: 8px; }
#screen-video { transition: opacity 140ms ease; }
#screen-video.rp-loading { opacity: 0; }

/* ---- per-feature grouping (flows / detections) + timeline timestamps ---- */
.feat-group { border: 1px solid #ece9e0; border-radius: 8px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.feat-group > summary { cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 10px; list-style: none; font-size: 0.875rem; }
.feat-group > summary::-webkit-details-marker { display: none; }
.feat-group > summary::marker { content: ''; }
.feat-group > summary:hover { background: #faf9f6; }
.feat-group[open] > summary { border-bottom: 1px solid #f0ede4; }
.fg-name { font-weight: 600; color: #2a2a30; }
.fg-meta { margin-left: auto; font-size: 0.72rem; color: #8a8a90; font-family: 'Fragment Mono', monospace; }
.feat-group .event-table { margin: 0; }
.feature-head .feature-when { margin-left: auto; margin-right: 12px; font-size: 0.72rem; color: #8a8a90; font-family: 'Fragment Mono', monospace; }
.det-feat { margin-bottom: 18px; }
.det-feat-name { font-weight: 600; font-size: 0.8125rem; color: #2a2a30; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }

/* client → project breadcrumb on the session detail */
.crumb { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: #2563eb;
  text-transform: none; margin-bottom: 8px; }

/* DBR logo (William's mark) next to PrivacyPath in the header */
.brand-logo { height: 24px; width: auto; display: block; }

/* clickable testSpec rows — full spec opens inline */
.ts-item { list-style: none; }
.ts-item details summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; }
.ts-item details summary::-webkit-details-marker { display: none; }
.ts-item details summary:hover .name { color: #2563eb; }
.ts-summary-text { flex: 1; min-width: 0; }
.ts-toggle { color: #c8c5bd; font-size: 0.875rem; transition: transform 120ms; user-select: none; }
.ts-item details[open] > summary .ts-toggle { transform: rotate(180deg); color: #2563eb; }
.ts-detail { margin: 10px 0 6px 36px; padding: 12px 14px; background: #faf9f6; border: 1px solid #ece9e0; border-radius: 8px; }
.ts-kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 18px; margin-bottom: 10px; }
.ts-kv { display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; }
.ts-kv .ts-k { color: #8a8a90; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.6875rem; }
.ts-kv .ts-v { color: #2a2a30; }
.ts-block { margin-top: 10px; }
.ts-block .ts-k { color: #8a8a90; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.6875rem; margin-bottom: 4px; }
.ts-pre { background: #ffffff; border: 1px solid #ece9e0; border-radius: 6px; padding: 8px 10px;
  font-family: 'Fragment Mono', monospace; font-size: 0.75rem; color: #2a2a30; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word; margin: 0; max-height: 320px; overflow: auto; }

/* shared filter toolbar (sessions / compare / trigger) */
.filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin-bottom: 18px;
  padding: 12px 14px; background: #ffffff; border: 1px solid #ece9e0; border-radius: 10px; }
.filterbar label { display: flex; flex-direction: column; gap: 4px; font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: #8a8a90; }
.filterbar select, .filterbar input[type=date] { font: inherit; font-size: 0.8125rem; padding: 6px 8px;
  border: 1px solid #e3e0e8; border-radius: 6px; background: #fff; color: #2a2a30; min-width: 160px; }
.filterbar select:focus, .filterbar input:focus { outline: none; border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.14); }
.filterbar .flt-clear { margin-left: auto; font-size: 0.75rem; color: #2563eb; }
.filterbar .flt-clear:hover { color: #1d4ed8; }

/* run tab — structured panels instead of just a tail blob */
.run-card .run-section { margin-top: 16px; }
.run-card .run-section .h2 { margin-bottom: 6px; }
.run-card .run-summary { font-size: 0.9375rem; color: #2a2a30; line-height: 1.5;
  padding: 12px 14px; background: #faf9f6; border: 1px solid #ece9e0; border-radius: 8px;
  white-space: pre-wrap; }
.run-card .run-summary.muted { color: #8a8a90; font-style: italic; }
.run-card .run-errors .ts-pre { background: #fdf0f0; border-color: #fde2e2; color: #c0271f; }
.run-card .run-raw { margin-top: 16px; }
.run-card .run-raw > summary { cursor: pointer; font-size: 0.8125rem; color: #5a5a60;
  padding: 6px 0; list-style: none; user-select: none; }
.run-card .run-raw > summary::-webkit-details-marker { display: none; }
.run-card .run-raw > summary::before { content: '▸ '; color: #c8c5bd; }
.run-card .run-raw[open] > summary::before { content: '▾ '; color: #2563eb; }
.run-card .run-raw > summary:hover { color: #2563eb; }

/* Run error banner (claude auth / rate-limit / box adb missing / etc.) */
.run-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-family: 'Fragment Mono', monospace;
  margin: 12px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Agent action "selector hints" rail under the DOM replay (first-M3) */
.agent-actions { margin-top: 12px; border: 1px solid var(--border, #2a2f3a); border-radius: 8px; padding: 10px 12px; }
.agent-actions .ah-title { font-weight: 600; margin-bottom: 6px; }
.agent-actions .ah-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.agent-actions .ah-item { display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.agent-actions .ah-item:hover { background: rgba(127,127,127,0.12); }
.agent-actions .ah-item.ah-active { background: rgba(90,150,255,0.22); }
.agent-actions .ah-step { min-width: 18px; text-align: right; opacity: 0.6; font-variant-numeric: tabular-nums; }
.agent-actions .ah-glyph { width: 14px; text-align: center; }
.agent-actions .ah-target { font-family: ui-monospace, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.agent-actions .ah-reason { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Decoded consent (first-M4) — flows tab */
.consent-rollup { margin: 6px 0 12px; padding: 8px 12px; border-radius: 8px; background: rgba(127,127,127,0.08); font-size: 13px; }
.consent-rollup .optout-warn { color: #e0a030; font-weight: 600; }
.consent-states { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.consent-chip { font-size: 11px; font-family: ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 4px; background: rgba(127,127,127,0.15); }
.cell-consent { white-space: nowrap; }
.consent-badge { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(90,150,255,0.18); cursor: default; }
.consent-badge.consent-optout { background: rgba(224,160,48,0.22); color: #e0a030; }
tr.flow-optout > td { background: rgba(224,160,48,0.07); }
.consent-report-link { margin-left: 10px; font-size: 12px; }
.consent-report-table th, .consent-report-table td { border: 1px solid var(--border,#2a2f3a); padding: 4px 8px; font-size: 12px; }

/* 1st/3rd-party (v3 M2) — flows tab */
.party-rollup { margin: 6px 0 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.party-badge { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.party-first { background: rgba(90,200,120,0.20); color: #4caf6a; }
.party-third { background: rgba(224,140,90,0.20); color: #d9803a; }
.cell-party { white-space: nowrap; }
.third-domains { margin-left: 4px; }
.third-domains > summary { cursor: pointer; font-size: 12px; }
.third-domains[open] { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Detector-error / unprocessed pills on the session list (surface silent fails) */
.pill.det-error { background: rgba(220,70,70,0.18); color: #e05555; }
.pill.det-pending { background: rgba(150,150,150,0.18); color: #999; }
.detector-error-banner { margin: 10px 0; padding: 10px 14px; border-radius: 8px; background: rgba(220,70,70,0.12); border: 1px solid rgba(220,70,70,0.35); color: #e05555; font-size: 13px; }

/* AI privacy review tab (first-M4 LLM triage) */
.review-head { margin-bottom: 14px; }
.review-summary { font-size: 14px; line-height: 1.5; }
.review-finding { margin: 8px 0; padding: 10px 14px; border-radius: 8px; border-left: 3px solid #888; background: rgba(127,127,127,0.06); }
.review-finding.rev-high { border-left-color: #e05555; }
.review-finding.rev-notice { border-left-color: #e0a030; }
.review-finding.rev-info { border-left-color: #5a96ff; }
.review-finding .rf-title { font-weight: 600; }
.review-finding .rf-sev { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(127,127,127,0.18); margin-right: 4px; }
.rev-high .rf-sev { background: rgba(224,85,85,0.2); color: #e05555; }
.rev-notice .rf-sev { background: rgba(224,160,48,0.2); color: #e0a030; }
.review-finding .rf-tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(90,150,255,0.16); color: #5a96ff; margin-left: 6px; }
.review-finding .rf-tag.rf-dim { background: rgba(127,127,127,0.16); color: #999; }
.review-finding .rf-concern { margin-top: 5px; font-size: 13px; line-height: 1.5; }
.review-finding .rf-meta { margin-top: 5px; }

/* Organizations + domains editor (v3 M2) ----------------------------------- */
/* The list rows reuse .data-list/.header-row but override the 9-col session
   grid for the org/domain shapes. .party-badge/.party-first|third are reused
   from the flows tab (above). */
.org-grid    { grid-template-columns: minmax(0,2fr) 96px 84px 84px 24px !important; }
.domain-grid { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 96px !important; }
.project-grid { grid-template-columns: minmax(0,2fr) 110px 24px !important; }
.data-list .row.domain-grid,
.data-list .row.project-grid { cursor: pointer; }

/* Evaluations list filter bar (Organization › Project). */
.eval-filters { display: flex; align-items: end; gap: 16px; margin: 0 0 16px; flex-wrap: wrap; }
.eval-filters .field { margin: 0; min-width: 220px; }
.eval-filters #f-clear { align-self: center; padding-bottom: 8px; }

/* Organizations list search. */
.org-search { margin: 0 0 16px; }
.org-search input { width: 100%; max-width: 520px; padding: 9px 14px; font-size: 0.875rem;
  border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; color: #0a0a0c; }
.org-search input:focus { outline: none; border-color: #2563eb; }
.data-list .row.row-hidden { display: none !important; }
.data-list .row.org-grid .party-badge,
.data-list .row.domain-grid .party-badge { justify-self: start; }

/* The org editor + the domains block stack as two surfaces on the detail page. */
.org-editor { margin-bottom: 20px; }
.org-editor .org-id { font-size: 0.8125rem; color: #5a5a60; }
.org-editor .org-form .field input,
.org-editor .org-form .field select { max-width: 460px; }

/* Alias chips — same visual language as .consent-chip but interactive. */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; min-height: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; padding: 4px 8px 4px 10px; border-radius: 6px;
  background: #f1eee6; color: #2a2a2e; border: 1px solid #e4e0d6;
}
.chip .chip-x {
  cursor: pointer; color: #8a8a90; font-size: 1rem; line-height: 1;
  background: none; border: none; padding: 0;
}
.chip .chip-x:hover { color: #b91c1c; }
.chip-add { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.chip-add input { max-width: 340px; }

/* Domains block: header + add/edit form sit inside one surface. */
.domains-block { overflow: hidden; }
.domains-head { padding: 20px 24px 14px; display: flex; align-items: baseline; gap: 12px; }
.domains-block .empty-inline { padding: 20px 24px; }
.domain-add { border-top: 1px solid #f0ede4; background: #faf8f2; }
.domain-form { display: flex; flex-direction: column; gap: 16px; }
.domain-form .field input, .domain-form .field select { max-width: 460px; }

/* Evaluations (Feature A) -------------------------------------------------- */
/* List + per-session grids reuse .data-list/.header-row with their own cols. */
.eval-grid      { grid-template-columns: minmax(0,2fr) 110px 90px 110px 24px !important; }
.eval-sess-grid { grid-template-columns: minmax(0,2fr) 110px 90px 90px 110px 24px !important; }
.data-list .row.eval-sess-grid .pill.det-high { margin-left: 0; }
.eval-run-card { max-width: 720px; margin-bottom: 24px; }
/* Client picker + plan search above the plan select, narrowing the 30+ plans. */
.eval-run-card .run-pickers { display: flex; gap: 10px; margin-bottom: 10px; }
.eval-run-card .run-pickers #eval-client { flex: 0 0 220px; }
.eval-run-card .run-pickers #eval-plan-search { flex: 1; }
.eval-run-card .plan-detail { margin-top: 12px; font-size: 0.8125rem; color: #5a5a60; }
.eval-run-card .plan-detail ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.eval-run-card .plan-detail .pname { font-weight: 600; color: #0a0a0c; }
.eval-run-card .field select, .eval-run-card .field input { max-width: 460px; }

/* Evaluation Plans (compose → run) ----------------------------------------- */
.evp-grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr) 110px 24px !important; }

/* Session Plans (Feature B) ------------------------------------------------ */
.sp-grid { grid-template-columns: minmax(0,2fr) 120px minmax(0,1fr) 96px !important; }
.data-list .row.sp-grid { cursor: pointer; }
.sp-grid .sp-dup { padding: 4px 10px; font-size: 0.75rem; }
#sp-search { padding: 7px 12px; font-size: 0.8125rem; border: 1px solid #e2e2e2; border-radius: 8px; min-width: 200px; }
.tp-grid { grid-template-columns: minmax(0,2fr) 70px 110px 80px minmax(0,1.2fr) !important; }
.data-list .row.tp-grid { cursor: pointer; }

/* Organizations — client-scoped party + per-client override (Feature C) ---- */
.org-scoped-grid { grid-template-columns: minmax(0,1.6fr) minmax(0,1.4fr) 84px 84px 24px !important; }
.data-list .row.org-scoped-grid .party-badge { justify-self: start; }
.party-override { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.party-override .party-sel { padding: 4px 8px; font-size: 0.8125rem; max-width: 110px; }
.party-override .party-reset { padding: 4px 8px; font-size: 0.75rem; }
.party-override-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px;
  background: rgba(37,99,235,0.12); color: #2548b0; text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 600;
}

/* Expandable network-flow rows (Daniel 2026-06-10): click a row for full
   URL, query params, and request/response headers. */
tr.flow-row { cursor: pointer; }
tr.flow-row:hover { background: rgba(37,99,235,0.04); }
.flow-caret { display: inline-block; transition: transform 0.12s; color: #999; font-size: 10px; }
tr.flow-open .flow-caret { transform: rotate(90deg); color: #2563eb; }
tr.flow-detail-row > td { background: #fafafa; padding: 0; }
.flow-detail { padding: 12px 16px; font-size: 12px; }
.flow-detail.loading { color: #888; }
.fd-url { font-family: var(--font-mono, monospace); word-break: break-all; margin-bottom: 4px; }
.fd-meta { margin-bottom: 10px; }
.fd-block { margin-top: 10px; }
.fd-label { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #555; margin-bottom: 4px; }
table.fd-kv { width: 100%; border-collapse: collapse; }
table.fd-kv th { text-align: left; vertical-align: top; padding: 2px 10px 2px 0; color: #2563eb; font-weight: 500; white-space: nowrap; font-family: var(--font-mono, monospace); font-size: 11px; }
table.fd-kv td { padding: 2px 0; word-break: break-all; font-family: var(--font-mono, monospace); font-size: 11px; color: #333; }

/* Assisted-capture console (Daniel 2026-06-10): live DOM replay + Claude-Code
   style side column. Two-pane; the operator drives the real browser on the box. */
.manual-console { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 18px; align-items: start; }
.mc-replay { background: #161616; border: 1px solid #222; border-radius: 12px; padding: 12px; }
.mc-replay-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #eee; }
.mc-player { min-height: 540px; background: #0a0a0a; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mc-dot { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,.5); animation: mc-pulse 1.4s infinite; }
.mc-dot.off { background: #16a34a; animation: none; }
@keyframes mc-pulse { 0%{box-shadow:0 0 0 0 rgba(220,38,38,.5)} 70%{box-shadow:0 0 0 7px rgba(220,38,38,0)} 100%{box-shadow:0 0 0 0 rgba(220,38,38,0)} }
.mc-side { background: #fff; border: 1px solid #e2e2e2; border-radius: 12px; padding: 16px; position: sticky; top: 16px; }
.mc-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mc-current { background: #eef4ff; border-left: 3px solid #2563eb; border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; }
.mc-cur-name { font-weight: 600; }
.mc-cur-url { word-break: break-all; margin-top: 2px; }
.mc-specs-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #888; margin-bottom: 6px; }
ol.mc-specs { list-style: none; padding: 0; margin: 0 0 14px; max-height: 320px; overflow: auto; }
.mc-spec { padding: 5px 4px; font-size: 13px; color: #555; display: flex; gap: 8px; border-radius: 5px; }
.mc-spec .mc-mark { color: #bbb; width: 12px; }
.mc-spec.cur { background: #eef4ff; color: #2d1a66; font-weight: 600; }
.mc-spec.cur .mc-mark { color: #2563eb; }
.mc-spec.done { color: #999; }
.mc-spec.done .mc-mark { color: #16a34a; }
.mc-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; font-size: 12px; color: #555; }
.mc-stat b { color: #111; }
.mc-controls { display: flex; gap: 8px; }
.mc-controls button { flex: 1; }
.mc-open { display: block; margin-top: 12px; color: #2563eb; font-weight: 600; text-decoration: none; }
.vbadge-live { background: rgba(220,38,38,.1); color: #b91c1c; }
.vbadge-ok { background: rgba(22,163,74,.12); color: #15803d; }
/* Save-login panel — snapshot a hand-done SSO login for agent reuse */
.mc-save { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border, #e8e5dc); }
.mc-save-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted, #6b7280); margin-bottom: 4px; }
.mc-save-row { display: flex; gap: 8px; margin-top: 8px; align-items: stretch; }
.compact-input { flex: 1; min-width: 0; background: var(--card, #fff); border: 1px solid var(--border, #e8e5dc); border-radius: 8px; padding: 8px 11px; font: inherit; font-size: 0.8125rem; color: var(--ink, #111); box-shadow: var(--shadow-sm); }
.compact-input:focus { outline: none; border-color: var(--accent, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.mc-save-row button { flex: 0 0 auto; white-space: nowrap; }
.mc-save-result { margin-top: 8px; min-height: 1em; }
.mc-save-result.ok { color: #15803d; }
.mc-save-result.err { color: #b91c1c; }

/* Client-facing PrivacyPath view (v3 M4) — friendly, read-only privacy report. */
.client-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.client-brand { font-weight: 700; letter-spacing: -0.5px; color: #2563eb; font-size: 15px; }
.client-controls { display: flex; gap: 16px; align-items: flex-end; }
.cv-proj { display: flex; flex-direction: column; gap: 3px; }
.cv-account { align-self: center; }
.linklike { border: 0; background: 0; padding: 0; color: #2563eb; font: inherit; cursor: pointer; text-decoration: underline; }
/* Client sign-in gate */
.cv-login { max-width: 360px; margin: 8vh auto 0; }
.cv-login .h1 { margin: 6px 0 4px; }
.cv-login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.cv-login-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #555; }
.cv-login-form input { padding: 10px 12px; border: 1px solid #d8d8d8; border-radius: 8px; font-size: 14px; }
.cv-login-form button { padding: 10px 16px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.cv-login-form button:disabled { opacity: 0.6; cursor: default; }
.cv-login-err { color: #dc2626; font-size: 13px; min-height: 16px; }
.cv-lens, .cv-group { display: inline-flex; border: 1px solid #e2e2e2; border-radius: 8px; overflow: hidden; }
.cv-lens button, .cv-group button { border: 0; background: #fff; padding: 8px 16px; font-size: 13px; font-weight: 600; color: #666; cursor: pointer; }
.cv-lens button.on, .cv-group button.on { background: #2563eb; color: #fff; }
.cv-group button { padding: 8px 13px; }
/* per-row severity chip — shown when the grouping axis isn't severity */
.cv-sevchip { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-right: 7px; white-space: nowrap; }
.cv-sevchip.sev-high { background: #fee2e2; color: #b91c1c; }
.cv-sevchip.sev-notice { background: #fef3c7; color: #92600a; }
.cv-sevchip.sev-info { background: #e0edff; color: #1d4ed8; }
.cv-sevchip.sev-none { background: #eee; color: #666; }
.cv-reid { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 7px; white-space: nowrap; background: #4c1d95; color: #fff; letter-spacing: .2px; }
/* recipient legal class */
.cv-vendor { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }
.cv-vendor-saleShare { background: #fee2e2; color: #b91c1c; }
.cv-vendor-serviceProvider { background: #dcfce7; color: #15803d; }
.cv-vendor-analytics { background: #fef3c7; color: #92600a; }
.cv-vendor-infrastructure { background: #e0edff; color: #1d4ed8; }
.cv-vendor-unclassified { background: #eef2f7; color: #64748b; }
.cv-vendors { margin: -10px 0 18px; }
.cv-lens-note { margin-bottom: 14px; }
.cv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.cv-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 18px 20px; }
.cv-card-hp { border-left: 3px solid #dc2626; }
.cv-card-unc { border-left: 3px solid #d4a017; }
.cv-card-click { cursor: pointer; text-align: left; font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.cv-card-click:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.cv-sub { margin-top: 3px; }
.cv-verdict { background: #eef4ff; border-left: 3px solid #2563eb; border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; font-size: 0.95rem; line-height: 1.55; color: #1f2937; }
.cv-verdict b { color: #1d4ed8; }
/* The GPC opt-out-leak alert — the sharpest finding, sits above the verdict. */
.cv-verdict-alert { margin: 0 0 12px; padding: 12px 16px; border-radius: 8px;
  background: rgba(220,70,70,0.10); border: 1px solid rgba(220,70,70,0.35);
  color: #b3261e; font-size: 14px; line-height: 1.5; }
.cv-legend { margin: -8px 0 20px; font-size: 0.8125rem; }
.cv-legend > summary { cursor: pointer; color: #6b7280; padding: 4px 0; }
.cv-legend-body { display: flex; flex-direction: column; gap: 7px; padding: 8px 0 4px; }
.cv-legend-row { display: flex; align-items: baseline; gap: 10px; }
.cv-legend-def { color: #4b5563; }
.cv-status-pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; vertical-align: middle; letter-spacing: 0.3px; }
.cv-status-final { background: #dcfce7; color: #15803d; }
.cv-status-draft { background: #fef3c7; color: #92600a; }
.cv-num { font-size: 30px; font-weight: 700; color: #2563eb; line-height: 1; }
.cv-card-hp .cv-num { color: #dc2626; }
.cv-lbl { font-size: 12px; color: #888; margin-top: 6px; }
.cv-bucket { margin-bottom: 24px; }
.cv-bucket-head { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cv-sev-dot { width: 10px; height: 10px; border-radius: 50%; background: #999; }
.sev-high .cv-sev-dot { background: #dc2626; }
.sev-notice .cv-sev-dot { background: #d97706; }
.sev-info .cv-sev-dot { background: #2563eb; }
.cv-rows { display: flex; flex-direction: column; gap: 8px; }
.cv-row { background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 12px 14px; }
.sev-high .cv-row { border-left: 3px solid #dc2626; }
.sev-notice .cv-row { border-left: 3px solid #d97706; }
.cv-row-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cv-item { font-weight: 600; }
.cv-to { color: #555; }
.cv-count { color: #999; font-size: 12px; margin-left: auto; }
.cv-rec { font-size: 13px; color: #333; margin-top: 6px; }
.cv-rec-empty { color: #aaa; font-style: italic; }
.cv-hosts { margin-top: 6px; }
.cv-hosts code { background: #f3f3f3; padding: 1px 5px; border-radius: 4px; font-size: 11px; margin-right: 4px; }

/* Recommendation editor (detection-type → recommendation; William authors). */
.rec-group { margin-bottom: 22px; }
.rec-group-head { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rec-row { background: #fff; border: 1px solid #ececec; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.sev-high .rec-row { border-left: 3px solid #dc2626; }
.sev-notice .rec-row { border-left: 3px solid #d97706; }
.sev-info .rec-row { border-left: 3px solid #2563eb; }
.rec-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.rec-name { font-weight: 600; }
.rec-id { background: #f3f3f3; padding: 1px 6px; border-radius: 4px; font-size: 11px; color: #777; }
.rec-text { width: 100%; box-sizing: border-box; border: 1px solid #e2e2e2; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; resize: vertical; }
.rec-text:focus { border-color: #2563eb; outline: none; }
.rec-status { font-size: 12px; margin-left: auto; }
.rec-status.saving { color: #999; }
.rec-status.ok { color: #16a34a; }
.rec-status.err { color: #dc2626; }

/* ===== polish pass (2026-06-10) ========================================== */
/* Design tokens — formalise the palette the app already uses by fallback, so
   new surfaces stay consistent and the whole thing is themeable in one place. */
:root {
  --ground: #f7f5f0;
  --card: #ffffff;
  --border: #e8e5dc;          /* warm hairline — the canonical border */
  --border-strong: #ddd9cd;
  --ink: #1a1a1c;
  --ink-soft: #4a4a50;
  --muted: #8a8a90;
  /* PrivacyPath accent = BLUE. Purple (#5e17eb) is the MinusOneDB brand and is
     intentionally NOT used on PrivacyPath surfaces. */
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-wash: #eef4ff;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(20,18,12,0.04);
  --shadow: 0 2px 10px rgba(20,18,12,0.05), 0 1px 2px rgba(20,18,12,0.04);
  --shadow-card: 0 1px 3px rgba(20,18,12,0.05);
  --font-mono: 'Fragment Mono', 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --sev-high: #dc2626;
  --sev-notice: #d97706;
  --sev-info: #2563eb;
}

/* Form fields — the missing `.fld` component (assisted launch, upload, client
   picker all used it unstyled). Label above a clean control, editorial spacing. */
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.fld > span { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.fld > span .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.fld select, .fld input[type="text"], .fld input:not([type]), .fld input[type="file"], .fld textarea {
  width: 100%; box-sizing: border-box; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px;
  font: inherit; font-size: 0.875rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.fld select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.fld :focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.fld input[type="file"] { padding: 7px 10px; font-size: 0.8125rem; color: var(--ink-soft); }

/* Consistency: pull the surfaces built today onto the canonical border + card
   shadow so they sit in the same material as the rest of the app. */
.mc-side, .cv-card, .cv-row, .rec-row, tr.flow-detail-row > td { border-color: var(--border) !important; }
.cv-card, .cv-row, .rec-row { box-shadow: var(--shadow-card); }
.cv-card { border-radius: var(--radius-lg); }
.card { box-shadow: var(--shadow-card); }
.cv-lens, .fld select, .fld input { box-shadow: var(--shadow-sm); }

/* Buttons: gentle press + transition so the UI feels responsive. */
.btn-primary, .btn-secondary { transition: transform .04s ease, box-shadow .15s, background .15s, border-color .15s; }
.btn-primary:active, .btn-secondary:active { transform: translateY(1px); }

/* ===== polish pass 2 — client view + micro-interactions =================== */
/* Data-types collected (layer-1 "what data") chip row */
.cv-datatypes { margin: -8px 0 24px; }
.cv-dt-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.cv-dt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-dt-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 0.8125rem; color: var(--ink-soft); box-shadow: var(--shadow-sm); cursor: pointer; font-family: inherit; }
.cv-dt-chip:hover { border-color: var(--accent); }
/* search + filter chips */
.cv-filter { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
#cv-search { width: 100%; max-width: 480px; padding: 9px 13px; border: 1px solid var(--border); border-radius: 9px; font-size: 0.875rem; }
.cv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 0; }
.cv-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-wash); color: var(--accent); border-radius: 999px; padding: 3px 6px 3px 11px; font-size: 0.8125rem; font-weight: 600; }
.cv-chip-x { border: 0; background: 0; color: inherit; cursor: pointer; font-size: 0.8125rem; line-height: 1; padding: 0 2px; }
.cv-chip-clear { font-size: 0.8125rem; }
.cv-urls { margin-top: 4px; font-size: 0.8125rem; }
.cv-urls a { color: var(--accent); }
/* DOM-replay add-on */
.cv-replay { margin-top: 24px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 16px; background: var(--card); }
.cv-replay > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.cv-replay-body { padding: 8px 0 12px; }
.cv-replay-sess { margin-bottom: 12px; }
.cv-replay-sess-h { margin-bottom: 5px; }
.cv-replay-feats { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-replay-feats button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 0.8125rem; cursor: pointer; font-family: inherit; }
.cv-replay-feats button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.cv-replay-player { margin-top: 12px; }
.cv-replay-ref { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--accent); background: #f6f8ff; border-radius: 0 8px 8px 0; font-size: 0.875rem; line-height: 1.5; white-space: pre-wrap; }
.cv-replay-ref-h { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 4px; }
.cv-dt-n { background: var(--accent-wash); color: var(--accent); border-radius: 999px; padding: 1px 8px; font-size: 0.6875rem; font-weight: 600; }

/* Severity visual hierarchy — High dominates, Info recedes */
.cv-bucket.sev-high .cv-bucket-head { font-size: 1.0625rem; }
.cv-bucket.sev-info .cv-bucket-head { color: var(--muted); }
.cv-bucket.sev-info .cv-row { opacity: 0.92; }

/* Micro-interactions: rows lift on hover, everything transitions smoothly */
.cv-row, .rec-row, .cv-dt-chip { transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
.cv-row:hover, .rec-row:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.cv-card { transition: transform .12s ease, box-shadow .15s ease; }
.cv-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.nav a, .cv-lens button, .vbadge { transition: color .15s, background .15s, border-color .15s; }

/* Loading: a gentle pulse instead of static text */
.loading { animation: dbr-pulse 1.3s ease-in-out infinite; }
@keyframes dbr-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Recommendation autosave indicator — fade in */
.rec-status.ok, .rec-status.saving, .rec-status.err { animation: dbr-fade .2s ease; }
@keyframes dbr-fade { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }

/* Header project picker — match the .fld control look */
.cv-proj select { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 7px 30px 7px 11px; font: inherit; font-size: 0.8125rem; color: var(--ink); cursor: pointer; appearance: none; -webkit-appearance: none; box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.cv-proj select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

/* ===== dogfood fix — global form controls ================================ */
/* Every older view used bare native selects/date inputs (evaluations, compare,
   organizations, sessions), inconsistent with the new .fld forms. Style ALL form
   controls app-wide to the token system in one place. More-specific rules
   (.fld, .cv-proj, .rec-text) still win where they add chevrons/sizing. */
select, input[type="text"], input[type="search"], input[type="date"],
input[type="number"], input[type="email"], input[type="password"] {
  font: inherit; font-size: 0.8125rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 11px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8a90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
