/* ═══════════════════════════════════════════════════════════════
   QAVA — InfoBeans Technologies Design System
   Matches infobeans.ai: Lexend · #ea1b3d · #373742 · 2px radius
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* InfoBeans exact brand colors */
  --ib-red:         #ea1b3d;
  --ib-red-dark:    #c4162f;
  --ib-red-soft:    #ffd0d8;
  --ib-red-text:    #d61433;      /* brand red for TEXT on light surfaces: 5.2:1 on white (#ea1b3d is 4.45:1) */
  --ib-red-bg:      #fff0f3;
  --ib-charcoal:    #2f2f39;
  --ib-text:        #373742;
  --ib-text-2:      #676775;
  --ib-cream:       #fff9ed;
  --ib-cream-2:     #fff7ed;

  /* Neutrals */
  --border:         #ebe1d1;
  --border-soft:    #f0f0f5;
  --white:          #ffffff;
  --gray-bg:        #f8f8fc;

  /* Semantic */
  --impact:         #7c1fa8;
  --impact-soft:    #f0e8fa;
  --green:          #15803d;
  --green-soft:     #dcfce7;
  --amber:          #b45309;
  --amber-soft:     #fef3c7;
  /* Failure/danger is a semantic signal, not a brand accent — stays red in
     every theme (including opkey's teal), unlike --ib-red which brand
     variants remap. Never overridden inside a [data-brand="..."] block. */
  --danger:         #dc2626;
  --danger-bg:      #fee2e2;

  /* Provider dots */
  --claude-color:      #d97706;
  --openai-color:      #10a37f;
  --groq-color:        #f55036;
  --openrouter-color:  #7c3aed;
  --gemini-color:      #1a73e8;
  --cerebras-color:    #00b388;
  --togetherai-color:  #6366f1;
  --oci-color:         #c74634;

  /* Layout */
  --sidebar-w:      228px;
  --radius:         2px;          /* InfoBeans uses near-flat 2px radius */
  --radius-md:      6px;          /* for inputs/pills */
  --radius-lg:      10px;         /* for drop zones */
  --shadow-card:    0 15px 35px rgba(0,0,0,0.07);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
  --shadow-stat:    8px 8px 0 var(--ib-red-soft);  /* stats boxes only */
  --font-family:    'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:      'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Stage 1 UI transformation (2026-11-05): typography scale ──────────
     --ib-red itself stays the literal InfoBeans brand hex (used for borders,
     accents, non-text surfaces). --ib-action is the AA-safe variant for any
     surface that carries WHITE TEXT (buttons, solid badges) — fixes the
     previously-flagged 4.45:1 white-on-#ea1b3d gap (needs 4.5) without
     changing the brand color itself. New work should use --ib-action for
     button/badge backgrounds; existing scattered button definitions migrate
     in later stages, not retrofitted wholesale here. */
  --ib-action:      var(--ib-red-dark);   /* #c4162f — 6.0:1 with white */
  --ib-action-hover:#a81228;

  --text-xs:   11px; --text-xs-lh:   1.45;
  --text-sm:   12.5px; --text-sm-lh: 1.5;
  --text-base: 14px; --text-base-lh: 1.55;
  --text-md:   16px; --text-md-lh:   1.4;
  --text-lg:   19px; --text-lg-lh:   1.3;
  --text-xl:   24px; --text-xl-lh:   1.2;
  --text-2xl:  30px; --text-2xl-lh:  1.15;

  /* Spacing — 4/8px grid (docs/architecture/automation-studio/01-panel-report.md) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;

  --row-h-dense: 36px;   /* enterprise-dense table rows */
  --row-h: 44px;         /* default table rows */
}

/* ═══════════════════════════════════════════════════════════════
   Stage 1 shared components (2026-11-05) — new canonical button,
   badge and dense-table primitives for the Automation Studio redesign.
   Used by Flow Builder + Execution Centre first; other screens adopt
   these in later stages rather than being retrofitted here.
   ═══════════════════════════════════════════════════════════════ */

