/* =====================================================================
   All Calculator design system: night + mint brand, seven category colour
   sets (panel, accent, tint), shadow-lifted rounded cards, floating pill
   nav. Documented in DESIGN.md. Scoped under .cs-site / .cs-calc to beat
   Hello's reset.
   ===================================================================== */
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --cs-font: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --cs-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --cs-ink: #101418; --cs-text: #1d2430; --cs-muted: #586170; --cs-faint: #677081;
  --cs-bg: #f4f5f7; --cs-surface: #ffffff; --cs-surface-2: #f7f8fa; --cs-border: #e3e6eb; --cs-border-strong: #8a919e;
  --cs-accent: #0d6b57; --cs-accent-2: #0a5545; --cs-accent-ink: #ffffff; --cs-accent-soft: #e2f1ec; --cs-accent-line: #8fd3bf;
  /* answer panel: deep shade of the page's category (navy by default), never flat black */
  --cs-panel: #14243f; --cs-panel-2: #1c3050; --cs-panel-line: rgba(255, 255, 255, .14); --cs-panel-text: #ffffff; --cs-panel-muted: rgba(255, 255, 255, .8); --cs-panel-accent: #8be3c8; --cs-panel-err: #ffb3a6;
  --cs-footer: #0a1020; --cs-brand-tint: #e5f3ee; --cs-cat-tint: #eef1f5;
  --cs-ok: #0d6b57; --cs-ok-soft: #e2f1ec; --cs-err: #b42318; --cs-err-soft: #fdecea;
  /* category markers (dots, nav underline, chart series 1) */
  --ink-financial: #0d7a60; --ink-health: #cf3a2b; --ink-math: #2f55d4; --ink-datetime: #b55309;
  --ink-home: #7048e8; --ink-science: #0e7c86; --ink-everyday: #4b5563;
  --cs-cat: var(--cs-accent);
  /* chart slots keep the meaning calculators were written against: 2 amber, 3 green, 4 violet, 5 red, 6 teal; 1 follows the category */
  --cs-c1: var(--cs-cat); --cs-c2: #b45309; --cs-c3: #0d7a60; --cs-c4: #7048e8; --cs-c5: #cf3a2b; --cs-c6: #0e7c86;
  --cs-hair: 1px solid var(--cs-border);
  --cs-radius: 24px; --cs-radius-sm: 14px;
  --cs-shadow-sm: 0 1px 2px rgba(16, 20, 24, .05);
  --cs-shadow: 0 1px 2px rgba(16, 20, 24, .04), 0 6px 20px -6px rgba(16, 20, 24, .10);
  --cs-shadow-lg: 0 2px 4px rgba(16, 20, 24, .04), 0 22px 48px -18px rgba(16, 20, 24, .28);
  --cs-scroll: #c7ccd4; --cs-scroll-hover: #8a919e;
  --cs-wrap: 1240px; --cs-header-h: 92px; --cs-nav-h: 88px;
  --cs-night: #0a1020; --cs-hi: #7ef0c6;
  color-scheme: light;
}
.cs-ink-financial, .cs-cat-financial { --cs-cat: var(--ink-financial); } .cs-ink-health, .cs-cat-health { --cs-cat: var(--ink-health); }
.cs-ink-math, .cs-cat-math { --cs-cat: var(--ink-math); } .cs-ink-datetime, .cs-cat-datetime { --cs-cat: var(--ink-datetime); }
.cs-ink-home, .cs-cat-home { --cs-cat: var(--ink-home); } .cs-ink-science, .cs-cat-science { --cs-cat: var(--ink-science); }
.cs-ink-everyday, .cs-cat-everyday { --cs-cat: var(--ink-everyday); }
[class*="cs-ink-"], [class*="cs-cat-"] { --cs-c1: var(--cs-cat); }
.cs-ink-financial, .cs-cat-financial { --cs-panel: #0b5e4c; --cs-panel-2: #0f6e59; --cs-panel-accent: #8ef0cd; --cs-cat-tint: color-mix(in srgb, var(--ink-financial) 9%, var(--cs-bg)); }
.cs-ink-health, .cs-cat-health { --cs-panel: #8a1c3a; --cs-panel-2: #9c2647; --cs-panel-accent: #ffc2cf; --cs-cat-tint: color-mix(in srgb, var(--ink-health) 9%, var(--cs-bg)); }
.cs-ink-math, .cs-cat-math { --cs-panel: #1d3fa8; --cs-panel-2: #2a4cb8; --cs-panel-accent: #c2d2ff; --cs-cat-tint: color-mix(in srgb, var(--ink-math) 9%, var(--cs-bg)); }
.cs-ink-datetime, .cs-cat-datetime { --cs-panel: #9a3b0a; --cs-panel-2: #ab4813; --cs-panel-accent: #ffd2a6; --cs-cat-tint: color-mix(in srgb, var(--ink-datetime) 9%, var(--cs-bg)); }
.cs-ink-home, .cs-cat-home { --cs-panel: #4c2bb0; --cs-panel-2: #5a39c0; --cs-panel-accent: #d8cbff; --cs-cat-tint: color-mix(in srgb, var(--ink-home) 9%, var(--cs-bg)); }
.cs-ink-science, .cs-cat-science { --cs-panel: #0a5d68; --cs-panel-2: #0e6d79; --cs-panel-accent: #9eeef5; --cs-cat-tint: color-mix(in srgb, var(--ink-science) 9%, var(--cs-bg)); }
.cs-ink-everyday, .cs-cat-everyday { --cs-panel: #334155; --cs-panel-2: #3f4d63; --cs-panel-accent: #d3dae4; --cs-cat-tint: color-mix(in srgb, var(--ink-everyday) 9%, var(--cs-bg)); }
/* Series 1 takes the category colour; where that equals a fixed slot, the slot shifts to a lighter tone of the same hue
   so two series never share a colour (meaning is kept: green = normal, red = bad, …). */
.cs-ink-financial, .cs-cat-financial { --cs-c3: #52b788; }
.cs-ink-health, .cs-cat-health { --cs-c5: #f08a7a; }
.cs-ink-home, .cs-cat-home { --cs-c4: #a78bfa; }
.cs-ink-science, .cs-cat-science { --cs-c6: #5bb8c2; }
.cs-ink-datetime, .cs-cat-datetime { --cs-c2: #e0a83a; }
@media (prefers-color-scheme: dark) {
  .cs-ink-financial, .cs-cat-financial { --cs-c3: #2e9b78; }
  .cs-ink-health, .cs-cat-health { --cs-c5: #c2493a; }
  .cs-ink-home, .cs-cat-home { --cs-c4: #7a5cd6; }
  .cs-ink-science, .cs-cat-science { --cs-c6: #2a929d; }
  .cs-ink-datetime, .cs-cat-datetime { --cs-c2: #b8741f; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --cs-ink: #f2f4f7; --cs-text: #dde2ea; --cs-muted: #a3acba; --cs-faint: #8f98a7;
    --cs-bg: #0c0f13; --cs-surface: #151a20; --cs-surface-2: #1b2128; --cs-border: #2a313b; --cs-border-strong: #6f7886;
    --cs-accent: #6fd6b5; --cs-accent-2: #93e3c9; --cs-accent-ink: #0c0f13; --cs-accent-soft: #15302a; --cs-accent-line: #2f6b5b;
    --cs-footer: #070b16; --cs-brand-tint: #10251f;
    --cs-ok: #6fd6b5; --cs-ok-soft: #15302a; --cs-err: #ff8f84; --cs-err-soft: #3a1b18;
    --ink-financial: #5fd3ac; --ink-health: #ff8a75; --ink-math: #8fb0ff; --ink-datetime: #f5a65b;
    --ink-home: #b9a4ff; --ink-science: #5fd0dd; --ink-everyday: #c3cad4;
    --cs-c2: #f5a65b; --cs-c3: #5fd3ac; --cs-c4: #b9a4ff; --cs-c5: #ff8a75; --cs-c6: #5fd0dd;
    --cs-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --cs-shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 48px -18px rgba(0, 0, 0, .7);
    --cs-scroll: #333b46; --cs-scroll-hover: #4b5563;
    color-scheme: dark;
  }
}

/* ---------- base + browser surfaces ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--cs-header-h) + 16px); -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--cs-scroll) transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } }
body.cs-site { margin: 0; background: var(--cs-bg); color: var(--cs-text); font-family: var(--cs-font); font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.cs-site h1, .cs-site h2, .cs-site h3, .cs-site h4 { color: var(--cs-ink); font-family: var(--cs-font); line-height: 1.15; letter-spacing: -.025em; font-weight: 650; text-wrap: balance; }
.cs-site p, .cs-site li { text-wrap: pretty; }
.cs-site a { color: var(--cs-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: color .15s, text-decoration-color .15s; }
.cs-site a:hover { color: var(--cs-accent-2); text-decoration-color: currentColor; }
.cs-site :focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--cs-accent-soft); color: var(--cs-ink); }
.cs-site input, .cs-site textarea { caret-color: var(--cs-accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cs-scroll); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--cs-scroll-hover); background-clip: padding-box; border: 2px solid transparent; }
.cs-wrap { width: 100%; max-width: var(--cs-wrap); margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
@media (max-width: 640px) { .cs-wrap { padding: 0 16px; } body.cs-site { font-size: 16px; } }
.cs-muted { color: var(--cs-muted); }
.cs-small { font-size: .85rem; color: var(--cs-muted); }
.cs-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .cs-hide-sm { display: none !important; } }
body.cs-shell .site-main, body.cs-site.error404 .site-main, body.cs-site.search .site-main { max-width: none; width: 100%; margin: 0; padding: 0; }
body.cs-shell .page-content, body.cs-shell .page-content > *:first-child { margin-top: 0; }
#site-header.site-header, #site-footer.site-footer { display: none; }
.cs-skip { position: absolute; left: 12px; top: -80px; z-index: 1000; background: var(--cs-ink); color: var(--cs-bg) !important; padding: 12px 18px; border-radius: 10px; font-weight: 600; text-decoration: none !important; }
.cs-skip:focus { top: 12px; }
/* one authored arrow for "more" links and list rows */
.cs-grid-list a::after, .cs-site .cs-more::after, .cs-embed-more::after, .cs-arrow::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .35em; vertical-align: -.15em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.cs-site .cs-more:hover::after, .cs-embed-more:hover::after, .cs-arrow:hover::after { transform: translateX(3px); }
.cs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cs-cat); flex: 0 0 8px; }

/* ---------- header: one floating glass pill ---------- */
.cs-header { position: sticky; top: 0; z-index: 100; padding: 12px 0; margin-bottom: calc(-1 * var(--cs-nav-h)); pointer-events: none; }
.admin-bar .cs-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .cs-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .cs-header { top: 0; } }
.cs-nav { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 8px; min-height: 64px; box-sizing: border-box; padding: 8px 8px 8px 18px; background: color-mix(in srgb, var(--cs-surface) 84%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border: 1px solid color-mix(in srgb, var(--cs-surface) 60%, var(--cs-border)); border-radius: 999px; box-shadow: 0 12px 32px -14px rgba(10, 16, 32, .32); transition: box-shadow .25s; }
.cs-header.is-scrolled .cs-nav { box-shadow: 0 18px 44px -14px rgba(10, 16, 32, .42); }
.cs-site .cs-logo { display: inline-flex; align-items: center; gap: 10px; margin-right: 6px; color: var(--cs-ink); font-weight: 500; font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; text-decoration: none; flex: 0 0 auto; }
.cs-site .cs-logo:hover { color: var(--cs-ink); }
.cs-logo svg { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; }
.cs-logo b { font-weight: 700; }
/* "Calculators" mega menu */
.cs-mega > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px; border-radius: 999px; color: var(--cs-ink); font-weight: 550; font-size: .97rem; list-style: none; cursor: pointer; user-select: none; transition: background .15s; }
.cs-mega > summary::-webkit-details-marker { display: none; }
.cs-mega > summary:hover, .cs-mega[open] > summary { background: var(--cs-surface-2); }
.cs-mega > summary svg { transition: transform .2s; }
.cs-mega[open] > summary svg { transform: rotate(180deg); }
.cs-mega-panel { position: absolute; left: 0; right: 0; top: calc(100% + 10px); padding: 12px; background: var(--cs-surface); border-radius: 28px; box-shadow: 0 30px 80px -24px rgba(10, 16, 32, .5), 0 0 0 1px var(--cs-border); animation: cs-fade .18s cubic-bezier(.16, 1, .3, 1); max-height: calc(100vh - 110px); overflow-y: auto; box-sizing: border-box; }
.cs-mega-list { width: 276px; list-style: none; margin: 0; padding: 0; }
.cs-site .cs-mega-cat { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px 6px 8px; border-radius: 16px; color: var(--cs-ink); text-decoration: none; }
.cs-site .cs-mega-cat:hover { color: var(--cs-ink); }
.cs-mega-ico { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: var(--cs-cat-tint); color: var(--cs-cat); }
.cs-mega-cat strong { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: .97rem; letter-spacing: -.01em; line-height: 1.2; }
.cs-mega-cat small { flex: 0 0 auto; color: var(--cs-muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.cs-site .cs-mega-item.is-on > .cs-mega-cat { background: var(--cs-panel); color: #fff; }
.cs-mega-item.is-on .cs-mega-ico { background: rgba(255, 255, 255, .16); color: #fff; }
.cs-mega-item.is-on .cs-mega-cat small { color: rgba(255, 255, 255, .85); }
.cs-site .cs-mega-item > .cs-mega-cat:focus-visible { outline: 2px solid var(--cs-ink); outline-offset: 2px; }
.cs-mega-pane { position: absolute; top: 12px; right: 12px; bottom: 12px; left: 304px; display: flex; flex-direction: column; gap: 10px; visibility: hidden; }
.cs-mega-item.is-on > .cs-mega-pane { visibility: visible; }
.cs-mega-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px 22px; border-radius: 20px; background: var(--cs-cat-tint); }
.cs-mega-head strong { color: var(--cs-ink); font-size: 1.22rem; font-weight: 680; letter-spacing: -.025em; }
.cs-site .cs-mega-head a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--cs-panel); color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.cs-site .cs-mega-head a:hover { background: var(--cs-panel-2); color: #fff; }
.cs-mega-tools { flex: 1 1 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 2px 6px; list-style: none; margin: 0; padding: 0; }
.cs-site .cs-mega-tools a { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 48px; box-sizing: border-box; padding: 6px 10px; border-radius: 14px; color: var(--cs-ink); font-weight: 550; font-size: .95rem; line-height: 1.2; text-decoration: none; }
.cs-site .cs-mega-tools a:hover { background: var(--cs-cat-tint); color: var(--cs-ink); }
.cs-site .cs-mega-all { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; margin-top: 8px; padding: 0 6px 0 16px; width: 276px; box-sizing: border-box; border-radius: 999px; background: var(--cs-night); color: #fff; font-weight: 600; font-size: .92rem; text-decoration: none; }
.cs-site .cs-mega-all:hover { color: #fff; background: color-mix(in srgb, var(--cs-night) 85%, #fff); }
.cs-navlinks { display: flex; align-items: center; gap: 2px; }
.cs-site .cs-navlinks a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 13px; border-radius: 999px; color: var(--cs-ink); font-weight: 550; font-size: .97rem; text-decoration: none; white-space: nowrap; transition: background .15s; }
.cs-site .cs-navlinks a:hover, .cs-site .cs-navlinks a[aria-current] { background: var(--cs-surface-2); color: var(--cs-ink); }
@media (max-width: 1180px) { .cs-navlinks { display: none; } }
@media (min-width: 761px) { .cs-header.has-hero-search .cs-quick { visibility: hidden; } }
.cs-quick { position: relative; display: flex; align-items: center; flex: 1 1 auto; max-width: 440px; margin-left: auto; }
.cs-quick > svg { position: absolute; left: 16px; color: var(--cs-muted); pointer-events: none; }
.cs-site .cs-quick input { width: 100%; height: 46px; box-sizing: border-box; padding: 0 40px 0 44px; border: 1px solid transparent; border-radius: 999px; background: var(--cs-surface-2); color: var(--cs-ink); font: 450 .97rem var(--cs-font); transition: border-color .15s, box-shadow .15s, background .15s; }
.cs-site .cs-quick input::placeholder { color: var(--cs-faint); opacity: 1; }
.cs-site .cs-quick input:focus { outline: 2px solid transparent; border-color: var(--cs-accent); background: var(--cs-surface); box-shadow: 0 0 0 4px var(--cs-accent-soft); }
.cs-quick input::-webkit-search-cancel-button { display: none; }
.cs-quick kbd { position: absolute; right: 14px; font: 600 .72rem var(--cs-font); color: var(--cs-muted); border: var(--cs-hair); border-radius: 6px; padding: 1px 7px; background: var(--cs-surface); pointer-events: none; }
.cs-quick input:focus ~ kbd { display: none; }
.cs-quick-list { position: absolute; z-index: 120; left: 0; right: 0; top: calc(100% + 10px); margin: 0; padding: 6px; list-style: none; background: var(--cs-surface); border: var(--cs-hair); border-radius: 20px; box-shadow: var(--cs-shadow-lg); min-width: 300px; }
.cs-site .cs-quick-list a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--cs-ink); font-weight: 500; text-decoration: none; }
.cs-quick-list a small { color: var(--cs-muted); font-weight: 450; }
.cs-site .cs-quick-list a:hover, .cs-site .cs-quick-list a.is-active { background: var(--cs-surface-2); color: var(--cs-ink); }
.cs-ql-h, .cs-quick-list .cs-none { padding: 9px 12px 4px; font-size: .78rem; color: var(--cs-muted); font-weight: 550; }
.cs-quick-list .cs-none { font-size: .92rem; font-weight: 450; }
/* primary call to action: dark pill with an arrow coin */
.cs-site .cs-cta { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; min-height: 48px; padding: 0 6px 0 20px; border-radius: 999px; background: var(--cs-night); color: #fff; font-weight: 600; font-size: .95rem; white-space: nowrap; text-decoration: none; transition: background .15s; }
.cs-site .cs-cta:hover { color: #fff; background: color-mix(in srgb, var(--cs-night) 85%, #fff); }
.cs-cta i, .cs-coin { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--cs-hi); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.cs-cta i::after, .cs-coin::after { content: ""; width: 16px; height: 16px; background: var(--cs-night); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.cs-cta:hover i, a:hover > .cs-coin { transform: translateX(3px); }
@media (max-width: 1040px) { .cs-mega-list, .cs-site .cs-mega-all { width: 232px; } .cs-mega-pane { left: 258px; } .cs-mega-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cs-site .cs-cta { display: none; } }
@media (max-width: 760px) {
  :root { --cs-header-h: 0px; --cs-nav-h: 136px; }
  .cs-header { position: relative; padding: 10px 0; }
  .cs-nav { flex-wrap: wrap; gap: 8px; padding: 8px; border-radius: 28px; }
  .cs-site .cs-logo { padding-left: 8px; }
  .cs-mega { margin-left: auto; }
  .cs-site .cs-cta { display: none; }
  .cs-quick { order: 3; flex: 1 0 100%; max-width: none; margin: 0; }
  .cs-quick kbd { display: none; }
  .cs-mega-list, .cs-site .cs-mega-all { width: auto; }
  .cs-mega-pane { display: none; }
  .cs-toc { top: 16px; }
}

/* ---------- page heroes ---------- */
.cs-page-hero { padding: 34px 0 26px; }
.cs-calc-hero { background: var(--cs-cat-tint); border-bottom: var(--cs-hair); margin-bottom: 28px; }
.cs-page-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.05; margin: 12px 0 10px; max-width: 20ch; }
.cs-lead { font-size: 1.1rem; color: var(--cs-muted); max-width: 34em; margin: 0 0 16px; }
.cs-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; font-size: .87rem; color: var(--cs-muted); }
.cs-crumbs li { display: flex; align-items: center; }
.cs-crumbs li + li::before { content: ""; width: 5px; height: 5px; margin: 0 10px; border-right: 1.5px solid var(--cs-faint); border-top: 1.5px solid var(--cs-faint); transform: rotate(45deg); }
.cs-site .cs-crumbs a { color: var(--cs-muted); text-decoration: none; }
.cs-site .cs-crumbs a:hover { color: var(--cs-ink); }
.cs-crumbs [aria-current] { color: var(--cs-ink); }
.cs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; font-size: .9rem; color: var(--cs-muted); }
.cs-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.cs-site .cs-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border: var(--cs-hair); border-radius: 999px; background: var(--cs-surface); color: var(--cs-ink); font-weight: 500; text-decoration: none; }
.cs-chip svg { display: none; }
.cs-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cs-cat); }
.cs-site .cs-chip:hover { color: var(--cs-ink); border-color: var(--cs-border-strong); }
.cs-site .cs-fav, .cs-site .cs-fav:focus { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border: var(--cs-hair); border-radius: 10px; background: var(--cs-surface); color: var(--cs-ink); font: 500 .88rem var(--cs-font); cursor: pointer; }
.cs-site .cs-fav:hover { border-color: var(--cs-border-strong); background: var(--cs-surface); color: var(--cs-ink); }
.cs-site .cs-fav[aria-pressed="true"] { background: var(--cs-ink); border-color: var(--cs-ink); color: var(--cs-bg); }
.cs-site .cs-fav[aria-pressed="true"] svg { fill: currentColor; }
@media (min-width: 641px) { .cs-meta .cs-fav { margin-left: auto; } }
.cs-calc-hero .cs-lead { max-width: 46em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .cs-calc-hero { padding: 18px 0 14px; } .cs-calc-hero h1 { margin: 8px 0; } .cs-calc-hero .cs-lead { font-size: 1rem; margin-bottom: 12px; } .cs-meta { flex-wrap: nowrap; gap: 10px; } .cs-meta .cs-fav { margin-left: auto; padding: 0 10px; } .cs-meta .cs-fav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* category hero: a white band with the category marker; colour stays a marker, not a flood */
.cs-cat-hero { background: var(--cs-cat-tint); border-bottom: var(--cs-hair); padding: 34px 0 30px; }
.cs-cat-title { display: flex; align-items: center; gap: 14px; }
.cs-cat-title h1 { margin: 12px 0; }
.cs-ico { display: inline-grid; place-items: center; flex: 0 0 auto; color: var(--cs-cat); }
.cs-ico-lg { color: var(--cs-cat); }
.cs-ico-lg svg { width: 30px; height: 30px; }
.cs-section { padding-top: 32px; padding-bottom: 72px; }

/* ---------- calculator page layout ---------- */
.cs-calc-row { padding-top: 8px; }
@media (max-width: 640px) { .cs-calc-row { padding-top: 0; } }
.cs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding-bottom: 80px; align-items: start; }
@media (max-width: 1100px) { .cs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .cs-side { display: none; } }
.cs-main { min-width: 0; }
.cs-side { display: flex; flex-direction: column; gap: 18px; margin-top: 48px; align-self: stretch; }
.cs-side-card { background: var(--cs-surface); border: var(--cs-hair); border-radius: 16px; padding: 16px 16px 10px; }
.cs-side-card h2 { font-size: .82rem; color: var(--cs-muted); margin: 0 4px 8px; font-weight: 600; letter-spacing: 0; }
.cs-side-card ul, .cs-side-card ol { list-style: none; margin: 0; padding: 0; }
.cs-site .cs-side-card li a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--cs-text); font-size: .92rem; text-decoration: none; }
.cs-site .cs-side-card li a:hover { background: var(--cs-surface-2); color: var(--cs-ink); }
.cs-site .cs-side-card li a[aria-current], .cs-site .cs-toc li a.is-on { background: var(--cs-surface-2); color: var(--cs-ink); font-weight: 600; }
.cs-side-card li a[aria-current]::before, .cs-toc li a.is-on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cs-cat); flex: 0 0 6px; }
.cs-site .cs-more { display: inline-flex; align-items: center; min-height: 40px; margin: 4px 8px 0; font-weight: 550; font-size: .92rem; text-decoration: none; color: var(--cs-accent); }
.cs-toc { position: sticky; top: calc(var(--cs-header-h) + 20px); }

/* article + FAQ */
.cs-article { max-width: 36em; margin-top: 56px; font-size: 1.04rem; }
.cs-article h2 { margin: 2.6rem 0 .8rem; font-size: 1.55rem; }
.cs-article h3 { margin: 1.8rem 0 .6rem; font-size: 1.18rem; }
.cs-article ul, .cs-article ol { padding-left: 1.3rem; }
.cs-article li { margin: .4rem 0; }
.cs-article li::marker { color: var(--cs-cat); }
.cs-article table, .cs-prose table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 1.4rem 0; font-size: .95rem; background: var(--cs-surface); border: var(--cs-hair); border-radius: 14px; overflow: hidden; }
@media (max-width: 640px) { .cs-article table, .cs-prose table { display: block; overflow-x: auto; } }
.cs-article th, .cs-article td, .cs-prose th, .cs-prose td { border-bottom: var(--cs-hair); padding: 11px 14px; text-align: left; }
.cs-article tr:last-child td, .cs-prose tr:last-child td { border-bottom: 0; }
.cs-article th, .cs-prose th { background: var(--cs-surface-2); font-weight: 600; color: var(--cs-ink); }
.cs-article code { font-family: var(--cs-mono); font-size: .9em; background: var(--cs-surface); border: var(--cs-hair); border-radius: 6px; padding: 1px 6px; }
.cs-article ol.cs-howto { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0 0; }
.cs-howto li { counter-increment: step; position: relative; padding: 6px 0 6px 44px; margin: 0 0 6px; }
.cs-howto li::before { content: counter(step); position: absolute; left: 0; top: 4px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--cs-cat-tint); color: var(--cs-cat); font-weight: 650; font-size: .9rem; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cs-cat) 35%, transparent); }
.cs-article > h2:first-child { margin-top: 0; }
.cs-formula { background: var(--cs-surface); border: var(--cs-hair); border-radius: 14px; padding: 16px 20px; font-family: var(--cs-mono); font-size: .97rem; overflow-x: auto; color: var(--cs-ink); }
.cs-faq { margin-top: 3rem; }
.cs-faq details { background: var(--cs-surface); border: var(--cs-hair); border-radius: 14px; margin: 10px 0; transition: box-shadow .2s; }
.cs-faq details[open] { box-shadow: var(--cs-shadow); }
.cs-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font-weight: 550; color: var(--cs-ink); }
.cs-site summary { list-style: none; }
.cs-site summary::-webkit-details-marker { display: none; }
.cs-steps summary, .cs-tbl > summary { display: flex; align-items: center; gap: 10px; }
.cs-steps summary::before, .cs-tbl > summary::before { content: ""; flex: 0 0 14px; height: 14px; background: var(--cs-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s; }
.cs-steps[open] > summary::before, .cs-tbl[open] > summary::before { transform: rotate(90deg); }
.cs-faq summary::after { content: ""; flex: 0 0 9px; width: 9px; height: 9px; border-right: 1.75px solid var(--cs-muted); border-bottom: 1.75px solid var(--cs-muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.cs-faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.cs-faq details p { margin: 0; padding: 0 20px 18px; color: var(--cs-muted); max-width: 36em; }
.cs-related { margin-top: 60px; }
.cs-related h2 { font-size: 1.45rem; margin-bottom: 16px; }

/* tool icons: app-style tiles in the tool's category colour */
.cs-ti { display: inline-grid; place-items: center; flex: 0 0 var(--ti); width: var(--ti); height: var(--ti); border-radius: calc(var(--ti) * .28); background: var(--cs-panel); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 6px -2px color-mix(in srgb, var(--cs-panel) 60%, transparent); }
.cs-ti svg { display: block; }
.cs-ti-sm { box-shadow: none; }
.cs-calc-title { display: flex; align-items: center; gap: 16px; margin: 12px 0 10px; }
.cs-calc-title h1 { margin: 0; }
@media (max-width: 640px) { .cs-calc-title { gap: 12px; } .cs-calc-title .cs-ti { --ti: 46px !important; } }
/* link lists as cards (related, category, search) */
.cs-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 16px; }
.cs-site .cs-grid-list a { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-content: start; column-gap: 14px; height: 100%; box-sizing: border-box; padding: 16px 18px; background: var(--cs-surface); border: var(--cs-hair); border-radius: 14px; color: var(--cs-text); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.cs-site .cs-grid-list a:hover { border-color: var(--cs-border-strong); box-shadow: var(--cs-shadow); transform: translateY(-2px); color: var(--cs-text); }
.cs-grid-list .cs-ti { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
.cs-grid-list strong { grid-column: 2; color: var(--cs-ink); font-weight: 600; align-self: center; }
.cs-grid-list span:not(.cs-ti) { grid-column: 2; font-size: .88rem; color: var(--cs-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 3em; align-self: start; margin-top: 4px; }
.cs-grid-list a::after { grid-column: 3; grid-row: 1; align-self: start; margin-top: .25em; color: var(--cs-faint); }
.cs-grid-list a:hover::after { color: var(--cs-ink); transform: translateX(3px); }
.cs-filter { position: relative; display: flex; align-items: center; max-width: 440px; margin: 0 0 18px; }
.cs-filter > svg { position: absolute; left: 14px; color: var(--cs-muted); pointer-events: none; }
.cs-site .cs-filter input { width: 100%; height: 46px; box-sizing: border-box; padding: 0 16px 0 42px; border: 1px solid var(--cs-border); border-radius: 12px; background: var(--cs-surface); color: var(--cs-ink); font: 450 1rem var(--cs-font); box-shadow: var(--cs-shadow-sm); }
.cs-site .cs-filter input::placeholder { color: var(--cs-faint); opacity: 1; }
.cs-site .cs-filter input:focus { outline: 2px solid transparent; border-color: var(--cs-accent); box-shadow: 0 0 0 4px var(--cs-accent-soft); }
.cs-empty { color: var(--cs-muted); padding: 24px 0; }
.cs-sm-h { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin: 40px 0 12px; }
.cs-sm-h small { font-size: .85rem; font-weight: 450; color: var(--cs-muted); }
.cs-sm-list { columns: 3 220px; column-gap: 32px; list-style: none; padding: 0; margin: 0; }
.cs-sm-list li { break-inside: avoid; }
.cs-site .cs-sm-list a { display: block; padding: 8px 0; color: var(--cs-text); border-bottom: var(--cs-hair); text-decoration: none; }
.cs-site .cs-sm-list a:hover { color: var(--cs-accent); }
.cs-prose { max-width: 36em; font-size: 1.04rem; }
.cs-prose h2 { font-size: 1.4rem; margin: 2.2rem 0 .7rem; }
.cs-prose > p:first-child { font-size: 1.12rem; color: var(--cs-muted); }

/* ---------- calculator ---------- */
.cs-calc { position: relative; background: var(--cs-surface); border: var(--cs-hair); border-radius: 22px; box-shadow: var(--cs-shadow); overflow: hidden; }
[data-calc]:not([data-mounted]) { min-height: 460px; }
.cs-skel { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 24px; padding: 24px; min-height: 412px; box-sizing: border-box; background: var(--cs-surface); border: var(--cs-hair); border-radius: 22px; }
.cs-skel span { border-radius: 12px; background: var(--cs-surface-2); animation: cs-pulse-bg 1.4s ease-in-out infinite alternate; }
.cs-skel span:nth-child(2) { grid-row: span 3; background: var(--cs-panel); opacity: .9; }
@keyframes cs-pulse-bg { to { opacity: .55; } }
@media (max-width: 860px) { .cs-skel { grid-template-columns: 1fr; } }
.cs-tabs { display: flex; gap: 4px; margin: 18px 18px 0; padding: 4px; overflow-x: auto; scrollbar-width: none; background: var(--cs-surface-2); border: var(--cs-hair); border-radius: 12px; width: fit-content; max-width: calc(100% - 36px); box-sizing: border-box; }
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-site .cs-calc .cs-tabs button, .cs-site .cs-calc .cs-tabs button:hover, .cs-site .cs-calc .cs-tabs button:focus { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--cs-muted); font: 500 .92rem var(--cs-font); cursor: pointer; white-space: nowrap; box-shadow: none; }
.cs-site .cs-calc .cs-tabs button:hover { color: var(--cs-ink); }
.cs-site .cs-calc .cs-tabs button.is-on { background: var(--cs-surface); color: var(--cs-cat); font-weight: 650; box-shadow: var(--cs-shadow-sm), 0 0 0 1.5px var(--cs-cat); }
.cs-body { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
@media (max-width: 860px) { .cs-body { grid-template-columns: minmax(0, 1fr); } }
.cs-form { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cs-form-in { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 861px) { .cs-calc:not(.cs-embed) .cs-form.is-pinned .cs-form-in { position: sticky; top: calc(var(--cs-header-h) + 20px); } }
@media (max-width: 860px) { .cs-form { padding: 20px; } }
.cs-out { padding: 18px 18px 26px 0; min-width: 0; }
.cs-calc:not(.cs-embed) .cs-out .cs-primary:first-child { padding-top: 26px; }
@media (max-width: 860px) { .cs-out { padding: 0 16px 20px; } }
.cs-field label, .cs-label { display: block; font-weight: 550; font-size: .9rem; margin-bottom: 7px; color: var(--cs-ink); }
.cs-site .cs-calc input[type=text], .cs-site .cs-calc input[type=number], .cs-site .cs-calc input[type=date], .cs-site .cs-calc input[type=time], .cs-site .cs-calc input[type=search], .cs-site .cs-calc select, .cs-site .cs-calc textarea,
.cs-site .cs-contact input[type=text], .cs-site .cs-contact input[type=email], .cs-site .cs-contact select, .cs-site .cs-contact textarea {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 11px 14px; border: 1px solid var(--cs-border-strong); border-radius: 12px; background: var(--cs-surface); color: var(--cs-ink); font: 500 1.05rem var(--cs-font); line-height: 1.35; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; font-variant-numeric: tabular-nums; }
.cs-site .cs-calc textarea { font: 450 .97rem var(--cs-mono); min-height: 110px; resize: vertical; }
.cs-site .cs-contact textarea { min-height: 140px; resize: vertical; font-weight: 450; }
.cs-site .cs-calc select, .cs-site .cs-contact select { padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23586170' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.cs-site .cs-calc input:hover, .cs-site .cs-calc select:hover, .cs-site .cs-calc textarea:hover { border-color: var(--cs-ink); }
.cs-site .cs-calc input:focus, .cs-site .cs-calc select:focus, .cs-site .cs-calc textarea:focus, .cs-site .cs-contact input:focus, .cs-site .cs-contact select:focus, .cs-site .cs-contact textarea:focus { outline: 2px solid transparent; border-color: var(--cs-accent); box-shadow: 0 0 0 4px var(--cs-accent-soft); }
.cs-site .cs-calc input::placeholder, .cs-site .cs-calc textarea::placeholder { color: var(--cs-faint); opacity: 1; }
.cs-calc input[type=date]::-webkit-calendar-picker-indicator, .cs-calc input[type=time]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }
@media (prefers-color-scheme: dark) { .cs-calc input[type=date]::-webkit-calendar-picker-indicator, .cs-calc input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); } }
.cs-calc input[type=checkbox], .cs-calc input[type=radio], .cs-calc input[type=range] { accent-color: var(--cs-accent); }
.cs-help { display: block; color: var(--cs-muted); font-size: .84rem; margin-top: 6px; line-height: 1.45; }
.cs-affix { display: flex; align-items: stretch; flex: 1; min-width: 0; border: 1px solid var(--cs-border-strong); border-radius: 12px; overflow: hidden; background: var(--cs-surface); transition: border-color .15s, box-shadow .15s; }
.cs-affix:hover { border-color: var(--cs-ink); }
.cs-affix span { display: flex; align-items: center; padding: 0 13px; background: var(--cs-surface-2); color: var(--cs-muted); font-size: .95rem; font-weight: 500; }
.cs-affix span:first-child { border-right: var(--cs-hair); }
.cs-affix span:last-child:not(:first-child) { border-left: var(--cs-hair); }
.cs-site .cs-calc .cs-affix input[type=text] { border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
.cs-affix:focus-within { border-color: var(--cs-accent); box-shadow: 0 0 0 4px var(--cs-accent-soft); }
.cs-unit { display: flex; gap: 8px; align-items: center; }
.cs-site .cs-calc .cs-unit > select { width: auto; flex: 0 0 auto; max-width: 46%; }
.cs-unit .cs-ftin, .cs-unit .cs-cm { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; }
/* ft / in boxes always fit two digits, even in narrow embeds */
.cs-site .cs-calc .cs-ftin input[type=text] { min-width: 3.6em; padding-left: 10px; padding-right: 8px; }
.cs-embed .cs-unit > select { max-width: 40%; padding-left: 10px; padding-right: 30px; background-position: right 10px center; }
.cs-embed .cs-unit.cs-height { flex-wrap: wrap; }
.cs-embed .cs-unit.cs-height .cs-ftin, .cs-embed .cs-unit.cs-height .cs-cm { flex: 1 0 100%; }
.cs-site .cs-embed .cs-unit.cs-height > select { max-width: none; width: 100%; }
.cs-unit [hidden] { display: none !important; }
.cs-unit em { font-style: normal; color: var(--cs-muted); font-weight: 500; font-size: .9rem; }
.cs-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: var(--cs-hair); border-radius: 12px; background: var(--cs-surface-2); }
.cs-seg label { flex: 1 1 auto; margin: 0; font-weight: 500; cursor: pointer; position: relative; }
.cs-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-seg span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 12px; border-radius: 9px; font-size: .92rem; color: var(--cs-muted); text-align: center; transition: background .15s, color .15s, box-shadow .15s; }
.cs-seg label:hover span { color: var(--cs-ink); }
.cs-seg input:checked + span { background: var(--cs-surface); color: var(--cs-cat); font-weight: 650; box-shadow: var(--cs-shadow-sm), 0 0 0 1.5px var(--cs-cat); }
.cs-seg input:focus-visible + span { outline: 2px solid var(--cs-accent); outline-offset: -2px; }
.cs-check { display: flex !important; gap: 10px; align-items: center; font-weight: 500 !important; cursor: pointer; min-height: 36px; }
.cs-check input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }
.cs-heading { margin: 8px 0 -6px; padding-top: 16px; border-top: var(--cs-hair); font-size: .82rem; color: var(--cs-muted); font-weight: 600; }
.cs-field:first-child .cs-heading { border-top: 0; padding-top: 0; }
.cs-mode-intro { margin: 0; color: var(--cs-muted); font-size: .92rem; }
.cs-field[hidden] { display: none; }
.cs-range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 8px 0 0; background: transparent; cursor: pointer; --p: 50%; touch-action: pan-y; }
.cs-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cs-cat) var(--p), var(--cs-border) var(--p)); }
.cs-range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--cs-border); }
.cs-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--cs-cat); }
.cs-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--cs-surface); border: 2px solid var(--cs-cat); box-shadow: 0 1px 3px rgba(16, 20, 24, .25); transition: transform .1s; }
.cs-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--cs-surface); border: 1px solid var(--cs-border-strong); }
.cs-range:active::-webkit-slider-thumb { transform: scale(1.15); }

