/* =========================================================
   iQWEB V2 Shared App Shell
   Purpose: make Dashboard + OSD feel like one product while
   preserving existing renderer IDs, dashboard JS and API hooks.
   ========================================================= */

:root{
  --iqv2-sidebar:#071326;
  --iqv2-sidebar-2:#040a16;
  --iqv2-bg:#f4f7fb;
  --iqv2-panel:#ffffff;
  --iqv2-border:#e2e8f0;
  --iqv2-border-2:#dbe3ee;
  --iqv2-text:#0f172a;
  --iqv2-soft:#475569;
  --iqv2-muted:#64748b;
  --iqv2-blue:#2563eb;
  --iqv2-cyan:#0891b2;
  --iqv2-teal:#0f766e;
  --iqv2-green:#16a34a;
  --iqv2-amber:#d97706;
  --iqv2-red:#dc2626;
  --iqv2-purple:#7c3aed;
  --iqv2-radius:18px;
  --iqv2-shadow:0 1px 2px rgba(15,23,42,.04), 0 12px 32px rgba(15,23,42,.06);
}

/* ---------------- Dashboard shell ---------------- */
body.iqweb-v2-dashboard{
  background:var(--iqv2-bg) !important;
  color:var(--iqv2-text) !important;
}

body.iqweb-v2-dashboard .app{
  background:var(--iqv2-bg);
}

body.iqweb-v2-dashboard .sidebar{
  width:232px;
  flex-basis:232px;
  padding:24px 16px 18px;
  background:
    radial-gradient(circle at 42% 0%, rgba(37,99,235,.30), transparent 34%),
    linear-gradient(180deg, var(--iqv2-sidebar), var(--iqv2-sidebar-2));
  border-right:1px solid rgba(148,163,184,.16);
}

body.iqweb-v2-dashboard .brand{
  padding:0 8px 18px;
}

body.iqweb-v2-dashboard .brand .name{
  color:#fff;
  font-size:28px;
  font-weight:800;
  letter-spacing:-.04em;
}

body.iqweb-v2-dashboard .brand-email{
  margin-top:12px;
  color:rgba(226,232,240,.64);
  border-color:rgba(148,163,184,.18);
  background:rgba(15,23,42,.42);
}

body.iqweb-v2-dashboard .nav{
  padding:0;
  gap:8px;
}

body.iqweb-v2-dashboard .nav a,
body.iqweb-v2-dashboard .nav button{
  min-height:44px;
  padding:0 12px;
  border-radius:10px;
  color:rgba(226,232,240,.78);
  font-size:14px;
  font-weight:600;
}

body.iqweb-v2-dashboard .nav a:hover,
body.iqweb-v2-dashboard .nav button:hover,
body.iqweb-v2-dashboard .nav a.active,
body.iqweb-v2-dashboard .nav button.active{
  color:#fff;
  background:rgba(37,99,235,.22);
  border-color:rgba(96,165,250,.18);
}

body.iqweb-v2-dashboard .baseline-help{
  margin-top:auto;
  border:1px solid rgba(96,165,250,.22) !important;
  background:rgba(15,23,42,.42) !important;
  color:rgba(226,232,240,.82) !important;
  border-radius:12px !important;
  padding:12px !important;
  font-size:12px !important;
  line-height:1.45 !important;
}