.ib-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-family); font-size: var(--text-sm); font-weight: 600;
  line-height: 1; padding: var(--space-2) var(--space-4); height: 34px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
}
.ib-btn:disabled { opacity: .5; cursor: not-allowed; }
.ib-btn-sm { height: 28px; padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.ib-btn-primary { background: var(--ib-action); color: #fff; }
.ib-btn-primary:hover:not(:disabled) { background: var(--ib-action-hover); }
.ib-btn-secondary { background: var(--white); color: var(--ib-text); border-color: var(--border); }
.ib-btn-secondary:hover:not(:disabled) { background: var(--gray-bg); }
.ib-btn-ghost { background: transparent; color: var(--ib-text-2); }
.ib-btn-ghost:hover:not(:disabled) { background: var(--gray-bg); color: var(--ib-text); }
.ib-btn-danger { background: var(--danger); color: #fff; }
.ib-btn-danger:hover:not(:disabled) { background: #b91c1c; }
.ib-btn:focus-visible { outline: 2px solid var(--ib-action); outline-offset: 2px; }

.ib-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 600; line-height: 1;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.ib-badge-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.ib-badge-success { background: var(--green-soft); color: var(--green); }
.ib-badge-success .ib-badge-dot { background: var(--green); }
.ib-badge-danger  { background: var(--danger-bg); color: var(--danger); }
.ib-badge-danger .ib-badge-dot { background: var(--danger); }
.ib-badge-warn    { background: var(--amber-soft); color: var(--amber); }
.ib-badge-warn .ib-badge-dot { background: var(--amber); }
.ib-badge-neutral { background: var(--border-soft); color: var(--ib-text-2); }
.ib-badge-neutral .ib-badge-dot { background: var(--ib-text-2); }
.ib-badge-info    { background: var(--impact-soft); color: var(--impact); }
.ib-badge-info .ib-badge-dot { background: var(--impact); }

.ib-table-dense { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.ib-table-dense th {
  text-align: left; font-size: var(--text-xs); font-weight: 600; color: var(--ib-text-2);
  text-transform: uppercase; letter-spacing: .04em; padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white);
}
.ib-table-dense td { padding: 0 var(--space-3); height: var(--row-h-dense); border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.ib-table-dense tbody tr:hover { background: var(--gray-bg); }
.ib-table-dense tbody tr.clickable { cursor: pointer; }

/* ── Oracle Release Assurance workspace ────────────────────────────────
   Shared production treatment for Release Command Centre, Business
   Process Coverage and Automation Operations. The data contracts stay
   independent; this layer connects the user journey and visual language. */
.assurance-page {
  --assurance-ink: #292832;
  --assurance-muted: #676775;
  --assurance-line: #e2ded6;
  --assurance-canvas: #faf8f3;
  --assurance-soft: #f3f0e9;
  max-width: 1480px;
}

.assurance-page .page-header {
  align-items: flex-end;
  margin-bottom: 22px;
  padding-top: 4px;
}

.assurance-page .page-title {
  color: var(--assurance-ink);
  font-size: clamp(25px, 2.2vw, 34px);
  letter-spacing: -.035em;
  line-height: 1.12;
  max-width: 900px;
}

.assurance-page .page-subtitle {
  color: var(--assurance-muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 820px;
}

.assurance-page .page-eyebrow {
  color: var(--ib-red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

/* The release assurance journey bar is rendered by QavaUI.renderBreadcrumb
   (ui-kit.js, 'steps' variant) and styled once, by the .qv-steps rules further
   down. The two bespoke .assurance-journey blocks that used to live here and
   near the end of this file had drifted apart and were removed in navigation
   Stage D; .assurance-journey remains only as a hook class on that <nav>. */

.assurance-page .card {
  border-color: var(--assurance-line);
  box-shadow: 0 1px 2px rgba(41,40,50,.035);
}

.assurance-decision-card {
  border-left: 3px solid var(--ib-red) !important;
  padding: 22px !important;
}

.assurance-context-strip {
  border-top: 0 !important;
  padding: 16px 20px !important;
}

.assurance-section-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--assurance-line);
  display: flex;
  gap: 12px;
  margin: -2px 0 16px;
  padding-bottom: 14px;
}
.assurance-section-heading .card-title { margin: 0; }
.assurance-section-heading p {
  color: var(--assurance-muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 4px 0 0;
}
.assurance-section-index {
  color: var(--ib-red-text); /* red text on white/cream needs the darker token (AA) */
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  padding-top: 2px;
}

.assurance-metrics .stat-card {
  border-color: var(--assurance-line);
  box-shadow: none;
  min-height: 90px;
  padding: 17px 18px;
}
.assurance-metrics .stat-value { font-size: 25px; letter-spacing: -.04em; }
.assurance-metrics .stat-label { line-height: 1.35; }

.assurance-honesty-note {
  background: #fff9ed;
  border: 1px solid #eadfca;
  border-left: 3px solid #b7791f;
  border-radius: 3px;
  color: var(--assurance-muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 14px;
  padding: 11px 14px;
}
.assurance-honesty-note strong { color: var(--assurance-ink); margin-right: 4px; }

.assurance-next-action {
  align-items: center;
  background: var(--assurance-ink);
  border-radius: 4px;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 16px 18px;
}
.assurance-next-action strong { display: block; font-size: 14px; }
.assurance-next-action span { color: #c9c7d2; display: block; font-size: 11px; margin-top: 3px; }
.assurance-next-actions { display: flex; flex-shrink: 0; gap: 8px; }
.assurance-next-action .btn-outline { background: transparent; border-color: #777482; color: #fff; }
.assurance-next-action .btn-outline:hover { background: #3b3945; }

.assurance-page table thead th {
  background: var(--assurance-soft);
  color: var(--assurance-muted);
  font-size: 10px;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.assurance-page table tbody tr:hover { background: #fff9ed; }
.assurance-page .platform-type-tabs,
.assurance-page .input-toggle {
  background: var(--assurance-soft);
  border: 1px solid var(--assurance-line);
  border-radius: 4px;
  padding: 3px;
}
.assurance-page .platform-type-tab,
.assurance-page .toggle-btn { border-radius: 2px; }
.assurance-page .platform-type-tab.active,
.assurance-page .toggle-btn.active {
  background: var(--assurance-ink);
  color: #fff;
}

/* ── Automation Operations: environment readiness, evidence distribution, ──
   ── suite inspector (Packet UX-1 Part 2, Packet A) ──────────────────────── */
.assurance-blocker-item {
  align-items: flex-start;
  border-left: 3px solid #b7791f;
  background: #fff9ed;
  border-radius: 3px;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 14px;
}
.assurance-blocker-item:last-child { margin-bottom: 0; }
.assurance-blocker-item strong { color: var(--assurance-ink); display: block; font-size: 13px; }
.assurance-blocker-item span { color: var(--assurance-muted); font-size: 12px; line-height: 1.4; }
.assurance-ok-item {
  align-items: center;
  border-left: 3px solid #16a34a;
  background: #f0fdf4;
  border-radius: 3px;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 14px;
}
.assurance-ok-item:last-child { margin-bottom: 0; }
.assurance-ok-item strong { color: var(--assurance-ink); font-size: 13px; }
.assurance-ok-item span { color: var(--assurance-muted); font-size: 12px; margin-left: 6px; }

.assurance-evidence-dist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.assurance-evidence-chip {
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
}

.assurance-failure-group { border: 1px solid var(--assurance-line); border-radius: 4px; margin-bottom: 10px; overflow: hidden; }
.assurance-failure-group:last-child { margin-bottom: 0; }
.assurance-failure-group-head {
  align-items: center;
  background: var(--assurance-soft);
  display: flex;
  font-size: 12.5px;
  font-weight: 700;
  justify-content: space-between;
  padding: 9px 14px;
}
.assurance-failure-group-body { padding: 4px 14px 10px; }
.assurance-failure-row { border-top: 1px solid var(--assurance-line); font-size: 12px; padding: 8px 0; }
.assurance-failure-row:first-child { border-top: 0; }

/* Test Case Detail overlay reuses the shared inspector-panel chrome but
   needs more room for the recorder-style step grid below — scoped to this
   one overlay so the suite operations inspector and other panels sharing
   .assurance-inspector-panel are unaffected. */
#automation-tc-detail-overlay .assurance-inspector-panel { max-width: 960px; }

/* Recorder-style step display for the Test Case Detail overlay — deliberately
   mirrors fusion_test_studio/static/recorder-review.css's own
   .review-summary/.step-head/.step-row layout (that tool's real recorded-flow
   review screen) rather than a plain data table, so a test case here reads
   the same way a genuinely recorded/reviewed case does in Fusion Test Studio.
   Scoped under tc-recorder- so it never collides with the unrelated, already-
   used .tc-steps-table/.tc-modal-body classes elsewhere in this file. */
.tc-recorder-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 16px; }
.tc-recorder-summary article { border: 1px solid var(--ib-border); border-radius: 4px; padding: 12px 14px; background: var(--white); }
.tc-recorder-summary b { display: block; font-size: 20px; color: var(--ib-charcoal); }
.tc-recorder-summary span { font-size: 11px; color: var(--ib-text-2); letter-spacing: .02em; }
.tc-recorder-steps { border: 1px solid var(--ib-border); border-radius: 4px; overflow: hidden; }
.tc-recorder-head, .tc-recorder-row {
  display: grid; grid-template-columns: 42px 2.2fr 1.3fr 1fr 1.2fr;
  gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--ib-border);
}
.tc-recorder-head { background: var(--ib-charcoal); color: var(--white); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tc-recorder-row { font-size: 12px; background: var(--white); }
.tc-recorder-row:last-child { border-bottom: 0; }
.tc-recorder-row:hover { background: var(--gray-bg); }
.tc-recorder-step-no { color: var(--ib-red); font-weight: 700; font-size: 13px; }
.tc-recorder-row b { display: block; font-size: 13px; color: var(--ib-text); font-weight: 600; }
.tc-recorder-row small { display: block; margin-top: 4px; color: var(--ib-text-2); font-size: 11px; }
.tc-recorder-locator { font-family: monospace; font-size: 11px; color: var(--ib-text-2); word-break: break-all; }
.tc-recorder-value { font-family: monospace; font-size: 11px; color: #15803d; white-space: pre-wrap; word-break: break-word; }
.tc-recorder-expected { color: var(--ib-text-2); font-size: 12px; }
.tc-recorder-demo-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .04em; color: var(--ib-red);
  border: 1px solid var(--ib-red); border-radius: 2px; padding: 1px 4px; margin-left: 6px;
}
@media (max-width: 900px) {
  #automation-tc-detail-body { overflow-x: auto; }
  .tc-recorder-head, .tc-recorder-row { min-width: 820px; }
}

.assurance-inspector-panel {
  background: #fff;
  border-radius: 5px;
  bottom: 0;
  box-shadow: -12px 0 40px rgba(30,29,36,.18);
  display: flex;
  flex-direction: column;
  max-width: 640px;
  position: fixed;
  right: 0;
  top: 0;
  width: calc(100% - 60px);
}
.assurance-inspector-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--assurance-line);
  display: flex;
  justify-content: space-between;
  padding: 20px 20px 14px;
}
.assurance-inspector-eyebrow { color: var(--assurance-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.assurance-inspector-header strong { display: block; font-size: 17px; margin-top: 3px; }
.assurance-inspector-close { background: transparent; border: 0; color: var(--assurance-muted); cursor: pointer; font-size: 22px; line-height: 1; padding: 4px; }
.assurance-inspector-close:hover { color: var(--assurance-ink); }
.assurance-inspector-body { overflow-y: auto; padding: 18px 20px 28px; }
.assurance-inspector-panel .input-toggle {
  background: var(--assurance-soft, #fdf8f0);
  border: 1px solid var(--assurance-line, #ebe1d1);
  border-radius: 4px;
  padding: 3px;
}
.assurance-inspector-panel .toggle-btn { border-radius: 2px; }
.assurance-inspector-panel .toggle-btn.active { background: var(--assurance-ink, #2f2f39); color: #fff; }
.assurance-inspector-empty { color: var(--assurance-muted); font-size: 13px; padding: 20px 0; text-align: center; }

.assurance-trend-bars { align-items: flex-end; display: flex; gap: 6px; height: 120px; margin-top: 10px; }
.assurance-trend-bar { background: var(--ib-red); border-radius: 2px 2px 0 0; flex: 1; min-width: 8px; position: relative; }
.assurance-trend-bar.is-zero { background: #f3d2da; }

.assurance-suite-group { margin-bottom: 6px; }
.assurance-suite-group-label {
  color: var(--assurance-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  padding: 10px 8px 4px;
  text-transform: uppercase;
}

.assurance-inspector-fields { display: flex; flex-direction: column; }
.assurance-inspector-field {
  align-items: center;
  border-top: 1px solid var(--assurance-line);
  display: flex;
  font-size: 12.5px;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.assurance-inspector-field:first-child { border-top: 0; }
.assurance-inspector-field span { color: var(--assurance-muted); }
.assurance-inspector-field strong { color: var(--assurance-ink); font-weight: 600; text-align: right; }

@media (max-width: 640px) {
  .assurance-inspector-panel { max-width: none; width: 100%; }
}

@media (max-width: 1060px) {
  .assurance-page { padding-left: 22px; padding-right: 22px; }
  .assurance-page .page-title { font-size: 27px; }
}

@media (max-width: 680px) {
  .assurance-page { padding-left: 14px; padding-right: 14px; }
  .assurance-decision-card { padding: 16px !important; }
  .assurance-next-action { align-items: stretch; flex-direction: column; }
  .assurance-next-actions { flex-direction: column; }
}

/* ── Opkey-inspired variant (Phase 8) ──────────────────────────────────────
   Applied only when document.documentElement carries data-brand="opkey" —
   set client-side by _applyThemeVariant() in portal.js, driven by the
   logged-in user's theme_variant field (demo2@infobeans.com only; every
   other account defaults to "" and stays fully InfoBeans). Same component
   classes throughout the app (.pd-stat-tile, .pd-pill, .pd-feature-tile,
   .data-table, ...) — only the token values change, never structure. The
   InfoBeans block above is untouched. */
:root[data-brand="opkey"] {
  --ib-red:         #3B9C96;
  --ib-red-dark:    #2C7A75;
  --ib-red-soft:    #CFEEEA;
  --ib-red-bg:      #EAF7F5;
  --ib-charcoal:    #1F3634;
  --ib-text:        #23383A;
  --ib-text-2:      #5F7A7C;
  --border:         #DCEDEB;
  --border-soft:    #EEF7F6;
  --gray-bg:        #EAF5F4;
  --impact:         #2E7D74;
  --impact-soft:    #E2F3F0;
  --radius:         10px;
  --radius-md:      999px;        /* Opkey's pill-shaped inputs/buttons */
  --radius-lg:      16px;
  --shadow-stat:    0 8px 24px rgba(59,156,150,0.15);  /* soft, not InfoBeans' hard offset */
  --font-family:    -apple-system, BlinkMacSystemFont, ui-rounded, 'SF Pro Rounded', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 300;
  color: var(--ib-text);
  background: linear-gradient(180deg, var(--ib-cream-2) 0%, #ffffff 40%) fixed;
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════
   SIDEBAR — charcoal (#2f2f39)
══════════════════════════════════════ */

.sidebar {
  width: var(--sidebar-w);
  background: var(--ib-charcoal);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* Automation Studio renders its own full-height left nav rail (.st-rail,
   studio.css) — showing the global sidebar alongside it doubled up on the
   same "vertical nav" idea, so collapse the global one for this one page. */
body.studio-fullwidth { --sidebar-w: 0px; }
body.studio-fullwidth .sidebar { display: none; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 18px 18px;
}
.sidebar-brand { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name    { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-sub     { color: rgba(255,255,255,0.4); font-size: 11px; font-weight: 300; }

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 18px;
}

.sidebar-section-label {
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 14px 18px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  transition: color 0.15s, background 0.15s;
  margin: 1px 0;
}
.nav-item:hover  { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.05); }
.nav-item.active { color: #fff; border-left-color: var(--ib-red); background: rgba(234,27,61,0.1); font-weight: 500; }
.nav-item svg    { flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }

/* ── Mode Switcher ──────────────────────────────────── */
.mode-switcher {
  display: flex;
  margin: 10px 12px 4px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.mode-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.45);
  background: transparent;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: center;
  display: block;
}
.mode-btn.active {
  background: var(--ib-red);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-version { color: rgba(255,255,255,0.25); font-size: 11px; font-weight: 300; }
.sidebar-copy    { color: rgba(255,255,255,0.18); font-size: 10px; margin-top: 3px; font-weight: 300; }

/* ══════════════════════════════════════
   MAIN
══════════════════════════════════════ */

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 36px 40px;
  max-width: 1280px;
}

/* ══════════════════════════════════════
   PAGES
══════════════════════════════════════ */

.page        { display: block; }
.page.hidden { display: none; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ib-red);
  margin-bottom: 6px;
}
.page-title    { font-size: 28px; font-weight: 400; color: var(--ib-text); letter-spacing: -0.02em; line-height: 1.1; }
.page-subtitle { color: var(--ib-text-2); font-size: 14px; margin-top: 8px; max-width: 780px; font-weight: 300; line-height: 1.6; }

.header-badge {
  background: var(--white);
  color: var(--ib-text);
  border: 1.5px solid var(--border);
  padding: 7px 18px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.impact-badge { border-color: var(--impact); color: var(--impact); }
.risk-high    { border-color: var(--ib-red); color: var(--ib-red); background: var(--ib-red-bg); }
.risk-medium  { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.risk-low     { border-color: var(--green); color: var(--green); background: var(--green-soft); }

/* ══════════════════════════════════════
   TWO-COLUMN LAYOUT
══════════════════════════════════════ */

.portal-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 24px;
  align-items: start;
}

/* ══════════════════════════════════════
   CARDS — white, soft shadow, flat radius
══════════════════════════════════════ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.card:last-child { margin-bottom: 0; }

.card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ib-text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.optional-tag {
  font-size: 10px;
  font-weight: 400;
  color: #b0b0bb;
  text-transform: none;
  letter-spacing: 0;
}

/* ══════════════════════════════════════
   PROVIDER TABS
══════════════════════════════════════ */

.provider-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.provider-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-bg);
  color: var(--ib-text-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
}
.provider-tab:hover  { border-color: var(--ib-text); color: var(--ib-text); background: var(--white); }
.provider-tab.active {
  border-color: var(--ib-red);
  color: var(--ib-red);
  background: var(--ib-red-bg);
  font-weight: 500;
  box-shadow: 4px 4px 0 var(--ib-red-soft);
}

.tab-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tab-dot.claude      { background: var(--claude-color); }
.tab-dot.openai      { background: var(--openai-color); }
.tab-dot.groq        { background: var(--groq-color); }
.tab-dot.openrouter  { background: var(--openrouter-color); }
.tab-dot.gemini      { background: var(--gemini-color); }
.tab-dot.cerebras    { background: var(--cerebras-color); }
.tab-dot.togetherai  { background: var(--togetherai-color); }
.tab-dot.oci         { background: var(--oci-color); }

/* ══════════════════════════════════════
   OCI CONFIG
══════════════════════════════════════ */

.oci-config-panel { margin-top: 14px; }
.oci-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 11px;
  color: var(--ib-text);
  background: var(--gray-bg);
  resize: vertical;
  line-height: 1.55;
}
.oci-textarea:focus { outline: none; border-color: var(--ib-red); }

/* ══════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════ */

.field-group { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--ib-text); }
.required    { color: var(--ib-red); margin-left: 1px; }
.mt-3        { margin-top: 14px; }

.field-input {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  color: var(--ib-text);
  background: var(--white);
  transition: border-color 0.15s;
  appearance: none;
}
.field-input:focus { outline: none; border-color: var(--ib-red); }
select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23676775' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}
.field-hint { font-size: 11.5px; color: #aaaabc; font-weight: 300; }
/* Multi-line fields never take the pill radius meant for single-line inputs
   (--radius-md is 999px in the opkey theme) — a 6-row textarea at that
   radius renders as a stadium/oval shape, not a text box. */
textarea.field-input { border-radius: var(--radius); }

/* Automation "Run a Suite" bar — select + button must share one height,
   or the row reads as two mismatched controls (thin select, tall button). */
.automation-run-select {
  width: auto;
  min-width: 280px;
  height: 46px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23676775' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}
.automation-run-btn.btn-primary {
  height: 46px;
  padding: 0 26px;
  font-size: 14px;
  box-sizing: border-box;
}

.key-row    { display: flex; gap: 6px; }
.key-toggle {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--gray-bg);
  cursor: pointer;
  font-size: 13px;
  flex-shrink: 0;
  transition: border-color 0.15s;
  color: var(--ib-text-2);
}
.key-toggle:hover { border-color: var(--ib-text-2); }

/* ══════════════════════════════════════
   MODULE GRID
══════════════════════════════════════ */

.module-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.module-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--ib-text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
}
.module-btn:hover  { border-color: var(--ib-text); color: var(--ib-text); }
.module-btn.active { border-color: var(--ib-red); background: var(--ib-red-bg); color: var(--ib-red); font-weight: 500; }

/* ══════════════════════════════════════
   DROP ZONE
══════════════════════════════════════ */

/* Condensed to a single row (icon + text side by side) rather than a tall
   stacked block — the stacked layout with 40px vertical padding pushed the
   actual "Generate" action below the fold on every upload page for no real
   benefit. Drag-and-drop/click/browse behavior is unchanged, only the size. */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  text-align: left;
  cursor: pointer;
  background: var(--gray-bg);
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--ib-red);
  background: var(--ib-red-bg);
}
.drop-zone.has-file {
  border: 2px solid var(--green);
  background: var(--green-soft);
}
.drop-icon     { display: flex; justify-content: center; flex-shrink: 0; }
.drop-icon svg { width: 22px; height: 22px; }
.drop-text     { font-weight: 500; font-size: 13.5px; color: var(--ib-text); }
.drop-sub      { font-size: 12px; color: var(--ib-text-2); font-weight: 300; }
.drop-link     { color: var(--ib-red-text); font-weight: 500; }

.file-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--green-soft);
  border: 1.5px solid #86efac;
  border-radius: var(--radius-md);
  margin-top: 10px;
  font-size: 12.5px;
}
.file-info-name { font-weight: 500; color: var(--ib-text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info-size { color: var(--ib-text-2); flex-shrink: 0; font-weight: 300; }
.file-remove    { cursor: pointer; color: #a0a0b0; padding: 2px 4px; flex-shrink: 0; }
.file-remove:hover { color: var(--ib-red); }

/* Multi-file list */
.file-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #e8fce8;
  font-size: 12.5px;
}
.file-list-row:last-child { border-bottom: none; }
.file-list-num {
  width: 20px;
  height: 20px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-count-badge {
  width: 44px; height: 44px;
  background: var(--ib-red);
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ══════════════════════════════════════
   BUTTONS — InfoBeans style: 2px radius, opacity hover
══════════════════════════════════════ */

/* Primary — red fill */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 28px;
  background: var(--ib-red);
  color: #fff;
  border: 2px solid var(--ib-red);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled)   { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Impact variant */
.btn-impact { background: var(--impact); border-color: var(--impact); }

/* Outline — red border, transparent bg (InfoBeans secondary style) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 24px;
  background: transparent;
  color: var(--ib-red);
  border: 2px solid var(--ib-red);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}

/* Danger outline — always red, even under the opkey brand override (unlike
   .btn-outline, which follows --ib-red into teal there). For failure/error
   actions where the semantic color must not follow brand theming. */
.btn-outline-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-outline-danger:hover { background: var(--danger-bg); }
.btn-outline:hover { background: var(--ib-red-bg); opacity: 0.9; }
.btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }

/* Ghost — neutral, no fill */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: transparent;
  color: var(--ib-text-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--ib-text-2); color: var(--ib-text); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.pd-global-back-bar { padding: 24px 32px 0; }
.pd-global-back-bar.hidden { display: none; }

/* Danger — dark/muted destructive action */
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: #c0392b;
  color: #fff;
  border: 1.5px solid #c0392b;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-danger:hover { opacity: 0.85; }

.generate-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.generate-note { font-size: 12px; color: #b0b0bb; font-weight: 300; }

/* ══════════════════════════════════════
   INPUT TOGGLE (PASTE / FILE)
══════════════════════════════════════ */

.input-toggle {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.toggle-btn {
  padding: 7px 22px;
  border: none;
  background: var(--white);
  color: var(--ib-text-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-btn.active  { background: var(--ib-charcoal); color: #fff; font-weight: 500; }
.toggle-btn:not(.active):hover { background: var(--gray-bg); color: var(--ib-text); }

/* ══════════════════════════════════════
   RELEASE TEXTAREA
══════════════════════════════════════ */

.release-textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  color: var(--ib-text);
  background: var(--gray-bg);
  resize: vertical;
  line-height: 1.65;
}
.release-textarea:focus { outline: none; border-color: var(--ib-red); background: var(--white); }

/* ══════════════════════════════════════
   PROGRESS
══════════════════════════════════════ */

.progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.progress-sub { font-size: 13px; color: var(--ib-text-2); font-weight: 300; margin-top: 4px; }

.elapsed-pill {
  background: var(--ib-red-bg);
  color: var(--ib-red);
  border: 1px solid var(--ib-red-soft);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.impact-pill { background: var(--impact-soft); color: var(--impact); border-color: #d4b3f0; }

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border-soft);
  border-radius: 6px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--ib-red);
  border-radius: 6px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: shimmer 1.6s infinite;
}
.impact-fill { background: var(--impact); }

@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(200%); } }

.progress-pct-row { margin: 8px 0 16px; display: flex; align-items: center; }
.progress-pct-row span { font-size: 20px; font-weight: 600; color: var(--ib-text); }

.step-indicators { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--border); font-weight: 400;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: all 0.2s;
}
.step-item.active { color: var(--ib-text); font-weight: 500; }
.step-item.active .step-dot {
  background: var(--ib-red);
  box-shadow: 0 0 0 3px var(--ib-red-soft);
  animation: stepPulse 1.2s ease-in-out infinite;
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--ib-red-soft); }
  50%       { box-shadow: 0 0 0 6px rgba(234,27,61,0.15); }
}
.step-item.done   { color: var(--green); font-weight: 400; }
.step-item.done .step-dot { background: var(--green); }
.step-arrow { color: var(--border); font-size: 14px; }

/* ══════════════════════════════════════
   RESULTS
══════════════════════════════════════ */

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.results-eyebrow  { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin-bottom: 4px; }
.results-subtitle { font-size: 12.5px; color: var(--ib-text-2); font-weight: 300; margin-top: 4px; }

/* Stats — InfoBeans directional shadow style (for highlight boxes only) */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-stat);
  overflow: hidden;
  min-width: 0;
}
.stat-value { font-size: 26px; font-weight: 700; color: var(--color, var(--ib-red)); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block; }
.stat-label { font-size: 11px; color: var(--ib-text-2); margin-top: 5px; font-weight: 300; }
.stat-sub   { font-size: 10px; color: #6b6762; margin-top: 4px; font-weight: 300; line-height: 1.3; }

/* Breakdown */
.breakdown-section {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.breakdown-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.breakdown-title  { font-size: 12px; font-weight: 500; color: var(--ib-text); }
.breakdown-total  { font-size: 11px; color: #aaaabc; font-weight: 300; }
.breakdown-row    { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.breakdown-row:last-child { margin-bottom: 0; }
/* A11Y-013: was a hard `width: 60px` with no overflow handling -- "Positive"/
   "Negative"/"Boundary" at 200% zoom no longer fit and visually overlapped the
   track next to it. `min-width` keeps the usual compact layout but lets the
   label grow instead. */
.breakdown-label  { font-size: 12px; font-weight: 500; min-width: 60px; text-align: right; flex-shrink: 0; }
.breakdown-label.positive { color: var(--green); }
.breakdown-label.negative { color: var(--ib-red); }
.breakdown-label.boundary { color: var(--amber); }
.breakdown-track  { flex: 1; height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; }
.breakdown-fill   { height: 100%; border-radius: 6px; transition: width 0.7s ease; }
.breakdown-fill.positive { background: var(--green); }
.breakdown-fill.negative { background: var(--ib-red); }
.breakdown-fill.boundary { background: var(--amber); }
.breakdown-count  { font-size: 12.5px; font-weight: 600; color: var(--ib-text); width: 24px; text-align: right; }

.download-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Impact summary */
.impact-summary-box {
  background: var(--impact-soft);
  border: 1px solid #d4b3f0;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.impact-summary-label { font-size: 10px; font-weight: 600; color: var(--impact); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 7px; }
.impact-summary-text  { font-size: 13px; color: var(--ib-text); line-height: 1.65; font-weight: 300; }

/* ══════════════════════════════════════
   ERROR STATE
══════════════════════════════════════ */

.error-card    { text-align: center; padding: 44px 24px; }
.error-icon    { font-size: 36px; color: var(--ib-red); margin-bottom: 14px; }
.error-title   { font-size: 17px; font-weight: 500; color: var(--ib-text); margin-bottom: 8px; }
.error-message {
  font-size: 13px;
  color: var(--ib-text-2);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
  line-height: 1.65;
  font-weight: 300;
}

/* ══════════════════════════════════════
   JOB HISTORY
══════════════════════════════════════ */

.empty-state  { text-align: center; padding: 80px 24px; }
.empty-icon   { font-size: 44px; margin-bottom: 16px; }
.empty-title  { font-size: 18px; font-weight: 500; color: var(--ib-text); }
.empty-sub    { font-size: 13.5px; color: var(--ib-text-2); margin-top: 7px; font-weight: 300; }

.history-list      { display: flex; flex-direction: column; gap: 14px; }
.history-loading   { text-align: center; color: var(--ib-text-2); padding: 40px; font-weight: 300; }
.history-error-msg { color: var(--ib-red); padding: 16px; text-align: center; }

.history-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s;
}
.history-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.history-card-failed   { border-left: 3px solid var(--ib-red); }
.history-card-nocases  { border-left: 3px solid var(--amber); }

.history-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.history-card-left   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.history-badge {
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-testgen { background: var(--ib-red-bg); color: var(--ib-red); }
.badge-impact  { background: var(--impact-soft); color: var(--impact); }
.badge-video     { background: #0c4a6e20; color: #0c4a6e; border-color: #0c4a6e40; }
.badge-training  { background: #14532d20; color: #14532d; border-color: #14532d40; }
.badge-fdd       { background: #7c3aed20; color: #7c3aed; border-color: #7c3aed40; }

.history-module  { font-size: 14px; font-weight: 500; color: var(--ib-text); }
.history-release { font-size: 12px; color: var(--ib-text-2); font-weight: 300; }

.history-status {
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
}
.status-complete  { background: var(--green-soft); color: var(--green); }
.status-failed    { background: var(--ib-red-bg); color: var(--ib-red); }
.status-running   { background: var(--amber-soft); color: var(--amber); }
.status-nocases   { background: var(--amber-soft); color: var(--amber); }

.history-meta  { display: flex; gap: 18px; font-size: 12px; color: var(--ib-text-2); margin-bottom: 8px; flex-wrap: wrap; font-weight: 300; }
.history-stats { display: flex; gap: 16px; font-size: 12.5px; font-weight: 500; color: var(--ib-text); margin-bottom: 10px; flex-wrap: wrap; }
.history-error { font-size: 12.5px; color: var(--ib-red); margin-bottom: 10px; font-weight: 300; }
.history-warn  { font-size: 12.5px; color: var(--amber); background: var(--amber-soft); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; font-weight: 400; }

.history-downloads { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-link {
  color: var(--ib-red);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 14px;
  border: 1.5px solid var(--ib-red);
  border-radius: var(--radius);
  transition: all 0.15s;
}
.dl-link:hover { background: var(--ib-red); color: #fff; }

/* ══════════════════════════════════════
   IMPACT DETAIL VIEW (in-page)
══════════════════════════════════════ */

.ia-detail-section {
  margin-bottom: 24px;
}
.ia-detail-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ib-text-2);
  padding: 0 0 10px;
  border-bottom: 2px solid var(--ib-red);
  margin-bottom: 12px;
}
.ia-detail-row {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.ia-detail-row:last-child { margin-bottom: 0; }
.ia-detail-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ia-detail-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ib-text);
  flex: 1;
  min-width: 0;
}
.ia-detail-name.mono {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12px;
}
.ia-detail-tag-id {
  font-size: 10px;
  font-weight: 700;
  background: var(--ib-charcoal);
  color: #fff;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.ia-detail-desc {
  font-size: 13px;
  color: var(--ib-text-2);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 6px;
}
.ia-detail-nav {
  font-size: 11.5px;
  color: var(--ib-text-2);
  font-family: 'SF Mono', Consolas, monospace;
  background: var(--gray-bg);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}
.ia-detail-action {
  font-size: 12.5px;
  color: var(--green);
  background: var(--green-soft);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  font-weight: 400;
  line-height: 1.5;
}
.ia-detail-meta {
  font-size: 11.5px;
  color: var(--ib-text-2);
  font-weight: 300;
  margin-top: 6px;
}
.ia-detail-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.ia-tag {
  font-size: 11px;
  background: var(--border-soft);
  color: var(--ib-text-2);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* Source citation link */
.ia-detail-citation {
  font-size: 10.5px;
  color: var(--ib-text-2);
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  font-weight: 300;
  word-break: break-all;
}
.ia-detail-citation a { color: var(--ib-text-2); text-decoration: none; }
.ia-detail-citation a:hover { color: var(--ib-red); text-decoration: underline; }

/* Risk score pill */
.ia-risk-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════
   PRINT / PDF
══════════════════════════════════════ */

@media print {
  .sidebar, .page-header, #ia-idle-state, #ia-progress-state,
  .download-row, .btn-primary, .btn-outline, .btn-ghost,
  #ia-stats-grid ~ .download-row { display: none !important; }

  body { background: white; display: block; font-size: 12px; }
  .main-content { margin-left: 0; padding: 0; }
  #page-testgen, #page-history { display: none !important; }
  #page-impact { display: block !important; }
  #ia-results-state { display: block !important; box-shadow: none; border: none; }
  #ia-detail-view { display: block !important; }

  .ia-detail-row { box-shadow: none; break-inside: avoid; }
  .ia-detail-section { break-inside: avoid; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ══════════════════════════════════════
   UTILITY
══════════════════════════════════════ */

.hidden { display: none !important; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

@media (max-width: 1100px) {
  .portal-layout { grid-template-columns: 248px 1fr; }
  .main-content  { padding: 28px; }
}

/* Slide-in navigation toggle + scrim (static/ui-kit.js): hidden by default,
   shown only by the 820px block below. Declared before it so the media query wins. */
.ui-nav-toggle, .ui-nav-scrim { display: none; }

@media (max-width: 820px) {
  body { flex-direction: column; }
  /* The sidebar is a slide-in drawer on small screens (the toggle button and
     scrim are added by static/ui-kit.js). It used to stack every nav link
     above the page, so the content started a screen or two down. */
  .sidebar {
    width: min(86vw, 300px); height: 100vh;
    position: fixed; top: 0; left: 0;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
    z-index: 1100;
  }
  body.nav-open .sidebar { transform: none; visibility: visible; transition: transform .2s ease; box-shadow: 8px 0 28px rgba(0,0,0,.3); }
  .ui-nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; top: 12px; left: 10px; z-index: 90;
    width: 44px; height: 44px;
    border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--ib-charcoal); cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }
  body.nav-open .ui-nav-toggle {
    z-index: 1200; left: calc(min(86vw, 300px) - 54px); top: 12px;
    background: transparent; border-color: rgba(255,255,255,.35); color: #fff; box-shadow: none;
  }
  body.nav-open .ui-nav-scrim { display: block; position: fixed; inset: 0; background: rgba(30,29,36,.5); z-index: 1090; }
  .main-content  { margin-left: 0; padding: 18px; }
  .portal-layout { grid-template-columns: 1fr; }
  .config-panel  { order: 2; }
  .work-panel    { order: 1; }
  .provider-tabs { grid-template-columns: 1fr 1fr; }
  .page-title    { font-size: 22px; }
  /* Headers with an action row, and inline two-column grids, must wrap/stack
     rather than push the page wider than the screen. */
  .page-header { flex-wrap: wrap; gap: 12px 16px; }
  .page-header > div[style*="display:flex"] { flex-wrap: wrap; }
  .page [style*="grid-template-columns:1fr 1fr"], .page [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .page [style*="grid-template-columns:repeat(4,1fr)"], .page [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 520px) {
  .page [style*="grid-template-columns:repeat(4,1fr)"], .page [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
}

/* ── Sample Output Table ──────────────────────────────────────────────── */
.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 900px;
}
.sample-table th {
  background: var(--ib-charcoal);
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.sample-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  color: var(--ib-text);
}
.sample-table tr:last-child td { border-bottom: none; }
.sample-table tr:hover td { background: #fafafa; }

.tc-id-badge {
  font-family: monospace;
  font-size: 11px;
  background: #eff6ff;
  color: #1e40af;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.pillar-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.pillar-functional { background: #dbeafe; color: #1e40af; }
.pillar-integration { background: #fef3c7; color: #92400e; }
.pillar-security    { background: #fce7f3; color: #9d174d; }
.pillar-performance { background: #d1fae5; color: #065f46; }

.type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.type-badge.positive  { background: #d1fae5; color: #065f46; }
.type-badge.negative  { background: #fee2e2; color: #991b1b; }
.type-badge.boundary  { background: #fef3c7; color: #92400e; }
.type-badge.security  { background: #fce7f3; color: #9d174d; }

.priority-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.priority-badge.p1 { background: #fee2e2; color: #991b1b; }
.priority-badge.p2 { background: #fef3c7; color: #92400e; }
.priority-badge.p3 { background: #f6f0e6; color: #3a3842; }

.status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.status-badge.not-exec { background: #f6f0e6; color: #625e5c; }
.status-badge.pass     { background: #d1fae5; color: #065f46; }
.status-badge.fail     { background: #fee2e2; color: #991b1b; }
.status-badge.warn     { background: #fef3c7; color: #92400e; }
/* Wave 3 Packet 3.5 — flow-version lifecycle badges */
.status-badge.fb-draft      { background: #f6f0e6; color: #4b5563; }
.status-badge.fb-in-review  { background: #fef3c7; color: #92400e; }
.status-badge.fb-approved   { background: #dbeafe; color: #1e40af; }
.status-badge.fb-active     { background: #d1fae5; color: #065f46; }
.status-badge.fb-retired    { background: #fee2e2; color: #7f1d1d; }

/* Wave 3 Packet 3.5 — Flow Builder layout (static/pages/flow-builder.js) */
.fb-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.fb-flow-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.fb-flow-list-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 13px; }
.fb-flow-list-item:hover { background: var(--ib-red-bg); }
.fb-flow-list-item.active { border-color: var(--ib-red); background: var(--ib-red-bg); }
.fb-flow-list-item .fb-flow-module { font-size: 11px; color: var(--ib-text-2); margin-top: 2px; }
.fb-step-row { display: grid; grid-template-columns: 130px 1fr 1fr 32px; gap: 8px; align-items: center; margin-bottom: 6px; }
.fb-step-row input, .fb-step-row select { font-size: 12px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 4px; }
.fb-empty-state { color: var(--ib-text-2); font-size: 13px; padding: 24px; text-align: center; }

/* Automation Pricing page (static/pages/automation-pricing.js) */
.ap-tier-box {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  background: var(--gray-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ap-tier-box-head { display: flex; }
.ap-tier-low    { border-top: 3px solid var(--green); }
.ap-tier-medium { border-top: 3px solid var(--amber); }
.ap-tier-high   { border-top: 3px solid var(--ib-red); }

.step-list { display: flex; flex-direction: column; gap: 2px; min-width: 200px; max-width: 260px; }
.step-list div { font-size: 11px; color: #3a3842; line-height: 1.4; }

/* ── General UI Polish ───────────────────────────────────────────────── */
.card { transition: box-shadow 0.15s ease; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.history-card { transition: box-shadow 0.15s ease; }
.history-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.stat-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.10); }

/* ── Test Generator Config Bar ───────────────────────────────────────── */
.tg-config-bar { padding: 16px 20px; margin-bottom: 16px; }

.tg-config-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.tg-config-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tg-config-group label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ib-text-2);
}

.tg-group-provider { flex: 0 0 auto; }
.tg-group-key      { flex: 1; min-width: 200px; }
/* A11Y-013: these were `flex: 0 0 <px>` (a hard-capped flex-basis with no
   grow/shrink) -- at 200% text zoom the Model/Document Type label and the
   input/select inside it no longer fit, with no way for the box to grow.
   `flex: 1 1 <px>` keeps the same starting width but lets the box grow when
   its content needs more room, while still sharing space with its siblings. */
.tg-group-model    { flex: 1 1 180px; min-width: 150px; }
.tg-group-doctype  { flex: 1 1 150px; min-width: 130px; }

/* ── Enterprise mode: hide provider/key/model fields ── */
body[data-portal-mode="enterprise"] .tg-group-provider,
body[data-portal-mode="enterprise"] .tg-group-key,
body[data-portal-mode="enterprise"] .tg-group-model,
body[data-portal-mode="enterprise"] #ia-key-panel,
body[data-portal-mode="enterprise"] #vc-key-panel,
body[data-portal-mode="enterprise"] #ia-oci-panel,
body[data-portal-mode="enterprise"] #tg-oci-panel,
body[data-portal-mode="enterprise"] #vc-oci-panel,
body[data-portal-mode="enterprise"] #ia-provider-card,
body[data-portal-mode="enterprise"] #ia-model-card,
body[data-portal-mode="enterprise"] #vc-provider-card,
body[data-portal-mode="enterprise"] #vc-model-card,
body[data-portal-mode="enterprise"] #fdd-provider-card {
  display: none !important;
}

/* ── Enterprise mode notice bar ── */
.enterprise-mode-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(234,27,61,0.07);
  border: 1px solid rgba(234,27,61,0.2);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ib-red);
  margin-bottom: 14px;
}

.provider-tabs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.provider-tabs-inline .provider-tab {
  padding: 7px 10px;
  font-size: 11.5px;
  box-shadow: none;
}

/* ── Provider Privacy Notes ──────────────────────────────────────────── */
.provider-privacy-note {
  font-size: 11.5px;
  font-weight: 400;
  border-radius: var(--radius);
  padding: 6px 10px;
  margin-top: 6px;
  line-height: 1.45;
}
.provider-privacy-note:empty { display: none; }
.privacy-safe    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.privacy-caution { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── Lite-mode single API key field: detected-provider badge + manual escape hatch ── */
.detected-provider-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ib-red);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 3px;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
}
.manual-provider-link {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 300;
  color: var(--ib-text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}
.manual-provider-link:hover { color: var(--ib-text); }

/* ── Sample Table Truncated Cells ────────────────────────────────────── */
.tc-cell-trunc {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-cell-fixed {
  white-space: nowrap;
  width: 1%;
}

.tc-cell-steps {
  font-size: 11px;
  color: #3a3842;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ── Knowledge Base Redesign ─────────────────────────────────────── */
.kb-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* Import panel */
.kb-import-panel {
  border: 1px solid #ebe1d1;
  border-radius: 12px;
  background: #fcf8f1;
  margin-bottom: 20px;
  overflow: hidden;
}

.kb-import-inner {
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.kb-import-fields {
  display: flex;
  gap: 16px;
  flex: 1;
  align-items: flex-end;
  flex-wrap: wrap;
}

.kb-import-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* Filter bar */
.kb-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.kb-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kb-filter-count {
  color: #625e5c;
  font-size: 13px;
  padding-bottom: 8px;
}

.kb-entries-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Upload zone */
.kb-upload-zone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 2px dashed #ddd0bb;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
  min-width: 240px;
}

.kb-upload-zone:hover {
  border-color: #c50034;
  background: #fff5f7;
}

.kb-upload-icon { font-size: 20px; }

.kb-upload-zone .drop-text {
  font-size: 13px;
  color: #625e5c;
}

/* ── Notify / Slack Webhook ─────────────────────────────────────── */
.notify-details {
  margin-top: 16px;
  border: 1px solid #ebe1d1;
  border-radius: 8px;
  overflow: hidden;
}

.notify-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #3a3842;
  cursor: pointer;
  user-select: none;
  background: #fcf8f1;
  list-style: none;
}

.notify-summary::-webkit-details-marker { display: none; }

.notify-summary::before {
  content: '›';
  font-size: 16px;
  transition: transform 0.2s;
  margin-right: 2px;
}

details[open] .notify-summary::before { transform: rotate(90deg); }

.notify-body {
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #ebe1d1;
}

/* ── OCI Config Wizard ──────────────────────────────────────────── */
.oci-wizard { font-size: 13px; }

.oci-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.oci-step-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #ddd0bb;
  background: #fcf8f1;
  color: #625e5c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}

.oci-step-tab.active {
  background: #c50034;
  color: #fff;
  border-color: #c50034;
}

.oci-step-arrow { color: #6b6762; font-size: 14px; }

.oci-step-panel { display: none; }
.oci-step-panel.active { display: block; }

.oci-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .oci-field-grid { grid-template-columns: 1fr; }
}

.oci-key-mode-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.oci-key-mode-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #ddd0bb;
  background: #fcf8f1;
  font-size: 12px;
  cursor: pointer;
}

.oci-key-mode-btn.active {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}

.oci-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: 11px;
  color: #3a3842;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
}

/* ── Jira Export Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #ebe1d1;
}

.modal-title {
  font-weight: 700;
  font-size: 16px;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #6b6762;
  padding: 4px 6px;
  border-radius: 4px;
}

.modal-close:hover { background: #f6f0e6; color: #3a3842; }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #ebe1d1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.jira-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.jira-status.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.jira-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.jira-status.loading {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* ── OCI Config Textarea ────────────────────────────────────────── */
.oci-config-textarea {
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: 11px;
  resize: vertical;
  min-height: 90px;
}

/* ════════════════════════════════════════════════════════
   AUTH OVERLAY — sign-in screen
   Matches the QAVA marketing site
   (static/marketing/oracle-ai-site/assets/site.css): Lexend, cream
   surfaces, flat red CTA, 2px controls / 6px panels, line icons.
   Every rule is prefixed with .auth-overlay so nothing here can leak
   into the signed-in app (.field-input / .btn-primary are shared).
   ════════════════════════════════════════════════════════ */

.auth-overlay {
  --auth-cream:     #fff9ed;
  --auth-cream-2:   #fbf1e0;
  --auth-line:      #efe4d0;
  --auth-border:    #e5e7eb;
  --auth-red:       #ea1b3d;
  --auth-red-dark:  #c4162f;
  --auth-red-bg:    #fff0f3;
  --auth-red-soft:  #ffd0d8;
  --auth-text:      #373742;
  --auth-text-2:    #676775;
  --auth-charcoal:  #2f2f39;

  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--auth-cream);
  color: var(--auth-text);
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.auth-overlay.hidden { display: none; }

/* ── Top bar: matches the marketing site's .nav (charcoal, white mark) ── */
.auth-overlay .auth-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  padding: 0 clamp(20px, 4vw, 40px);
  background: var(--auth-charcoal);
  display: flex;
  align-items: center;
  gap: 16px;
}
.auth-overlay .auth-topbar-logo { display: block; width: 120px; height: auto; }

.auth-overlay .auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100% - 64px);
}

/* ── Left: product panel ── */
.auth-overlay .auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 56px clamp(40px, 6vw, 96px);
  background: var(--auth-cream-2);
  border-right: 1px solid var(--auth-line);
}

.auth-overlay .auth-logo { display: flex; align-items: center; }
.auth-overlay .auth-logo-mark { display: block; width: 132px; height: auto; }

.auth-overlay .auth-brand-copy { max-width: 480px; }

.auth-overlay .auth-brand-title {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--auth-text);
  margin: 0 0 14px;
}

.auth-overlay .auth-brand-lede {
  font-size: 16px;
  color: var(--auth-text-2);
  line-height: 1.7;
  margin: 0;
}

.auth-overlay .auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  max-width: 480px;
}

.auth-overlay .auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--auth-text);
  line-height: 1.55;
}

.auth-overlay .auth-point-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  color: var(--auth-red);
}
.auth-overlay .auth-point-icon svg { width: 18px; height: 18px; }
.auth-overlay .auth-points li > span:last-child { padding-top: 6px; }

.auth-overlay .auth-brand-foot {
  font-size: 12px;
  color: var(--auth-text-2);
  margin: 0;
}

/* ── Right: sign-in card ── */
.auth-overlay .auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 40px;
}

.auth-overlay .auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(47, 47, 57, .04);
  padding: 36px 36px 28px;
}

.auth-overlay .auth-card-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--auth-text);
  margin: 0 0 6px;
}

.auth-overlay .auth-card-sub {
  font-size: 14px;
  color: var(--auth-text-2);
  line-height: 1.55;
  margin: 0 0 26px;
}

/* One tab left (register removed 2026-07-27) — a one-option switch is
   noise, so the strip hides itself. It reappears if a second tab is added. */
.auth-overlay .auth-tabs:has(> .auth-tab:only-child) { display: none; }

.auth-overlay .auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--auth-border);
}

.auth-overlay .auth-tab {
  flex: 1;
  padding: 10px 8px;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--auth-text-2);
  cursor: pointer;
}

.auth-overlay .auth-tab.active {
  color: var(--auth-text);
  border-bottom-color: var(--auth-red);
}

.auth-overlay .auth-field { margin-bottom: 16px; }

.auth-overlay .auth-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text);
  margin-bottom: 6px;
}

.auth-overlay .field-input {
  padding: 11px 14px;
  border: 1px solid var(--auth-border);
  border-radius: 2px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  color: var(--auth-text);
  transition: border-color .15s, box-shadow .15s;
}
.auth-overlay .field-input::placeholder { color: #9a9aa6; }
.auth-overlay .field-input:hover { border-color: #d3d5da; }
.auth-overlay .field-input:focus {
  outline: none;
  border-color: var(--auth-red);
  box-shadow: 0 0 0 3px var(--auth-red-bg);
}

.auth-overlay .auth-error {
  background: var(--auth-red-bg);
  color: var(--auth-red-dark);
  border: 1px solid var(--auth-red-soft);
  border-radius: 2px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-overlay .auth-submit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  padding: 12px 20px;
  background: var(--auth-red);
  border: 1px solid var(--auth-red);
  border-radius: 2px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
  transition: background-color .15s, border-color .15s;
}
.auth-overlay .auth-submit-btn:hover:not(:disabled) {
  opacity: 1;
  background: var(--auth-red-dark);
  border-color: var(--auth-red-dark);
}
.auth-overlay .auth-submit-btn:focus-visible {
  outline: 2px solid var(--auth-charcoal);
  outline-offset: 2px;
}
.auth-overlay .auth-submit-btn:disabled { opacity: .55; }

.auth-overlay .auth-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--auth-border);
  font-size: 12.5px;
  color: var(--auth-text-2);
  line-height: 1.55;
}

/* ── Tablet: tighten the split ── */
@media (max-width: 1024px) {
  .auth-overlay .auth-brand { padding: 48px 40px; gap: 28px; }
  .auth-overlay .auth-main  { padding: 48px 28px; }
}

/* ── Phone: one column. Brand header → sign-in card → points, so the
   form sits near the top instead of below three bullet points. ── */
@media (max-width: 760px) {
  .auth-overlay .auth-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px 20px 32px;
  }
  .auth-overlay .auth-brand { display: contents; }
  .auth-overlay .auth-brand-copy { order: 2; }
  .auth-overlay .auth-main       { order: 3; padding: 0; }
  .auth-overlay .auth-points     { order: 4; padding-top: 4px; }
  .auth-overlay .auth-brand-foot { order: 5; }

  .auth-overlay .auth-topbar { height: 56px; padding: 0 20px; }
  .auth-overlay .auth-topbar-logo { width: 100px; }
  .auth-overlay .auth-shell { min-height: calc(100% - 56px); }
  .auth-overlay .auth-brand-title { font-size: 26px; margin-bottom: 8px; }
  .auth-overlay .auth-brand-lede  { font-size: 14.5px; line-height: 1.6; }
  .auth-overlay .auth-card { max-width: none; padding: 26px 20px 22px; }
  .auth-overlay .auth-card-title { font-size: 22px; }
  .auth-overlay .auth-card-sub   { margin-bottom: 20px; }
  /* 16px stops iOS Safari zooming the page when an input takes focus. */
  .auth-overlay .field-input { font-size: 16px; }
}

/* ── Sidebar user widget ─────────────────────────────── */

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #c50034;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-signout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.sidebar-signout-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── Training Toast ──────────────────────────────────────────────── */
.training-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1.5px solid #bbf7d0;
  border-left: 4px solid #15803d;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 14px 18px;
  min-width: 340px;
  max-width: 440px;
  animation: toastSlideIn 0.3s ease;
}
.training-toast.hidden { display: none !important; }
.training-toast-icon { font-size: 24px; flex-shrink: 0; }
.training-toast-body { flex: 1; }
.training-toast-title { font-weight: 700; font-size: 13px; color: #065f46; margin-bottom: 3px; }
.training-toast-sub { font-size: 12px; color: #3a3842; }
.training-toast-close {
  background: none; border: none; cursor: pointer; color: #6b6762;
  font-size: 16px; padding: 2px 6px; flex-shrink: 0;
}
.training-toast-close:hover { color: #3a3842; }
@keyframes toastSlideIn {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Shared notifications, states and field errors (static/ui-kit.js) ──── */
.ui-toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.ui-toast-group { display: flex; flex-direction: column; gap: 8px; }
.ui-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--ib-charcoal);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  padding: 11px 12px 11px 12px;
  animation: toastSlideIn 0.2s ease;
}
.ui-toast-success { border-left-color: var(--green); }
.ui-toast-info    { border-left-color: #1d4ed8; }
.ui-toast-warning { border-left-color: var(--amber); }
.ui-toast-error   { border-left-color: var(--danger); }
.ui-toast-icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  background: var(--ib-charcoal);
}
.ui-toast-success .ui-toast-icon { background: var(--green); }
.ui-toast-info .ui-toast-icon    { background: #1d4ed8; }
.ui-toast-warning .ui-toast-icon { background: var(--amber); }
.ui-toast-error .ui-toast-icon   { background: var(--danger); }
.ui-toast-body { flex: 1; min-width: 0; }
.ui-toast-title { font-weight: 700; font-size: 13px; color: var(--ib-text); }
.ui-toast-msg { font-size: 13px; color: var(--ib-text); line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.ui-toast-action {
  flex: 0 0 auto;
  background: none; border: 0; cursor: pointer;
  color: var(--ib-red-dark); font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 2px 4px;
}
.ui-toast-close {
  flex: 0 0 auto;
  background: none; border: 0; cursor: pointer;
  color: var(--ib-text-2); font-size: 18px; line-height: 1;
  padding: 0 4px;
}
.ui-toast-close:hover, .ui-toast-action:hover { text-decoration: underline; }

.ui-dialog-msg p { margin: 0 0 8px; line-height: 1.55; color: var(--ib-text); }
.ui-dialog-msg p:last-child { margin-bottom: 0; }

.field-error {
  color: #b91c1c;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 5px;
}
.field-error.hidden { display: none; }
.field-input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185,28,28,.12);
}

.ui-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--gray-bg);
  font-size: 13px;
  color: var(--ib-text-2);
}
.ui-state-title { font-weight: 700; color: var(--ib-text); }
.ui-state-msg { line-height: 1.5; overflow-wrap: anywhere; }
.ui-state-error { background: #fef2f2; border-color: #fecaca; }
.ui-state-error .ui-state-title { color: #991b1b; }
.ui-state-loading { flex-direction: row; align-items: center; gap: 10px; }
.ui-state .ui-retry { margin-top: 4px; }
.ui-spinner {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  border: 2px solid var(--ib-red-bg);
  border-top-color: var(--ib-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Abort Button ────────────────────────────────────────────────── */
.btn-abort {
  background: transparent;
  border: 1.5px solid #dc2626;
  color: #dc2626;
  padding: 4px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 12px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-abort:hover { background: #dc2626; color: #fff; }

/* ── KB Source Badges ────────────────────────────────────────────── */
.kb-source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.kb-source-auto   { background: #d1fae5; color: #065f46; }
.kb-source-upload { background: #dbeafe; color: #1e40af; }

/* ── KB Keywords Row ─────────────────────────────────────────────── */
.kb-keywords-row { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.kb-keyword {
  background: #f6f0e6;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  color: #3a3842;
}

/* ── KB Delete Button ────────────────────────────────────────────── */
.kb-delete-btn {
  background: none; border: none; cursor: pointer;
  color: #dc2626; font-size: 12px; padding: 2px 8px;
  border-radius: 4px; white-space: nowrap; font-family: inherit;
}
.kb-delete-btn:hover { background: #fee2e2; }

/* ── KB Meta Row (storage + cross-train) ─────────────────────────── */
.kb-meta-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.kb-storage-badge {
  font-size: 11px;
  color: #625e5c;
  background: #f6f0e6;
  border: 1px solid #ebe1d1;
  border-radius: 10px;
  padding: 3px 12px;
  white-space: nowrap;
}
.kb-risk-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.kb-risk-High, .kb-risk-Critical { background: #fee2e2; color: #991b1b; }
.kb-risk-Medium { background: #fef3c7; color: #92400e; }
.kb-risk-Low    { background: #dcfce7; color: #065f46; }
.kb-risk-Unknown, .kb-risk- { background: #f6f0e6; color: #625e5c; }
.kb-model-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  background: #f0f0f8;
  color: #3a3842;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.kb-actions-section {
  margin-top: 10px;
  border-top: 1px solid #f6f0e6;
  padding-top: 8px;
}
.kb-actions-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #625e5c;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.kb-action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #3a3842;
  padding: 3px 0;
  line-height: 1.3;
}
.kb-action-priority {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.kb-priority-Immediate, .kb-priority-P1 { background: #fee2e2; color: #991b1b; }
.kb-priority-Short-Term, .kb-priority-P2 { background: #fef3c7; color: #92400e; }
.kb-priority-P3 { background: #dbeafe; color: #1e40af; }
.kb-priority-Medium { background: #fef3c7; color: #92400e; }
.kb-priority-Low { background: #dcfce7; color: #065f46; }
.kb-action-cat {
  font-size: 10px;
  color: #6b6762;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── KB Cross-Train Badge ────────────────────────────────────────── */
.kb-cross-train-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  grid-column: 1 / -1;
}


/* ══════════════════════════════════════
   ACCESSIBILITY — reduce motion
══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════
   ENTERPRISE SECTION — InfoBeans theme
══════════════════════════════════════════════════════ */

/* ── Sidebar nav badge ── */
.enterprise-nav-item { position: relative; }
.enterprise-nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1c1917;
  padding: 2px 6px;
  border-radius: var(--radius-md);
}

/* ── Enterprise header banner ── */
.ent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ib-charcoal);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}
.ent-header-left { display: flex; align-items: center; gap: 16px; }
.ent-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1c1917;
  padding: 4px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.ent-title { font-size: 22px; font-weight: 600; color: #fff; margin: 0 0 4px; }
.ent-subtitle { font-size: 12.5px; color: rgba(255,255,255,0.55); margin: 0; font-weight: 300; }

.ent-provider-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}
.ent-provider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.ent-provider-dot.online  { background: #34d399; box-shadow: 0 0 5px #34d399; }
.ent-provider-dot.offline { background: var(--ib-red); }

/* ── Sub-section tabs ── */
.ent-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--ib-bg);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--ib-border);
}
.ent-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border: none; border-radius: var(--radius);
  background: transparent;
  color: var(--ib-text-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ent-tab:hover { background: var(--white); color: var(--ib-text); }
.ent-tab.active {
  background: var(--white);
  color: var(--ib-red);
  box-shadow: var(--shadow-sm);
}

/* ── Two-column layout ── */
.ent-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .ent-two-col { grid-template-columns: 1fr; }
}

/* ── Panel ── */
.ent-panel {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--ib-border);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.ent-panel-title {
  font-size: 13px; font-weight: 600;
  color: var(--ib-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ib-border);
}

/* ── Upload zone ── */
.ent-upload-zone {
  border: 2px dashed var(--ib-border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--ib-text-2);
  margin-bottom: 10px;
}
.ent-upload-zone:hover,
.ent-upload-zone.drag-over { border-color: var(--ib-red); background: var(--ib-red-bg); }
.ent-upload-zone.has-file  { border-color: var(--ib-red); border-style: solid; background: var(--ib-red-bg); }
.ent-upload-zone svg { margin-bottom: 10px; opacity: 0.5; }
.ent-upload-text { font-size: 13px; font-weight: 400; margin-bottom: 4px; }
.ent-upload-text span { color: var(--ib-red); font-weight: 500; }
.ent-upload-hint { font-size: 11.5px; color: var(--ib-text-2); }

/* ── File chip ── */
.ent-file-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--ib-red-bg); border: 1px solid var(--ib-red-soft);
  border-radius: var(--radius); padding: 7px 12px;
  font-size: 12.5px; color: var(--ib-red-dark);
  margin-bottom: 14px;
}
.ent-file-chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ent-file-chip button {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: #6b6762; line-height: 1;
  padding: 0; margin-left: 4px;
}
.ent-file-chip button:hover { color: var(--ib-red); }

/* ── Inline fields row ── */
.ent-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── AI badge ── */
.ent-ai-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ib-red);
  background: var(--ib-red-bg); border: 1px solid var(--ib-red-soft);
  border-radius: var(--radius); padding: 7px 12px;
  margin: 14px 0;
  font-weight: 400;
}

/* ── Submit button ── */
.ent-submit-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  background: var(--ib-red);
  color: #fff; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.ent-submit-btn:hover:not(:disabled) { background: var(--ib-red-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(234,27,61,0.3); }
.ent-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Result area ── */
.ent-result-area {
  min-height: 300px;
  display: flex; flex-direction: column;
}
.ent-result-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--ib-text-2); text-align: center; gap: 12px;
  opacity: 0.5;
}
.ent-result-empty svg { opacity: 0.4; }
.ent-result-empty p { font-size: 13px; font-weight: 300; margin: 0; }

/* ── Progress ── */
.ent-progress-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 20px;
}
.ent-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--ib-red-soft);
  border-top-color: var(--ib-red);
  border-radius: 50%;
  animation: ent-spin 0.8s linear infinite;
}
@keyframes ent-spin { to { transform: rotate(360deg); } }
.ent-progress-msg { font-size: 13px; color: var(--ib-text); font-weight: 400; text-align: center; }
.ent-progress-bar-track {
  width: 100%; max-width: 280px;
  height: 4px; background: var(--ib-red-soft); border-radius: 2px;
}
.ent-progress-bar {
  height: 100%; background: var(--ib-red);
  border-radius: 2px; transition: width 0.4s ease;
}
.ent-ai-working { font-size: 11px; color: var(--ib-text-2); text-align: center; }

/* ── Success result ── */
.ent-result-success { display: flex; flex-direction: column; gap: 16px; }
.ent-result-check {
  font-size: 14px; font-weight: 600; color: var(--green);
  display: flex; align-items: center; gap: 6px;
}

.ent-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.ent-stat {
  background: var(--ib-bg); border-radius: var(--radius);
  padding: 12px 8px; text-align: center;
  border: 1px solid var(--ib-border);
  box-shadow: var(--shadow-stat);
}
.ent-stat-val { font-size: 20px; font-weight: 600; color: var(--ib-red); line-height: 1; }
.ent-stat-lbl { font-size: 10.5px; color: var(--ib-text-2); margin-top: 4px; font-weight: 300; }

.ent-summary {
  font-size: 12.5px; color: var(--ib-text-2);
  background: var(--ib-bg); border-radius: var(--radius);
  padding: 10px 14px; line-height: 1.6;
  max-height: 100px; overflow-y: auto;
  border: 1px solid var(--ib-border);
}

/* ── Downloads ── */
.ent-downloads { display: flex; gap: 8px; flex-wrap: wrap; }
.ent-dl-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 16px;
  background: var(--ib-red); color: #fff;
  border: 1.5px solid var(--ib-red); border-radius: var(--radius);
  font-size: 12.5px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s;
}
.ent-dl-btn:hover { background: var(--ib-red-dark); border-color: var(--ib-red-dark); }
.ent-dl-btn.secondary { background: var(--white); color: var(--ib-red); }
.ent-dl-btn.secondary:hover { background: var(--ib-red-bg); }

/* ── Error ── */
.ent-result-error {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: var(--ib-red); text-align: center;
}
.ent-result-error p { font-size: 13px; margin: 0; }

/* ── file input styling ── */
.field-input-file {
  display: block; width: 100%;
  font-size: 12.5px; color: var(--ib-text);
  padding: 6px 0;
}

/* ── Config Review: download bar ── */
#cr-download-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
#cr-download-bar span:first-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--ib-text-2);
  flex: 1;
}

/* ══════════════════════════════════════════════════════════════
   NEXT GEN ANALYSIS
══════════════════════════════════════════════════════════════ */

/* ── Nav badge ── */
.ng-nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  background: var(--ib-red);
  color: white;
  border-radius: 8px;
}

/* ── Enterprise hide ── */
body[data-portal-mode="enterprise"] #ng-provider-card,
body[data-portal-mode="enterprise"] #ng-model-card,
body[data-portal-mode="enterprise"] #ng-key-panel {
  display: none !important;
}

/* ── Page header layout ── */
.ng-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── View toggle (Next Gen / Compare) ── */
.ng-view-toggle {
  display: flex;
  background: var(--ib-bg-2);
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
  align-self: center;
}
.ng-view-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  color: var(--ib-text-2);
  background: transparent;
  transition: all 0.15s;
}
.ng-view-btn.active {
  background: white;
  color: var(--ib-charcoal);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.ng-view-btn:hover:not(.active) { color: var(--ib-text); background: rgba(0,0,0,0.03); }

/* ── Workflow stepper ── */
.ng-stepper {
  display: flex;
  align-items: center;
  padding: 20px 0 24px;
  overflow-x: auto;
}
.ng-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  min-width: 80px;
}
.ng-step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ib-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ib-text-3);
  background: white;
  transition: all 0.25s;
}
.ng-step.active .ng-step-circle {
  border-color: var(--ib-red);
  color: var(--ib-red);
  background: var(--ib-red-bg);
  box-shadow: 0 0 0 3px rgba(234,27,61,0.1);
}
.ng-step.done .ng-step-circle {
  border-color: #16a34a;
  background: #16a34a;
  color: white;
}
.ng-step-label {
  font-size: 11.5px;
  color: var(--ib-text-3);
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}
.ng-step.active .ng-step-label { color: var(--ib-red); font-weight: 500; }
.ng-step.done  .ng-step-label  { color: #15803d; font-weight: 500; }
.ng-step-connector {
  flex: 1;
  height: 2px;
  background: var(--ib-border);
  margin: 0 6px 18px;
  min-width: 32px;
  transition: background 0.25s;
}
.ng-step.done ~ .ng-step-connector,
.ng-step-connector.done { background: #16a34a; }

/* ── Main two-column layout ── */
.ng-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
  align-items: start;
}
.ng-config-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ng-results-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 480px;
}

/* ── Run button ── */
.ng-run-btn {
  width: 100%;
  padding: 13px;
  background: var(--ib-red);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ng-run-btn:hover:not(:disabled) { background: #c91535; }
.ng-run-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ng-run-note {
  font-size: 12px;
  color: var(--ib-text-3);
  text-align: center;
  margin-top: -8px;
}

/* ── Idle state ── */
.ng-idle-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 32px;
  border: 1px dashed var(--ib-border);
  border-radius: var(--radius);
  background: var(--ib-bg-2);
  gap: 14px;
}
.ng-idle-icon { color: var(--ib-red); opacity: 0.5; }
.ng-idle-title { font-size: 15px; font-weight: 600; color: var(--ib-text); margin: 0; }
.ng-idle-desc { font-size: 13px; color: var(--ib-text-2); line-height: 1.6; max-width: 360px; margin: 0; }
.ng-idle-flow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 320px;
  margin-top: 8px;
  text-align: left;
}
.ng-idle-flow-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: white;
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.ng-idle-flow-icon { color: var(--ib-red); flex-shrink: 0; margin-top: 1px; }
.ng-idle-flow-text { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.ng-idle-flow-text strong { color: var(--ib-charcoal); font-size: 12.5px; }
.ng-idle-flow-text span { color: var(--ib-text-2); }
.ng-idle-flow-arrow { text-align: center; font-size: 18px; color: var(--ib-text-3); line-height: 1; }

/* ── Progress card ── */
.ng-progress-card {
  background: white;
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  padding: 20px;
}
.ng-progress-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.ng-progress-spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--ib-red-bg);
  border-top-color: var(--ib-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ng-progress-label { font-size: 14px; font-weight: 600; color: var(--ib-charcoal); }
.ng-progress-sub   { font-size: 12px; color: var(--ib-text-2); margin-top: 2px; }
.ng-progress-steps { display: flex; flex-direction: column; gap: 10px; }
.ng-phase-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.ng-phase-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ib-border);
  flex-shrink: 0;
  transition: all 0.2s;
}
.ng-phase-dot.ng-phase-active {
  border-color: var(--ib-red);
  background: var(--ib-red);
  box-shadow: 0 0 0 3px rgba(234,27,61,0.15);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(234,27,61,0.15); }
  50% { box-shadow: 0 0 0 6px rgba(234,27,61,0.08); }
}
.ng-phase-dot.ng-phase-done { border-color: #16a34a; background: #16a34a; }
.ng-phase-dot.ng-phase-waiting { border-color: var(--ib-border); background: transparent; }
.ng-phase-label { flex: 1; color: var(--ib-text); font-weight: 500; }
.ng-phase-status { font-size: 12px; color: var(--ib-text-2); }

/* ── Result cards ── */
.ng-result-card {
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.ng-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--ib-bg-2);
  border-bottom: 1px solid var(--ib-border);
}
.ng-result-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--ib-red);
  color: white;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.ng-result-badge-2 { background: var(--ib-charcoal); }
.ng-result-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ib-charcoal);
  flex: 1;
}
.ng-result-check {
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
}
.ng-result-stats { padding: 10px 16px; border-bottom: 1px solid var(--ib-border); background: white; }
.ng-stat-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.ng-stat-item { color: var(--ib-text-2); }
.ng-stat-item strong { color: var(--ib-charcoal); }
.ng-stat-dot { color: var(--ib-text-3); }
.ng-dl-inline {
  font-size: 12px;
  color: var(--ib-red);
  text-decoration: none;
  font-weight: 500;
}
.ng-dl-inline:hover { text-decoration: underline; }
.ng-result-body { padding: 14px 16px; }
.ng-result-summary {
  font-size: 13px;
  color: var(--ib-text);
  line-height: 1.65;
  max-height: 120px;
  overflow-y: auto;
}
.ng-result-empty-text {
  font-size: 13px;
  color: var(--ib-text-2);
  font-style: italic;
  margin: 0;
}
.ng-tests-error {
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--ib-red);
  background: var(--ib-red-bg);
  border-top: 1px solid rgba(234,27,61,0.15);
}

/* ── Metrics bar ── */
.ng-metrics-bar {
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #f0fdf4;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.ng-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 20px;
}
.ng-metric-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--ib-charcoal);
  line-height: 1;
}
.ng-metric-green { color: #15803d; }
.ng-metric-lbl { font-size: 11px; color: #166534; font-weight: 500; }
.ng-metric-sep {
  width: 1px;
  height: 36px;
  background: #bbf7d0;
  flex-shrink: 0;
}
.ng-metrics-reset { margin-left: auto; padding-left: 20px; }
.ng-reset-btn {
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ib-text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ng-reset-btn:hover { border-color: var(--ib-red); color: var(--ib-red); }

/* ── Error card ── */
.ng-error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 24px;
  border: 1px solid rgba(234,27,61,0.2);
  border-radius: var(--radius);
  background: var(--ib-red-bg);
  color: var(--ib-red);
  text-align: center;
}
.ng-error-card div { font-size: 13px; }

/* ── Compare view ── */
.ng-compare-intro {
  padding: 12px 0 16px;
  font-size: 13.5px;
  color: var(--ib-text-2);
}
.ng-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.ng-compare-card {
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  padding: 24px;
  background: white;
}
.ng-compare-new {
  border-color: var(--ib-red);
  background: var(--ib-red-bg);
}
.ng-compare-tag {
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(0,0,0,0.06);
  color: var(--ib-text-2);
  margin-bottom: 10px;
}
.ng-compare-tag-new { background: var(--ib-red); color: white; }
.ng-compare-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--ib-charcoal);
  margin: 0 0 4px;
}
.ng-compare-sub { font-size: 12.5px; color: var(--ib-text-2); margin: 0 0 16px; }
.ng-compare-steps-list {
  margin: 0 0 20px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ng-compare-steps-list li {
  font-size: 13px;
  color: var(--ib-text);
  line-height: 1.4;
}
.ng-compare-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ng-compare-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.05);
  color: var(--ib-text-2);
}
.ng-compare-pill-new { background: rgba(234,27,61,0.12); color: var(--ib-red); }
.ng-compare-pill-old { background: rgba(0,0,0,0.05); color: #625e5c; }
.ng-compare-cta {
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}
.ng-compare-cta .ng-run-btn { width: auto; padding: 12px 32px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .ng-layout { grid-template-columns: 1fr; }
  .ng-compare-grid { grid-template-columns: 1fr; }
}

/* ── No-doc hint + file clear ── */
.ng-no-doc-hint {
  font-size: 12px;
  color: var(--ib-text-2);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 7px 10px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.ng-file-clear { margin-top: 6px; }
.ng-clear-btn {
  font-size: 12px;
  color: var(--ib-text-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.ng-clear-btn:hover { color: var(--ib-red); }

/* ═══════════════════════════════════════════════════════════════════════
   SCENARIO BUILDER (Test Case Generator)
══════════════════════════════════════════════════════════════════════ */

/* Source toggle */
.tg-source-toggle {
  display: flex;
  gap: 0;
  background: var(--ib-bg-2);
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}
.tg-source-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--ib-text-2);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 1px);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tg-source-btn.active {
  background: white;
  color: var(--ib-charcoal);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tg-source-btn:hover:not(.active) { color: var(--ib-text); background: rgba(0,0,0,0.03); }

/* Scenario form grid */
.tg-sc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.tg-sc-full {
  grid-column: 1 / -1;
}
.tg-sc-steps-ta {
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  font-size: 13px;
}

/* Hint bar */
.tg-sc-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ib-text-2);
  background: var(--ib-bg-2);
  border: 1px solid var(--ib-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-top: 12px;
  line-height: 1.4;
}
.tg-sc-hint svg { flex-shrink: 0; margin-top: 1px; }

/* Disabled cascade selects */
.tg-sc-grid select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--ib-bg-2);
}

@media (max-width: 640px) {
  .tg-sc-grid { grid-template-columns: 1fr; }
  .tg-sc-full { grid-column: 1; }
}

/* ══════════════════════════════════════
   CONFIG WORKBOOK REVIEW PAGE
══════════════════════════════════════ */

:root { --config-color: #0ea5e9; }

.btn-config {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
}
.btn-config:hover:not(:disabled) { background: linear-gradient(135deg, #0284c7, #0369a1); }

.config-pill {
  background: #e0f2fe;
  color: #0369a1;
}

.config-fill {
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.config-badge {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
}

/* Info card bullet list */
.cr-info-card { background: var(--ib-cream); }
.cr-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cr-check-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ib-text);
}
.cr-check-icon { color: #15803d; font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.cr-check-icon.cr-check-red { color: var(--ib-red); }

/* Issues box */
.cr-issues-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-top: 14px;
}
.cr-highrisk-box {
  background: #fff5f5;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-top: 10px;
}
.cr-issues-title {
  font-weight: 600;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 8px;
}
.cr-issues-title.cr-red { color: #b91c1c; }
.cr-issues-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cr-issues-list li {
  font-size: 13px;
  color: var(--ib-text);
  padding-left: 14px;
  position: relative;
}
.cr-issues-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #b45309;
}

/* Impact section */
.cr-section-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--ib-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 8px;
}
.cr-impact-content {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  font-size: 13px;
}
.cr-impact-risk-high   { color: #b91c1c; font-weight: 700; }
.cr-impact-risk-medium { color: #b45309; font-weight: 600; }
.cr-impact-risk-low    { color: #15803d; font-weight: 600; }

/* Full report collapsible */
.cr-report-details { margin-top: 16px; }
.cr-report-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ib-text-2);
  padding: 8px 0;
  user-select: none;
}
.cr-report-pre {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 8px;
}

/* Preloaded config workbook picker cards (Config Review + Release Assurance
   quick-start) — replaces the old bare inline-styled card with a proper
   hover/press state and room for an icon + item-count/complexity meta line. */
.cr-workbook-card {
  cursor: pointer;
  padding: 14px;
  margin: 0;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.cr-workbook-card:hover {
  border-color: var(--ib-red);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.cr-workbook-card:active { transform: translateY(0); }
.cr-workbook-card-icon {
  align-items: center;
  background: var(--ib-cream, #fdf8f0);
  border: 1px solid #ebe1d1;
  border-radius: 4px;
  display: flex;
  font-size: 16px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  margin-bottom: 10px;
  width: 32px;
}
.cr-workbook-card-title { font-weight: 700; font-size: 13px; color: var(--ib-charcoal); }
.cr-workbook-card-meta {
  font-size: 10.5px;
  color: var(--ib-text-2);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cr-workbook-card-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--amber-soft);
  color: var(--amber);
  border-radius: 10px;
  padding: 1px 7px;
}
.cr-workbook-card-desc {
  font-size: 11px;
  color: var(--ib-text-2);
  margin-top: 5px;
  line-height: 1.4;
}

/* Checkbox label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #0ea5e9;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   FDD GENERATOR
═══════════════════════════════════════════════════════════ */

/* ── File list ─────────────────────────────────────────── */
.fdd-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  margin-top: 6px;
}
.fdd-file-icon { font-size: 14px; flex-shrink: 0; line-height: 1; }
.fdd-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ib-text);
  font-size: 12.5px;
}
.fdd-file-size { color: var(--ib-text-2); font-size: 11px; flex-shrink: 0; }
.fdd-file-remove {
  background: none;
  border: none;
  color: var(--ib-text-2);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color .15s;
}
.fdd-file-remove:hover { color: var(--ib-red); }

/* ── Tab bar container ─────────────────────────────────── */
.fdd-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin: 24px 0 16px;
}

/* ── Tab buttons ───────────────────────────────────────── */
.fdd-tab {
  padding: 9px 20px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--ib-text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.fdd-tab.active {
  color: var(--ib-red);
  border-bottom-color: var(--ib-red);
  font-weight: 600;
}

/* ── Section accordion cards ───────────────────────────── */
.fdd-section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.fdd-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gray-bg);
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.fdd-section-header:hover { background: var(--border-soft); }
.fdd-section-num {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ib-red);
  background: var(--ib-red-bg);
  border: 1px solid var(--ib-red-soft);
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
  letter-spacing: .03em;
}
.fdd-section-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ib-text);
  flex: 1;
}
.fdd-section-chevron {
  color: var(--ib-text-2);
  font-size: 11px;
}
.fdd-section-body { padding: 14px 16px; }
.fdd-section-body.collapsed { display: none; }

/* ── Section body content ──────────────────────────────── */
.fdd-subhead {
  font-size: 12px;
  font-weight: 700;
  color: var(--ib-text-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 14px 0 6px;
}
.fdd-subhead:first-child { margin-top: 0; }
.fdd-para { font-size: 13px; line-height: 1.65; margin: 4px 0; color: var(--ib-text); }
.fdd-list {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ib-text);
  margin: 4px 0;
}
.fdd-kv {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-soft);
}
.fdd-kv:last-child { border-bottom: none; }
.fdd-kv-key {
  min-width: 130px;
  font-weight: 600;
  color: var(--ib-text-2);
  flex-shrink: 0;
  font-size: 12px;
}
.fdd-sub-card {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.fdd-empty {
  font-size: 13px;
  color: var(--ib-text-2);
  padding: 6px 0;
  font-style: italic;
}

/* ── Test case cards ───────────────────────────────────── */
.fdd-tc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--white);
}
.fdd-tc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.fdd-tc-id {
  font-size: 11px;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  background: var(--ib-red-bg);
  color: var(--ib-red);
  border: 1px solid var(--ib-red-soft);
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.fdd-tc-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ib-text);
  flex: 1;
}
.fdd-tc-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  color: var(--ib-text-2);
  white-space: nowrap;
}
.fdd-tc-section {
  font-size: 12.5px;
  margin: 6px 0;
  color: var(--ib-text);
  line-height: 1.6;
}
.fdd-tc-section strong { color: var(--ib-text-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.fdd-tc-section ul, .fdd-tc-section ol { padding-left: 18px; line-height: 1.7; margin: 4px 0; }


/* ═══════════════════════════════════════════════════════════════════
   ORACLE FUSION IMPLEMENTATION COPILOT
   Uses the InfoBeans design system: --ib-red, --ib-text, --white,
   --gray-bg, --border, --radius (2px). No custom variables.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Two-panel layout (fills main-content width, fixed height) ── */
.copilot-layout {
  display: flex;
  /* 72px top+bottom padding of main-content, ~160px for page-header + eyebrow */
  height: calc(100vh - 72px - 160px);
  min-height: 460px;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

/* ── Left sessions sidebar ── */
.copilot-sidebar {
  width: 230px;
  min-width: 180px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  background: var(--gray-bg);
  overflow-y: auto;
}

.copilot-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ib-text-2);
  margin-bottom: 6px;
}

.copilot-role-select {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ib-text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.copilot-role-select:focus { outline: none; border-color: var(--ib-red); }

.copilot-role-wrap { display: flex; flex-direction: column; margin-bottom: 6px; }

/* New chat button reuses .btn-primary — just override width */
.cp-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 0;
  background: var(--ib-red);
  color: #fff;
  border: 2px solid var(--ib-red);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 14px;
  transition: opacity .15s;
}
.cp-new-btn:hover { opacity: .85; }

.copilot-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}

.copilot-session-item {
  padding: 7px 9px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  color: var(--ib-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .12s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.copilot-session-item:hover { background: var(--border-soft); }
.copilot-session-item.active {
  background: var(--ib-red-bg);
  color: var(--ib-red);
  font-weight: 500;
}
.copilot-session-item .session-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copilot-session-item .session-del {
  margin-left: auto;
  opacity: 0;
  color: var(--ib-text-2);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 2px;
}
.copilot-session-item:hover .session-del { opacity: 1; }

.copilot-empty-hint {
  font-size: 12px;
  color: var(--ib-text-2);
  padding: 10px 0;
  text-align: center;
}

/* ── Main chat area ── */
.copilot-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
}

/* ── Messages scroll area ── */
.copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Welcome / empty state ── */
.copilot-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px 20px;
  margin: auto;
}
.copilot-welcome-icon {
  width: 56px;
  height: 56px;
  background: var(--ib-red-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--ib-red);
  border-radius: var(--radius);
}
.copilot-welcome-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--ib-text);
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.copilot-welcome-sub {
  font-size: 13px;
  color: var(--ib-text-2);
  max-width: 420px;
  line-height: 1.65;
  margin-bottom: 24px;
  font-weight: 300;
}
.copilot-starter-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 540px;
}
.copilot-starter {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--gray-bg);
  color: var(--ib-text-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.copilot-starter:hover {
  border-color: var(--ib-red);
  color: var(--ib-red);
  background: var(--ib-red-bg);
}

/* ── Message bubbles ── */
.cp-msg {
  display: flex;
  gap: 10px;
  max-width: 100%;
  align-items: flex-start;
}
.cp-msg.user { flex-direction: row-reverse; }

.cp-msg-avatar {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  box-sizing: border-box;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.cp-msg.assistant .cp-msg-avatar {
  background: var(--ib-red-bg);
  color: var(--ib-red);
}
.cp-msg.user .cp-msg-avatar {
  background: var(--ib-red);
  color: #fff;
}

.cp-msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(100% - 42px);
}
.cp-msg.user .cp-msg-body { align-items: flex-end; }

.cp-msg-bubble {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.65;
  word-break: break-word;
}
.cp-msg.assistant .cp-msg-bubble {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  color: var(--ib-text);
}
.cp-msg.user .cp-msg-bubble {
  background: var(--ib-red);
  color: #fff;
}

/* Test-gen chat: inventory + generated-case rendering (nothing like this
   exists in the RAG copilot, which only ever renders markdown text). */
.tc-inventory-card, .tc-case-table {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.tc-inv-row, .tc-case-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
}
.tc-inv-row:last-child, .tc-case-row:last-child { border-bottom: none; }
.tc-inv-id {
  font-family: monospace;
  font-weight: 600;
  color: var(--ib-red);
  flex-shrink: 0;
}
.tc-inv-name { flex: 1; }
.tc-inv-count {
  font-size: 11px;
  color: var(--text-2);
  flex-shrink: 0;
}
.tc-case-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--gray-bg);
  border-bottom: 1px solid var(--border);
}
.tc-export-link {
  font-weight: 500;
  color: var(--ib-red);
  cursor: pointer;
}
.tc-export-link:hover { text-decoration: underline; }
.tc-case-name { flex: 1; }
.tc-case-req {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-2);
  flex-shrink: 0;
}
.tc-case-type {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.tc-type-positive     { background: #e4f7ec; color: #1f8a52; }
.tc-type-negative     { background: #ffe4e8; color: var(--ib-red); }
.tc-type-boundary     { background: #fff3e0; color: #b26a00; }
.tc-type-security     { background: #eee4ff; color: #6b3fd4; }
.tc-type-reconciliation { background: #e0f2ff; color: #0b6bb3; }
.tc-type-resilience   { background: #f0f0f0; color: #555; }

/* Markdown inside assistant bubble */
.cp-msg-bubble h1, .cp-msg-bubble h2, .cp-msg-bubble h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin: 10px 0 4px;
  color: var(--ib-text);
}
.cp-msg-bubble p  { margin: 4px 0; }
.cp-msg-bubble ul, .cp-msg-bubble ol { padding-left: 18px; margin: 6px 0; }
.cp-msg-bubble li { margin: 3px 0; line-height: 1.6; }
.cp-msg-bubble strong { font-weight: 600; }
.cp-msg-bubble code {
  background: var(--border-soft);
  padding: 1px 5px;
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--ib-text);
}
.cp-msg-bubble pre {
  background: var(--border-soft);
  padding: 10px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 8px 0;
}
.cp-msg-bubble pre code { background: none; padding: 0; }

/* Meta row below assistant message */
.cp-msg-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.cp-intent-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius);
  background: var(--border-soft);
  border: 1px solid var(--border);
  color: var(--ib-text-2);
  text-transform: capitalize;
  font-weight: 500;
}
.cp-intent-badge.rw {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
.cp-intent-badge.mod {
  background: var(--amber-soft);
  border-color: #fde68a;
  color: var(--amber);
}
.cp-sources-link {
  font-size: 11px;
  color: var(--ib-red);
  cursor: pointer;
  text-decoration: underline;
}
.cp-feedback-btns { display: flex; gap: 3px; margin-left: auto; }
.cp-feedback-btns button {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--ib-text-2);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: var(--radius);
  transition: border-color .12s, color .12s;
  font-family: inherit;
}
.cp-feedback-btns button:hover  { border-color: var(--ib-red); color: var(--ib-red); }
.cp-feedback-btns button.active { border-color: var(--ib-red); color: var(--ib-red); background: var(--ib-red-bg); }

/* Typing indicator */
.cp-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}
.cp-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ib-text-2);
  animation: cpBounce 1.2s infinite;
}
.cp-typing span:nth-child(2) { animation-delay: .2s; }
.cp-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes cpBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Sources panel */
.cp-sources-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  margin-top: 4px;
}
.cp-sources-panel a { color: var(--ib-red); word-break: break-all; }
.cp-sources-panel .src-item {
  padding: 5px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cp-sources-panel .src-item:last-child { border-bottom: none; }

/* Inline source citation chips (below answer bubble) */
.cp-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}
.cp-source-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ib-text-2);
  white-space: nowrap;
}
.cp-source-chip {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--ib-red-soft, #fecaca);
  background: var(--ib-red-bg, #fff1f2);
  color: var(--ib-red);
  text-decoration: none;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .12s, border-color .12s;
}
.cp-source-chip:hover {
  background: var(--ib-red-soft, #fecaca);
  border-color: var(--ib-red);
  text-decoration: none;
}
.cp-source-chip.no-link {
  cursor: default;
  color: var(--ib-text-2);
  border-color: var(--border);
  background: var(--gray-bg, #f5f5f5);
}

/* ── Suggested follow-up question pills ── */
.cp-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.cp-suggestions-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ib-text-2);
  white-space: nowrap;
  margin-right: 2px;
}
.cp-suggestion-pill {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ib-text);
  cursor: pointer;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .12s, border-color .12s, color .12s;
  line-height: 1.4;
  text-align: left;
}
.cp-suggestion-pill:hover {
  background: var(--ib-red-bg, #fff1f2);
  border-color: var(--ib-red);
  color: var(--ib-red);
}

/* ── Input bar ── */
.copilot-input-area {
  border-top: 1px solid var(--border);
  padding: 10px 16px 12px;
  background: var(--white);
}
.copilot-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--gray-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  transition: border-color .12s;
}
.copilot-input-wrap:focus-within { border-color: var(--ib-red); }