/* buttons */
.cs-actions { display: flex; gap: 10px; margin-top: 4px; }
.cs-site .cs-calc .cs-btn, .cs-site .cs-calc button.cs-btn { background: var(--cs-panel); border-color: var(--cs-panel); color: #fff; }
.cs-site .cs-btn, .cs-site button.cs-btn, .cs-site .cs-btn:focus { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid var(--cs-ink); border-radius: 12px; background: var(--cs-ink); color: var(--cs-bg); font: 600 .98rem var(--cs-font); text-transform: none; letter-spacing: 0; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; }
.cs-site .cs-btn:hover, .cs-site button.cs-btn:hover { background: color-mix(in srgb, var(--cs-ink) 86%, var(--cs-bg)); color: var(--cs-bg); border-color: var(--cs-ink); }
.cs-site .cs-btn:active { transform: translateY(1px); }
.cs-actions .cs-btn:first-child { flex: 1; }
.cs-site .cs-btn-ghost, .cs-site button.cs-btn-ghost, .cs-site button.cs-btn-ghost:focus, .cs-site button.cs-btn-ghost:hover { background: var(--cs-surface); color: var(--cs-ink); border-color: var(--cs-border); }
.cs-site button.cs-btn-ghost:hover { border-color: var(--cs-border-strong); }
.cs-site .cs-btn-link, .cs-site .cs-btn-link:hover, .cs-site .cs-btn-link:focus { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--cs-accent); font: 550 .88rem var(--cs-font); cursor: pointer; text-transform: none; text-decoration: none; }
.cs-site .cs-btn-link:hover { background: var(--cs-accent-soft); }

