/* SitePulse Pro WP v1.5.0 — report layout & contrast QA layer
   Loaded after app.css, themes.css and wp-bridge.css.
   Goals: every major report block uses the report canvas, internal grids stay proportional,
   and nested surfaces never inherit unreadable foreground/background combinations. */

body.report-page main.report-shell > .report-block{
  grid-column:1 / -1 !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  align-self:stretch;
}
body.report-page main.report-shell > .engine-diagnostics,
body.report-page main.report-shell > .report-hero,
body.report-page main.report-shell > .report-overview,
body.report-page main.report-shell > .executive-grid,
body.report-page main.report-shell > .report-footnote{
  min-width:0;
}
body.report-page .report-block,
body.report-page .report-block > *,
body.report-page .report-block article,
body.report-page .report-block details,
body.report-page .report-block .detail-row,
body.report-page .report-block .resource-url,
body.report-page .report-block .block-title > *{
  min-width:0;
}
body.report-page .block-title p,
body.report-page .detail-value,
body.report-page .resource-url,
body.report-page .resource-url a,
body.report-page .audit-file span,
body.report-page .finding p,
body.report-page .engine-error-list span{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Major summary cards always distribute evenly. */
body.report-page .executive-grid{align-items:stretch}
body.report-page .executive-grid > *{height:100%;min-width:0}
body.report-page .score-orb,
body.report-page .headline-stat{height:100%}

/* Dense report grids: fixed, balanced desktop columns rather than narrow left clusters. */
@media (min-width:1180px){
  body.report-page .executive-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
  body.report-page .insight-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
  body.report-page .crux-metrics{grid-template-columns:repeat(5,minmax(0,1fr)) !important}
  body.report-page .diagnostic-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
  body.report-page .network-timeline{grid-template-columns:repeat(5,minmax(0,1fr)) !important}
  body.report-page .infra-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .premium-headers{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .deep-kpis{grid-template-columns:repeat(5,minmax(0,1fr)) !important}
  body.report-page .seo-signal-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  body.report-page .resource-duo{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (min-width:760px) and (max-width:1179px){
  body.report-page .executive-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  body.report-page .insight-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .crux-metrics{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .diagnostic-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  body.report-page .network-timeline{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .infra-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .premium-headers{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
  body.report-page .deep-kpis{grid-template-columns:repeat(3,minmax(0,1fr)) !important}
}
@media (max-width:759px){
  body.report-page .executive-grid,
  body.report-page .insight-grid,
  body.report-page .crux-metrics,
  body.report-page .diagnostic-grid,
  body.report-page .network-timeline,
  body.report-page .infra-grid,
  body.report-page .premium-headers,
  body.report-page .deep-kpis,
  body.report-page .seo-signal-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media (max-width:520px){
  body.report-page .executive-grid,
  body.report-page .insight-grid,
  body.report-page .crux-metrics,
  body.report-page .diagnostic-grid,
  body.report-page .network-timeline,
  body.report-page .infra-grid,
  body.report-page .premium-headers,
  body.report-page .deep-kpis,
  body.report-page .seo-signal-grid,
  body.report-page .resource-duo{grid-template-columns:1fr !important}
}

/* COMMAND DECK — keep the console identity, but every data chapter owns the full canvas. */
body.report-page.report-theme-command main.report-shell > .report-block{grid-column:1 / -1 !important}
body.report-page.report-theme-command .report-block{padding:30px !important}
body.report-page.report-theme-command .infra-premium,
body.report-page.report-theme-command .seo-premium,
body.report-page.report-theme-command .findings-premium{background-image:none !important}
body.report-page.report-theme-command .infra-card.material-card{
  background:#0f1c2d !important;
  background-image:none !important;
  color:#e6eff9 !important;
  border:1px solid #284159 !important;
  box-shadow:inset 0 1px rgba(255,255,255,.035) !important;
}
body.report-page.report-theme-command .infra-card.material-card h3,
body.report-page.report-theme-command .infra-card.material-card .detail-value{color:#eef5fc !important}
body.report-page.report-theme-command .infra-card.material-card .detail-name>span,
body.report-page.report-theme-command .infra-card.material-card .detail-value small{color:#9fb0c5 !important}
body.report-page.report-theme-command .infra-card.material-card .detail-row{border-color:#263b50 !important;color:#eef5fc !important}
body.report-page.report-theme-command .findings-premium{background:#0a131f !important}

/* FORENSIC BOARD — the investigation sidebar is only the opening summary; the evidence chapters are full width. */
@media (min-width:1051px){
  body.report-page.report-theme-forensic main.report-shell{
    grid-template-columns:minmax(285px,330px) minmax(0,1fr) !important;
    gap:18px !important;
  }
  body.report-page.report-theme-forensic main.report-shell > .report-overview{
    grid-column:1 !important;
    grid-row:auto !important;
    position:relative !important;
    top:auto !important;
    align-self:stretch;
    height:100%;
  }
  body.report-page.report-theme-forensic main.report-shell > .executive-grid{
    grid-column:2 !important;
    align-self:stretch;
  }
  body.report-page.report-theme-forensic main.report-shell > .report-block,
  body.report-page.report-theme-forensic main.report-shell > .report-footnote,
  body.report-page.report-theme-forensic main.report-shell > .engine-diagnostics{
    grid-column:1 / -1 !important;
  }
}
@media (max-width:1050px){
  body.report-page.report-theme-forensic main.report-shell{display:block !important}
  body.report-page.report-theme-forensic main.report-shell > .report-overview{position:static !important;height:auto}
}

/* ATLAS — remove empty 4/12 gutters; cartographic identity stays in surfaces, borders and typography. */
body.report-page.report-theme-atlas main.report-shell > .report-block{
  grid-column:1 / -1 !important;
}
body.report-page.report-theme-atlas main.report-shell > .report-block:nth-of-type(even){
  grid-column:1 / -1 !important;
}

/* Dark report families: nested server/SEO/evidence surfaces must stay dark, never white with light text. */
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .infra-premium,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .seo-premium,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .findings-premium{
  color:var(--r-ink) !important;
  background-image:none !important;
}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .material-card{
  background-image:none !important;
  color:var(--r-ink) !important;
}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .material-card h3,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .material-card .detail-value,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .header-check strong{
  color:var(--r-ink) !important;
}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .material-card .detail-name>span,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .material-card .detail-value small,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .header-check small{
  color:var(--r-muted) !important;
}

/* Light families: nested cards stay explicitly light with dark copy. */
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .infra-premium .material-card,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .seo-document,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .header-check,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .h1-samples,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .tech-hints,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .finding{
  color:var(--r-ink) !important;
}

/* Server / publication layer: three equally weighted columns and readable rows in every family. */
body.report-page .premium-infra{display:grid;gap:12px;align-items:stretch !important}
body.report-page .premium-infra > .material-card{height:100%;min-width:0}
body.report-page .material-card h3{margin-top:0}
body.report-page .material-card .detail-row{min-width:0}
body.report-page .premium-headers{display:grid;gap:10px;align-items:stretch}
body.report-page .premium-headers > .header-check{height:100%;min-width:0}

/* Avoid one lonely KPI card on wide reports (there are five deep-scan KPIs). */
body.report-page .deep-kpis > .compact-stat{height:100%}

/* Tables may scroll internally, never force the whole report off canvas. */
body.report-page .page-audit-table,
body.report-page .resource-table,
body.report-page .score-table{
  max-width:100%;
}
body.report-page .deep-details,
body.report-page .evidence-details{max-width:100%;min-width:0}
body.report-page .deep-details > div,
body.report-page .evidence-details > div{max-width:100%;min-width:0}

/* Theme-specific spacing polish after the layout normalization. */
body.report-page.report-theme-editorial .report-block,
body.report-page.report-theme-journal .report-block{width:100% !important}
body.report-page.report-theme-executive .report-block,
body.report-page.report-theme-liquid .report-block,
body.report-page.report-theme-observatory .report-block{width:100% !important}
body.report-page.report-theme-blueprint .report-block,
body.report-page.report-theme-terminal .report-block{width:100% !important}

@media (max-width:900px){
  body.report-page .block-title{gap:18px}
  body.report-page .seo-layout{grid-template-columns:1fr !important}
}

/* Semantic-state contrast pass: status colors must be readable on each family surface. */
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .insight-card.good .metric-status,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .headline-stat.good .headline-ref{color:#75dfbd !important}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .insight-card.mid .metric-status,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .headline-stat.mid .headline-ref{color:#f1cb79 !important}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .insight-card.bad .metric-status,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .headline-stat.bad .headline-ref{color:#ff9aa5 !important}
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .insight-card.good .metric-status,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .headline-stat.good .headline-ref{color:#0d6c54 !important}
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .insight-card.mid .metric-status,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .headline-stat.mid .headline-ref{color:#76500d !important}
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .insight-card.bad .metric-status,
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .headline-stat.bad .headline-ref{color:#8b3040 !important}
body.report-page:is(.report-theme-editorial,.report-theme-executive,.report-theme-liquid,.report-theme-journal) .orb-ring span{color:#5d6471 !important}
body.report-page.report-theme-blueprint .report-hero .eyebrow{color:#c4edff !important}
body.report-page.report-theme-journal .report-hero .eyebrow{color:#5a4732 !important}

/* Score-table semantic colors on dark canvases. */
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.good strong,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.good span{color:#75dfbd !important}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.mid strong,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.mid span{color:#f1cb79 !important}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.bad strong,
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.bad span{color:#ff9aa5 !important}

/* Material-load fallbacks: hero copy remains readable even if a raster asset fails. */
body.report-page.report-theme-command .report-hero{background-color:#091321}
body.report-page.report-theme-editorial .report-hero{background-color:#eee6d8}
body.report-page.report-theme-forensic .report-hero{background-color:#201e1a}
body.report-page.report-theme-executive .report-hero{background-color:#30291f}
body.report-page.report-theme-blueprint .report-hero{background-color:#083c64}
body.report-page.report-theme-terminal .report-hero{background-color:#061b1d}
body.report-page.report-theme-atlas .report-hero{background-color:#0a1730}
body.report-page.report-theme-liquid .report-hero{background-color:#3d464f}
body.report-page.report-theme-journal .report-hero{background-color:#e8ddc8}
body.report-page.report-theme-observatory .report-hero{background-color:#09122b}

/* Dark score chips must not keep the base light pastel pill background. */
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell span{
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(255,255,255,.08);
}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.good span{background:rgba(48,181,146,.14) !important}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.mid span{background:rgba(226,170,59,.14) !important}
body.report-page:is(.report-theme-command,.report-theme-forensic,.report-theme-blueprint,.report-theme-terminal,.report-theme-atlas,.report-theme-observatory) .score-cell.bad span{background:rgba(213,77,94,.15) !important}
