/* Capital Calculators. System type, translucent chrome, light and dark from one token set. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#fbfbfd, #000);
  --surface: light-dark(#fff, #1c1c1e);
  --surface-2: light-dark(#f5f5f7, #161617);
  --fill: light-dark(#e8e8ed, #2c2c2e);
  --text: light-dark(#1d1d1f, #f5f5f7);
  --muted: light-dark(#6e6e73, #a1a1a6);
  --line: light-dark(rgb(0 0 0 / .1), rgb(255 255 255 / .14));
  --accent: light-dark(#0066cc, #2997ff);
  --accent-fill: light-dark(#0071e3, #0a84ff);
  --danger: light-dark(#c9302c, #ff6961);
  --ok: light-dark(#1d7f43, #30d158);
  --f1: light-dark(#0071e3, #2997ff);
  --f2: light-dark(#8e8e93, #98989d);
  --f3: light-dark(#5e5ce6, #7d7aff);
  --f4: light-dark(#c2670a, #ff9f0a);
  --material: light-dark(rgb(251 251 253 / .72), rgb(22 22 23 / .72));
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 28px rgb(0 0 0 / .06);
  --r: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);
  interpolate-size: allow-keywords;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); line-height: 1.06; letter-spacing: -.028em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem); line-height: 1.14; letter-spacing: -.02em; }
h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(100% - 2rem, 68.75rem); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--surface); padding: .6rem 1rem; border-radius: 10px; box-shadow: var(--shadow); }
.skip:focus { top: .75rem; }

/* ---------- header: a floating translucent layer, content scrolls beneath ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); container-type: scroll-state; }
@supports (container-type: scroll-state) {
  .nav { border-bottom-color: transparent; }
  @container scroll-state(stuck: top) { .nav-in { box-shadow: 0 1px 0 var(--line); } }
}
.nav-in { display: flex; align-items: center; gap: .5rem; height: 3.25rem; padding-inline: max(1rem, (100vw - 68.75rem) / 2); }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 600; letter-spacing: -.015em; font-size: 1.0625rem; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand svg { width: 1.6rem; height: 1.6rem; flex: none; }
.links { display: flex; gap: .25rem; }
.links a, .menu a { color: var(--text); font-size: .9375rem; padding: .4rem .7rem; border-radius: 999px; opacity: .86; }
.links a:hover, .links a[aria-current] { background: var(--fill); opacity: 1; text-decoration: none; }
.icon-btn { appearance: none; border: 0; background: transparent; color: var(--text); width: 2.5rem; height: 2.5rem; border-radius: 999px; display: grid; place-items: center; cursor: pointer; transition: transform .1s ease-out, background-color .15s; }
.icon-btn:hover { background: var(--fill); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 1.2rem; height: 1.2rem; }
.menu-btn { display: none; }
.menu { position: fixed; inset: 3.6rem .75rem auto .75rem; width: auto; margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding: .6rem; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .25); transform-origin: top right; opacity: 0; transform: scale(.96) translateY(-6px); transition: opacity .22s var(--ease), transform .22s var(--ease), display .22s allow-discrete, overlay .22s allow-discrete; }
.menu:popover-open { opacity: 1; transform: none; }
@starting-style { .menu:popover-open { opacity: 0; transform: scale(.96) translateY(-6px); } }
.menu::backdrop { background: rgb(0 0 0 / .25); }
.menu a { display: block; padding: .8rem 1rem; font-size: 1.0625rem; border-radius: 12px; opacity: 1; }
.menu a:active { background: var(--fill); }
@media (max-width: 47.99rem) { .links { display: none; } .menu-btn { display: grid; } }

/* ---------- buttons ---------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 999px; padding: .7rem 1.25rem; min-height: 2.75rem; font: 500 1rem/1 var(--font); cursor: pointer; background: var(--accent-fill); color: #fff; transition: transform .1s ease-out, filter .15s; touch-action: manipulation; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.quiet { background: var(--fill); color: var(--text); }
.btn.small { min-height: 2.25rem; padding: .45rem .9rem; font-size: .875rem; }

/* ---------- hero and sections ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(1.5rem, 4vw, 3rem); text-align: center; }
.hero p.lead { font-size: clamp(1.125rem, 1rem + .6vw, 1.4rem); line-height: 1.4; color: var(--muted); max-width: 40rem; margin: 1.1rem auto 0; letter-spacing: -.01em; }
.eyebrow { display: block; color: var(--muted); font-size: .9375rem; font-weight: 500; margin-bottom: .6rem; }
.eyebrow a { color: inherit; }
.finder { margin: 2rem auto 0; max-width: 34rem; position: relative; }
.finder input { width: 100%; font: inherit; color: var(--text); padding: .95rem 1.2rem .95rem 3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.finder svg { position: absolute; left: 1.1rem; top: 50%; translate: 0 -50%; width: 1.15rem; height: 1.15rem; color: var(--muted); pointer-events: none; }
.finder-empty { color: var(--muted); text-align: center; padding: 2rem 0; }
section.block { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.block-head p { color: var(--muted); margin: .35rem 0 0; flex-basis: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); gap: .9rem; list-style: none; margin: 0; padding: 0; }
.card { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1.25rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.card:active { transform: scale(.985); transition-duration: .1s; }
.card b { font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.card b::after { content: "›"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.card span { color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.card.big { padding: 1.6rem; background: var(--surface-2); border-color: transparent; }
.card.big b { font-size: 1.3rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.tile { background: var(--surface-2); border-radius: var(--r); padding: 1.5rem; }
.tile h3 { margin-bottom: .4rem; }
.tile p { color: var(--muted); margin: 0; font-size: .9875rem; }

/* ---------- page head and breadcrumbs ---------- */
.page-head { padding: clamp(1.75rem, 5vw, 3.25rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem); }
.page-head .lead { color: var(--muted); font-size: clamp(1.0625rem, 1rem + .4vw, 1.3rem); line-height: 1.42; max-width: 44rem; margin: .9rem 0 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0 0 .9rem; padding: 0; font-size: .875rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .35rem; }
.crumbs a { color: var(--muted); }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); box-shadow: var(--shadow); overflow: clip; }
.calc form { padding: clamp(1.1rem, 3vw, 1.9rem); display: grid; gap: 1.05rem; align-content: start; }
.calc-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.calc-top h2 { font-size: 1.0625rem; letter-spacing: -.01em; }
.cur { font: inherit; font-size: .875rem; color: var(--text); background: var(--fill); border: 0; border-radius: 999px; padding: .35rem .7rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .9375rem; font-weight: 500; }
.field .hint { font-size: .8125rem; color: var(--muted); margin: 0; }
.control { display: flex; align-items: center; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding-inline: .85rem; transition: border-color .15s, background-color .15s; }
.control:focus-within { border-color: var(--accent); background: var(--surface); outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.control .unit { color: var(--muted); font-size: .9375rem; flex: none; user-select: none; }
.control input, .control select { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 500 1.0625rem/1.2 var(--font); font-variant-numeric: tabular-nums; padding: .72rem .4rem; outline: 0; appearance: textfield; -moz-appearance: textfield; }
.control select { appearance: auto; padding-inline: 0; }
.control input::-webkit-outer-spin-button, .control input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.control:has(input:user-invalid) { border-color: var(--danger); }
.field .err { display: none; color: var(--danger); font-size: .8125rem; margin: 0; }
.field:has(input:user-invalid) .err { display: block; }
input[type="range"] { width: 100%; accent-color: var(--accent-fill); margin: .25rem 0 0; height: 1.5rem; touch-action: pan-y; cursor: grab; }
input[type="range"]:active { cursor: grabbing; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.calc-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.results { background: var(--surface-2); padding: clamp(1.1rem, 3vw, 1.9rem); display: grid; gap: 1.2rem; align-content: start; min-width: 0; }
.primary span { display: block; color: var(--muted); font-size: .9375rem; font-weight: 500; }
.primary output { display: block; font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.6rem); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-top: .15rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .6rem; margin: 0; }
.stat { background: var(--surface); border-radius: 14px; padding: .75rem .9rem; }
.stat dt { color: var(--muted); font-size: .8125rem; line-height: 1.3; }
.stat dd { margin: .15rem 0 0; font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.note { margin: 0; font-size: .875rem; color: var(--muted); background: var(--surface); border-radius: 12px; padding: .7rem .9rem; }
.note:empty { display: none; }
.chart { margin: 0; min-width: 0; }
.chart:empty { display: none; }
.split { display: block; width: 100%; height: .8rem; border-radius: 999px; overflow: hidden; }
.plot { display: block; width: 100%; height: auto; aspect-ratio: 640 / 280; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .zero { stroke: var(--muted); stroke-width: 1; }
.plot .tick { fill: var(--muted); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.plot path[class^="l"] { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.l1 { stroke: var(--f1); } .l2 { stroke: var(--f2); }
.a1 { fill: var(--f2); opacity: .55; } .a2 { fill: var(--f1); opacity: .9; }
.split .f1, .dot.f1 { fill: var(--f1); background: var(--f1); } .split .f2, .dot.f2 { fill: var(--f2); background: var(--f2); }
.split .f3, .dot.f3 { fill: var(--f3); background: var(--f3); } .split .f4, .dot.f4 { fill: var(--f4); background: var(--f4); }
.chart:has(.a1) .dot.f1 { background: var(--f2); } .chart:has(.a1) .dot.f2 { background: var(--f1); }
.legend { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }
.legend li { display: grid; grid-template-columns: auto 1fr auto 3rem; align-items: center; gap: .55rem; }
.legend.inline { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.legend.inline li { display: flex; }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend i { font-style: normal; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.dot { width: .65rem; height: .65rem; border-radius: 50%; display: inline-block; }
.schedule { background: var(--surface); border-radius: 14px; }
.schedule:has(table:empty) { display: none; }
.schedule summary { cursor: pointer; padding: .8rem .95rem; font-weight: 500; font-size: .9375rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.schedule summary::-webkit-details-marker { display: none; }
.schedule summary::after, .faq summary::after { content: ""; width: .55rem; height: .55rem; border: solid var(--muted); border-width: 0 2px 2px 0; rotate: 45deg; transition: rotate .25s var(--ease); flex: none; margin-left: 1rem; }
.schedule[open] summary::after, .faq details[open] summary::after { rotate: -135deg; }
.table-scroll { overflow: auto; max-height: 22rem; overscroll-behavior: contain; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: .55rem .9rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { position: sticky; top: 0; background: var(--surface); font-weight: 600; color: var(--muted); font-size: .8125rem; }
tbody th { font-weight: 500; }

/* mobile: the answer follows you while you drag a slider */
.peek { position: fixed; inset: auto .75rem calc(.75rem + env(safe-area-inset-bottom)) .75rem; z-index: 40; display: none; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1.1rem; border-radius: 18px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border: 1px solid var(--line); box-shadow: 0 10px 40px rgb(0 0 0 / .2); translate: 0 140%; opacity: 0; transition: translate .4s var(--ease), opacity .25s; color: var(--text); }
.peek.on { translate: 0 0; opacity: 1; }
.peek span { font-size: .8125rem; color: var(--muted); font-weight: 500; }
.peek b { font-size: 1.35rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 53.99rem) { .calc { grid-template-columns: 1fr; } .peek { display: flex; } }

/* ---------- article text ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding: clamp(2rem, 5vw, 3.5rem) 0; }
@media (max-width: 53.99rem) { .cols { grid-template-columns: 1fr; } }
.prose { max-width: 44rem; min-width: 0; }
.prose h2 { margin: 2.4rem 0 .8rem; font-size: clamp(1.4rem, 1.2rem + .9vw, 1.75rem); }
.prose > h2:first-child, .prose > section:first-child h2 { margin-top: 0; }
.prose h3 { margin: 1.6rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 14px; }
.prose table th, .prose table td { text-align: left; white-space: normal; }
.prose table tr:last-child td { border-bottom: 0; }
.formula { background: var(--surface-2); border-radius: 16px; padding: 1.1rem 1.25rem; margin: 0 0 1.2em; }
.formula code { display: block; font: 600 1.0625rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.formula dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .9rem; margin: .8rem 0 0; font-size: .9375rem; }
.formula dt { font: 600 .9375rem ui-monospace, "SF Mono", Menlo, monospace; }
.formula dd { margin: 0; color: var(--muted); }
.example { border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.25rem; margin: 0 0 1.2em; }
.example dl { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; margin: 0; font-size: .9375rem; }
.example dt { color: var(--muted); } .example dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.example hr { border: 0; border-top: 1px solid var(--line); margin: .8rem 0; }
.takeaways { background: var(--surface-2); border-radius: 16px; padding: 1.1rem 1.25rem 1.1rem 2.4rem; margin: 0 0 2rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); padding-right: 1.5rem; }
details::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
details[open]::details-content { block-size: auto; }
.side { position: sticky; top: 4.5rem; display: grid; gap: 1rem; }
.side-card { background: var(--surface-2); border-radius: var(--r); padding: 1.2rem; }
.side-card h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .6rem; font-weight: 600; }
.side-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .9375rem; }
.meta { color: var(--muted); font-size: .875rem; margin-top: 1rem; }
.disclaimer { color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 2.5rem; }
.gloss dt { font-weight: 600; font-size: 1.125rem; margin-top: 1.5rem; scroll-margin-top: 5rem; }
.gloss dd { margin: .25rem 0 0; color: var(--muted); }
.az { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.az a { display: grid; place-items: center; min-width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .9375rem; }

/* ---------- footer ---------- */
footer { background: var(--surface-2); margin-top: 3rem; padding: 2.75rem 0 2rem; font-size: .875rem; color: var(--muted); content-visibility: auto; contain-intrinsic-size: auto 34rem; }
.foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1.75rem 1.5rem; }
.foot h2 { font-size: .8125rem; color: var(--text); margin-bottom: .6rem; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot a { color: var(--muted); }
.legal { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.25rem; display: grid; gap: .5rem; }

/* ---------- consent: small, never blocks the page ---------- */
.consent { position: fixed; z-index: 60; inset: auto 1rem calc(1rem + env(safe-area-inset-bottom)) auto; max-width: 23rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 20px 60px rgb(0 0 0 / .22); padding: 1.1rem 1.2rem; font-size: .9rem; }
.consent p { margin: 0 0 .8rem; color: var(--muted); }
.consent div { display: flex; gap: .5rem; }
@media (max-width: 30rem) { .consent { inset-inline: .75rem; max-width: none; } }
.toast { position: fixed; left: 50%; bottom: 5.5rem; translate: -50% 0; background: var(--text); color: var(--bg); padding: .55rem 1rem; border-radius: 999px; font-size: .875rem; z-index: 70; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

/* ---------- motion, transparency, contrast preferences ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover, .card:active, .btn:active, .icon-btn:active { transform: none; }
  .menu, .menu:popover-open { transform: none; transition: opacity .2s, display .2s allow-discrete, overlay .2s allow-discrete; }
  .peek { translate: 0 0; transition: opacity .2s; }
  details::details-content { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .peek { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: light-dark(rgb(0 0 0 / .45), rgb(255 255 255 / .55)); --muted: light-dark(#424245, #d1d1d6); }
  .nav, .peek { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .control { border-color: var(--line); }
}
@media (forced-colors: active) { .split rect, .dot { forced-color-adjust: none; } }
@media print { .nav, footer, .peek, .consent, .calc-actions, .side { display: none; } }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .9rem; }
.field.wide { grid-column: 1 / -1; }
@media (max-width: 26rem) { .fields { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }

/* ================= v2: color, icons, richer tool UI ================= */
:root {
  --f1: light-dark(#0a7aff, #3b9bff); --f2: light-dark(#12a594, #2fd3bd); --f3: light-dark(#5e5ce6, #8482ff); --f4: light-dark(#f08c00, #ffb340);
  --glow: light-dark(rgb(10 122 255 / .14), rgb(59 155 255 / .22));
}
.c-blue { --c: #0a84ff; --c2: #5ac8fa; } .c-green { --c: #1faa59; --c2: #5fd38a; } .c-orange { --c: #f57c00; --c2: #ffb340; }
.c-indigo { --c: #5856d6; --c2: #8e8cf5; } .c-teal { --c: #0e9aa7; --c2: #45d0c6; } .c-pink { --c: #e6336f; --c2: #ff7aa5; }
.c-purple { --c: #9b45d6; --c2: #c98bf0; } .c-red { --c: #e5413a; --c2: #ff8a70; } .c-gray { --c: #6e6e73; --c2: #a1a1a6; }
.ico { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 28%; color: #fff; background: linear-gradient(145deg, var(--c2), var(--c)); box-shadow: 0 6px 14px -6px var(--c), inset 0 1px 0 rgb(255 255 255 / .35); }
.ico svg { width: 55%; height: 55%; }
.ico.sm { width: 1.5rem; height: 1.5rem; box-shadow: none; } .ico.lg { width: 3.6rem; height: 3.6rem; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* hero */
.hero-bg { position: relative; overflow: clip; }
.hero-bg::before { content: ""; position: absolute; inset: -30% -10% 0; z-index: -1; background: radial-gradient(38% 46% at 18% 30%, light-dark(rgb(10 132 255 / .20), rgb(10 132 255 / .28)), transparent 70%), radial-gradient(34% 42% at 82% 22%, light-dark(rgb(155 69 214 / .18), rgb(155 69 214 / .26)), transparent 70%), radial-gradient(40% 40% at 62% 78%, light-dark(rgb(31 170 150 / .16), rgb(31 170 150 / .20)), transparent 70%); }
.hero2 { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero2 h1 { font-size: clamp(2.5rem, 1.3rem + 4.6vw, 4.4rem); }
.grad { background: linear-gradient(100deg, #0a84ff, #7d5cf5 55%, #e6336f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero2 .lead { font-size: clamp(1.0625rem, 1rem + .5vw, 1.3rem); line-height: 1.45; color: var(--muted); margin: 1.1rem 0 0; max-width: 34rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .875rem; font-weight: 600; color: var(--accent); background: var(--glow); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.1rem; }
.pill svg { width: 1rem; height: 1rem; }
.hero2 .finder { margin: 1.6rem 0 0; max-width: 32rem; }
.finder > svg { position: absolute; left: 1.1rem; top: 50%; translate: 0 -50%; width: 1.2rem; height: 1.2rem; color: var(--muted); pointer-events: none; }
.finder input { transition: box-shadow .2s, border-color .2s; }
.finder input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow), var(--shadow); }
.quick { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.1rem 0 0; }
.quick a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem .35rem .4rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .875rem; font-weight: 500; transition: transform .2s var(--ease), box-shadow .2s; }
.quick a:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.quick a:active { transform: scale(.96); }

/* live demo card */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 1.4rem; box-shadow: 0 30px 80px -30px light-dark(rgb(10 60 160 / .35), rgb(0 0 0 / .8)), var(--shadow); display: grid; gap: .7rem; }
.demo-head { display: flex; align-items: center; gap: .8rem; }
.demo-head b { display: block; font-size: 1.0625rem; letter-spacing: -.01em; } .demo-head span { color: var(--muted); font-size: .875rem; }
.live { margin-left: auto; font-size: .75rem !important; font-weight: 600; color: var(--ok) !important; background: color-mix(in srgb, var(--ok) 14%, transparent); padding: .2rem .55rem .2rem 1.1rem; border-radius: 999px; position: relative; }
.live::before { content: ""; position: absolute; left: .5rem; top: 50%; width: .4rem; height: .4rem; margin-top: -.2rem; border-radius: 50%; background: var(--ok); }
.demo-out { background: linear-gradient(135deg, #0a84ff, #5856d6); color: #fff; border-radius: 20px; padding: 1rem 1.2rem; }
.demo-out span { font-size: .875rem; opacity: .9; }
.demo-out output { display: block; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.demo-bar { height: .6rem; border-radius: 999px; background: var(--f4); overflow: hidden; }
.demo-bar i { display: block; height: 100%; background: var(--f1); border-radius: 999px 0 0 999px; box-shadow: 2px 0 0 var(--surface); }
.demo-legend { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: var(--muted); flex-wrap: wrap; }
.demo-legend b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: .2rem; } .demo-legend .dot { margin-right: .35rem; }
.demo-row { display: flex; justify-content: space-between; font-size: .9375rem; font-weight: 500; margin-top: .3rem; }
.demo-row b { font-variant-numeric: tabular-nums; }
.demo-note { margin: 0; font-size: .8125rem; color: var(--muted); }
.demo .btn { margin-top: .2rem; }
@media (max-width: 53.99rem) { .hero2 { grid-template-columns: 1fr; } }

/* trust strip */
.trust { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: .75rem; }
.trust li { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .9rem 1rem; }
.trust svg { grid-row: span 2; width: 1.5rem; height: 1.5rem; color: var(--accent); }
.trust b { font-size: .9375rem; } .trust span { font-size: .8125rem; color: var(--muted); }

/* cards with icons */
.card { flex-direction: row; align-items: center; gap: .9rem; padding: 1rem 1.1rem; position: relative; }
.card-t { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.card b { display: block; } .card b::after { content: none; }
.card .go { color: var(--muted); display: grid; opacity: 0; translate: -6px 0; transition: opacity .2s, translate .25s var(--ease); }
.card .go svg { width: 1.1rem; height: 1.1rem; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 14px 34px -18px var(--accent), var(--shadow); }
.card:hover .go { opacity: 1; translate: 0 0; }
.card .ico { transition: transform .3s var(--ease); } .card:hover .ico { transform: scale(1.08) rotate(-4deg); }
.card.big { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.4rem; background: var(--surface); border-color: var(--line); min-height: 10.5rem; }
.card.big .ico { width: 3.2rem; height: 3.2rem; } .card.big b { font-size: 1.2rem; } .card.big .go { position: absolute; top: 1.4rem; right: 1.3rem; }
.card.guide em { font-style: normal; font-size: .8125rem; color: var(--accent); font-weight: 500; margin-top: .3rem; }
.card.guide { align-items: flex-start; }
.bento { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.block-head h2 { display: flex; align-items: center; gap: .7rem; }
.block-head h2 a { color: inherit; } .block-head h2 .ico { width: 2.2rem; height: 2.2rem; }
.block-head h2 small { font-size: .8125rem; font-weight: 600; color: var(--muted); background: var(--fill); border-radius: 999px; padding: .1rem .55rem; letter-spacing: 0; }
.more { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; font-size: .9375rem; } .more svg { width: 1rem; height: 1rem; transition: translate .2s var(--ease); } .more:hover svg { translate: 3px 0; }

/* page heads */
.title-row { display: flex; align-items: center; gap: 1rem; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1.1rem 0 0; padding: 0; }
.badges li { display: inline-flex; align-items: center; gap: .35rem; font-size: .8125rem; font-weight: 500; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: .3rem .7rem; }
.badges svg { width: .95rem; height: .95rem; color: var(--accent); }
@media (max-width: 30rem) { .title-row .ico.lg { width: 2.8rem; height: 2.8rem; } }

/* calculator: colored answer, sliders, chips */
.calc { border-radius: 28px; box-shadow: 0 30px 80px -40px light-dark(rgb(10 60 160 / .3), rgb(0 0 0 / .8)), var(--shadow); }
.calc-top h2 { display: flex; align-items: center; gap: .45rem; } .calc-top h2 svg { width: 1.1rem; height: 1.1rem; color: var(--accent); }
.primary { background: linear-gradient(135deg, var(--c2, #5ac8fa), var(--c, #0a84ff)); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 82%, #000 0%), color-mix(in srgb, var(--c) 78%, #1b1464)); color: #fff; border-radius: 22px; padding: 1.2rem 1.3rem 1.3rem; box-shadow: 0 18px 40px -22px var(--c); position: relative; overflow: hidden; }
.primary::after { content: ""; position: absolute; right: -3rem; top: -3rem; width: 10rem; height: 10rem; border-radius: 50%; background: rgb(255 255 255 / .12); }
.primary span { color: rgb(255 255 255 / .88); }
.stat { border: 1px solid var(--line); }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 1.75rem; background: transparent; --p: 50%; margin: .15rem 0 0; }
input[type="range"]::-webkit-slider-runnable-track { height: .4rem; border-radius: 999px; background: linear-gradient(to right, var(--accent-fill) var(--p), var(--fill) var(--p)); }
input[type="range"]::-moz-range-track { height: .4rem; border-radius: 999px; background: linear-gradient(to right, var(--accent-fill) var(--p), var(--fill) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.5rem; height: 1.5rem; margin-top: -.55rem; border-radius: 50%; background: #fff; border: .5px solid rgb(0 0 0 / .08); box-shadow: 0 2px 6px rgb(0 0 0 / .25), 0 0 0 0 var(--glow); transition: box-shadow .2s, transform .15s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; border: .5px solid rgb(0 0 0 / .08); box-shadow: 0 2px 6px rgb(0 0 0 / .25); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 2px 6px rgb(0 0 0 / .25), 0 0 0 8px var(--glow); }
input[type="range"]:focus-visible { outline: 0; } input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent); }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips button { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 .875rem var(--font); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; min-width: 2.75rem; transition: transform .1s ease-out, background-color .15s, color .15s; }
.chips button:active { transform: scale(.94); }
.chips button[aria-pressed="true"] { background: var(--accent-fill); border-color: transparent; color: #fff; }

/* charts */
.chart { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
.donut-wrap { display: grid; grid-template-columns: minmax(7rem, 9.5rem) 1fr; gap: 1.1rem; align-items: center; }
.donut { width: 100%; height: auto; rotate: 0deg; }
.donut circle { fill: none; stroke-width: 5.2; stroke-linecap: butt; }
.donut .track { stroke: var(--fill); }
.s1 { stroke: var(--f1); } .s2 { stroke: var(--f2); } .s3 { stroke: var(--f3); } .s4 { stroke: var(--f4); }
.dn-l { font: 500 3px var(--font); fill: var(--muted); } .dn-v { font: 700 5.2px var(--font); fill: var(--text); letter-spacing: -.02em; }
.donut-wrap .legend { margin: 0; } .donut-wrap .legend li { grid-template-columns: auto 1fr; row-gap: 0; } .donut-wrap .legend b { grid-column: 2; } .donut-wrap .legend i { display: none; }
.donut-wrap .legend span:nth-child(2) { color: var(--muted); font-size: .8125rem; }
@media (max-width: 24rem) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.a1 { fill: var(--f1); opacity: .22; } .a2 { fill: var(--f2); opacity: .28; } .a1.soft { opacity: .12; }
.plot path.a1, .plot path.a2 { stroke: none; }
.l1 { stroke: var(--f1); } .l2 { stroke: var(--f2); }
.chart:has(.a1) .dot.f1 { background: var(--f1); } .chart:has(.a1) .dot.f2 { background: var(--f2); }
.plot { cursor: crosshair; touch-action: pan-y; }
.plot .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.plot .pin { opacity: 0; stroke: var(--surface); stroke-width: 2; } .p1 { fill: var(--f1); } .p2 { fill: var(--f2); }
.plot.hot .guide, .plot.hot .pin { opacity: 1; }
.tip { position: absolute; top: .6rem; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 12px; padding: .5rem .7rem; font-size: .8125rem; line-height: 1.45; white-space: nowrap; box-shadow: 0 10px 30px rgb(0 0 0 / .25); z-index: 2; font-variant-numeric: tabular-nums; }
.tip b { display: block; font-weight: 600; } .tip span { display: flex; justify-content: space-between; gap: 1rem; } .tip i { font-style: normal; opacity: .75; }

/* side cards, faq, footer polish */
.side-card { border: 1px solid var(--line); background: var(--surface); }
.faq details { border: 1px solid var(--line); border-radius: 16px; padding: 0 1.1rem; margin-bottom: .6rem; background: var(--surface); transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.formula { border-left: 4px solid var(--accent-fill); border-radius: 6px 16px 16px 6px; }
.takeaways { border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); background: var(--glow); }

/* gentle reveal on scroll, only where supported and wanted */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .grid > li, .trust li { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
  }
}
@media (prefers-reduced-motion: reduce) { .card:hover .ico, .quick a:hover { transform: none; } }
.ico { background: linear-gradient(150deg, color-mix(in srgb, var(--c2) 55%, var(--c)), var(--c)); }
.ico svg { width: 58%; height: 58%; stroke-width: 2.2; }
.bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 53.99rem) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .bento { grid-template-columns: 1fr; } .card.big { min-height: 0; flex-direction: row; align-items: center; } }