body.iqweb-v2-dashboard .baseline-help strong{ color:#fff; }
body.iqweb-v2-dashboard .baseline-help ul{ margin:8px 0 0; padding-left:16px; }
body.iqweb-v2-dashboard .baseline-help li{ margin:5px 0; color:rgba(226,232,240,.68); }

body.iqweb-v2-dashboard .main{
  background:var(--iqv2-bg);
}

body.iqweb-v2-dashboard .topbar{
  height:76px;
  padding:18px 28px;
  background:var(--iqv2-bg);
  border-bottom:0;
}

body.iqweb-v2-dashboard .topbar .title{
  color:var(--iqv2-text);
  font-size:22px;
  font-weight:800;
  letter-spacing:-.035em;
}

body.iqweb-v2-dashboard .topbar .sub,
body.iqweb-v2-dashboard .topbar .right{
  color:var(--iqv2-muted);
}

body.iqweb-v2-dashboard .chip{
  background:#fff !important;
  border:1px solid var(--iqv2-border) !important;
  color:var(--iqv2-soft) !important;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

body.iqweb-v2-dashboard .wrap{
  max-width:1680px;
  padding:0 28px 32px !important;
}

body.iqweb-v2-dashboard .row{
  gap:18px;
}

body.iqweb-v2-dashboard .card,
body.iqweb-v2-dashboard .plan-banner{
  background:#fff !important;
  color:var(--iqv2-text) !important;
  border:1px solid var(--iqv2-border) !important;
  border-radius:var(--iqv2-radius) !important;
  box-shadow:var(--iqv2-shadow) !important;
}

body.iqweb-v2-dashboard .card.primary{
  min-height:184px;
}

body.iqweb-v2-dashboard .h h2{
  color:var(--iqv2-text) !important;
  font-size:13px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}

body.iqweb-v2-dashboard .meta,
body.iqweb-v2-dashboard .scanhelp,
body.iqweb-v2-dashboard .latest-date,
body.iqweb-v2-dashboard .actions-helper{
  color:var(--iqv2-muted) !important;
}

body.iqweb-v2-dashboard .latest-url,
body.iqweb-v2-dashboard table,
body.iqweb-v2-dashboard td,
body.iqweb-v2-dashboard th{
  color:var(--iqv2-text) !important;
}

body.iqweb-v2-dashboard .scanbar input,
body.iqweb-v2-dashboard #history-search,
body.iqweb-v2-dashboard .brand-field input{
  background:#f8fafc !important;
  color:var(--iqv2-text) !important;
  border:1px solid var(--iqv2-border) !important;
}

body.iqweb-v2-dashboard .btn,
body.iqweb-v2-dashboard .plan-btn,
body.iqweb-v2-dashboard .wd-history-link{
  border-radius:11px !important;
}

body.iqweb-v2-dashboard .btn-primary,
body.iqweb-v2-dashboard .plan-btn{
  background:var(--iqv2-blue) !important;
  border-color:var(--iqv2-blue) !important;
  color:#fff !important;
}

body.iqweb-v2-dashboard .btn-link,
body.iqweb-v2-dashboard .wd-history-link{
  color:var(--iqv2-blue) !important;
}

body.iqweb-v2-dashboard .table-wrap{
  border:1px solid var(--iqv2-border) !important;
  border-radius:14px !important;
  background:#fff !important;
}

body.iqweb-v2-dashboard th{
  background:#f8fafc !important;
  color:var(--iqv2-muted) !important;
  border-bottom:1px solid var(--iqv2-border) !important;
}

body.iqweb-v2-dashboard td{
  border-top:1px solid #eef2f7 !important;
}

body.iqweb-v2-dashboard tr:hover td{
  background:#f8fafc !important;
}

body.iqweb-v2-dashboard .view#view-dashboard.active{
  display:grid;
  gap:18px;
}

body.iqweb-v2-dashboard #subscription-banner{
  margin-bottom:0 !important;
}

body.iqweb-v2-dashboard .card.secondary{
  margin-top:0 !important;
}

/* ---------------- Report / OSD shell ---------------- */
body.iqweb-v2-shell{
  padding:0 !important;
  background:var(--iqv2-sidebar-2) !important;
  color:var(--iqv2-text) !important;
  overflow-x:hidden;
}

body.iqweb-v2-shell .iqweb-app-sidebar{
  width:232px;
  padding:24px 16px 18px;
  background:
    radial-gradient(circle at 42% 0%, rgba(37,99,235,.30), transparent 34%),
    linear-gradient(180deg, var(--iqv2-sidebar), var(--iqv2-sidebar-2));
}

body.iqweb-v2-shell .page-shell{
  margin-left:232px !important;
  min-height:100vh;
  padding:18px 18px 28px !important;
  background:var(--iqv2-bg) !important;
  align-items:stretch !important;
}

body.iqweb-v2-shell .shell-inner{
  max-width:1720px !important;
  width:100%;
}

body.iqweb-v2-shell #backToDashboard{ display:none !important; }

