/* CalcFolio Bright 2.0.0 — tema claro e arejado (SaaS): azul royal, cartões brancos com sombra suave,
   ladrilhos pastel por categoria e calculadora ilustrada no herói. Cores: /theme-tokens.css (theme.json);
   os valores abaixo em :where(html) são só fallback (especificidade zero, os tokens sempre vencem). */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:where(html) {
  --cf-bg: #f5f8ff; --cf-bg-2: #eaf0ff; --cf-surface: #fff; --cf-surface-2: #f7f9fe;
  --cf-ink: #0b1533; --cf-ink-soft: #4f5d78; --cf-ink-mute: #66728a; --cf-line: #e3e9f5; --cf-line-strong: #c9d3e6;
  --cf-primary: #1660f5; --cf-primary-hover: #0b4bd1; --cf-primary-soft: #e8f0ff; --cf-on-primary: #fff; --cf-link: #1257e0; --cf-ring: #1660f5;
  --cf-error: #c4262e; --cf-error-soft: #fdecee; --cf-foot-bg: #0b1533; --cf-foot-ink: #e7ecf8; --cf-foot-soft: #aab6d0; --cf-shadow: 11 21 51;
}
@media (prefers-color-scheme: dark) {
  :where(html) {
    --cf-bg: #0a1022; --cf-bg-2: #0f1730; --cf-surface: #121b33; --cf-surface-2: #18223d;
    --cf-ink: #e8edf9; --cf-ink-soft: #a9b5cd; --cf-ink-mute: #8f9bb5; --cf-line: #243050; --cf-line-strong: #344267;
    --cf-primary: #2f6bf0; --cf-primary-hover: #4a7ff5; --cf-primary-soft: #1a2a52; --cf-link: #8fb2ff; --cf-ring: #8fb2ff;
    --cf-error: #ff8f8f; --cf-error-soft: #3a1a22; --cf-foot-bg: #070c1a; --cf-foot-soft: #9eabc6; --cf-shadow: 0 0 0;
  }
}

:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1240px; --gutter: clamp(16px, 4vw, 40px); --head-h: 72px;
  --r-sm: 12px; --r: 16px; --r-lg: 20px; --r-xl: 28px;
  --sh-sm: 0 1px 2px rgb(var(--cf-shadow) / .05), 0 2px 8px -2px rgb(var(--cf-shadow) / .06);
  --sh: 0 2px 4px rgb(var(--cf-shadow) / .04), 0 12px 28px -10px rgb(var(--cf-shadow) / .14);
  --sh-lg: 0 4px 10px rgb(var(--cf-shadow) / .04), 0 24px 56px -18px rgb(var(--cf-shadow) / .20);
  --hl-a: #1660f5; --hl-b: #5a49f2;
  --prose: color-mix(in srgb, var(--cf-ink) 80%, var(--cf-ink-soft));
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --sh-sm: 0 1px 2px rgb(0 0 0 / .3); --sh: 0 10px 30px -12px rgb(0 0 0 / .55); --sh-lg: 0 24px 60px -20px rgb(0 0 0 / .7); --hl-a: #7ea6ff; --hl-b: #a99cff; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--cf-bg); color: var(--cf-ink);
  font: 400 1rem/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
