/* Final cross-tool visual and responsive standardisation. */
:root{
  --blue:#5b9bd5;--primary:#5b9bd5;--navy:#173b5f;--teal:#5aa9a4;
  --violet:#8aa7c7;--orange:#d8894b;--soft:#f5f9fd;--line:#d7e4ef;
}
html{overflow-x:hidden}
body{overflow-x:hidden;background:#f7fafc;color:#20364d}

/* Tool content only. Shared header and footer are deliberately excluded. */
main .wrap,main .container,main .rr-wrap,main .dmc-wrap,main .ai-ready-wrap,main .dqcc-wrap,
main .dgma-container,main .dpr-shell,main [class$="-wrap"],main [class$="-container"]{
  width:min(calc(100% - 32px),1340px)!important;
  max-width:1340px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
main,main section,main form,main fieldset,main .card,main .tool-card,main .tool-shell,main .form-card,main .results{max-width:100%}
main img,main svg,main video,main canvas{max-width:100%;height:auto}
main table{max-width:100%}
main .table-wrap,main [class*="table-wrap"]{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

/* White heroes with restrained professional light-blue accents. */
main .hero,main [class$="-hero"],main .dmc-hero,main .ai-ready-hero,main .dqcc-hero,main .dgma-hero,main .dpr-hero{
  background:#fff!important;background-image:none!important;color:#20364d!important;border-bottom:1px solid #dbe8f2!important;
}
main .hero:after,main [class$="-hero"]:after{opacity:.18!important}
main .hero h1,main [class$="-hero"] h1,main .dmc-hero h1,main .ai-ready-hero h1,main .dqcc-hero h1,main .dgma-hero h1,main .dpr-hero h1{color:#173b5f!important}
main .hero p,main [class$="-hero"] p,main .dmc-hero p,main .ai-ready-hero p,main .dqcc-hero p,main .dgma-hero p,main .dpr-hero p,
main .hero .trust,main [class$="-hero"] [class*="trust"]{color:#4d6378!important}
main .kicker,main .eyebrow,main [class*="kicker"],main [class*="eyebrow"]{background:#eaf3fb!important;border-color:#c8ddec!important;color:#285f8f!important}

/* Explicit title treatment requested for these two calculators while retaining white heroes. */
main .ai-ready-hero h1,main .dqcc-hero h1{display:inline-block!important;background:#4f86b5!important;color:#fff!important;padding:10px 16px!important;border-radius:10px!important}

/* Replace saturated blue surfaces inside tools only. */
main .btn.blue,main .blue,main .primary:not(.dpr-btn--primary):not(.dqcc-btn--primary),main [class*="btn--primary"],main button.primary,
main .progress span,main .bar,main [class*="progress"] span{background:#5b9bd5!important}
main .icon,main [class$="-icon"],main [class*="-icon "]{color:#3977aa}
main .step,main .card,main .tool-card,main .tool-shell,main [class*="-card"]{border-color:#d7e4ef!important;box-shadow:0 10px 28px rgba(38,84,121,.08)!important}

/* Prevent assessment controls from escaping the content area. */
main .dgma-dimensions,main .dgma-dimension,main .dgma-rating-grid,main .dgma-radio-row,main .dpr-field-grid,main .dpr-question{min-width:0!important;max-width:100%!important}
main .dgma-rating-grid{grid-template-columns:minmax(0,1fr) minmax(260px,.75fr)!important}
main .dgma-radio-row{grid-template-columns:repeat(5,minmax(72px,1fr))!important}
main .dpr-field-grid{grid-template-columns:minmax(220px,.9fr) minmax(220px,.8fr) minmax(280px,1.2fr)!important;align-items:start!important}
main .dpr-field{min-width:0!important}
main .dpr-field select,main .dpr-field input,main .dpr-field textarea{width:100%!important;max-width:100%!important}

@media(max-width:980px){
 main .dgma-rating-grid,main .dpr-field-grid{grid-template-columns:1fr!important}
 main .dgma-radio-row{grid-template-columns:repeat(5,minmax(54px,1fr))!important}
}
@media(max-width:680px){
 main .wrap,main .container,main .rr-wrap,main .dmc-wrap,main .ai-ready-wrap,main .dqcc-wrap,main .dgma-container,main .dpr-shell,main [class$="-wrap"],main [class$="-container"]{width:min(calc(100% - 22px),1340px)!important}
 main .dgma-radio-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 main .hero,main [class$="-hero"],main .dmc-hero,main .ai-ready-hero,main .dqcc-hero,main .dgma-hero,main .dpr-hero{padding-top:44px!important;padding-bottom:44px!important}
}


/* Targeted July layout corrections. */
main #dqcc-app .dqcc-hero{
  background:#fff!important;
  background-image:none!important;
  color:#20364d!important;
  border-bottom:1px solid #dbe8f2!important;
}
main #dqcc-app .dqcc-hero p{color:#4d6378!important}
main #dqcc-app .dqcc-trust{color:#4d6378!important}
main #dqcc-app .dqcc-chip{background:#eef6fc!important;border-color:#c8ddec!important;color:#285f8f!important}

/* Keep governance assessment controls fully inside the 1340px shell. */
main .dgma-page,main .dgma-page *{min-width:0}
main .dgma-page .dgma-container{width:min(calc(100% - 32px),1340px)!important;max-width:1340px!important}
main .dgma-page .dgma-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
main .dgma-page .dgma-rating-grid{grid-template-columns:1fr!important}
main .dgma-page .dgma-radio-row{grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important}
main .dgma-page .dgma-radio-card label{overflow-wrap:anywhere!important;padding-inline:5px!important}
main .dgma-page .dgma-table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important}

/* DPDP sections and status output remain constrained to the body shell. */
main .dpr-page,main .dpr-page *{min-width:0}
main .dpr-page .dpr-shell{width:min(calc(100% - 32px),1340px)!important;max-width:1340px!important}
main .dpr-page .dpr-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}
main .dpr-page .dpr-question,main .dpr-page .dpr-results,main .dpr-page [class*="result"]{width:100%!important;max-width:100%!important}
main .dpr-page table{display:table;max-width:100%!important}
main .dpr-page [class*="table-wrap"]{overflow-x:auto!important;max-width:100%!important}

/* Board pack form spacing and FAQ presentation. */
main .bp-page .bp-card-body{padding:clamp(24px,3vw,38px)!important}
main .bp-page .bp-form-section{padding:32px 0!important}
main .bp-page .bp-grid-2,main .bp-page .bp-grid-3{gap:22px!important}
main .bp-page .bp-field{padding:2px 0!important}
main .bp-page .bp-faq{max-width:1100px!important;display:grid!important;gap:14px!important;margin-top:30px!important}
main .bp-page .bp-faq details{border:1px solid #d7e4ef!important;border-radius:14px!important;padding:0 20px!important;background:#fff!important;box-shadow:0 8px 22px rgba(38,84,121,.06)!important}
main .bp-page .bp-faq summary{padding:18px 42px 18px 0!important;font-weight:600!important}
main .bp-page .bp-faq p{padding:0 0 18px!important;margin:0!important}

@media(max-width:980px){
 main .dgma-page .dgma-form-grid,main .dpr-page .dpr-field-grid{grid-template-columns:1fr!important}
}
@media(max-width:680px){
 main .dgma-page .dgma-container,main .dpr-page .dpr-shell{width:min(calc(100% - 22px),1340px)!important}
 main .dgma-page .dgma-radio-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 main .bp-page .bp-card-body{padding:20px!important}
 main .bp-page .bp-form-section{padding:24px 0!important}
}


/* V4.1 page-specific stability corrections. */
#dqcc-main .dqcc-hero{background:#fff!important;background-image:none!important;color:#20364d!important}
.dgma-page,.dpr-page{width:100%;max-width:100%;overflow:hidden}
.dgma-page .dgma-container,.dpr-page .dpr-shell{box-sizing:border-box}

/* V6 source-aligned corrections: selectors match page roots and elements outside main. */
.dqcc-hero{
  background:#fff!important;
  background-image:none!important;
  color:#20364d!important;
  border-bottom:1px solid #dbe8f2!important;
}
.dqcc-hero h1{color:#173b5f!important;background:none!important;padding:0!important;border-radius:0!important}
.dqcc-hero p{color:#4d6378!important}
.dqcc-hero .dqcc-kicker{color:#285f8f!important;background:#eaf3fb!important;border-radius:999px;padding:6px 10px!important}
.dqcc-hero .dqcc-chip{background:#eef6fc!important;border-color:#c8ddec!important;color:#285f8f!important}
.dqcc-hero .dqcc-illustration{box-shadow:0 18px 48px rgba(38,84,121,.12)!important;border:1px solid #d7e4ef!important}

/* Assessment roots are themselves main elements, so do not prefix with main. */
.dgma-page,.dpr-page{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
.dgma-page .dgma-container,.dpr-page .dpr-shell{
  width:min(calc(100% - 32px),1340px)!important;
  max-width:1340px!important;
  margin-inline:auto!important;
  box-sizing:border-box!important;
}
.dgma-page .dgma-dimensions,.dgma-page .dgma-dimension,.dgma-page .dgma-rating-grid,
.dpr-page .dpr-questions,.dpr-page .dpr-question,.dpr-page .dpr-field-grid{
  width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
.dgma-page .dgma-rating-grid{grid-template-columns:1fr!important}
.dgma-page .dgma-radio-row{grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important}
.dpr-page .dpr-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}

/* Board pack spacing and compact two-column FAQ layout. */
.bp-page .bp-card-head{padding:30px 34px!important}
.bp-page .bp-card-body{padding:34px!important}
.bp-page .bp-form-section{padding:30px 0!important}
.bp-page .bp-grid-2,.bp-page .bp-grid-3{gap:22px!important}
.bp-page .bp-faq{
  max-width:1340px!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
  margin:30px auto 0!important;
}
.bp-page .bp-faq details{
  align-self:start!important;
  border:1px solid #d7e4ef!important;
  border-radius:14px!important;
  padding:0 20px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(38,84,121,.06)!important;
}
.bp-page .bp-faq summary{padding:18px 42px 18px 0!important;line-height:1.4!important}
.bp-page .bp-faq p{padding:0 0 18px!important;margin:0!important}

@media(max-width:980px){
  .dpr-page .dpr-field-grid{grid-template-columns:1fr!important}
  .bp-page .bp-faq{grid-template-columns:1fr!important}
}
@media(max-width:680px){
  .dgma-page .dgma-container,.dpr-page .dpr-shell{width:min(calc(100% - 22px),1340px)!important}
  .dgma-page .dgma-radio-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .bp-page .bp-card-head,.bp-page .bp-card-body{padding:20px!important}
  .bp-page .bp-form-section{padding:24px 0!important}
}