body.iqweb-v2-shell .top-card,
body.iqweb-v2-shell .executive-dashboard,
body.iqweb-v2-shell .section,
body.iqweb-v2-shell .card,
body.iqweb-v2-shell .exec-panel,
body.iqweb-v2-shell .evidence-block,
body.iqweb-v2-shell .phase,
body.iqweb-v2-shell .kv,
body.iqweb-v2-shell .ai-discovery-scorebox,
body.iqweb-v2-shell .ai-discovery-panel{
  background:#fff !important;
  color:var(--iqv2-text) !important;
  border-color:var(--iqv2-border) !important;
  box-shadow:var(--iqv2-shadow) !important;
}

body.iqweb-v2-shell .top-card{
  border-radius:16px 16px 0 0 !important;
  padding:18px 22px !important;
  border:1px solid var(--iqv2-border) !important;
  border-bottom-color:var(--iqv2-border-2) !important;
}

body.iqweb-v2-shell .top-card::before,
body.iqweb-v2-shell .section::before,
body.iqweb-v2-shell .executive-dashboard::before,
body.iqweb-v2-shell .section-title::after{ display:none !important; }

body.iqweb-v2-shell .brand-copy .logo,
body.iqweb-v2-shell #agencyReportLabel,
body.iqweb-v2-shell #agencyContactBlock,
body.iqweb-v2-shell .meta-cell .k,
body.iqweb-v2-shell .meta-cell .v{
  color:var(--iqv2-text) !important;
}

body.iqweb-v2-shell .meta-strip{
  grid-template-columns:1.2fr .8fr .8fr !important;
  margin-top:14px !important;
}

body.iqweb-v2-shell .meta-cell{
  background:#f8fafc !important;
  border-color:var(--iqv2-border) !important;
}

body.iqweb-v2-shell .meta-cell .k{
  color:var(--iqv2-muted) !important;
}

body.iqweb-v2-shell .btn{
  color:var(--iqv2-text) !important;
  background:#fff !important;
  border-color:#cbd5e1 !important;
  box-shadow:0 1px 2px rgba(15,23,42,.06) !important;
}

body.iqweb-v2-shell .loader-wrap{
  max-width:none !important;
  border-radius:0 0 16px 16px !important;
  background:#fff !important;
  border-color:var(--iqv2-border) !important;
  color:var(--iqv2-text) !important;
}

body.iqweb-v2-shell main#reportRoot:not([style*="display:none"]):not([style*="display: none"]){
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 420px;
  grid-template-areas:
    "hero hero"
    "baseline issues"
    "signals signals"
    "evidence evidence";
  gap:16px;
  color:var(--iqv2-text) !important;
}

body.iqweb-v2-shell .executive-dashboard{
  grid-area:hero;
  border-radius:0 0 16px 16px !important;
  border:1px solid var(--iqv2-border) !important;
  border-top:0 !important;
  overflow:hidden;
}

body.iqweb-v2-shell .section-head{
  background:#fff !important;
  border-bottom:1px solid var(--iqv2-border) !important;
}

body.iqweb-v2-shell .section-title,
body.iqweb-v2-shell .exec-panel-title,
body.iqweb-v2-shell .card h3{
  color:var(--iqv2-text) !important;
  text-shadow:none !important;
}

body.iqweb-v2-shell .summary,
body.iqweb-v2-shell .muted,
body.iqweb-v2-shell .issue-why,
body.iqweb-v2-shell .phase-body li,
body.iqweb-v2-shell .insight .text,
body.iqweb-v2-shell .kv .k,
body.iqweb-v2-shell .kv .v,
body.iqweb-v2-shell .finding-value,
body.iqweb-v2-shell .finding-label,
body.iqweb-v2-shell .exec-priority,
body.iqweb-v2-shell .exec-priority p,
body.iqweb-v2-shell .exec-diagnosis,
body.iqweb-v2-shell .exec-mini-text,
body.iqweb-v2-shell .ai-discovery-panel p,
body.iqweb-v2-shell .ai-discovery-panel li,
body.iqweb-v2-shell .ai-discovery-footnote,
body.iqweb-v2-shell .ai-more-copy,
body.iqweb-v2-shell .evidence-summary-subtitle{
  color:var(--iqv2-soft) !important;
}