/* results: the dark instrument panel */
/* Copy / Share sit in the panel's top-right corner, so the panel top lines up with the first input */
.cs-out { position: relative; }
.cs-result-head { position: absolute; top: 28px; right: 34px; z-index: 1; display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin: 0; }
.cs-site .cs-result-head .cs-btn-link, .cs-site .cs-result-head .cs-btn-link:hover, .cs-site .cs-result-head .cs-btn-link:focus { color: var(--cs-panel-accent); min-height: 30px; padding: 0 8px; }
.cs-site .cs-result-head .cs-btn-link:hover { background: var(--cs-panel-2); }
@media (max-width: 860px) { .cs-result-head { top: 10px; right: 30px; } }
.cs-out:has(> .cs-error) .cs-result-head { position: static; }
.cs-result-head > div { display: flex; gap: 2px; }
.cs-primary-grid { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 20px; padding: 26px 26px 6px; background: var(--cs-panel); color: var(--cs-panel-text); border-radius: 18px; }
.cs-primary { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; padding: 14px 18px 20px 0; min-width: 0; border-top: 1px solid var(--cs-panel-line); }
.cs-primary:first-child { flex-basis: 100%; border-top: 0; padding: 0 0 22px; }
.cs-p-label { font-size: .86rem; color: var(--cs-panel-muted); font-weight: 500; }
.cs-p-value { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 600; color: var(--cs-panel-text); letter-spacing: -.025em; line-height: 1.12; overflow-wrap: break-word; word-break: normal; }
/* figures never split mid-number; text values (e.g. "5 months, 5 days") may still wrap at spaces */
.cs-p-value { hyphens: none; }
.cs-primary:first-child .cs-p-value { font-size: clamp(2.5rem, 5.6vw, 4.2rem); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.cs-p-sub { font-size: .9rem; color: var(--cs-panel-muted); }
.cs-primary:first-child .cs-p-label::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--cs-panel-accent); vertical-align: .1em; }
.cs-rows { margin: 0 0 20px; padding: 2px 4px; }
.cs-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 11px 4px; border-bottom: var(--cs-hair); }
.cs-rows > div:last-child { border-bottom: 0; }
.cs-rows dt { color: var(--cs-muted); font-size: .97rem; min-width: 0; }
.cs-rows dd { margin: 0; font-weight: 600; text-align: right; color: var(--cs-ink); }
.cs-rows .cs-strong { background: var(--cs-surface-2); border-radius: 10px; border-bottom-color: transparent; margin: 4px 0; padding: 12px 12px; }
.cs-rows .cs-strong dt, .cs-rows .cs-strong dd { color: var(--cs-ink); font-weight: 650; }
@media (max-width: 640px) { .cs-rows dt { flex: 1 1 0; } .cs-rows dd { white-space: nowrap; flex: 0 0 auto; } }
.cs-error { display: flex; gap: 12px; align-items: flex-start; background: var(--cs-err-soft); color: var(--cs-err); border: 1px dashed var(--cs-err); border-radius: 14px; padding: 14px 16px; font-weight: 550; }
.cs-error::before { content: ""; flex: 0 0 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.cs-note { color: var(--cs-muted); font-size: .88rem; line-height: 1.55; }
.cs-steps { background: var(--cs-surface-2); border: var(--cs-hair); border-radius: 14px; padding: 0 18px; margin: 16px 0; }
.cs-steps summary { cursor: pointer; font-weight: 600; padding: 14px 0; color: var(--cs-ink); }
.cs-steps ol { margin: 0 0 16px; padding-left: 1.4rem; }
.cs-steps li { margin: 8px 0; font-family: var(--cs-mono); font-size: .92rem; }
.cs-steps li::marker { color: var(--cs-muted); font-family: var(--cs-font); }
.cs-chart { margin: 16px 0; padding: 18px; background: var(--cs-surface); border: var(--cs-hair); border-radius: 16px; }
/* inside the calculator card, charts are sections, not nested cards */
.cs-calc .cs-chart { margin: 8px 0 0; padding: 20px 4px 4px; background: none; border: 0; border-top: var(--cs-hair); border-radius: 0; }
.cs-chart figcaption, .cs-tbl h3, .cs-tbl h4, .cs-fun-h { font-style: normal; font-weight: 600; font-size: .95rem; margin: 0 0 12px; color: var(--cs-ink); }
.cs-chart svg { width: 100%; height: auto; display: block; }
.cs-donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.cs-donut svg { width: 170px; flex: 0 0 170px; }
.cs-legend { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.cs-legend li { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.cs-legend li span { color: var(--cs-muted); }
.cs-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 10px; }
.cs-legend i.cs-lg-line { width: 22px; height: 0; flex-basis: 22px; border-radius: 0; background: none; }
.cs-legend-row { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
.cs-grid { stroke: var(--cs-border); stroke-width: 1; }
.cs-ax { fill: var(--cs-muted); font-size: 12px; font-family: var(--cs-font); }
.cs-tbl { margin: 16px 0; }
.cs-tbl > summary { cursor: pointer; font-weight: 600; padding: 14px 18px; background: var(--cs-surface-2); border: var(--cs-hair); border-radius: 14px; color: var(--cs-ink); }
.cs-tbl[open] > summary { margin-bottom: 10px; }
.cs-table-wrap { overflow-x: auto; border: var(--cs-hair); border-radius: 14px; background: var(--cs-surface); }
.cs-tbl:not(.is-expanded) .cs-row-more { display: none; }
/* inside the calculator card, tables sit on hairlines instead of their own box */
.cs-calc .cs-table-wrap { border: 0; border-top: var(--cs-hair); border-bottom: var(--cs-hair); border-radius: 0; }
.cs-tbl-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; }
.cs-table-wrap table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .92rem; margin: 0; }
.cs-table-wrap th { position: sticky; top: 0; z-index: 1; background: var(--cs-surface-2); text-align: right; padding: 11px 14px; border-bottom: var(--cs-hair); white-space: nowrap; font-weight: 600; color: var(--cs-ink); }
.cs-table-wrap td { text-align: right; padding: 10px 14px; border-bottom: var(--cs-hair); white-space: nowrap; }
.cs-table-wrap tbody tr:last-child td { border-bottom: 0; }
.cs-table-wrap tbody tr:hover td { background: var(--cs-surface-2); }
.cs-table-wrap th:first-child, .cs-table-wrap td:first-child { text-align: left; }
.cs-html { margin: 12px 0; }
.cs-mono { font-family: var(--cs-mono); }
.cs-fun { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; list-style: none; margin: 0 0 8px; padding: 0; }
.cs-fun li { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--cs-surface-2); border: var(--cs-hair); border-radius: 14px; }
.cs-fun strong { color: var(--cs-ink); font-size: 1.1rem; font-weight: 650; }
.cs-fun small { color: var(--cs-muted); font-size: .84rem; }
.cs-site .cs-sticky { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 18px; border: 0; border-radius: 16px; background: var(--cs-panel); color: var(--cs-panel-text); font: 500 .88rem var(--cs-font); box-shadow: var(--cs-shadow-lg); cursor: pointer; text-align: left; animation: cs-up .25s cubic-bezier(.16, 1, .3, 1); }
.cs-site .cs-sticky[hidden] { display: none; }
.cs-sticky span { color: var(--cs-panel-muted); }
.cs-sticky strong { font-size: 1.25rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.cs-sticky em { margin-left: auto; font-style: normal; font-size: .82rem; color: var(--cs-panel-accent); white-space: nowrap; }
@keyframes cs-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.cs-embed-more { display: inline-flex; align-items: center; margin-top: 4px; font-weight: 550; text-decoration: none; }

/* ---------- homepage ---------- */
.cs-home-hero { padding: 64px 0 56px; background: var(--cs-brand-tint); border-bottom: var(--cs-hair); }
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); gap: 56px; align-items: center; }
@media (max-width: 1020px) { .cs-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } .cs-home-hero { padding-top: 40px; } }
.cs-home-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); font-weight: 650; letter-spacing: -.045em; line-height: 1.02; margin: 0 0 18px; max-width: 12ch; }
.cs-home-hero .cs-lead { margin: 0 0 26px; max-width: 30em; font-size: 1.14rem; }
.cs-searchbox { position: relative; display: flex; align-items: center; max-width: 540px; }
.cs-searchbox > svg { position: absolute; left: 18px; color: var(--cs-muted); pointer-events: none; }
.cs-site .cs-searchbox input { width: 100%; height: 58px; box-sizing: border-box; padding: 0 20px 0 52px; border: var(--cs-hair); border-radius: 16px; background: var(--cs-surface); color: var(--cs-ink); font: 450 1.06rem var(--cs-font); box-shadow: var(--cs-shadow); transition: border-color .15s, box-shadow .15s; }
.cs-site .cs-searchbox input::placeholder { color: var(--cs-faint); opacity: 1; }
.cs-site .cs-searchbox input:focus { outline: 2px solid transparent; border-color: var(--cs-accent); box-shadow: 0 0 0 4px var(--cs-accent-soft), var(--cs-shadow); }
.cs-searchbox .cs-quick-list { left: 0; right: 0; min-width: 0; }
.cs-page-hero .cs-searchbox { margin-top: 18px; }
.cs-facts-line { margin: 14px 0 0; font-size: .93rem; color: var(--cs-muted); }
.cs-popular { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 18px 0 0; max-width: 560px; font-size: .95rem; }
.cs-popular > span { color: var(--cs-muted); }
.cs-site .cs-popular a { color: var(--cs-ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--cs-border-strong); text-underline-offset: .25em; }
.cs-site .cs-popular a:hover { color: var(--cs-accent); text-decoration-color: currentColor; }
.cs-try { background: var(--cs-surface); border: var(--cs-hair); border-radius: 24px; box-shadow: var(--cs-shadow-lg); overflow: hidden; }
.cs-try-head { display: flex; padding: 14px 14px 0; }
.cs-pills { display: flex; gap: 4px; padding: 4px; width: 100%; background: var(--cs-surface-2); border: var(--cs-hair); border-radius: 12px; }
.cs-site .cs-pills button, .cs-site .cs-pills button:hover, .cs-site .cs-pills button:focus { flex: 1; min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--cs-muted); font: 500 .92rem var(--cs-font); cursor: pointer; }
.cs-site .cs-pills button:hover { color: var(--cs-ink); }
.cs-site .cs-pills button[aria-selected="true"] { background: var(--cs-surface); color: var(--cs-ink); box-shadow: var(--cs-shadow-sm), 0 0 0 1px var(--cs-border); }
.cs-try .cs-calc { border: 0; border-radius: 0; box-shadow: none; }
.cs-embed .cs-body { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.cs-embed .cs-form { padding: 18px; gap: 14px; }
.cs-embed .cs-out { padding: 18px 14px 18px 0; }
.cs-embed .cs-actions, .cs-embed .cs-help, .cs-embed .cs-result-head { display: none; }
.cs-embed .cs-primary-grid { padding: 22px 22px 4px; margin-bottom: 10px; }
.cs-embed .cs-primary:first-child .cs-p-value { font-size: clamp(2.1rem, 3.6vw, 3rem); }
.cs-embed .cs-rows dt, .cs-embed .cs-rows dd { font-size: .9rem; }
.cs-embed .cs-rows > div { padding: 8px 2px; }
@media (max-width: 560px) { .cs-embed .cs-body { grid-template-columns: minmax(0, 1fr); } .cs-embed .cs-out { padding: 0 14px 16px; } }
[data-embed]:not([data-mounted]) { min-height: 340px; }
.cs-skel-sm { min-height: 340px; grid-template-columns: 1fr 1fr; border: 0; border-radius: 0; }
.cs-sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin: 0 0 22px; }
.cs-sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 650; letter-spacing: -.035em; margin: 0; }
.cs-sec-head p { margin: 0; color: var(--cs-muted); }
.cs-sec-head .cs-filter { margin: 0; flex: 0 1 360px; }
.cs-intent, .cs-dir-sec, .cs-mine { margin-top: 72px; }
.cs-mine { margin-top: 24px; }
.cs-mine h2 { font-size: 1.05rem; margin: 0 0 10px; color: var(--cs-muted); font-weight: 550; }
.cs-mine-list { display: flex; gap: 10px; overflow-x: auto; list-style: none; margin: 0; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
.cs-mine-list li { flex: 0 0 auto; scroll-snap-align: start; }
.cs-site .cs-mine-list a { display: flex; min-width: 180px; padding: 14px 16px; background: var(--cs-surface); border: var(--cs-hair); border-radius: 14px; color: var(--cs-ink); font-weight: 550; text-decoration: none; }
.cs-site .cs-mine-list a:hover { border-color: var(--cs-border-strong); box-shadow: var(--cs-shadow); }
.cs-mine-tag { display: none; }
.cs-intent-tabs { display: flex; gap: 4px; padding: 4px; width: fit-content; max-width: 100%; box-sizing: border-box; overflow-x: auto; scrollbar-width: none; background: var(--cs-surface); border: var(--cs-hair); border-radius: 14px; }
.cs-intent-tabs::-webkit-scrollbar { display: none; }
.cs-site .cs-intent-tabs button, .cs-site .cs-intent-tabs button:focus { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--cs-muted); font: 500 .94rem var(--cs-font); cursor: pointer; white-space: nowrap; }
.cs-intent-tabs button svg { display: none; }
.cs-site .cs-intent-tabs button:hover { color: var(--cs-ink); background: var(--cs-surface-2); }
.cs-site .cs-intent-tabs button[aria-selected="true"] { background: var(--cs-ink); color: var(--cs-bg); }
.cs-intent-blurb { color: var(--cs-muted); margin: 18px 0 14px; font-size: 1.04rem; max-width: 38em; }
.cs-intent-panel { animation: cs-fade .3s cubic-bezier(.16, 1, .3, 1); }
@keyframes cs-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* bento index: category cards of different sizes */
.cs-dir { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; grid-auto-flow: dense; }
@media (max-width: 1020px) { .cs-dir { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cs-dir { grid-template-columns: minmax(0, 1fr); } }
.cs-cat { background: var(--cs-surface); border: var(--cs-hair); border-radius: 20px; padding: 20px 20px 14px; }
@media (min-width: 1021px) { .cs-dir > .cs-cat:first-child { grid-row: span 2; } .cs-dir > .cs-cat:last-child { grid-column: span 2; } .cs-dir > .cs-cat:last-child ul { columns: 2; column-gap: 24px; } .cs-dir > .cs-cat:last-child li { break-inside: avoid; } }
.cs-cat header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cs-cat .cs-ico { color: var(--cs-ink); }
.cs-cat h3::after, .cs-cat h2::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--cs-cat); vertical-align: .12em; }
.cs-cat h2, .cs-cat h3 { font-size: 1.06rem; font-weight: 600; margin: 0; letter-spacing: -.015em; }
.cs-site .cs-cat h2 a, .cs-site .cs-cat h3 a { color: var(--cs-ink); text-decoration: none; }
.cs-site .cs-cat h2 a:hover, .cs-site .cs-cat h3 a:hover { color: var(--cs-accent); }
.cs-cat header p { margin: 0; font-size: .84rem; color: var(--cs-muted); }
.cs-cat ul { list-style: none; margin: 0; padding: 0; }
.cs-site .cs-cat li a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; margin: 0 -10px; border-radius: 9px; color: var(--cs-text); font-size: .95rem; line-height: 1.3; text-decoration: none; box-sizing: border-box; }
.cs-site .cs-cat li a:hover { background: var(--cs-surface-2); color: var(--cs-ink); }
.cs-cat .cs-extra { display: none; }
#cs-dir.is-filtering .cs-extra { display: block; }
.cs-cat .cs-more { margin-left: 0; }
/* category page: live lead calculator, popular picks, compact A–Z */
.cs-cat-lead { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; margin: 8px 0 56px; }
@media (max-width: 960px) { .cs-cat-lead { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.cs-cat-lead h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.03em; margin: 0 0 10px; }
.cs-cat-lead p { color: var(--cs-muted); margin: 0 0 8px; max-width: 30em; }
.cs-cat-lead .cs-more { margin-left: 0; }
/* daily brain break: one dark card, the quiz sits directly on it */
.cs-play-band { margin: 72px 0 0; padding: 0 0 80px; }
.cs-play-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding: 44px; background: var(--cs-panel); color: var(--cs-panel-text); border-radius: 28px; }
@media (max-width: 900px) { .cs-play-card { grid-template-columns: minmax(0, 1fr); padding: 26px; gap: 26px; border-radius: 22px; } }
.cs-play-card h2 { color: var(--cs-panel-text); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 650; letter-spacing: -.035em; margin: 0 0 12px; }
.cs-play-copy p { margin: 0; max-width: 30em; color: var(--cs-panel-muted); }
.cs-play-stats { display: flex; gap: 28px; list-style: none; padding: 0; margin: 26px 0 0; }
.cs-play-stats strong { display: block; font-size: 1.7rem; font-weight: 600; color: var(--cs-panel-text); }
.cs-play-stats span { font-size: .85rem; color: var(--cs-panel-muted); }
.cs-play { position: relative; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; justify-content: center; color: var(--cs-panel-text); }
.cs-play-intro { text-align: left; }
.cs-play-big { font-weight: 550; color: var(--cs-panel-text); margin: 0 0 16px; font-size: 1.05rem; }
.cs-q-top { display: flex; justify-content: space-between; font-size: .86rem; color: var(--cs-panel-muted); }
.cs-q-score { color: var(--cs-panel-accent); font-weight: 600; }
.cs-q-bar { height: 4px; margin: 12px 0 18px; border-radius: 4px; background: var(--cs-panel-line); overflow: hidden; }
.cs-q-bar i { display: block; height: 100%; background: var(--cs-panel-accent); transition: width .1s linear; }
.cs-q-text { font-size: 1.35rem; font-weight: 600; color: var(--cs-panel-text); margin: 0 0 18px; line-height: 1.3; letter-spacing: -.02em; }
.cs-q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-site .cs-q-opts button, .cs-site .cs-q-opts button:focus { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 14px; border: 1px solid var(--cs-panel-line); border-radius: 12px; background: var(--cs-panel-2); color: var(--cs-panel-text); font: 600 1.05rem var(--cs-font); cursor: pointer; text-align: left; transition: background .15s, border-color .15s, transform .1s; }
.cs-site .cs-q-opts button:hover:not(:disabled) { border-color: var(--cs-panel-muted); background: var(--cs-panel-2); color: var(--cs-panel-text); }
.cs-site .cs-q-opts button:active:not(:disabled) { transform: scale(.98); }
.cs-q-opts kbd { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--cs-panel-line); font: 600 .78rem var(--cs-font); color: var(--cs-panel-muted); }
.cs-site .cs-q-opts button.is-right { border: 2px solid var(--cs-panel-accent); color: var(--cs-panel-accent); }
.cs-site .cs-q-opts button.is-wrong { border: 2px dashed var(--cs-panel-err); color: var(--cs-panel-err); animation: cs-shake .3s; }
.cs-site .cs-q-opts button:disabled { cursor: default; }
@keyframes cs-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.cs-q-fb { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .95rem; background: var(--cs-panel-2); color: var(--cs-panel-text); }
.cs-q-fb.is-ok strong { color: var(--cs-panel-accent); }
.cs-q-fb.is-bad strong { color: var(--cs-panel-err); }
.cs-q-fb p { margin: 0; }
.cs-site .cs-q-fb a { color: var(--cs-panel-accent); }
.cs-q-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px !important; flex-wrap: wrap; }
.cs-site .cs-play .cs-btn, .cs-site .cs-play button.cs-btn { background: var(--cs-panel-text); color: var(--cs-panel); border-color: var(--cs-panel-text); }
.cs-site .cs-play .cs-btn-ghost { background: transparent; color: var(--cs-panel-text); border-color: var(--cs-panel-line); }
.cs-q-end { text-align: left; }
.cs-q-grade { font-size: 1.8rem; font-weight: 650; color: var(--cs-panel-text); margin: 0; letter-spacing: -.03em; }
.cs-q-total { color: var(--cs-panel-muted); margin: 6px 0 18px; }
.cs-q-total strong { color: var(--cs-panel-accent); font-size: 1.3rem; }
.cs-q-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-q-note { font-size: .88rem; color: var(--cs-panel-muted); margin: 14px 0 0; }
.cs-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cs-confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: cs-fall 1.8s ease-in forwards; }
@keyframes cs-fall { to { transform: translateY(340px) rotate(540deg); opacity: 0; } }
@media (max-width: 520px) { .cs-q-opts { grid-template-columns: 1fr; } }