.copilot-textarea {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  resize: none;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ib-text);
  line-height: 1.5;
  max-height: 160px;
  overflow-y: auto;
  padding: 2px 0;
}
.copilot-textarea::placeholder { color: var(--ib-text-2); }

.copilot-send-btn {
  background: var(--ib-red);
  border: 2px solid var(--ib-red);
  border-radius: var(--radius);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: opacity .15s;
}
.copilot-send-btn:hover { opacity: .85; }
.copilot-send-btn:disabled { opacity: .4; cursor: not-allowed; }

.copilot-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ib-text-2);
}

/* ══════════════════════════════════════
   COPILOT ADMIN PAGE
══════════════════════════════════════ */
.cp-admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 4px;
}
.cp-admin-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cp-stat-val {
  font-size: 28px;
  font-weight: 600;
  color: var(--ib-red);
  line-height: 1.1;
}
.cp-stat-lbl {
  font-size: 10px;
  color: var(--ib-text-2);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 500;
}

.cp-logs-table-wrap { overflow-x: auto; }

.cp-logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.cp-logs-table th {
  text-align: left;
  padding: 7px 12px;
  border-bottom: 1.5px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--ib-text-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--gray-bg);
  white-space: nowrap;
}
.cp-logs-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ib-text-2);
  vertical-align: middle;
}
.cp-logs-table tr:last-child td { border-bottom: none; }
.cp-logs-table tr:hover td { background: var(--gray-bg); }

