/* Dark-mode contrast fixes (loaded last). Light mode is untouched. */
:is(html[data-theme="dark"], body.theme-dark) .cosy-podcast-box,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card{background:#1f2a23;border-color:rgba(255,255,255,.14);color:#e8f0e9}
:is(html[data-theme="dark"], body.theme-dark) .podcast-box-title,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card-title,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card-title a{color:#f1f5f2}
:is(html[data-theme="dark"], body.theme-dark) .podcast-box-dek,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card-dek,
:is(html[data-theme="dark"], body.theme-dark) .podcast-box-show{color:#b9c6bd}
:is(html[data-theme="dark"], body.theme-dark) .podcast-ep-badge,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card-ep-num,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card-btn,
:is(html[data-theme="dark"], body.theme-dark) .podcast-action-link{color:#5eead4}
:is(html[data-theme="dark"], body.theme-dark) .lang-switcher-active{background:#2dd4bf;color:#06201c}
:is(html[data-theme="dark"], body.theme-dark) .flipbook-indicator,
:is(html[data-theme="dark"], body.theme-dark) .folio-num,
:is(html[data-theme="dark"], body.theme-dark) .folio-desk-stamp{color:#b9c6bd}
:is(html[data-theme="dark"], body.theme-dark) .lang-word,
:is(html[data-theme="dark"], body.theme-dark) .phrase-pattern,
:is(html[data-theme="dark"], body.theme-dark) .featured-dek,
:is(html[data-theme="dark"], body.theme-dark) .back-home-link,
:is(html[data-theme="dark"], body.theme-dark) .ns-kicker,
:is(html[data-theme="dark"], body.theme-dark) .ns-issue-tag,
:is(html[data-theme="dark"], body.theme-dark) .ns-meta{color:#9fd3aa}
:is(html[data-theme="dark"], body.theme-dark) .instead-badge,
:is(html[data-theme="dark"], body.theme-dark) .try-badge{filter:brightness(1.35)}

/* Both modes: solid badges/buttons with white text need a darker fill */
.try-badge{background:#0f766e !important;color:#fff !important}
.instead-badge{background:#be123c !important;color:#fff !important}
.podcast-card-btn[title="Listen on Spotify"],.podcast-action-link[href*="spotify"]{background:#15803d !important;color:#fff !important}
.podcast-btn-script,.podcast-card-ep-num{color:#0f6e66 !important}
.october-autumn-badge{color:#92400e !important}
.gazette-marginalia-title{color:#0f6e66 !important}
.gazette-quote cite,blockquote cite{color:#4b5563}
:is(html[data-theme="dark"], body.theme-dark) .podcast-btn-script,
:is(html[data-theme="dark"], body.theme-dark) .podcast-card-ep-num,
:is(html[data-theme="dark"], body.theme-dark) .gazette-marginalia-title{color:#5eead4 !important}
:is(html[data-theme="dark"], body.theme-dark) .october-autumn-badge{color:#fbbf24 !important}
:is(html[data-theme="dark"], body.theme-dark) .gazette-quote cite,:is(html[data-theme="dark"], body.theme-dark) blockquote cite{color:#b9c6bd}
:is(html[data-theme="dark"], body.theme-dark) .podcast-action-link:not([href*="spotify"]){color:#5eead4}
a[style*="1db954"],a[href*="spotify"].podcast-action-link,a[href*="spotify"].podcast-card-btn{background:#15803d !important;color:#fff !important}
.editorial-heading,.instead-try-header{color:#4b5563}
:is(html[data-theme="dark"], body.theme-dark) .editorial-heading,:is(html[data-theme="dark"], body.theme-dark) .instead-try-header,
:is(html[data-theme="dark"], body.theme-dark) .folio-total,:is(html[data-theme="dark"], body.theme-dark) .featured-dek{color:#b9c6bd}
.gazette-quote cite,cite{color:#4b5563}
:is(html[data-theme="dark"], body.theme-dark) cite{color:#b9c6bd}
/* Final pass (specificity-proof) */
.gazette-mode-link,.dog-ear-label,.lang-switcher-label,.editorial-heading,.instead-try-header,cite,.podcast-card-ep-num{color:#0f5f58 !important}
.lang-switcher-active{background:#0f766e !important;color:#fff !important}
.dog-ear-label{color:#374151 !important}
.lang-switcher-label,.editorial-heading,.instead-try-header,cite{color:#374151 !important}
:is(html[data-theme="dark"], body.theme-dark) .gazette-mode-link,:is(html[data-theme="dark"], body.theme-dark) .dog-ear-label,
:is(html[data-theme="dark"], body.theme-dark) .podcast-ep-badge,:is(html[data-theme="dark"], body.theme-dark) .podcast-show-name,
:is(html[data-theme="dark"], body.theme-dark) .lang-switcher-label,:is(html[data-theme="dark"], body.theme-dark) .editorial-heading,
:is(html[data-theme="dark"], body.theme-dark) .instead-try-header,:is(html[data-theme="dark"], body.theme-dark) cite,
:is(html[data-theme="dark"], body.theme-dark) .featured-dek,:is(html[data-theme="dark"], body.theme-dark) .podcast-card-ep-num{color:#c9d6cd !important}
:is(html[data-theme="dark"], body.theme-dark) .lang-switcher-active{background:#2dd4bf !important;color:#06201c !important}
.editorial-kicker,.podcast-ep-badge,.podcast-action-link,.read-more-link,.gazette-back-link{color:#0f5f58 !important}
.podcast-action-link[href*="spotify"]{color:#fff !important}
:is(html[data-theme="dark"], body.theme-dark) .editorial-kicker,:is(html[data-theme="dark"], body.theme-dark) .podcast-ep-badge,
:is(html[data-theme="dark"], body.theme-dark) .read-more-link,:is(html[data-theme="dark"], body.theme-dark) .gazette-back-link,
:is(html[data-theme="dark"], body.theme-dark) .podcast-action-link:not([href*="spotify"]){color:#7ff0dd !important}
:is(html[data-theme="dark"], body.theme-dark) .podcast-ep-badge{background:rgba(94,234,212,.14) !important}
a[href*="podcasts.apple"],a[href*="apple.com/"].podcast-action-link,a[href*="apple.com/"].podcast-card-btn{background:#7e22ce !important;color:#fff !important}
.podcast-ep-badge{background:#e6f4f1 !important;color:#0f4f49 !important}

/* ---------------------------------------------------------------------------
   Night paper: the issue pages keep their light paper in light mode, but the
   ink tokens already flip in dark mode. Without flipping the paper too, body
   copy lands as cream-on-cream (1.15:1). Remap every paper variable at once.
   --------------------------------------------------------------------------- */
:is(html[data-theme="dark"], body.theme-dark) .gazette-body,
:is(html[data-theme="dark"], body.theme-dark) .gazette-wrapper,
:is(html[data-theme="dark"], body.theme-dark) .gazette-container,
:is(html[data-theme="dark"], body.theme-dark) .flipbook-page,
:is(html[data-theme="dark"], body.theme-dark) .page-body,
:is(html[data-theme="dark"], body.theme-dark) .gazette-reading-view,
:is(html[data-theme="dark"], body.theme-dark) .post-full-content,
:is(html[data-theme="dark"], body.theme-dark) .printable-reference-card,
:is(html[data-theme="dark"], body.theme-dark) .reading-article {
  --post-palette-bg: #1f2621;
  --gazette-paper-bg: #1f2621;
  --blog-paper-light: #1f2621;
  --blog-paper-card: #262e28;
  --paper: #1f2621;
  background-color: #1f2621;
  --page-ink: #ece7dc;
  --page-ink-soft: #b9afa3;
  color: #ece7dc;
}

/* Inks that are fine on paper but vanish on the night paper */
:is(html[data-theme="dark"], body.theme-dark) .flow-step-bad,
:is(html[data-theme="dark"], body.theme-dark) .mc-wrong .mc-sentence,
:is(html[data-theme="dark"], body.theme-dark) .ns-card[data-issue="sat"] { color: #fb7185; }
:is(html[data-theme="dark"], body.theme-dark) .cat-edition-head,
:is(html[data-theme="dark"], body.theme-dark) .domain-head,
:is(html[data-theme="dark"], body.theme-dark) .domain-head * { color: var(--cosy-color-ink, #ece7dc); }
:is(html[data-theme="dark"], body.theme-dark) .mc-se { color: #fca5a5; }
:is(html[data-theme="dark"], body.theme-dark) .art-meta .tag-mod { color: #fbbf24; }

/* Paper-tinted chips that carried light-mode accent ink */
:is(html[data-theme="dark"], body.theme-dark) .vtag.is-everyday,
:is(html[data-theme="dark"], body.theme-dark) .vtag.is-work,
:is(html[data-theme="dark"], body.theme-dark) .vtag.is-formal { background: rgba(255, 255, 255, 0.08); }

/* Card heads and highlight blocks that keep light-mode ink on the night paper */
:is(html[data-theme="dark"], body.theme-dark) .lex-card { --card-ink: #dbe4de; color: #dbe4de; }
:is(html[data-theme="dark"], body.theme-dark) .lex-card *:not(a) { color: inherit; }
:is(html[data-theme="dark"], body.theme-dark) .mc-compare .mc-side.mc-right p.mc-se,
:is(html[data-theme="dark"], body.theme-dark) p.mc-se { color: #fca5a5 !important; }
:is(html[data-theme="dark"], body.theme-dark) .art-meta .art-tags .tag-mod,
:is(html[data-theme="dark"], body.theme-dark) .art-tags .tag-mod { background: #3a2f16; color: #fbbf24; }
:is(html[data-theme="dark"], body.theme-dark) .gazette-drop-cap span.h,
:is(html[data-theme="dark"], body.theme-dark) .marginalia-body {
  background: #1d4ed8; color: #dbeafe;
}

:root { --teal-ink: #5A7A5F; }
:is(html[data-theme="dark"], body.theme-dark) { --teal-ink: #8DB695; }

/* Sage is used both as ink and as a button fill. On the night paper the ink
   must lift, but any fill that carries white text must stay deep. */
:is(html[data-theme="dark"], body.theme-dark) .button,
:is(html[data-theme="dark"], body.theme-dark) a.button,
:is(html[data-theme="dark"], body.theme-dark) .cta-button,
:is(html[data-theme="dark"], body.theme-dark) .lex-card a[style*="--teal"] {
  background: #3f6b4b !important;
  color: #ffffff !important;
}

/* Solid accent badges: one place, all issues */
.august-banner-badge { background: #b45309 !important; color: #fff !important; }
.september-banner-badge { background: #0f766e !important; color: #fff !important; }
.october-banner-badge { background: #1d4ed8 !important; color: #fff !important; }
.november-banner-badge { background: #0369a1 !important; color: #fff !important; }

/* Night-paper leftovers: later sheets re-declare these, so pin them. */
:is(html[data-theme="dark"], body.theme-dark) body[data-issue] p.mc-se,
:is(html[data-theme="dark"], body.theme-dark) article.mc p.mc-se { color: #fca5a5 !important; }
:is(html[data-theme="dark"], body.theme-dark) p.gazette-drop-cap > span.h,
:is(html[data-theme="dark"], body.theme-dark) .gazette-drop-cap span.h { background: #1d4ed8 !important; color: #dbeafe !important; }
:is(html[data-theme="dark"], body.theme-dark) .art-meta .art-tags span.tag-mod { background: #3a2f16 !important; color: #fbbf24 !important; }

/* Inline light "paper" boxes pasted into the copy stay cream in dark mode,
   while the ink inside them flips: force the box onto the night paper. */
:is(html[data-theme="dark"], body.theme-dark) [style*="#faf7f2"],
:is(html[data-theme="dark"], body.theme-dark) [style*="#fffdf8"],
:is(html[data-theme="dark"], body.theme-dark) [style*="#fffef8"],
:is(html[data-theme="dark"], body.theme-dark) [style*="#faf7f2e"],
:is(html[data-theme="dark"], body.theme-dark) [style*="rgb(250, 247, 242)"] { background: #262e28 !important; }

:is(html[data-theme="dark"], body.theme-dark) body[data-issue] .mc-right .mc-sentence,
:is(html[data-theme="dark"], body.theme-dark) .mc-side.mc-right .mc-sentence { color: #fca5a5 !important; }

:is(html[data-theme="dark"], body.theme-dark) .printable-reference-header button,
:is(html[data-theme="dark"], body.theme-dark) .printable-reference-card button {
  background: #0f766e !important; color: #ffffff !important;
}
.printable-reference-header button,
.printable-reference-card button { background: #0f766e !important; color: #ffffff !important; }

/* Pastel call-out boxes pasted inline keep light ink that fails on the box */
:is(html[data-theme="dark"], body.theme-dark) [style*="#f0f9ff"] {
  background: #16232B !important; color: #E8F0E9 !important;
}
:is(html[data-theme="dark"], body.theme-dark) [style*="#ecfdf5"],
:is(html[data-theme="dark"], body.theme-dark) [style*="#f0fdf4"] {
  background: #15241B !important; color: #E8F0E9 !important;
}
:is(html[data-theme="dark"], body.theme-dark) [style*="#eff6ff"] {
  background: #171F2B !important; color: #E8F0E9 !important;
}
:is(html[data-theme="dark"], body.theme-dark) [style*="#f0f9ff"] *,
:is(html[data-theme="dark"], body.theme-dark) [style*="#ecfdf5"] *,
:is(html[data-theme="dark"], body.theme-dark) [style*="#eff6ff"] *,
:is(html[data-theme="dark"], body.theme-dark) [style*="#f0fdf4"] * { color: #E8F0E9 !important; }
:is(html[data-theme="dark"], body.theme-dark) .page-body h3[style*="0284c7"] { color: #7DD3FC !important; }
:is(html[data-theme="dark"], body.theme-dark) .page-body h3[style*="059669"] { color: #6EE7B7 !important; }
:is(html[data-theme="dark"], body.theme-dark) .stage-container,
:is(html[data-theme="dark"], body.theme-dark) .gazette-stage { background: #0f766e; }
:is(html[data-theme="dark"], body.theme-dark) .podcast-box-header .podcast-ep-badge { color: #04231f !important; background: #5eead4 !important; }

/* Remaining light-mode inks that never got a night value */
:is(html[data-theme="dark"], body.theme-dark) .cat-article-meta { color: #A9C7AF; }
:is(html[data-theme="dark"], body.theme-dark) .gazette-marginalia-title { color: #FCD34D; }

/* Last stragglers: page-scoped rules outrank the generic dark palette */
:is(html[data-theme="dark"], body.theme-dark) .ns-kicker,
:is(html[data-theme="dark"], body.theme-dark) .ns-issue-tag,
:is(html[data-theme="dark"], body.theme-dark) .cat-issue-tag,
:is(html[data-theme="dark"], body.theme-dark) .cat-issue-tag * { color: #FDBA74 !important; }
:is(html[data-theme="dark"], body.theme-dark) .podcast-action-link,
:is(html[data-theme="dark"], body.theme-dark) a.podcast-action { background: #0f6b35 !important; color: #fff !important; }
:is(html[data-theme="dark"], body.theme-dark) h3[style*="0284c7"],
:is(html[data-theme="dark"], body.theme-dark) h3[style*="059669"] { color: #1f2a24 !important; }

/* Stage/reading previews kept cream ink on cream and teal on cream */
.reading-header .reading-kicker { color: #0f766e !important; }
.stage-launch-banner .stage-launch-btn,
.stage-launch-btn { background: #0f766e !important; color: #fff !important; }
:is(html[data-theme="dark"], body.theme-dark) .gazette-marginalia .marginalia-title,
:is(html[data-theme="dark"], body.theme-dark) aside.gazette-marginalia > *:first-child { color: #FCD34D !important; }
:is(html[data-theme="dark"], body.theme-dark) .tag-motif,
:is(html[data-theme="dark"], body.theme-dark) .tag-desk,
:is(html[data-theme="dark"], body.theme-dark) .tag-lang { background: #3a2f16 !important; color: #fbbf24 !important; }

/* Light mode: accent colours used as *text* on paper need one step darker */
.flow-step-good { color: #0f766e; }
.cosy-callout > strong,
.cosy-callout strong { color: #0f766e; }
.mc-more-label, .mc-turn-label { color: #15803d !important; }
.tag-motif { background: #fdf6e3; color: #8a5a00; }
:is(html[data-theme="dark"], body.theme-dark) .tag-motif { background: #3a2f16 !important; color: #fbbf24 !important; }
:is(html[data-theme="dark"], body.theme-dark) .flow-step-good { color: #5eead4; }
:is(html[data-theme="dark"], body.theme-dark) .cosy-callout > strong,
:is(html[data-theme="dark"], body.theme-dark) .cosy-callout strong { color: #7fd6cc; }
:is(html[data-theme="dark"], body.theme-dark) .mc-more-label,
:is(html[data-theme="dark"], body.theme-dark) .mc-turn-label { color: #86efac !important; }

/* Paper variable is only scoped to reading containers, so dev pages that
   paint the body from it fall back to the light value. */
:is(html[data-theme="dark"], body.theme-dark) { --gazette-paper-bg: #1f2621; }

/* Polaroid frames around figures: keep the metaphor, drop the glare. */
:is(html[data-theme="dark"], body.theme-dark) .post-full-content .page-body .gazette-figure-img,
:is(html[data-theme="dark"], body.theme-dark) .post-full-content .page-body .cosy-fig {
  background: #2A322B;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* Same corrections for visitors who follow the OS preference instead of
   the in-page toggle; without this the tokens flip but these overrides
   never load. */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .podcast-box-title,
html:not([data-theme="light"]) .podcast-card-title,
html:not([data-theme="light"]) .podcast-card-title a{color:#f1f5f2}
html:not([data-theme="light"]) .podcast-box-dek,
html:not([data-theme="light"]) .podcast-card-dek,
html:not([data-theme="light"]) .podcast-box-show{color:#b9c6bd}
html:not([data-theme="light"]) .podcast-ep-badge,
html:not([data-theme="light"]) .podcast-card-ep-num,
html:not([data-theme="light"]) .podcast-card-btn,
html:not([data-theme="light"]) .podcast-action-link{color:#5eead4}
html:not([data-theme="light"]) .lang-switcher-active{background:#2dd4bf;color:#06201c}
html:not([data-theme="light"]) .flipbook-indicator,
html:not([data-theme="light"]) .folio-num,
html:not([data-theme="light"]) .folio-desk-stamp{color:#b9c6bd}
html:not([data-theme="light"]) .lang-word,
html:not([data-theme="light"]) .phrase-pattern,
html:not([data-theme="light"]) .featured-dek,
html:not([data-theme="light"]) .back-home-link,
html:not([data-theme="light"]) .ns-kicker,
html:not([data-theme="light"]) .ns-issue-tag,
html:not([data-theme="light"]) .ns-meta{color:#9fd3aa}
html:not([data-theme="light"]) .instead-badge,
html:not([data-theme="light"]) .try-badge{filter:brightness(1.35)}
html:not([data-theme="light"]) .podcast-btn-script,
html:not([data-theme="light"]) .podcast-card-ep-num,
html:not([data-theme="light"]) .gazette-marginalia-title{color:#5eead4 !important}
html:not([data-theme="light"]) .october-autumn-badge{color:#fbbf24 !important}
html:not([data-theme="light"]) .gazette-quote cite,html:not([data-theme="light"]) blockquote cite{color:#b9c6bd}
html:not([data-theme="light"]) .podcast-action-link:not([href*="spotify"]){color:#5eead4}
html:not([data-theme="light"]) .editorial-heading,html:not([data-theme="light"]) .instead-try-header,
html:not([data-theme="light"]) .folio-total,html:not([data-theme="light"]) .featured-dek{color:#b9c6bd}
html:not([data-theme="light"]) cite{color:#b9c6bd}
html:not([data-theme="light"]) .gazette-mode-link,html:not([data-theme="light"]) .dog-ear-label,
html:not([data-theme="light"]) .podcast-ep-badge,html:not([data-theme="light"]) .podcast-show-name,
html:not([data-theme="light"]) .lang-switcher-label,html:not([data-theme="light"]) .editorial-heading,
html:not([data-theme="light"]) .instead-try-header,html:not([data-theme="light"]) cite,
html:not([data-theme="light"]) .featured-dek,html:not([data-theme="light"]) .podcast-card-ep-num{color:#c9d6cd !important}
html:not([data-theme="light"]) .lang-switcher-active{background:#2dd4bf !important;color:#06201c !important}
html:not([data-theme="light"]) .editorial-kicker,html:not([data-theme="light"]) .podcast-ep-badge,
html:not([data-theme="light"]) .read-more-link,html:not([data-theme="light"]) .gazette-back-link,
html:not([data-theme="light"]) .podcast-action-link:not([href*="spotify"]){color:#7ff0dd !important}
html:not([data-theme="light"]) .podcast-ep-badge{background:rgba(94,234,212,.14) !important}
html:not([data-theme="light"]) .cat-edition-head,
html:not([data-theme="light"]) .domain-head,
html:not([data-theme="light"]) .domain-head *{ color: var(--cosy-color-ink, #ece7dc); }
html:not([data-theme="light"]) .mc-se{ color: #fca5a5; }
html:not([data-theme="light"]) .art-meta .tag-mod{ color: #fbbf24; }
html:not([data-theme="light"]) .lex-card *:not(a){ color: inherit; }
html:not([data-theme="light"]) .mc-compare .mc-side.mc-right p.mc-se,
html:not([data-theme="light"]) p.mc-se{ color: #fca5a5 !important; }
html:not([data-theme="light"]) .art-meta .art-tags .tag-mod,
html:not([data-theme="light"]) .art-tags .tag-mod{ background: #3a2f16; color: #fbbf24; }
html:not([data-theme="light"]) .gazette-drop-cap span.h,
html:not([data-theme="light"]) .marginalia-body{
  background: #1d4ed8; color: #dbeafe;
}
html:not([data-theme="light"]){ --teal-ink: #8DB695; }
html:not([data-theme="light"]) p.gazette-drop-cap > span.h,
html:not([data-theme="light"]) .gazette-drop-cap span.h{ background: #1d4ed8 !important; color: #dbeafe !important; }
html:not([data-theme="light"]) .art-meta .art-tags span.tag-mod{ background: #3a2f16 !important; color: #fbbf24 !important; }
html:not([data-theme="light"]) body[data-issue] .mc-right .mc-sentence,
html:not([data-theme="light"]) .mc-side.mc-right .mc-sentence{ color: #fca5a5 !important; }
html:not([data-theme="light"]) .printable-reference-header button,
html:not([data-theme="light"]) .printable-reference-card button{
  background: #0f766e !important; color: #ffffff !important;
}
html:not([data-theme="light"]) [style*="#ecfdf5"],
html:not([data-theme="light"]) [style*="#f0fdf4"]{
  background: #15241B !important; color: #E8F0E9 !important;
}
html:not([data-theme="light"]) [style*="#eff6ff"]{
  background: #171F2B !important; color: #E8F0E9 !important;
}
html:not([data-theme="light"]) [style*="#f0f9ff"] *,
html:not([data-theme="light"]) [style*="#ecfdf5"] *,
html:not([data-theme="light"]) [style*="#eff6ff"] *,
html:not([data-theme="light"]) [style*="#f0fdf4"] *{ color: #E8F0E9 !important; }
html:not([data-theme="light"]) .page-body h3[style*="0284c7"]{ color: #7DD3FC !important; }
html:not([data-theme="light"]) .page-body h3[style*="059669"]{ color: #6EE7B7 !important; }
html:not([data-theme="light"]) .stage-container,
html:not([data-theme="light"]) .gazette-stage{ background: #0f766e; }
html:not([data-theme="light"]) .podcast-box-header .podcast-ep-badge{ color: #04231f !important; background: #5eead4 !important; }
html:not([data-theme="light"]) .gazette-marginalia-title{ color: #FCD34D; }
html:not([data-theme="light"]) .podcast-action-link,
html:not([data-theme="light"]) a.podcast-action{ background: #0f6b35 !important; color: #fff !important; }
html:not([data-theme="light"]) h3[style*="0284c7"],
html:not([data-theme="light"]) h3[style*="059669"]{ color: #1f2a24 !important; }
html:not([data-theme="light"]) .gazette-marginalia .marginalia-title,
html:not([data-theme="light"]) aside.gazette-marginalia > *:first-child{ color: #FCD34D !important; }
html:not([data-theme="light"]) .tag-motif,
html:not([data-theme="light"]) .tag-desk,
html:not([data-theme="light"]) .tag-lang{ background: #3a2f16 !important; color: #fbbf24 !important; }
html:not([data-theme="light"]) .tag-motif{ background: #3a2f16 !important; color: #fbbf24 !important; }
html:not([data-theme="light"]) .flow-step-good{ color: #5eead4; }
html:not([data-theme="light"]) .cosy-callout > strong,
html:not([data-theme="light"]) .cosy-callout strong{ color: #7fd6cc; }
html:not([data-theme="light"]) .mc-more-label,
html:not([data-theme="light"]) .mc-turn-label{ color: #86efac !important; }
}

/* Same corrections for visitors who follow the OS preference instead of
   the in-page toggle; without this the tokens flip but these overrides
   never load. */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .cosy-podcast-box,
html:not([data-theme="light"]) .podcast-card{background:#1f2a23;border-color:rgba(255,255,255,.14);color:#e8f0e9}
html:not([data-theme="light"]) .podcast-box-title,
html:not([data-theme="light"]) .podcast-card-title,
html:not([data-theme="light"]) .podcast-card-title a{color:#f1f5f2}
html:not([data-theme="light"]) .podcast-box-dek,
html:not([data-theme="light"]) .podcast-card-dek,
html:not([data-theme="light"]) .podcast-box-show{color:#b9c6bd}
html:not([data-theme="light"]) .podcast-ep-badge,
html:not([data-theme="light"]) .podcast-card-ep-num,
html:not([data-theme="light"]) .podcast-card-btn,
html:not([data-theme="light"]) .podcast-action-link{color:#5eead4}
html:not([data-theme="light"]) .lang-switcher-active{background:#2dd4bf;color:#06201c}
html:not([data-theme="light"]) .flipbook-indicator,
html:not([data-theme="light"]) .folio-num,
html:not([data-theme="light"]) .folio-desk-stamp{color:#b9c6bd}
html:not([data-theme="light"]) .lang-word,
html:not([data-theme="light"]) .phrase-pattern,
html:not([data-theme="light"]) .featured-dek,
html:not([data-theme="light"]) .back-home-link,
html:not([data-theme="light"]) .ns-kicker,
html:not([data-theme="light"]) .ns-issue-tag,
html:not([data-theme="light"]) .ns-meta{color:#9fd3aa}
html:not([data-theme="light"]) .instead-badge,
html:not([data-theme="light"]) .try-badge{filter:brightness(1.35)}
html:not([data-theme="light"]) .podcast-btn-script,
html:not([data-theme="light"]) .podcast-card-ep-num,
html:not([data-theme="light"]) .gazette-marginalia-title{color:#5eead4 !important}
html:not([data-theme="light"]) .october-autumn-badge{color:#fbbf24 !important}
html:not([data-theme="light"]) .gazette-quote cite,html:not([data-theme="light"]) blockquote cite{color:#b9c6bd}
html:not([data-theme="light"]) .podcast-action-link:not([href*="spotify"]){color:#5eead4}
html:not([data-theme="light"]) .editorial-heading,html:not([data-theme="light"]) .instead-try-header,
html:not([data-theme="light"]) .folio-total,html:not([data-theme="light"]) .featured-dek{color:#b9c6bd}
html:not([data-theme="light"]) cite{color:#b9c6bd}
html:not([data-theme="light"]) .gazette-mode-link,html:not([data-theme="light"]) .dog-ear-label,
html:not([data-theme="light"]) .podcast-ep-badge,html:not([data-theme="light"]) .podcast-show-name,
html:not([data-theme="light"]) .lang-switcher-label,html:not([data-theme="light"]) .editorial-heading,
html:not([data-theme="light"]) .instead-try-header,html:not([data-theme="light"]) cite,
html:not([data-theme="light"]) .featured-dek,html:not([data-theme="light"]) .podcast-card-ep-num{color:#c9d6cd !important}
html:not([data-theme="light"]) .lang-switcher-active{background:#2dd4bf !important;color:#06201c !important}
html:not([data-theme="light"]) .editorial-kicker,html:not([data-theme="light"]) .podcast-ep-badge,
html:not([data-theme="light"]) .read-more-link,html:not([data-theme="light"]) .gazette-back-link,
html:not([data-theme="light"]) .podcast-action-link:not([href*="spotify"]){color:#7ff0dd !important}
html:not([data-theme="light"]) .podcast-ep-badge{background:rgba(94,234,212,.14) !important}
html:not([data-theme="light"]) .gazette-body,
html:not([data-theme="light"]) .gazette-wrapper,
html:not([data-theme="light"]) .gazette-container,
html:not([data-theme="light"]) .flipbook-page,
html:not([data-theme="light"]) .page-body,
html:not([data-theme="light"]) .gazette-reading-view,
html:not([data-theme="light"]) .post-full-content,
html:not([data-theme="light"]) .printable-reference-card,
html:not([data-theme="light"]) .reading-article{
  --post-palette-bg: #1f2621;
  --gazette-paper-bg: #1f2621;
  --blog-paper-light: #1f2621;
  --blog-paper-card: #262e28;
  --paper: #1f2621;
  background-color: #1f2621;
  --page-ink: #ece7dc;
  --page-ink-soft: #b9afa3;
  color: #ece7dc;
}
html:not([data-theme="light"]) .flow-step-bad,
html:not([data-theme="light"]) .mc-wrong .mc-sentence,
html:not([data-theme="light"]) .ns-card[data-issue="sat"]{ color: #fb7185; }
html:not([data-theme="light"]) .cat-edition-head,
html:not([data-theme="light"]) .domain-head,
html:not([data-theme="light"]) .domain-head *{ color: var(--cosy-color-ink, #ece7dc); }
html:not([data-theme="light"]) .mc-se{ color: #fca5a5; }
html:not([data-theme="light"]) .art-meta .tag-mod{ color: #fbbf24; }
html:not([data-theme="light"]) .vtag.is-everyday,
html:not([data-theme="light"]) .vtag.is-work,
html:not([data-theme="light"]) .vtag.is-formal{ background: rgba(255, 255, 255, 0.08); }
html:not([data-theme="light"]) .lex-card{ --card-ink: #dbe4de; color: #dbe4de; }
html:not([data-theme="light"]) .lex-card *:not(a){ color: inherit; }
html:not([data-theme="light"]) .mc-compare .mc-side.mc-right p.mc-se,
html:not([data-theme="light"]) p.mc-se{ color: #fca5a5 !important; }
html:not([data-theme="light"]) .art-meta .art-tags .tag-mod,
html:not([data-theme="light"]) .art-tags .tag-mod{ background: #3a2f16; color: #fbbf24; }
html:not([data-theme="light"]) .gazette-drop-cap span.h,
html:not([data-theme="light"]) .marginalia-body{
  background: #1d4ed8; color: #dbeafe;
}
html:not([data-theme="light"]){ --teal-ink: #8DB695; }
html:not([data-theme="light"]) .button,
html:not([data-theme="light"]) a.button,
html:not([data-theme="light"]) .cta-button,
html:not([data-theme="light"]) .lex-card a[style*="--teal"]{
  background: #3f6b4b !important;
  color: #ffffff !important;
}
html:not([data-theme="light"]) body[data-issue] p.mc-se,
html:not([data-theme="light"]) article.mc p.mc-se{ color: #fca5a5 !important; }
html:not([data-theme="light"]) p.gazette-drop-cap > span.h,
html:not([data-theme="light"]) .gazette-drop-cap span.h{ background: #1d4ed8 !important; color: #dbeafe !important; }
html:not([data-theme="light"]) .art-meta .art-tags span.tag-mod{ background: #3a2f16 !important; color: #fbbf24 !important; }
html:not([data-theme="light"]) [style*="#faf7f2"],
html:not([data-theme="light"]) [style*="#fffdf8"],
html:not([data-theme="light"]) [style*="#fffef8"],
html:not([data-theme="light"]) [style*="#faf7f2e"],
html:not([data-theme="light"]) [style*="rgb(250, 247, 242)"]{ background: #262e28 !important; }
html:not([data-theme="light"]) body[data-issue] .mc-right .mc-sentence,
html:not([data-theme="light"]) .mc-side.mc-right .mc-sentence{ color: #fca5a5 !important; }
html:not([data-theme="light"]) .printable-reference-header button,
html:not([data-theme="light"]) .printable-reference-card button{
  background: #0f766e !important; color: #ffffff !important;
}
html:not([data-theme="light"]) [style*="#f0f9ff"]{
  background: #16232B !important; color: #E8F0E9 !important;
}
html:not([data-theme="light"]) [style*="#ecfdf5"],
html:not([data-theme="light"]) [style*="#f0fdf4"]{
  background: #15241B !important; color: #E8F0E9 !important;
}
html:not([data-theme="light"]) [style*="#eff6ff"]{
  background: #171F2B !important; color: #E8F0E9 !important;
}
html:not([data-theme="light"]) [style*="#f0f9ff"] *,
html:not([data-theme="light"]) [style*="#ecfdf5"] *,
html:not([data-theme="light"]) [style*="#eff6ff"] *,
html:not([data-theme="light"]) [style*="#f0fdf4"] *{ color: #E8F0E9 !important; }
html:not([data-theme="light"]) .page-body h3[style*="0284c7"]{ color: #7DD3FC !important; }
html:not([data-theme="light"]) .page-body h3[style*="059669"]{ color: #6EE7B7 !important; }
html:not([data-theme="light"]) .stage-container,
html:not([data-theme="light"]) .gazette-stage{ background: #0f766e; }
html:not([data-theme="light"]) .podcast-box-header .podcast-ep-badge{ color: #04231f !important; background: #5eead4 !important; }
html:not([data-theme="light"]) .cat-article-meta{ color: #A9C7AF; }
html:not([data-theme="light"]) .gazette-marginalia-title{ color: #FCD34D; }
html:not([data-theme="light"]) .ns-kicker,
html:not([data-theme="light"]) .ns-issue-tag,
html:not([data-theme="light"]) .cat-issue-tag,
html:not([data-theme="light"]) .cat-issue-tag *{ color: #FDBA74 !important; }
html:not([data-theme="light"]) .podcast-action-link,
html:not([data-theme="light"]) a.podcast-action{ background: #0f6b35 !important; color: #fff !important; }
html:not([data-theme="light"]) h3[style*="0284c7"],
html:not([data-theme="light"]) h3[style*="059669"]{ color: #1f2a24 !important; }
html:not([data-theme="light"]) .gazette-marginalia .marginalia-title,
html:not([data-theme="light"]) aside.gazette-marginalia > *:first-child{ color: #FCD34D !important; }
html:not([data-theme="light"]) .tag-motif,
html:not([data-theme="light"]) .tag-desk,
html:not([data-theme="light"]) .tag-lang{ background: #3a2f16 !important; color: #fbbf24 !important; }
html:not([data-theme="light"]) .tag-motif{ background: #3a2f16 !important; color: #fbbf24 !important; }
html:not([data-theme="light"]) .flow-step-good{ color: #5eead4; }
html:not([data-theme="light"]) .cosy-callout > strong,
html:not([data-theme="light"]) .cosy-callout strong{ color: #7fd6cc; }
html:not([data-theme="light"]) .mc-more-label,
html:not([data-theme="light"]) .mc-turn-label{ color: #86efac !important; }
html:not([data-theme="light"]){ --gazette-paper-bg: #1f2621; }
html:not([data-theme="light"]) .post-full-content .page-body .gazette-figure-img,
html:not([data-theme="light"]) .post-full-content .page-body .cosy-fig{
  background: #2A322B;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
}
