/* Dark theme (5 Nov 2026), owner's request: the whole site in the deep plum look the "Screenings and interviews"
   section had. Active when theme.js sets <html data-theme="dark">; the light theme is the default and lives in
   site.css. This file is the last cascade layer, so short selectors here beat the older, very specific ones below.
   Order of the file: tokens, page and section backgrounds, text, cards, controls, then page by page. */
@layer tokens, core, pagebase, pages, fixes, theme, dark;

@layer dark {
  [data-theme="dark"]{
    color-scheme:dark;
    --d-bg:#1d1a24;--d-deep:#17141c;--d-raised:#25212d;
    --d-text:#f7f1f4;--d-body:#ddd4db;--d-muted:#bcb1bb;--d-link:#f3b0c5;--d-tag:#ecbca7;
    --d-surface:rgba(255,255,255,.05);--d-surface-2:rgba(255,255,255,.09);--d-line:rgba(255,255,255,.14);--d-line-2:rgba(255,255,255,.24);
    --d-shadow:0 26px 60px -34px rgba(0,0,0,.75);
    --d-mesh:radial-gradient(40% 55% at 86% 8%,rgba(222,111,147,.34) 0,transparent 70%),radial-gradient(36% 52% at 4% 100%,rgba(84,156,144,.28) 0,transparent 70%),
      radial-gradient(30% 40% at 55% 45%,rgba(236,143,111,.12) 0,transparent 70%);

    /* Shared tokens switch over, so everything built on them follows. */
    --c-ink:var(--d-text);--c-ink-soft:#e6dce3;--c-muted:var(--d-muted);--c-paper:var(--d-bg);--c-white:var(--d-raised);--c-plum:#120f17;
    --c-accent:#e27fa1;--c-accent-ink:var(--d-link);--c-line:var(--d-line);--c-glass:var(--d-surface);--c-glass-line:var(--d-line);
    --shadow-card:var(--d-shadow);--shadow-pop:0 18px 40px -18px rgba(0,0,0,.8);
    --au-ink:var(--d-text);--au-paper:var(--d-bg);--au-glass-line:var(--d-line);--au-shadow:var(--d-shadow);
    /* The drifting section glows become coloured light on plum. */
    --glow-peach:rgba(236,143,111,.3);--glow-rose:rgba(222,111,147,.36);--glow-lilac:rgba(157,122,208,.36);
    --glow-mint:rgba(84,156,144,.32);--glow-butter:rgba(206,160,84,.24);--glow-sky:rgba(96,140,210,.3)}

  [data-theme="dark"] .theme-light-only{display:none}
  [data-theme="dark"] .theme-dark-only{display:block}

  /* ---------- Backgrounds ---------- */
  [data-theme="dark"] body{background:var(--d-bg);color:var(--d-body)}
  [data-theme="dark"] :is(.start-section,.intro-section,.learning-section,.opportunities-section,.matching-section,.about-section,.faq-section,
    .prep-section,.biz-intro,.biz-services,.biz-process,.biz-contact,.fc-case,.fc-resources,.fc-builder){background:var(--d-bg);color:var(--d-body)}
  [data-theme="dark"] .closing{--g1:rgba(222,111,147,.4);--g2:rgba(157,122,208,.4);background:linear-gradient(120deg,#2b1f2c 0%,#261f31 50%,#1f1d2e 100%)}
  [data-theme="dark"] .atmosphere-hero:before{background:radial-gradient(42% 58% at 76% 38%,rgba(236,143,111,.3) 0,transparent 70%),
    radial-gradient(36% 48% at 98% 92%,rgba(157,122,208,.34) 0,transparent 70%),radial-gradient(40% 52% at 4% 100%,rgba(84,156,144,.3) 0,transparent 70%),
    radial-gradient(30% 38% at 40% 0,rgba(206,160,84,.2) 0,transparent 70%),var(--d-bg)}
  [data-theme="dark"] :is(.interlude,.interlude:before){background:radial-gradient(42% 58% at 74% 46%,rgba(236,143,111,.26) 0,transparent 70%),
    radial-gradient(38% 58% at 10% 20%,rgba(84,156,144,.26) 0,transparent 70%),radial-gradient(30% 40% at 40% 100%,rgba(157,122,208,.3) 0,transparent 70%),#211d29}
  [data-theme="dark"] :is(.fc-invite,.business-invitation,.business-hero){background:var(--d-mesh),#211c28}
  [data-theme="dark"] .guide-body{background:radial-gradient(34% 40% at 92% 12%,rgba(222,111,147,.2) 0,transparent 70%),
    radial-gradient(30% 40% at 4% 70%,rgba(84,156,144,.18) 0,transparent 70%),radial-gradient(28% 34% at 70% 96%,rgba(157,122,208,.2) 0,transparent 70%),var(--d-bg);background-attachment:fixed}
  [data-theme="dark"] .prep-section::after{opacity:.8}

  /* ---------- Text ---------- */
  [data-theme="dark"] :is(h1,h2,h3,h4,h5,h6){color:var(--d-text)}
  [data-theme="dark"] :is(p,li,dd,dt,td,th,summary,label,figcaption,blockquote,legend){color:var(--d-body)}
  [data-theme="dark"] :is(h1,h2,h3) em{color:#f2b49c}
  [data-theme="dark"] :is(.section-tag,.section-tag.light-tag,.eyebrow,.learn-overline,.guide-label,.biz-eyebrow,.biz-section-label,.interlude-overline,.fc-eyebrow,
    .business-kicker,.platform-category,.tiny-label,.route-when,.ot-result-label,.guide-time,.prep-card .guide-time){color:var(--d-tag)}
  [data-theme="dark"] .section-head>p,[data-theme="dark"] .section-head-light>p{color:var(--d-muted)}
  [data-theme="dark"] :is(small,.learn-more-link,.contact-fallback-lead,.contact-fallback-steps li,.contact-fallback-note){color:var(--d-muted)}
  [data-theme="dark"] main a:not([class]),[data-theme="dark"] .learn-more-link a{color:var(--d-link)}
  [data-theme="dark"] :is(strong,b){color:inherit}
  [data-theme="dark"] code{background:rgba(255,255,255,.08);color:#f6dbe5}

  /* ---------- Cards: dark glass, each keeps a hint of its own colour ---------- */
  [data-theme="dark"] :is(.start-step,.learn-tile,.platform-card,.form-panel,.biz-service-card,.biz-process-step,.biz-form,.practice-box,.prep-card,
    .route-step,.ot-card,.guide-end,.guide-panel,.biz-contact-fallback,.faq-stack details){
    background-color:var(--d-surface);border-color:var(--d-line);box-shadow:var(--d-shadow);color:var(--d-body)}
  [data-theme="dark"] :is(.start-side .start-step:nth-child(1),.learn-tile:nth-child(2),.platform-card:nth-child(4n+2),.prep-purple){background-color:rgba(222,111,147,.08)}
  [data-theme="dark"] :is(.start-side .start-step:nth-child(2),.learn-tile:nth-child(1),.platform-card:nth-child(4n+3),.prep-blue){background-color:rgba(84,156,144,.08)}
  [data-theme="dark"] :is(.learn-tile:nth-child(3),.platform-card:nth-child(4n+4)){background-color:rgba(157,122,208,.09)}
  [data-theme="dark"] :is(.platform-card:nth-child(4n+1),.prep-mint){background-color:rgba(206,160,84,.07)}
  [data-theme="dark"] .prep-card:hover{border-color:var(--d-line-2)}
  [data-theme="dark"] .route-step::before{box-shadow:0 0 0 6px var(--d-bg)}
  [data-theme="dark"] .card-link{border-color:var(--d-line);color:var(--d-text)}
  [data-theme="dark"] .card-link b{color:#f0a9bf}
  [data-theme="dark"] .prep-footer{border-color:var(--d-line)}

  /* The original dark visuals of the interview cards. */
  [data-theme="dark"] .prep-purple .prep-visual{background:radial-gradient(circle at 55% 65%,#b97672,#503d47 49%,#2f303a)}
  [data-theme="dark"] .prep-blue .prep-visual{background:radial-gradient(circle at 45% 55%,#6a8c87,#304c4c 52%,#293a3b)}
  [data-theme="dark"] .prep-mint .prep-visual{background:radial-gradient(circle at 50% 59%,#a48a58,#554b36 50%,#31332d)}
  [data-theme="dark"] .test-score{color:#f5f1ff;text-shadow:0 18px 23px rgba(2,5,25,.4)}
  [data-theme="dark"] .test-score span{color:#c4bfff}
  [data-theme="dark"] .fake-rating span{background:#c4d7fe}
  [data-theme="dark"] .fake-rating span:last-child{background:#78809f}
  [data-theme="dark"] .prep-ring{border-color:#b2adff8f;box-shadow:0 0 30px #ac9afb38}
  [data-theme="dark"] .ring-b{border-color:#cdc6f85e}
  [data-theme="dark"] .expert-grid span{color:#aedbef70;border-color:#a7ebf545;background:#9cddff0a}
  [data-theme="dark"] .expert-center{color:#d5ffff;text-shadow:0 0 40px #88f1e188}
  [data-theme="dark"] .quality-block{background:#172e30d9;border-color:#c0ffe468;box-shadow:0 30px 40px #041c247a}
  [data-theme="dark"] .quality-block>span{color:#c2ffe1}
  [data-theme="dark"] .quality-block i{background:#a7f6ce66;border-color:#aef3de}
  [data-theme="dark"] .quality-block i:nth-child(2){background:#f4bfa485;border-color:#f4bfa4}
  [data-theme="dark"] .quality-block b{color:#fff}
  [data-theme="dark"] .quality-radar{border-color:#9ddcc44a;box-shadow:0 0 0 38px #a2dcc410,0 0 0 87px #a2dcc40a}

  /* Learning tile visuals: the same pastel shapes on deep tinted light. */
  [data-theme="dark"] .learn-tile.learn-feature{background-color:rgba(84,156,144,.08)}
  [data-theme="dark"] .learn-symbol-box{background:radial-gradient(circle at center,#56766a,#2d423d 52%,#252a2a)}
  [data-theme="dark"] .bounding{border-color:#f08a68}
  [data-theme="dark"] .learn-symbol-compare{background:radial-gradient(circle at center,#b97672,#503d47 49%,#2f303a)}
  [data-theme="dark"] .learn-symbol-compare i{border-color:#e5a99d;color:#fbeee9}
  [data-theme="dark"] .learn-symbol-compare b{color:#e5c6cf}
  [data-theme="dark"] .learn-symbol-cv{background:radial-gradient(circle at center,#7f6ca6,#3d3450 52%,#2a2733)}
  [data-theme="dark"] .cv-paper{background:#f4eef6;border-color:#cdbfdc;box-shadow:10px 15px 32px rgba(0,0,0,.45)}

  /* ---------- Homepage hero ---------- */
  [data-theme="dark"] .atmosphere-hero{color:var(--d-body)}
  [data-theme="dark"] .atmosphere-hero:after{background:linear-gradient(0deg,var(--d-bg),transparent)}
  [data-theme="dark"] .atmosphere-hero .atmosphere-type-one{color:var(--d-text);-webkit-text-stroke:0}
  [data-theme="dark"] .atmosphere-hero .atmosphere-copy h1 .atmosphere-type-two{color:#a99ea8;-webkit-text-stroke:0}
  [data-theme="dark"] .atmosphere-hero .atmosphere-copy h1 .atmosphere-type-two i{color:#f2b49c}
  [data-theme="dark"] .atmosphere-hero .atmosphere-type-three{color:#e99db4}
  [data-theme="dark"] .atmosphere-hero :is(.atmosphere-deck,.atmosphere-social-proof,.atmosphere-kicker,.atmosphere-topline,.atmosphere-floor,.hero-floor-left,.hero-down){color:var(--d-body);border-color:var(--d-line)}
  [data-theme="dark"] .atmosphere-hero :is(.visual-trigger,.motion-switch){color:var(--d-text);border-color:var(--d-line-2)}

  /* ---------- Controls ---------- */
  [data-theme="dark"] :is(.atmosphere-action-secondary,.interlude-link,.about-link,.biz-text-link,[id="fc-copy-query"],.visual-trigger,.motion-switch,
    .practice-actions button:not(.next-question),.filter-chip,.fc-filter,.upload-button,.ot-back,.lb-btn){background:var(--d-surface-2);border-color:var(--d-line-2);color:var(--d-text)}
  [data-theme="dark"] :is(.atmosphere-action-secondary,.interlude-link,.about-link,.biz-text-link,[id="fc-copy-query"],.visual-trigger,.motion-switch,
    .practice-actions button:not(.next-question),.ot-back,.lb-btn):hover{background:rgba(255,255,255,.16)}
  [data-theme="dark"] :is(.filter-chip.selected,.filter-chip[aria-pressed="true"],.fc-filter[aria-pressed="true"]){background:var(--au-grad);color:#fff;border-color:transparent}
  [data-theme="dark"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:rgba(255,255,255,.06);border-color:var(--d-line-2);color:var(--d-text)}
  [data-theme="dark"] ::placeholder{color:#9d929c}
  [data-theme="dark"] .upload-field{background:var(--d-surface);border-color:rgba(190,160,230,.45)}
  [data-theme="dark"] .upload-icon{background:linear-gradient(135deg,#4a2f3b,#3a2f4f)}
  [data-theme="dark"] .ot-choice{background:var(--d-surface);border-color:var(--d-line)}
  [data-theme="dark"] .ot-bar{background:rgba(255,255,255,.12)}
  [data-theme="dark"] .ot-result-note{background:var(--d-surface)}
  [data-theme="dark"] .gloss:hover,[data-theme="dark"] .gloss[aria-expanded="true"]{background:rgba(240,169,191,.14)}
  [data-theme="dark"] .gloss{border-bottom-color:#e27fa1}
  [data-theme="dark"] .gloss-pop{border:1px solid var(--d-line)}
  [data-theme="dark"] :is(.gloss,.route-link,.ot-choice,.ot-back,.ot-next,.prep-card,.learn-tile,.platform-card):focus-visible{outline-color:#f0a9bf}

  /* Small text that stayed grey or dark on the old light backgrounds. */
  [data-theme="dark"] :is(.guide-breadcrumb,.guide-breadcrumb span,.side-back,.footer-bottom span,.footer-bottom a,.practice-top span,.fc-small,.biz-process-step>div,.biz-service-icon){color:var(--d-muted)}
  [data-theme="dark"] :is(.practice-question,.practice-box p){color:var(--d-body)}
  [data-theme="dark"] :is(.fc-back-link,.fc-flowitem>i){color:var(--d-link)}
  [data-theme="dark"] :is(.start-statement-name,.learning-note>span,.fc-mark,.business-kicker-mark,.section-tag>span,.closing-inner>div>span){color:var(--d-tag)}
  [data-theme="dark"] :is(.atmosphere-hero,.simple-main){background:var(--d-bg)}
  [data-theme="dark"] .legal-attention{background:rgba(84,156,144,.12);color:var(--d-body)}
  [data-theme="dark"] .progress-meter{background:rgba(255,255,255,.12)}

  /* ---------- Business ---------- */
  [data-theme="dark"] .business-hero{background:#211c28}
  [data-theme="dark"] .business-hero:before{background:radial-gradient(circle at 83% 42%,rgba(222,111,147,.3) 0,transparent 42%),radial-gradient(circle at 10% 80%,rgba(84,156,144,.22) 0,transparent 54%)}
  [data-theme="dark"] .biz-service-grid{background:var(--d-line);border-color:var(--d-line)}
  [data-theme="dark"] .biz-service-card{background-color:#221e2a}

  /* ---------- Glossary ---------- */
  [data-theme="dark"] .gl-tools{background:var(--d-raised);border-color:var(--d-line)}
  [data-theme="dark"] .gl-cats button{background:var(--d-surface-2);border-color:var(--d-line);color:var(--d-body)}
  [data-theme="dark"] .gl-cat{background:var(--d-surface-2);color:var(--d-body)}
  [data-theme="dark"] .gl-say{background:rgba(222,111,147,.1)}
  [data-theme="dark"] .gl-say p{color:var(--d-text)}

  /* ---------- 3D lesson ---------- */
  [data-theme="dark"] .lb-scene-shell{background:#221e29}
  [data-theme="dark"] .lb-pin:not(.is-selected):not(.is-sub){background:var(--d-raised);color:var(--d-text);border-color:var(--d-line-2)}
  [data-theme="dark"] .lb-keep{background:rgba(206,160,84,.1)}
  [data-theme="dark"] .lb-tip{background:rgba(157,122,208,.13)}
  [data-theme="dark"] .lb-token{background:rgba(236,143,111,.12);border-color:rgba(236,143,111,.3)}
  [data-theme="dark"] .lb-token:nth-child(3n+2){background:rgba(84,156,144,.14);border-color:rgba(84,156,144,.36)}
  [data-theme="dark"] .lb-token:nth-child(3n){background:rgba(157,122,208,.14);border-color:rgba(157,122,208,.36)}
  [data-theme="dark"] .lb-inspector{background:var(--d-surface);border-color:var(--d-line)}
  [data-theme="dark"] .lb-bar{background:rgba(255,255,255,.1)}
  [data-theme="dark"] .lb-answer{background:var(--d-surface-2);border-color:var(--d-line)}
  [data-theme="dark"] .lb-answer:hover{border-color:var(--d-line-2)}
  [data-theme="dark"] .lb-answer.is-correct{background:rgba(79,154,128,.2);border-color:#6fbf9f}
  [data-theme="dark"] .lb-answer.is-wrong{background:rgba(192,80,58,.2);border-color:#e0806a}
  [data-theme="dark"] .lb-tip-close:hover{background:rgba(255,255,255,.1)}

  /* ---------- Fact checking guide ---------- */
  [data-theme="dark"] :is(.fc-flowitem,.fc-casecard,.fc-builderpanel){background:var(--d-surface);border-color:var(--d-line)}
  [data-theme="dark"] :is(.fc-opactions button,.fc-opactions a){background:var(--d-surface-2);border-color:var(--d-line-2);color:var(--d-text)}
  [data-theme="dark"] .fc-check-input{background:rgba(255,255,255,.06)}

  /* ---------- Guides ---------- */
  [data-theme="dark"] .guide-sidebar a{color:var(--d-muted)}
  [data-theme="dark"] .guide-sidebar a.active{color:var(--d-text)}
  @media(max-width:780px){
    [data-theme="dark"] .guide-sidebar{background:rgba(29,26,36,.9);border-bottom-color:var(--d-line)}
    [data-theme="dark"] .guide-sidebar a{background:var(--d-surface-2);border-color:var(--d-line);color:var(--d-text)}
    [data-theme="dark"] .guide-sidebar a.active{background:var(--au-grad);color:#fff}
  }
}
