/* ReguSpace C121R3 / dark-surface repair candidate, 2026-11-01.
   Screen and EXPLICIT dark mode ONLY. All geometric/semantic SVG figures,
   Matrix, strategy/scoring, PREP, white printed report paper are excluded.
   Token sets chosen for contrast, not generic inversion. */
@media screen {
  /* Public shell: readable homepage introduction, retain original hero artwork. */
  html[data-reguspace-theme="dark"] body .rs-home-page > .rs-home-hero {
    background:#344452!important;border-color:#748c9b!important;
  }
  html[data-reguspace-theme="dark"] body .rs-home-page .rs-home-intro :is(h1,p,.rs-home-overline) {
    color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body .rs-home-page .rs-home-imagebtn {
    background:#dce9ef!important;border-color:#8da9ba!important;
  }
  /* Article/tour pricing: previous inline white panels fought the dark layer. */
  html[data-reguspace-theme="dark"] body main .complete-pricing {
    background:#344452!important;color:#edf4f8!important;border-color:#718696!important;
  }
  html[data-reguspace-theme="dark"] body main .complete-pricing :is(h2,h3,p,small,th,td,strong,em,span) {
    color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body main .complete-pricing :is(table,thead,tbody,tr,th,td) {
    background:transparent!important;border-color:#718696!important;
  }
  html[data-reguspace-theme="dark"] body main .complete-pricing :is(a.button,.btn,.button) {
    background:#405462!important;color:#f4f8fb!important;border:1px solid #93a9b8!important;
  }
  /* Article readability: finish cards and practice blocks. Keep images/graphics. */
  html[data-reguspace-theme="dark"] body main article :is(.practice-box,.practice-item,.article-intermezzo,.article-visual-summary,.visual-caption,.c12-further) {
    background:#344452!important;background-image:none!important;
    color:#edf4f8!important;border-color:#718696!important;
  }
  html[data-reguspace-theme="dark"] body main article :is(.practice-box,.practice-item,.article-intermezzo,.article-visual-summary,.visual-caption,.c12-further) :is(h2,h3,h4,p,span,b,strong,small,em,li,a) {
    color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body main article :is(.practice-box,.practice-item,.article-intermezzo,.article-visual-summary,.c12-further) :is(a.button,.button) {
    background:#405462!important;color:#f4f8fb!important;border-color:#8ca4b5!important;
  }
  /* Article ending: pale explanatory callouts, not photo or infographic. */
  html[data-reguspace-theme="dark"] body main article :is(.closing,.final-note,.article-end,.c12-closing) {
    background:#344452!important;background-image:none!important;border-color:#718696!important;color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body main article :is(.closing,.final-note,.article-end,.c12-closing) :is(p,h2,h3,strong,em,span) {
    color:#edf4f8!important;
  }
  /* Interactive article expand/collapse controls on charcoal. */
  html[data-reguspace-theme="dark"] body main article details > summary,
  html[data-reguspace-theme="dark"] body main article details[open] > summary {
    color:#e5f3fc!important;
  }
  html[data-reguspace-theme="dark"] body main article details > summary :is(a,b,strong,span) {color:inherit!important;}
}
/* Desktop shell height: no forced cropping and no mobile height locks.
   Fit a normal 900px desktop viewport; small desktops may naturally scroll. */
@media screen and (min-width:900px) and (min-height:720px) {
  html[data-reguspace-theme="dark"] body:has(> main.rs-home-page) {
    min-height:100dvh;display:flex;flex-direction:column;
  }
  html[data-reguspace-theme="dark"] body > main.rs-home-page {
    flex:1 1 auto;margin-top:10px;padding-bottom:8px;
    width:100%;box-sizing:border-box;
  }
  html[data-reguspace-theme="dark"] body .rs-home-hero {
    padding-top:12px;padding-bottom:14px;
  }
  html[data-reguspace-theme="dark"] body .rs-home-hero .rs-home-imagebtn {margin-bottom:10px;}
  html[data-reguspace-theme="dark"] body .rs-home-hero .rs-home-imagebtn img {
    height:clamp(210px,calc(100dvh - 460px),470px);
  }
  html[data-reguspace-theme="dark"] body > footer.rs-compact-footer {flex:0 0 auto;}
}
@media screen {
  /* Activation profile: dark panels around the explanatory results; the
     little 2x2 domain diagrams keep their semantic fills and line art. */
  html[data-reguspace-theme="dark"] body main#activation-main :is(
    .physical-block,.physical-intro,.physical-match,.impact-card,
    .result-block,.narrative-box,.reflection-box,.development-box,
    .physical-score-card,.caution-box,.finish-panel,
    .domain-block,.qcard
  ) {
    background:#344452!important;background-image:none!important;
    border-color:#718696!important;color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body main#activation-main :is(
    .physical-block,.physical-intro,.physical-match,.impact-card,
    .result-block,.narrative-box,.reflection-box,.development-box,
    .physical-score-card,.caution-box,.finish-panel,.domain-block,.qcard
  ) :is(h1,h2,h3,h4,p,strong,small,.brand,.eyebrow,.qtext,.domain-sub,.impact-question,.impact-note,.impact-kicker,.note,.finish-copy,li,label) {
    color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body main#activation-main :is(.qnum,.icon-badge) {
    background:#dbeaf1!important;color:#234357!important;
  }
  html[data-reguspace-theme="dark"] body main#activation-main :is(.opt,.impact-opt,.phys-opt,.physical-fit-opt):not(.active) {
    background:#405462!important;border-color:#839bab!important;color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body main#activation-main :is(.btn-secondary) {
    background:#405462!important;color:#edf4f8!important;border-color:#879ead!important;
  }
}
@media screen {
  /* Complete/regulator toolbar must align with the normal footer, not the
     entire monitor. Scope to dark and desktop: mobile sliding menu unchanged. */
  @media (min-width:1100px) {
    html[data-reguspace-theme="dark"] body > .app > .regu-c44-sticky-frame,
    html[data-reguspace-theme="dark"] body > .reguspace-v287-app > .regu-c44-sticky-frame {
      width:calc(100% - 24px)!important;max-width:1440px!important;
      margin-inline:auto!important;
    }
    html[data-reguspace-theme="dark"] body > .app > .regu-c44-sticky-frame > .toolbar,
    html[data-reguspace-theme="dark"] body > .reguspace-v287-app > .regu-c44-sticky-frame > .toolbar {
      width:100%!important;max-width:1440px!important;margin-inline:auto!important;
    }
  }
  /* Drijfveren in hub: match other dark hub card action surfaces. */
  html[data-reguspace-theme="dark"] body #personalityHubScreen #personalityHubOpenDrives {
    background:#405462!important;color:#edf4f8!important;border-color:#718696!important;
  }
  html[data-reguspace-theme="dark"] body #personalityHubScreen #personalityHubOpenDrives :is(.analysis-choice-action,.analysis-choice-title,.analysis-choice-description) {
    color:#edf4f8!important;
  }
  /* Attachment: neutral panels, questionnaires, detail tables, action cards.
     Intentionally EXCLUDE .attach-matrix, .attach-primary-dot, svg, graphs. */
  html[data-reguspace-theme="dark"] body #attachmentScreen :is(
    .attach-hero,.attach-page,.attach-section,.attachment-block,
    .attach-questionnaire,.attach-questionnaire[open],.attach-q,
    .attach-style-card,.attach-result-card,.attach-result-panel,
    .attach-blend .blend-item,.attach-kern,.attach-more,
    .attachment-relation-details,.attachment-relation-table,
    .attachment-relation-table > div,.attachment-action-block,
    .attachment-action-more,.attachment-action-more-body,
    .attachment-action-row > div,.attachment-action-head,
    .attachment-regulation-intro,.attachment-secure-route,
    .attach-explain-block,.attach-overview,.attach-rule,
    .attachment-readiness,.attachment-reflection-grid
  ) {
    background:#344452!important;background-image:none!important;
    color:#edf4f8!important;border-color:#718696!important;
  }
  html[data-reguspace-theme="dark"] body #attachmentScreen :is(
    .attach-hero,.attach-page,.attach-section,.attachment-block,
    .attach-questionnaire,.attach-q,.attach-style-card,.attach-result-card,
    .attach-blend .blend-item,.attach-kern,.attachment-relation-details,
    .attachment-relation-table,.attachment-action-block,.attachment-action-more,
    .attachment-regulation-intro,.attachment-secure-route,.attach-explain-block
  ) :is(h1,h2,h3,h4,p,li,small,strong,b,em,label,legend,.lead,.qtext,.tag,summary,.note,.attach-q-msg,.attach-rule,.attach-scale-guide) {
    color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"] body #attachmentScreen :is(
    .attachment-relation-table > div,.attachment-action-row > div,
    .attachment-action-more-body,.attachment-action-head
  ) :is(p,span,b,strong,em,small) {color:#edf4f8!important;}
  html[data-reguspace-theme="dark"] body #attachmentScreen :is(.attach-questionnaire,.attachment-relation-details,.attach-more,details.more-info) > summary {
    background:#405462!important;color:#edf4f8!important;border-color:#718696!important;
  }
  html[data-reguspace-theme="dark"] body #attachmentScreen .attach-q :is(input,textarea) {
    background:#526879!important;color:#f4f8fb!important;border-color:#96afbe!important;
  }
  html[data-reguspace-theme="dark"] body #attachmentScreen .attach-q :is(input,textarea)::placeholder {
    color:#d1e1eb!important;
  }
  html[data-reguspace-theme="dark"] body #attachmentScreen .attach-q .btn {
    background:#405462!important;color:#edf4f8!important;border-color:#8aa5b6!important;
  }
}
@media screen {
  /* Qualities module: don't brighten the full section on mobile. */
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(
    .q-underused,.q-choice-question,.q-reflection-result,
    .q-self-card,.q-local-nav,.q-action-card,
    .q-outcome,.q-rank-guide,.q-route-note,.q-full-order,
    .q-quality-mirror-details,.q-action-fields,.q-action-helper
  ) {background:#344452!important;color:#edf4f8!important;border-color:#718696!important;}
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(
    .q-underused,.q-choice-question,.q-reflection-result,.q-self-card,
    .q-action-card,.q-rank-guide,.q-route-note,.q-full-order,.q-action-helper
  ) :is(p,span,small,strong,b,em,label,h2,h3,.q-copy) {color:#edf4f8!important;}
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module .q-underused .q-choice-question {
    background:transparent!important;color:#edf4f8!important;
  }
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(.q-chip,.q-local-nav button,.q-action-input,.q-action-fields textarea,.q-action-fields input) {
    background:#405462!important;color:#edf4f8!important;border-color:#829aa9!important;
  }
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(.q-chip.selected,.q-chip.active,.q-local-nav button.active) {
    background:#d7e8f1!important;color:#21394b!important;border-color:#a7c1d0!important;
  }
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(.q-local-nav button,.q-action-input)::placeholder {color:#d9e7ed!important;}
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(.q-choice-question,.q-action-helper,.q-underused p) {color:#edf4f8!important;}
  /* Visibly focused field, preserve semantic chart and color-coded triangle. */
  html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module :is(textarea,input[type="text"]):focus-visible {
    outline:3px solid #a9d9f5!important;outline-offset:2px;
  }
  /* Neurodiversity complex explanatory figures & tiles: deliberately
     retain existing per-component contrast until individually audited. */
}

@media screen {html[data-reguspace-theme="dark"] body #attachmentScreen .attach-q-msg {min-height:0;color:#edf4f8!important;}html[data-reguspace-theme="dark"] body #attachmentScreen .attach-q-msg:empty {display:none!important;}}

@media screen {
 /* C121R3 corrected after real computed-style audit: article intermezzo
    summaries are pale cards; foreground and card must be updated together. */
 html[data-reguspace-theme="dark"] body main article .article-intermezzo details.intermezzo-card,
 html[data-reguspace-theme="dark"] body main article .article-intermezzo details.intermezzo-card > summary {
   background:#405462!important;color:#edf4f8!important;border-color:#8aa1b0!important;
 }
 html[data-reguspace-theme="dark"] body main article .article-intermezzo details.intermezzo-card :is(strong,b,span,p,em) {
   color:#edf4f8!important;
 }
 html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module .q-self-card .q-tag {
   background:#d7e8f1!important;color:#223e52!important;border-color:#adc7d4!important;
 }
}
/* C121R3 targeted corrections from screenshots + computed styles, not blind colors. */
@media screen {
 html[data-reguspace-theme="dark"] body main.complete-page .complete-cta {
   background:#344452!important;color:#edf4f8!important;border-color:#718696!important;
 }
 html[data-reguspace-theme="dark"] body main.complete-page .complete-cta :is(h2,h3,p,small,strong,span) {color:#edf4f8!important;}
 html[data-reguspace-theme="dark"] body #attachmentScreen .attach-explain-block :is(strong,b,em,span,p),
 html[data-reguspace-theme="dark"] body #attachmentScreen .attach-q :is(.qtext,label,strong,span),
 html[data-reguspace-theme="dark"] body #attachmentScreen .attach-style-card :is(h2,h3,p,small,strong,b,span),
 html[data-reguspace-theme="dark"] body #attachmentScreen .attach-result-card :is(h2,h3,p,small,strong,b,span),
 html[data-reguspace-theme="dark"] body #attachmentScreen .attachment-relation-table > div :is(strong,span,p,b),
 html[data-reguspace-theme="dark"] body #attachmentScreen .attachment-action-row > div :is(strong,span,p,b),
 html[data-reguspace-theme="dark"] body #attachmentScreen .attach-kern :is(strong,em) {
   color:#edf4f8!important;
 }
 /* Never recolor the semantic attachment matrix or its two plotted dots. */
}
@media screen {
 /* Explicitly out-rank the legacy, late BODY-inline !important rule.
    Apply ONLY to text on the dark neutral background (not light radio pills). */
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen .attach-explain-block strong,
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen .attach-q .qtext {
   color:#edf4f8!important;
 }
}
/* C121R3 deep-audit pass: force normally hidden Complete submodules open
   during validation; fixes below are only the observed neutral text panels. */
@media screen {
 /* Hechting: compact explanatory cards, not the semantic matrix illustration. */
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen :is(
  .subcard,.subcard.kern,.attach-scale-guide,.more-info-body,
  .attachment-action-block,.attachment-action-more-body,
  .attachment-action-row,.attach-result-card,.attach-style-card,
  .attach-blend .blend-item
 ) {background:#344452!important;color:#edf4f8!important;border-color:#718696!important;}
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen :is(
  .subcard,.subcard.kern,.attach-scale-guide,.more-info-body,
  .attachment-action-block,.attachment-action-more-body,.attach-result-card,
  .attach-style-card,.attach-blend .blend-item,.attachment-action-row
 ) :is(.tag,h2,h3,h4,p,li,ul,small,strong,b,em,span,.blend-name,.blend-note,.blend-label,.bullet) {
  color:#edf4f8!important;
 }
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen :is(.attach-result-card,.attach-style-card) :is(.row,.tag,.blend-note,.blend-name,small,span,p,strong,div:not(.score)) {color:#edf4f8!important;}
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen :is(.attachment-action-block,.attachment-action-more-body) :is(div,p,span,strong,em,li,h3,h4) {color:#edf4f8!important;}
 /* Werkwijzer: informational paragraphs, citations and zone explanations.
    No edits to Matrix cell fills or semantic plot markers. */
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen :is(.model-choice-note,.subcard,.subcard.kern,.more-info-body,.zone-card) {
  background:#344452!important;color:#edf4f8!important;border-color:#718696!important;
 }
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen :is(.model-choice-note,.subcard,.subcard.kern,.more-info-body,.zone-card) :is(.tag,h2,h3,h4,p,li,strong,b,small,em,span,div) {
  color:#edf4f8!important;
 }
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen a:not(.btn):not(.button) {
  color:#b9eaff!important;
 }
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen #manualEnergyZoneGuide {
  color:#673c56!important;
 }
 /* Previously under-tested generated Activation-profile text, same dark card. */
 html[data-reguspace-theme="dark"] body main#activation-main#activation-main :is(
  .physical-fit-line,.physical-score-card .small-label,
  .reflection-box .ck,.physical-copy,.narrative-box strong
 ) {color:#edf4f8!important;}
 /* Qualities: only the neutral additive-action control and the mail note. */
 html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module #addAction {
  background:#405462!important;color:#edf4f8!important;border-color:#8da5b4!important;
 }
 html[data-reguspace-theme="dark"][data-rs-standalone="qualities"] body .qualities-module .q-mirror-mail-note {
  color:#edf4f8!important;
 }
}
@media screen {
 /* Details, result tags and footer labels inside dark explanatory cards.
    Old pale chip backgrounds were still winning despite dark text styles. */
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen :is(
   .subcard .tag,.attach-result-card .tag,.subcard.kern .tag,
   #supportSeeking,#supportReceiving,#supportAutonomy
 ) {background:#405462!important;color:#edf4f8!important;border-color:#8aa1b0!important;}
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen :is(#supportSeeking,#supportReceiving,#supportAutonomy) strong,
 html[data-reguspace-theme="dark"] body #attachmentScreen#attachmentScreen .subcard.kern > div:not(.tag) {
   color:#edf4f8!important;
 }
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen .subcard .tag {
   background:#405462!important;color:#edf4f8!important;border-color:#8aa1b0!important;
 }
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen #manualEnergyZoneGuide .tag {
   color:#673c56!important;
 }
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen #manualEnergyLogLink {
   color:#b9eaff!important;
 }
}
@media screen {
 html[data-reguspace-theme="dark"] body #manualScreen#manualScreen #manualEnergyZoneGuide .tag {
   background:#f6e4f2!important;color:#623a56!important;border-color:#d8b4cf!important;
 }
}
/* Remaining measured 3–4.5:1 warnings: preserve the category HUE but darken
   small labels on their existing pale semantic backgrounds. */
@media screen {
 html[data-reguspace-theme="dark"] body #depthRecoveryScreen#depthRecoveryScreen .strategy-card.green > .tag {color:#405e2c!important;}
 html[data-reguspace-theme="dark"] body #depthRecoveryScreen#depthRecoveryScreen .strategy-card.orange > .tag {color:#794a17!important;}
 html[data-reguspace-theme="dark"] body #depthRecoveryScreen#depthRecoveryScreen .strategy-card.purple > .tag {color:#703669!important;}
 html[data-reguspace-theme="dark"] body #depthRecoveryScreen#depthRecoveryScreen .strategy-card.blue > .tag {color:#2e516e!important;}
 html[data-reguspace-theme="dark"] body #personalityScreen#personalityScreen #big5MirrorSection .mirror-reflection textarea::placeholder {color:#edf4f8!important;}
 html[data-reguspace-theme="dark"] body #personalityHubScreen#personalityHubScreen .development-badge {color:#536071!important;}
 html[data-reguspace-theme="dark"] body main.wrap .footer {color:#465765!important;}
 html[data-reguspace-theme="dark"] body main.wrap .panel p.quiet {color:#53606b!important;}
}
/* Explicit screenshot fixes missed by text-only static scans:
   Activation's 0/63 white progress strip and dynamically inserted "Minder". */
@media screen {
 html[data-reguspace-theme="dark"] body main#activation-main .progress-card {
  background:#405462!important;border-color:#839aa9!important;color:#edf4f8!important;
 }
 html[data-reguspace-theme="dark"] body main#activation-main .progress-card .progress-track {
  background:#253745!important;
 }
 html[data-reguspace-theme="dark"] body main#activation-main .progress-card .progress-meta {
  color:#edf4f8!important;
 }
 html[data-reguspace-theme="dark"] body.regu-imported-article .science-collapse {
  color:#c3eaff!important;
 }
 html[data-reguspace-theme="dark"] body.regu-imported-article .science-collapse:hover,
 html[data-reguspace-theme="dark"] body.regu-imported-article .science-collapse:focus-visible {
  color:#ffffff!important;text-underline-offset:3px;
 }
}
/* Neurodiversiteit: tone down three exceptionally pale neutral reading cards.
   Backgrounds ONLY: leave the original legible dark headings, links, and
   semantic typography intact; avoid a blanket inversion of graphic tiles. */
@media screen {
 html[data-reguspace-theme="dark"] body .nd-module .route-card {background:#c9dce5!important;}
 html[data-reguspace-theme="dark"] body .nd-module .effort {background:#d9cad3!important;}
 html[data-reguspace-theme="dark"] body .nd-module .triad .tri {background:#d2e0e7!important;}
 html[data-reguspace-theme="dark"] body .nd-module .tips-grid .tip {background:#cfdee6!important;}
}
@media screen {
 /* After dimming these three cards, recheck their small body labels. */
 html[data-reguspace-theme="dark"] body .nd-module .triad .tri p,
 html[data-reguspace-theme="dark"] body .nd-module .tips-grid .tip :is(li,.tip-note) {
  color:#29485b!important;
 }
}
@media screen {
 /* Same neutral future-feature badge as Personal Hub, now also in Social. */
 html[data-reguspace-theme="dark"] body #socialHubScreen .development-badge {color:#536071!important;}
}