.cp-badge-ok   { background: #dcfce7; color: #15803d; padding: 2px 7px; border-radius: var(--radius); font-size: 10px; font-weight: 600; display: inline-block; }
.cp-badge-fail { background: var(--ib-red-bg); color: var(--ib-red); padding: 2px 7px; border-radius: var(--radius); font-size: 10px; font-weight: 600; display: inline-block; }

/* Admin card body spacing */
.cp-admin-card-body {
  padding-top: 4px;
}
.cp-admin-desc {
  font-size: 13px;
  color: var(--ib-text-2);
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 300;
}
.cp-ingest-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cp-ingest-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ib-text-2);
  min-height: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   Test Case Detail Modal
   ═══════════════════════════════════════════════════════════════ */

/* Overlay */
.tc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(47, 47, 57, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tc-modal-overlay.hidden { display: none; }

/* Modal box */
.tc-modal-box {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 8px 8px 0 var(--ib-red-soft);
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.tc-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--gray-bg);
}
.tc-modal-header-left { flex: 1; min-width: 0; }
.tc-modal-header-right { display: flex; align-items: flex-start; gap: 12px; flex-shrink: 0; }

.tc-modal-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ib-red);
  display: block;
  margin-bottom: 4px;
}
.tc-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ib-charcoal);
  margin: 0 0 4px;
  line-height: 1.4;
}
.tc-modal-meta {
  font-size: 12px;
  color: var(--ib-text-2);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tc-modal-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.tc-modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--ib-text-2);
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.tc-modal-close-btn:hover { color: var(--ib-red); background: var(--ib-red-bg); }

/* Body */
.tc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Steps table */
.tc-table-wrapper { overflow-x: auto; }
.tc-steps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tc-steps-table thead tr {
  background: var(--ib-charcoal);
  color: var(--white);
}
.tc-steps-table thead th {
  position: sticky;
  top: 0;
  background: var(--ib-charcoal);
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 1;
}
.tc-steps-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.1s;
}
.tc-steps-table tbody tr:hover { background: var(--gray-bg); }
.tc-steps-table tbody tr.tc-step-failed { background: #fff5f5; }
.tc-steps-table tbody tr.tc-step-passed { background: #f0fdf4; }
.tc-steps-table td { padding: 10px 12px; vertical-align: top; color: var(--ib-text); font-variant-numeric: tabular-nums; }

/* Column widths */
.tc-col-num      { width: 42px; text-align: center; color: var(--ib-text-2); font-weight: 600; }
.tc-col-action   { min-width: 200px; }
.tc-col-expected { min-width: 180px; }
.tc-col-actual   { min-width: 160px; }
.tc-col-status   { width: 110px; text-align: center; }

/* Actual result input */
.tc-actual-input {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ib-text);
  resize: vertical;
  background: var(--white);
  transition: border-color 0.15s;
}
.tc-actual-input:focus {
  outline: none;
  border-color: var(--ib-red);
  box-shadow: 0 0 0 2px var(--ib-red-bg);
}

/* Pass / Fail toggle buttons */
.tc-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--ib-text-2);
  transition: all 0.15s;
  margin: 2px;
}
.tc-toggle-btn:hover { border-color: var(--ib-charcoal); color: var(--ib-charcoal); }
.tc-toggle-btn.pass-active  { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.tc-toggle-btn.fail-active  { background: var(--ib-red-bg); border-color: var(--ib-red); color: var(--ib-red); }

/* Badge pill */
.tc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.tc-badge-positive { background: var(--green-soft); color: var(--green); }
.tc-badge-negative { background: var(--ib-red-bg); color: var(--ib-red); }
.tc-badge-boundary { background: var(--amber-soft); color: var(--amber); }
.tc-badge-security { background: var(--impact-soft); color: var(--impact); }
.tc-badge-default  { background: var(--gray-bg); color: var(--ib-text-2); }

/* Section labels */
.tc-section { display: flex; flex-direction: column; gap: 8px; }
.tc-section.hidden { display: none; }
.tc-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ib-text-2);
  margin: 0;
}

/* Test data block */
.tc-test-data {
  background: var(--ib-charcoal);
  color: #e2e8f0;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* Expected result block */
.tc-expected-result {
  font-size: 13px;
  color: var(--ib-text);
  line-height: 1.6;
  padding: 10px 14px;
  background: var(--gray-bg);
  border-left: 3px solid var(--ib-charcoal);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Screenshot placeholder */
.tc-screenshot-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--ib-text-2);
  background: var(--gray-bg);
}

/* Footer */
.tc-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--gray-bg);
}
.tc-modal-nav { display: flex; align-items: center; gap: 14px; }
.tc-modal-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--ib-text-2);
  min-width: 54px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   PLATFORM PAGES — Dashboard, KG, Release Intel, Review, Mesh
   ═══════════════════════════════════════════════════════════ */

/* Sidebar review badge */
.review-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--ib-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  margin-left: auto;
}

/* Review count badge inside page */
.review-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--ib-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  margin-left: 8px;
}

/* ── Heatmap ── */
.platform-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.platform-heatmap-cell {
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 48px;
  justify-content: center;
}
.platform-heatmap-cell .hm-name { font-weight: 600; font-size: 11px; line-height: 1.3; }
.platform-heatmap-cell .hm-count { font-size: 10px; opacity: 0.75; }
.hm-strong { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.hm-partial { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.hm-gap     { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.platform-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ib-text-2);
}
.platform-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 3px;
}
.platform-legend-dot.strong { background: #16a34a; }
.platform-legend-dot.partial { background: #ca8a04; }
.platform-legend-dot.gap { background: var(--ib-red); }

/* ── 2-column platform layout ── */
.platform-2col {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  align-items: start;
}
.platform-2col.kg-2col {
  grid-template-columns: 5fr 2fr;
}
@media (max-width: 960px) {
  .platform-2col { grid-template-columns: 1fr; }
}

/* ── Entity type tab bar (KG browser) ── */
.platform-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 14px;
  padding-bottom: 0;
}
.platform-type-tab {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--ib-text-2);
  background: none;
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}
.platform-type-tab:hover { color: var(--ib-charcoal); }
.platform-type-tab.active {
  color: var(--ib-red);
  border-bottom-color: var(--ib-red);
  background: none;
}

/* ── Entity composition breakdown rows (Dashboard) ── */
.kg-breakdown-list { display: flex; flex-direction: column; gap: 0; }
.kg-breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f6f0e6;
}
.kg-breakdown-row:last-child { border-bottom: none; }
.kg-breakdown-dot {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.kg-breakdown-label {
  flex: 0 0 110px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ib-charcoal);
}
.kg-breakdown-bar-track {
  flex: 1;
  height: 6px;
  background: #f6f0e6;
  border-radius: 3px;
  overflow: hidden;
}
.kg-breakdown-bar { height: 100%; border-radius: 3px; }
.kg-breakdown-count {
  flex: 0 0 40px;
  text-align: right;
  font-weight: 700;
  font-size: 14px;
  color: var(--ib-charcoal);
}
.kg-breakdown-pct {
  flex: 0 0 36px;
  text-align: right;
  font-size: 11px;
  color: var(--ib-text-2);
}

/* ── Compact heatmap variant (right column) ── */
.platform-heatmap-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 5px;
}
.platform-heatmap-grid--compact .platform-heatmap-cell {
  min-height: 42px;
  padding: 6px 7px;
}
.platform-heatmap-grid--compact .hm-name { font-size: 10px; }
.platform-heatmap-grid--compact .hm-count { font-size: 9px; }

/* KG page stats use standard .stats-row / .stat-card */

/* ── KG entity table ── */
.kg-prop-key {
  color: #6b6762;
  font-weight: 500;
  text-transform: capitalize;
}
.platform-entity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.platform-entity-table th {
  text-align: left;
  padding: 6px 10px;
  background: var(--gray-bg);
  color: var(--ib-text-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.platform-entity-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f6f0e6;
  color: var(--ib-text-1);
  vertical-align: top;
  max-width: 260px;
  word-break: break-word;
}
.platform-entity-table tr:last-child td { border-bottom: none; }
.platform-entity-type-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* ── Release delta ── */
/* Intel 2-col: wider left panel for module list */
.intel-2col { grid-template-columns: 3fr 2fr; }
@media (max-width: 960px) { .intel-2col { grid-template-columns: 1fr; } }

.intel-module-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f6f0e6;
}
.intel-module-row:last-child { border-bottom: none; }
.intel-module-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ib-charcoal);
  padding-top: 2px;
}
.intel-module-detail {
  flex: 1;
  font-size: 12px;
  color: var(--ib-text-2);
  line-height: 1.5;
}
.intel-depr-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  background: #fef9c3;
  color: #92400e;
}
.intel-sev-badge {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.sev-critical { background: #fce7f3; color: #be185d; }
.sev-high     { background: #fee2e2; color: #dc2626; }
.sev-medium   { background: #fef9c3; color: #92400e; }
.sev-low      { background: #dcfce7; color: #166534; }

/* ── SME Review queue ── */
.review-entry {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f6f0e6;
}
.review-entry:last-child { border-bottom: none; }
.review-entry-info { flex: 1; min-width: 0; }
.review-entry-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ib-charcoal);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review-entry-meta {
  font-size: 11px;
  color: var(--ib-text-2);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.review-conf-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
}
.review-conf-track {
  display: inline-block;
  width: 60px;
  height: 5px;
  background: #ebe1d1;
  border-radius: 3px;
  overflow: hidden;
}
.review-conf-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--ib-red);
  transition: width 0.3s;
}
.review-entry-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* ── Agent Mesh ── */
.platform-mesh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.mesh-agent-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  box-shadow: 4px 4px 0 var(--ib-red-soft);
}
.mesh-agent-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ib-charcoal);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mesh-agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.mesh-cap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.mesh-cap-tag {
  padding: 2px 8px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ib-text-2);
}
.mesh-dispatch-result-ok   { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 4px; padding: 10px; white-space: pre-wrap; font-family: monospace; font-size: 12px; }
.mesh-dispatch-result-err  { color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; border-radius: 4px; padding: 10px; white-space: pre-wrap; font-family: monospace; font-size: 12px; }

/* Modal footer (re-used by review reject modal) */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--gray-bg);
}

/* ── Phase 6: Client-presentation polish components ──────────────────────────
   Additive only — reuses existing tokens (--ib-red, --ib-charcoal, --radius,
   --shadow-stat, --green/--amber). Nothing above is renamed or removed, so
   every existing page keeps its current look; these classes are opt-in. */

/* Status pill: colored dot + label, one component reused for every
   readiness/result/status value across the Command Center, Automation,
   Release Assurance, Repository and Execution History surfaces. */
.pd-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 3px 10px 3px 8px;
  border-radius: 999px; white-space: nowrap; letter-spacing: 0.01em;
  background: var(--gray-bg); color: var(--ib-text-2);
}
.pd-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pd-pill-pass    { background: var(--green-soft); color: var(--green); }
.pd-pill-fail    { background: var(--danger-bg);  color: var(--danger); }
.pd-pill-blocked { background: var(--amber-soft); color: var(--amber); }
.pd-pill-neutral { background: var(--gray-bg); color: var(--ib-text-2); }

/* Quick Actions: compact horizontal action buttons (icon-left, label-right)
   — reads as a row of shortcuts, deliberately distinct from the taller
   icon-top showcase cards below (.pd-feature-tile) so the two sections
   don't blur into "two rows of the same tile." Reuses the sidebar's
   existing inline-SVG icon language, no new icon set. */
.pd-tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pd-action-tile {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--gray-bg); cursor: pointer; text-align: left;
  font-family: inherit; transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.pd-action-tile:hover { border-color: var(--ib-red); background: var(--white); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.pd-action-tile svg { width: 15px; height: 15px; color: var(--ib-red); flex-shrink: 0; }
.pd-action-tile-label { font-size: 12.5px; font-weight: 500; color: var(--ib-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pd-feature-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pd-feature-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--white);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pd-feature-tile:hover { border-color: var(--ib-red); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.pd-feature-tile-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--ib-red-bg); color: var(--ib-red);
  display: flex; align-items: center; justify-content: center;
}
.pd-feature-tile-icon svg { width: 18px; height: 18px; }
.pd-feature-tile-title { font-size: 13.5px; font-weight: 600; color: var(--ib-text); }
.pd-feature-tile-desc  { font-size: 11.5px; color: var(--ib-text-2); line-height: 1.5; font-weight: 300; }
/* Status now lives in the tile's colored .pd-pill (see _pdRenderFeatureStrip)
   — this line is just supporting detail, not itself a status signal, so it
   reads as plain body text rather than always-red. */
.pd-feature-tile-metric { font-size: 12px; color: var(--ib-text-2); font-weight: 400; line-height: 1.4; }

/* Project Health Dashboard — its own top-level tab (Health Dashboard),
   opened by default when a project loads, directly under the hero stat
   band (above "What You Can Do", which moved to the bottom of the page).
   Enterprise-dashboard layout: header with context chips → KPI cards
   (tinted icon, big value, progress bar) → four ring donuts with a
   centered headline → per-suite performance table. Light surface only —
   a dark command-center variant and a 3D-pie variant were both tried and
   reverted per feedback. Chart colors are a fixed categorical palette
   (--hd-*) so pass/fail/coverage read identically under the InfoBeans
   and Opkey brand tokens; only "brand" tone follows --ib-red. */
.pd-health-dashboard, .ra-dash {
  --hd-green:  #16a34a; --hd-green-bg:  #dcfce7;
  --hd-blue:   #2563eb; --hd-blue-bg:   #dbeafe;
  --hd-violet: #7c3aed; --hd-violet-bg: #ede9fe;
  --hd-amber:  #d97706; --hd-amber-bg:  #fef3c7;
  --hd-red:    #dc2626; --hd-red-bg:    #fee2e2;
  --hd-brand:  var(--ib-red); --hd-brand-bg: var(--ib-red-bg);
  --hd-neutral: #cbd5e1;
  --hd-track:  var(--border-soft);
}
.pd-health-dashboard {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.pd-hd-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.pd-hd-title { font-size: 18px; font-weight: 700; color: var(--ib-text); letter-spacing: -0.01em; }
.pd-hd-subtitle { font-size: 12.5px; color: var(--ib-text-2); margin-top: 3px; }
.pd-hd-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--gray-bg); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--ib-text);
}
.pd-chip-k { color: var(--ib-text-2); font-weight: 500; }
/* Release Readiness verdict, moved into the header chip row from the
   now-removed hero band (see portal.js's _pdRenderHealthDashboard). */