main { flex: 1 0 auto; display: block; outline: none; }
img, svg { max-width: 100%; }
a { color: var(--cf-link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cf-ring); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { color: var(--cf-ink); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 1.15rem + .9vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p, ul, ol { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: var(--cf-ink); color: var(--cf-bg); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 10px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- category colours ---------- */
.cat-health     { --c: #e5484d; --c-bg: #ffeef0; }
.cat-finance    { --c: #10a35a; --c-bg: #e6f8ee; }
.cat-math       { --c: #7c4dff; --c-bg: #f1ecff; }
.cat-home       { --c: #f06a1d; --c-bg: #fff1e6; }
.cat-daily      { --c: #e8a100; --c-bg: #fff7dc; }
.cat-business   { --c: #3e5bf2; --c-bg: #ebeeff; }
.cat-auto       { --c: #0891b2; --c-bg: #e2f5fa; }
.cat-tax        { --c: #d6336c; --c-bg: #fdebf2; }
.cat-work-money { --c: #0d9e86; --c-bg: #e1f7f2; }
.cat-pregnancy  { --c: #c2449f; --c-bg: #fbeaf6; }
.cat-datetime   { --c: #1660f5; --c-bg: #e8f0ff; }
.cat-converters { --c: #9333ea; --c-bg: #f4eafe; }
.cat-education  { --c: #0284c7; --c-bg: #e3f3fc; }
.cat-other, .cat-all { --c: #1660f5; --c-bg: #eef3ff; }
[class*="cat-"] { --c-ink: var(--c); --c-line: color-mix(in srgb, var(--c) 16%, transparent); }
@media (prefers-color-scheme: dark) {
  [class*="cat-"] { --c-ink: color-mix(in srgb, var(--c) 72%, #fff); --c-bg: color-mix(in srgb, var(--c) 16%, var(--cf-surface)); --c-line: color-mix(in srgb, var(--c) 30%, transparent); }
}

/* tiles (icon in a pastel square) */
.tile { --s: 48px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; border-radius: 14px; background: var(--c-bg, var(--cf-primary-soft)); color: var(--c-ink, var(--cf-primary)); box-shadow: inset 0 0 0 1px var(--c-line, transparent); }
.tile .ico { width: 55%; height: 55%; }
.tile--sm { --s: 36px; border-radius: 11px; }
.tile--lg { --s: 64px; border-radius: 18px; }
.tile--xl { --s: 88px; border-radius: 24px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px;
  border: 1px solid transparent; background: var(--cf-primary); color: var(--cf-on-primary); font: 700 .95rem/1 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgb(var(--cf-shadow) / .1), 0 6px 16px -6px color-mix(in srgb, var(--cf-primary) 60%, transparent); transition: background-color .15s, box-shadow .15s, transform .15s; }
.btn:hover { background: var(--cf-primary-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 18px; height: 18px; }
.btn--pill { border-radius: 999px; padding: 0 22px; }
.btn--lg { min-height: 52px; padding: 0 26px; border-radius: 14px; font-size: 1rem; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .88rem; border-radius: 10px; }
.btn--ghost { background: var(--cf-surface); color: var(--cf-ink); border-color: var(--cf-line-strong); box-shadow: var(--sh-sm); }
.btn--ghost:hover { background: var(--cf-surface-2); border-color: var(--cf-link); color: var(--cf-link); }
.iconbtn, .pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; min-width: 44px; border-radius: 999px;
  background: var(--cf-surface); border: 1px solid var(--cf-line); color: var(--cf-ink); box-shadow: var(--sh-sm); cursor: pointer; transition: border-color .15s, color .15s; }
.iconbtn:hover, .pill:hover { border-color: var(--cf-line-strong); color: var(--cf-link); }
.pill { padding: 0 12px 0 14px; font-weight: 700; font-size: .9rem; }
.pill .pill__globe { width: 17px; height: 17px; color: var(--cf-ink-soft); }
.pill .pill__chev { width: 16px; height: 16px; transition: transform .2s; }
.roundarrow { width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--cf-surface); color: var(--c-ink, var(--cf-primary));
  box-shadow: inset 0 0 0 1px var(--cf-line); transition: background-color .15s, color .15s, transform .15s; }
.roundarrow .ico { width: 16px; height: 16px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--cf-bg) 84%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--cf-line) 70%, transparent); }
.site-head__inner { max-width: var(--max); height: var(--head-h); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cf-ink); text-decoration: none; font-weight: 800; font-size: 1.32rem; letter-spacing: -.03em; flex: none; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff;
  background: linear-gradient(145deg, #4d8dff 0%, #1660f5 55%, #0b46c9 100%); box-shadow: 0 6px 14px -6px rgb(22 96 245 / .7), inset 0 1px 0 rgb(255 255 255 / .35); }
.brand__mark .ico { width: 24px; height: 24px; }
.site-nav { display: flex; gap: 6px; min-width: 0; }
.site-nav a { color: var(--cf-ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 12px; border-radius: 10px; white-space: nowrap; }
.site-nav a:hover { color: var(--cf-link); background: var(--cf-primary-soft); }
.site-head__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.site-head__cta { margin-left: 4px; }

/* popovers built on <details> (work without JS) */
.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop[open] > summary { border-color: var(--cf-link); color: var(--cf-link); }
.pop[open] .pill__chev { transform: rotate(180deg); }
.pop__panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; background: var(--cf-surface); border: 1px solid var(--cf-line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 8px; }
.lang__list { list-style: none; margin: 0; min-width: 232px; }
.lang__list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: 12px; color: var(--cf-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.lang__list a:hover { background: var(--cf-bg); color: var(--cf-link); }
.lang__list a[aria-current] { background: var(--cf-primary-soft); }
.lang__badge { width: 32px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--cf-bg-2); color: var(--cf-link); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.lang__list a[aria-current] .lang__badge { background: var(--cf-primary); color: var(--cf-on-primary); }
.lang__check { margin-left: auto; width: 18px; height: 18px; color: var(--cf-link); }
.hsearch__panel { width: min(460px, calc(100vw - 32px)); padding: 10px; }
.hsearch__form { display: flex; align-items: center; gap: 8px; }
.hsearch__ico { width: 20px; height: 20px; color: var(--cf-ink-mute); margin-left: 8px; }
.hsearch__form input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font-size: 1rem; outline: none; }
.hsearch__form input::-webkit-search-cancel-button { display: none; }
.menu__btn .menu__close, .menu[open] .menu__btn .menu__open, .menu__l-close, .menu[open] .menu__l-open { display: none; }
.menu[open] .menu__btn .menu__close { display: block; }
.menu[open] .menu__l-close { display: inline; }
.menu__panel { width: min(400px, calc(100vw - 32px)); padding: 14px; }
.menu__title { margin: 2px 6px 8px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--cf-ink-mute); }
.menu__list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 2px; }
.menu__list a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: 12px; color: var(--cf-ink); text-decoration: none; font-weight: 650; font-size: .95rem; }
.menu__list a:hover { background: var(--cf-bg); color: var(--cf-link); }
.menu__name { flex: 1; min-width: 0; }
.menu__count { font-size: .78rem; font-weight: 700; color: var(--cf-ink-mute); background: var(--cf-bg); border-radius: 999px; padding: 2px 9px; }
.menu__all { width: 100%; }

/* ---------- breadcrumbs ---------- */
.crumbs { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) 0; font-size: .86rem; color: var(--cf-ink-soft); width: 100%; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--cf-ink-soft); text-decoration: none; font-weight: 550; padding: 4px 0; }
.crumbs a:hover { color: var(--cf-link); text-decoration: underline; }
.crumbs__home { width: 16px; height: 16px; }
.crumbs__sep { width: 14px; height: 14px; color: var(--cf-ink-mute); opacity: .7; }
.crumbs [aria-current] { color: var(--cf-ink); font-weight: 650; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 56px) 0 clamp(36px, 5vw, 64px); isolation: isolate; }
.hero__blobs { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .9; }
.blob--1 { width: 620px; height: 620px; right: -120px; top: -160px; background: radial-gradient(circle, #d6e4ff 0%, rgb(214 228 255 / 0) 70%); }
.blob--2 { width: 480px; height: 480px; left: -200px; top: 120px; background: radial-gradient(circle, #e4ecff 0%, rgb(228 236 255 / 0) 70%); }
.blob--3 { width: 360px; height: 360px; right: 26%; bottom: -160px; background: radial-gradient(circle, #ece6ff 0%, rgb(236 230 255 / 0) 70%); }
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--cf-primary-soft); color: var(--cf-link); font-size: .85rem; font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cf-primary) 14%, transparent); }
.badge .ico { width: 18px; height: 18px; }
.hero__title { font-size: clamp(2.45rem, 1.2rem + 3.7vw, 4.3rem); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; word-spacing: .04em; margin: 0 0 20px; max-width: 14ch; hyphens: manual; }
.hero__title--long { font-size: clamp(2.3rem, 1.2rem + 3.1vw, 3.7rem); max-width: 16ch; }
.hl { background: linear-gradient(95deg, var(--hl-a) 10%, var(--hl-b) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-bottom: .04em; }
.hero__tagline { font-size: clamp(1.05rem, .98rem + .35vw, 1.22rem); line-height: 1.55; color: var(--cf-ink-soft); max-width: 36rem; margin: 0 0 28px; }
.search { max-width: 620px; margin: 0; }
.search__field { display: flex; align-items: center; gap: 4px; height: 68px; padding: 8px 8px 8px 20px; background: var(--cf-surface); border: 1px solid var(--cf-line); border-radius: 20px; box-shadow: var(--sh-lg); transition: border-color .15s, box-shadow .15s; }
.search__field:focus-within { border-color: var(--cf-link); box-shadow: var(--sh-lg), 0 0 0 4px color-mix(in srgb, var(--cf-primary) 18%, transparent); }
.search__ico { width: 22px; height: 22px; color: var(--cf-ink-mute); }
.search__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 10px; font-size: 1.04rem; font-weight: 500; color: var(--cf-ink); outline: none; }
.search__input::placeholder { color: var(--cf-ink-mute); opacity: 1; }
.search__input::-webkit-search-cancel-button { cursor: pointer; }
.search__btn { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--cf-primary); color: var(--cf-on-primary); cursor: pointer;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--cf-primary) 80%, transparent); transition: background-color .15s; }
.search__btn:hover { background: var(--cf-primary-hover); }
.search__btn .ico { width: 22px; height: 22px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0 0; }
.chips__label { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 650; color: var(--cf-ink-soft); margin-right: 2px; }
.chips__label .ico { width: 17px; height: 17px; color: var(--cf-link); }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--cf-surface); border: 1px solid var(--cf-line); color: var(--cf-ink-soft); font-size: .82rem; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s; }
.chip:hover { border-color: var(--cf-link); color: var(--cf-link); text-decoration: none; }
.features { grid-column: 1 / -1; list-style: none; margin: 8px 0 0; padding: 16px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px;
  border-radius: var(--r-lg); background: color-mix(in srgb, var(--cf-surface) 72%, transparent); border: 1px solid color-mix(in srgb, var(--cf-line) 80%, transparent); box-shadow: var(--sh-sm); }
.feature { display: flex; align-items: center; gap: 10px; min-width: 0; }
.feature__ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--f-bg); color: var(--f); }
.feature__ico .ico { width: 21px; height: 21px; }
.feature--check { --f: #10a35a; --f-bg: #e3f7ec; }
.feature--bolt { --f: #e59a00; --f-bg: #fff4d6; }
.feature--shield { --f: #7c4dff; --f-bg: #efe9ff; }
.feature--globe { --f: #1660f5; --f-bg: #e6efff; }
.feature__txt { display: grid; line-height: 1.25; min-width: 0; }
.feature__txt strong { font-size: .95rem; font-weight: 750; color: var(--cf-ink); }
.feature__txt span { font-size: .82rem; color: var(--cf-ink-soft); }

.hero__art { position: relative; width: 100%; max-width: 600px; justify-self: center; aspect-ratio: 552 / 508; }
.hero__img { position: absolute; left: 17%; top: 14.2%; display: block; width: 66%; height: auto; }
.float { position: absolute; z-index: 1; display: flex; align-items: center; gap: 12px; width: 204px; padding: 9px 12px 9px 9px; border-radius: 18px;
  background: color-mix(in srgb, var(--cf-surface) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, var(--cf-line) 80%, #fff);
  box-shadow: var(--sh-lg); color: var(--cf-ink); text-decoration: none; animation: bob 7s ease-in-out infinite alternate; transition: box-shadow .2s, border-color .2s; }
.float:hover { text-decoration: none; border-color: var(--c); box-shadow: var(--sh-lg), 0 0 0 3px var(--c-line); }
.float .tile { --s: 42px; border-radius: 12px; }
.float__txt { display: grid; line-height: 1.25; min-width: 0; }
.float__txt strong { font-size: .92rem; font-weight: 750; }
.float__txt strong { line-height: 1.2; }
.float__txt span { font-size: .76rem; color: var(--cf-ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.float__arrow { display: none; }
.float--1 { top: 5%; left: -3%; }
.float--2 { top: 47%; left: -7%; animation-delay: -2.5s; }
.float--3 { top: 21%; left: 68%; animation-delay: -4s; }
.float--4 { top: 76%; left: 60%; animation-delay: -1.2s; }
@keyframes bob { from { transform: translateY(-5px); } to { transform: translateY(6px); } }

/* ---------- home sections ---------- */
.home-sections { padding-bottom: 72px; }
.block { margin-top: clamp(40px, 5vw, 64px); }
.hero + .home-sections > .block:first-child { margin-top: 8px; }
.block__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.block__head h2 { margin: 0; }
.block__sub { margin: 6px 0 0; color: var(--cf-ink-soft); font-size: .95rem; }
.block__meta { font-size: .85rem; font-weight: 700; color: var(--cf-ink-soft); background: var(--cf-surface); border: 1px solid var(--cf-line); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: .92rem; color: var(--cf-link); text-decoration: none; white-space: nowrap; }
.more .ico { width: 18px; height: 18px; transition: transform .15s; }
.more:hover .ico { transform: translateX(3px); }

.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 14px; }
.cats > li { display: flex; }
.cat { position: relative; flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 148px; padding: 18px 16px 50px; border-radius: var(--r-lg); background: var(--c-bg); color: var(--cf-ink);
  text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-line); transition: transform .18s, box-shadow .18s; }
.cat:hover { transform: translateY(-3px); text-decoration: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), var(--sh); }
.cat__ico { width: 40px; height: 40px; color: var(--c-ink); margin-bottom: 10px; }
.cat__ico .ico { width: 100%; height: 100%; }
.cat__name { font-weight: 750; font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
.cat__tag { font-size: .8rem; line-height: 1.35; color: var(--cf-ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat .roundarrow { position: absolute; right: 12px; bottom: 12px; }
.cat:hover .roundarrow, .card:hover .roundarrow { background: var(--c-ink, var(--cf-primary)); color: var(--cf-surface); box-shadow: none; }
.cat-all { background: var(--cf-surface); box-shadow: inset 0 0 0 1px var(--cf-line); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 16px; }
.cards--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.cards > li { display: flex; min-width: 0; }
.card { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 14px; padding: 18px 16px 18px 18px; border-radius: var(--r-lg); background: var(--cf-surface); border: 1px solid var(--cf-line);
  color: var(--cf-ink); text-decoration: none; box-shadow: var(--sh-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: color-mix(in srgb, var(--c) 35%, var(--cf-line)); text-decoration: none; }
.card .tile { --s: 52px; border-radius: 15px; }
.card__body { flex: 1; min-width: 0; display: grid; gap: 4px; padding-top: 2px; }
.card__name { font-weight: 750; font-size: 1rem; line-height: 1.3; overflow-wrap: break-word; }
.card__desc { font-size: .86rem; line-height: 1.45; color: var(--cf-ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .roundarrow { align-self: flex-end; }

.hub__status { margin: -4px 0 18px; padding: 12px 16px; border-radius: var(--r); background: var(--cf-primary-soft); color: var(--cf-ink); font-weight: 650; font-size: .95rem; }
.hub__status.is-empty { background: var(--cf-surface); border: 1px dashed var(--cf-line-strong); color: var(--cf-ink-soft); }
.hub__cat { margin-top: 26px; }
.hub__cat:first-of-type { margin-top: 0; }
.hub__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hub__head h3 { margin: 0; font-size: 1.12rem; }
.hub__head h3 a { color: var(--cf-ink); text-decoration: none; }
.hub__head h3 a:hover { color: var(--cf-link); text-decoration: underline; }
.hub__count { font-size: .78rem; font-weight: 700; color: var(--cf-ink-mute); background: var(--cf-surface); border: 1px solid var(--cf-line); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.hub__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 10px; }
.hub__list a { display: grid; gap: 2px; height: 100%; padding: 11px 14px 11px 16px; border-radius: 14px; background: var(--cf-surface); border: 1px solid var(--cf-line); text-decoration: none;
  box-shadow: inset 3px 0 0 var(--c); transition: border-color .15s, box-shadow .15s; }
.hub__list a:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--cf-line)); box-shadow: inset 3px 0 0 var(--c), var(--sh-sm); }
.hub__name { font-weight: 650; font-size: .93rem; color: var(--cf-ink); line-height: 1.35; }
.hub__list a:hover .hub__name { color: var(--cf-link); }
.hub__desc { font-size: .8rem; color: var(--cf-ink-soft); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-searching [data-hide-on-search] { display: none; }
.is-searching .hub { margin-top: 0; }
.is-searching .hero { padding-bottom: 28px; }

.about { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; padding: clamp(24px, 4vw, 44px);
  border-radius: var(--r-xl); background: var(--cf-surface); border: 1px solid var(--cf-line); box-shadow: var(--sh); position: relative; overflow: hidden; }
.about::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, var(--cf-primary-soft), transparent 70%); pointer-events: none; }
.about__badge { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(145deg, #4d8dff, #1660f5 55%, #0b46c9); box-shadow: 0 12px 24px -12px rgb(22 96 245 / .8); }
.about__badge .ico { width: 38px; height: 38px; }
.about__body { position: relative; z-index: 1; }
.about__body h2 { margin-bottom: 12px; }
.about__text { color: var(--cf-ink-soft); font-size: 1.02rem; line-height: 1.7; max-width: 72ch; }
.about__text p:last-child { margin-bottom: 0; }

/* ---------- category page ---------- */
.band { margin-top: 18px; display: flex; align-items: flex-start; gap: clamp(18px, 3vw, 32px); padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--c-bg);
  box-shadow: inset 0 0 0 1px var(--c-line); position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cf-surface) 70%, transparent), transparent 70%); pointer-events: none; }
.band .tile { background: var(--cf-surface); box-shadow: var(--sh); }
.band__copy { position: relative; z-index: 1; min-width: 0; }
.band__eyebrow { margin: 4px 0 10px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink); }
.band h1 { margin-bottom: 12px; }
.lede, .lede p { font-size: 1.08rem; line-height: 1.6; color: var(--cf-ink-soft); max-width: 66ch; }
.lede p:last-child { margin-bottom: 0; }
.othercats { padding-bottom: 72px; }
.othercats__h { font-size: 1.1rem; margin-bottom: 14px; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills--center { justify-content: center; }
.pillink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--cf-surface); border: 1px solid var(--cf-line); color: var(--cf-ink); font-weight: 650; font-size: .9rem; text-decoration: none; box-shadow: var(--sh-sm); }
.pillink .ico { width: 20px; height: 20px; color: var(--c-ink); }
.pillink:hover { border-color: var(--c); color: var(--cf-ink); text-decoration: none; background: var(--c-bg); }

/* ---------- calculator page ---------- */
.calcpage { padding-bottom: 72px; }
.calcpage__head { display: flex; align-items: flex-start; gap: 20px; padding: 22px 0 28px; max-width: 920px; }
.calcpage__head .tile { margin-top: 4px; }
.calcpage__titles { min-width: 0; }
.calcpage__head h1 { margin-bottom: 10px; }
.stamp { display: inline-flex; align-items: center; gap: 7px; margin: 14px 0 0; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--cf-surface); border: 1px solid var(--cf-line); font-size: .82rem; font-weight: 600; color: var(--cf-ink-soft); }
.stamp .ico { width: 16px; height: 16px; color: var(--cf-link); }

.calc { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border-radius: var(--r-xl); background: var(--cf-surface); border: 1px solid var(--cf-line); box-shadow: var(--sh-lg); }
.calc__form { padding: clamp(16px, 2.6vw, 30px); display: grid; gap: 2px; min-width: 0; }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 700; font-size: .92rem; color: var(--cf-ink); margin-bottom: 8px; padding: 0; }
.field__help { margin: 7px 0 0; font-size: .82rem; line-height: 1.45; color: var(--cf-ink-soft); }
.field__err { margin: 7px 0 0; font-size: .84rem; color: var(--cf-error); font-weight: 650; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@supports (grid-template-rows: subgrid) {
  .field-row { row-gap: 0; }
  .field-row > div.field:not(.field--check) { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
  .field-row > div.field:not(.field--check) > label { align-self: end; }
}
.field-row .field__help { display: none; }
.field-row .field:first-child .field__help { display: block; grid-column: 1 / -1; }

.input { display: flex; align-items: stretch; min-height: 52px; background: var(--cf-surface); border: 1.5px solid var(--cf-line-strong); border-radius: 14px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: color-mix(in srgb, var(--cf-primary) 45%, var(--cf-line-strong)); }
.input:focus-within { border-color: var(--cf-link); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cf-primary) 18%, transparent); }
.input input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--cf-ink); font: 650 1.08rem/1.2 var(--font); font-variant-numeric: tabular-nums; padding: 12px 14px; }
.input input:focus { outline: none; }
.input--date input { font-size: 1rem; min-height: 49px; }
.input--date input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
.input__unit { display: flex; align-items: center; padding: 0 14px; color: var(--cf-ink-soft); background: var(--cf-surface-2); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.input--unit-before .input__unit { border-right: 1px solid var(--cf-line); }
.input--unit-after .input__unit { border-left: 1px solid var(--cf-line); }
.input input[aria-invalid="true"] { color: var(--cf-error); }
.field:has([aria-invalid="true"]) .input, .field:has([aria-invalid="true"]) textarea, .field:has([aria-invalid="true"]) select { border-color: var(--cf-error); box-shadow: 0 0 0 4px var(--cf-error-soft); }
textarea { display: block; width: 100%; min-height: 7rem; resize: vertical; font: 600 1.02rem/1.45 var(--font); font-variant-numeric: tabular-nums; color: var(--cf-ink); background: var(--cf-surface);
  border: 1.5px solid var(--cf-line-strong); border-radius: 14px; padding: 12px 14px; transition: border-color .15s, box-shadow .15s; }
select { display: block; width: 100%; min-height: 52px; font: 600 1rem/1.3 var(--font); color: var(--cf-ink); background-color: var(--cf-surface); border: 1.5px solid var(--cf-line-strong); border-radius: 14px; padding: 12px 44px 12px 14px;
  -webkit-appearance: none; appearance: none; cursor: pointer; transition: border-color .15s, box-shadow .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366728a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; }
textarea:hover, select:hover { border-color: color-mix(in srgb, var(--cf-primary) 45%, var(--cf-line-strong)); }
textarea:focus, select:focus { outline: none; border-color: var(--cf-link); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cf-primary) 18%, transparent); }
select:focus-visible, textarea:focus-visible { outline: none; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--cf-bg-2); box-shadow: inset 0 0 0 1px var(--cf-line); width: fit-content; max-width: 100%; }
.seg__opt { position: relative; flex: 1 1 auto; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg__opt span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 16px; border-radius: 10px; font-weight: 650; font-size: .92rem; color: var(--cf-ink-soft); cursor: pointer; text-align: center; transition: background-color .15s, color .15s; }
.seg__opt:hover span { color: var(--cf-ink); }
.seg__opt input:checked + span { background: var(--cf-surface); color: var(--cf-link); box-shadow: 0 1px 2px rgb(var(--cf-shadow) / .08), 0 4px 10px -4px rgb(var(--cf-shadow) / .18); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--cf-ring); outline-offset: 0; }
.field > label.check, .check { display: flex; gap: 12px; margin-bottom: 0; align-items: center; min-height: 44px; font-weight: 650; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--cf-link); flex: none; cursor: pointer; }
.field--check .field__help { margin-left: 34px; margin-top: 0; }