body.iqweb-v2-shell .exec-score-grid.exec-score-circles{
  grid-template-columns:1.35fr repeat(4,minmax(150px,1fr)) !important;
  gap:14px !important;
  padding:14px !important;
  background:#f8fafc !important;
  border-bottom:1px solid var(--iqv2-border) !important;
}

body.iqweb-v2-shell .exec-score-card,
body.iqweb-v2-shell .exec-overall-score,
body.iqweb-v2-shell .exec-signal{
  min-height:154px !important;
  border-radius:16px !important;
  border:1px solid var(--iqv2-border) !important;
  background:#fff !important;
  box-shadow:0 1px 3px rgba(15,23,42,.05) !important;
}

body.iqweb-v2-shell .exec-overall-score{
  min-height:172px !important;
  border-color:#bfdbfe !important;
}

body.iqweb-v2-shell .exec-ring-lg{ width:118px !important; height:118px !important; }
body.iqweb-v2-shell .exec-ring-lg strong{ font-size:38px !important; }
body.iqweb-v2-shell .exec-ring-sm{ width:78px !important; height:78px !important; }
body.iqweb-v2-shell .exec-ring-sm strong{ font-size:25px !important; }
body.iqweb-v2-shell .exec-score-ring::after{ background:#fff !important; border-color:#e2e8f0 !important; }
body.iqweb-v2-shell .exec-score-ring strong{ color:var(--iqv2-text) !important; }
body.iqweb-v2-shell .exec-score-copy .k{ color:var(--iqv2-text) !important; }
body.iqweb-v2-shell .exec-score-copy .note{ color:var(--iqv2-muted) !important; }

body.iqweb-v2-shell .exec-dashboard-body{
  grid-template-columns:minmax(0,1fr) 420px !important;
  gap:14px !important;
  padding:14px !important;
  background:#f8fafc !important;
}

body.iqweb-v2-shell .exec-priority,
body.iqweb-v2-shell .exec-mini-issue{
  background:#fff !important;
  border-color:var(--iqv2-border) !important;
}

body.iqweb-v2-shell #progressSection{
  grid-area:baseline;
  display:block !important;
  margin-top:0 !important;
  border-radius:16px !important;
}

body.iqweb-v2-shell #progressSection .section-head{
  padding:14px 16px !important;
}

body.iqweb-v2-shell #progressSection .section-title::before{
  content:"";
  display:inline-block;
  width:8px;
  height:8px;
  margin-right:8px;
  border-radius:99px;
  background:var(--iqv2-blue);
  vertical-align:1px;
}

body.iqweb-v2-shell #progressGrid{
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:12px !important;
}

body.iqweb-v2-shell #progressGrid .card{
  min-height:130px;
  box-shadow:none !important;
}

body.iqweb-v2-shell #deliverySignalsSection{
  grid-area:signals;
  margin-top:0 !important;
  border-radius:16px !important;
}

body.iqweb-v2-shell #signalsGrid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:12px !important;
}

body.iqweb-v2-shell #signalsGrid .card{
  min-height:150px;
  padding:14px !important;
  box-shadow:none !important;
}

body.iqweb-v2-shell #fixSequenceSection{
  display:none !important;
}

body.iqweb-v2-shell #signalEvidenceSection{
  grid-area:evidence;
  margin-top:0 !important;
  border-radius:16px !important;
}

body.iqweb-v2-shell .footer{
  max-width:none !important;
  color:var(--iqv2-muted) !important;
}

body.iqweb-v2-shell #powered-by{ color:var(--iqv2-muted) !important; }

.iqweb-v2-baseline-empty{
  min-height:130px;
  display:grid;
  place-items:center;
  text-align:center;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  color:var(--iqv2-soft);
  padding:18px;
}