/* ---------- ad slots (rendered only when switched on in Settings → Calc Suite) ---------- */
.cs-ad { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 28px 0; padding: 10px 0 14px; min-height: var(--cs-ad-h, 280px); box-sizing: border-box; overflow: hidden; background: var(--cs-surface); border: var(--cs-hair); border-radius: 16px; }
.cs-ad::before { content: "Advertisement"; font-size: .72rem; color: var(--cs-muted); margin-bottom: 6px; }
.cs-ad-side { --cs-ad-h: 600px; margin: 0; }
@media (max-width: 640px) { .cs-ad { --cs-ad-h: 300px; } }

/* ---------- contact + notices ---------- */
.cs-contact { margin-top: 24px; padding: 26px; border: var(--cs-hair); border-radius: 20px; background: var(--cs-surface); box-shadow: var(--cs-shadow); }
.cs-contact p { margin: 0 0 18px; }
.cs-contact label { display: block; font-weight: 550; font-size: .92rem; margin-bottom: 7px; color: var(--cs-ink); }
.cs-contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .cs-contact-row { grid-template-columns: 1fr; } }
.cs-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cs-notice { padding: 14px 18px; border-radius: 14px; margin: 16px 0; font-weight: 500; }
.cs-ok { background: var(--cs-ok-soft); color: var(--cs-ok); border: 1px solid var(--cs-accent-line); }
.cs-bad { background: var(--cs-err-soft); color: var(--cs-err); border: 1px dashed var(--cs-err); }

