/* Light/dark theme for every page except the homepage (saved choice: 'res-theme'). Hand-tuned rules;
   light-theme.css (generated by tools/light-theme.js) loads first and covers the rest. */
.art-top{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:34px}.art-top .back{margin-bottom:0!important}
.res-mode{display:inline-flex;align-items:center;gap:8px;flex:none}.res-mode span{margin-left:0;color:inherit;letter-spacing:inherit}.res-mode svg{width:14px;height:14px}
.res-mode .ic-moon,html.rlight .res-mode .ic-sun{display:none}html.rlight .res-mode .ic-moon{display:block}

html.rlight{--bk:#f4f1ea;--ink:#16181b;--blue:#2f5d7c;--mute:#5f676e;--gold:#9a6400;background:#f4f1ea}
html.rlight body{background:#f4f1ea;color:#16181b}
html.rlight nav{background:#f4f1eaf2;border-bottom-color:#0000001a}
html.rlight nav>b>a,html.rlight nav>ul>li>a,html.rlight #hs-cart-btn{color:#16181b}
html.rlight nav>ul>li>a:hover,html.rlight #hs-cart-btn:hover{color:#2f5d7c}
html.rlight nav ul a::after{background:#2f5d7c}
html.rlight .rf-t{border-color:#00000033;color:#16181b}html.rlight .rf-t:hover{border-color:#2f5d7c;color:#2f5d7c}

/* Text */
html.rlight p{color:#3a4046}
html.rlight .art p,html.rlight .art li{color:#2a2f34}
html.rlight .art a:not(.btn):not(.back),html.rlight .art a:not(.btn):not(.back):visited{text-decoration-color:#2f5d7c66}
html.rlight .art th,html.rlight .art td{color:#2a2f34;border-bottom-color:#0000001a}
html.rlight .art .ah-src{border-bottom-color:#0000001a}
html.rlight .disclaimer{border-top-color:#0000001a}

/* Boxes and panels */
html.rlight .statrow div,html.rlight .shopbox,html.rlight .fig{background:#fff;border-color:#0000001a;box-shadow:0 1px 2px #0000000a}
html.rlight .statrow div{color:#2a2f34}
html.rlight .shopbox img{background:#f4f1ea}
html.rlight .art-cover img{background:#e8e4da}
html.rlight .btn{background:#16181b;color:#fff}html.rlight .btn:hover{background:#2f5d7c;color:#fff}

/* Charts */
html.rlight .art .fig .fnote,html.rlight .br .l,html.rlight .legend{color:#3a4046}
html.rlight .br .t{background:#0000000f}
html.rlight .t.st i.s0,html.rlight .legend .lk.s0,html.rlight .dv .t i.up,html.rlight .legend .lk.up{background:#16181b}
html.rlight .t.st i.s2,html.rlight .legend .lk.s2{background:#8aa3b5}
html.rlight .dv .t .zero{background:#00000055}
html.rlight .fstep,html.rlight .fcard{background:#fff;border-color:#0000001a}
html.rlight .fcard span,html.rlight .tl li{color:#3a4046}
html.rlight .tl{border-left-color:#0000001f}
html.rlight .flowrow.low .ftag{color:#b5523f}html.rlight .flowrow.low .fstep:last-child{border-color:#b5523f66}

/* Diagrams */
html.rlight .dia .org,html.rlight .dia .node{fill:#fff;stroke:#16181b66}
html.rlight .dia .lb{fill:#3a4046}
html.rlight .dia .ld{stroke:#00000044}
html.rlight .dia .pc{stroke:#f4f1ea}
html.rlight .dia marker path{fill:#2f5d7c}

/* Accent colours set inline in some articles, darkened so they stay readable on light */
html.rlight [style*="color:#8ee6a8"]{color:#1e7a45!important}
html.rlight [style*="color:#ff7d6e"]{color:#c0392b!important}
html.rlight .dia [style*="stroke:#8ee6a8"]{stroke:#1e7a45!important}
html.rlight .dia [style*="fill:#8ee6a8"]{fill:#1e7a45!important}
html.rlight .dia [style*="stroke:#ffcf70"]{stroke:#a86b00!important}
html.rlight .dia [style*="fill:#ffcf70"]{fill:#a86b00!important}
html.rlight [style*="font-size:.85rem;color:#8b949b"]{color:#5f676e!important}

/* Footer */
html.rlight footer{border-top-color:#0000001a;color:#5c646b}
html.rlight .soc a{color:#16181b;background:#0000000a;border-color:#2f5d7c;box-shadow:0 0 14px #2f5d7c26}
html.rlight .soc a[aria-label="X"]{--c:#111!important}
html.rlight .soc a:hover{color:var(--c);border-color:var(--c);box-shadow:0 10px 28px -6px var(--c),0 0 20px color-mix(in srgb,var(--c) 35%,transparent)}

/* Floating toggle: appears once the top button scrolls out of view */
.res-float{position:fixed;right:20px;bottom:20px;z-index:50;background:#08090bd9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:0 6px 20px #00000059;opacity:0;visibility:hidden;transform:translateY(12px);transition:opacity .25s,transform .25s,visibility .25s,border-color .2s,color .2s}
.res-float.show{opacity:1;visibility:visible;transform:none}
html.rlight .res-float{background:#f4f1eae6;box-shadow:0 6px 20px #0000001f}
@media(max-width:600px){.res-float{right:14px;bottom:14px}}

/* Section labels coloured inline (shop panels): darken so they read on cream */
html.rlight .k[style*="color:#"]{filter:brightness(.52) saturate(1.5)}

/* Gold & silver: silver's light grey disappears on white */
html.rlight .gs-card.silver{--m:#7a838f}

/* Shop tiles: white on the cream page so they still read as tiles */
html.rlight .pi.card,html.rlight .pi.ptxt,html.rlight .xthumb{background-color:#fff;box-shadow:inset 0 0 0 1px #00000014}

/* Overlays stay dark in both themes */
html.rlight #hs-cart-overlay,html.rlight .nav-dd{--bk:#08090b;--ink:#f3f1ea;--blue:#b7cfe0;--mute:#8b949b;color:#f3f1ea}
html.rlight #hs-cart-overlay p,html.rlight .nav-dd p{color:#c7ccd1}
html.rlight #hs-cart-overlay .btn{background:#f3f1ea;color:#111}html.rlight #hs-cart-overlay .btn:hover{background:#b7cfe0;color:#111}

/* Product page certification icons (Australian Made, Vegan, etc.) are forced white in style.css; make them dark on the light background. */
html.rlight .badge img{filter:brightness(0);opacity:.7}