.iqweb-v2-baseline-empty strong{
  display:block;
  margin-bottom:6px;
  color:var(--iqv2-text);
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.iqweb-v2-baseline-empty span{
  display:block;
  max-width:520px;
  margin:0 auto;
  font-size:13px;
  line-height:1.55;
}

@media (max-width:1380px){
  body.iqweb-v2-shell main#reportRoot:not([style*="display:none"]):not([style*="display: none"]){
    grid-template-columns:1fr;
    grid-template-areas:"hero" "baseline" "signals" "evidence";
  }
  body.iqweb-v2-shell .exec-dashboard-body{ grid-template-columns:1fr !important; }
  body.iqweb-v2-shell #signalsGrid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}

@media (max-width:1050px){
  body.iqweb-v2-shell .iqweb-app-sidebar,
  body.iqweb-v2-dashboard .sidebar{ width:206px; flex-basis:206px; }
  body.iqweb-v2-shell .page-shell{ margin-left:206px !important; }
  body.iqweb-v2-shell .exec-score-grid.exec-score-circles{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  body.iqweb-v2-shell .exec-overall-score{ grid-column:1/-1; }
  body.iqweb-v2-shell #progressGrid{ grid-template-columns:1fr !important; }
}

@media (max-width:760px){
  body.iqweb-v2-shell .iqweb-app-sidebar{ position:static !important; width:auto !important; min-height:auto !important; }
  body.iqweb-v2-shell .page-shell{ margin-left:0 !important; padding:12px !important; }
  body.iqweb-v2-dashboard .app{ display:block; }
  body.iqweb-v2-dashboard .sidebar{ width:auto; min-height:auto; }
  body.iqweb-v2-dashboard .main{ min-height:100vh; }
  body.iqweb-v2-shell .meta-strip{ grid-template-columns:1fr !important; }
  body.iqweb-v2-shell #signalsGrid{ grid-template-columns:1fr !important; }
}

@media print{
  body.iqweb-v2-shell .iqweb-app-sidebar{ display:none !important; }
  body.iqweb-v2-shell .page-shell{ margin-left:0 !important; padding:0 !important; background:#fff !important; }
}

/* =========================================================
   iQWEB V2 Pass 2: structure, density, tabs, dark mode, PDF
   ========================================================= */
:root{
  --iqv2-brand-accent: var(--report-header-bg, #2563eb);
  --iqv2-brand-text: var(--report-header-text, #ffffff);
}

body.iqweb-v2-shell .shell-inner{
  gap:0 !important;
}

body.iqweb-v2-shell .top-card{
  border-radius:16px 16px 0 0 !important;
  padding:16px 20px 14px !important;
}

body.iqweb-v2-shell .top-row{
  align-items:center !important;
  min-height:32px;
}

body.iqweb-v2-shell .brand-copy .logo{
  font-size:18px !important;
  letter-spacing:-0.035em !important;
}

body.iqweb-v2-shell .top-actions{
  position:absolute;
  right:20px;
  top:16px;
}

body.iqweb-v2-shell .meta-strip{
  margin-top:12px !important;
  gap:10px !important;
}

body.iqweb-v2-shell .meta-cell{
  padding:10px 12px !important;
  border-radius:11px !important;
}

body.iqweb-v2-shell .meta-cell .k{
  font-size:10px !important;
  letter-spacing:.11em !important;
}

body.iqweb-v2-shell .meta-cell .v{
  font-size:13px !important;
}

/* Chrome-style report tabs */
body.iqweb-v2-shell .iq-report-tabs{
  height:42px !important;
  margin:0 !important;
  padding:0 16px !important;
  border:1px solid var(--iqv2-border) !important;
  border-top:0 !important;
  border-radius:0 !important;
  background:linear-gradient(180deg,#f8fafc 0%,#edf3f9 100%) !important;
  box-shadow:none !important;
}
body.iqweb-v2-shell .iq-report-tab{
  height:34px !important;
  min-width:108px !important;
  padding:0 18px !important;
  margin-top:8px !important;
  margin-bottom:-1px !important;
  border-radius:11px 11px 0 0 !important;
  font-size:10px !important;
}
body.iqweb-v2-shell .iq-report-tab.is-active{
  border-color:var(--iqv2-border-2) !important;
  background:#fff !important;
  color:var(--iqv2-text) !important;
}

/* Overview density */
body.iqweb-v2-shell.report-tab-overview main#reportRoot:not([style*="display:none"]):not([style*="display: none"]){
  display:grid !important;
  grid-template-columns: minmax(0,1fr) 350px;
  grid-template-areas:
    "hero hero"
    "baseline baseline";
  gap:12px !important;
  padding-top:14px !important;
}

body.iqweb-v2-shell.report-tab-overview .executive-dashboard{
  grid-area:hero !important;
  border-radius:0 0 16px 16px !important;
}

body.iqweb-v2-shell.report-tab-overview .exec-score-grid.exec-score-circles{
  padding:12px !important;
  gap:12px !important;
}

body.iqweb-v2-shell.report-tab-overview .exec-score-card,
body.iqweb-v2-shell.report-tab-overview .exec-overall-score,
body.iqweb-v2-shell.report-tab-overview .exec-signal{
  min-height:138px !important;
  padding:16px 12px 14px !important;
}

body.iqweb-v2-shell.report-tab-overview .exec-overall-score{
  min-height:150px !important;
}

body.iqweb-v2-shell.report-tab-overview .exec-ring-lg{ width:104px !important; height:104px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-ring-lg strong{ font-size:34px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-ring-sm{ width:70px !important; height:70px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-ring-sm strong{ font-size:23px !important; }

body.iqweb-v2-shell.report-tab-overview .exec-dashboard-body{
  padding:12px !important;
  gap:12px !important;
  grid-template-columns:minmax(0,1fr) 360px !important;
}

body.iqweb-v2-shell.report-tab-overview .exec-panel{
  padding:14px !important;
  border-radius:15px !important;
}

body.iqweb-v2-shell.report-tab-overview .exec-priority-list{ gap:8px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-priority{ padding:10px 12px !important; border-radius:13px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-priority-rank{ width:24px !important; height:24px !important; border-radius:8px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-priority-title{ font-size:12px !important; line-height:1.45 !important; margin:2px 0 0 !important; }
body.iqweb-v2-shell.report-tab-overview .exec-diagnosis{ margin-top:10px !important; padding:10px 12px !important; font-size:12px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-mini-issue{ padding:9px 10px !important; }
body.iqweb-v2-shell.report-tab-overview .exec-mini-text{ font-size:12px !important; line-height:1.35 !important; }

/* Reserved baseline area stays compact and always present */
body.iqweb-v2-shell #progressSection{
  grid-area:baseline !important;
  border-radius:15px !important;
  overflow:hidden;
}
body.iqweb-v2-shell #progressSection .section-head{
  padding:10px 14px !important;
}
body.iqweb-v2-shell #progressSection .section-body{
  padding:12px 14px !important;
}
body.iqweb-v2-shell .iqweb-v2-baseline-empty{
  min-height:78px !important;
  padding:12px !important;
}
body.iqweb-v2-shell .iqweb-v2-baseline-empty strong{ margin-bottom:4px !important; }
body.iqweb-v2-shell .iqweb-v2-baseline-empty span{ font-size:12px !important; line-height:1.4 !important; }

/* Signals tab: diagnostics only. Fix sequence is intentionally hidden for now. */
body.iqweb-v2-shell.report-tab-signals main#reportRoot:not([style*="display:none"]):not([style*="display: none"]){
  display:block !important;
  padding-top:14px !important;
}
body.iqweb-v2-shell.report-tab-signals #fixSequenceSection{ display:none !important; }
body.iqweb-v2-shell.report-tab-signals #deliverySignalsSection{ display:block !important; }
body.iqweb-v2-shell.report-tab-signals #deliverySignalsSection .section-body{ padding:14px !important; }
body.iqweb-v2-shell.report-tab-signals #signalsGrid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:12px !important;
}
body.iqweb-v2-shell.report-tab-signals #signalsGrid .card{
  min-height:136px !important;
  padding:12px !important;
}
body.iqweb-v2-shell.report-tab-signals .ai-discovery-card{
  margin-top:12px !important;
}
body.iqweb-v2-shell.report-tab-signals .ai-discovery-layout{
  grid-template-columns:150px minmax(0,1fr) minmax(0,1fr) !important;
  gap:12px !important;
}

/* Evidence tab: full proof layer, not collapsed or washed out */
body.iqweb-v2-shell.report-tab-evidence main#reportRoot:not([style*="display:none"]):not([style*="display: none"]){
  display:block !important;
  padding-top:14px !important;
}
body.iqweb-v2-shell.report-tab-evidence #signalEvidenceSection{
  display:block !important;
  opacity:1 !important;
}
body.iqweb-v2-shell.report-tab-evidence #signalEvidenceSection > summary{
  display:none !important;
}
body.iqweb-v2-shell.report-tab-evidence #signalEvidenceRoot{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:12px !important;
  opacity:1 !important;
}
body.iqweb-v2-shell.report-tab-evidence .evidence-block,
body.iqweb-v2-shell.report-tab-evidence .acc-body,
body.iqweb-v2-shell.report-tab-evidence .kv{
  opacity:1 !important;
  background:#fff !important;
}
body.iqweb-v2-shell.report-tab-evidence .evidence-title,
body.iqweb-v2-shell.report-tab-evidence .acc-title,
body.iqweb-v2-shell.report-tab-evidence .kv .k,
body.iqweb-v2-shell.report-tab-evidence .kv .v{
  opacity:1 !important;
}

/* Small mode/theme toggle injected by JS */
.iqweb-theme-toggle{
  width:100%;
  margin:12px 0 0;
  min-height:38px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.20);
  color:rgba(226,232,240,.86);
  background:rgba(15,23,42,.36);
  font:700 12px/1 "Montserrat",system-ui,sans-serif;
  cursor:pointer;
}
.iqweb-theme-toggle:hover{ border-color:rgba(96,165,250,.38); background:rgba(37,99,235,.18); }

/* Dark mode for V2 dashboard and report */
html.iqweb-theme-dark{
  --iqv2-bg:#050914;
  --iqv2-panel:#0b1220;
  --iqv2-border:#1e293b;
  --iqv2-border-2:#243244;
  --iqv2-text:#e5f0ff;
  --iqv2-soft:#b8c7dc;
  --iqv2-muted:#8190a6;
  --iqv2-shadow:none;
}
html.iqweb-theme-dark body.iqweb-v2-dashboard .main,
html.iqweb-theme-dark body.iqweb-v2-dashboard .topbar,
html.iqweb-theme-dark body.iqweb-v2-dashboard .app,
html.iqweb-theme-dark body.iqweb-v2-shell .page-shell{
  background:var(--iqv2-bg) !important;
}
html.iqweb-theme-dark body.iqweb-v2-dashboard .card,
html.iqweb-theme-dark body.iqweb-v2-dashboard .plan-banner,
html.iqweb-theme-dark body.iqweb-v2-dashboard .table-wrap,
html.iqweb-theme-dark body.iqweb-v2-dashboard .chip,
html.iqweb-theme-dark body.iqweb-v2-shell .top-card,
html.iqweb-theme-dark body.iqweb-v2-shell .executive-dashboard,
html.iqweb-theme-dark body.iqweb-v2-shell .section,
html.iqweb-theme-dark body.iqweb-v2-shell .card,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-panel,
html.iqweb-theme-dark body.iqweb-v2-shell .evidence-block,
html.iqweb-theme-dark body.iqweb-v2-shell .phase,
html.iqweb-theme-dark body.iqweb-v2-shell .kv,
html.iqweb-theme-dark body.iqweb-v2-shell .ai-discovery-scorebox,
html.iqweb-theme-dark body.iqweb-v2-shell .ai-discovery-panel,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-priority,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-mini-issue{
  background:var(--iqv2-panel) !important;
  color:var(--iqv2-text) !important;
  border-color:var(--iqv2-border) !important;
}
html.iqweb-theme-dark body.iqweb-v2-shell .meta-cell,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-score-grid.exec-score-circles,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-dashboard-body,
html.iqweb-theme-dark body.iqweb-v2-shell .iq-report-tabs,
html.iqweb-theme-dark body.iqweb-v2-shell .iqweb-v2-baseline-empty,
html.iqweb-theme-dark body.iqweb-v2-dashboard th,
html.iqweb-theme-dark body.iqweb-v2-dashboard tr:hover td,
html.iqweb-theme-dark body.iqweb-v2-dashboard .scanbar input,
html.iqweb-theme-dark body.iqweb-v2-dashboard #history-search,
html.iqweb-theme-dark body.iqweb-v2-dashboard .brand-field input{
  background:#08101e !important;
  color:var(--iqv2-text) !important;
  border-color:var(--iqv2-border) !important;
}
html.iqweb-theme-dark body.iqweb-v2-shell .exec-score-card,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-overall-score,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-signal,
html.iqweb-theme-dark body.iqweb-v2-shell .exec-score-ring::after,
html.iqweb-theme-dark body.iqweb-v2-shell .iq-report-tab.is-active,
html.iqweb-theme-dark body.iqweb-v2-shell.report-tab-evidence .evidence-block,
html.iqweb-theme-dark body.iqweb-v2-shell.report-tab-evidence .acc-body,
html.iqweb-theme-dark body.iqweb-v2-shell.report-tab-evidence .kv{
  background:#0b1220 !important;
  border-color:var(--iqv2-border) !important;
}
html.iqweb-theme-dark body.iqweb-v2-shell .exec-score-ring strong,
html.iqweb-theme-dark body.iqweb-v2-shell .brand-copy .logo,
html.iqweb-theme-dark body.iqweb-v2-shell #agencyReportLabel,
html.iqweb-theme-dark body.iqweb-v2-shell .meta-cell .v,
html.iqweb-theme-dark body.iqweb-v2-dashboard .topbar .title,
html.iqweb-theme-dark body.iqweb-v2-dashboard .latest-url,
html.iqweb-theme-dark body.iqweb-v2-dashboard table,
html.iqweb-theme-dark body.iqweb-v2-dashboard td,
html.iqweb-theme-dark body.iqweb-v2-dashboard th{
  color:var(--iqv2-text) !important;
}
html.iqweb-theme-dark body.iqweb-v2-shell .iq-report-tab{ color:#94a3b8 !important; }
html.iqweb-theme-dark body.iqweb-v2-shell .iq-report-tab.is-active{ color:#e5f0ff !important; }

/* PDF/export: clean printable report, no application shell */
@media print{
  html.iqweb-theme-dark,
  body.iqweb-v2-shell{
    background:#ffffff !important;
  }
  body.iqweb-v2-shell .iqweb-app-sidebar,
  body.iqweb-v2-shell .iq-report-tabs,
  body.iqweb-v2-shell #backToDashboard,
  body.iqweb-v2-shell .iqweb-theme-toggle,
  body.iqweb-v2-shell .top-actions{
    display:none !important;
  }
  body.iqweb-v2-shell .page-shell{
    margin-left:0 !important;
    padding:0 !important;
    background:#ffffff !important;
  }
  body.iqweb-v2-shell .shell-inner{
    max-width:none !important;
  }
  body.iqweb-v2-shell .top-card,
  body.iqweb-v2-shell .executive-dashboard,
  body.iqweb-v2-shell .section,
  body.iqweb-v2-shell .card,
  body.iqweb-v2-shell .exec-panel,
  body.iqweb-v2-shell .evidence-block,
  body.iqweb-v2-shell .phase,
  body.iqweb-v2-shell .kv{
    background:#ffffff !important;
    color:#0f172a !important;
    border-color:#e2e8f0 !important;
    box-shadow:none !important;
  }
  body.iqweb-v2-shell main#reportRoot{
    display:block !important;
  }
  body.iqweb-v2-shell #executiveNarrativeSection,
  body.iqweb-v2-shell #progressSection,
  body.iqweb-v2-shell #deliverySignalsSection,
  body.iqweb-v2-shell #fixSequenceSection,
  body.iqweb-v2-shell #signalEvidenceSection{
    display:block !important;
    break-inside:avoid;
    margin-bottom:12px !important;
  }
  body.iqweb-v2-shell #signalEvidenceSection > summary{ display:none !important; }
  body.iqweb-v2-shell #signalEvidenceRoot{ display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
}

@media (max-width:1380px){
  body.iqweb-v2-shell.report-tab-overview main#reportRoot:not([style*="display:none"]):not([style*="display: none"]){
    grid-template-columns:1fr !important;
    grid-template-areas:"hero" "baseline" !important;
  }
  body.iqweb-v2-shell.report-tab-overview .exec-dashboard-body{ grid-template-columns:1fr !important; }
  body.iqweb-v2-shell.report-tab-signals #signalsGrid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}

@media (max-width:900px){
  body.iqweb-v2-shell.report-tab-evidence #signalEvidenceRoot{ grid-template-columns:1fr !important; }
}