/* ---------- footer ---------- */
.cs-footer { --cs-panel-text: #fff; --cs-panel-muted: rgba(255, 255, 255, .72); --cs-panel-line: rgba(255, 255, 255, .14); background: var(--cs-footer); color: var(--cs-panel-muted); font-size: .94rem; }
.cs-footer .cs-wrap { padding-top: 56px; padding-bottom: 28px; }
.cs-footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 900px) { .cs-footer-grid { grid-template-columns: 1fr 1fr; } .cs-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .cs-footer-grid { grid-template-columns: 1fr; } }
.cs-site .cs-footer .cs-logo { color: var(--cs-panel-text); }
.cs-footer-brand p { max-width: 34ch; margin: 14px 0 0; line-height: 1.6; }
.cs-footer h2 { color: var(--cs-panel-text); font-size: .9rem; margin: 6px 0 12px; font-weight: 600; letter-spacing: 0; }
.cs-footer ul { list-style: none; margin: 0; padding: 0; }
.cs-site .cs-footer li a { display: inline-block; padding: 6px 0; color: var(--cs-panel-muted); text-decoration: none; }
.cs-site .cs-footer li a:hover { color: var(--cs-panel-text); }
.cs-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--cs-panel-line); font-size: .86rem; }
.cs-footer-bottom p { margin: 0; }
.cs-404 .cs-page-hero, .cs-search-page .cs-page-hero { padding-bottom: 36px; }
.cs-404 h2, .cs-search-page h2 { font-size: 1.35rem; margin: 0 0 14px; }

