/*
 * Digital Detox — contrast corrections.
 *
 * Loaded after site-modern.css. This layer repairs legacy colour rules that
 * were written for dark pages but now appear on the site's light presentation.
 * Keep the primary presentation layer in site-modern.css unchanged.
 */

body.site-modern{
  /* White button text now clears WCAG AA at normal text size. */
  --dd-blue:#2f68bf;
  --dd-blue-dark:#24558f;
}

/* Legacy landing pages now sit on a light body. Give their direct content a
   deliberate light-page palette instead of inheriting the old dark palette. */
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow p{
  color:#43516a;
}

body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow p.big,
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow strong,
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow em{
  color:#25344e;
}

body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow h1,
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow h2,
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow h3,
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow h4{
  color:#17233b;
}

body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap.narrow a:not(.btn),
body.site-modern .light a:not(.btn),
body.site-modern .article a:not(.btn){
  color:#174f84;
  text-decoration-color:#7fa3c7;
}

body.site-modern .light h3,
body.site-modern .light h4{
  color:#17233b;
}

body.site-modern main > section:not([class]) > .wrap.narrow,
body.site-modern .light,
body.site-modern .article{
  --golddeep:#6b5200;
  --muted:#5f6f87;
}

body.site-modern .article em{color:inherit}

/* site-modern.css turns legacy cards white. Their h4 headings also need the
   matching light-card palette. */
body.site-modern:not(.theme-dark) .card h4{color:#17233b}
body.site-modern:not(.theme-dark) .card p{color:#5f6f87}
body.site-modern:not(.theme-dark) .band .card p{color:#5f6f87!important}
body.site-modern .band a:not(.btn){color:#ffe36e}

/* These panels intentionally stay dark inside otherwise light articles. */
body.site-modern .article .evidence-limit h2,
body.site-modern .article .evidence-limit h3,
body.site-modern .article .evidence-limit h4,
body.site-modern .article .evidence-limit strong,
body.site-modern .article .promise h2,
body.site-modern .article .promise h3,
body.site-modern .article .promise h4,
body.site-modern .article .promise strong,
body.site-modern .article .michael-method h2,
body.site-modern .article .michael-method h3,
body.site-modern .article .michael-method h4,
body.site-modern .article .michael-method strong{
  color:#fff;
}

body.site-modern .article .evidence-limit p,
body.site-modern .article .promise p,
body.site-modern .article .michael-method p{
  color:#e4ebf6;
}

body.site-modern .article .evidence-limit a,
body.site-modern .article .promise a,
body.site-modern .article .michael-method a{
  color:#ffe36e;
  text-decoration-color:#ffe36e;
}

/* Some reference pages use .promise outside .article. */
body.site-modern .promise h2,
body.site-modern .promise h3,
body.site-modern .promise h4,
body.site-modern .promise strong{color:#fff}
body.site-modern .promise p{color:#e4ebf6}
body.site-modern .promise a{color:#ffe36e;text-decoration-color:#ffe36e}

/* Personal-story and safety panels also retain their intended dark surface. */
body.site-modern .article .personal-note,
body.site-modern .article .michael-note,
body.site-modern .article .start-plan{
  color:#e4ebf6;
}

body.site-modern .article .personal-note p,
body.site-modern .article .michael-note p,
body.site-modern .article .start-plan p,
body.site-modern .article .start-plan li{
  color:#e4ebf6;
}

body.site-modern .article .personal-note strong,
body.site-modern .article .michael-note strong,
body.site-modern .article .start-plan strong{
  color:#fff;
}

body.site-modern .article .personal-note a,
body.site-modern .article .michael-note a,
body.site-modern .article .start-plan a,
body.site-modern .article .michael-note .book-link,
body.site-modern .article .michael-note .book-link em{
  color:#ffe36e;
  text-decoration-color:#ffe36e;
}

/* Small supporting copy still has to clear the normal-text threshold. */
body.site-modern .question-card p,
body.site-modern .resource-card p,
body.site-modern .card p,
body.site-modern .storyfoot p{
  font-size:1rem!important;
}

html body.site-modern.digital-detox-playbook .tool-option p{
  font-size:1rem!important;
}

html body.site-modern.digital-detox-playbook .tool-check{
  font-size:1rem!important;
}

body.site-modern main > section:not([class]) > .wrap.narrow > h1:first-child{
  font-size:clamp(2.25rem,4vw,3.5rem);
}

body.site-modern .calmpage h1{
  font-size:clamp(2.25rem,5vw,3.4rem)!important;
}

body.site-modern main > section:not([class]) > .wrap.narrow .smallprint,
body.site-modern .article .smallprint{color:#56657c!important}
body.site-modern .article figcaption,
body.site-modern .product-figure figcaption{color:#5b6a80}
body.site-modern .article.chapter .scene{color:#5b6a80!important}
body.site-modern.digital-detox-playbook .privacy-line{color:#5b6a80!important}
body.site-modern .article p > em{color:#5b6a80}

body.site-modern .bookgrid a:not(.btn){color:#174f84}
body.site-modern .bookgrid em{color:inherit}
body.site-modern .donate a:not(.btn){color:#174f84}
body.site-modern .boundary-card:not(.serious) a{color:#174f84}
body.site-modern:not(.theme-dark):not(.manifesto-live):not(.philosophy-live)
main > section:not([class]) > .wrap > p{color:#43516a}

/* freedom-now-web.css is intentionally loaded after this file on the
   playbook. Extra specificity keeps the audited colour correction intact. */
html body.site-modern.digital-detox-playbook .hero .privacy-line{
  color:#56657c!important;
}

/* Audio track buttons sit on the old navy player, even on otherwise light
   pages. The inactive labels were too dim to scan comfortably. */
body.site-modern #libplayer li:not(.active) .track-button,
body.site-modern #darkplayer li:not(.active) .track-button{
  color:#c4cee0;
}

/* Small homepage helper copy missed AA by a narrow margin. */
body.site-modern.home-minimal .section-intro,
body.site-modern.home-minimal .pathcard p{
  color:#53657d;
}

/* The philosophy article has one deliberate dark chapter. Restore its own
   palette after the global legacy stylesheet has loaded. */
body.site-modern.philosophy-live .philosophy-page .manifesto-section p{
  color:#28364e;
}

body.site-modern.philosophy-live .philosophy-page .manifesto-section strong,
body.site-modern.philosophy-live .philosophy-page .manifesto-section em{
  color:inherit;
}

body.site-modern.philosophy-live .philosophy-page .choice p{
  color:#d8e1ef;
}

body.site-modern.philosophy-live .philosophy-page .choice strong,
body.site-modern.philosophy-live .philosophy-page .choice em{
  color:#fff;
}

body.site-modern.philosophy-live .philosophy-page .article-header p{
  color:#c7d4e8;
}

body.site-modern.philosophy-live .philosophy-page .concept-list p,
body.site-modern.philosophy-live .philosophy-page .concept-list strong{
  color:#28364e;
}
