/* SmartSolver appearance system: semantic colors shared across every page. */
:root,[data-theme="teal"]{color-scheme:light;--accent:#00766c;--accent-hover:#005e56;--accent-soft:#e0f4ef;--accent-light:#9ff1d8;--bg:#f3f7f7;--surface:#fff;--surface-alt:#edf3f3;--text:#172e3a;--text-muted:#546973;--border:#d5e3e3;--deep:#112e36;--deep-end:#18444a;--on-deep:#f6ffff;--muted-deep:#bcd4d7;--focus:#b46900;--error-bg:#fff0eb;--error-text:#982d17;--card-shadow:0 8px 26px #12363b09}
[data-theme="ocean"]{--accent:#155dcc;--accent-hover:#1047a2;--accent-soft:#e5efff;--accent-light:#afd6ff;--bg:#f3f6fc;--surface-alt:#edf2fa;--text:#172a47;--text-muted:#546680;--border:#d7e1f0;--deep:#112749;--deep-end:#1c4175;--muted-deep:#c1d2ed}
[data-theme="violet"]{--accent:#7040be;--accent-hover:#542f96;--accent-soft:#eee7fb;--accent-light:#dbc5ff;--bg:#f7f5fc;--surface-alt:#f0edf7;--text:#2d2343;--text-muted:#6a607a;--border:#e2dced;--deep:#2c1c48;--deep-end:#4c2f77;--muted-deep:#d5c9e9}
[data-theme="rose"]{--accent:#b42e64;--accent-hover:#90214e;--accent-soft:#fce7ef;--accent-light:#ffb9d2;--bg:#fcf5f8;--surface-alt:#f8edf2;--text:#402332;--text-muted:#79616b;--border:#eddae2;--deep:#401b2e;--deep-end:#6d2a49;--muted-deep:#e7c7d4}
[data-theme="amber"]{--accent:#996000;--accent-hover:#744600;--accent-soft:#fff0cf;--accent-light:#ffdc8c;--bg:#fbf8f1;--surface-alt:#f5f0e4;--text:#392e1c;--text-muted:#71664e;--border:#e7dfcc;--deep:#362b18;--deep-end:#5b4623;--muted-deep:#e0d3b8}
[data-theme="midnight"]{color-scheme:dark;--accent:#86dacf;--accent-hover:#adf0e7;--accent-soft:#203c43;--accent-light:#a4f3df;--bg:#101821;--surface:#19242f;--surface-alt:#202e3a;--text:#edf4fa;--text-muted:#afbecb;--border:#354453;--deep:#122d37;--deep-end:#1b4248;--on-deep:#f2fffc;--muted-deep:#bfd7d9;--focus:#ffd179;--error-bg:#452721;--error-text:#ffc3ad;--card-shadow:0 8px 26px #0002}
:root{--ink:var(--text);--muted:var(--text-muted);--teal:var(--accent);--mint:var(--accent-light);--paper:var(--bg);--line:var(--border);--white:var(--surface)}
body{background:var(--bg);color:var(--text)}a{color:var(--accent)}::selection{background:var(--accent-soft);color:var(--text)}
.site-header{background:var(--surface);border-color:var(--border)}.header-inner{gap:24px;min-height:82px}.header-inner>.brand{margin-right:auto}.brand{letter-spacing:-.9px}.brand-mark{background:var(--accent);color:var(--surface);box-shadow:0 4px 10px #0000000a}.brand small{background:var(--surface-alt);border:0;border-radius:5px}
.main-nav a:hover{color:var(--accent)}.main-nav .nav-cta{background:var(--surface-alt);border-color:transparent}.main-nav .nav-cta:hover{background:var(--accent-soft)}
.hero{padding:38px 0 24px;gap:42px}.hero h1{font-size:clamp(36px,4.4vw,56px);line-height:1.08;letter-spacing:-.045em}.hero .eyebrow{letter-spacing:1.25px}.hero-note{transform:none;background:linear-gradient(125deg,var(--deep),var(--deep-end));box-shadow:0 14px 35px #00000012;border:1px solid #ffffff15;border-radius:20px;padding:28px}.hero-note .tiny{color:var(--muted-deep)}.hero-note .equation{color:var(--on-deep)}.hero-note a{color:var(--accent-light)}.hero-note:before{right:-20px;top:-40px}
.search-shell{border:1px solid var(--border);border-radius:16px;padding:7px 14px 7px 22px;box-shadow:0 8px 30px #00000006;background:var(--surface)}.search-shell input{color:var(--text)}.search-shell input::placeholder{color:var(--text-muted);opacity:1}.search-shell button{background:var(--surface-alt);color:var(--text-muted);min-height:36px}.search-shell:focus-within{outline:3px solid var(--accent-soft);border-color:var(--accent)}
.filters{padding-bottom:24px}.filter{background:var(--surface);color:var(--text-muted);padding:9px 16px}.filter[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff}.filter:hover{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.filter[aria-pressed=true]:hover{background:var(--accent-hover);color:#fff}
.popular-grid{gap:16px}.popular-card{border:1px solid var(--border);background:var(--surface);padding:20px;border-radius:14px;box-shadow:var(--card-shadow)}.popular-card .tool-icon{background:var(--accent-soft);color:var(--accent)}.popular-card:hover{border-color:var(--accent);box-shadow:0 10px 26px #0000000d}.popular-card strong{font-weight:700}.popular-card small{font-size:13px;margin-top:2px}.popular-card .arrow{font-size:20px}
.tool-grid{gap:20px}.tool-card{background:var(--surface);border-color:var(--border);border-radius:17px;padding:25px;box-shadow:var(--card-shadow);position:relative;overflow:hidden}.tool-card::before{content:"";height:3px;position:absolute;left:24px;right:24px;top:0;background:var(--accent);opacity:0;transition:opacity .15s}.tool-card:hover::before,.tool-card:focus-visible::before{opacity:1}.tool-card:hover{box-shadow:0 12px 28px #00000010;border-color:var(--accent)}.tool-icon{background:var(--accent-soft);color:var(--accent);border-radius:12px;width:48px;height:48px}.tool-card h4{font-size:19px}.tool-card p{font-size:15px}.tool-card .arrow{border:1px solid var(--border);border-radius:50%;height:29px;width:29px;display:grid;place-items:center;font-size:16px}.category-title span{background:var(--accent-soft);color:var(--accent);padding:3px 10px;font-weight:650}
.empty,.input-panel,.example,.contact-form{background:var(--surface);border-color:var(--border)}.input-panel{box-shadow:var(--card-shadow);padding:30px}.panel-heading{font-size:22px}.field-note{margin-bottom:25px}.field input,.field select,.contact-form input,.contact-form textarea{background:var(--surface-alt);color:var(--text);border:1px solid var(--border);border-radius:10px;min-height:51px}.field label{font-size:14px;letter-spacing:0}.field input:hover,.field select:hover{border-color:var(--text-muted)}input:focus,select:focus,textarea:focus{outline:3px solid var(--accent-soft);border-color:var(--accent)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.button{background:var(--accent);color:#fff;border-radius:10px;min-height:48px;padding:12px 23px}.button:hover{background:var(--accent-hover)}.button.secondary{background:var(--surface);color:var(--text);border-color:var(--border)}.button.secondary:hover{background:var(--surface-alt)}.form-actions .button:first-child{flex:1}.error{background:var(--error-bg);color:var(--error-text);border-color:var(--error-text)}
.result-panel{background:linear-gradient(135deg,var(--deep),var(--deep-end));color:var(--on-deep);border:1px solid #ffffff12;box-shadow:0 14px 35px #00000012;padding:31px}.result-panel h2{color:var(--muted-deep);font-size:12px;letter-spacing:1.8px}.primary-result .result-label,.result-row span,.result-note,.local-note{color:var(--muted-deep)}.primary-result .result-value{color:var(--accent-light);margin:12px 0 27px}.result-row strong{color:var(--on-deep)}.result-row .result-unit{font-size:14px}.result-empty{color:var(--on-deep)}
.formula{background:var(--accent-soft);border-color:var(--accent);color:var(--text)!important;border-radius:0 12px 12px 0;padding:22px}.faq{background:var(--surface);border:1px solid var(--border);border-radius:17px;padding:24px;align-self:start;box-shadow:var(--card-shadow)}.faq details:last-child{border-bottom:0}.faq details[open] summary{color:var(--accent)}.faq summary{line-height:1.5}.content-layout{gap:30px}.example{box-shadow:var(--card-shadow)}.trust-strip div{border-top:2px solid var(--accent-soft)}.site-footer{background:var(--deep);color:var(--muted-deep)}.site-footer .brand{color:var(--on-deep)}.site-footer .brand-mark{background:var(--deep-end);color:var(--accent-light)}.site-footer .brand small{color:var(--muted-deep);background:var(--deep-end)}.footer-links a{color:var(--muted-deep)}.footer-links a:hover{color:var(--accent-light)}.skip{background:var(--surface)}.no-script{background:var(--accent-soft);border-color:var(--border);color:var(--text)}
[data-theme="midnight"] .button:not(.secondary),[data-theme="midnight"] .filter[aria-pressed=true],[data-theme="midnight"] .brand-mark{color:#102d30}
.theme-picker{position:relative;flex-shrink:0}.theme-picker summary{list-style:none;display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font-size:14px;font-weight:650;min-height:42px;padding:8px 12px;cursor:pointer;user-select:none}.theme-picker summary::-webkit-details-marker{display:none}.theme-picker summary:hover,.theme-picker[open] summary{border-color:var(--accent);background:var(--accent-soft)}.theme-indicator{width:14px;height:14px;border-radius:50%;background:var(--accent);box-shadow:inset 0 0 0 1px #00000015}.theme-chevron{font-size:12px;color:var(--text-muted)}.theme-panel{position:absolute;right:0;top:calc(100% + 12px);z-index:30;background:var(--surface);color:var(--text);border:1px solid var(--border);padding:20px;border-radius:16px;width:320px;max-width:calc(100vw - 32px);box-shadow:0 18px 55px #00000025}.theme-panel h2{font-size:18px;letter-spacing:-.4px;margin:0 0 5px}.theme-panel>p{font-size:13px;color:var(--text-muted);margin:0 0 16px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.theme-choice{border:1px solid var(--border);border-radius:10px;padding:12px 4px 9px;background:var(--surface-alt);color:var(--text);font-size:12px;font-weight:600;display:flex;flex-direction:column;align-items:center;gap:8px;min-height:73px}.theme-choice:hover{border-color:var(--accent)}.theme-choice[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:1px;background:var(--accent-soft)}.theme-swatch{height:22px;width:22px;border-radius:50%;box-shadow:0 0 0 3px var(--surface),0 0 0 4px var(--border)}.theme-choice[data-theme-choice=teal] .theme-swatch{background:#00766c}.theme-choice[data-theme-choice=ocean] .theme-swatch{background:#155dcc}.theme-choice[data-theme-choice=violet] .theme-swatch{background:#7040be}.theme-choice[data-theme-choice=rose] .theme-swatch{background:#b42e64}.theme-choice[data-theme-choice=amber] .theme-swatch{background:#996000}.theme-choice[data-theme-choice=midnight] .theme-swatch{background:#172735;border:2px solid #86dacf}.theme-panel .theme-status{margin:15px 0 0;font-size:12px;min-height:19px}
@media(max-width:1000px){.header-inner{gap:16px}.main-nav{gap:16px}.brand{font-size:21px}.main-nav a{font-size:13px}.brand small{display:none}}
@media(max-width:760px){.header-inner{flex-wrap:wrap;padding-top:16px;padding-bottom:14px;gap:14px}.header-inner>.brand{order:0}.theme-picker{order:1}.main-nav{order:2;width:100%;justify-content:space-between}.main-nav .nav-cta{background:transparent;padding:0}.hero{gap:25px}.hero-note{padding:20px}.calc-layout{gap:20px}.input-panel,.result-panel{padding:24px}}
@media(max-width:640px){.hero{padding:28px 0 16px}.hero h1{font-size:clamp(32px,8vw,42px);margin-bottom:15px}.hero .eyebrow{font-size:11px;letter-spacing:1px}.search-shell{padding:6px 10px 6px 14px;border-radius:12px;margin-top:0}.filter{font-size:13px;padding:8px 12px}.popular-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.popular-card{padding:14px;gap:10px;min-width:0}.popular-card>span{min-width:0}.popular-card strong{font-size:14px;overflow-wrap:anywhere}.popular-card small{font-size:12px}.popular-card .arrow{display:none}.popular-card .tool-icon{height:34px;width:34px;font-size:15px}.tool-card{padding:22px}.tool-grid{gap:14px}.faq{padding:22px}.content-layout{gap:24px}.theme-picker summary{font-size:12px;padding:8px 10px}.theme-panel{width:296px}.result-panel{position:static}.theme-panel h2{font-size:18px}.theme-options{gap:8px}}
@media(max-width:380px){.popular-grid{grid-template-columns:1fr}.popular-card .arrow{display:grid}.brand{font-size:19px;gap:8px}.brand-mark{width:32px;height:32px}.theme-picker summary{font-size:12px;padding:8px}.theme-panel{position:fixed;top:75px;left:16px;right:16px;width:auto;max-width:none}.theme-choice{font-size:12px}.hero h1{font-size:32px}}
@media(prefers-reduced-motion:reduce){.tool-card::before{transition:none}}
@media print{.theme-picker{display:none}body{background:white;color:black}.result-panel{background:white}.input-panel,.faq,.example{box-shadow:none}.field input,.field select{background:white;color:black}}

@media(max-width:380px){.theme-panel{top:var(--theme-menu-top,110px);max-height:calc(100dvh - var(--theme-menu-top,110px) - 16px);overflow:auto}}
/* Analytics choice uses the current site theme. */
.privacy-settings{border:0;background:none;color:var(--muted-deep);font:inherit;font-size:14px;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.consent-banner{position:fixed;bottom:18px;left:18px;right:18px;max-width:940px;margin:auto;z-index:40;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);padding:20px 24px;box-shadow:0 10px 50px #0003;display:flex;align-items:center;gap:24px;max-height:45vh;overflow:auto}
.consent-copy{flex:1}.consent-copy h2{font-size:18px;margin:0 0 6px}.consent-copy p{font-size:14px;line-height:1.5;margin:0;color:var(--text-muted)}
.consent-actions{display:flex;gap:10px;flex-wrap:wrap}.consent-actions .button{font-size:14px;white-space:nowrap}.consent-banner:focus{outline:3px solid var(--focus)}
@media(max-width:640px){.consent-banner{display:block;left:12px;right:12px;bottom:12px;padding:18px}.consent-actions{margin-top:14px}.consent-actions .button{flex:1;padding:10px}.hero p.lead{line-height:1.5}}
@media print{.consent-banner,.privacy-settings{display:none!important}}
/* The fixed brand palette stays recognizable across all six site themes. */
.brand{gap:10px;letter-spacing:-.8px}
.brand-logo{display:block;width:44px;height:44px;flex:0 0 44px;object-fit:contain;background:#fff;border-radius:11px;padding:3px;box-sizing:border-box}
.brand-wordmark{font-size:23px;font-weight:800;line-height:1;white-space:nowrap}
.brand-wordmark>span{color:var(--accent);font-weight:650}
.site-footer .brand-logo{width:46px;height:46px;flex-basis:46px}
.site-footer .brand-wordmark>span{color:var(--accent-light)}
@media(max-width:1000px){.brand-wordmark{font-size:21px}}
@media(max-width:380px){.brand{gap:7px}.brand-logo{width:34px;height:34px;flex-basis:34px;border-radius:8px;padding:2px}.brand-wordmark{font-size:19px}}