/* ---------- print ---------- */
@media print {
  .cs-header, .cs-footer, .cs-actions, .cs-tabs, .cs-related, .cs-side, .cs-result-head div, .cs-skip, .cs-faq, .cs-sticky, .cs-fav, .cs-ad { display: none !important; }
  .cs-layout { display: block; }
  .cs-calc { box-shadow: none; }
  .cs-primary-grid { background: none; color: #000; border: 1px solid #999; }
  .cs-p-value, .cs-p-label, .cs-p-sub { color: #000 !important; }
}

/* =====================================================================
   Vivid layer (2026-11): night hero, floating nav, rounded colour cards.
   ===================================================================== */
/* every page hero starts under the floating nav */
.cs-site .cs-page-hero { padding-top: calc(var(--cs-nav-h) + 30px); }
@media (max-width: 640px) { .cs-site .cs-calc-hero { padding-top: calc(var(--cs-nav-h) + 14px); } }
.cs-sec-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -.045em; line-height: 1.05; }
.cs-sec-head h2 em, .cs-site h1 em { font-style: normal; color: var(--cs-accent); }

/* cards and buttons: rounder, lifted by shadow instead of outlined */
.cs-site .cs-grid-list a { border-color: transparent; border-radius: 22px; padding: 18px 20px; box-shadow: var(--cs-shadow); }
.cs-site .cs-grid-list a:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16, 20, 24, .04), 0 22px 44px -18px color-mix(in srgb, var(--cs-cat) 55%, transparent); }
.cs-site .cs-btn, .cs-site button.cs-btn, .cs-site .cs-btn:focus { border-radius: 999px; }
.cs-site .cs-more { min-height: 42px; margin: 8px 0 0; padding: 0 18px; border-radius: 999px; background: var(--cs-surface-2); color: var(--cs-ink); }
.cs-site .cs-more:hover { background: var(--cs-cat-tint); color: var(--cs-ink); }

/* ---------- homepage hero: night sky with soft colour light ---------- */
.cs-site .cs-home-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--cs-nav-h) + 56px) 0 0; background: var(--cs-night); border: 0; color: rgba(255, 255, 255, .76); }
.cs-home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(560px 420px at 12% 18%, rgba(126, 240, 198, .20), transparent 70%),
  radial-gradient(720px 520px at 88% 22%, rgba(124, 92, 255, .32), transparent 70%),
  radial-gradient(900px 420px at 50% 115%, rgba(47, 85, 212, .34), transparent 70%); }
.cs-home-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.2px); background-size: 30px 30px; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%); }
.cs-site .cs-home-hero h1 { color: #fff; font-size: clamp(2.8rem, 6.2vw, 5.3rem); font-weight: 680; letter-spacing: -.05em; line-height: .98; max-width: 11ch; margin-bottom: 22px; }
.cs-site .cs-home-hero h1 em { color: var(--cs-hi); }
.cs-site .cs-home-hero .cs-lead { color: rgba(255, 255, 255, .74); }
.cs-site .cs-home-hero .cs-searchbox input { height: 64px; border: 0; border-radius: 999px; padding-left: 56px; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 24px 60px -16px rgba(126, 240, 198, .45); }
.cs-site .cs-home-hero .cs-searchbox input:focus { box-shadow: 0 0 0 6px color-mix(in srgb, var(--cs-hi) 55%, transparent), 0 24px 60px -16px rgba(126, 240, 198, .55); }
.cs-home-hero .cs-searchbox > svg { left: 22px; }
.cs-home-hero .cs-popular { gap: 8px; align-items: center; margin-top: 22px; }
.cs-home-hero .cs-popular > span { color: rgba(255, 255, 255, .6); margin-right: 4px; }
.cs-site .cs-home-hero .cs-popular a { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: .9rem; text-decoration: none; transition: background .15s, border-color .15s; }
.cs-site .cs-home-hero .cs-popular a:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }
.cs-home-hero .cs-try { position: relative; overflow: visible; border: 0; border-radius: 28px; box-shadow: 0 0 0 8px rgba(255, 255, 255, .06), 0 50px 90px -30px rgba(0, 0, 0, .7); color: var(--cs-text); }
.cs-home-hero .cs-try > [role="tabpanel"] { overflow: hidden; border-radius: 0 0 28px 28px; }
@media (max-width: 1020px) { .cs-site .cs-home-hero { padding-top: calc(var(--cs-nav-h) + 32px); } }