.pd-chip-pass    { background: var(--hd-green-bg, var(--green-soft));  border-color: transparent; color: var(--hd-green, var(--green)); }
.pd-chip-blocked { background: var(--hd-amber-bg, var(--amber-soft));  border-color: transparent; color: var(--amber); } /* --hd-amber (#d97706) is only 3.2:1 as text */
.pd-chip-fail    { background: var(--hd-red-bg, var(--danger-bg));     border-color: transparent; color: var(--hd-red, var(--danger)); }
/* Zero-data state — must not borrow the pass tone; an empty project is not a healthy one. */
.pd-chip-neutral { background: var(--gray-bg, #f6f0e6); border-color: transparent; color: var(--ib-text-2); }

/* KPI cards */
.pd-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.pd-kpi {
  position: relative; min-width: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px 14px; box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pd-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.08); }
/* Every Health Dashboard card (KPI tile or donut) that carries an onClick
   routes to the real page/tab backing its number — see _pdRenderHealthDashboard. */
.pd-clickable { cursor: pointer; }
.pd-clickable:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
.pd-dc.pd-clickable { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.pd-dc.pd-clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.08); }
.pd-kpi-green  { --kpi: var(--hd-green);  --kpi-bg: var(--hd-green-bg); }
.pd-kpi-blue   { --kpi: var(--hd-blue);   --kpi-bg: var(--hd-blue-bg); }
.pd-kpi-violet { --kpi: var(--hd-violet); --kpi-bg: var(--hd-violet-bg); }
.pd-kpi-amber  { --kpi: var(--hd-amber);  --kpi-bg: var(--hd-amber-bg); }
.pd-kpi-red    { --kpi: var(--hd-red);    --kpi-bg: var(--hd-red-bg); }
.pd-kpi-brand  { --kpi: var(--hd-brand);  --kpi-bg: var(--hd-brand-bg); }
.pd-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-kpi-label { font-size: 12px; font-weight: 600; color: var(--ib-text-2); }
.pd-kpi-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--kpi-bg); color: var(--kpi);
  display: flex; align-items: center; justify-content: center;
}
.pd-kpi-icon svg { width: 17px; height: 17px; }
.pd-kpi-value {
  font-size: 28px; font-weight: 700; color: var(--ib-text); line-height: 1.1;
  letter-spacing: -0.02em; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.pd-kpi-sub { font-size: 11.5px; color: var(--ib-text-2); margin-top: 5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.pd-kpi-bar { height: 5px; border-radius: 3px; background: var(--hd-track); margin-top: 12px; overflow: hidden; }
.pd-kpi-bar-fill { height: 100%; border-radius: 3px; background: var(--kpi); }

/* Chart cards */
.pd-hd-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.pd-dc {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; box-shadow: var(--shadow-sm); min-width: 0;
}
.pd-dc-head { margin-bottom: 14px; }
.pd-dc-title { font-size: 13.5px; font-weight: 700; color: var(--ib-text); }
.pd-dc-subtitle { font-size: 11.5px; color: var(--ib-text-2); margin-top: 2px; }
.pd-dc-body { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.pd-dc-empty { font-size: 12.5px; color: var(--ib-text-2); padding: 18px 0; }
.pd-donut-svg { display: block; flex-shrink: 0; margin: 4px auto 0; }
.pd-donut-center-value { font-size: 24px; font-weight: 700; fill: var(--ib-text); letter-spacing: -0.02em; }
.pd-donut-center-caption { font-size: 10.5px; font-weight: 500; fill: var(--ib-text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.pd-legend { display: flex; flex-direction: column; gap: 8px; padding: 0 6px; }
.pd-legend-row { display: grid; grid-template-columns: 8px 1fr auto 42px; align-items: center; gap: 9px; font-size: 12.5px; padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.pd-legend-row:last-child { border-bottom: none; padding-bottom: 0; }
.pd-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.pd-legend-label { color: var(--ib-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-legend-value { font-weight: 700; color: var(--ib-text); font-variant-numeric: tabular-nums; }
.pd-legend-pct { color: var(--ib-text-2); text-align: right; font-variant-numeric: tabular-nums; font-size: 11.5px; }

/* Suite performance table */
.pd-suite-card { margin-top: 14px; }
.pd-suite-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pd-suite-link { align-self: center; font-size: 12px; padding: 7px 12px; }
.pd-suite-table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 8px; }
.pd-suite-table thead th { background: var(--gray-bg); }
.pd-suite-row { cursor: pointer; }
.pd-suite-row:hover { background: var(--gray-bg); }
.pd-suite-name { font-weight: 600; color: var(--ib-text); }
.pd-td-muted { color: var(--ib-text-2); white-space: nowrap; }
.pd-td-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table thead th.pd-td-num { text-align: right; }
.pd-stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--hd-track); min-width: 140px; }
.pd-stack-seg { display: block; height: 100%; }
.pd-stack-seg.pass    { background: var(--hd-green); }
.pd-stack-seg.fail    { background: var(--hd-red); }
.pd-stack-seg.blocked { background: var(--hd-amber); }

/* Calmer list rows (Attention Required / Test Cases / Recent Activity) —
   small leading icon + tightened padding so a dense list doesn't compete
   visually with the pills/tiles above it. */
.pd-list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.pd-list-row:last-child { border-bottom: none; }
.pd-list-row-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--gray-bg); color: var(--ib-text-2);
  display: flex; align-items: center; justify-content: center;
}
.pd-list-row-icon svg { width: 13px; height: 13px; }

/* Elegant data table (Phase 8) — Test Management / Run History. Previously
   .data-table had no styling at all (raw browser-default table), which read
   as unfinished at 1,000+ row scale. Sticky header, soft dividers instead of
   a hard grid, a hover state, tabular figures for anything numeric/date. */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 10px 12px;
  background: var(--white);
  color: var(--ib-text-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f6f0e6;
  color: var(--ib-text);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr {
  transition: background-color 0.1s ease;
}
.data-table tbody tr:hover {
  background: var(--gray-bg);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── 2026 product-surface polish ────────────────────────────────────────
   A restrained finishing layer shared by the whole portal. It deliberately
   changes presentation only: existing page layout and behavior stay intact. */
body { background: #fdf8f0; color: var(--ib-text); }
.main { background: #fdf8f0; }
.main-content {
  box-sizing: border-box;
  max-width: none;
  min-width: 0;
  padding-top: 104px;
  width: calc(100% - var(--sidebar-w));
}
.page { padding: 0 clamp(22px, 3vw, 44px) 56px; }
.page-header { margin-bottom: 24px; }
.page-title { letter-spacing: -.025em; line-height: 1.15; }
.page-subtitle { line-height: 1.55; max-width: 850px; }
.card {
  border-color: #ebe1d1;
  box-shadow: 0 1px 2px rgba(47,47,57,.035);
}
.card-title { letter-spacing: -.01em; }
.field-input {
  border-color: #e3d8c6;
  min-height: 38px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field-input:hover { border-color: #bbb6ac; }
.field-input:focus {
  border-color: var(--ib-charcoal);
  box-shadow: 0 0 0 3px rgba(47,47,57,.08);
  outline: none;
}
.btn-primary, .btn-outline, .btn-ghost {
  min-height: 36px;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-primary:hover, .btn-outline:hover { transform: translateY(-1px); }
.btn-primary:focus-visible, .btn-outline:focus-visible, .btn-ghost:focus-visible,
.nav-item:focus-visible {
  outline: 2px solid var(--ib-red);
  outline-offset: 2px;
}
/* One visible keyboard-focus ring for everything interactive that has no ring of
   its own (links, icon buttons, clickable rows/cards, toggles, summaries). */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [role="button"]:focus-visible,
[role="link"]:focus-visible, [tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--ib-red);
  outline-offset: 2px;
}
/* On the charcoal sidebar the red ring is only ~3:1; use white there. */
.sidebar a:focus-visible, .sidebar button:focus-visible, .sidebar [role="link"]:focus-visible,
body.nav-open .ui-nav-toggle:focus-visible {
  outline-color: #fff;
  outline-offset: -2px;
}
.sidebar { box-shadow: 8px 0 28px rgba(31,30,38,.08); }
.nav-item { margin: 1px 9px; width: calc(100% - 18px); }
.nav-item.active { border-radius: 3px; }
.status-badge { font-weight: 600; letter-spacing: .005em; }

.product-topbar {
  align-items: center;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #ebe1d1;
  display: flex;
  gap: 20px;
  height: 68px;
  justify-content: flex-end;
  left: var(--sidebar-w);
  padding: 0 28px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 80;
}
.product-contexts { align-items: center; display: flex; gap: 8px; min-width: 0; }
.product-context-control {
  align-items: center;
  background: #fdf8f0;
  border: 1px solid #ebe1d1;
  border-radius: 3px;
  display: flex;
  gap: 7px;
  height: 38px;
  padding: 0 9px;
}
.product-context-control > span { color: #8b8793; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.product-context-control select { background: transparent; border: 0; color: var(--ib-text); font: inherit; font-size: 11px; font-weight: 600; max-width: 280px; outline: none; }
.product-environment-context {
  align-items: center;
  border: 1px solid #a7d7b7;
  border-radius: 3px;
  color: #187342;
  display: flex;
  font-size: 10px;
  font-weight: 600;
  gap: 6px;
  height: 38px;
  padding: 0 11px;
  white-space: nowrap;
}
.product-environment-context i { background: #29965b; border-radius: 50%; height: 6px; width: 6px; }
.product-command-trigger {
  align-items: center;
  background: #f3f0e9;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #77727f;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 10px;
  gap: 24px;
  height: 38px;
  justify-content: space-between;
  min-width: 210px;
  padding: 0 9px 0 12px;
}
.product-command-trigger:hover { border-color: #c8c3b9; color: var(--ib-text); }
.product-command-trigger kbd { background: #fff; border: 1px solid #e3d8c6; border-radius: 2px; font: inherit; padding: 2px 5px; }
.product-command-overlay { background: rgba(30,29,36,.45); inset: 0; padding-top: 12vh; position: fixed; z-index: 400; }
.product-command-panel { background: #fff; border: 1px solid #e3d8c6; border-radius: 5px; box-shadow: 0 24px 70px rgba(30,29,36,.22); margin: auto; max-width: 610px; overflow: hidden; width: calc(100% - 32px); }
.product-command-input-wrap { align-items: center; border-bottom: 1px solid #ebe1d1; display: flex; gap: 10px; padding: 13px 16px; }
.product-command-input-wrap > span { color: var(--ib-red); font-size: 21px; }
.product-command-input-wrap input { border: 0; color: var(--ib-text); flex: 1; font: inherit; font-size: 15px; outline: none; }
.product-command-results { max-height: 390px; overflow: auto; padding: 7px; }
.product-command-result { align-items: center; background: transparent; border: 0; border-radius: 3px; color: var(--ib-text); cursor: pointer; display: flex; font: inherit; justify-content: space-between; padding: 10px 11px; text-align: left; width: 100%; }
.product-command-result span { display: flex; flex-direction: column; gap: 2px; }
.product-command-result strong { font-size: 12px; }
.product-command-result small { color: var(--ib-text-2); font-size: 10px; }
.product-command-result.active, .product-command-result:hover { background: #fff0f3; }
.product-command-result b { color: var(--ib-red); }
.product-command-empty { color: var(--ib-text-2); font-size: 12px; padding: 28px; text-align: center; }
.product-command-footer { background: #fdf8f0; border-top: 1px solid #ebe1d1; color: #8b8793; font-size: 9px; padding: 8px 16px; }

@media (max-width: 1060px) {
  .main-content { padding-top: 96px; }
  .page { padding: 0 22px 46px; }
  .product-topbar { padding: 0 18px; }
  .product-release-context, .product-environment-context { display: none; }
  .product-command-trigger { min-width: 180px; }
}

@media (max-width: 820px) {
  .product-topbar { left: 0; position: relative; padding-left: 64px; flex-wrap: wrap; height: auto; min-height: 68px; padding-top: 8px; padding-bottom: 8px; }
  .main-content { padding-top: 22px; width: 100%; }
  .product-contexts { width: 100%; }
  .product-context-control { flex: 1; }
  .product-command-trigger { min-width: 42px; width: 42px; justify-content: center; padding: 0; }
  /* the label is hidden here, so the button gets a magnifier instead of showing an empty box */
  .product-command-trigger::before { content: ""; width: 18px; height: 18px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f2f39' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.5-4.5'/%3E%3C/svg%3E"); }
  .product-command-trigger span, .product-command-trigger kbd { display: none; }
  .product-contexts { flex-wrap: wrap; }
  /* basis 150px: two selectors wrap onto two rows instead of squeezing the second to an empty box */
  .product-context-control { min-width: 0; flex: 1 1 150px; }
  .product-context-control select { max-width: 100%; min-width: 0; }
}

/* ── AI provider selection removed portal-wide ──────────────────────────────
   Previously the provider picker was only hidden in enterprise mode (see the
   body[data-portal-mode="enterprise"] block above), so a lite-mode user could
   still open a tab strip and send the job to OpenAI/Groq/Gemini/etc. The
   provider is now a deployment decision, not a per-job one: these rules hide
   every entry point in every mode.

   Deliberately NOT hidden here: the hidden <input id="*-provider"> fields.
   They still carry the configured default to the backend, so /upload,
   /impact/analyze, /video/upload and /fdd/generate keep the same request
   shape and no route contract changes. */
#tg-provider-picker, #ia-provider-picker, #vc-provider-picker,
#ng-provider-picker, #fdd-provider-picker,
#tg-manual-provider-link, #ia-manual-provider-link, #vc-manual-provider-link,
#ng-manual-provider-link, #fdd-manual-provider-link,
.provider-tabs, .provider-tabs-inline, .provider-tab,
#ia-provider-card, #vc-provider-card, #ng-provider-card, #fdd-provider-card {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════
   RELEASE ASSURANCE — status readout + start-a-run
   ──────────────────────────────────────────────────────────────────────────
   Two sections, not four equal boxes: what the last pass produced, then the
   one action you can take from here. The workbook options are an exclusive
   picker — choosing a preloaded book deselects "upload a new one", which the
   earlier layout got wrong by leaving both live at once.
   ══════════════════════════════════════════════════════════════════════════ */
.ras-block { padding: 16px 0; border-top: 1px solid var(--ib-border, #ebe1d1); }
.ras-block:first-child { border-top: 0; padding-top: 4px; }
.ras-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ras-head h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ib-text); }
.ras-head-meta { font-size: 11.5px; color: var(--ib-text-2); }

.ras-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; }
.ras-cell {
  display: flex; flex-direction: column; gap: 3px;
  padding: 0 20px; border-left: 1px solid var(--ib-border, #ebe1d1);
}
.ras-cell:first-child { padding-left: 0; border-left: 0; }
.ras-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ib-text-2); }
.ras-v { font-size: 17px; font-weight: 700; color: var(--ib-text); line-height: 1.2; }
.ras-v.ok { color: var(--green, #15803d); }
.ras-v.bad { color: var(--danger, #991b1b); }
.ras-v.warn { color: var(--amber, #b45309); }
.ras-v.muted { color: var(--ib-text-2); font-weight: 600; }
.ras-sub { font-size: 11.5px; color: var(--ib-text-2); line-height: 1.5; }
.ras-sub b { font-weight: 600; }
.ras-sub .ok { color: var(--green, #15803d); }
.ras-sub .bad { color: var(--danger, #991b1b); }

.ras-wb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ras-wb {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  padding: 13px 14px; font: inherit; cursor: pointer;
  background: var(--ib-surface, #fff);
  border: 1px solid var(--ib-border, #ebe1d1);
  border-radius: var(--radius, 2px);
  transition: border-color .12s, background .12s;
}
.ras-wb:hover { border-color: var(--ib-red); }
.ras-wb.is-picked { border-color: var(--ib-red); background: var(--red-bg, #fff0f3); }
.ras-wb-new { border-style: dashed; }
.ras-radio {
  flex-shrink: 0; width: 15px; height: 15px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--ib-border, #d4d4d8); background: transparent;
}
.ras-wb.is-picked .ras-radio { border-color: var(--ib-red); box-shadow: inset 0 0 0 3px var(--ib-red); }
.ras-wb-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ras-wb-name { font-size: 13px; font-weight: 700; color: var(--ib-text); line-height: 1.3; }
.ras-wb-badge {
  display: inline-block; padding: 1px 6px; border-radius: var(--radius, 2px);
  background: var(--amber-soft, #fef3c7); color: var(--amber, #b45309);
  font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  vertical-align: middle;
}
.ras-wb-meta { font-size: 11px; color: var(--ib-text-2); }
.ras-wb-desc { font-size: 11.5px; color: var(--ib-text-2); line-height: 1.5; }

.ras-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.ras-cta .btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.ras-cta-note { font-size: 11.5px; color: var(--ib-text-2); }
.ra-actions { display: flex; flex-wrap: wrap; gap: 18px; }
.ra-link { font-size: 12px; font-weight: 700; color: var(--ib-red); text-decoration: none; }
.ra-link:hover { text-decoration: underline; }

/* Release Assurance dashboard — verdict banner, KPI tiles, chart cards.
   Reuses the Health Dashboard's pd-kpi / pd-dc / donut components and --hd-*
   palette (shared via the .ra-dash selector above), so both dashboards read
   as one product. */
.ra-dash { padding-top: 0; }
.pd-kpi-neutral { --kpi: var(--ib-text-2); --kpi-bg: var(--gray-bg, #f6f0e6); }

.ra-hero {
  --hero: var(--ib-text-2); --hero-bg: var(--gray-bg, #f6f0e6);
  display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap;
  padding: 20px 22px; margin-bottom: 16px;
  border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--hero-bg) 0%, var(--white) 72%);
  position: relative; overflow: hidden;
}
.ra-reason-link {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.ra-reason-link:hover, .ra-reason-link:focus-visible { text-decoration-color: currentColor; }
.ra-hero-fail    { --hero: var(--hd-red);   --hero-bg: var(--hd-red-bg); }
.ra-hero-blocked { --hero: var(--hd-amber); --hero-bg: var(--hd-amber-bg); }
.ra-hero-pass    { --hero: var(--hd-green); --hero-bg: var(--hd-green-bg); }
.ra-hero-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--hero);
  box-shadow: 0 1px 3px rgba(47,47,57,.08), inset 0 0 0 1px var(--border);
}
.ra-hero-icon svg { width: 22px; height: 22px; }
.ra-hero-body { flex: 1; min-width: 240px; }
.ra-hero-eyebrow { font-size: 11.5px; font-weight: 600; color: var(--hero); }
.ra-hero-title { font-size: 21px; font-weight: 700; color: var(--ib-text); letter-spacing: -.02em; line-height: 1.25; margin-top: 2px; }
.ra-hero-reasons { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ra-reason { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ib-text); }
.ra-reason-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--hd-neutral); }
.ra-reason.is-bad .ra-reason-dot  { background: var(--hd-red); box-shadow: 0 0 0 3px var(--hd-red-bg); }
.ra-reason.is-ok .ra-reason-dot   { background: var(--hd-green); box-shadow: 0 0 0 3px var(--hd-green-bg); }
.ra-reason.is-idle { color: var(--ib-text-2); }
.ra-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; margin-left: auto; }
.ra-hero-chips, .ra-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ra-hero-chips .pd-chip { background: var(--white); }
.ra-hero-actions .btn-outline, .ra-hero-actions .btn-primary { font-size: 12.5px; padding: 8px 14px; }

.ra-kpis { margin-bottom: 14px; }

.ra-charts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.ra-charts-single { grid-template-columns: minmax(0, 1fr); }
.ra-card { display: flex; flex-direction: column; }
.ra-card .pd-dc-subtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-card-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 4px 0 6px; }
.ra-card-empty .pd-donut-svg { margin: 0; opacity: .8; }
.ra-card-empty-msg { font-size: 12.5px; color: var(--ib-text-2); }
.ra-card-cta { font-size: 12px; padding: 6px 12px; }

.ra-sev-bar { display: flex; gap: 3px; height: 10px; border-radius: 6px; overflow: hidden; background: var(--hd-track); }
.ra-sev-bar span { display: block; height: 100%; }
.ra-sev-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 9px 0 12px; font-size: 12px; color: var(--ib-text-2); }
.ra-sev-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ra-sev-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ra-sev-legend b { color: var(--ib-text); font-weight: 700; }
.ra-mod-list { list-style: none; margin: 0; padding: 0; }
.ra-mod-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 12.5px;
}
.ra-mod-name { color: var(--ib-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-mod-pillar { color: var(--ib-text-2); font-size: 11.5px; white-space: nowrap; }
.ra-card-link {
  margin-top: 10px; align-self: flex-start; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--ib-red);
}
.ra-card-link:hover { text-decoration: underline; }
.ra-footnote { margin-top: 12px; font-size: 11px; color: var(--ib-text-3, var(--ib-text-2)); }

@media (max-width: 1180px) {
  .ra-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ra-card-wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ra-charts { grid-template-columns: minmax(0, 1fr); }
  .ra-hero { padding: 16px; gap: 12px; }
  .ra-hero-body { min-width: 0; flex-basis: 100%; }
  .ra-hero-title { font-size: 19px; }
  .ra-hero-side { align-items: flex-start; margin-left: 0; }
  .ra-hero-chips, .ra-hero-actions { justify-content: flex-start; }
  .ra-mod-pillar { display: none; }
}

@media (max-width: 760px) {
  .ras-cell { padding: 10px 0; border-left: 0; border-top: 1px solid var(--ib-border, #ebe1d1); }
  .ras-cell:first-child { border-top: 0; }
}

/* ─────────────────────────────────────────────────────────────────────────
   TEST CASE DETAIL — preconditions, step sub-detail, run-history strip
   Added with the /test-cases/{id}/detail route that replaced the modal's
   404-ing /download/{job_id} fetch.
   ───────────────────────────────────────────────────────────────────────── */

.tc-precondition-list {
  margin: 0;
  padding-left: 18px;
}
.tc-precondition-list li {
  color: var(--ib-text);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 4px;
}

.tc-step-sub {
  color: var(--ib-text-2);
  font-size: 11.5px;
  line-height: 1.5;
  margin-top: 3px;
}
.tc-step-sub span {
  color: var(--ib-text-2);
  display: inline-block;
  font-weight: 700;
  letter-spacing: .04em;
  margin-right: 6px;
  min-width: 52px;
  opacity: .75;
  text-transform: uppercase;
}

.tc-run-strip {
  align-items: center;
  background: var(--gray-bg, #fbf1e0);
  border: 1px solid var(--ib-border, #e5e0d6);
  border-radius: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0 0 14px;
  padding: 12px 16px;
}
.tc-run-cell { display: flex; flex-direction: column; gap: 4px; }
.tc-run-cell-wide { flex: 1; min-width: 160px; }
.tc-run-k {
  color: var(--ib-text-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tc-run-v { color: var(--ib-text); font-size: 13px; font-weight: 600; }
.tc-run-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-run-dot {
  border-radius: 2px;
  display: inline-block;
  height: 14px;
  width: 8px;
}
.tc-run-pass    { background: #15803d; }
.tc-run-fail    { background: var(--ib-red, #ea1b3d); }
.tc-run-blocked { background: #b45309; }
.tc-run-unknown { background: var(--ib-border, #d8d2c6); }

/* ─────────────────────────────────────────────────────────────────────────
   AUTOMATION DASHBOARD CHARTS
   Replaced the six-tile KPI row on Automation Operations with three charts:
   coverage donut, last-execution donut, pass-rate trend. Same numbers.
   ───────────────────────────────────────────────────────────────────────── */

.ac-chart-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 14px;
}

.ac-panel {
  background: #fff;
  border: 1px solid var(--ib-border, #e5e0d6);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
}
.ac-panel-title {
  color: var(--ib-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.ac-panel-sub {
  color: var(--ib-text-2);
  font-size: 11.5px;
  margin: 3px 0 16px;
}

.ac-donut-wrap {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.ac-donut { flex: 0 0 auto; height: 140px; width: 140px; }
.ac-donut-value {
  fill: var(--ib-text);
  font-size: 24px;
  font-weight: 700;
  text-anchor: middle;
}
.ac-donut-label {
  fill: var(--ib-text-2);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-anchor: middle;
  text-transform: uppercase;
}

.ac-legend { flex: 1; list-style: none; margin: 0; min-width: 120px; padding: 0; }
.ac-legend li {
  align-items: center;
  border-bottom: 1px solid var(--ib-border, #eee8dd);
  display: flex;
  gap: 8px;
  padding: 6px 0;
}
.ac-legend li:last-child { border-bottom: 0; }
.ac-swatch { border-radius: 2px; flex: 0 0 auto; height: 10px; width: 10px; }
.ac-legend-k { color: var(--ib-text-2); flex: 1; font-size: 12px; }
.ac-legend-v { color: var(--ib-text); font-size: 13px; font-weight: 700; }

.ac-bars {
  align-items: flex-end;
  display: flex;
  gap: 8px;
  height: 140px;
}
.ac-bar-col { display: flex; flex: 1; flex-direction: column; gap: 6px; height: 100%; }
.ac-bar-track {
  background: var(--gray-bg, #f4ede0);
  border-radius: 2px;
  display: flex;
  flex: 1;
  align-items: flex-end;
  overflow: hidden;
}
.ac-bar-fill { border-radius: 2px 2px 0 0; width: 100%; }
.ac-bar-x {
  color: var(--ib-text-2);
  font-size: 9.5px;
  text-align: center;
}

.ac-empty {
  color: var(--ib-text-2);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 24px 0;
}

.ac-line-chart { display: block; height: 190px; width: 100%; }
.ac-line-value {
  fill: var(--ib-text);
  font-size: 11px;
  font-weight: 700;
}
.ac-line-axis {
  fill: var(--ib-text-2);
  font-size: 9.5px;
}

/* ══════════════════════════════════════════════════════════════════════════
   BEANOPSAI PRODUCT RESTYLE — 2026-09-25
   ──────────────────────────────────────────────────────────────────────────
   Brings the signed-in app onto the QAVA marketing site's look
   (static/marketing/oracle-ai-site/assets/site.css + the already-matched
   .auth-overlay sign-in above): warm cream ground, white cards on warm
   hairlines, charcoal text, InfoBeans red as the single accent, Lexend,
   10–12px panels / 8px controls, soft warm shadows instead of the old hard
   8px-offset red shadow, and sentence case everywhere (no forced capitals,
   no wide tracking).

   Appended as one delimited layer, deliberately last in the file, instead
   of edited into the ~5,800 lines above: those rules stay the structural
   source of truth, this block only re-points tokens and softens surfaces.
   Visual only: no selector here is read by JS, no layout contract changes.

   One design for every account. The token block below is declared on
   `:root, :root[data-brand]` so it also wins over the Phase 8
   `:root[data-brand="opkey"]` variant block (same specificity, later in the
   cascade). demo2@infobeans.com still gets data-brand="opkey" set by
   portal.js::_applyThemeVariant() — the data flow is untouched — it just no
   longer changes how the app looks.
   ══════════════════════════════════════════════════════════════════════════ */

:root,
:root[data-brand] {
  --ib-red:         #ea1b3d;
  --ib-red-dark:    #c4162f;
  --ib-red-soft:    #ffd0d8;
  --ib-red-bg:      #fff1f3;
  --ib-charcoal:    #2f2f39;
  --ib-text:        #373742;
  --ib-text-2:      #5e5a5a;   /* 6.6:1 on white, 6.2:1 on cream */
  --ib-text-3:      #736f6f;   /* 4.9:1 on white — secondary meta only */
  --ib-cream:       #fdf8f0;
  --ib-cream-2:     #fff9ed;

  --border:         #ebe1d1;
  --border-soft:    #f3ece1;
  --border-strong:  #ddd0bb;
  --white:          #ffffff;
  --gray-bg:        #faf4ea;

  /* Tokens referenced above with fallbacks but never declared on :root. */
  --ib-border:      var(--border);
  --ib-bg:          var(--white);
  --ib-surface:     var(--white);
  --card-bg:        var(--white);

  --impact:         #7c1fa8;
  --impact-soft:    #f0e8fa;

  --radius:         8px;
  --radius-md:      8px;
  --radius-lg:      12px;
  --radius-card:    12px;
  --shadow-card:    0 1px 2px rgba(55,55,66,.06), 0 4px 14px rgba(55,55,66,.05);
  --shadow-sm:      0 1px 2px rgba(55,55,66,.06);
  --shadow-stat:    var(--shadow-card);
  --shadow-lift:    0 2px 4px rgba(55,55,66,.06), 0 10px 24px rgba(55,55,66,.08);
  --shadow-modal:   0 24px 64px rgba(47,47,57,.18), 0 2px 6px rgba(47,47,57,.06);
  --font-family:    'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── 1. Sentence case, everywhere ──────────────────────────────────────────
   Same rule the marketing site ends with. !important so it also beats the
   inline `text-transform:uppercase` / `letter-spacing:.08em` that portal.js
   writes into generated markup. Display type gets its tight tracking back
   explicitly below. */
body, body *, body *::before, body *::after { text-transform: none !important; }
/* capitalize is not forced capitals — it only tidies raw lower-case data
   values ("active", "pass"), so the places that used it keep it. */
[style*="capitalize"], .cp-intent-badge, .kg-prop-key { text-transform: capitalize !important; }
body *, body *::before, body *::after { letter-spacing: normal !important; }
.page-title, .auth-overlay .auth-brand-title, .pd-kpi-value, .stat-value,
.ac-donut-value, .pd-donut-center-value, .ras-v { letter-spacing: -.02em !important; }
.auth-overlay .auth-card-title { letter-spacing: -.01em !important; }

/* ── 2. Ground + type ──────────────────────────────────────────────────── */
body {
  background: var(--ib-cream);
  color: var(--ib-text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.main { background: var(--ib-cream); }
::selection { background: var(--ib-red-soft); color: var(--ib-charcoal); }

.page-eyebrow,
.assurance-page .page-eyebrow {
  color: var(--ib-red);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}
.page-title {
  color: var(--ib-charcoal);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
}
.assurance-page .page-title { color: var(--ib-charcoal); font-weight: 600; }
.page-subtitle,
.assurance-page .page-subtitle {
  color: var(--ib-text-2);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}
.results-eyebrow, .tc-modal-eyebrow, .assurance-inspector-eyebrow,
.assurance-section-index, .assurance-suite-group-label {
  font-size: 12.5px;
  font-weight: 500;
}
.field-hint, .generate-note, .stat-label, .stat-sub, .results-subtitle,
.drop-sub, .pd-feature-tile-desc { font-weight: 400; }
.field-hint, .generate-note, .stat-sub { color: var(--ib-text-3); }

/* ── 3. Sidebar — the site's charcoal nav, as a rail ───────────────────── */
.sidebar {
  background: var(--ib-charcoal);
  border-right: 1px solid rgba(255,255,255,.04);
  box-shadow: none;
}
.sidebar-section-label {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 500;
  padding: 18px 22px 6px;
}
.nav-item,
.nav-item.active {
  border-left: 0;
  border-radius: 8px;
  color: rgba(255,255,255,.74);
  font-size: 13.5px;
  margin: 1px 10px;
  padding: 9px 12px;
  position: relative;
  width: calc(100% - 20px);
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 9px; bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ib-red);
}
.nav-item svg { opacity: .78; }
.mode-switcher { background: rgba(255,255,255,.07); border-radius: 10px; padding: 4px; }
.mode-btn { border-radius: 7px; font-size: 12px; color: rgba(255,255,255,.62); }
.sidebar-footer { border-top-color: rgba(255,255,255,.08); }
.sidebar-version { color: rgba(255,255,255,.55); }
.sidebar-copy    { color: rgba(255,255,255,.62); }
.brand-sub       { color: rgba(255,255,255,.6) !important; font-size: 12px !important; }
.sidebar-signout-btn { border-radius: 8px; }

/* ── 4. Top bar — cream glass over the page, white controls ────────────── */
.product-topbar {
  background: rgba(253,248,240,.9);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
}
.product-context-control {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 8px;
  padding: 0 10px 0 12px;
}
.product-context-control > span { color: var(--ib-text-3); font-size: 12px; font-weight: 400; }
.product-context-control select { font-size: 12.5px; font-weight: 500; color: var(--ib-text); }
.product-environment-context {
  background: var(--white);
  border-color: #c3e3cd;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}
.product-command-trigger {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ib-text-3);
  font-size: 12.5px;
}
.product-command-trigger:hover { border-color: var(--border-strong); color: var(--ib-text); }
.product-command-trigger kbd {
  background: var(--gray-bg);
  border-color: var(--border);
  border-radius: 4px;
  font-size: 11px;
}
.product-command-overlay { background: rgba(47,47,57,.42); }
.product-command-panel { border-color: var(--border); border-radius: 14px; box-shadow: var(--shadow-modal); }
.product-command-input-wrap { border-bottom-color: var(--border); }
.product-command-result { border-radius: 8px; }
.product-command-result strong { font-size: 13.5px; font-weight: 500; }
.product-command-result small { font-size: 12px; }
.product-command-result.active, .product-command-result:hover { background: var(--gray-bg); }
.product-command-footer {
  background: var(--ib-cream);
  border-top-color: var(--border);
  color: var(--ib-text-3);
  font-size: 11.5px;
}

/* ── 5. Surfaces: cards, panels, tiles ─────────────────────────────────── */
.card,
.assurance-page .card,
.pd-health-dashboard,
.ac-panel,
.pd-dc,
.pd-kpi,
.stat-card,
.assurance-metrics .stat-card,
.ent-stat,
.mesh-agent-card,
.pd-feature-tile,
.breakdown-section,
.tc-run-strip,
.tc-recorder-steps,
.tc-recorder-summary article,
.assurance-failure-group {
  border-color: var(--border);
  border-radius: var(--radius-card);
}
.card, .assurance-page .card, .pd-health-dashboard, .ac-panel,
.stat-card, .assurance-metrics .stat-card, .ent-stat, .mesh-agent-card {
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.pd-kpi, .pd-dc { box-shadow: var(--shadow-sm); }
.pd-kpi:hover, .pd-dc.pd-clickable:hover, .pd-feature-tile:hover,
.pd-action-tile:hover { box-shadow: var(--shadow-lift); }
.card-title {
  color: var(--ib-text);
  font-size: 14px;
  font-weight: 600;
}
.optional-tag { color: var(--ib-text-3); font-size: 11.5px; }
.header-badge { border: 1px solid var(--border); border-radius: 999px; box-shadow: none; }
.provider-tab { border-width: 1px; border-radius: var(--radius); }
.provider-tab.active { box-shadow: none; }
.pd-action-tile { background: var(--white); border-color: var(--border); }
.pd-chip { background: var(--white); border-color: var(--border); }
.pd-suite-table-wrap { border-color: var(--border); border-radius: 10px; }

/* ── 6. Controls ───────────────────────────────────────────────────────── */
.btn-primary,
.btn-outline,
.btn-ghost,
.btn-danger,
.btn-outline-danger {
  border-radius: var(--radius);
  border-width: 1px;
  font-weight: 500;
}
.btn-primary { box-shadow: 0 2px 10px rgba(234,27,61,.2); }
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(234,27,61,.28);
  filter: brightness(.94);
  opacity: 1;
}
.btn-primary:disabled { box-shadow: none; }
.btn-primary.btn-impact { box-shadow: 0 2px 10px rgba(124,31,168,.2); }
/* Secondary buttons go neutral so red stays the one accent on a page —
   the marketing site's secondary is a hairline control, not a red outline. */
.btn-outline {
  background: var(--white);
  border-color: var(--border-strong);
  color: var(--ib-text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--white);
  border-color: var(--ib-red);
  color: var(--ib-red);
  opacity: 1;
}
.btn-ghost { border-color: var(--border); color: var(--ib-text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--white); border-color: var(--border-strong); color: var(--ib-text); }

.field-label { color: var(--ib-text); font-size: 13px; font-weight: 500; }
.field-input,
.release-textarea,
.oci-textarea,
.key-toggle,
.tc-actual-input,
.fb-step-row input,
.fb-step-row select {
  background-color: var(--white);
  border: 1px solid #e3d8c6;
  border-radius: var(--radius-md);
}
.field-input, .release-textarea { font-weight: 400; }
.field-input::placeholder, .release-textarea::placeholder { color: #9b958f; }
.field-input:hover, .release-textarea:hover { border-color: var(--border-strong); }
.field-input:focus,
.release-textarea:focus,
.oci-textarea:focus {
  background-color: var(--white);
  border-color: var(--ib-red);
  box-shadow: 0 0 0 3px var(--ib-red-bg);
  outline: none;
}
textarea.field-input { border-radius: var(--radius-md); }

.module-btn { border-width: 1px; }
.input-toggle,
.assurance-page .input-toggle,
.assurance-page .platform-type-tabs,
.assurance-inspector-panel .input-toggle {
  background: var(--gray-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.toggle-btn,
.assurance-page .toggle-btn,
.assurance-page .platform-type-tab,
.assurance-inspector-panel .toggle-btn { background: transparent; border-radius: 7px; }
.toggle-btn.active,
.assurance-page .toggle-btn.active,
.assurance-page .platform-type-tab.active,
.assurance-inspector-panel .toggle-btn.active { background: var(--ib-charcoal); color: #fff; }

.drop-zone {
  background: var(--ib-cream);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-card);
}
.drop-zone:hover, .drop-zone.drag-over { background: var(--ib-red-bg); border-color: var(--ib-red); }

/* ── 7. Tables ─────────────────────────────────────────────────────────── */
.data-table thead th,
.assurance-page table thead th,
.pd-suite-table thead th {
  background: var(--gray-bg);
  border-bottom: 1px solid var(--border);
  color: var(--ib-text-2);
  font-size: 12px;
  font-weight: 600;
}
.data-table tbody td { border-bottom-color: var(--border-soft); }
.data-table tbody tr:hover,
.assurance-page table tbody tr:hover { background: var(--ib-cream); }

/* ── 8. Modals, drawers, inspector ─────────────────────────────────────── */
.modal-overlay, .tc-modal-overlay { background: rgba(47,47,57,.45); }
.modal-box,
.tc-modal-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-modal);
}
.modal-header, .modal-footer, .tc-modal-header, .tc-modal-footer { border-color: var(--border); }
.tc-modal-header { background: var(--ib-cream); }
.modal-title, .tc-modal-title { color: var(--ib-charcoal); font-weight: 600; }
.modal-close:hover { background: var(--gray-bg); }
.assurance-inspector-panel {
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
  box-shadow: -16px 0 48px rgba(47,47,57,.14);
}

/* ── 9. Release Assurance workspace ────────────────────────────────────── */
.assurance-page {
  --assurance-ink:    var(--ib-charcoal);
  --assurance-muted:  var(--ib-text-2);
  --assurance-line:   var(--border);
  --assurance-canvas: var(--ib-cream);
  --assurance-soft:   var(--gray-bg);
}
.assurance-next-action { border-radius: var(--radius-card); }
.assurance-honesty-note, .assurance-blocker-item, .assurance-ok-item { border-radius: 8px; }
.assurance-honesty-note { background: var(--ib-cream-2); border-color: var(--border); }
.assurance-blocker-item { background: var(--ib-cream-2); }
.assurance-evidence-chip { border-radius: 999px; }
.assurance-failure-group-head { background: var(--gray-bg); }
.tc-recorder-head { background: var(--gray-bg); color: var(--ib-text-2); font-size: 12px; font-weight: 600; }

/* ── 10. Small parts ──────────────────────────────────────────────────── */
.history-badge, .ia-detail-tag-id, .detected-provider-badge,
.tc-recorder-demo-badge, .ras-wb-badge { border-radius: 6px; }
.tc-id-badge, .priority-badge, .kb-action-priority,
.kb-delete-btn, .tc-toggle-btn, .tc-modal-close-btn,
.cr-workbook-card-icon, .platform-heatmap-cell { border-radius: 6px; }
.ras-wb { border-radius: 10px; }
.ras-k, .tc-run-k, .tc-step-sub span { font-size: 12px; font-weight: 500; }
.ac-donut-label, .pd-donut-center-caption { font-size: 11px; }
.status-badge { font-weight: 500; }
/* Jira project keys are genuinely upper-case identifiers — keep the input
   showing them that way (the one deliberate exception to section 1). */
#jira-project { text-transform: uppercase !important; }

/* ── 11. Labels that were tiny caps ─────────────────────────────────────
   Caps at 9–11px with wide tracking read as a label; the same size in
   sentence case just reads as small print. Lift every former caps label to
   a legible 12px/500 — both the stylesheet ones and the ones portal.js
   writes inline (matched on their inline style, so no JS changes). */
.tc-recorder-head, .impact-summary-label, .ia-detail-section-title,
.tg-config-group label, .kb-actions-title, .copilot-label, .tc-case-type,
.cp-stat-lbl, .cp-logs-table th, .tc-steps-table thead th,
.platform-entity-table th, .history-badge, .cr-workbook-card-badge,
.fdd-tc-section strong {
  font-size: 12px;
  font-weight: 500;
}
.ia-detail-section-title, .tc-section-title, .fdd-subhead, .cr-section-label,
.ent-panel-title { font-weight: 600; }
.tc-steps-table thead th, .platform-entity-table th, .cp-logs-table th { font-weight: 600; }
[style*="uppercase"][style*="font-size:8"],
[style*="uppercase"][style*="font-size:9"],
[style*="uppercase"][style*="font-size:10"],
[style*="uppercase"][style*="font-size:11"],
[style*="uppercase"][style*="font-size: 8"],
[style*="uppercase"][style*="font-size: 9"],
[style*="uppercase"][style*="font-size: 10"],
[style*="uppercase"][style*="font-size: 11"] {
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* ── 12. Odds and ends found in the page-by-page pass ─────────────────── */
/* .btn-secondary is used by six buttons (Test Case Detail's Close, …) but was
   never defined, so they rendered as raw browser buttons. Same hairline
   treatment as .btn-outline. */
.btn-secondary {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--ib-text);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  gap: 7px;
  min-height: 36px;
  padding: 8px 20px;
  transition: border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-secondary:hover:not(:disabled) { border-color: var(--ib-red); color: var(--ib-red); }
.btn-secondary:disabled { opacity: .4; cursor: not-allowed; }
/* Step tables read like every other table: warm header, not a charcoal bar. */
.tc-steps-table thead tr,
.tc-steps-table thead th {
  background: var(--gray-bg);
  color: var(--ib-text-2);
  font-size: 12px;
}
.tc-steps-table thead th { border-bottom: 1px solid var(--border); }
/* Page-header action rows (Knowledge Base has four controls) wrap instead of
   pushing the page wider than the viewport at ~1024px. */
.page-header > div[style*="display:flex"] { flex-wrap: wrap; justify-content: flex-end; }
/* Native checkboxes/radios pick up the one accent instead of browser blue. */
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--ib-red); }

/* ══════════════════════════════════════
   CONFIGURATION REVIEW (pages/config-review.js)
   Restrained: one accent per finding type, text always accompanies colour.
══════════════════════════════════════ */
.nav-item[data-crv-off] { display: none; }

#page-config-review {
  --crv-issue: #c42626;    --crv-issue-soft: #fdeeee;
  --crv-missing: #7c1fa8;  --crv-missing-soft: #f5edfa;
  --crv-review: #a05a07;   --crv-review-soft: #fdf3dc;
  --crv-expected: #0b6a98; --crv-expected-soft: #e6f3fa;
  --crv-aligned: #15803d;  --crv-aligned-soft: #e7f6ec;
  --crv-unknown: #5b6577;  --crv-unknown-soft: #eef0f4;
  --crv-neutral: #2f2f39;  --crv-neutral-soft: #f3f3f6;
}
#page-config-review .crv-tone-issue    { --t: var(--crv-issue);    --ts: var(--crv-issue-soft); }
#page-config-review .crv-tone-missing  { --t: var(--crv-missing);  --ts: var(--crv-missing-soft); }
#page-config-review .crv-tone-review   { --t: var(--crv-review);   --ts: var(--crv-review-soft); }
#page-config-review .crv-tone-expected { --t: var(--crv-expected); --ts: var(--crv-expected-soft); }
#page-config-review .crv-tone-aligned  { --t: var(--crv-aligned);  --ts: var(--crv-aligned-soft); }
#page-config-review .crv-tone-unknown  { --t: var(--crv-unknown);  --ts: var(--crv-unknown-soft); }
#page-config-review .crv-tone-neutral  { --t: var(--crv-neutral);  --ts: var(--crv-neutral-soft); }
#page-config-review .crv-fill-issue    { --t: var(--crv-issue); }
#page-config-review .crv-fill-missing  { --t: var(--crv-missing); }
#page-config-review .crv-fill-review   { --t: var(--crv-review); }
#page-config-review .crv-fill-expected { --t: var(--crv-expected); }
#page-config-review .crv-fill-aligned  { --t: var(--crv-aligned); }
#page-config-review .crv-fill-unknown  { --t: var(--crv-unknown); }
#page-config-review .crv-fill-neutral  { --t: var(--crv-neutral); }
#page-config-review .crv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--t); flex-shrink: 0; }
#page-config-review .crv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#page-config-review .crv-k { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ib-text-2); }
#page-config-review .crv-hint { font-size: 12.5px; color: var(--ib-text-2); line-height: 1.5; }
#page-config-review .crv-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* shared states */
#page-config-review .crv-state { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 28px; text-align: center; }
#page-config-review .crv-state-title { font-size: 16px; font-weight: 500; color: var(--ib-text); margin-bottom: 6px; }
#page-config-review .crv-state-text { font-size: 13.5px; color: var(--ib-text-2); line-height: 1.55; }
#page-config-review .crv-state-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
#page-config-review .crv-empty { text-align: center; padding: 36px 24px; }
#page-config-review .crv-empty .btn-ghost { margin-top: 14px; }

/* selection */
#page-config-review .crv-setup { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
#page-config-review .crv-field { margin-bottom: 26px; }
#page-config-review .crv-label { display: block; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ib-text-2); margin-bottom: 8px; }
#page-config-review .crv-select { width: 100%; max-width: 440px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); color: var(--ib-text); font: inherit; font-size: 14px; }
#page-config-review .crv-select-sm { width: auto; max-width: 220px; padding: 7px 10px; font-size: 13px; }
#page-config-review .crv-select:focus-visible, #page-config-review .crv-search:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 1px; }
#page-config-review .crv-field .crv-hint { margin-top: 8px; }
#page-config-review .crv-bu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
#page-config-review .crv-bu-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 44px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
#page-config-review .crv-bu-card:hover { border-color: var(--ib-text-2); }
#page-config-review .crv-bu-card.is-selected { border-color: var(--ib-charcoal); background: var(--gray-bg); }
#page-config-review .crv-bu-card input { position: absolute; left: 16px; top: 16px; width: 16px; height: 16px; margin: 0; }
#page-config-review .crv-bu-card:focus-within { outline: 2px solid var(--ib-red); outline-offset: 1px; }
#page-config-review .crv-bu-code { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ib-charcoal); font-variant-numeric: tabular-nums; }
#page-config-review .crv-bu-name { font-size: 13.5px; color: var(--ib-text); }
#page-config-review .crv-bu-meta { font-size: 12px; color: var(--ib-text-2); }
#page-config-review .crv-field-error { margin-top: 10px; font-size: 13px; color: var(--crv-issue); }
#page-config-review .crv-setup-foot { display: flex; align-items: center; gap: 14px; padding-top: 4px; }
#page-config-review .crv-setup-side .card-title { margin-bottom: 12px; }
#page-config-review .crv-scope-number { font-size: 36px; font-weight: 300; letter-spacing: -.02em; color: var(--ib-charcoal); line-height: 1; }
#page-config-review .crv-scope-label { font-size: 13px; color: var(--ib-text-2); margin: 6px 0 14px; }
#page-config-review .crv-scope-list { list-style: none; border-top: 1px solid var(--border-soft); }
#page-config-review .crv-scope-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; color: var(--ib-text); }
#page-config-review .crv-scope-list li span:last-child { color: var(--ib-text-2); font-variant-numeric: tabular-nums; }
#page-config-review .crv-scope-rules { margin-top: 16px; display: grid; gap: 10px; }
#page-config-review .crv-rule-line { font-size: 12.5px; color: var(--ib-text-2); line-height: 1.5; }
#page-config-review .crv-rule-line strong { color: var(--ib-text); font-weight: 500; }

/* progress */
#page-config-review .crv-run { max-width: 760px; margin: 12px auto 0; padding: 32px 36px 28px; }
#page-config-review .crv-run-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
#page-config-review .crv-run-pct { font-size: 54px; font-weight: 300; letter-spacing: -.03em; line-height: 1; color: var(--ib-charcoal); font-variant-numeric: tabular-nums; }
#page-config-review .crv-run-stage { font-size: 17px; font-weight: 500; color: var(--ib-text); margin-top: 12px; }
#page-config-review .crv-run-line { font-size: 13.5px; color: var(--ib-text-2); margin-top: 4px; min-height: 1.5em; }
#page-config-review .crv-bar { height: 6px; background: var(--border-soft); border-radius: 3px; overflow: hidden; }
#page-config-review .crv-bar-fill { height: 100%; width: 0; background: var(--ib-charcoal); border-radius: 3px; transition: width .25s linear; }
#page-config-review .crv-stages { list-style: none; margin-top: 24px; display: grid; gap: 2px; }
#page-config-review .crv-stages li { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; color: var(--ib-text-2); border-top: 1px solid var(--border-soft); }
#page-config-review .crv-stages li:first-child { border-top: 0; }
#page-config-review .crv-stage-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--border); justify-self: center; background: var(--white); }
#page-config-review .crv-stages li.is-done { color: var(--ib-text); }
#page-config-review .crv-stages li.is-done .crv-stage-dot { background: var(--crv-aligned); border-color: var(--crv-aligned); }
#page-config-review .crv-stages li.is-active { color: var(--ib-text); font-weight: 500; }
#page-config-review .crv-stages li.is-active .crv-stage-dot { border-color: var(--ib-charcoal); box-shadow: 0 0 0 3px var(--crv-neutral-soft); background: var(--ib-charcoal); }
#page-config-review .crv-stage-state { font-size: 12px; color: var(--ib-text-2); font-weight: 400; }

/* results header */
#page-config-review .crv-complete { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px 20px; margin-bottom: 16px; }
#page-config-review .crv-complete-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
#page-config-review .crv-complete-mark { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--crv-aligned-soft); color: var(--crv-aligned); }
#page-config-review .crv-complete-title { font-size: 18px; font-weight: 500; color: var(--ib-text); }
#page-config-review .crv-headline { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 28px; margin-bottom: 16px; }
#page-config-review .crv-headline li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ib-text); }
#page-config-review .crv-dist { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border-soft); gap: 2px; }
#page-config-review .crv-dist-seg { display: block; height: 100%; background: var(--t); }
#page-config-review .crv-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; }
#page-config-review .crv-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ib-text-2); }
#page-config-review .crv-legend-item b { color: var(--ib-text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* KPI strip: one card, hairline dividers, tinted icon instead of an accent bar */
#page-config-review .crv-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
#page-config-review .crv-kpi { position: relative; display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 18px 18px 16px; background: transparent; border: 0; border-right: 1px solid var(--border-soft); cursor: pointer; font: inherit; color: inherit; transition: background .15s ease; }
#page-config-review .crv-kpi:last-child { border-right: 0; }
#page-config-review .crv-kpi:hover { background: var(--gray-bg); }
#page-config-review .crv-kpi:focus-visible { outline: 2px solid var(--ib-red); outline-offset: -2px; }
#page-config-review .crv-kpi-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ts); color: var(--t); margin-bottom: 10px; }
#page-config-review .crv-kpi-value { font-size: 30px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; color: var(--ib-charcoal); font-variant-numeric: tabular-nums; }
#page-config-review .crv-kpi-label { font-size: 13px; font-weight: 500; color: var(--ib-text); line-height: 1.3; }
#page-config-review .crv-kpi-note { font-size: 12px; color: var(--ib-text-2); line-height: 1.4; }

/* cards + tables */
#page-config-review .crv-card { margin-bottom: 16px; padding: 20px 22px; }
#page-config-review .crv-card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
#page-config-review .crv-count { font-size: 12px; font-weight: 500; color: var(--ib-text-2); background: var(--gray-bg); border: 1px solid var(--border-soft); padding: 1px 9px; border-radius: 10px; font-variant-numeric: tabular-nums; }
#page-config-review .crv-section-note { font-size: 13px; color: var(--ib-text-2); margin: -4px 0 12px; }
#page-config-review .crv-table-wrap { overflow-x: auto; }
#page-config-review .crv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#page-config-review .crv-table th, #page-config-review .crv-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
#page-config-review .crv-table thead th { font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ib-text-2); background: var(--gray-bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
#page-config-review .crv-table tbody th { font-weight: 400; white-space: nowrap; }
#page-config-review .crv-table tbody tr:last-child th, #page-config-review .crv-table tbody tr:last-child td { border-bottom: 0; }
#page-config-review .crv-table tr.is-reference { background: var(--gray-bg); }
#page-config-review .crv-table-sub { display: block; font-size: 12px; color: var(--ib-text-2); }
#page-config-review .crv-cell-value { margin-right: 8px; }
#page-config-review .crv-cell-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; border-radius: 2px; }
#page-config-review .crv-cell-btn:hover .crv-cell-value { text-decoration: underline; text-underline-offset: 3px; }
#page-config-review .crv-cell-btn:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-config-review .crv-cell-mark { display: inline-flex; vertical-align: middle; }
#page-config-review .crv-overall { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; white-space: nowrap; }
#page-config-review .crv-table-flat td { font-size: 13px; }
#page-config-review .crv-row-click { cursor: pointer; }
#page-config-review .crv-row-click:hover { background: var(--gray-bg); }
#page-config-review .crv-row-click:focus-visible { outline: 2px solid var(--ib-red); outline-offset: -2px; }
#page-config-review .crv-source { font-size: 12px; color: var(--ib-text-2); white-space: nowrap; }

/* layout + toolbar */
#page-config-review .crv-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
#page-config-review .crv-rail { position: sticky; top: 16px; }
#page-config-review .crv-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
#page-config-review .crv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#page-config-review .crv-chip { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--white); color: var(--ib-text); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
#page-config-review .crv-chip span { color: var(--ib-text-2); margin-left: 4px; font-variant-numeric: tabular-nums; }
#page-config-review .crv-chip:hover { border-color: var(--ib-text-2); }
#page-config-review .crv-chip.is-active { background: var(--ib-charcoal); border-color: var(--ib-charcoal); color: var(--white); }
#page-config-review .crv-chip.is-active span { color: rgba(255,255,255,.75); }
#page-config-review .crv-chip:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-config-review .crv-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
#page-config-review .crv-search { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font: inherit; font-size: 13px; width: 250px; background: var(--white); color: var(--ib-text); }

/* tags */
#page-config-review .crv-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--t); background: var(--ts); padding: 3px 9px 3px 7px; border-radius: 3px; white-space: nowrap; }
#page-config-review .crv-state-tag { font-size: 11.5px; color: var(--ib-text-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 3px; margin-left: 6px; white-space: nowrap; }

/* findings */
#page-config-review .crv-findings { display: grid; gap: 10px; }
#page-config-review .crv-finding { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
#page-config-review .crv-finding:hover { border-color: var(--ib-text-2); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
#page-config-review .crv-finding:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-config-review .crv-finding.is-handled { background: var(--gray-bg); }
#page-config-review .crv-finding.is-handled .crv-finding-name { color: var(--ib-text-2); }
#page-config-review .crv-edge-issue { --t: var(--crv-issue); }
#page-config-review .crv-edge-missing { --t: var(--crv-missing); }
#page-config-review .crv-edge-review { --t: var(--crv-review); }
#page-config-review .crv-edge-unknown { --t: var(--crv-unknown); }
#page-config-review .crv-finding-bu { display: flex; align-items: baseline; gap: 8px; }
#page-config-review .crv-finding-cat { font-size: 12px; color: var(--ib-text-2); }
#page-config-review .crv-finding-name { font-size: 15px; font-weight: 500; color: var(--ib-text); margin: 4px 0 8px; line-height: 1.3; }
#page-config-review .crv-finding-tags { display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px; }
#page-config-review .crv-finding-values { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-bottom: 10px; }
#page-config-review .crv-finding-values > div { display: grid; gap: 2px; }
#page-config-review .crv-v { font-size: 14px; color: var(--ib-text); }
#page-config-review .crv-v-current { font-weight: 500; }
#page-config-review .crv-finding-text { font-size: 13.5px; color: var(--ib-text); line-height: 1.55; }
#page-config-review .crv-finding-action { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--ib-text-2); }
#page-config-review .crv-finding-action .crv-k { margin-right: 6px; }

/* aligned */
#page-config-review .crv-aligned { list-style: none; }
#page-config-review .crv-aligned li { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
#page-config-review .crv-aligned li:last-child { border-bottom: 0; }
#page-config-review .crv-aligned-name { color: var(--ib-text); }
#page-config-review .crv-aligned-cat { margin-left: 10px; font-size: 12px; color: var(--ib-text-2); }
#page-config-review .crv-aligned-bus { display: flex; gap: 6px; flex-shrink: 0; }
#page-config-review .crv-bu-pill { font: inherit; font-size: 12px; font-weight: 500; padding: 2px 9px; border: 1px solid var(--border); border-radius: 3px; background: var(--white); color: var(--ib-charcoal); cursor: pointer; font-variant-numeric: tabular-nums; }
#page-config-review .crv-bu-pill:hover { border-color: var(--ib-charcoal); }
#page-config-review .crv-bu-pill:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }

/* action centre */
#page-config-review .crv-actions { display: grid; gap: 6px; margin-bottom: 16px; }
#page-config-review .crv-action { display: grid; grid-template-columns: 34px 1fr 14px; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); cursor: pointer; font: inherit; color: var(--ib-text); transition: border-color .15s ease; }
#page-config-review .crv-action:hover { border-color: var(--ib-charcoal); }
#page-config-review .crv-action:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-config-review .crv-action-count { display: inline-flex; justify-content: center; font-size: 14px; font-weight: 600; color: var(--t); background: var(--ts); border-radius: 3px; padding: 3px 0; font-variant-numeric: tabular-nums; }
#page-config-review .crv-action-label { font-size: 13px; line-height: 1.3; }
#page-config-review .crv-action svg { color: var(--ib-text-2); }
#page-config-review .crv-progress-note { font-size: 12.5px; color: var(--ib-text-2); margin-bottom: 14px; }
#page-config-review .crv-mini-bar { height: 4px; background: var(--border-soft); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
#page-config-review .crv-mini-bar span { display: block; height: 100%; background: var(--crv-aligned); transition: width .25s ease; }
#page-config-review .crv-export { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; }
#page-config-review .crv-how { display: grid; gap: 2px; }
#page-config-review .crv-how dt { font-size: 12.5px; font-weight: 500; color: var(--ib-text); margin-top: 8px; }
#page-config-review .crv-how dd { font-size: 12.5px; color: var(--ib-text-2); line-height: 1.5; }

/* drawer */
#page-config-review .crv-drawer { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: flex-end; }
#page-config-review .crv-drawer.hidden { display: none !important; }
#page-config-review .crv-drawer-scrim { position: absolute; inset: 0; background: rgba(30,30,40,.38); opacity: 0; transition: opacity .2s ease; }
#page-config-review .crv-drawer.is-open .crv-drawer-scrim { opacity: 1; }
#page-config-review .crv-drawer-panel { position: relative; width: min(520px, 100%); height: 100%; background: var(--white); display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,.12); transform: translateX(24px); opacity: 0; transition: transform .2s ease, opacity .2s ease; overflow-y: auto; }
#page-config-review .crv-drawer.is-open .crv-drawer-panel { transform: none; opacity: 1; }
#page-config-review .crv-drawer-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--ib-text-2); cursor: pointer; border-radius: 3px; }
#page-config-review .crv-drawer-close:hover { background: var(--gray-bg); color: var(--ib-text); }
#page-config-review .crv-drawer-close:focus-visible { outline: 2px solid var(--ib-red); }
#page-config-review #crv-drawer-body { padding: 28px 28px 8px; flex: 1; }
#page-config-review .crv-d-eyebrow { font-size: 12px; color: var(--ib-text-2); margin-bottom: 6px; padding-right: 36px; }
#page-config-review .crv-d-title { font-size: 22px; font-weight: 400; letter-spacing: -.01em; color: var(--ib-text); margin-bottom: 12px; line-height: 1.2; }
#page-config-review .crv-d-status { display: flex; align-items: center; }
#page-config-review .crv-d-verdict { font-size: 14px; color: var(--ib-text); line-height: 1.55; margin: 12px 0 22px; }
#page-config-review .crv-d-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 22px; }
#page-config-review .crv-d-field { padding: 12px 14px; border-right: 1px solid var(--border-soft); }
#page-config-review .crv-d-field:last-child { border-right: 0; }
#page-config-review .crv-d-val { font-size: 14px; color: var(--ib-text); margin-top: 4px; word-break: break-word; }
#page-config-review .crv-d-section { margin-bottom: 18px; }
#page-config-review .crv-d-section p { font-size: 14px; line-height: 1.6; color: var(--ib-text); margin-top: 4px; }
#page-config-review .crv-d-prov dl { display: grid; grid-template-columns: 70px 1fr; gap: 6px 12px; margin-top: 6px; font-size: 13.5px; }
#page-config-review .crv-d-prov dt { color: var(--ib-text-2); }
#page-config-review .crv-d-prov dd { color: var(--ib-text); }
#page-config-review .crv-drawer-foot { display: flex; align-items: center; gap: 8px; padding: 16px 28px; border-top: 1px solid var(--border); background: var(--white); position: sticky; bottom: 0; flex-wrap: wrap; }
#page-config-review .crv-drawer-foot .crv-hint { margin-right: auto; }

@media (max-width: 1280px) {
  #page-config-review .crv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #page-config-review .crv-kpi { border-bottom: 1px solid var(--border-soft); }
  #page-config-review .crv-main-grid, #page-config-review .crv-setup { grid-template-columns: minmax(0, 1fr); }
  #page-config-review .crv-rail { position: static; }
}
@media (max-width: 900px) {
  #page-config-review .crv-finding { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #page-config-review .crv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #page-config-review .crv-bar-fill, #page-config-review .crv-drawer-panel, #page-config-review .crv-drawer-scrim { transition: none; }
}
#page-config-review .crv-legend-table { margin: 14px 2px 0; }
#page-config-review .crv-table-flat td:nth-child(3) { min-width: 150px; }
#page-config-review .crv-table-flat td:nth-child(4) { min-width: 210px; color: var(--ib-text-2); }
#page-config-review .crv-from { color: var(--ib-text-2); }
#page-config-review .crv-arrow { margin: 0 6px; color: var(--ib-text-2); }
#page-config-review .crv-to { font-weight: 500; color: var(--ib-text); }

/* Review summary + charts */
#page-config-review .crv-hero { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; }
#page-config-review .crv-hero-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
#page-config-review .crv-hero .crv-headline { margin-bottom: 0; }
#page-config-review .crv-charts { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
#page-config-review .crv-chart { margin-bottom: 0; }
#page-config-review .crv-chart .card-title { margin-bottom: 16px; }
#page-config-review .crv-donut-wrap { display: flex; align-items: center; gap: 18px; }
#page-config-review .crv-donut { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
#page-config-review .crv-donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
#page-config-review .crv-donut-track { fill: none; stroke: var(--border-soft); stroke-width: 4.6; }
#page-config-review .crv-donut-seg { fill: none; stroke: var(--t); stroke-width: 4.6; }
#page-config-review .crv-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
#page-config-review .crv-donut-num { font-size: 28px; font-weight: 300; letter-spacing: -.02em; color: var(--ib-charcoal); line-height: 1; font-variant-numeric: tabular-nums; }
#page-config-review .crv-donut-sub { font-size: 12px; color: var(--ib-text-2); margin-top: 3px; }
#page-config-review .crv-leg { list-style: none; flex: 1; min-width: 0; }
#page-config-review .crv-leg-row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 10px 1fr auto 38px; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--ib-text-2); }
#page-config-review .crv-leg-row:hover { background: var(--gray-bg); }
#page-config-review .crv-leg-row:focus-visible { outline: 2px solid var(--ib-red); }
#page-config-review .crv-leg-row b { color: var(--ib-text); font-weight: 500; font-variant-numeric: tabular-nums; }
#page-config-review .crv-leg-pct { text-align: right; font-variant-numeric: tabular-nums; }
#page-config-review .crv-stack { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--border-soft); }
#page-config-review .crv-seg { display: block; height: 100%; background: var(--t); min-width: 3px; }
#page-config-review .crv-bar-list { display: grid; gap: 6px; }
#page-config-review .crv-bar-row { all: unset; box-sizing: border-box; display: grid; gap: 7px; width: 100%; padding: 10px 12px; margin: 0 -12px; width: calc(100% + 24px); border-radius: 8px; cursor: pointer; }
#page-config-review .crv-bar-row:hover { background: var(--gray-bg); }
#page-config-review .crv-bar-row:focus-visible { outline: 2px solid var(--ib-red); }
#page-config-review .crv-bar-top { display: flex; align-items: baseline; gap: 8px; }
#page-config-review .crv-bar-name { font-size: 12.5px; color: var(--ib-text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-config-review .crv-bar-top .crv-overall { font-size: 12.5px; }
#page-config-review .crv-bar-foot { font-size: 12px; color: var(--ib-text-2); }
#page-config-review .crv-cat-head, #page-config-review .crv-cat-row { display: grid; grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) 54px; align-items: center; gap: 12px; }
#page-config-review .crv-cat-head { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ib-text-2); padding-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
#page-config-review .crv-cat-head span:last-child, #page-config-review .crv-cat-n { text-align: right; }
#page-config-review .crv-cat-row { padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
#page-config-review .crv-cat-row:last-child { border-bottom: 0; }
#page-config-review .crv-cat-name { font-size: 13px; color: var(--ib-text); }
#page-config-review .crv-cat-n { font-size: 13px; color: var(--ib-text-2); font-variant-numeric: tabular-nums; }
#page-config-review .crv-cat-n.has-attn { color: var(--ib-text); font-weight: 500; }
@media (min-width: 1101px) and (max-width: 1280px) { #page-config-review .crv-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } #page-config-review .crv-charts .crv-chart:last-child { grid-column: 1 / -1; } }
@media (max-width: 1100px) { #page-config-review .crv-charts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { #page-config-review .crv-donut-wrap { flex-direction: column; align-items: stretch; } }

/* ═════════════════════════════════════
   FEATURE ADOPTION (pages/feature-adoption.js)
   Same restraint as Configuration Review: text always accompanies colour.
══════════════════════════════════════ */
#page-feature-adoption {
  --fa-blue: #0b6a98;   --fa-blue-soft: #e6f3fa;
  --fa-amber: #a05a07;  --fa-amber-soft: #fdf3dc;
  --fa-purple: #7c1fa8; --fa-purple-soft: #f5edfa;
  --fa-green: #15803d;  --fa-green-soft: #e7f6ec;
  --fa-red: #c42626;    --fa-red-soft: #fdeeee;
  --fa-grey: #5b6577;   --fa-grey-soft: #eef0f4;
  --fa-neutral: #2f2f39; --fa-neutral-soft: #f3f3f6;
}
#page-feature-adoption .fa-tone-blue    { --t: var(--fa-blue);    --ts: var(--fa-blue-soft); }
#page-feature-adoption .fa-tone-amber   { --t: var(--fa-amber);   --ts: var(--fa-amber-soft); }
#page-feature-adoption .fa-tone-purple  { --t: var(--fa-purple);  --ts: var(--fa-purple-soft); }
#page-feature-adoption .fa-tone-green   { --t: var(--fa-green);   --ts: var(--fa-green-soft); }
#page-feature-adoption .fa-tone-red     { --t: var(--fa-red);     --ts: var(--fa-red-soft); }
#page-feature-adoption .fa-tone-grey    { --t: var(--fa-grey);    --ts: var(--fa-grey-soft); }
#page-feature-adoption .fa-tone-muted   { --t: var(--ib-text-2);  --ts: transparent; }
#page-feature-adoption .fa-tone-neutral { --t: var(--fa-neutral); --ts: var(--fa-neutral-soft); }
#page-feature-adoption .fa-bg-blue { background: var(--fa-blue); }
#page-feature-adoption .fa-bg-amber { background: var(--fa-amber); }
#page-feature-adoption .fa-bg-purple { background: var(--fa-purple); }
#page-feature-adoption .fa-bg-green { background: var(--fa-green); }
#page-feature-adoption .fa-bg-grey { background: #aab2c0; }
#page-feature-adoption .fa-stroke-blue { stroke: var(--fa-blue); }
#page-feature-adoption .fa-stroke-amber { stroke: var(--fa-amber); }
#page-feature-adoption .fa-stroke-purple { stroke: var(--fa-purple); }
#page-feature-adoption .fa-stroke-green { stroke: var(--fa-green); }
#page-feature-adoption .fa-stroke-grey { stroke: #aab2c0; }
#page-feature-adoption .fa-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
#page-feature-adoption .fa-hint { font-size: 12.5px; color: var(--ib-text-2); line-height: 1.5; }
#page-feature-adoption .fa-dash { color: var(--ib-text-2); }
#page-feature-adoption .fa-link { all: unset; cursor: pointer; font-size: 13px; color: var(--ib-charcoal); text-decoration: underline; text-underline-offset: 3px; }
#page-feature-adoption .fa-link:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-feature-adoption .fa-header-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
#page-feature-adoption .fa-ctl { display: grid; gap: 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ib-text-2); font-weight: 500; }
#page-feature-adoption .fa-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); font: inherit; font-size: 13.5px; color: var(--ib-text); text-transform: none; letter-spacing: 0; max-width: 260px; }
#page-feature-adoption .fa-select-sm { padding: 7px 10px; font-size: 13px; max-width: 200px; }
#page-feature-adoption .fa-select, #page-feature-adoption .fa-select-sm { -webkit-appearance: none; appearance: none; padding-right: 34px; 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='%23625e5c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
#page-feature-adoption .fa-nowrap { white-space: nowrap; }
#page-feature-adoption .fa-attn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--fa-red); }
#page-feature-adoption .fa-select:focus-visible, #page-feature-adoption .fa-search:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 1px; }

/* states */
#page-feature-adoption .fa-state { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 24px; text-align: center; }
#page-feature-adoption .fa-state-title { font-size: 16px; font-weight: 500; color: var(--ib-text); margin-bottom: 6px; }
#page-feature-adoption .fa-state-text { font-size: 13.5px; color: var(--ib-text-2); line-height: 1.55; max-width: 520px; margin: 0 auto; }
#page-feature-adoption .fa-state-actions { margin-top: 18px; }
#page-feature-adoption .fa-empty { text-align: center; padding: 36px 16px; }
#page-feature-adoption .fa-empty .btn-ghost { margin-top: 14px; }
#page-feature-adoption #fa-view-main.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s ease; }

/* scope + notice */
#page-feature-adoption .fa-scope { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#page-feature-adoption .fa-scope-k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ib-text-2); font-weight: 500; margin-right: 2px; }
#page-feature-adoption .fa-pill { font-size: 12.5px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--ib-text); }
#page-feature-adoption .fa-scope-note { font-size: 12.5px; color: var(--ib-text-2); margin-left: 6px; }
#page-feature-adoption .fa-notice { background: var(--fa-amber-soft); border: 1px solid #ecd9a8; color: #5e3a05; border-radius: var(--radius); padding: 12px 16px; font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }

/* KPI strip */
#page-feature-adoption .fa-kpis { display: grid; grid-template-columns: repeat(var(--fa-cols, 5), minmax(0, 1fr)); margin-bottom: 16px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
#page-feature-adoption .fa-kpi { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 18px 18px 16px; background: transparent; border: 0; border-right: 1px solid var(--border-soft); font: inherit; color: inherit; cursor: pointer; transition: background .15s ease; }
#page-feature-adoption .fa-kpi:last-child { border-right: 0; }
#page-feature-adoption .fa-kpi:hover { background: var(--gray-bg); }
#page-feature-adoption .fa-kpi-static { cursor: default; }
#page-feature-adoption .fa-kpi-static:hover { background: transparent; }
#page-feature-adoption .fa-kpi:focus-visible { outline: 2px solid var(--ib-red); outline-offset: -2px; }
#page-feature-adoption .fa-kpi-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ts); color: var(--t); margin-bottom: 10px; }
#page-feature-adoption .fa-kpi-value { font-size: 30px; font-weight: 300; letter-spacing: -.02em; line-height: 1.05; color: var(--ib-charcoal); font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-kpi-value small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ib-text-2); margin-left: 5px; }
#page-feature-adoption .fa-kpi-label { font-size: 13px; font-weight: 500; color: var(--ib-text); line-height: 1.3; }
#page-feature-adoption .fa-kpi-note { font-size: 12px; color: var(--ib-text-2); line-height: 1.4; }

/* cards + charts */
#page-feature-adoption .fa-card { margin-bottom: 16px; padding: 20px 22px; }
#page-feature-adoption .fa-card-head { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
#page-feature-adoption .fa-charts { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
#page-feature-adoption .fa-chart { margin-bottom: 0; }
#page-feature-adoption .fa-chart .card-title { margin-bottom: 16px; }
#page-feature-adoption .fa-donut-wrap { display: flex; align-items: center; gap: 18px; }
#page-feature-adoption .fa-donut { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
#page-feature-adoption .fa-donut svg { width: 100%; height: 100%; }
#page-feature-adoption .fa-donut-track { fill: none; stroke: var(--border-soft); stroke-width: 4.6; }
#page-feature-adoption .fa-donut-seg { fill: none; stroke-width: 4.6; }
#page-feature-adoption .fa-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
#page-feature-adoption .fa-donut-num { font-size: 26px; font-weight: 300; letter-spacing: -.02em; color: var(--ib-charcoal); line-height: 1; font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-donut-sub { font-size: 12px; color: var(--ib-text-2); margin-top: 3px; }
#page-feature-adoption .fa-leg { list-style: none; flex: 1; min-width: 0; }
#page-feature-adoption .fa-leg-row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; width: 100%; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--ib-text-2); }
#page-feature-adoption .fa-leg-row:hover { background: var(--gray-bg); }
#page-feature-adoption .fa-leg-row:focus-visible { outline: 2px solid var(--ib-red); }
#page-feature-adoption .fa-leg-row b { color: var(--ib-text); font-weight: 500; font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-leg-name { min-width: 0; }
#page-feature-adoption .fa-leg-pct { text-align: right; font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-mod-row { all: unset; box-sizing: border-box; display: grid; gap: 7px; width: calc(100% + 24px); margin: 0 -12px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
#page-feature-adoption .fa-mod-row:hover { background: var(--gray-bg); }
#page-feature-adoption .fa-mod-row:focus-visible { outline: 2px solid var(--ib-red); }
#page-feature-adoption .fa-mod-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
#page-feature-adoption .fa-mod-name { font-size: 13.5px; color: var(--ib-text); font-weight: 500; }
#page-feature-adoption .fa-mod-n { font-size: 12.5px; color: var(--ib-text); font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-mod-n span { color: var(--ib-text-2); }
#page-feature-adoption .fa-stack { display: flex; gap: 2px; height: 9px; border-radius: 5px; overflow: hidden; background: var(--border-soft); }
#page-feature-adoption .fa-seg { display: block; height: 100%; min-width: 3px; }
#page-feature-adoption .fa-actions { display: grid; gap: 6px; }
#page-feature-adoption .fa-action { display: grid; grid-template-columns: 34px 1fr 14px; align-items: center; gap: 12px; text-align: left; padding: 9px 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); font: inherit; color: var(--ib-text); cursor: pointer; transition: border-color .15s ease; }
#page-feature-adoption .fa-action:hover { border-color: var(--ib-charcoal); }
#page-feature-adoption .fa-action:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-feature-adoption .fa-action-count { display: inline-flex; justify-content: center; font-size: 14px; font-weight: 500; padding: 3px 0; border-radius: 6px; background: var(--ts); color: var(--t); font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-action-label { font-size: 13px; line-height: 1.35; }
#page-feature-adoption .fa-action svg { color: var(--ib-text-2); }
#page-feature-adoption .fa-progress-note { font-size: 12.5px; color: var(--ib-text-2); margin-top: 12px; }

/* tags, levels, recommendations */
#page-feature-adoption .fa-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--ts); color: var(--t); white-space: nowrap; }
#page-feature-adoption .fa-rec { display: inline-block; font-size: 13px; font-weight: 500; color: var(--t); white-space: nowrap; }
#page-feature-adoption .fa-state-tag { font-size: 11.5px; color: var(--ib-text-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
#page-feature-adoption .fa-level { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
#page-feature-adoption .fa-meter { display: inline-flex; gap: 2px; }
#page-feature-adoption .fa-meter i { width: 5px; height: 12px; border-radius: 1px; background: var(--border); }
#page-feature-adoption .fa-meter.fa-lvl-low i.on { background: #8a93a5; }
#page-feature-adoption .fa-meter.fa-lvl-medium i.on { background: var(--fa-amber); }
#page-feature-adoption .fa-meter.fa-lvl-high i.on { background: var(--fa-red); }

/* table + toolbar */
#page-feature-adoption .fa-toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-bottom: 12px; }
#page-feature-adoption .fa-chips { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
#page-feature-adoption .fa-chip { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--ib-text); cursor: pointer; }
#page-feature-adoption .fa-chip span { color: var(--ib-text-2); margin-left: 4px; font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-chip:hover { border-color: var(--ib-text-2); }
#page-feature-adoption .fa-chip.is-active { background: var(--ib-charcoal); border-color: var(--ib-charcoal); color: #fff; }
#page-feature-adoption .fa-chip.is-active span { color: rgba(255,255,255,.75); }
#page-feature-adoption .fa-chip:focus-visible { outline: 2px solid var(--ib-red); outline-offset: 2px; }
#page-feature-adoption .fa-selects { display: flex; flex-wrap: wrap; gap: 8px; }
#page-feature-adoption .fa-search { flex: 1; min-width: 220px; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 13px; background: var(--white); }
#page-feature-adoption .fa-active { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ib-text-2); padding: 8px 12px; background: var(--gray-bg); border-radius: var(--radius); margin-bottom: 10px; }
#page-feature-adoption .fa-active strong { color: var(--ib-text); font-weight: 500; }
#page-feature-adoption .fa-table-wrap { overflow-x: auto; }
#page-feature-adoption .fa-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#page-feature-adoption .fa-table th, #page-feature-adoption .fa-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
#page-feature-adoption .fa-table thead th { font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ib-text-2); background: var(--gray-bg); white-space: nowrap; border-bottom: 1px solid var(--border); }
#page-feature-adoption .fa-table tbody tr:last-child td { border-bottom: 0; }
#page-feature-adoption .fa-row { cursor: pointer; }
#page-feature-adoption .fa-row:hover { background: var(--gray-bg); }
#page-feature-adoption .fa-row:focus-visible { outline: 2px solid var(--ib-red); outline-offset: -2px; }
#page-feature-adoption .fa-row.is-muted td { color: var(--ib-text-2); }
#page-feature-adoption .fa-row.is-muted .fa-name { color: var(--ib-text-2); font-weight: 400; }
#page-feature-adoption .fa-row.is-handled { background: var(--gray-bg); }
#page-feature-adoption .fa-c-name { min-width: 260px; max-width: 380px; }
#page-feature-adoption .fa-name { color: var(--ib-text); font-weight: 500; line-height: 1.4; }
#page-feature-adoption .fa-name-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
#page-feature-adoption .fa-name-tags:empty { display: none; }
#page-feature-adoption .fa-sub { display: block; font-size: 12px; color: var(--ib-text-2); }
#page-feature-adoption .fa-c-why { min-width: 260px; color: var(--ib-text-2); line-height: 1.5; }
#page-feature-adoption .fa-more { padding-top: 12px; }

/* drawer */
#page-feature-adoption .fa-drawer { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: flex-end; }
#page-feature-adoption .fa-drawer.hidden { display: none !important; }
#page-feature-adoption .fa-drawer-scrim { position: absolute; inset: 0; background: rgba(30,30,40,.38); opacity: 0; transition: opacity .18s ease; }
#page-feature-adoption .fa-drawer.is-open .fa-drawer-scrim { opacity: 1; }
#page-feature-adoption .fa-drawer-panel { position: relative; width: min(620px, 100%); height: 100%; background: var(--white); box-shadow: -8px 0 30px rgba(0,0,0,.14); display: flex; flex-direction: column; overflow-y: auto; transform: translateX(24px); opacity: 0; transition: transform .18s ease, opacity .18s ease; }
#page-feature-adoption .fa-drawer.is-open .fa-drawer-panel { transform: none; opacity: 1; }
#page-feature-adoption .fa-drawer-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border: 0; background: transparent; border-radius: 6px; font-size: 22px; line-height: 1; color: var(--ib-text-2); cursor: pointer; }
#page-feature-adoption .fa-drawer-close:hover { background: var(--gray-bg); color: var(--ib-text); }
#page-feature-adoption .fa-drawer-close:focus-visible { outline: 2px solid var(--ib-red); }
#page-feature-adoption #fa-drawer-body { padding: 28px 30px 8px; flex: 1; }
#page-feature-adoption .fa-d-eyebrow { font-size: 12px; color: var(--ib-text-2); margin-bottom: 6px; padding-right: 36px; }
#page-feature-adoption .fa-d-title { font-size: 22px; font-weight: 400; letter-spacing: -.01em; color: var(--ib-text); line-height: 1.3; margin-bottom: 12px; padding-right: 30px; }
#page-feature-adoption .fa-d-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
#page-feature-adoption .fa-d-lead { font-size: 14px; color: var(--ib-text); line-height: 1.6; margin-bottom: 8px; }
#page-feature-adoption .fa-d-sec { padding: 18px 0; border-top: 1px solid var(--border-soft); }
#page-feature-adoption .fa-d-sec h3 { font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ib-text-2); margin-bottom: 10px; }
#page-feature-adoption .fa-d-sec p { font-size: 14px; line-height: 1.6; color: var(--ib-text); margin-bottom: 6px; }
#page-feature-adoption .fa-d-sec p:last-child { margin-bottom: 0; }
#page-feature-adoption .fa-d-strong { font-weight: 500; }
#page-feature-adoption .fa-d-faint { color: var(--ib-text-2) !important; font-size: 13px !important; }
#page-feature-adoption .fa-d-effort { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
#page-feature-adoption .fa-d-band { font-size: 24px; font-weight: 300; letter-spacing: -.01em; color: var(--ib-charcoal); }
#page-feature-adoption .fa-d-eff-note { font-size: 12.5px; color: var(--ib-text-2); }
#page-feature-adoption .fa-d-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 10px; }
#page-feature-adoption .fa-d-table th, #page-feature-adoption .fa-d-table td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-weight: 400; }
#page-feature-adoption .fa-d-table td { text-align: right; color: var(--ib-text); font-variant-numeric: tabular-nums; }
#page-feature-adoption .fa-d-table thead th { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ib-text-2); }
#page-feature-adoption .fa-d-table .fa-d-total th, #page-feature-adoption .fa-d-table .fa-d-total td { font-weight: 500; border-bottom: 0; }
#page-feature-adoption .fa-d-scope td.is-req { font-weight: 500; }
#page-feature-adoption .fa-d-scope td { color: var(--ib-text-2); }
#page-feature-adoption .fa-d-overall { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 8px; }
#page-feature-adoption .fa-d-dims { list-style: none; }
#page-feature-adoption .fa-d-dims li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
#page-feature-adoption .fa-d-dims li:last-child { border-bottom: 0; }
#page-feature-adoption .fa-d-dims em { display: block; font-style: normal; font-size: 12px; color: var(--ib-text-2); }
#page-feature-adoption .fa-d-dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 13.5px; }
#page-feature-adoption .fa-d-dl dt { color: var(--ib-text-2); }
#page-feature-adoption .fa-d-dl dd { color: var(--ib-text); line-height: 1.5; }
#page-feature-adoption .fa-d-steps { padding-left: 20px; display: grid; gap: 7px; font-size: 14px; line-height: 1.55; color: var(--ib-text); }
#page-feature-adoption .fa-d-prov { list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
#page-feature-adoption .fa-d-prov span { display: block; font-size: 12px; color: var(--ib-text-2); }
#page-feature-adoption .fa-drawer-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 16px 30px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--white); }
#page-feature-adoption .fa-d-btn { font-size: 13px; }

@media (max-width: 1280px) {
  #page-feature-adoption .fa-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #page-feature-adoption .fa-kpi { border-bottom: 1px solid var(--border-soft); }
  #page-feature-adoption .fa-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #page-feature-adoption .fa-charts .fa-chart:last-child { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  #page-feature-adoption .fa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-feature-adoption .fa-charts { grid-template-columns: minmax(0, 1fr); }
  #page-feature-adoption .fa-donut-wrap { flex-direction: column; align-items: stretch; }
  #page-feature-adoption .fa-d-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  #page-feature-adoption .fa-d-dl dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #page-feature-adoption .fa-drawer-panel, #page-feature-adoption .fa-drawer-scrim { transition: none; }
}

/* ─────────────────────────────────────────────────────────────────────────
   IMPACT ANALYSIS DETAIL — dashboard (2026-10-03 redesign)
   Hero + clickable KPI strip + six chart cards + tabbed explorer + drawer.
   Built by pages/impact-detail.js (_iadRender). Same --hd-* palette as the
   Health Dashboard and Release Assurance so the three read as one product.
   No accent bars: tone comes from tinted icon chips and pills only.
   ───────────────────────────────────────────────────────────────────────── */
.iad, #iad-drawer {
  --hd-green: #16a34a; --hd-green-bg: #dcfce7;
  --hd-blue: #2563eb;  --hd-blue-bg: #dbeafe;
  --hd-violet: #7c3aed; --hd-violet-bg: #ede9fe;
  --hd-amber: #d97706; --hd-amber-bg: #fef3c7;
  --hd-red: #dc2626;   --hd-red-bg: #fee2e2;
  --hd-brand: var(--ib-red); --hd-brand-bg: var(--ib-red-bg, #ffe4e9);
  --hd-track: var(--border-soft, #efe7da);
  --iad-card: var(--white, #fff);
}
.iad { display: flex; flex-direction: column; gap: 16px; }

.iad-hero {
  --tone: var(--ib-text-2); --tone-bg: var(--gray-bg, #f6f0e6);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px;
  padding: 22px 24px; border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(105deg, var(--tone-bg) 0%, var(--iad-card) 60%);
}
.iad-tone-critical { --tone: #7f1d1d; --tone-bg: #fdecec; }
.iad-tone-high     { --tone: var(--hd-red); --tone-bg: #fdf0f0; }
.iad-tone-medium   { --tone: var(--hd-amber); --tone-bg: #fdf6e7; }
.iad-tone-low      { --tone: var(--hd-green); --tone-bg: #eef9f1; }
.iad-eyebrow { font-size: 12px; font-weight: 600; color: var(--tone); }
.iad-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--ib-text); margin: 4px 0 8px; line-height: 1.2; }
.iad-summary {
  margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ib-text-2); max-width: 820px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.iad-summary.is-open { -webkit-line-clamp: unset; display: block; }
.iad-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.iad-chips .pd-chip { background: var(--iad-card); }
.iad-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; min-width: 260px; }
.iad-risk { background: var(--iad-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; width: 100%; max-width: 300px; }
.iad-risk-k { font-size: 11.5px; color: var(--ib-text-2); font-weight: 600; }
.iad-risk-v { font-size: 22px; font-weight: 700; color: var(--tone); margin: 2px 0 8px; }
.iad-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.iad-meter span { height: 8px; border-radius: 4px; background: var(--hd-track); border: 1px solid var(--border-strong); }
.iad-meter span.on { background: var(--c); }
.iad-meter-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 5px; font-size: 10.5px; color: var(--ib-text-2); }
.iad-meter-labels .on { color: var(--ib-text); font-weight: 700; }
.iad-hero-main { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.iad-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.iad-hero-actions .btn-primary, .iad-hero-actions .btn-outline { font-size: 12.5px; padding: 8px 13px; }
.iad-hero-actions .iad-icon-btn { padding: 8px; display: flex; align-items: center; justify-content: center; }
.iad-hero-actions .iad-dl-btn { display: inline-flex; align-items: center; gap: 7px; }
.iad-dl-btn svg { flex-shrink: 0; color: var(--ib-text-2); }

.iad-kpis {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--iad-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.iad-kpi {
  --k: var(--ib-text-2); --k-bg: var(--gray-bg, #f6f0e6);
  display: flex; gap: 12px; align-items: flex-start; text-align: left; min-width: 0;
  padding: 16px; background: none; border: 0; border-left: 1px solid var(--border-soft, #efe7da);
  font: inherit; color: inherit; cursor: pointer; transition: background .15s ease;
}
.iad-kpi:first-child { border-left: 0; }
.iad-kpi:hover { background: var(--k-bg); }
.iad-kpi:focus-visible { outline: 2px solid var(--ib-red); outline-offset: -2px; }
.iad-kpi-brand { --k: var(--hd-brand); --k-bg: #fff3f5; }
.iad-kpi-red { --k: var(--hd-red); --k-bg: #fef5f5; }
.iad-kpi-green { --k: var(--hd-green); --k-bg: #f2fbf5; }
.iad-kpi-violet { --k: var(--hd-violet); --k-bg: #f7f4fe; }
.iad-kpi-blue { --k: var(--hd-blue); --k-bg: #f3f7fe; }
.iad-kpi-amber { --k: var(--hd-amber); --k-bg: #fefaf0; }
.iad-kpi-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--k); background: color-mix(in srgb, var(--k) 12%, transparent); }
.iad-kpi-icon svg { width: 17px; height: 17px; }
.iad-kpi-body { display: flex; flex-direction: column; min-width: 0; }
.iad-kpi-label { font-size: 12px; font-weight: 600; color: var(--ib-text-2); }
.iad-kpi-value { font-size: 26px; font-weight: 700; color: var(--ib-text); line-height: 1.15; margin-top: 2px; letter-spacing: -.02em; }
.iad-kpi-sub { font-size: 11.5px; color: var(--ib-text-2); margin-top: 2px; line-height: 1.35; }

.iad-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.iad-card { background: var(--iad-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 18px 16px; display: flex; flex-direction: column; min-width: 0; }
.iad-card-head { margin-bottom: 14px; }
.iad-card-title { font-size: 14px; font-weight: 700; color: var(--ib-text); }
.iad-card-sub { font-size: 12px; color: var(--ib-text-2); margin-top: 2px; }
.iad-donut-wrap { display: flex; align-items: center; gap: 18px; }
.iad-donut-wrap .pd-donut-svg { flex-shrink: 0; margin: 0; }
.iad-legend { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.iad-legend.is-tight { flex: none; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; margin-top: 10px; }
.iad-legend.is-tight .iad-leg { width: auto; grid-template-columns: auto auto auto; }
.iad-legend.is-tight .iad-leg-pct { display: none; }
.iad-leg {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 36px; align-items: center; gap: 8px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12.5px; color: var(--ib-text);
  cursor: pointer; text-align: left;
}
.iad-leg:hover:not(:disabled) { background: var(--gray-bg, #f6f0e6); }
.iad-leg:disabled { cursor: default; opacity: .5; }
.iad-leg-dot { width: 9px; height: 9px; border-radius: 50%; }
.iad-leg-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iad-leg-val { font-weight: 700; }
.iad-leg-pct { color: var(--ib-text-2); font-size: 11.5px; text-align: right; }

.iad-bars { display: flex; flex-direction: column; gap: 2px; }
.iad-bar-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 40px; align-items: center; gap: 10px;
  padding: 6px 6px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12.5px;
  color: var(--ib-text); cursor: pointer; text-align: left; width: 100%;
}
.iad-bar-row.is-wide { grid-template-columns: 170px minmax(0, 1fr) 46px; }
.iad-bar-row:hover:not(:disabled) { background: var(--gray-bg, #f6f0e6); }
.iad-bar-row:disabled { cursor: default; opacity: .55; }
.iad-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ib-text); }
.iad-bar-track { height: 10px; border-radius: 5px; background: var(--hd-track); overflow: hidden; display: block; }
.iad-fill { display: block; height: 100%; border-radius: 5px; background: var(--hd-brand); min-width: 4px; }
.iad-fill.is-violet { background: var(--hd-violet); }
.iad-fill.is-blue { background: var(--hd-blue); }
.iad-stack { display: flex; height: 100%; gap: 2px; min-width: 4px; }
.iad-stack i { display: block; height: 100%; }
.iad-stack i:first-child { border-radius: 5px 0 0 5px; }
.iad-stack i:last-child { border-radius: 0 5px 5px 0; }
.iad-stack i:only-child { border-radius: 5px; }
.iad-bar-val { font-weight: 700; text-align: right; }
.iad-bar-val small { font-weight: 500; color: var(--ib-text-2); font-size: 11px; }
.iad-mini-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 11.5px; color: var(--ib-text-2); }
.iad-mini-legend span { display: inline-flex; align-items: center; gap: 5px; }
.iad-mini-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.iad-stackbar { display: flex; gap: 3px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--hd-track); }
.iad-stackbar i { display: block; height: 100%; }
.iad-note { font-size: 12px; color: var(--ib-text-2); margin-top: auto; padding-top: 12px; line-height: 1.5; }
.iad-empty-sm { font-size: 12.5px; color: var(--ib-text-2); padding: 12px 0; }
.iad-link { background: none; border: 0; padding: 0; margin-top: 8px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ib-red); cursor: pointer; align-self: flex-start; }
.iad-link:hover { text-decoration: underline; }

.iad-explorer { background: var(--iad-card); border: 1px solid var(--border); border-radius: 12px; padding: 4px 20px 18px; scroll-margin-top: 16px; }
.iad-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border); margin: 0 -20px; padding: 0 14px; scrollbar-width: thin; }
.iad-tab {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; padding: 14px 10px 12px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ib-text-2); cursor: pointer; white-space: nowrap;
}
.iad-tab:hover { color: var(--ib-text); }
.iad-tab.is-active { color: var(--ib-text); border-bottom-color: var(--ib-red); }
.iad-tab-n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--gray-bg, #f6f0e6); color: var(--ib-text-2); }
.iad-tab.is-active .iad-tab-n { background: var(--ib-red-bg, #ffe4e9); color: var(--ib-red); }
.iad-intro { font-size: 12.5px; color: var(--ib-text-2); margin: 14px 0 12px; }
.iad-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.iad-search { flex: 1 1 200px; max-width: 280px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; background: var(--iad-card); color: var(--ib-text); }
.iad-select { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ib-text-2); }
.iad-select select { padding: 7px 34px 7px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 12.5px; background-color: var(--iad-card); color: var(--ib-text); max-width: 200px;
  /* own arrow, inset from the edge (the native one sits flush against the border) */
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23676775' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.iad-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 0; background: var(--ib-red-bg, #ffe4e9); color: var(--ib-red); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.iad-toolbar .iad-link { margin-top: 0; align-self: center; padding: 5px 6px; line-height: 1.3; font-size: 12px; }
.iad-count { font-size: 11.5px; color: var(--ib-text-2); margin-bottom: 6px; }
.iad-table-wrap { overflow-x: auto; border: 1px solid var(--border-soft, #efe7da); border-radius: 10px; }
.iad-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.iad-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--ib-text-2); padding: 9px 12px; background: var(--gray-bg, #f8f4ee); white-space: nowrap; }
.iad-table td { padding: 11px 12px; border-top: 1px solid var(--border-soft, #efe7da); vertical-align: top; color: var(--ib-text); }
.iad-table tbody tr { cursor: pointer; transition: background .12s ease; }
.iad-table tbody tr:hover, .iad-table tbody tr:focus-visible { background: #fbf8f3; outline: none; }
.iad-table td:first-child { min-width: 240px; max-width: 420px; }
.iad-name { font-weight: 600; color: var(--ib-text); }
.iad-sub { font-size: 11.5px; color: var(--ib-text-2); margin-top: 2px; }
.iad-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 380px; }
.iad-muted { color: var(--ib-text-3, #9a948f); }
.iad-num { font-weight: 700; }
.iad-chev { color: var(--ib-text-3, #9a948f); font-size: 18px; width: 20px; text-align: right; }
.iad-empty { padding: 28px 12px; text-align: center; font-size: 13px; color: var(--ib-text-2); border: 1px dashed var(--border); border-radius: 10px; }
.iad-empty .iad-link { margin: 0 0 0 6px; }

.iad-sev, .iad-tag, .iad-prio, .iad-tier {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-bg, #f6f0e6); color: var(--ib-text-2);
}
.iad-sev-critical { background: #fde8e8; color: #7f1d1d; }
.iad-sev-high { background: var(--hd-red-bg); color: #b91c1c; }
.iad-sev-medium { background: var(--hd-amber-bg); color: #92400e; }
.iad-sev-low { background: var(--hd-green-bg); color: #166534; }
.iad-tier { background: none; padding-left: 0; color: var(--ib-text); font-weight: 500; }
.iad-tier::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.iad-tag.is-violet { background: var(--hd-violet-bg); color: #5b21b6; }
.iad-tag.is-amber { background: var(--hd-amber-bg); color: #92400e; }
.iad-tag.is-red, .iad-prio.is-hot { background: var(--hd-red-bg); color: #b91c1c; }

.iad-more { margin-top: 16px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.iad-more > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ib-text); }
.iad-more[open] > summary { margin-bottom: 4px; }

.iad-drawer-root { position: fixed; inset: 0; z-index: 1200; }
.iad-drawer-root.hidden { display: none; }
.iad-scrim { position: absolute; inset: 0; background: rgba(28, 25, 23, .32); }
.iad-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--white, #fff); box-shadow: -12px 0 32px rgba(0,0,0,.14); display: flex; flex-direction: column;
  animation: iad-in .18s ease-out;
}
@keyframes iad-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.iad-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.iad-drawer-head h3 { margin: 8px 0 0; font-size: 18px; line-height: 1.3; color: var(--ib-text); }
.iad-drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.iad-x { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ib-text-2); cursor: pointer; padding: 0 4px; border-radius: 6px; }
.iad-x:hover { color: var(--ib-text); background: var(--gray-bg, #f6f0e6); }
.iad-drawer-body { padding: 4px 22px 28px; overflow-y: auto; flex: 1; }
.iad-dsec { padding: 16px 0 0; }
.iad-dsec h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; color: var(--ib-text-2); letter-spacing: .02em; }
.iad-para { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ib-text); white-space: pre-line; }
.iad-ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: var(--ib-text); }
.iad-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0 0 8px; }
.iad-kv div { min-width: 0; }
.iad-kv dt { font-size: 11.5px; color: var(--ib-text-2); }
.iad-kv dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--ib-text); overflow-wrap: anywhere; }
.iad-src { font-size: 13px; font-weight: 600; color: var(--ib-red); text-decoration: none; }
.iad-src:hover { text-decoration: underline; }
.iad-quote { margin: 8px 0 0; padding: 8px 12px; background: var(--gray-bg, #f8f4ee); border-radius: 8px; font-size: 12.5px; color: var(--ib-text-2); line-height: 1.5; }
.iad-rel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.iad-rel { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--border-soft, #efe7da); border-radius: 8px; background: none; font: inherit; font-size: 13px; color: var(--ib-text); cursor: pointer; }
.iad-rel:hover { background: var(--gray-bg, #f8f4ee); }
.iad-rel span { color: var(--ib-text-2); font-size: 11.5px; white-space: nowrap; }

@media (max-width: 1240px) {
  .iad-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iad-kpi:nth-child(4) { border-left: 0; }
  .iad-kpi:nth-child(n+4) { border-top: 1px solid var(--border-soft, #efe7da); }
}
@media (max-width: 1100px) {
  .iad-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iad-hero { grid-template-columns: minmax(0, 1fr); }
  .iad-hero-side { align-items: flex-start; min-width: 0; }
  .iad-hero-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .iad-charts { grid-template-columns: minmax(0, 1fr); }
  .iad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iad-kpi:nth-child(n) { border-left: 0; border-top: 1px solid var(--border-soft, #efe7da); }
  .iad-kpi:nth-child(2n) { border-left: 1px solid var(--border-soft, #efe7da); }
  .iad-kpi:nth-child(-n+2) { border-top: 0; }
  .iad-kpi { flex-direction: column; gap: 8px; padding: 14px; }
  .iad-kpi-value { font-size: 22px; }
  .iad-hero { padding: 18px 16px; }
  .iad-title { font-size: 20px; }
  .iad-donut-wrap { flex-direction: column; align-items: stretch; }
  .iad-donut-wrap .pd-donut-svg { align-self: center; }
  .iad-bar-row, .iad-bar-row.is-wide { grid-template-columns: 96px minmax(0, 1fr) 40px; }
  .iad-kv { grid-template-columns: minmax(0, 1fr); }
  .iad-explorer { padding: 4px 14px 14px; }
  .iad-tabs { margin: 0 -14px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .iad-drawer { animation: none; }
  .iad-kpi, .iad-table tbody tr { transition: none; }
}
/* Release Assurance's Config book tile scrolls here; clear the fixed top bar. */
#cr-highrisk-box { scroll-margin-top: 84px; }
.iad-total { margin-top: auto; padding-top: 12px; font-size: 11.5px; color: var(--ib-text-2); border-top: 1px dashed var(--border-soft, #efe7da); }
.iad-card > .iad-bars + .iad-total, .iad-card > .iad-donut-wrap + .iad-total, .iad-card > .iad-mini-legend + .iad-total { margin-top: auto; }
.iad-ev-k { font-size: 11.5px; font-weight: 600; color: var(--ib-text-2); margin-bottom: 6px; }
.iad-ev-k.is-second { margin-top: 16px; }
.iad-mini-legend b { color: var(--ib-text); font-weight: 700; }
/* Regression Suite Review: coverage per impacted finding */
.rsr-cov-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: var(--ib-text-2); margin: 4px 0 8px; }
.rsr-cov-head span { font-weight: 500; }
.rsr-cov-table td { vertical-align: top; }
.rsr-cov-via { font-size: 11px; color: var(--ib-text-2); }
.rsr-cov { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.rsr-cov.is-ok { background: #dcfce7; color: #166534; }
.rsr-cov.is-gap { background: #fef3c7; color: #92400e; }
.rsr-cov.is-none { background: var(--gray-bg, #f6f0e6); color: var(--ib-text-2); }
.iad-chip-btn { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; transition: border-color .15s ease; }
.iad-chip-btn:hover { border-color: var(--ib-red); }

/* ── Release Explorer (2026-10-25) ───────────────────────────────────────── */
#page-release-explorer .rx-state { padding: 28px; color: var(--ib-text-2); }
#page-release-explorer .rx-state-title { font-weight: 600; color: var(--ib-text); margin-bottom: 6px; }
#page-release-explorer .rx-pillars { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#page-release-explorer .rx-pill { font: inherit; font-size: 14px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--ib-text); cursor: pointer; }
#page-release-explorer .rx-pill b { margin-left: 4px; color: var(--ib-text-2); font-variant-numeric: tabular-nums; }
#page-release-explorer .rx-pill.on { background: var(--ib-charcoal); border-color: var(--ib-charcoal); color: #fff; }
#page-release-explorer .rx-pill.on b { color: rgba(255,255,255,.7); }
#page-release-explorer .rx-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
#page-release-explorer .rx-tab { font: inherit; font-size: 14px; padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--ib-text-2); cursor: pointer; }
#page-release-explorer .rx-tab span { margin-left: 4px; font-variant-numeric: tabular-nums; opacity: .8; }
#page-release-explorer .rx-tab.on { color: var(--ib-red); border-bottom-color: var(--ib-red); }
#page-release-explorer .rx-lead { max-width: 820px; color: var(--ib-text-2); font-size: 14.5px; line-height: 1.6; margin: 0 0 18px; }
#page-release-explorer .rx-h3 { font-size: 15px; font-weight: 600; margin: 26px 0 12px; color: var(--ib-charcoal); }
#page-release-explorer .rx-h3-s { font-weight: 400; font-size: 12.5px; color: var(--ib-text-2); margin-left: 8px; }
#page-release-explorer .rx-note { font-size: 12.5px; color: var(--ib-text-2); line-height: 1.55; margin: 12px 0 0; max-width: 820px; }
#page-release-explorer .rx-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
#page-release-explorer .rx-tiles.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { #page-release-explorer .rx-tiles, #page-release-explorer .rx-tiles.three { grid-template-columns: 1fr 1fr; } }
#page-release-explorer .rx-tile { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; font: inherit; border: 1px solid var(--border); border-radius: 4px; background: var(--white); cursor: pointer; }
#page-release-explorer .rx-tile:disabled { cursor: default; }
#page-release-explorer .rx-tile:not(:disabled):hover { box-shadow: 4px 4px 0 var(--ib-red-soft); }
#page-release-explorer .rx-tile-l { font-size: 12.5px; color: var(--ib-text-2); }
#page-release-explorer .rx-tile-v { font-size: 28px; font-weight: 700; color: var(--ib-charcoal); font-variant-numeric: tabular-nums; line-height: 1.1; }
#page-release-explorer .rx-tile-s { font-size: 12px; color: var(--ib-text-2); line-height: 1.4; }
#page-release-explorer .rx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; }
@media (max-width: 900px) { #page-release-explorer .rx-two { grid-template-columns: 1fr; } }
#page-release-explorer .rx-bars { display: flex; flex-direction: column; gap: 6px; }
#page-release-explorer .rx-bar { display: grid; grid-template-columns: 170px 1fr 40px; gap: 10px; align-items: center; font: inherit; font-size: 13px; text-align: left; border: 0; background: transparent; padding: 4px 0; cursor: pointer; color: var(--ib-text); }
#page-release-explorer .rx-bar:disabled { cursor: default; }
#page-release-explorer .rx-bar:not(:disabled):hover .rx-bar-l { color: var(--ib-red); }
#page-release-explorer .rx-bar-t { height: 10px; background: var(--ib-cream-2); border-radius: 2px; overflow: hidden; }
#page-release-explorer .rx-bar-f { display: block; height: 100%; background: var(--ib-red); }
#page-release-explorer .rx-bar-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
#page-release-explorer .rx-geo { max-width: 640px; margin-bottom: 18px; }
#page-release-explorer .rx-modchart { display: flex; flex-direction: column; gap: 4px; }
#page-release-explorer .rx-mrow { display: grid; grid-template-columns: 220px 1fr 36px; gap: 10px; align-items: center; font: inherit; font-size: 13px; text-align: left; border: 0; background: transparent; padding: 3px 0; cursor: pointer; color: var(--ib-text); }
#page-release-explorer .rx-mrow:hover .rx-mname { color: var(--ib-red); }
#page-release-explorer .rx-mname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-release-explorer .rx-mtrack { display: flex; height: 14px; background: var(--ib-cream-2); border-radius: 2px; overflow: hidden; }
#page-release-explorer .rx-mn { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
#page-release-explorer .s-high { background: var(--ib-red); }
#page-release-explorer .s-med { background: #e8a33d; }
#page-release-explorer .s-low { background: #c9c6c0; }
#page-release-explorer .rx-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--ib-text-2); }
#page-release-explorer .rx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
@media (max-width: 700px) { #page-release-explorer .rx-bar { grid-template-columns: 110px 1fr 36px; } #page-release-explorer .rx-mrow { grid-template-columns: 120px 1fr 32px; } }

#page-release-explorer .rx-facets { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr) auto; gap: 8px; margin-bottom: 8px; }
#page-release-explorer .rx-facets select:nth-of-type(n+5) { grid-column: auto; }
@media (max-width: 1200px) { #page-release-explorer .rx-facets { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { #page-release-explorer .rx-facets { grid-template-columns: 1fr 1fr; } }
#page-release-explorer .rx-facets input, #page-release-explorer .rx-facets select { min-width: 0; font: inherit; font-size: 13.5px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--white); color: var(--ib-text); }
#page-release-explorer .rx-facets select { -webkit-appearance: none; appearance: none; padding-right: 36px; text-overflow: ellipsis; 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='%23625e5c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; }
#page-release-explorer .rx-clear { font: inherit; font-size: 13px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--ib-text-2); cursor: pointer; }
#page-release-explorer .rx-sum { font-size: 14px; margin: 14px 0 12px; }
#page-release-explorer .rx-sum span { color: var(--ib-text-2); margin-left: 6px; }
#page-release-explorer .rx-row { margin-bottom: 8px; }
#page-release-explorer .rx-rowh { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; width: 100%; text-align: left; font: inherit; padding: 14px 16px; border: 1px solid var(--border); border-radius: 4px; background: var(--white); cursor: pointer; color: var(--ib-text); }
#page-release-explorer .rx-rowh:hover { border-color: var(--ib-charcoal); box-shadow: 4px 4px 0 var(--ib-red-soft); }
#page-release-explorer .rx-rn { grid-column: 1 / -1; font-weight: 600; font-size: 14.5px; color: var(--ib-charcoal); }
#page-release-explorer .rx-rs { grid-column: 1 / -1; font-size: 13px; color: var(--ib-text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#page-release-explorer .rx-rm { font-size: 12px; color: var(--ib-text-2); align-self: center; }
#page-release-explorer .rx-rc { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
#page-release-explorer .rx-chip { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; background: #f4f3f1; color: var(--ib-text); white-space: nowrap; }
#page-release-explorer .rx-chip.t-new_functionality { background: #dcfce7; color: #15803d; }
#page-release-explorer .rx-chip.t-deprecation_removal { background: var(--ib-red-bg); color: var(--ib-red); }
#page-release-explorer .rx-chip.c-opt { background: #fef3c7; color: #b45309; }
#page-release-explorer .rx-chip.c-ai { background: #f0e8fa; color: #7c1fa8; }
#page-release-explorer .rx-chip.c-match { background: #dcfce7; color: #15803d; }
#page-release-explorer .rx-chip.c-rel { background: #fef3c7; color: #b45309; }
#page-release-explorer .rx-chip.p-high { background: var(--ib-charcoal); color: #fff; }
#page-release-explorer .rx-more { display: block; margin: 16px auto 0; padding: 10px 22px; font: inherit; font-size: 14px; border: 1px solid var(--ib-charcoal); border-radius: 4px; background: transparent; cursor: pointer; }

#page-release-explorer .rx-back { font: inherit; font-size: 13.5px; border: 0; background: transparent; color: var(--ib-red); cursor: pointer; padding: 0; margin-bottom: 14px; }
#page-release-explorer .rx-hero { padding: 20px 22px; border: 1px solid var(--border); border-radius: 4px; background: var(--white); margin-bottom: 18px; }
#page-release-explorer .rx-title { font-size: 22px; line-height: 1.3; margin: 0 0 8px; color: var(--ib-charcoal); }
#page-release-explorer .rx-hero-s { font-size: 14px; line-height: 1.6; color: var(--ib-text-2); margin: 0 0 12px; max-width: 900px; }
#page-release-explorer .rx-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#page-release-explorer .rx-oracle { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--ib-red); text-decoration: none; }
#page-release-explorer .rx-dtabs { margin-bottom: 18px; }
#page-release-explorer .rx-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
#page-release-explorer .rx-facts.one { grid-template-columns: 1fr; max-width: 860px; }
@media (max-width: 900px) { #page-release-explorer .rx-facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { #page-release-explorer .rx-facts { grid-template-columns: 1fr; } }
#page-release-explorer .rx-fact { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 4px; background: var(--white); }
#page-release-explorer .rx-fact-l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ib-text-2); }
#page-release-explorer .rx-fact-v { font-size: 14px; line-height: 1.5; }
#page-release-explorer .rx-sec { max-width: 860px; margin-bottom: 22px; }
#page-release-explorer .rx-sec h4, #page-release-explorer .rx-tests h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ib-text-2); margin: 18px 0 8px; }
#page-release-explorer .rx-sec p, #page-release-explorer .rx-sec li, #page-release-explorer .rx-tests p { font-size: 14.5px; line-height: 1.6; }
#page-release-explorer .rx-sec h5 { font-size: 14px; margin: 14px 0 6px; color: var(--ib-charcoal); }
#page-release-explorer .rx-sec ol, #page-release-explorer .rx-sec ul { margin: 6px 0 12px; padding-left: 22px; }
#page-release-explorer .rx-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
#page-release-explorer .rx-shot { margin: 0; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--white); }
#page-release-explorer .rx-shot img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: top left; background: #f4f3f1; }
#page-release-explorer .rx-shot figcaption { font-size: 12.5px; color: var(--ib-text-2); padding: 8px 10px; line-height: 1.4; }
#page-release-explorer .rx-tests { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
@media (max-width: 800px) { #page-release-explorer .rx-tests { grid-template-columns: 1fr; } }
#page-release-explorer .rx-tc { padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 4px; margin-bottom: 8px; background: var(--white); }
#page-release-explorer .rx-tc-n { font-size: 14px; line-height: 1.4; margin-bottom: 6px; }
#page-release-explorer .rx-tc-id { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ib-text-2); }
#page-release-explorer .rx-tc-m { display: flex; flex-wrap: wrap; gap: 6px; }
#page-release-explorer .rx-gap { padding: 12px 14px; background: #fef3c7; border-radius: 4px; font-size: 14px; line-height: 1.5; }
#page-release-explorer .rx-meta { font-size: 12.5px !important; color: var(--ib-text-2); }
#page-release-explorer .rx-adv-h { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ib-text-2); margin: 22px 0 10px; }
#page-release-explorer .rx-actions { max-width: 860px; margin: 0; padding-left: 22px; font-size: 14.5px; line-height: 1.6; }


/* ── Configuration Studio + Setup: Fusion connections (2026-11-01) ───────────── */
.cs-project { min-width: 220px; padding: 6px 10px; border: 1px solid var(--ib-border); border-radius: 4px; }
.cs-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; border-bottom: 1px solid var(--ib-border); }
.cs-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 12px; cursor: pointer; color: var(--ib-text); font: inherit; }
.cs-tab.active { border-bottom-color: var(--ib-red); font-weight: 600; }
.cs-card { margin-bottom: 14px; }
.cs-card h3 { margin: 0 0 8px; } .cs-card h4 { margin: 16px 0 6px; }
.cs-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.cs-note { color: var(--ib-text-2, #6b6b78); font-size: 12.5px; }
.cs-empty { padding: 18px; color: var(--ib-text-2, #6b6b78); text-align: center; }
.cs-msg { min-height: 0; margin: 0 0 10px; font-size: 13px; }
.cs-msg.cs-ok, .cs-ok { color: #166534; } .cs-msg.cs-bad, .cs-bad { color: #b42318; }
.cs-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; }
.cs-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.cs-form input, .cs-form select, .cs-chatform textarea { padding: 7px 9px; border: 1px solid var(--ib-border); border-radius: 4px; font: inherit; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.cs-table th, .cs-table td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--ib-border); }
.cs-table blockquote { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--ib-border); background: var(--ib-red-bg); }
.cs-click { cursor: pointer; } .cs-click:hover { background: var(--ib-red-bg); }
.cs-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.cs-badge.cs-ok { background: #e7f6ec; color: #166534; } .cs-badge.cs-bad { background: #fde8e8; color: #b42318; }
.cs-badge.cs-warn { background: #fff4e0; color: #8a5300; } .cs-badge.cs-info { background: #e8f0fe; color: #1d4ed8; }
.cs-badge.cs-mute { background: #eef0f3; color: #5b6170; }
.cs-int { border: 1px solid var(--ib-border); border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.cs-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 6px; font-size: 13px; }
.cs-list { margin: 6px 0 0 18px; font-size: 13px; }
.cs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.cs-risk { border-left: 3px solid #d97706; background: #fff8eb; padding: 10px 12px; margin: 12px 0; font-size: 13px; }
.cs-mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; background: #f6f7f9; padding: 6px 8px; border-radius: 4px; }
.cs-timeline { margin: 6px 0 0 18px; font-size: 13px; } .cs-timeline li { margin-bottom: 6px; }
.cs-chat { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.cs-bubble { padding: 9px 12px; border-radius: 8px; max-width: 80%; font-size: 13.5px; line-height: 1.45; }
.cs-bubble.cs-user { align-self: flex-end; background: var(--ib-red-bg); }
.cs-bubble.cs-assistant { align-self: flex-start; background: #f3f4f6; }
.cs-chatform { display: flex; gap: 8px; } .cs-chatform textarea { flex: 1; resize: vertical; }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.cs-tile { border: 1px solid var(--ib-border); border-radius: 6px; padding: 10px; }
.cs-tile-v { font-size: 20px; font-weight: 700; }
@media (max-width: 640px) { .cs-bubble { max-width: 100%; } .cs-table { font-size: 12px; } }

/* ── Shared breadcrumb: QavaUI.renderBreadcrumb() (ui-kit.js) ──────────────
   Stage A of the navigation roadmap. One component, two variants:
   .qv-crumbs  "Automation Studio / Tests" text trail (Studio's .st-crumbs)
   .qv-steps   numbered step bar (the Release assurance journey)
   A new page adopts it with no CSS of its own. It replaced the bespoke
   .assurance-journey blocks (removed in Stage D); the values are those blocks'
   effective cascade, so the journey bar looks exactly as before. */
.qv-sr-only {
  border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px;
}
.qv-crumbs { align-items: center; color: var(--ib-text-2); display: flex; font-size: 13px; min-width: 0; white-space: nowrap; }
.qv-crumbs > ol, .qv-steps > ol { display: flex; list-style: none; margin: 0; min-width: 0; padding: 0; }
.qv-crumbs > ol { align-items: center; }
.qv-crumbs li { align-items: center; display: flex; min-width: 0; }
.qv-crumbs a { color: var(--ib-text-2); text-decoration: none; }
.qv-crumbs a:hover { color: var(--ib-charcoal); text-decoration: underline; }
.qv-crumbs a:focus-visible { border-radius: 2px; outline: 2px solid var(--ib-red); outline-offset: 2px; }
.qv-crumbs b { color: var(--ib-charcoal); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.qv-crumbs i { color: #b3aca2; font-style: normal; margin: 0 6px; }
.qv-crumbs .qv-crumb-disabled { color: #b3aca2; cursor: default; }

.qv-steps {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm); display: flex; margin: 0 0 24px; overflow: hidden;
}
.qv-steps > ol { flex: 1; }
.qv-steps li { border-right: 1px solid var(--border); display: flex; flex: 1; min-width: 0; }
.qv-steps li:last-child { border-right: 0; }
.qv-steps button {
  align-items: center; background: transparent; border: 0; color: var(--ib-text-2); cursor: pointer;
  display: flex; flex: 1; font: inherit; font-size: 13px; font-weight: 500; gap: 9px;
  justify-content: center; min-height: 48px; padding: 9px 16px;
  transition: background .15s ease, color .15s ease;
}
.qv-steps button:hover { background: var(--gray-bg); color: var(--ib-charcoal); }
.qv-steps button:focus-visible { outline: 2px solid var(--ib-red); outline-offset: -3px; }
.qv-steps button span {
  align-items: center; background: var(--gray-bg); border-radius: 50%; display: inline-flex;
  font-size: 10px; height: 22px; justify-content: center; width: 22px;
}
.qv-steps button.active { background: var(--ib-red-bg); color: var(--ib-charcoal); cursor: default; }
.qv-steps button.active span { background: var(--ib-red); color: #fff; }
.qv-steps button[disabled] { color: #b3aca2; cursor: default; }
.qv-steps button[disabled]:hover { background: transparent; }
.qv-steps button[disabled] span { background: var(--gray-bg); color: #b3aca2; }
@media (max-width: 1060px) {
  .qv-steps button { font-size: 10px; gap: 6px; padding: 8px 6px; }
  .qv-steps button span { display: none; }
}
@media (max-width: 680px) {
  .qv-steps { position: sticky; top: 0; z-index: 12; }
}
@media (prefers-reduced-motion: reduce) { .qv-steps button { transition: none; } }

/* ═══════════════ Accessibility remediation (Workstream C / VPAT, 2026-11-08) ═══════════════
   Tracker: docs/accessibility/vpat-remediation-tracker.md. Working baseline WCAG 2.2 A + AA.
   The InfoBeans brand red (--ib-red #ea1b3d) is 4.45:1 against white, just under the 4.5:1
   AA minimum for normal text. It stays the brand colour for borders, accents and large
   display type; anything that is TEXT, or carries white text, uses --ib-action (#c4162f,
   6.0:1 on white, 5.0:1 on --ib-red-bg), the AA-safe variant this file already defines. */

/* A11Y-001 — solid action surfaces with white text */
.btn-primary, .cp-new-btn { background: var(--ib-action); border-color: var(--ib-action); }
.mode-btn.active, .review-nav-badge, .review-count-badge, .dl-link:hover,
.qv-steps button.active span { background: var(--ib-action); }
.auth-overlay .auth-submit-btn { background: var(--auth-red-dark); border-color: var(--auth-red-dark); }
.auth-overlay .auth-submit-btn:hover:not(:disabled) { background: var(--ib-action-hover); border-color: var(--ib-action-hover); }

/* A11Y-002 — brand-red text on white and on the pale red tint */
.risk-high, .badge-testgen, .status-failed, .history-error, .cp-badge-fail, .dl-link,
.cp-stat-val, .platform-type-tab.active, #page-release-explorer .rx-tab.on { color: var(--ib-action); }
#page-release-explorer .rx-tab span { opacity: 1; }

/* A11Y-005 — keyboard focus indicator that no component rule can switch off (WCAG 2.4.7,
   1.4.11). Several components set `outline: none` with a faint or no replacement (the
   top-bar project select, sign-out, segmented toggles, Studio ghost buttons). Only the
   outline is forced; components keep their own offsets and halos. */
:is(a[href], button, select, input, textarea, summary, [role="button"], [role="link"], [role="tab"],
    [role="option"], [role="menuitem"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--ib-action) !important;
}
/* Dark surfaces (charcoal sidebar, Studio rail, dark buttons): a white ring reads there. */
:is(.sidebar, .st-rail, .ui-nav-toggle) :is(a, button, select, input, [role], [tabindex]):focus-visible,
body.nav-open .ui-nav-toggle:focus-visible {
  outline-color: #fff !important;
}

/* A11Y-006 — skip link (WCAG 2.4.1): first Tab stop, visible only when focused */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 10000;
  background: var(--ib-charcoal); color: #fff; padding: 10px 16px; border-radius: 2px;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; outline: 2px solid #fff !important; outline-offset: 2px; }
.main-content:focus { outline: none; }

/* A11Y-007 — reflow at 320 CSS px (WCAG 1.4.10): the test-generation source toggle wraps */
.tg-source-toggle { max-width: 100%; flex-wrap: wrap; }

/* Navigation Stage D: one breadcrumb for every portal page that sits under a
   sidebar page (analysis detail, execution evidence, review results ...).
   Rendered by portal.js::_renderPageCrumbs through QavaUI.renderBreadcrumb. */
.qv-page-crumbs { padding: 18px 32px 0; }
.qv-page-crumbs:empty { display: none; }
body.studio-fullwidth .qv-page-crumbs { display: none; }

/* Account menu (sidebar): change password, log out of all devices, sign out. */
.account-menu {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md, 0 8px 24px rgba(47,47,57,.16));
  min-width: 210px; padding: 6px; position: fixed; z-index: 1200;
}
.account-menu button {
  background: none; border: 0; border-radius: 6px; color: var(--ib-charcoal); cursor: pointer; display: block;
  font: inherit; font-size: 13px; padding: 8px 10px; text-align: left; width: 100%;
}
.account-menu button:hover, .account-menu button:focus-visible { background: var(--gray-bg); outline: none; }
.account-menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--ib-red); }

/* Analysis Detail: no title block, just Back above the summary box */
.iad-backrow { margin: 0 0 12px; }
.iad-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

#page-release-explorer .rx-tablewrap { overflow-x: auto; margin: 10px 0 16px; }
#page-release-explorer .rx-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
#page-release-explorer .rx-table th, #page-release-explorer .rx-table td { text-align: left; vertical-align: top; padding: 8px 12px; border: 1px solid var(--border); line-height: 1.45; }
#page-release-explorer .rx-table th { background: var(--ib-cream-2, #f6f0e6); font-weight: 600; color: var(--ib-charcoal); }

/* ── FDD Generation guided flow (demo2) ───────────────────────────────────── */
#fdd2-root { max-width: 1180px; }
.fdd2-start { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .fdd2-start { grid-template-columns: 1fr; } }
.fdd2-group { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.fdd2-group-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.fdd2-group-h h3 { margin: 0 0 2px; font-size: 15px; color: var(--ib-charcoal); }
.fdd2-group-h p { margin: 0; font-size: 12.5px; color: var(--ib-text-2); }
.fdd2-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ib-red); cursor: pointer; }
.fdd2-src { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; column-gap: 12px; row-gap: 2px; align-items: center; padding: 11px 10px; border-top: 1px solid var(--border); cursor: pointer; border-radius: 4px; }
.fdd2-src:hover { background: var(--ib-cream-2, #f6f0e6); }
.fdd2-src input { grid-row: 1 / span 2; width: 16px; height: 16px; accent-color: var(--ib-red); }
.fdd2-src-n { font-size: 13.5px; color: var(--ib-text); font-weight: 500; }
.fdd2-src-m { font-size: 12px; color: var(--ib-text-2); }
.fdd2-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px; }
.fdd2-start-side .fdd2-card { position: sticky; top: 16px; }
.fdd2-card h3 { margin: 4px 0 10px; font-size: 18px; color: var(--ib-charcoal); }
.fdd2-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ib-text-2); }
.fdd2-eyebrow.fdd2-ok { color: #15803d; }
.fdd2-sum { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13.5px; color: var(--ib-text); }
.fdd2-sum li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.fdd2-note { font-size: 12.5px; color: var(--ib-text-2); line-height: 1.55; margin: 0 0 14px; }
.fdd2-go { width: 100%; }
.fdd2-warn { margin-top: 10px; font-size: 12.5px; color: #b45309; }
.fdd2-run { max-width: 760px; }
.fdd2-run-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fdd2-pill { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--ib-cream-2, #f6f0e6); color: var(--ib-text-2); font-variant-numeric: tabular-nums; }
.fdd2-bar { height: 8px; background: var(--ib-cream-2, #efe8da); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.fdd2-bar > div { height: 100%; background: var(--ib-red); transition: width .25s linear; }
.fdd2-bar-r { display: flex; justify-content: space-between; margin: 8px 0 18px; font-size: 12.5px; color: var(--ib-text-2); font-variant-numeric: tabular-nums; }
.fdd2-steps { list-style: none; margin: 0 0 16px; padding: 0; }
.fdd2-steps li { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.fdd2-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; margin-top: 3px; }
.fdd2-steps li.active .fdd2-dot { border-color: var(--ib-red); border-top-color: transparent; animation: fdd2spin .8s linear infinite; }
.fdd2-steps li.done .fdd2-dot { background: #15803d; border-color: #15803d; }
.fdd2-steps li.pending .fdd2-st { color: var(--ib-text-2); }
.fdd2-st { font-size: 14px; font-weight: 600; color: var(--ib-text); }
.fdd2-sd { font-size: 12.5px; color: var(--ib-text-2); margin-top: 2px; min-height: 16px; }
@keyframes fdd2spin { to { transform: rotate(360deg); } }
.fdd2-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0; }
.fdd2-tile { border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; background: var(--white); }
.fdd2-tile-v { font-size: 26px; font-weight: 700; color: var(--ib-charcoal); font-variant-numeric: tabular-nums; line-height: 1.1; }
.fdd2-tile-l { font-size: 12.5px; color: var(--ib-text-2); margin-top: 4px; }
.fdd2-actions { display: flex; gap: 10px; margin-top: 8px; }
/* full-screen viewer */
#fdd2-viewer { position: fixed; inset: 0; z-index: 3000; background: var(--ib-cream, #fdf7ee); display: flex; flex-direction: column; }
.fdd2-top { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--white); border-bottom: 1px solid var(--border); }
.fdd2-back { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ib-charcoal); }
.fdd2-top-t { min-width: 0; flex: 1; }
.fdd2-top-n { font-size: 15px; font-weight: 700; color: var(--ib-charcoal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdd2-top-m { font-size: 12px; color: var(--ib-text-2); }
.fdd2-top-a { display: flex; gap: 8px; }
.fdd2-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.fdd2-toc { overflow-y: auto; padding: 20px 12px 40px 20px; border-right: 1px solid var(--border); background: var(--white); }
.fdd2-toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--ib-text-2); text-decoration: none; line-height: 1.35; }
.fdd2-toc a span { width: 20px; flex-shrink: 0; font-variant-numeric: tabular-nums; color: var(--ib-text-2); }
.fdd2-toc a:hover { background: var(--ib-cream-2, #f6f0e6); }
.fdd2-toc a.on { background: var(--ib-charcoal); color: #fff; font-weight: 600; }
.fdd2-toc a.on span { color: rgba(255,255,255,.7); }
.fdd2-doc { overflow-y: auto; padding: 32px 40px 80px; outline: none; }
.fdd2-doc > * { max-width: 1020px; margin-left: auto; margin-right: auto; }
.fdd2-cover { background: var(--ib-charcoal); color: #fff; border-radius: 8px; padding: 44px 48px; margin-bottom: 28px; }
.fdd2-cover-k { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.fdd2-cover h1 { margin: 10px 0 6px; font-size: 38px; line-height: 1.1; color: #fff; }
.fdd2-cover-s { font-size: 16px; color: rgba(255,255,255,.8); }
.fdd2-cover-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-top: 34px; font-size: 14px; }
.fdd2-cover-g span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 4px; }
.fdd2-sec { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 28px 32px; margin-bottom: 20px; }
.fdd2-sec h2 { display: flex; gap: 12px; align-items: baseline; margin: 0 0 16px; font-size: 21px; color: var(--ib-charcoal); }
.fdd2-sec h2 span { color: var(--ib-red); font-variant-numeric: tabular-nums; }
.fdd2-sec h4 { margin: 24px 0 8px; font-size: 14.5px; color: var(--ib-charcoal); }
.fdd2-sec p { font-size: 14px; line-height: 1.65; color: var(--ib-text); margin: 0 0 12px; max-width: 78ch; }
.fdd2-sec ul { margin: 0 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.65; color: var(--ib-text); }
.fdd2-tw { overflow-x: auto; margin: 10px 0 14px; border: 1px solid var(--border); border-radius: 6px; }
.fdd2-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fdd2-table th { text-align: left; padding: 9px 12px; background: var(--ib-cream-2, #f6f0e6); font-weight: 600; color: var(--ib-charcoal); border-bottom: 1px solid var(--border); white-space: nowrap; }
.fdd2-table td { padding: 9px 12px; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.45; }
.fdd2-table tr:last-child td { border-bottom: 0; }
.fdd2-chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.fdd2-chip.ok { background: #dcfce7; color: #166534; }
.fdd2-chip.warn { background: #fef3c7; color: #92400e; }
.fdd2-chip.neutral { background: var(--ib-cream-2, #f0ece4); color: var(--ib-text-2); }
.fdd2-foot { text-align: center; font-size: 12px; color: var(--ib-text-2); padding: 12px; }
@media (max-width: 900px) { .fdd2-body { grid-template-columns: 1fr; } .fdd2-toc { display: none; } .fdd2-doc { padding: 20px 14px 60px; } .fdd2-top { flex-wrap: wrap; } }
@media print {
  body:has(#fdd2-viewer) > *:not(#fdd2-viewer) { display: none !important; }
  #fdd2-viewer { position: static; display: block; background: #fff; }
  .fdd2-top, .fdd2-toc { display: none !important; }
  .fdd2-body { display: block; } .fdd2-doc { overflow: visible; padding: 0; }
  .fdd2-sec { break-inside: avoid-page; border: 0; padding: 12px 0; }
  .fdd2-cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.fdd2-x { grid-column: 3; grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent; color: var(--ib-text-2); font-size: 18px; line-height: 1; cursor: pointer; }
.fdd2-x:hover { background: #fee2e2; color: #b91c1c; }
.fdd2-group-a { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.fdd2-add { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ib-charcoal); cursor: pointer; }
.fdd2-add:hover { border-color: var(--ib-red); color: var(--ib-red); }
.fdd2-empty { border: 1.5px dashed var(--border); border-radius: 6px; padding: 18px; text-align: center; font-size: 13px; color: var(--ib-text-2); cursor: pointer; margin-top: 6px; }
.fdd2-empty:hover { border-color: var(--ib-red); }
.fdd2-new { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #dcfce7; color: #166534; margin-left: 6px; text-transform: uppercase; letter-spacing: .04em; }
.fdd2-top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 13px; color: var(--ib-text-2); }
