/* TAMIYOUZ JOURNAL — ACTUAL FOREGROUND / BACKGROUND CONTRAST REPAIR 2026-10-24
 * Separately loaded after editorial V7. Scoped to real article surfaces and theme.
 * Corrects V5 high-specificity !important dark-on-dark intro bug, plus reader, navigation
 * and editorial contrast. Do not bleed into embedded calculators or AI workflow labs.
 *
 * Checked tokens, minimum contrast 4.5:1 normal and 3:1 larger UI/graphics.
 * Reduced opacity is not applied to text. Two color themes remain independent.
 */

/* Light paper theme — all colors are paired with their actual surface. */
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article,
html:not([data-tyz-theme="dark"]) body.tyz-premium-article-body #tyz-premium-article{
 --tyz-aa-ink:#233c52;
 --tyz-aa-text:#28465e;
 --tyz-aa-secondary:#395269;
 --tyz-aa-accent:#795022;
 --tyz-aa-paper:#fffdfa;
 --tyz-aa-quiet:#f0f4f8;
 --tyz-aa-border:rgba(30,65,90,.27);
 --tyz-aa-highlight:#edf3fa;
 --tyz-aa-intro-text:#f5f9ff;
 --tyz-aa-intro-eyebrow:#f4d4a2;
}
/* Dark midnight theme — do not reuse the light palette. */
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article{
 --tyz-aa-ink:#f0f6fc;
 --tyz-aa-text:#e1ecf8;
 --tyz-aa-secondary:#c3d4e6;
 --tyz-aa-accent:#f3cf96;
 --tyz-aa-paper:#12263d;
 --tyz-aa-quiet:#1a334c;
 --tyz-aa-border:rgba(204,225,245,.30);
 --tyz-aa-highlight:#24455f;
 --tyz-aa-intro-text:#f5f9ff;
 --tyz-aa-intro-eyebrow:#f4d4a2;
}
/* CRITICAL: V5 renders both intro themes on a navy background; V7 set dark ink in LIGHT mode.
   Fix the text on the actual dark gradient rather than assuming paper. */
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro{
 background:linear-gradient(122deg,#163b59 0%,#0b233b 100%)!important;
 border-color:rgba(242,204,145,.57)!important;
 color:#f5f9ff!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro>p,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro>p{
 color:#f5f9ff!important;
 text-shadow:none!important;
 font-weight:680!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro>span,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro>span,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro::after,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-article-intro::after{
 color:#f4d4a2!important;
 opacity:1!important;
}
/* Coherent high-contrast reading canvas, the dark and light background actually pairs with text. */
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose{
 background:var(--tyz-aa-paper)!important;
 color:var(--tyz-aa-ink)!important;
 border-color:var(--tyz-aa-border)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>p,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose> :is(ul,ol)>li,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>p,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose> :is(ul,ol)>li{
 color:var(--tyz-aa-text)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose> :is(h2,h3,h4),
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose> :is(h2,h3,h4){
 color:var(--tyz-aa-ink)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>p a,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>p a{
 color:var(--tyz-aa-accent)!important;
 text-decoration-color:currentColor!important;
 text-decoration-thickness:2px!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>blockquote,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>blockquote{
 background:var(--tyz-aa-quiet)!important;
 border-color:var(--tyz-aa-border)!important;
 border-inline-start:4px solid var(--tyz-aa-accent)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>blockquote p,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-prose>blockquote p{
 color:var(--tyz-aa-ink)!important;
}
/* Breadcrumbs, sticky sidebar, reader bar, inline next-story cards and metadata. */
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-v7-crumbs,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-v7-crumbs{
 background:var(--tyz-aa-paper)!important;
 border-color:var(--tyz-aa-border)!important;
 color:var(--tyz-aa-secondary)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-v7-crumbs a,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-v7-crumbs a{
 color:var(--tyz-aa-ink)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-v7-crumbs [aria-current="page"],
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-v7-crumbs [aria-current="page"]{
 color:var(--tyz-aa-secondary)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-aside__box,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-aside__box,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz24-toolbar,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz24-toolbar,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-editorial-endnote,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-editorial-endnote,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-related__card,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-related__card,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-related-resources__links>a,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-related-resources__links>a{
 background:var(--tyz-aa-paper)!important;
 border-color:var(--tyz-aa-border)!important;
 color:var(--tyz-aa-ink)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-aside__overline,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-aside__overline,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz24-toolbar .tyz24-label strong,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz24-toolbar .tyz24-label strong{
 color:var(--tyz-aa-ink)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-toc a,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-toc a{
 color:var(--tyz-aa-text)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-toc a:hover,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-toc a.is-active,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-toc a:hover,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-toc a.is-active{
 background:var(--tyz-aa-highlight)!important;
 border-color:var(--tyz-aa-border)!important;
 color:var(--tyz-aa-ink)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz24-remaining,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz24-remaining,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-editorial-endnote p,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-editorial-endnote p,
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-related__card p,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-related__card p{
 color:var(--tyz-aa-secondary)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-editorial-endnote__eyebrow,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-editorial-endnote__eyebrow{
 color:var(--tyz-aa-accent)!important;
}
/* Safeguard article action surfaces. Avoid touching nested tool/lab UI. */
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-hero__buttons .tyz-pa-start{
 background:#0b233b!important;color:#f5f9ff!important;border-color:#ba9567!important;
}
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-hero__buttons .tyz-pa-start{
 background:linear-gradient(135deg,#f1d5a4,#d8a768)!important;
 color:#172f47!important;border-color:#efcc9b!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-hero__buttons :is(.tyz-pa-back,.tyz-bd-hero-jump),
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article .tyz-pa-hero__buttons :is(.tyz-pa-back,.tyz-bd-hero-jump){
 color:var(--tyz-aa-ink)!important;
 background:var(--tyz-aa-paper)!important;
 border-color:var(--tyz-aa-border)!important;
}
html[data-tyz-theme="light"] body.tyz-premium-article-body #tyz-premium-article :is(.tyz-pa-toc,.tyz24-toolbar,.tyz-pa-related__card) :is(a,button):focus-visible,
html[data-tyz-theme="dark"] body.tyz-premium-article-body #tyz-premium-article :is(.tyz-pa-toc,.tyz24-toolbar,.tyz-pa-related__card) :is(a,button):focus-visible{
 outline:3px solid var(--tyz-aa-accent)!important;
 outline-offset:3px!important;
}
@media(prefers-contrast:more){
 #tyz-premium-article .tyz-pa-prose,
 #tyz-premium-article .tyz-pa-aside__box,
 #tyz-premium-article .tyz-pa-article-intro,
 #tyz-premium-article .tyz24-toolbar{
  border-width:2px!important;
 }
}