/* ---------- goals: one colour card per intent ---------- */
.cs-intent { margin-top: 88px; }
.cs-goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cs-goal { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: 26px; border-radius: 30px; background: var(--cs-panel); color: rgba(255, 255, 255, .8); transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s; }
.cs-goal::before { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--cs-panel-accent) 38%, transparent), transparent); }
.cs-goal:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -28px var(--cs-panel); }
.cs-goal-art { display: flex; margin-bottom: 26px; padding-left: 6px; }
.cs-goal-art .cs-ti { margin-left: -10px; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cs-goal-art .cs-ti:nth-child(1) { transform: rotate(-8deg); }
.cs-goal-art .cs-ti:nth-child(2) { transform: translateY(-6px); background: var(--cs-panel-accent); color: var(--cs-panel); z-index: 1; }
.cs-goal-art .cs-ti:nth-child(3) { transform: rotate(8deg); }
.cs-goal h3 { margin: 0 0 8px; color: #fff; font-size: 1.4rem; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
.cs-goal p { margin: 0 0 20px; font-size: .95rem; line-height: 1.5; }
.cs-goal ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: auto 0 0; padding: 0; }
.cs-site .cs-goal ul a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .13); color: #fff; font-weight: 550; font-size: .88rem; text-decoration: none; transition: background .15s, color .15s; }
.cs-site .cs-goal ul a:hover { background: var(--cs-panel-accent); color: var(--cs-panel); }
.cs-goal ul .cs-ti { display: none; }
@media (min-width: 1021px) {
  .cs-goal:first-child ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cs-site .cs-goal:first-child ul a { display: flex; gap: 12px; min-height: 60px; padding: 0 16px 0 12px; border-radius: 18px; background: rgba(255, 255, 255, .1); font-size: 1rem; }
  .cs-goal:first-child ul .cs-ti { display: inline-grid; background: rgba(255, 255, 255, .16); color: #fff; }
  .cs-site .cs-goal:first-child ul a:hover { background: var(--cs-panel-accent); color: var(--cs-panel); }
  .cs-site .cs-goal:first-child ul a:hover .cs-ti { background: var(--cs-panel); color: #fff; }
}
@media (min-width: 1021px) {
  .cs-goal:first-child { grid-column: span 2; padding: 32px; }
  .cs-goal:first-child h3 { font-size: clamp(2rem, 3vw, 2.6rem); }
  .cs-goal:first-child p { font-size: 1.08rem; max-width: 26em; }
  .cs-goal:first-child .cs-goal-art { margin-bottom: 30px; transform: scale(1.2); transform-origin: left top; }
  .cs-goal:nth-child(n+2) li:nth-child(n+4) { display: none; }
}
@media (max-width: 1020px) { .cs-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cs-goal:first-child { grid-column: span 2; } }
@media (max-width: 640px) { .cs-goals { grid-template-columns: minmax(0, 1fr); } .cs-goal:first-child { grid-column: auto; } .cs-goal { padding: 22px; border-radius: 26px; } }

/* ---------- category index: colour header on every card ---------- */
.cs-dir-sec { margin-top: 96px; }
.cs-dir { gap: 18px; }
.cs-dir .cs-cat { border: 0; border-radius: 28px; padding: 0 22px 18px; box-shadow: var(--cs-shadow); overflow: hidden; }
.cs-dir .cs-cat header { position: relative; isolation: isolate; overflow: hidden; margin: 0 -22px 14px; padding: 22px; background: var(--cs-panel); }
.cs-dir .cs-cat header::after { content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; right: -90px; top: -130px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--cs-panel-accent) 40%, transparent), transparent); }
.cs-dir .cs-cat .cs-ico { width: 50px; height: 50px; border-radius: 16px; background: rgba(255, 255, 255, .15); color: #fff; }
.cs-dir .cs-cat .cs-ico svg { width: 24px; height: 24px; }
.cs-dir .cs-cat h3 { font-size: 1.25rem; }
.cs-dir .cs-cat h3::after { display: none; }
.cs-site .cs-dir .cs-cat h3 a, .cs-site .cs-dir .cs-cat h3 a:hover { color: #fff; }
.cs-dir .cs-cat header p { color: rgba(255, 255, 255, .86); }
.cs-site .cs-dir .cs-cat li a:hover { background: var(--cs-cat-tint); }

/* ---------- brain break ---------- */
.cs-play-band { margin-top: 96px; }
.cs-play-card { position: relative; isolation: isolate; overflow: hidden; border-radius: 34px; }
.cs-play-card::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(520px 380px at 0% 0%, color-mix(in srgb, var(--cs-panel-accent) 30%, transparent), transparent 70%), radial-gradient(520px 420px at 100% 100%, rgba(126, 240, 198, .18), transparent 70%); }

@media (prefers-color-scheme: dark) {
  .cs-site .cs-cta, .cs-site .cs-mega-all { background: var(--cs-hi); color: var(--cs-night); }
  .cs-cta i, .cs-mega-all .cs-coin { background: var(--cs-night); }
  .cs-cta i::after, .cs-mega-all .cs-coin::after { background: var(--cs-hi); }
  .cs-site .cs-cta:hover, .cs-site .cs-mega-all:hover { background: color-mix(in srgb, var(--cs-hi) 85%, #fff); color: var(--cs-night); }
}

/* ---------- responsive + touch fixes ---------- */
@media (max-width: 1120px) {
  .cs-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cs-site .cs-home-hero h1 { max-width: 14ch; }
  .cs-home-hero .cs-try { max-width: 760px; }
}
@media (max-width: 640px) {
  .cs-site .cs-home-hero .cs-popular a, .cs-site .cs-pills button, .cs-site .cs-goal ul a { min-height: 44px; }
  .cs-site .cs-embed-more { display: inline-flex; align-items: center; min-height: 44px; }
  .cs-site .cs-logo { min-height: 44px; }
  .cs-site .cs-calc .cs-range { height: 44px; }
  .cs-site .cs-calc .cs-tabs button, .cs-site .cs-calc .cs-tabs button:hover, .cs-site .cs-calc .cs-tabs button:focus, .cs-site .cs-tbl-actions .cs-btn-link { min-height: 44px; }
  .cs-site .cs-side-card li a, .cs-site .cs-toc li a { display: flex; align-items: center; min-height: 44px; }
  .cs-site .cs-dir .cs-cat h3 a, .cs-site .cs-sm-h a { display: inline-flex; align-items: center; min-height: 44px; }
}
.cs-x-mode { font-size: .78rem; }

/* ---------- calculator + category heroes: the category colour, calculator lifted over it ---------- */
.cs-site .cs-calc-hero, .cs-site .cs-cat-hero { position: relative; isolation: isolate; overflow: hidden; margin-bottom: 0; background: var(--cs-panel); border: 0; color: rgba(255, 255, 255, .8); }
.cs-site .cs-calc-hero { padding-bottom: 104px; }
.cs-site .cs-cat-hero { padding-bottom: 44px; }
.cs-calc-hero::before, .cs-cat-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(620px 420px at 88% -10%, color-mix(in srgb, var(--cs-panel-accent) 34%, transparent), transparent 70%), radial-gradient(520px 360px at 0% 120%, rgba(10, 16, 32, .35), transparent 70%); }
.cs-calc-hero::after, .cs-cat-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.2px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%); mask-image: linear-gradient(90deg, transparent 30%, #000 100%); }
.cs-site .cs-calc-hero h1, .cs-site .cs-cat-hero h1 { color: #fff; }
.cs-site .cs-calc-hero .cs-lead, .cs-site .cs-cat-hero .cs-lead { color: rgba(255, 255, 255, .86); }
.cs-calc-hero .cs-crumbs ol, .cs-cat-hero .cs-crumbs ol, .cs-site .cs-calc-hero .cs-crumbs a, .cs-site .cs-cat-hero .cs-crumbs a { color: rgba(255, 255, 255, .8); }
.cs-site .cs-calc-hero .cs-crumbs a:hover, .cs-site .cs-cat-hero .cs-crumbs a:hover, .cs-calc-hero .cs-crumbs [aria-current], .cs-cat-hero .cs-crumbs [aria-current] { color: #fff; }
.cs-calc-hero .cs-crumbs li + li::before, .cs-cat-hero .cs-crumbs li + li::before { border-color: rgba(255, 255, 255, .6); }
.cs-calc-hero .cs-meta { color: rgba(255, 255, 255, .82); }
.cs-site .cs-calc-hero .cs-chip, .cs-site .cs-calc-hero .cs-fav, .cs-site .cs-calc-hero .cs-fav:focus { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); color: #fff; border-radius: 999px; }
.cs-site .cs-calc-hero .cs-chip:hover, .cs-site .cs-calc-hero .cs-fav:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .4); color: #fff; }
.cs-calc-hero .cs-chip::before { background: var(--cs-panel-accent); }
.cs-site .cs-calc-hero .cs-fav[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--cs-panel); }
.cs-calc-title .cs-ti, .cs-cat-hero .cs-ico-lg { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .26); box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .45); }
.cs-cat-hero .cs-ico-lg { width: 60px; height: 60px; border-radius: 17px; }
.cs-site .cs-calc-hero + .cs-calc-row { position: relative; z-index: 1; margin-top: -76px; padding-top: 0; }
.cs-calc-row > .cs-calc, .cs-calc-row > [data-calc] > .cs-calc { border: 0; border-radius: 28px; box-shadow: 0 2px 4px rgba(10, 16, 32, .05), 0 34px 70px -34px rgba(10, 16, 32, .5); }
@media (max-width: 640px) {
  .cs-site .cs-calc-hero { padding-bottom: 76px; }
  .cs-site .cs-calc-hero + .cs-calc-row { margin-top: -56px; }
  .cs-calc-row > .cs-calc, .cs-calc-row > [data-calc] > .cs-calc { border-radius: 22px; }
}