.calc__adv { margin: 2px 0 16px; }
.calc__adv > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--cf-primary-soft); color: var(--cf-link); font-weight: 700; font-size: .92rem; cursor: pointer; }
.calc__adv > summary::-webkit-details-marker { display: none; }
.calc__adv > summary .ico { width: 18px; height: 18px; }
.calc__adv-chev { transition: transform .2s; }
.calc__adv[open] .calc__adv-chev { transform: rotate(180deg); }
.calc__adv-body { margin-top: 16px; padding: 16px 16px 2px; border-radius: var(--r); border: 1px dashed var(--cf-line-strong); }
.calc__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.calc__actions .btn { flex: 0 1 auto; }
.calc__noscript { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--cf-bg-2); color: var(--cf-ink-soft); font-size: .9rem; }

.calc__result { position: sticky; top: calc(var(--head-h) + 16px); min-width: 0; padding: clamp(20px, 2.6vw, 30px); border-radius: 22px;
  background: linear-gradient(165deg, var(--cf-primary-soft) 0%, color-mix(in srgb, var(--cf-primary-soft) 45%, var(--cf-surface)) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cf-primary) 16%, transparent); overflow: hidden; }
.calc__result::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--cf-primary), #6f8dff); }
.calc__result.is-stale .out__value, .calc__result.is-stale .outs dd { opacity: .4; }
.calc__result-title { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--cf-link); }
.calc__result-title .ico { width: 18px; height: 18px; }
.out--primary { margin: 0 0 16px; }
.out__label { display: block; font-weight: 650; font-size: .95rem; color: var(--cf-ink-soft); margin-bottom: 4px; }
.out__value { display: block; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.3rem); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; color: var(--cf-link); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.out--primary + .out--primary { padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--cf-primary) 14%, transparent); }
.out--primary + .out--primary .out__value { font-size: clamp(1.5rem, 1.25rem + .9vw, 2rem); color: var(--cf-ink); }
.outs { margin: 4px 0 0; padding: 0 16px; overflow: hidden; border-radius: var(--r); background: color-mix(in srgb, var(--cf-surface) 78%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cf-primary) 10%, transparent); }
.outs__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; margin-top: -1px; border-top: 1px solid var(--cf-line); }
.outs dt { color: var(--cf-ink-soft); font-size: .92rem; min-width: 0; }
.outs__help { display: block; font-size: .78rem; color: var(--cf-ink-mute); margin-top: 2px; }
.outs dd { margin: 0; font-weight: 750; color: var(--cf-ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.outs__row--text { flex-wrap: wrap; gap: 4px 16px; }
.outs__row--text dd { white-space: normal; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.calc__share { margin-top: 16px; }
.link-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 14px; border-radius: 999px; background: var(--cf-surface); border: 1px solid var(--cf-line); color: var(--cf-link);
  font: 700 .88rem/1 var(--font); cursor: pointer; box-shadow: var(--sh-sm); }
.link-btn::before { content: ""; width: 16px; height: 16px; background: currentColor; flex: none;
  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%3Cpath d='M10 14a4.5 4.5 0 0 0 6.4 0l3.2-3.2a4.5 4.5 0 0 0-6.4-6.4L12 5.6M14 10a4.5 4.5 0 0 0-6.4 0l-3.2 3.2a4.5 4.5 0 0 0 6.4 6.4l1.2-1.2'/%3E%3C/svg%3E") center / contain no-repeat; }
.link-btn:hover { border-color: var(--cf-link); }
.calc__note { margin: 12px 0 0; font-size: .82rem; line-height: 1.5; color: var(--cf-ink-soft); }
.btn--table { margin: 16px 8px 0 0; vertical-align: middle; }
.btn--table ~ .calc__share { display: inline-flex; vertical-align: middle; }
.btn--table ~ .table-wrap:not([hidden]) ~ .calc__share { display: flex; }
.btn--table::before { content: ""; width: 16px; height: 16px; background: currentColor; flex: none;
  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%3Crect x='3.5' y='4.5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M3.5 14.5h17M10 9.5v10'/%3E%3C/svg%3E") center / contain no-repeat; }

/* scale (BMI etc.) — runtime sets --cf-pos 0..1 */
.scale { --cf-pos: 0; position: relative; display: flex; height: 12px; margin: 4px 0 22px; border-radius: 999px; gap: 2px; }
.scale__band { height: 100%; }
.scale__band.b1 { flex: 6.5; background: var(--cf-band-1, #6aa6f8); border-radius: 999px 0 0 999px; }
.scale__band.b2 { flex: 6.5; background: var(--cf-band-2, #2fb57e); }
.scale__band.b3 { flex: 5; background: var(--cf-band-3, #f2bd2c); }
.scale__band.b4 { flex: 5; background: var(--cf-band-4, #f28c38); }
.scale__band.b5 { flex: 5; background: var(--cf-band-5, #e5534b); }
.scale__band.b6 { flex: 2; background: var(--cf-band-6, #b4304d); border-radius: 0 999px 999px 0; }
.scale__marker { position: absolute; top: -7px; left: calc(var(--cf-pos) * 100%); width: 8px; height: 26px; margin-left: -4px; background: var(--cf-surface); border: 2.5px solid var(--cf-ink); border-radius: 6px;
  box-shadow: 0 2px 6px rgb(var(--cf-shadow) / .25); transition: left .35s cubic-bezier(.2, .8, .2, 1); }

/* chart + table (runtime markup) */
.chart { margin: 20px 0 6px; padding: 14px 14px 10px; border-radius: var(--r); background: color-mix(in srgb, var(--cf-surface) 78%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cf-primary) 10%, transparent); }
.chart figcaption { font-weight: 700; font-size: .9rem; margin-bottom: 8px; color: var(--cf-ink); }
.cf-chart-svg { width: 100%; height: auto; display: block; }
.cf-grid { stroke: var(--cf-line); stroke-width: 1; }
.cf-axis { fill: var(--cf-ink-soft); font: 500 13px var(--font); }
.cf-bar { rx: 3px; }
.cf-bar.cf-s0, .cf-swatch.cf-s0 { fill: var(--cf-series-0, #1660f5); background: var(--cf-series-0, #1660f5); }
.cf-bar.cf-s1, .cf-swatch.cf-s1 { fill: var(--cf-series-1, #8fb4ff); background: var(--cf-series-1, #8fb4ff); }
.cf-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--cf-ink-soft); margin-top: 8px; }
.cf-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cf-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.table-wrap { margin-top: 12px; max-height: 380px; overflow: auto; border-radius: var(--r); background: var(--cf-surface); box-shadow: inset 0 0 0 1px var(--cf-line); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.table-wrap caption { text-align: left; font-weight: 700; padding: 10px 12px; }
.table-wrap th, .table-wrap td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--cf-line); white-space: nowrap; }
.table-wrap th:first-child, .table-wrap td:first-child { text-align: left; }
.table-wrap thead th { position: sticky; top: 0; background: var(--cf-surface-2); font-weight: 700; color: var(--cf-ink-soft); font-size: .8rem; }
.table-wrap tbody tr:hover td { background: var(--cf-surface-2); }

/* article */
.calcpage__body { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: clamp(24px, 3vw, 40px); align-items: start; margin-top: clamp(32px, 4vw, 52px); }
.prose { min-width: 0; padding: clamp(22px, 4vw, 48px); border-radius: var(--r-xl); background: var(--cf-surface); border: 1px solid var(--cf-line); box-shadow: var(--sh-sm);
  color: var(--prose); font-size: 1.02rem; line-height: 1.72; overflow-wrap: break-word; }
.prose__sec + .prose__sec { margin-top: 2.4em; padding-top: 2.2em; border-top: 1px solid var(--cf-line); }
.prose h2 { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.65rem); margin: 0 0 .7em; }
.prose h3 { margin: 1.5em 0 .5em; }
.prose a { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--cf-link); font-weight: 700; }
.prose strong { color: var(--cf-ink); }
.prose table { width: max-content; max-width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.4em; font-size: .9rem; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--cf-line); }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--cf-line); vertical-align: top; }
.prose thead th { background: var(--cf-surface-2); color: var(--cf-ink); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; background: var(--cf-primary-soft); color: var(--cf-ink); padding: .12em .4em; border-radius: 6px; }
.prose blockquote { margin: 0 0 1.2em; padding: 14px 18px; border-radius: 14px; background: var(--cf-bg); border-left: 4px solid var(--cf-primary); }
.faq__item { margin: 0 0 10px; border-radius: var(--r); background: var(--cf-surface); border: 1px solid var(--cf-line); box-shadow: var(--sh-sm); transition: border-color .15s; }
.faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 14px 18px; cursor: pointer; font-weight: 700; color: var(--cf-ink); line-height: 1.4; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--cf-link); }
.faq__chev { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--cf-primary-soft); color: var(--cf-link); transition: transform .2s; }
.faq__item[open] { border-color: color-mix(in srgb, var(--cf-primary) 35%, var(--cf-line)); }
.faq__item[open] .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 18px 4px; color: var(--prose); }
.sources ol { padding-left: 0; list-style: none; counter-reset: src; font-size: .92rem; }
.sources li { counter-increment: src; display: flex; gap: 12px; align-items: baseline; margin-bottom: .7em; overflow-wrap: anywhere; }
.sources li::before { content: counter(src); flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--cf-primary-soft); color: var(--cf-link); font-size: .75rem; font-weight: 800; transform: translateY(-1px); }
.disclaimer { display: flex; gap: 14px; align-items: flex-start; margin-top: 2.2em; padding: 16px 18px; border-radius: var(--r); background: var(--cf-bg); border: 1px solid var(--cf-line); font-size: .88rem; line-height: 1.6; color: var(--cf-ink-soft); }
.disclaimer__ico { width: 22px; height: 22px; color: var(--cf-link); margin-top: 1px; }
.disclaimer p:last-child { margin: 0; }

.side { align-self: stretch; min-width: 0; }
.side__sticky { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 16px; max-height: calc(100vh - var(--head-h) - 32px); overflow: auto; scrollbar-width: thin; padding: 2px; margin: -2px; }
.sidecard { padding: 18px; border-radius: var(--r-lg); background: var(--cf-surface); border: 1px solid var(--cf-line); box-shadow: var(--sh-sm); }
.sidecard__h { margin: 0 0 10px 6px; font-size: .74rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--cf-ink-mute); }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc__list a { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; color: var(--cf-ink-soft); text-decoration: none; font-size: .9rem; font-weight: 600; line-height: 1.4; counter-increment: toc; }
.toc__list a::before { content: counter(toc, decimal-leading-zero); font-size: .72rem; font-weight: 800; color: var(--cf-ink-mute); font-variant-numeric: tabular-nums; }
.toc__list a:hover { background: var(--cf-bg); color: var(--cf-link); }
.toc__list a[aria-current="true"] { background: var(--cf-primary-soft); color: var(--cf-link); }
.toc__list a[aria-current="true"]::before { color: var(--cf-link); }
.minilist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.minilist a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: 12px; color: var(--cf-ink); text-decoration: none; font-size: .9rem; font-weight: 650; line-height: 1.3; }
.minilist a > span:not(.tile) { flex: 1; min-width: 0; }
.minilist a:hover { background: var(--cf-bg); color: var(--cf-link); }
.minilist__chev { width: 16px; height: 16px; color: var(--cf-ink-mute); }

/* ---------- institutional pages, 404, root ---------- */
.prose-page { max-width: 880px; margin: 0 auto; padding: 8px 0 72px; }
.prose-page__head { display: flex; align-items: center; gap: 18px; padding: 18px 0 26px; }
.prose-page__head h1 { margin: 0; }
.prose-page__head .stamp { margin-top: 10px; }
.prose--card h2 { margin-top: 1.6em; }
.prose--card > :first-child { margin-top: 0; }

.nf { position: relative; isolation: isolate; text-align: center; max-width: 760px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) 0 88px; }
.nf-wrap { position: relative; isolation: isolate; overflow: hidden; }
.nf__code { display: inline-flex; align-items: center; gap: .06em; margin: 0 0 8px; font-size: clamp(5.5rem, 4rem + 8vw, 10rem); font-weight: 800; line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(160deg, var(--hl-a), var(--hl-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf__zero { width: .78em; height: .78em; display: inline-grid; place-items: center; border-radius: 50%; background: var(--cf-surface); box-shadow: var(--sh-lg), inset 0 0 0 1px var(--cf-line); color: var(--cf-link); -webkit-text-fill-color: initial; }
.nf__zero .ico { width: 46%; height: 46%; }
.nf .lede { margin: 0 auto 28px; }
.nf .search { margin: 0 auto 22px; text-align: left; }
.nf__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 36px; }

.root { position: relative; isolation: isolate; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); }
.root__inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.root__mark { width: 76px; height: 76px; display: inline-grid; place-items: center; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #4d8dff, #1660f5 55%, #0b46c9); box-shadow: 0 18px 36px -16px rgb(22 96 245 / .8); margin-bottom: 22px; }
.root__mark .ico { width: 46px; height: 46px; }
.root__title { font-size: clamp(2.8rem, 2rem + 4vw, 5rem); letter-spacing: -.045em; margin: 0 0 10px; }
.root__sub { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 40px; padding: 7px 16px 7px 12px; border-radius: 999px; background: var(--cf-primary-soft); color: var(--cf-link); font-weight: 700; font-size: .92rem; }
.root__sub .ico { width: 18px; height: 18px; }
.root__langs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; text-align: left; }
.root__langs li { display: flex; }
.root__langs a { position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 228px; padding: 24px 22px 66px; border-radius: var(--r-xl); background: var(--cf-surface); border: 1px solid var(--cf-line);
  color: var(--cf-ink); text-decoration: none; box-shadow: var(--sh); transition: transform .18s, box-shadow .18s, border-color .18s; }
.root__langs a:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--cf-primary) 40%, var(--cf-line)); }
.root__code { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--cf-primary-soft); color: var(--cf-link); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; margin-bottom: 8px; }
.root__name { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.root__tagline { color: var(--cf-ink-soft); font-size: .92rem; line-height: 1.5; }
.root__langs .roundarrow { position: absolute; left: 22px; bottom: 22px; width: 38px; height: 38px; color: var(--cf-link); }
.root__langs a:hover .roundarrow { background: var(--cf-primary); color: var(--cf-on-primary); box-shadow: none; }

/* ---------- footer ---------- */
.site-foot { background: var(--cf-foot-bg); color: var(--cf-foot-ink); margin-top: auto; }
.site-foot__inner { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr) minmax(0, .9fr) minmax(0, .9fr); gap: 32px 40px; }
.brand--foot { color: #fff; }
.site-foot__tag { margin: 14px 0 18px; color: var(--cf-foot-soft); font-size: .92rem; line-height: 1.6; max-width: 34ch; }
.site-foot__top { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: rgb(255 255 255 / .07); color: var(--cf-foot-ink); text-decoration: none; font-size: .85rem; font-weight: 650; }
.site-foot__top .ico { width: 16px; height: 16px; }
.site-foot__top:hover { background: rgb(255 255 255 / .14); }
.site-foot__h { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cf-foot-soft); margin: 6px 0 14px; }
.site-foot__col ul { list-style: none; margin: 0; padding: 0; }
.site-foot__cats ul { columns: 2; column-gap: 28px; }
.site-foot__col li { break-inside: avoid; }
.site-foot__col a { display: inline-block; padding: 5px 0; color: var(--cf-foot-ink); opacity: .86; text-decoration: none; font-size: .9rem; }
.site-foot__col a:hover { opacity: 1; text-decoration: underline; }
.site-foot__col a[aria-current] { opacity: 1; font-weight: 700; }
.site-foot__bar { border-top: 1px solid rgb(255 255 255 / .1); }
.site-foot__barin { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .84rem; color: var(--cf-foot-soft); }
.site-foot__barin p { margin: 0; }
.site-foot__legal { display: inline-flex; align-items: center; gap: 8px; }
.site-foot__legal .ico { width: 16px; height: 16px; }
.site-foot :focus-visible { outline-color: #8fb2ff; }

/* ---------- dark-mode details ---------- */
@media (prefers-color-scheme: dark) {
  .blob--1 { background: radial-gradient(circle, rgb(47 107 240 / .30), transparent 70%); }
  .blob--2 { background: radial-gradient(circle, rgb(47 107 240 / .18), transparent 70%); }
  .blob--3 { background: radial-gradient(circle, rgb(124 77 255 / .20), transparent 70%); }
  .hero__img { filter: brightness(.8) saturate(1.1); }
  .seg__opt input:checked + span { background: var(--cf-primary); color: #fff; }
  .feature__ico { background: color-mix(in srgb, var(--f) 18%, var(--cf-surface)); color: color-mix(in srgb, var(--f) 70%, #fff); }
  .float { border-color: var(--cf-line); background: color-mix(in srgb, var(--cf-surface) 88%, transparent); }
  .cat-all { background: var(--cf-surface); }
  .scale__marker { border-color: #fff; background: var(--cf-bg); }
  .calc__result::before { background: linear-gradient(90deg, #5b8cff, #8f9dff); }
  .out__value { color: #9dbcff; }
  .site-foot { border-top: 1px solid var(--cf-line); }
}

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .site-nav a:nth-child(4) { display: none; }
  .site-head__inner { gap: 24px; }
}
@media (max-width: 1100px) {
  .site-nav { display: none; }
  .site-foot__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-foot__brand { grid-column: 1 / -1; }
  .float { width: 190px; padding: 8px 10px 8px 8px; gap: 10px; }
  .float .tile { --s: 38px; }
  .float__arrow { display: none; }
}
@media (max-width: 1279px) { .float--2, .float--3 { display: none; } .float--1 { top: 3%; } }
@media (min-width: 1101px) { .menu { display: none; } }
@media (max-width: 1023px) {
  .calcpage__body { grid-template-columns: minmax(0, 1fr); }
  .side__sticky { position: static; max-height: none; overflow: visible; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__title { max-width: 16ch; }
  .hero__art { max-width: 520px; width: 100%; margin-top: 4px; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc__result { position: relative; top: auto; }
}
@media (max-width: 760px) {
  :root { --head-h: 64px; }
  .site-head__inner { gap: 12px; }
  .site-head__cta { display: none; }
  .site-head__tools { gap: 8px; }
  .brand { font-size: 1.18rem; }
  .brand__mark { width: 36px; height: 36px; }
  .menu .pop__panel, .hsearch .pop__panel { position: fixed; left: 12px; right: 12px; top: calc(var(--head-h) + 6px); width: auto; max-height: calc(100vh - var(--head-h) - 24px); overflow: auto; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 0; padding: 14px; }
  .hero__art { max-width: 250px; aspect-ratio: auto; margin: -4px auto -14px; }
  .hero__img { position: static; width: 100%; margin: -9% 0 -8%; }
  .float { display: none; }
  .block__head { align-items: center; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat { min-height: 0; padding: 14px; }
  .cat .roundarrow { display: none; }
  .cat__tag { -webkit-line-clamp: 2; }
  .hub__desc { display: none; }
  .hub__list { gap: 8px; }
  .hub__list a { min-height: 46px; align-content: center; padding: 10px 14px 10px 16px; }
  .cat__ico { width: 34px; height: 34px; margin-bottom: 6px; }
  .cards { gap: 12px; }
  .card { padding: 16px 14px; }
  .card .tile { --s: 46px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about__badge { width: 52px; height: 52px; border-radius: 16px; }
  .band { flex-direction: column; gap: 16px; }
  .band .tile { --s: 64px; border-radius: 18px; }
  .calcpage__head { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 16px; }
  .calcpage__head .tile { align-self: flex-start; }
  .calcpage__head h1 { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.2rem); }
  .calcpage__head .tile { --s: 48px; border-radius: 14px; }
  .calc { padding: 6px; border-radius: 24px; }
  .calc__form { padding: 16px 12px; }
  .calc__result { padding: 20px 16px; border-radius: 20px; }
  .calc__actions .btn { flex: 1 1 auto; }
  .field-row { gap: 10px; }
  .field-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outs { padding: 0 14px; }
  .outs__row { flex-direction: column; gap: 2px; }
  .outs dd { text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .prose { padding: 22px 18px; border-radius: 22px; font-size: 1rem; }
  .prose-page__head { align-items: flex-start; }
  .prose-page__head .tile { --s: 48px; border-radius: 14px; }
  .site-foot__inner { grid-template-columns: minmax(0, 1fr); padding-top: 44px; gap: 28px; }
  .site-foot__cats ul { columns: 2; column-gap: 16px; }
}
@media (max-width: 420px) {
  .hero__title { font-size: clamp(2.2rem, 1.2rem + 5vw, 2.6rem); }
  .search__field { height: 62px; padding-left: 16px; border-radius: 18px; }
  .search__btn { width: 48px; height: 48px; border-radius: 13px; }
  .search__input { font-size: 1rem; padding: 0 6px; }
  .search__ico { display: none; }
  .brand__name { font-size: 1.12rem; }
  .seg { width: 100%; }
}
@media (pointer: coarse) { .chip { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .cat:hover, .card:hover, .root__langs a:hover { transform: none; }
}
@media print {
  .site-head, .site-foot, .crumbs, .calc__actions, .calc__share, .side, .hero__art, .search, .chips { display: none !important; }
  body { background: #fff; }
  .calc, .prose { box-shadow: none; border-color: #ccc; }
  .faq__item { break-inside: avoid; }
}
