/* theme.css: light/dark toggle and rounded floating header. Added 2026-10-13. */
html[data-theme="dark"]{--brand:#6f97ff;--brand-dk:#9db8ff;--brand-lt:rgba(111,151,255,.18);--ink:#eef2ff;--text:#dfe6ff;--muted:#9aa6c8;
--glass:rgba(24,30,56,.62);--glass-strong:rgba(28,35,66,.82);--glass-line:rgba(255,255,255,.10);--shadow:0 10px 34px rgba(0,0,0,.45);--border:rgba(150,170,230,.22);--surface:rgba(30,38,70,.6);color-scheme:dark}
html[data-theme="dark"]{background:linear-gradient(135deg,#0b1020,#1a1440) fixed!important}
html[data-theme="dark"] body{background:linear-gradient(135deg,#0b1020,#1a1440)!important;color:var(--text)}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:rgba(255,255,255,.07);color:var(--text)}
html[data-theme="dark"] header svg{stroke:#eef2ff}
html[data-theme="dark"] .result-box{background:linear-gradient(135deg,rgba(40,52,100,.85),rgba(26,32,66,.8))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 24px rgba(0,0,0,.35)}
html[data-theme="dark"] .form-group input,html[data-theme="dark"] .form-group select,html[data-theme="dark"] .panel input[type=number],html[data-theme="dark"] .panel input[type=text],html[data-theme="dark"] .panel select{background:rgba(255,255,255,.08)!important;border-color:rgba(150,170,230,.35)!important;color:var(--ink)}
html[data-theme="dark"] .form-group input:focus,html[data-theme="dark"] .panel input:focus,html[data-theme="dark"] .panel select:focus{background:rgba(255,255,255,.14)!important}
html[data-theme="dark"] .result-table td{color:var(--text)}
html[data-theme="dark"] [style*="#64748b"],html[data-theme="dark"] [style*="#94a3b8"],html[data-theme="dark"] [style*="#475569"]{color:#b9c4e4!important}
table td,table th{padding-right:8px}
#srch-btn,#theme-btn,#menu-btn{width:40px!important;height:40px!important;border-radius:50%!important;padding:0!important;display:flex!important;align-items:center;justify-content:center;background:var(--glass-strong)!important;border:1px solid var(--glass-line)!important;box-shadow:0 2px 10px rgba(31,53,120,.10);cursor:pointer;flex:none}
#menu-btn{gap:4px!important;flex-direction:column}#menu-btn span{width:18px!important}
header{gap:8px!important}
#srch-btn{margin-left:auto!important}#theme-btn,#menu-btn{margin-left:0!important}
.top-links{margin:0 auto 0 24px!important}
html[data-theme="dark"] #srch-btn,html[data-theme="dark"] #theme-btn,html[data-theme="dark"] #menu-btn{box-shadow:0 2px 10px rgba(0,0,0,.35)}

header{margin:10px 12px 0!important;border-radius:22px!important;border:1px solid var(--glass-line)!important;top:10px!important}
@media(max-width:600px){header{margin:8px 8px 0!important;border-radius:18px!important;top:8px!important}}

html[data-theme="dark"] .result-value{color:#9db8ff!important}
#theme-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#theme-btn{background:none;border:1px solid var(--border);border-radius:999px;cursor:pointer;width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:17px;color:var(--ink)}

html[data-theme="dark"] .btn-secondary{background:rgba(255,255,255,.10)!important;color:#dfe6ff!important;border-color:rgba(150,170,230,.30)!important}
html[data-theme="dark"] th{background:rgba(255,255,255,.10)!important;color:#eef2ff!important}
html[data-theme="dark"] [style*="color:#7c2d12"]{color:#fb923c!important}
html[data-theme="dark"] [style*="color:#374151"],html[data-theme="dark"] [style*="color:#1e2740"]{color:#dfe6ff!important}

html[data-theme="dark"] #mobile-nav{background:rgba(20,26,50,.48)!important;border:1px solid rgba(150,170,230,.22)!important}
html[data-theme="dark"] #mobile-nav a{color:#eef2ff!important;border-bottom:1px solid rgba(150,170,230,.14)!important}
html[data-theme="dark"] #nav-close-btn{background:rgba(238,242,255,.12)!important;color:#eef2ff!important}
html[data-theme="dark"] #srch-box{background:rgba(22,28,54,.94)!important}
html[data-theme="dark"] #srch-head{border-bottom-color:rgba(150,170,230,.22)!important}
html[data-theme="dark"] #srch-input{color:#eef2ff!important}
html[data-theme="dark"] #srch-results a,html[data-theme="dark"] #srch-results div{color:#dfe6ff}
html[data-theme="dark"] #srch-hint{border-top-color:rgba(150,170,230,.18)!important;color:#9aa6c8!important}

/* light inline panels keep dark text */
html[data-theme="dark"] [style*="background-color:  #dcfce7"],
html[data-theme="dark"] [style*="background-color:  #e0f2fe"],
html[data-theme="dark"] [style*="background-color:  #e2e8f0"],
html[data-theme="dark"] [style*="background-color:  #eff6ff"],
html[data-theme="dark"] [style*="background-color:  #f0f6ff"],
html[data-theme="dark"] [style*="background-color:  #f0f9ff"],
html[data-theme="dark"] [style*="background-color:  #f0fdf4"],
html[data-theme="dark"] [style*="background-color:  #f0fff4"],
html[data-theme="dark"] [style*="background-color:  #f1f5f9"],
html[data-theme="dark"] [style*="background-color:  #fef2f2"],
html[data-theme="dark"] [style*="background-color:  #fef9c3"],
html[data-theme="dark"] [style*="background-color:  #ffe4e6"],
html[data-theme="dark"] [style*="background-color:  #fff1f2"],
html[data-theme="dark"] [style*="background-color:#dcfce7"],
html[data-theme="dark"] [style*="background-color:#e0f2fe"],
html[data-theme="dark"] [style*="background-color:#e2e8f0"],
html[data-theme="dark"] [style*="background-color:#eff6ff"],
html[data-theme="dark"] [style*="background-color:#f0f6ff"],
html[data-theme="dark"] [style*="background-color:#f0f9ff"],
html[data-theme="dark"] [style*="background-color:#f0fdf4"],
html[data-theme="dark"] [style*="background-color:#f0fff4"],
html[data-theme="dark"] [style*="background-color:#f1f5f9"],
html[data-theme="dark"] [style*="background-color:#fef2f2"],
html[data-theme="dark"] [style*="background-color:#fef9c3"],
html[data-theme="dark"] [style*="background-color:#ffe4e6"],
html[data-theme="dark"] [style*="background-color:#fff1f2"],
html[data-theme="dark"] [style*="background:  #dcfce7"],
html[data-theme="dark"] [style*="background:  #e0f2fe"],
html[data-theme="dark"] [style*="background:  #e2e8f0"],
html[data-theme="dark"] [style*="background:  #eff6ff"],
html[data-theme="dark"] [style*="background:  #f0f6ff"],
html[data-theme="dark"] [style*="background:  #f0f9ff"],
html[data-theme="dark"] [style*="background:  #f0fdf4"],
html[data-theme="dark"] [style*="background:  #f0fff4"],
html[data-theme="dark"] [style*="background:  #f1f5f9"],
html[data-theme="dark"] [style*="background:  #fef2f2"],
html[data-theme="dark"] [style*="background:  #fef9c3"],
html[data-theme="dark"] [style*="background:  #ffe4e6"],
html[data-theme="dark"] [style*="background:  #fff1f2"],
html[data-theme="dark"] [style*="background:#dcfce7"],
html[data-theme="dark"] [style*="background:#e0f2fe"],
html[data-theme="dark"] [style*="background:#e2e8f0"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background:#f0f6ff"],
html[data-theme="dark"] [style*="background:#f0f9ff"],
html[data-theme="dark"] [style*="background:#f0fdf4"],
html[data-theme="dark"] [style*="background:#f0fff4"],
html[data-theme="dark"] [style*="background:#f1f5f9"],
html[data-theme="dark"] [style*="background:#fef2f2"],
html[data-theme="dark"] [style*="background:#fef9c3"],
html[data-theme="dark"] [style*="background:#ffe4e6"],
html[data-theme="dark"] [style*="background:#fff1f2"]{color:#1e2740!important}
html[data-theme="dark"] [style*="background-color:  #dcfce7"] *,
html[data-theme="dark"] [style*="background-color:  #e0f2fe"] *,
html[data-theme="dark"] [style*="background-color:  #e2e8f0"] *,
html[data-theme="dark"] [style*="background-color:  #eff6ff"] *,
html[data-theme="dark"] [style*="background-color:  #f0f6ff"] *,
html[data-theme="dark"] [style*="background-color:  #f0f9ff"] *,
html[data-theme="dark"] [style*="background-color:  #f0fdf4"] *,
html[data-theme="dark"] [style*="background-color:  #f0fff4"] *,
html[data-theme="dark"] [style*="background-color:  #f1f5f9"] *,
html[data-theme="dark"] [style*="background-color:  #fef2f2"] *,
html[data-theme="dark"] [style*="background-color:  #fef9c3"] *,
html[data-theme="dark"] [style*="background-color:  #ffe4e6"] *,
html[data-theme="dark"] [style*="background-color:  #fff1f2"] *,
html[data-theme="dark"] [style*="background-color:#dcfce7"] *,
html[data-theme="dark"] [style*="background-color:#e0f2fe"] *,
html[data-theme="dark"] [style*="background-color:#e2e8f0"] *,
html[data-theme="dark"] [style*="background-color:#eff6ff"] *,
html[data-theme="dark"] [style*="background-color:#f0f6ff"] *,
html[data-theme="dark"] [style*="background-color:#f0f9ff"] *,
html[data-theme="dark"] [style*="background-color:#f0fdf4"] *,
html[data-theme="dark"] [style*="background-color:#f0fff4"] *,
html[data-theme="dark"] [style*="background-color:#f1f5f9"] *,
html[data-theme="dark"] [style*="background-color:#fef2f2"] *,
html[data-theme="dark"] [style*="background-color:#fef9c3"] *,
html[data-theme="dark"] [style*="background-color:#ffe4e6"] *,
html[data-theme="dark"] [style*="background-color:#fff1f2"] *,
html[data-theme="dark"] [style*="background:  #dcfce7"] *,
html[data-theme="dark"] [style*="background:  #e0f2fe"] *,
html[data-theme="dark"] [style*="background:  #e2e8f0"] *,
html[data-theme="dark"] [style*="background:  #eff6ff"] *,
html[data-theme="dark"] [style*="background:  #f0f6ff"] *,
html[data-theme="dark"] [style*="background:  #f0f9ff"] *,
html[data-theme="dark"] [style*="background:  #f0fdf4"] *,
html[data-theme="dark"] [style*="background:  #f0fff4"] *,
html[data-theme="dark"] [style*="background:  #f1f5f9"] *,
html[data-theme="dark"] [style*="background:  #fef2f2"] *,
html[data-theme="dark"] [style*="background:  #fef9c3"] *,
html[data-theme="dark"] [style*="background:  #ffe4e6"] *,
html[data-theme="dark"] [style*="background:  #fff1f2"] *,
html[data-theme="dark"] [style*="background:#dcfce7"] *,
html[data-theme="dark"] [style*="background:#e0f2fe"] *,
html[data-theme="dark"] [style*="background:#e2e8f0"] *,
html[data-theme="dark"] [style*="background:#eff6ff"] *,
html[data-theme="dark"] [style*="background:#f0f6ff"] *,
html[data-theme="dark"] [style*="background:#f0f9ff"] *,
html[data-theme="dark"] [style*="background:#f0fdf4"] *,
html[data-theme="dark"] [style*="background:#f0fff4"] *,
html[data-theme="dark"] [style*="background:#f1f5f9"] *,
html[data-theme="dark"] [style*="background:#fef2f2"] *,
html[data-theme="dark"] [style*="background:#fef9c3"] *,
html[data-theme="dark"] [style*="background:#ffe4e6"] *,
html[data-theme="dark"] [style*="background:#fff1f2"] *{color:inherit!important}
/* neutral light bars become glass in dark */
html[data-theme="dark"] [style*="background:#f1f5f9"],
html[data-theme="dark"] [style*="background: #f1f5f9"],
html[data-theme="dark"] [style*="background-color:#f1f5f9"],
html[data-theme="dark"] [style*="background:#e2e8f0"],
html[data-theme="dark"] [style*="background: #e2e8f0"],
html[data-theme="dark"] [style*="background-color:#e2e8f0"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background: #eff6ff"],
html[data-theme="dark"] [style*="background-color:#eff6ff"],
html[data-theme="dark"] [style*="background:#f0f6ff"],
html[data-theme="dark"] [style*="background: #f0f6ff"],
html[data-theme="dark"] [style*="background-color:#f0f6ff"],
html[data-theme="dark"] [style*="background:#f0f9ff"],
html[data-theme="dark"] [style*="background: #f0f9ff"],
html[data-theme="dark"] [style*="background-color:#f0f9ff"]{background:rgba(255,255,255,.10)!important;color:#eef2ff!important}

/* dark home contrast */
html[data-theme="dark"] .hero{background:rgba(24,30,56,.72)!important}
html[data-theme="dark"] .hero p{color:#b9c4e4}
html[data-theme="dark"] .hero-search{background:rgba(255,255,255,.08)}
html[data-theme="dark"] .hero-search span{color:#aab6d8}
html[data-theme="dark"] .chips a{background:rgba(255,255,255,.10);color:#c9d6ff}
html[data-theme="dark"] .c-btn{background:rgba(255,255,255,.10)!important;color:var(--ink)!important}
html[data-theme="dark"] .c-op{background:rgba(111,151,255,.22)!important;color:#c9d6ff!important}
html[data-theme="dark"] .c-ac{background:rgba(255,90,110,.2)!important;color:#ff9aa9!important}
html[data-theme="dark"] .c-fn,html[data-theme="dark"] .c-mem{background:rgba(255,255,255,.14)!important;color:var(--ink)!important}
html[data-theme="dark"] .c-eq{background:linear-gradient(135deg,#3b78ff,#7a5cff)!important;color:#fff!important}
/* dark-mode contrast for info text (20261014) */
html[data-theme="dark"] .info-section{color:#dfe6ff}
html[data-theme="dark"] .info-section>p,html[data-theme="dark"] .info-section>ul>li,html[data-theme="dark"] .info-section>ol>li,html[data-theme="dark"] .info-section .faq-a,html[data-theme="dark"] .growth-tbl td,html[data-theme="dark"] .comp-tbl td{color:#d3dcfa}
html[data-theme="dark"] .comp-tbl tr:nth-child(even) td,html[data-theme="dark"] .growth-tbl tr:nth-child(even) td{background:rgba(255,255,255,.05)}
html[data-theme="dark"] .related-box a,html[data-theme="dark"] .toc a{background:rgba(255,255,255,.10)!important;color:#c9d6ff!important;border-color:rgba(150,170,230,.30)!important}
html[data-theme="dark"] .related-box a:hover{background:var(--brand)!important;color:#fff!important}
/* light-mode text contrast (20261014) */
html .info-section h3,html .info-section a:not(.btn),html .calc-tab.active,html .bm-read{color:var(--brand-dk)!important}
html .share-btn.sh-wa{background:#0b7d6b!important}
html .share-btn.sh-tw{background:#0a66c2!important}
html .bm-cat{background:#047857!important}
html[data-theme="dark"] .info-section h3,html[data-theme="dark"] .info-section a:not(.btn),html[data-theme="dark"] .calc-tab.active,html[data-theme="dark"] .bm-read{color:#9db8ff!important}
html[data-theme="dark"] .calc-tab{color:#aab6d8}
html:not([data-theme="dark"]) [style*="color:var(--muted)"]{color:#475569!important}
html:not([data-theme="dark"]) .article h3,html:not([data-theme="dark"]) .related-h3{color:var(--brand-dk)!important}
html:not([data-theme="dark"]) .blog-content h3{color:var(--brand-dk)}
/* white-on-gradient contrast (20261014) */
html .btn-primary,html .calc-cta{background:linear-gradient(135deg,#2f5fe0,#6a48e0)!important}
/* inline text colours below 4.5:1 (20261014) - only elements whose style starts with the colour */
html:not([data-theme="dark"]) [style^="color:#64748b"]{color:#475569!important}
html:not([data-theme="dark"]) [style^="color:#94a3b8"]{color:#475569!important}
html[data-theme="dark"] td[style^="color:#dc2626"],html[data-theme="dark"] span[style^="color:#dc2626"]{color:#f87171!important}
html[data-theme="dark"] td[style^="color:#0ea5e9"],html[data-theme="dark"] span[style^="color:#0ea5e9"]{color:#38bdf8!important}
html[data-theme="dark"] td[style^="color:#16a34a"],html[data-theme="dark"] span[style^="color:#16a34a"]{color:#4ade80!important}
html[data-theme="dark"] td[style^="color:#f59e0b"],html[data-theme="dark"] span[style^="color:#f59e0b"]{color:#fbbf24!important}
html:not([data-theme="dark"]) td[style^="color:#0ea5e9"],html:not([data-theme="dark"]) span[style^="color:#0ea5e9"]{color:#0369a1!important}
html:not([data-theme="dark"]) td[style^="color:#16a34a"],html:not([data-theme="dark"]) span[style^="color:#16a34a"]{color:#15803d!important}
html:not([data-theme="dark"]) td[style^="color:#f59e0b"],html:not([data-theme="dark"]) span[style^="color:#f59e0b"]{color:#b45309!important}

html:not([data-theme="dark"]) .sc-val{color:#1d4ed8!important}

/* calc-cta text contrast on calculator pages (20261015) - these rules were previously blog-header-only */
html .calc-cta{color:#fff!important;border-radius:14px;padding:20px 22px;margin:28px 0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px}
html .calc-cta .ct{font-size:15px;font-weight:800;margin-bottom:3px}
html .calc-cta .cs{font-size:13px;opacity:.85;line-height:1.5;color:#fff!important}
html .calc-cta a{background:#fff!important;color:#2f5fe0!important;padding:10px 20px;border-radius:9px;font-weight:800;font-size:13px;white-space:nowrap;text-decoration:none;flex-shrink:0}
html .calc-cta a:hover{background:#e8eeff}