/* ---------- tool library (category pages + all calculators) ---------- */
.cs-prose:has(> .cs-lib) { max-width: none; }
.cs-lib { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 36px; align-items: start; }
.cs-lib-side { position: sticky; top: calc(var(--cs-header-h) + 16px); }
.cs-lib-side-in { padding: 14px; background: var(--cs-surface); border-radius: 26px; box-shadow: var(--cs-shadow); }
.cs-lib-side .cs-filter { margin: 0 0 10px; max-width: none; }
.cs-site .cs-lib-side .cs-filter input { border-radius: 999px; }
.cs-lib-nav { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.cs-site .cs-lib-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px 6px 7px; border-radius: 16px; color: var(--cs-text); font-weight: 550; font-size: .95rem; line-height: 1.25; text-decoration: none; transition: background .15s; }
.cs-site .cs-lib-nav a:hover { background: var(--cs-surface-2); color: var(--cs-ink); }
.cs-site .cs-lib-nav a[aria-current] { background: var(--cs-cat-tint); color: var(--cs-ink); font-weight: 650; }
.cs-lib-ico { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; background: var(--cs-panel); color: #fff; }
.cs-lib-ico.cs-lib-all { background: var(--cs-night); color: var(--cs-hi); }
.cs-lib-nav small { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--cs-surface-2); color: var(--cs-muted); font-size: .8rem; font-weight: 550; }
.cs-lib-nav a[aria-current] small { background: var(--cs-surface); }
.cs-lib-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin: 44px 0 16px; }
.cs-lib-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.75rem); letter-spacing: -.03em; }
.cs-site .cs-lib-head h2 a { color: var(--cs-ink); text-decoration: none; }
.cs-site .cs-lib-head h2 a:hover { color: var(--cs-accent); }
.cs-lib-head p { margin: 0; color: var(--cs-muted); font-size: .92rem; }
.cs-lib-main > .cs-lib-head:first-child, .cs-lib-group:first-child .cs-lib-head { margin-top: 0; }
.cs-lib-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.cs-site .cs-lib-grid a { display: flex; align-items: flex-start; gap: 14px; height: 100%; box-sizing: border-box; padding: 16px 18px; background: var(--cs-surface); border-radius: 22px; box-shadow: var(--cs-shadow); color: var(--cs-text); text-decoration: none; transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s; }
.cs-site .cs-lib-grid a:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 20, 24, .04), 0 20px 40px -18px color-mix(in srgb, var(--cs-cat) 55%, transparent); color: var(--cs-text); }
.cs-lib-txt { min-width: 0; }
.cs-lib-txt strong { display: block; color: var(--cs-ink); font-weight: 620; font-size: 1.02rem; line-height: 1.3; letter-spacing: -.01em; }
.cs-lib-txt > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; color: var(--cs-muted); font-size: .9rem; line-height: 1.45; }
.cs-badge { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--cs-cat-tint); color: var(--cs-panel); font-style: normal; font-weight: 650; font-size: .72rem; vertical-align: 2px; letter-spacing: 0; }
.cs-lib .cs-cat-lead { display: block; margin: 40px 0 0; padding: 22px; background: var(--cs-surface); border-radius: 28px; box-shadow: var(--cs-shadow); }
.cs-lib .cs-cat-lead-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.cs-lib .cs-cat-lead h2 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
.cs-lib .cs-cat-lead .cs-more { margin: 0; }
.cs-lib .cs-cat-lead .cs-try { box-shadow: none; border: var(--cs-hair); border-radius: 20px; }
#cs-lib.is-filtering .cs-cat-lead { display: none; }
.cs-lib .cs-empty { padding: 28px; background: var(--cs-surface); border-radius: 22px; text-align: center; color: var(--cs-muted); }
@media (max-width: 1020px) {
  .cs-lib { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cs-lib-side { position: static; }
  .cs-lib-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px -14px; padding: 2px 14px 14px; }
  .cs-lib-nav::-webkit-scrollbar { display: none; }
  .cs-lib-nav li { flex: 0 0 auto; }
  .cs-site .cs-lib-nav a { padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--cs-surface-2); white-space: nowrap; }
  .cs-lib-ico { flex-basis: 30px; width: 30px; height: 30px; border-radius: 50%; }
}
@media (max-width: 700px) {
  .cs-lib-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-lib .cs-cat-lead { padding: 14px; border-radius: 24px; }
  .cs-lib-head { margin-top: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root { --cs-cat-tint: #1d242d; }
  .cs-badge { color: var(--cs-cat); background: color-mix(in srgb, var(--cs-cat) 16%, transparent); }
  .cs-logo svg { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
}
/* long figures (2^100, 25!) wrap instead of pushing the page sideways */
.cs-article p, .cs-article li, .cs-article td { overflow-wrap: anywhere; }

/* ---------- finish-review fixes ---------- */
/* night variant of the coloured hero for About, Contact, All Calculators, Search and 404 */
.cs-ink-night { --cs-panel: var(--cs-night); --cs-panel-2: #121a30; --cs-panel-accent: var(--cs-hi); }
.cs-cat-hero .cs-meta { color: rgba(255, 255, 255, .78); }
.cs-site .cs-cat-hero .cs-searchbox input { border: 0; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08); }
.cs-404 .cs-cat-hero, .cs-search-page .cs-cat-hero { padding-bottom: 48px; }
/* Reset stays secondary next to the category-coloured Calculate */
.cs-site .cs-calc .cs-btn.cs-btn-ghost, .cs-site .cs-calc button.cs-btn.cs-btn-ghost { background: var(--cs-surface); color: var(--cs-ink); border-color: var(--cs-border); }
.cs-site .cs-calc button.cs-btn.cs-btn-ghost:hover { border-color: var(--cs-border-strong); background: var(--cs-surface-2); color: var(--cs-ink); }
/* contact form uses the same primary button as calculators */
.cs-site .cs-contact .cs-btn, .cs-site .cs-contact button.cs-btn { background: var(--cs-panel); border-color: var(--cs-panel); color: #fff; }
/* tables: row hairlines only (the theme reset adds cell side borders) */
.cs-table-wrap th, .cs-table-wrap td { border-top: 0; border-left: 0; border-right: 0; }
@media (max-width: 640px) { .cs-calc-hero .cs-lead { display: block; -webkit-line-clamp: none; overflow: visible; } }

/* ---------- accessibility audit fixes ---------- */
/* focus ring stays visible on coloured and night surfaces */
.cs-home-hero :focus-visible, .cs-page-hero :focus-visible, .cs-goal :focus-visible, .cs-dir .cs-cat header :focus-visible, .cs-footer :focus-visible, .cs-play-band :focus-visible, .cs-result-head :focus-visible, .cs-primary-grid :focus-visible, .cs-sticky:focus-visible { outline-color: var(--cs-hi); }
/* the fixed mobile result bar never hides the focused control */
@media (max-width: 860px) { html { scroll-padding-bottom: 84px; } }
.cs-crumbs a { display: inline-block; padding-block: 3px; }
/* 44px touch targets on phones */
@media (max-width: 640px) {
  .cs-site .cs-result-head .cs-btn-link, .cs-site .cs-fav, .cs-site .cs-chip, .cs-site .cs-pills button { min-height: 44px; }
  .cs-seg span { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .cs-site .cs-quick-list a { min-height: 44px; box-sizing: border-box; align-items: center; }
}
/* reserve each calculator's measured height until it mounts (content/heights.json via tools/measure-heights.js) */
[data-calc]:not([data-mounted]) { min-height: var(--cs-h, 460px); }
@media (max-width: 860px) { [data-calc]:not([data-mounted]) { min-height: var(--cs-hm, var(--cs-h, 460px)); } }
/* quiz "No timer" toggle on the violet panel */
.cs-site .cs-q-timer, .cs-site .cs-q-timer:hover, .cs-site .cs-q-timer:focus { color: var(--cs-panel-accent); min-height: 30px; padding: 0 8px; }
.cs-site .cs-q-timer:hover, .cs-site .cs-q-timer[aria-pressed="true"] { background: var(--cs-panel-2); }
/* scientific screen carries the focus ring; its expression field stays flat inside it */
.cs-site .cs-calc input.cs-x-expr, .cs-site .cs-calc input.cs-x-expr:focus { border: 0; background: transparent; box-shadow: none; }
/* primary buttons keep their category colour on hover (the generic .cs-btn:hover is ink) */
.cs-site .cs-calc .cs-btn:not(.cs-btn-ghost):hover, .cs-site .cs-calc button.cs-btn:not(.cs-btn-ghost):hover, .cs-site .cs-contact .cs-btn:hover, .cs-site .cs-contact button.cs-btn:hover { background: var(--cs-panel-2); border-color: var(--cs-panel-2); color: #fff; }

/* ---------- homepage first screen: centred promise, then every category ---------- */
.cs-site .cs-home-hero { padding: calc(var(--cs-nav-h) + 60px) 0 48px; }
.cs-hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cs-site .cs-home-hero h1 { max-width: 16ch; margin: 0 0 18px; font-size: clamp(2.7rem, 5.6vw, 4.9rem); }
.cs-site .cs-home-hero .cs-lead { max-width: 34em; margin: 0 0 28px; }
.cs-home-hero .cs-searchbox { width: 100%; max-width: 660px; text-align: left; }
.cs-home-hero .cs-popular { justify-content: center; gap: 4px 18px; max-width: 760px; margin-top: 20px; }
.cs-home-hero .cs-popular > span { margin-right: 0; }
.cs-site .cs-home-hero .cs-popular a { padding: 4px 0; background: none; border: 0; border-radius: 0; color: #fff; font-size: .95rem; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: .28em; }
.cs-site .cs-home-hero .cs-popular a:hover { background: none; color: var(--cs-hi); text-decoration-color: currentColor; }
.cs-hero-cats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 48px 0 0; padding: 0; }
.cs-site .cs-hero-cats a { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; height: 100%; min-height: 138px; box-sizing: border-box; padding: 16px; border-radius: 20px; background: var(--cs-panel); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); color: #fff; text-decoration: none; transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .15s; }
.cs-site .cs-hero-cats a:hover { transform: translateY(-3px); background: var(--cs-panel-2); color: #fff; }
.cs-hero-cats svg { width: 26px; height: 26px; color: var(--cs-panel-accent); }
.cs-hero-cats strong { display: block; font-size: .98rem; font-weight: 650; line-height: 1.2; letter-spacing: -.015em; overflow-wrap: anywhere; }
.cs-hero-cats small { display: block; margin-top: 4px; color: rgba(255, 255, 255, .92); font-size: .82rem; }
.cs-site .cs-hero-cats .cs-hero-all a, .cs-site .cs-hero-cats .cs-hero-all a:hover { background: var(--cs-hi); color: var(--cs-night); box-shadow: none; }
.cs-hero-cats .cs-hero-all small { color: #1d3a35; }
.cs-hero-cats .cs-hero-all svg { color: var(--cs-night); }
.cs-try-sec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; margin-top: 88px; }
.cs-try-copy h2 { margin: 0 0 14px; font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -.045em; line-height: 1.05; }
.cs-try-copy h2 em { font-style: normal; color: var(--cs-accent); }
.cs-try-copy > p { margin: 0 0 22px; color: var(--cs-muted); font-size: 1.08rem; }
.cs-proof { list-style: none; margin: 0; padding: 0; }
.cs-proof li { padding: 13px 0; border-top: var(--cs-hair); color: var(--cs-muted); }
.cs-proof strong { color: var(--cs-ink); font-weight: 650; }
.cs-try-sec .cs-try { border-radius: 28px; box-shadow: var(--cs-shadow-lg); }
.cs-try-sec [data-calc] { --cs-panel: var(--cs-night); --cs-panel-2: #121a30; --cs-panel-accent: var(--cs-hi); }
@media (max-width: 1120px) { .cs-hero-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cs-site .cs-hero-cats a { min-height: 116px; } }
@media (max-width: 1020px) { .cs-try-sec { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 64px; } }
@media (max-width: 760px) {
  .cs-site .cs-home-hero { padding: calc(var(--cs-nav-h) + 32px) 0 28px; }
  .cs-home-hero .cs-searchbox { display: none; } /* the header search is the one search box on phones */
  .cs-site .cs-home-hero .cs-lead { margin-bottom: 8px; }
  .cs-site .cs-home-hero .cs-popular a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .cs-hero-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
  .cs-site .cs-hero-cats a { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 72px; padding: 10px 12px; border-radius: 16px; }
  .cs-hero-cats svg { flex: 0 0 22px; width: 22px; height: 22px; }
  .cs-hero-cats strong { font-size: .9rem; overflow-wrap: normal; }
  .cs-hero-cats small { margin-top: 2px; font-size: .78rem; }
}
.cs-site .cs-home-hero .cs-lead { max-width: 44em; }
@media (max-width: 760px) { .cs-site .cs-home-hero .cs-popular a:nth-of-type(n+5) { display: none; } }
.cs-mega-tools { gap: 8px; }
.cs-site .cs-mega-tools a { background: var(--cs-surface-2); }
@media (max-width: 1040px) { .cs-mega-tools > li:nth-child(n+9) { display: none; } }
