/* usdinfo.ru — design tokens + system. Light = NeoBank-style (lavender/indigo), dark = Tradex-style (near-black/lime). */

@font-face { font-family: 'Manrope Variable'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/assets/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/assets/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0400-045F, U+0462-0463, U+20AC, U+2116, U+2400-2422; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-weight: 380 620; font-display: swap; src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-weight: 380 620; font-display: swap; src: url('/assets/fonts/inter-cyrillic-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0400-045F, U+0462-0463, U+20AC, U+2116, U+2400-2422; }

:root {
  --font-display: 'Manrope Variable', 'Manrope', system-ui, sans-serif;
  --font-text: 'Inter Variable', 'Inter', system-ui, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --shell: 1240px;
  --ease: cubic-bezier(.2,.8,.2,1);

  /* Light (NeoBank): cool lavender ground, white cards, indigo accent */
  --bg: #F4F4FB;
  --bg-soft: #ECECF7;
  --surface: #FFFFFF;
  --surface-2: #F8F8FD;
  --border: #E4E3F2;
  --border-strong: #D3D1EA;
  --text: #191A2C;
  --text-dim: #565873;
  --text-faint: #8A8CA8;
  --accent: #4F46E5;
  --accent-ink: #FFFFFF;
  --accent-soft: #ECEBFC;
  --good: #16A34A;
  --good-soft: #E7F6EC;
  --bad: #DC2626;
  --bad-soft: #FCEAEA;
  --chart-2: #D97706;
  --shadow-card: 0 1px 2px rgba(28,25,64,.04), 0 8px 24px -12px rgba(28,25,64,.14);
  --shadow-pop: 0 12px 36px -8px rgba(28,25,64,.28);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
  :root:not([data-theme="light"]) {
    --bg: #0B0C0F; --bg-soft: #0E0F13; --surface: #131419; --surface-2: #17181E;
    --border: rgba(255,255,255,.07); --border-strong: rgba(255,255,255,.13);
    --text: #F1F1F4; --text-dim: #9A9BA8; --text-faint: #6C6D7A;
    --accent: #818CF8; --accent-ink: #0B0C0F; --accent-soft: rgba(129,140,248,.14);
    --good: #A3E635; --good-soft: rgba(163,230,53,.12);
    --bad: #F87171; --bad-soft: rgba(248,113,113,.12);
    --chart-2: #FBBF24;
    --shadow-card: none; --shadow-pop: 0 20px 44px -12px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0C0F; --bg-soft: #0E0F13; --surface: #131419; --surface-2: #17181E;
  --border: rgba(255,255,255,.07); --border-strong: rgba(255,255,255,.13);
  --text: #F1F1F4; --text-dim: #9A9BA8; --text-faint: #6C6D7A;
  --accent: #818CF8; --accent-ink: #0B0C0F; --accent-soft: rgba(129,140,248,.14);
  --good: #A3E635; --good-soft: rgba(163,230,53,.12);
  --bad: #F87171; --bad-soft: rgba(248,113,113,.12);
  --chart-2: #FBBF24;
  --shadow-card: none; --shadow-pop: 0 20px 44px -12px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.5 var(--font-text);
  font-feature-settings: 'cv11' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .h-display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* tabular numerals for every rate figure */
.n { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.01em; }
.n-d { font-weight: 700; opacity: 1; font-size: 1em; }
.n-empty { opacity: .3; font-weight: 500; }

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--sp-5); }
@media (min-width: 720px) { .shell { padding-inline: var(--sp-6); } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; top: -100%; left: var(--sp-4); background: var(--accent); color: var(--accent-ink); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm); z-index: 200; transition: top .15s var(--ease); }
.skip-link:focus { top: var(--sp-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- header ---------- */
/* фон и blur — на псевдоэлементе, не на .site-header: backdrop-filter на самой шапке создаёт
   containing block для position:fixed потомков (как transform), из-за чего мобильный попап
   выбора города (.city-popup, position:fixed на <480px) зажимался в высоту шапки вместо экрана */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); }
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(1.3); }
.site-header__row { display: flex; align-items: center; gap: var(--sp-5); height: 64px; }
.brand { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-display); font-weight: 800; font-size: 19px; flex: none; }
.brand__mark { width: 30px; height: 30px; color: var(--accent); }
.brand__u { color: var(--text-faint); font-weight: 700; }

.main-nav { display: none; position: relative; }
@media (min-width: 1024px) { .main-nav { display: block; } }
.main-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-group { position: relative; }
.nav-group--wide { position: static; } /* широкая панель («Калькуляторы») встаёт от левого края меню, а не от пункта */
.nav-group__btn { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-dim); white-space: nowrap; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.nav-group__btn .i { width: 14px; height: 14px; color: var(--text-faint); transition: transform .15s var(--ease); }
.nav-group__btn:hover, .nav-group__btn[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }
.nav-group__btn[aria-expanded="true"] .i { transform: rotate(180deg); }
.nav-group.is-current > .nav-group__btn { color: var(--text); background: var(--surface); box-shadow: var(--shadow-card); }
.nav-panel { display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 45; min-width: 250px; padding: var(--sp-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.nav-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* мостик: мышь не теряет панель по пути от пункта */
.nav-panel--wide { width: min(760px, calc(100vw - 48px)); padding: var(--sp-4) var(--sp-5); }
/* без JS — по наведению и фокусу; с JS (класс .js на <html>) — по aria-expanded, его ставит app.js */
:root:not(.js) .nav-group:hover > .nav-panel, :root:not(.js) .nav-group:focus-within > .nav-panel,
.nav-group__btn[aria-expanded="true"] + .nav-panel { display: block; }
.nav-panel__cols { display: flex; flex-direction: column; gap: var(--sp-4); }
.nav-panel--wide .nav-panel__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-5); }
.nav-panel__title { padding: 0 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.nav-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-panel a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; color: var(--text); }
.nav-panel a .i { width: 16px; height: 16px; flex: none; color: var(--text-faint); }
.nav-panel a:hover { background: var(--surface-2); }
.nav-panel a:hover .i { color: var(--accent); }
.nav-panel a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-panel a[aria-current="page"] .i { color: var(--accent); }
.nav-panel .nav-panel__all { justify-content: space-between; margin-top: var(--sp-2); padding-top: 10px; border-top: 1px solid var(--border); border-radius: 0 0 var(--r-md) var(--r-md); font-weight: 600; color: var(--accent); }
.nav-panel .nav-panel__all .i { color: var(--accent); }

.header-spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.city-picker { position: relative; min-width: 0; }
/* на телефоне шапка не вмещала «Санкт-Петербург» + тему + меню (кнопка меню уезжала за край, страница
   скроллилась вбок): длинное название сокращаем, а любое другое длинное — обрезаем многоточием */
.city-picker__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.show-narrow { display: none; }
@media (max-width: 480px) {
  .site-header__row { gap: var(--sp-3); }
  .hide-narrow { display: none; }
  .show-narrow { display: inline; }
}
@media (max-width: 400px) {
  .header-actions { gap: 6px; }
  .city-picker__btn { padding-inline: 10px; }
  .city-picker__btn .i:last-child { display: none; }
}
.city-picker__btn { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 7px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.city-picker__btn .i { width: 15px; height: 15px; color: var(--text-faint); flex: none; }
.city-picker__btn:hover { border-color: var(--border-strong); }
.city-popup { position: absolute; top: calc(100% + 8px); right: 0; width: 280px; max-height: min(70vh, 420px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; z-index: 50; }
.city-popup[hidden] { display: none; }
.city-popup__search { margin: var(--sp-3); }
.city-popup__list { flex: 1; overflow-y: auto; padding: 0 var(--sp-2) var(--sp-2); }
.city-popup__item { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: 9px 10px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: var(--text); }
.city-popup__item:hover { background: var(--surface-2); }
.city-popup__item.is-active { background: var(--accent-soft); color: var(--accent); }
.city-popup__kind { font-size: 12px; font-weight: 500; color: var(--text-faint); flex: none; }
@media (max-width: 480px) {
  /* растягиваем от низа шапки (64px) до низа экрана — иначе короткая часть списка (max-height:75vh)
     оставляет пустую треть экрана сверху вместо того, чтобы использовать весь доступный список */
  .city-popup { position: fixed; top: 64px; bottom: 0; left: 0; right: 0; width: auto; max-height: none; border-radius: 0; }
}
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun, :root:not([data-theme="light"]) .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon, :root:not([data-theme="light"]) .icon-btn .i-moon { display: block; }
/* бургер — <details>: открывается и без JS; панель встаёт под шапкой (.site-header — sticky, от неё и отсчёт) */
.burger { display: block; }
@media (min-width: 1024px) { .burger { display: none; } }
.menu-btn { display: inline-flex; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); align-items: center; justify-content: center; color: var(--text); cursor: pointer; list-style: none; }
.menu-btn::-webkit-details-marker { display: none; }
.menu-btn .i-close, .burger[open] .menu-btn .i-open { display: none; }
.burger[open] .menu-btn .i-close { display: block; }
.burger__panel { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-pop); padding-block: var(--sp-2) var(--sp-4); }
.burger__panel > .shell { max-width: 640px; }
.burger__city { display: flex; align-items: center; gap: var(--sp-3); padding: 13px 4px; font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--border); }
.burger__city > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.burger__change { font-size: 13px; font-weight: 500; color: var(--text-faint); }
.burger__group { border-bottom: 1px solid var(--border); }
.burger__group > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 13px 4px; font-weight: 700; color: var(--text); cursor: pointer; list-style: none; }
.burger__group > summary::-webkit-details-marker { display: none; }
.burger__group > summary .i { width: 16px; height: 16px; color: var(--text-faint); transition: transform .15s var(--ease); }
.burger__group[open] > summary .i { transform: rotate(180deg); }
.burger__items { display: grid; padding: 0 0 var(--sp-3); }
.burger__title { padding: var(--sp-2) 4px 4px 30px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.burger__items a { display: flex; align-items: center; gap: var(--sp-3); padding: 9px 4px; font-size: 14.5px; font-weight: 500; color: var(--text-dim); }
.burger__items a .i { width: 16px; height: 16px; flex: none; color: var(--text-faint); }
.burger__items a[aria-current="page"], .burger__items a[aria-current="page"] .i { color: var(--accent); }
.burger__items .burger__all { font-weight: 600; color: var(--accent); }
.burger__items .burger__all .i { color: var(--accent); order: 2; }

/* ---------- затухание края у горизонтально прокручиваемого блока (полоса навигации, таблицы) ----------
   классы is-more-left/right ставит app.js (fadeEdges), только когда за краем действительно что-то есть */
.scroll-fade.is-more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.scroll-fade.is-more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px); mask-image: linear-gradient(90deg, transparent, #000 56px); }
.scroll-fade.is-more-left.is-more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
/* первый столбец прилип слева — левый край не гасим, иначе бледнеет он */
.scroll-fade.table-wrap--sticky-first.is-more-left { -webkit-mask-image: none; mask-image: none; }
.scroll-fade.table-wrap--sticky-first.is-more-left.is-more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }

/* ---------- навигация по блокам длинной страницы (partials/page-toc.twig) ---------- */
/* липкая полоса сразу под шапкой (64px); прокрутка к якорю учитывает шапку + полосу */
.page-toc { position: sticky; top: 64px; z-index: 30; border-bottom: 1px solid var(--border); margin-bottom: var(--sp-4); }
.page-toc::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px) saturate(1.3); }
.page-toc__row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 8px; }
.page-toc__row::-webkit-scrollbar { display: none; }
.page-toc__item { flex: none; padding: 6px 13px; border-radius: 999px; border: 1px solid transparent; font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.page-toc__item:hover { color: var(--text); background: var(--surface-2); }
.page-toc__item.is-active { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
@media (min-width: 960px) { .page-toc__item--mobile { display: none; } }
.page-toc__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
html { scroll-padding-top: 80px; }
html:has(.page-toc) { scroll-padding-top: 124px; }
@media (prefers-reduced-motion: no-preference) { html:has(.page-toc) { scroll-behavior: smooth; } }

/* ---------- breadcrumbs / page head ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-faint); padding-top: var(--sp-5); }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: .5; }
.page-head { padding-block: var(--sp-2) var(--sp-6); }
.page-head h1 { font-size: clamp(22px, 3.4vw, 30px); }
.page-head__lead { color: var(--text-dim); margin-top: 6px; font-size: 15px; }
.freshness { display: inline-flex; align-items: center; gap: 7px; margin-top: var(--sp-3); font-size: 13px; color: var(--text-faint); }
.freshness__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); animation: pulse 2.4s var(--ease) infinite; }
.freshness__dot--old { background: var(--chart-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chart-2) 18%, transparent); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: var(--sp-5); }
@media (max-width: 400px) { .card-pad { padding: var(--sp-4); } }
.section { padding-block: var(--sp-8); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.section-head h2 { font-size: 18px; }
.section-head__hint { font-size: 13px; color: var(--text-faint); }

/* ---------- KPI cards ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 720px) { .kpi-row { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }
.kpi-row--pairs { grid-template-columns: 1fr; }
@media (min-width: 640px) { .kpi-row--pairs { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); } }
.kpi-row--three { grid-template-columns: 1fr; }
@media (min-width: 560px) { .kpi-row--three { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }
.kpi__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.kpi__pair-item { display: flex; flex-direction: column; gap: 8px; padding-left: var(--sp-4); border-left: 1px solid var(--border); }
.kpi__pair-item:first-child { padding-left: 0; border-left: none; }
.kpi__pair-label { font-size: 12px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi--pair .kpi__value { font-size: clamp(19px, 3.2vw, 23px); }
.kpi--pair .delta { font-size: 11.5px; }
.kpi { padding: var(--sp-4); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.kpi__label { font-size: 12.5px; color: var(--text-dim); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi__badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.kpi__value { font-size: clamp(22px, 4vw, 27px); display: flex; align-items: baseline; gap: 6px; }
.kpi__value .n { font-size: 1em; }
.kpi__cur { font-size: .5em; color: var(--text-faint); font-weight: 700; }
.kpi__who { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi__who a { color: var(--text); font-weight: 600; }
.kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: 2px; }
.delta { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.delta.is-up { color: var(--good); } .delta.is-down { color: var(--bad); }
.kpi .spark { width: 76px; height: 28px; color: var(--accent); flex: none; }
.kpi--sell .spark, .kpi--buy .spark { color: var(--good); }
.spark-area { fill: none; }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- tabs / segmented control ---------- */
.tabs { display: flex; gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; width: max-content; max-width: 100%; min-width: 0; overflow-x: auto; }
.tabs-more { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; }
.tabs-more .i { width: 14px; height: 14px; }
.tabs-more:hover { color: var(--text); border-color: var(--border-strong); }
.currency-picker { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 auto; }
.currency-picker__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.currency-more { display: flex; flex-wrap: wrap; gap: 6px; }
.currency-more[hidden] { display: none; }
.tabs-more .i { transition: transform .15s var(--ease); }
.tabs-more.is-open .i { transform: rotate(180deg); }
/* кнопка «показать все валюты» под таблицей курсов обменника */
.table-more { display: flex; justify-content: center; border-top: 1px solid var(--border); padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.currency-more button, .currency-more a { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 700; color: var(--text-faint); cursor: pointer; }
.currency-more button:hover, .currency-more a:hover { color: var(--text); border-color: var(--border-strong); }
.currency-more button.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tabs a, .tabs button { border: none; background: none; padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--text-faint); cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), color .15s var(--ease); }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs a.is-active, .tabs button.is-active, .tabs a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.tabs--ghost { background: none; border: none; padding: 0; }
.tabs--ghost a, .tabs--ghost button { background: var(--surface); border: 1px solid var(--border); }
.tabs--ghost a.is-active, .tabs--ghost button.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- currency focus badge ---------- */
.currency-focus { display: flex; align-items: center; gap: 10px; }
.currency-focus__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.currency-focus__name { font-weight: 700; color: var(--text); font-size: 15px; }

/* ---------- rate table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-card); }
table.rates { width: 100%; border-collapse: collapse; font-size: 14px; }
@media (min-width: 760px) { table.rates { min-width: 640px; } }
table.rates th, table.rates td { padding: 13px 16px; text-align: right; white-space: nowrap; }
table.rates th:first-child, table.rates td.row-name { text-align: left; white-space: normal; }
table.rates .n { font-size: 15.5px; }
/* mobile: no horizontal scroll — name takes half the row, the rest (buy/sell)
   splits the other half; anything hidden via .hide-mobile drops out of the
   column count entirely, so table-layout:fixed only ever splits what's left. */
@media (max-width: 759px) {
  table.rates { table-layout: fixed; }
  table.rates th, table.rates td { padding: 11px 8px; }
  table.rates th:first-child, table.rates td.row-name { width: 50%; }
  /* name column here is a short currency code, not a bank/exchanger name —
     give the amount-tier and buy/sell columns the room instead */
  table.rates.rates--tiers th:first-child, table.rates.rates--tiers td.row-name { width: 22%; }
}
table.rates thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 700; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
/* узкий экран: «ПРОДАЖА» капсом с разрядкой не влезала в четверть таблицы внутри карточки (375px и уже) */
@media (max-width: 759px) { table.rates thead th { font-size: 10.5px; letter-spacing: .02em; } }
@media (max-width: 400px) {
  table.rates th, table.rates td { padding: 10px 6px; }
  table.rates th:first-child, table.rates td.row-name { width: 44%; }
  table.rates.rates--tiers th:first-child, table.rates.rates--tiers td.row-name { width: 22%; }
}
table.rates tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
table.rates tbody tr:last-child { border-bottom: none; }
table.rates tbody tr:hover { background: var(--surface-2); }
table.rates td.is-best { color: var(--good); }
table.rates .row-name__inline { display: flex; align-items: center; gap: 10px; }
table.rates .row-name__logo { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-faint); flex: none; }
table.rates .row-name__meta { font-size: 12px; color: var(--text-faint); font-weight: 500; margin-top: 2px; }
table.rates .row-name__inline > .row-name__meta { margin-top: 0; }
table.rates .row-name a { font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
table.rates .row-name a:hover { text-decoration-thickness: 2px; }
.rate-cell { display: inline-flex; flex-direction: column; align-items: flex-end; }
.rate-cell__spread { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.stale-badge { display: inline-block; white-space: nowrap; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: var(--bg-soft); color: var(--text-faint); margin-left: 6px; }
/* Метка вида точки (обменник/банк/отделение) в объединённых таблицах — /spb/ (Б113, сессия 5) */
.kind-badge { display: inline-block; white-space: nowrap; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
/* «Открыто сейчас» / «Закрыто» — по OpeningHours::isOpen() для центров обмена (Б35/Б143) */
.hours-badge { display: inline-block; white-space: nowrap; font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 999px; margin-left: 6px; }
.hours-badge--open { background: var(--good-soft); color: var(--good); }
.hours-badge--closed { background: var(--bad-soft); color: var(--bad); }
.notice-stale { border: 1px solid var(--bad); background: var(--bad-soft); color: var(--text); border-radius: var(--r-lg); padding: var(--sp-4); font-size: 14px; line-height: 1.5; }
.notice-stale a { font-weight: 700; color: var(--bad); }
.notice-empty { border: 1px dashed var(--border-strong); color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.notice-info { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text); border-radius: var(--r-lg); padding: var(--sp-4); font-size: 14px; line-height: 1.5; }
.notice-info strong { color: var(--accent); }

/* «Сколько вы переплатите» (Б38) — плашка с разницей лучший/худший курс, рассчитана на скриншот и «Поделиться» */
.notice-overpay { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; border: 1px solid var(--bad); background: var(--bad-soft); border-radius: var(--r-lg); padding: var(--sp-4); }
.notice-overpay__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 4vw, 28px); color: var(--bad); white-space: nowrap; }
.notice-overpay__text { flex: 1 1 220px; margin: 0; font-size: 14px; color: var(--text); line-height: 1.4; }
.notice-overpay .btn { flex: none; }
.notice-overpay__detail { flex: 1 0 100%; margin-top: 2px; }
.notice-overpay__detail summary { cursor: pointer; list-style: none; display: inline-block; font-size: 13px; font-weight: 600; color: var(--text-dim); border-bottom: 1px dotted var(--text-dim); }
.notice-overpay__detail summary::-webkit-details-marker { display: none; }
.notice-overpay__detail[open] summary { border-bottom-style: solid; color: var(--text); }
.notice-overpay__detail p { margin: var(--sp-2) 0 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); }

/* /raschet/ — хаб раздела и форма расчёта (Б70) */
.raschet-grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 720px) { .raschet-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }
.raschet-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; transition: border-color .15s, transform .15s; }
.raschet-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.raschet-card__icon { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.raschet-card h2, .raschet-card h3 { font-size: 17px; }
.raschet-card[hidden] { display: none; }
.raschet-cat { font-size: 15px; font-weight: 700; color: var(--text-dim); margin: 0 0 var(--sp-3); }
.raschet-card__go { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: auto; display: flex; align-items: center; gap: 2px; }
.raschet-form__row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-3); }
.raschet-form__field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-faint); flex: 1 1 140px; min-width: 0; }
.raschet-form__field input, .raschet-form__field select { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); padding: 10px 12px; font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.raschet-form__field input:focus, .raschet-form__field select:focus { outline: none; border-color: var(--accent); }
.raschet-form__field input[type=date] { min-height: 44px; }
/* налог на вклады (Б98) */
.dt-answer { font-size: 16px; line-height: 1.55; color: var(--text-dim); margin: 0 0 var(--sp-4); max-width: 60em; }
.dt-answer strong { color: var(--text); }
.dt-answer a { color: var(--accent); }
.dt-form { display: grid; gap: var(--sp-3); }
.dt-more { border-top: 1px solid var(--border); padding-top: var(--sp-3); display: grid; gap: var(--sp-3); }
.dt-more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text-dim); }
.dt-more > summary::-webkit-details-marker { display: none; }
.dt-more > summary:hover, .dt-more[open] > summary { color: var(--text); }
.dt-more > summary .i { color: var(--accent); flex: none; }
.dt-more__hint { font-size: 12.5px; margin: 0; line-height: 1.5; }
.dt-more > .btn { justify-self: start; }
.dt-fx[hidden], .raschet-form [data-show-if][hidden] { display: none; }
.dt-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.dt-check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.dt-form__submit { display: flex; justify-content: flex-start; }
.dt-result { margin-top: var(--sp-4); display: grid; gap: var(--sp-4); }
.dt-result > * { min-width: 0; } /* широкая таблица листается внутри .table-wrap, а не растягивает сетку */
.dt-kpi-tax { border-color: var(--accent); }
.dt-kpis .kpi__who { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.45; }
.dt-steps h3 { font-size: 15px; margin: 0 0 var(--sp-3); }
.dt-steps ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.dt-steps strong { color: var(--text); }
.dt-steps a { color: var(--accent); }
.dt-error { color: var(--bad, #d33); font-weight: 600; }
.dt-reverse { margin: var(--sp-4) 0; font-size: 15px; line-height: 1.55; color: var(--text-dim); }
.dt-reverse strong { color: var(--text); font-size: 17px; }
.dt-table table.rates { min-width: 0; table-layout: auto; }
.dt-table table.rates th, .dt-table table.rates td { white-space: normal; }
.dt-sub { font-size: 11.5px; font-weight: 500; }
/* подпись-span в ячейке идёт вслед за текстом: на мобиле — своей строкой, на десктопе — через отступ */
td span.dt-sub { display: block; margin-top: 2px; }
@media (min-width: 760px) { td span.dt-sub:not(.tn-sub):not(.kr-changes__days) { display: inline; margin: 0 0 0 8px; } }
.dt-note { font-size: 12.5px; margin: var(--sp-2, 8px) 0 0; }
.dt-max td { background: var(--accent-soft); }
/* проценты по 395 ГК (Б99.3) */
.treaty-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; line-height: 1.4; }
.treaty-badge--full { background: var(--good-soft); color: var(--good); }
.treaty-badge--suspended { background: var(--accent-soft); color: var(--accent); }
.treaty-badge--off { background: var(--bad-soft); color: var(--bad); }
.div-table td, .div-table th { white-space: nowrap; }
.div-form { grid-template-columns: minmax(0, 1fr); }
.div-form select { width: 100%; min-width: 0; }
.div-row { padding-bottom: var(--sp-3); border-bottom: 1px dashed var(--border); }
/* книга учёта доходов и расходов (Б131.2): итоги кварталов — строками внутри таблицы */
.kudir-table .kudir-total td { background: var(--surface-2); font-weight: 700; }
table.rates.kudir-table thead th { white-space: normal; }
table.rates.kudir-table .kudir-doc { text-align: left; white-space: normal; }
table.rates.rates--wide.kudir-table .kudir-n { width: 1%; text-align: left; }
@media (max-width: 640px) { .kudir-table .kudir-hide-sm { display: none; } }
/* калькулятор инфляции «тогда и сейчас» (Б101): полосы «что стало с суммой» и таблица по годам */
.tn-bars { display: grid; gap: var(--sp-3); }
.tn-bars .section-head h3, .tn-burn .section-head h3 { font-size: 16px; margin: 0; }
.tn-burn .chart { --accent: var(--bad); } /* линия потерь — цветом убытка */
.tn-bar__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); font-size: 14px; color: var(--text-dim); }
.tn-bar__head strong { color: var(--text); font-family: var(--font-display); font-size: 16px; white-space: nowrap; }
.tn-bar__track { height: 10px; border-radius: 999px; background: var(--surface-2); margin: 6px 0 4px; overflow: hidden; }
.tn-bar__track span { display: block; height: 100%; border-radius: 999px; background: var(--border-strong); }
.tn-bar--accent .tn-bar__track span { background: var(--accent); }
.tn-bar--accent .tn-bar__head strong { color: var(--accent); }
.tn-bar__hint { font-size: 12px; }
table.rates.tn-years { table-layout: auto; min-width: 0; }
table.rates.tn-years th:first-child, table.rates.tn-years td.row-name { width: auto; white-space: nowrap; }
table.rates.tn-years thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.tn-sub { display: block; }
.tn-up { color: var(--good); font-weight: 700; }
@media (max-width: 480px) {
  table.rates.tn-years th, table.rates.tn-years td { padding: 10px 7px; font-size: 13px; }
  table.rates.tn-years thead th { font-size: 10.5px; letter-spacing: .02em; white-space: normal; }
}
/* инфляция по годам и по месяцам (Б101): полоса в строке таблицы и таблица «все месяцы всех лет» */
.inf-years__bar { width: 28%; padding-left: 0 !important; }
.inf-years__bar span { display: block; height: 8px; border-radius: 999px; background: var(--accent); opacity: .75; }
.inf-years__bar span.is-over { background: linear-gradient(90deg, var(--accent) 70%, transparent); }
.inf-years__bar span.is-down { background: var(--good); }
.inf-down, .inf-down strong { color: var(--good); }
table.rates.inf-matrix { table-layout: auto; min-width: 760px; font-size: 13px; }
table.rates.inf-matrix th, table.rates.inf-matrix td { padding: 8px 8px; white-space: nowrap; }
table.rates.inf-matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
table.rates.inf-matrix th:first-child, table.rates.inf-matrix td.row-name { position: sticky; left: 0; background: var(--surface); z-index: 1; width: auto; }
table.rates.inf-matrix thead th:first-child { z-index: 3; }
@media (max-width: 640px) { .inf-years__bar, .inf-hide-sm { display: none; } }
/* архив среднего курса по месяцам (Б185): год в строке, двенадцать месяцев в колонках — четыре знака
   после запятой не влезают в 640 px, поэтому шрифт мельче, а год и шапка остаются на месте при прокрутке */
table.rates.sk-matrix { table-layout: auto; min-width: 840px; font-size: 12.5px; }
table.rates.sk-matrix th, table.rates.sk-matrix td { padding: 7px 6px; white-space: nowrap; }
table.rates.sk-matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
/* год залипает слева: без границы и отступа соседняя клетка уезжает под него и обрезанные цифры
   читаются как продолжение года («2026» + «516» от 76,8516), поэтому колонку года отбиваем */
table.rates.sk-matrix th:first-child, table.rates.sk-matrix td.row-name { position: sticky; left: 0; background: var(--surface); padding-right: 12px; z-index: 1; width: auto; }
/* линия рисуется псевдоэлементом: у таблицы border-collapse, в нём border-right клетки не виден */
table.rates.sk-matrix th:first-child::after, table.rates.sk-matrix td.row-name::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: var(--border); }
table.rates.sk-matrix thead th:first-child { z-index: 3; }
.g395-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.g395-bar__title { font-size: 17px; margin: 0; }
.g395-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.g395-table { font-size: 13.5px; }
.g395-table tfoot td { border-top: 1px solid var(--border); font-weight: 700; }
.g395-table .g395-event td { text-align: left; white-space: normal; background: var(--surface-2); color: var(--text-dim); font-size: 12.5px; font-weight: 600; }
.g395-event .i { display: inline-block; margin-right: 4px; color: var(--accent); vertical-align: -2px; }
.g395-mor td { background: var(--accent-soft); }
.g395-formula { color: var(--text-dim); white-space: nowrap; }
.g395-c-period { white-space: nowrap; }
/* узкий экран: период — проценты в одну строку, под ними формула (в ней долг, дни, ставка и дни в году) */
@media (max-width: 640px) {
  .g395-table, .g395-table tbody, .g395-table tfoot { display: block; }
  .g395-table thead, .g395-table .g395-c-hide, .g395-table .g395-c-debt { display: none; }
  .g395-table tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .g395-table td { padding: 0 !important; border: 0 !important; width: auto !important; background: none; }
  .g395-table tr.g395-mor, .g395-table tr.g395-event { background: var(--accent-soft); }
  .g395-table tr.g395-event { background: var(--surface-2); }
  .g395-table .g395-c-period { grid-column: 1; text-align: left; }
  .g395-table .g395-c-int { grid-column: 2; grid-row: 1; }
  .g395-table .g395-formula { grid-column: 1 / -1; text-align: left; white-space: normal; font-size: 12.5px; }
  .g395-table tr.g395-event { display: block; }
  .g395-table tfoot td { border-top: 0; }
}
/* ключевая ставка (Б99.1) */
.kr-kpis { margin-bottom: var(--sp-4); }
.kr-answer { margin-bottom: 0; }
.kr-form { display: grid; gap: var(--sp-3); }
.kr-result { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4); font-size: 15px; line-height: 1.5; }
.kr-result p { margin: 0; }
.kr-result p + p { margin-top: 6px; font-size: 13.5px; }
.kr-result__rate { font-family: var(--font-display); font-size: 1.25em; color: var(--accent); }
.kr-result--miss { border-color: var(--border-strong); background: var(--surface-2); }
.kr-changes__year th { text-align: left; font-size: 12.5px; font-weight: 800; color: var(--text-dim); background: var(--surface-2); padding-top: 8px; padding-bottom: 8px; }
.kr-changes__year a { color: var(--accent); }
/* цифровые таблицы ставки: ширина по содержимому, без переносов внутри чисел; на узком экране листаются вбок */
table.rates.kr-years, table.rates.kr-changes { table-layout: auto; min-width: 0; }
table.rates.kr-years th:first-child, table.rates.kr-years td.row-name, table.rates.kr-changes th:first-child, table.rates.kr-changes td.row-name { width: auto; white-space: nowrap; }
/* матрица «годы × месяцы» на хабе ставки (Б184): как у инфляции — листается вбок, год прилипает слева */
table.rates.kr-matrix { table-layout: auto; min-width: 760px; font-size: 13px; }
table.rates.kr-matrix th, table.rates.kr-matrix td { padding: 8px 8px; white-space: nowrap; }
table.rates.kr-matrix thead th { position: sticky; top: 0; background: var(--surface); z-index: 2; }
table.rates.kr-matrix th:first-child, table.rates.kr-matrix td.row-name { position: sticky; left: 0; background: var(--surface); z-index: 1; width: auto; }
table.rates.kr-matrix thead th:first-child { z-index: 3; }
.kr-changes__until { display: block; white-space: nowrap; }
.kr-changes__days { display: block; font-size: 12px; }
@media (max-width: 759px) {
  table.rates.kr-years th, table.rates.kr-years td, table.rates.kr-changes th, table.rates.kr-changes td { padding: 10px 7px; font-size: 13.5px; }
  table.rates.kr-years thead th, table.rates.kr-changes thead th { font-size: 10.5px; letter-spacing: .02em; }
}
.dt-about h3 { font-size: 16px; color: var(--text); margin: var(--sp-5, 20px) 0 var(--sp-2, 8px); font-weight: 800; }
.dt-about ol { padding-left: 1.2em; margin: 0 0 var(--sp-3); }
.dt-about .table-wrap { margin: var(--sp-3) 0 0; }
/* хаб налога на вклады: карточки лет */
.dt-year { gap: 10px; }
.dt-year--now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.dt-year__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.dt-year__badge--past { background: var(--surface-2); color: var(--text-faint); }
.dt-year__label { font-size: 13px; color: var(--text-faint); margin-top: -6px; }
.dt-year__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.dt-timeline { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.dt-timeline li { display: grid; grid-template-columns: 72px 1fr; gap: var(--sp-3); align-items: baseline; }
.dt-timeline__when { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 14px; }
.next-step__links { display: flex; flex-wrap: wrap; gap: 8px; }
.next-step__cta { justify-content: center; }
.next-step__hint { font-size: 12px; margin-top: 6px; text-align: center; }
.next-step__all { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px dashed var(--border); width: 100%; font-size: 14px; font-weight: 700; color: var(--accent); }
.next-step__all:hover { text-decoration: underline; text-underline-offset: 2px; }

.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-faint); min-width: 180px; }
.search-box input { border: none; background: none; outline: none; width: 100%; color: var(--text); }

/* mobile card list fallback for rate tables: only hide the table when a card
   list right before it takes its place — a lone table-wrap must stay visible
   (it scrolls horizontally on narrow screens instead). */
.rate-cards { display: grid; gap: var(--sp-3); }
@media (min-width: 760px) { .rate-cards { display: none; } }
.rate-cards + .table-wrap { display: none; }
@media (min-width: 760px) { .rate-cards + .table-wrap { display: block; } }
.rate-card { padding: var(--sp-4); display: flex; flex-direction: column; gap: 10px; }
.rate-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.rate-card__name { font-weight: 700; font-size: 15px; }
.rate-card__meta { font-size: 12.5px; color: var(--text-faint); }
.rate-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate-card__figure { display: flex; flex-direction: column; gap: 2px; }
.rate-card__figure .is-best { color: var(--good); }
.rate-card__figure-label { font-size: 11px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- promo / calculator ---------- */
.promo { background: linear-gradient(155deg, #14151C, #05060A); color: #F4F4F8; border-radius: var(--r-lg); padding: var(--sp-5); position: relative; overflow: hidden; }
.promo::after { content: ''; position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px; background: radial-gradient(circle, color-mix(in srgb, var(--good) 55%, transparent), transparent 70%); filter: blur(4px); }
.promo__eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #A3E635; }
.promo h3 { font-size: 17px; margin-top: 10px; color: #fff; }
.promo p { font-size: 13.5px; color: rgba(244,244,248,.72); margin: 8px 0 0; }
.promo .btn { margin-top: var(--sp-4); }

.calc { padding: var(--sp-5); }
.calc__field { display: flex; align-items: center; gap: var(--sp-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; background: var(--surface-2); }
.calc__field input { flex: 1; border: none; background: none; outline: none; font-family: var(--font-display); font-weight: 700; font-size: 17px; min-width: 0; }
.calc__field select { border: none; background: none; outline: none; font-weight: 700; color: var(--text-dim); }
.calc__swap { display: flex; justify-content: center; margin-block: -2px; }
.calc__swap button { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; }
.calc__result { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px dashed var(--border); }
.calc__result-label { font-size: 12.5px; color: var(--text-faint); }
.calc__result-value { font-size: 26px; margin-top: 4px; }
.calc__result-rate { font-size: 13px; color: var(--text-dim); }
.calc__result-who { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.calc__result-who a { color: var(--accent); font-weight: 700; }
.calc__amounts { display: flex; gap: 6px; margin-top: var(--sp-3); flex-wrap: wrap; }
.calc__amounts button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); cursor: pointer; }
.calc__amounts button.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- watchlist ---------- */
.watchlist { display: flex; flex-direction: column; }
.watch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 11px 0; border-bottom: 1px solid var(--border); }
.watch-row:last-child { border-bottom: none; }
.watch-row__code { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.watch-row__flag { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--text-dim); }
.watch-row__values { text-align: right; }
.watch-row__who { font-size: 11px; color: var(--text-faint); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: var(--r-md); font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: transform .12s var(--ease), background .15s var(--ease), border-color .15s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-lime { background: #A3E635; color: #0B0C0F; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; }

/* ---------- ads ---------- */
.ad-slot { display: flex; align-items: center; justify-content: center; min-height: 100px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); background: var(--surface-2); position: relative; }
.ad-slot::before { content: 'Реклама'; position: absolute; top: 8px; left: 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 700; }
.ad-slot--wide { min-height: 120px; }

/* ---------- info blocks ---------- */
.info-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .info-grid { grid-template-columns: 1.6fr 1fr; } }
.fact-list { display: grid; gap: 12px; }
.fact { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.fact:last-child { border-bottom: none; }
.fact__icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.fact__label { font-size: 12px; color: var(--text-faint); font-weight: 600; }
.fact__value { font-weight: 600; margin-top: 2px; }

.map-frame { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); height: 320px; background: var(--surface-2); }
.map-frame iframe { width: 100%; height: 100%; border: none; }
.offices-differ { display: flex; align-items: center; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-faint); }
.offices-differ svg { width: 15px; height: 15px; flex: none; opacity: .75; }
.office-map { margin-bottom: var(--sp-3); }
.office-map summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--accent); user-select: none; }
.office-map summary::-webkit-details-marker { display: none; }
.office-map summary svg { width: 16px; height: 16px; flex: none; }
.office-map summary svg:last-child { transition: transform .15s var(--ease); }
.office-map[open] summary svg:last-child { transform: rotate(180deg); }
.office-map__frame { height: 280px; margin-top: var(--sp-2); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-dim); }
.chip:hover { color: var(--text); }

/* каталог /skolko/: инструмент сверху, раскрывающиеся списки сумм снизу */
.skolko-hero { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .skolko-hero { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); } }
.skolko-hero__note { margin: var(--sp-4) 0 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.skolko-hero__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-4); }
.calc__go { margin-top: var(--sp-3); }
.calc__go .btn { width: 100%; justify-content: space-between; }

.acc-list { border-top: 1px solid var(--border); }
.acc { border-bottom: 1px solid var(--border); }
.acc:last-child { border-bottom: none; }
.acc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--surface-2); }
.acc__code { flex: none; min-width: 54px; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--text); padding: 4px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.acc__name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; color: var(--text); }
.acc__hint { display: block; font-weight: 500; font-size: 12px; color: var(--text-faint); }
.acc__meta { flex: none; font-size: 12.5px; color: var(--text-faint); font-weight: 600; }
@media (max-width: 479px) { .acc__meta { display: none; } }
.acc > summary .i { flex: none; color: var(--text-faint); transition: transform .15s var(--ease); }
.acc[open] > summary .i { transform: rotate(180deg); }
.acc[open] > summary { background: var(--surface-2); }
.acc__body { padding: var(--sp-3) var(--sp-5) var(--sp-4); }

/* на узком экране суммы одной валюты — одна прокручиваемая строка, а не четыре ряда */
@media (max-width: 639px) {
  .chip-list--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 92%, rgba(0, 0, 0, .25)); mask-image: linear-gradient(90deg, #000 92%, rgba(0, 0, 0, .25)); }
  .chip-list--scroll::-webkit-scrollbar { display: none; }
  .chip-list--scroll .chip { flex: none; }
}

.streak { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; background: var(--good-soft); color: var(--good); white-space: nowrap; }
.streak .i { width: 12px; height: 12px; }
.streak.is-down { background: var(--bad-soft); color: var(--bad); }

.faq { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); padding: var(--sp-3) 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 14.5px; color: var(--text); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .i { flex: none; color: var(--text-faint); transition: transform .15s var(--ease); }
.faq-item[open] summary .i { transform: rotate(180deg); }
.faq-item p { margin: var(--sp-2) 0 0; font-size: 14px; color: var(--text-dim); line-height: 1.6; }

.term-list { columns: 1; column-gap: var(--sp-6); }
@media (min-width: 640px) { .term-list { columns: 2; } }
.term-list li { break-inside: avoid; margin-bottom: 8px; }
.term-list a { padding: 8px 0; display: block; border-bottom: 1px solid var(--border); font-weight: 600; }

/* ---------- словарь: алфавитный указатель ---------- */
.alpha-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.alpha-nav a { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 13px; color: var(--text-dim); transition: color .15s, border-color .15s; }
.alpha-nav a:hover { color: var(--accent); border-color: var(--accent); }
.term-group { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); padding-top: var(--sp-6); scroll-margin-top: 84px; }
@media (min-width: 480px) { .term-group { grid-template-columns: 56px 1fr; gap: var(--sp-4); } }
.term-group__letter { font-family: var(--font-text); font-weight: 700; font-size: 20px; color: var(--text-faint); line-height: 1; }
.term-group__list { list-style: none; margin: 0; padding-top: var(--sp-3); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 var(--sp-4); }
.term-group__list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 2px; font-weight: 600; color: var(--text); }
.term-group__list a:hover { color: var(--accent); }
.term-group__list a .i { width: 15px; height: 15px; color: var(--text-faint); flex: none; }

.prose { font-size: 15px; line-height: 1.7; color: var(--text-dim); }
.prose h2 { font-size: 18px; color: var(--text); margin: var(--sp-6) 0 var(--sp-3); font-weight: 800; }
.prose p { margin: 0 0 var(--sp-3); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose ul { padding-left: 1.1em; margin: 0 0 var(--sp-3); }
.prose a.btn { text-decoration: none; }
.prose a.btn-primary { color: var(--accent-ink); }
details.disclosure summary { cursor: pointer; font-weight: 700; color: var(--accent); font-size: 14px; list-style: none; }
details.disclosure summary::-webkit-details-marker { display: none; }
details.disclosure summary::after { content: 'Читать полностью'; }
details.disclosure[open] summary::after { content: 'Свернуть'; }

.news-list { display: grid; gap: var(--sp-3); }
.news-item { padding: var(--sp-4); }
.news-item__title { font-weight: 700; font-size: 15px; }
.news-item__title a:hover { color: var(--accent); }
.news-item__text { color: var(--text-dim); font-size: 13.5px; margin-top: 6px; }
.news-item__date { font-size: 12px; color: var(--text-faint); margin-top: 8px; }

/* ---------- chart: серверный SVG + uPlot после первого взаимодействия ---------- */
/* min-width: 0 обязателен везде: без него лента чипсов с горизонтальной прокруткой считает
   своей минимальной шириной всю строку кнопок и растягивает карточку на узком экране */
.chart { margin: 0; color: var(--accent); display: grid; gap: var(--sp-3); min-width: 0; }
.chart__bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: space-between; min-width: 0; }
.chart__periods, .chart__tools { display: flex; gap: 6px; align-items: center; }
.chart__periods { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.chart__periods::-webkit-scrollbar { display: none; }
.chart__chip { flex: none; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-dim); cursor: pointer; white-space: nowrap; }
.chart__chip:hover { color: var(--text); }
.chart__chip.is-active, .chart__chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chart__chip[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* сетка: подписи значений — слева, времени — снизу, полотно растягивается */
.chart__body { display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 4px; min-width: 0; }
.chart__axis { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.chart__axis--y { grid-column: 1; grid-row: 1; position: relative; }
.chart__axis-size { visibility: hidden; font-style: normal; }
.chart__axis--y span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.chart__axis--x { grid-column: 2; grid-row: 2; display: flex; justify-content: space-between; gap: 4px; min-width: 0; overflow: hidden; }
.chart__axis--x span { white-space: nowrap; }
.chart__plot { grid-column: 2; grid-row: 1; position: relative; height: 210px; touch-action: pan-y; }
.chart__svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart__gridline { stroke: var(--border); stroke-width: 1; }
.chart__area { stroke: none; }
.chart__line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.chart__mark { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid currentColor; transform: translate(-50%, -50%); pointer-events: none; }
.chart__mark--max { border-color: var(--good); }
.chart__mark--min { border-color: var(--bad); }
.chart__mark--last { background: currentColor; }
.chart.is-live .chart__mark, .chart.is-live .chart__svg { display: none; }
.chart__cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-strong); pointer-events: none; }
.chart__cursor::after { content: ''; position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); top: var(--dot, 0); transform: translateY(-50%); }
.chart__tip { position: absolute; z-index: 3; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); font-size: 12px; padding: 6px 9px; border-radius: 9px; white-space: nowrap; transform: translate(-50%, -120%); }
.chart__tip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart__tip span { display: block; color: var(--text-faint); font-size: 11px; }

.chart__foot { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: baseline; font-size: 12.5px; color: var(--text-dim); }
.chart__delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart__delta.is-up { color: var(--good); }
.chart__delta.is-down { color: var(--bad); }
.chart__range, .chart__hint { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.chart__hint { margin-left: auto; }

.chart__data > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--accent); }
.chart__data > summary::-webkit-details-marker { display: none; }
.chart__tablewrap { max-height: 320px; overflow: auto; margin-top: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.chart__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chart__table th, .chart__table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.chart__table th { position: sticky; top: 0; background: var(--surface); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); z-index: 1; }
.chart__table td.num, .chart__table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.chart__table td.is-up { color: var(--good); }
.chart__table td.is-down { color: var(--bad); }
.chart__data [data-chart-csv] { margin-top: var(--sp-3); }

@media (max-width: 600px) {
  .chart__plot { height: 180px; }
  .chart__axis--x span:nth-child(2), .chart__axis--x span:nth-child(4) { display: none; }
  .chart__hint { display: none; }
  /* подсказка про выделение мышью — только для десктопа */
  .chart__zoom { display: none; }
}

/* uPlot (vendor/uplot.iife.min.js): базовая раскладка из uPlot.css + наши цвета */
.uplot, .uplot * { box-sizing: border-box; }
.uplot { font-family: var(--font-text); line-height: 1.5; }
.u-wrap { position: relative; user-select: none; }
.u-over, .u-under { position: absolute; }
.u-under { overflow: hidden; }
.uplot canvas { display: block; position: relative; width: 100%; height: 100%; }
.u-axis { position: absolute; }
.u-select { position: absolute; pointer-events: none; background: var(--accent-soft); }
.u-cursor-x, .u-cursor-y { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.u-hz .u-cursor-x { height: 100%; border-right: 1px dashed var(--border-strong); }
.u-hz .u-cursor-y { width: 100%; border-bottom: 1px dashed var(--border-strong); }
.u-cursor-pt { position: absolute; top: 0; left: 0; border-radius: 50%; border: 0 solid; pointer-events: none; will-change: transform; background-clip: padding-box !important; }
.u-axis.u-off, .u-select.u-off, .u-cursor-x.u-off, .u-cursor-y.u-off, .u-cursor-pt.u-off { display: none; }
.u-legend { display: none; }
.chart.is-live .chart__axis--y, .chart.is-live .chart__axis--x { display: none; }
.chart.is-live .chart__body { grid-template-columns: minmax(0, 1fr); }
.chart.is-live .chart__plot { grid-column: 1; height: 260px; }
.chart.is-live .chart__legend { display: flex; }
.chart__legend { display: none; flex-wrap: wrap; gap: var(--sp-3); font-size: 12px; color: var(--text-dim); }
.chart__legend b { font-variant-numeric: tabular-nums; color: var(--text); }
.chart__legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.chart__legend-axis { font-style: normal; color: var(--text-faint); }
/* второй ряд на своей шкале (ставка + курс, Б99.1): кнопка — цветом его линии */
.chart__chip--compare[aria-pressed="true"] { background: var(--chart-2); border-color: var(--chart-2); color: #1A1204; }
.chart__zoom { font-size: 11.5px; color: var(--text-faint); }
@media (max-width: 600px) { .chart.is-live .chart__plot { height: 220px; } }
/* крупный график посадочной /kurs/{code}/grafik/ (Б47) */
.chart-lg .chart__plot, .chart-lg .chart.is-live .chart__plot { height: 340px; }
@media (max-width: 600px) { .chart-lg .chart__plot, .chart-lg .chart.is-live .chart__plot { height: 250px; } }
/* цифровые таблицы в 5–6 колонок (динамика курса, месяцы и годы архива): ширина по содержимому,
   на узком экране листаются вбок внутри .table-wrap — как таблицы ключевой ставки (.kr-years) */
table.rates.rates--wide { table-layout: auto; min-width: 0; }
table.rates.rates--wide th:first-child, table.rates.rates--wide td.row-name { width: auto; white-space: nowrap; }
@media (max-width: 759px) {
  table.rates.rates--wide th, table.rates.rates--wide td { padding: 10px 7px; font-size: 13.5px; }
  /* длинные заголовки («К предыдущему», «Конец года») — по словам в две строки: столбец шириной в число, а не в подпись */
  table.rates.rates--wrap-head thead th { white-space: normal; vertical-align: bottom; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--sp-12); padding-block: var(--sp-8); }
.footer-grid { display: grid; gap: var(--sp-6) var(--sp-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-about { grid-column: 1 / -1; }
.footer-grid .footer-about .brand { font-size: 19px; color: var(--text); }
.footer-about p { margin-top: var(--sp-3); font-size: 13.5px; max-width: 34em; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.footer-grid h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: var(--sp-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--text-dim); font-size: 13.5px; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-faint); }
.footer-grid + .ad-slot { margin-top: var(--sp-8); }

/* ---------- floor ad + toast ---------- */
.floor-ad { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.floor-ad__close { position: absolute; top: -14px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); border: none; display: flex; align-items: center; justify-content: center; }

/* ---------- utility ---------- */
.hide-mobile { display: none; } @media (min-width: 760px) { .hide-mobile { display: table-cell; } }
/* на мобиле элемент сохраняет свой display (div остаётся блоком, а не прилипает к тексту строкой) */
@media (min-width: 760px) { .hide-desktop { display: none; } }
.muted { color: var(--text-faint); }
.text-right { text-align: right; }
.stack { display: grid; gap: var(--sp-4); min-width: 0; }
.stack > * { min-width: 0; }
.grid-2 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-side { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.grid-side > * { min-width: 0; }
@media (min-width: 960px) { .grid-side { grid-template-columns: 2fr 1fr; align-items: start; } }

/* ---------- архив курсов ЦБ: «курс на дату» и пересчёт суммы ---------- */
.date-go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.date-go input { flex: 1 1 150px; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); padding: 10px 14px; font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.date-go input:focus { outline: none; border-color: var(--accent); }
.date-go .btn { flex: none; }
.date-go strong { font-family: var(--font-display); font-size: 19px; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- главная-портал (Б113, вариант A «Панель») ---------- */
.hp-head { padding-block: var(--sp-6) var(--sp-5); }
.hp-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--sp-4); font-size: 13px; color: var(--text-faint); }
.hp-head h1 { margin-top: 10px; font-size: clamp(26px, 4.4vw, 34px); line-height: 1.15; }
.hp-head__lead { margin: 8px 0 0; max-width: 760px; font-size: 16px; color: var(--text-dim); }
.hp-live { display: inline-flex; align-items: center; gap: 7px; }
.hp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); flex: none; }
.hp-pill { padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; white-space: nowrap; }
.hp-code { display: inline-block; min-width: 42px; padding: 2px 0; border-radius: 7px; background: var(--surface); border: 1px solid var(--border); font-family: var(--font-display); font-size: 12px; font-weight: 800; text-align: center; }
.hp-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; color: var(--accent); }

/* верхний ряд: 5 карточек; на телефоне прокручиваются вбок */
.hp-top { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 72%); gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--sp-5); padding-bottom: 4px; scrollbar-width: thin; }
.hp-top > * { scroll-snap-align: start; }
@media (min-width: 720px) { .hp-top { grid-auto-columns: minmax(200px, 38%); } }
@media (min-width: 1100px) { .hp-top { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; } }
.hp-tile { display: flex; flex-direction: column; gap: 12px; padding: var(--sp-4); min-width: 0; transition: border-color .15s var(--ease); }
.hp-tile:hover { border-color: var(--border-strong); }
.hp-tile__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hp-tile__label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-tile__value { font-size: 27px; font-weight: 800; line-height: 1; white-space: nowrap; }
.hp-tile__value small { font-size: 17px; }
.hp-tile__value .kpi__cur { margin-left: 4px; font-size: 14px; }
.hp-tile__since { margin-left: 6px; font-family: var(--font-text); font-size: 13px; font-weight: 600; color: var(--text-faint); letter-spacing: 0; }
.hp-tile__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.hp-tile__notes { display: flex; flex-direction: column; gap: 3px; font-size: 12px; min-width: 0; white-space: nowrap; }
.hp-tile__notes b { color: var(--text); }
.hp-tile__notes--meeting { align-items: flex-start; gap: 6px; margin-top: auto; }
.hp-tile .spark { width: 76px; height: 28px; color: var(--accent); flex: none; }
.hp-metals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: baseline; font-size: 13px; color: var(--text-dim); }
.hp-metals b { font-size: 15px; color: var(--text); text-align: right; }

/* наличная валюта */
.hp-cash-wrap { padding-block: var(--sp-6) var(--sp-4); }
.hp-cash { padding: var(--sp-5); display: grid; gap: var(--sp-4); }
@media (max-width: 400px) { .hp-cash { padding: var(--sp-4); } }
.hp-cash__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
.hp-cash__head h2 { font-size: 20px; }
.hp-cash__head p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-faint); }
.hp-cash__pick { flex: none; }
.hp-cash__pick-mobile .btn { width: 100%; }
.hp-wide { display: none; } @media (min-width: 720px) { .hp-wide { display: inline-flex; } }
@media (min-width: 720px) { .hp-narrow { display: none; } }
.hp-cities { display: grid; gap: var(--sp-4); }
@media (min-width: 860px) { .hp-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hp-city { display: flex; flex-direction: column; gap: 12px; padding: var(--sp-4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
.hp-city__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hp-city__head h3 { font-size: 18px; }
.hp-city__head .hp-live { font-size: 12.5px; color: var(--text-faint); }
.hp-city__counts { margin-top: -6px; font-size: 13px; color: var(--text-dim); }
.hp-city__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.hp-tabs { display: none; gap: 4px; padding: 4px; border-radius: var(--r-md); background: var(--bg-soft); }
.hp-tabs button { flex: 1; padding: 8px; border: 0; border-radius: var(--r-sm); background: transparent; font-weight: 700; font-size: 14px; color: var(--text-dim); cursor: pointer; }
.hp-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
@media (max-width: 859px) {
  .js .hp-tabs { display: flex; }
  .js .hp-city:not(.is-active) { display: none; }
}
.hp-cash__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hp-cash__table th { padding: 0 0 8px 8px; text-align: right; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.hp-cash__table th:first-child { text-align: left; padding-left: 0; }
.hp-cash__table td { padding: 11px 0 11px 8px; text-align: right; border-bottom: 1px solid var(--border); vertical-align: top; }
.hp-cash__table td:first-child { text-align: left; padding-left: 0; }
.hp-cash__table tr:last-child td { border-bottom: 0; }
.hp-cash__cname { margin-left: 10px; color: var(--text-dim); }
@media (max-width: 480px) { .hp-cash__cname { display: none; } }
.hp-cash__rate { font-family: var(--font-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.hp-cash__who { display: block; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; margin-left: auto; }
.hp-cash__who:hover { color: var(--accent); }
.hp-cash__cbr { font-family: var(--font-display); font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.hp-others { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; }
.hp-others span { color: var(--text-faint); }
.hp-others a { font-weight: 600; color: var(--text-dim); }
.hp-others a:hover { color: var(--accent); }
.hp-others .hp-others__all { display: inline-flex; align-items: center; color: var(--accent); }
.hp-compare-wrap { display: grid; gap: var(--sp-4); }
@media (min-width: 860px) { .hp-compare-wrap { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.hp-compare { display: grid; gap: 8px; padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.hp-compare__title { font-weight: 700; }
.hp-compare a { display: flex; justify-content: space-between; gap: 8px; }
.hp-compare a:hover span:first-child { color: var(--accent); }
.hp-compare__note { font-size: 12px; color: var(--text-faint); }
.hp-empty { display: flex; gap: 12px; padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--border-strong); }
.hp-empty > .i { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.hp-empty__title { font-weight: 700; }
.hp-empty p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-dim); }
.hp-minis { display: grid; gap: var(--sp-3); }
@media (min-width: 640px) { .hp-minis { grid-template-columns: 1fr 1fr; } }
.hp-mini { display: grid; gap: 8px; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.hp-mini:hover { border-color: var(--border-strong); }
.hp-mini__head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-faint); }
.hp-mini__head b { font-size: 14px; color: var(--text); }
.hp-mini__grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 12px; align-items: center; font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* калькуляторы и графики — по два в ряд */
.hp-duo { display: grid; gap: var(--sp-4); }
@media (min-width: 960px) { .hp-duo { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .hp-duo--calc { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.hp-duo--calc { padding-bottom: var(--sp-4); }
.hp-calcs { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.hp-calc { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); transition: border-color .15s var(--ease); }
.hp-calc:hover { border-color: var(--accent); }
.hp-calc__icon { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.hp-calc__icon .i { width: 18px; height: 18px; }
.hp-calc__title { font-weight: 700; font-size: 14.5px; }
.hp-calc__text { font-size: 12.5px; color: var(--text-faint); }
.hp-chart-sum { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-3); font-size: 13px; line-height: 1.45; }
.hp-chart-sum__big { font-size: 30px; font-weight: 800; }
.hp-plate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: var(--sp-3); padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.hp-plate > .i { color: var(--accent); }
.hp-plate .hp-pill, .hp-plate .hp-more, .hp-plate .delta { margin-left: auto; }
#hp-cbr-charts .hp-more { margin-top: var(--sp-2); }
/* плашка раздела над рекламой (Б156.6) */
.hp-mid { display: grid; gap: var(--sp-4); }
.hp-promo { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-4); transition: border-color .15s var(--ease); }
.hp-promo:hover { border-color: var(--accent); }
.hp-promo__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); align-self: start; }
.hp-promo__icon .i { width: 20px; height: 20px; }
.hp-promo__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hp-promo__title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.hp-promo__text { font-size: 13.5px; color: var(--text-dim); line-height: 1.45; }
.hp-promo .hp-more { grid-column: 2; white-space: nowrap; }
.ext-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-4); padding: var(--sp-4); border: 1px dashed var(--accent); border-radius: 14px; background: var(--accent-soft); color: inherit; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.ext-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ext-card__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--accent-ink, #fff); align-self: start; }
.ext-card__icon .i { width: 20px; height: 20px; }
.ext-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ext-card__title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.ext-card__text { font-size: 13.5px; color: var(--text-dim); line-height: 1.45; }
.ext-card__go { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--accent); white-space: nowrap; }
.ext-card__go .i { width: 16px; height: 16px; }
@media (min-width: 720px) { .ext-card { grid-template-columns: auto 1fr auto; } .ext-card__icon { align-self: center; } .ext-card__go { grid-column: auto; } }
@media (min-width: 720px) { .hp-promo { grid-template-columns: auto 1fr auto; } .hp-promo__icon { align-self: center; } .hp-promo .hp-more { grid-column: auto; } }
.calc__result-cbr { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.calc__result-cbr b { color: var(--text); }

/* ---------- раздел «Цифровой рубль» /cifrovoy-rubl/ (Б156) ---------- */
.dr-prose > :first-child { margin-top: 0; }
.dr-prose h3 { font-size: 16px; color: var(--text); margin: var(--sp-5) 0 var(--sp-2); font-weight: 800; }
.dr-prose ol { padding-left: 1.2em; margin: 0 0 var(--sp-3); }
.dr-prose li { margin-bottom: 4px; }
.dr-prose strong { color: var(--text); }
.dr-prose .table-wrap { margin: var(--sp-3) 0; box-shadow: none; }
.dr-prose .notice-info a, .dr-result a { color: var(--accent); }
.dr-checked { font-size: 13px; line-height: 1.5; margin: 0; }
.dr-checked a { color: var(--accent); }
/* плитки главных чисел под ответом */
.dr-facts { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .dr-facts { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }
.dr-fact { padding: var(--sp-4); display: flex; flex-direction: column; gap: 6px; }
.dr-fact__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(19px, 3.4vw, 24px); color: var(--text); line-height: 1.15; }
.dr-fact__label { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }
/* пронумерованные шаги инструкции */
.dr-steps { list-style: none; counter-reset: dr-step; padding: 0 !important; margin: 0 0 var(--sp-3); display: grid; gap: 10px; }
.dr-steps li { counter-increment: dr-step; display: grid; grid-template-columns: 30px 1fr; gap: var(--sp-3); align-items: start; margin: 0; }
.dr-steps li::before { content: counter(dr-step); width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.dr-steps li > span { padding-top: 3px; }
/* формы расчётов для бизнеса: длинные подписи в select не должны распирать сетку формы на телефоне */
.dr-form > * { min-width: 0; }
.dr-form select, .dr-form input[type=text] { min-width: 0; width: 100%; }
/* этапы внедрения */
.dr-stages { display: grid; gap: var(--sp-3); }
@media (min-width: 860px) { .dr-stages { grid-template-columns: repeat(3, 1fr); } }
.dr-stage { padding: var(--sp-4); display: flex; flex-direction: column; gap: 10px; }
.dr-stage--now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.dr-stage__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.dr-stage__date { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--text); }
.dr-stage dl { margin: 0; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
.dr-stage dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.dr-stage dd { margin: 2px 0 0; }
/* таблицы с текстом в ячейках: сравнение форм рубля, тарифы, «кто обязан» */
table.dr-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
table.dr-table th, table.dr-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.dr-table thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); font-weight: 700; white-space: nowrap; }
table.dr-table tbody tr:last-child th, table.dr-table tbody tr:last-child td { border-bottom: none; }
table.dr-table tbody th { font-weight: 700; color: var(--text); }
table.dr-table td { color: var(--text-dim); }
table.dr-table td.is-dr { background: var(--accent-soft); color: var(--text); }
table.dr-table a { color: var(--accent); }
table.dr-table tr[hidden] { display: none; }
table.dr-compare { min-width: 640px; }
table.dr-compare tbody th { width: 24%; }
/* плюсы и минусы */
.dr-pm { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .dr-pm { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
.dr-pm ul { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 10px; align-content: start; }
.dr-pm li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 14.5px; line-height: 1.5; margin: 0; }
.dr-pm .i { width: 18px; height: 18px; margin-top: 2px; }
.dr-pm__plus .i { color: var(--good); }
.dr-pm__minus .i { color: var(--bad); }
/* мифы и факты */
.dr-myths { display: grid; gap: var(--sp-3); }
@media (min-width: 720px) { .dr-myths { grid-template-columns: 1fr 1fr; } }
.dr-myth { padding: var(--sp-4); display: flex; flex-direction: column; gap: 8px; }
.dr-myth__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.dr-myth__claim { font-weight: 700; color: var(--text); font-size: 15px; line-height: 1.4; }
.dr-myth p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.dr-verdict { flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.dr-verdict--no { background: var(--bad-soft); color: var(--bad); }
.dr-verdict--part { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); }
.dr-verdict--yes { background: var(--good-soft); color: var(--good); }
/* боковой список страниц раздела */
.dr-nav { display: flex; flex-direction: column; gap: 2px; margin-inline: -6px; }
.dr-nav a, .dr-nav span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: var(--text-dim); line-height: 1.3; }
.dr-nav a:hover { background: var(--surface-2); color: var(--text); }
.dr-nav [aria-current] { background: var(--accent-soft); color: var(--accent); }
.dr-nav .i { width: 16px; height: 16px; flex: none; }
/* документы */
.dr-docs { display: grid; gap: var(--sp-4); }
.dr-doc { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.dr-doc:last-child { border-bottom: none; padding-bottom: 0; }
.dr-doc h3 { margin: 0 0 6px; font-size: 15.5px; }
.dr-doc p { margin: 0 0 6px; }
/* логотип: официальные файлы Банка России, всегда на светлой подложке — так требует логобук */
.dr-logos { display: grid; gap: var(--sp-3); grid-template-columns: repeat(3, 1fr); margin: 0 0 var(--sp-4); }
.dr-logo { margin: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.dr-logo img { display: block; width: 100%; height: auto; }
.dr-logo figcaption { padding: 8px 10px; font-size: 12.5px; text-align: center; color: #5b5d75; border-top: 1px solid #ecebf5; background: #fff; }
.dr-swatch { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 560px) { .dr-swatch { grid-template-columns: 180px 1fr; } }
.dr-swatch__color { display: block; min-height: 120px; border-radius: var(--r-lg); background: #e63946; }

/* ---------- «О проекте»: форма обратной связи, уведомление о cookie (Б118) ---------- */
.feedback-form { position: relative; display: grid; gap: var(--sp-4); }
.feedback-form .raschet-form__row { align-items: start; gap: var(--sp-4); }
.feedback-form .raschet-form__row > .raschet-form__field { flex-basis: 240px; }
.feedback-form textarea { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); padding: 10px 12px; font: inherit; font-size: 15px; font-weight: 400; line-height: 1.5; resize: vertical; min-height: 140px; width: 100%; }
.feedback-form textarea:focus { outline: none; border-color: var(--accent); }
.feedback-form [aria-invalid="true"] { border-color: var(--bad); }
.feedback-form__error { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.feedback-form__agree { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-dim); cursor: pointer; }
.feedback-form__agree input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.feedback-form__agree a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.feedback-form__trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.about-facts { display: grid; gap: 0; margin: 0; }
.about-facts > div { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.about-facts > div:last-child { border-bottom: none; padding-bottom: 0; }
.about-facts dt { color: var(--text-faint); }
.about-facts dd { margin: 0; font-weight: 700; text-align: right; }
.prose code { font-size: .92em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
/* выше нижней рекламной полосы (.floor-ad, z-index 60); [hidden] нужен явно — display:flex его перебивает */
.cookie-note { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70; display: flex; align-items: center; gap: var(--sp-3); max-width: 560px; margin-inline: auto; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.cookie-note[hidden] { display: none; }
.cookie-note p { flex: 1 1 auto; margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.cookie-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cookie-note .btn { flex: none; }
@media print { .cookie-note { display: none; } }

/* ---------- калькуляторы: ★ «В избранное», «Мои калькуляторы», копирование (Б162) ---------- */
.page-head__row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.page-head__row h1 { min-width: 0; }
.fav-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 13px; font-weight: 700; cursor: pointer; transition: color .15s, border-color .15s; }
.fav-btn .i { width: 16px; height: 16px; }
.fav-btn:hover { color: var(--text); border-color: var(--border-strong); }
.fav-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.fav-btn[aria-pressed="true"] .i { fill: currentColor; }
@media (max-width: 420px) {
  .fav-btn { padding: 8px; }
  .fav-btn__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
.fav-hint { margin: var(--sp-2) 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: 13px; line-height: 1.45; }
.fav-hint[hidden] { display: none; }
.my-calcs { margin-bottom: var(--sp-8); }
.my-calcs[hidden] { display: none; }
.my-calcs h2 { display: flex; align-items: center; gap: 8px; }
.my-calcs h2 .i { color: var(--accent); fill: currentColor; }
.nav-panel__mine { margin-bottom: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.nav-panel--wide .nav-panel__mine ul { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.nav-panel__mine[hidden], .burger__mine[hidden] { display: none; }
.burger__mine { padding-bottom: var(--sp-2); margin-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.copy-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-faint); font-size: 14px; font-weight: 700; cursor: pointer; transition: color .15s, border-color .15s; }
.copy-btn .i { width: 16px; height: 16px; }
.copy-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.copy-btn:disabled { opacity: .4; cursor: default; }
.copy-btn.is-done { color: var(--good); border-color: var(--good); }

/* ---------- калькулятор НДС /raschet/nds/ (Б160) ---------- */
.nds-section { padding-top: 0; }
.nds { display: grid; gap: var(--sp-4); padding: var(--sp-4); }
@media (min-width: 860px) { .nds { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-6); } }
.nds [hidden] { display: none !important; }
.nds__inputs, .nds__result { display: grid; gap: var(--sp-3); align-content: start; min-width: 0; }
.nds__amount { display: grid; gap: 4px; }
.nds__label { font-size: 12.5px; font-weight: 600; color: var(--text-faint); }
.nds__amount input { width: 100%; min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); padding: 10px 14px; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.25; }
/* подсказка в поле — заметно бледнее и тоньше введённого числа, чтобы не казалось, что сумма уже есть */
.nds input::placeholder { color: var(--text-faint); opacity: .5; font-weight: 500; }
.nds__amount input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nds__amount input[aria-invalid] { border-color: var(--bad); }
.nds__error { margin: -4px 0 0; font-size: 13px; color: var(--bad); line-height: 1.4; }
.nds__hint { margin: -4px 0 0; font-size: 12.5px; color: var(--text-faint); }
.nds.is-live [data-nojs] { display: none; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.segmented label { position: relative; }
.segmented input, .rate-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 8px 6px; border-radius: 9px; text-align: center; font-size: 14px; font-weight: 700; color: var(--text-dim); cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); outline: 1px solid var(--border); }
.segmented input:focus-visible + span, .rate-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.rate-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rate-chip { position: relative; }
.rate-chip span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 700; color: var(--text-dim); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.rate-chip span:hover { color: var(--text); border-color: var(--border-strong); }
.rate-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rate-chip__custom { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--text-dim); }
.rate-chip__custom input { width: 76px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); color: var(--text); padding: 6px 12px; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.rate-chip__custom input:focus { outline: none; border-color: var(--accent); }
.nds-res { margin: 0; display: grid; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.nds-res__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px var(--sp-2); padding: 6px 8px 6px 12px; border-top: 1px solid var(--border); }
.nds-res__row:first-child { border-top: none; }
.nds-res dt { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.nds-res dd { margin: 0 0 0 auto; display: flex; align-items: center; gap: 6px; }
.nds-res__val { font-family: var(--font-display); font-weight: 800; font-size: 19px; white-space: nowrap; }
.nds-res__cur { font-size: 12px; font-weight: 700; color: var(--text-faint); margin-right: 2px; }
.nds-res__row--vat { background: var(--accent-soft); }
.nds-res__row--vat dt, .nds-res__row--vat .nds-res__val { color: var(--accent); }
.nds[data-mode="out"] .nds-res__row--gross dt::after, .nds[data-mode="in"] .nds-res__row--net dt::after { content: " — введено"; font-weight: 500; color: var(--text-faint); }
.nds-formula { margin: 0; display: flex; align-items: baseline; gap: 6px; font-size: 13.5px; color: var(--text-dim); overflow-wrap: anywhere; }
.nds-formula .i { flex: none; color: var(--text-faint); position: relative; top: 2px; }
.nds-words { display: grid; gap: var(--sp-2); justify-items: start; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.nds-words p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.nds__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.nds__actions-gap { flex: 1 1 0; }
.nds-history { margin-top: var(--sp-4); }
.nds-history .section-head { align-items: center; }
.nds-history h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.nds-history__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nds-history__item { width: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 10px; border: none; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.nds-history__item:hover { background: var(--surface-2); }
.nds-history__sum { font-family: var(--font-display); font-weight: 800; }
.nds-history__what { color: var(--text-dim); }
.nds-history__vat { margin-left: auto; color: var(--accent); font-weight: 700; white-space: nowrap; }
.nds-answer { margin: var(--sp-5) 0 0; }
/* ставки НДС: длинный текст переносится (table.rates — nowrap и вправо), столбец «К чему применяется» ~половина
   таблицы; на узком экране таблица листается вбок внутри .table-wrap, столбец ставки прилипает слева */
table.rates.nds-rates { table-layout: auto; min-width: 0; }
table.rates.nds-rates th, table.rates.nds-rates td { text-align: left; white-space: normal; vertical-align: top; }
table.rates.nds-rates th:first-child, table.rates.nds-rates td.row-name { width: 1%; white-space: nowrap; position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--border); }
table.rates.nds-rates thead th { white-space: nowrap; }
table.rates.nds-rates thead th:first-child { z-index: 3; }
table.rates.nds-rates tbody tr:hover td.row-name { background: var(--surface-2); }
table.rates.nds-rates th:nth-child(2) { width: 55%; }
table.rates.nds-rates td:last-child { font-size: 13px; }
/* порог освобождения на УСН: три коротких столбца — без min-width 640px влезают в карточку без прокрутки */
.nds-usn { margin-bottom: var(--sp-4); }
.nds-usn table.rates { table-layout: auto; min-width: 0; }
@media (max-width: 759px) {
  .nds-usn table.rates th, .nds-usn table.rates td { padding: 10px 7px; }
  .nds-usn table.rates td:last-child { white-space: normal; }
  table.rates.nds-rates { min-width: 540px; }
  table.rates.nds-rates th, table.rates.nds-rates td { padding: 10px 10px; font-size: 13.5px; }
  table.rates.nds-rates td:last-child { font-size: 12.5px; }
  table.rates.nds-rates th:first-child, table.rates.nds-rates td.row-name { width: 1%; }
}
@media (max-width: 420px) {
  .nds-section { margin-top: -12px; }
  .rate-chips { gap: 4px; }
  .nds { padding: var(--sp-3); }
  .rate-chip span { padding: 6px 7px; font-size: 13.5px; }
  .rate-chip__custom input { width: 64px; padding: 5px 10px; }
  .segmented span { padding: 7px 4px; }
  .nds[data-mode] .nds-res__row dt::after { content: none; }
}

/* ---------- калькулятор процентов /raschet/procenty/ (Б161) ---------- */
.pct-section { padding-top: 0; }
.pct-topics, .pct-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--sp-3); }
.pct-presets { margin: var(--sp-3) 0 0; }
.pct-topics__q { font-size: 13px; font-weight: 700; color: var(--text-faint); margin-right: 2px; }
.pct-topic { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; font-weight: 700; color: var(--text-dim); text-decoration: none; transition: color .15s, border-color .15s; }
.pct-topic:hover { color: var(--accent); border-color: var(--accent); }
.pct-topic.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pct { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; overflow: hidden; }
.pct [hidden] { display: none !important; }
.pct.is-live [data-nojs] { display: none; }
.pct-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-4); border-top: 1px solid var(--border); scroll-margin-top: 80px; transition: background .4s var(--ease); }
.pct-row:first-child { border-top: none; }
.pct-row.is-active { background: var(--accent-soft); }
.pct-row__title { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-faint); }
.pct-row__main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.pct-row__q { margin: 0; flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.3; }
.pct-in { width: 8.5em; min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); color: var(--text); padding: 7px 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 1.25; }
.pct-in--x { width: 5.5em; }
/* «X — это сколько / процентов от Y»: две строки, поля шире — в них числа, а не проценты */
/* без wrap: у колонки с переносом Chrome считает ширину блока как у строк в ряд — результат уезжает вправо */
.pct-row__q--split { flex-direction: column; flex-wrap: nowrap; align-items: stretch; min-width: 0; }
.pct-row__line { display: flex; align-items: center; gap: 6px 8px; min-width: 0; }
.pct-row__line .pct-row__t { flex: none; white-space: nowrap; }
.pct-row__q--split .pct-in { width: 10em; }
.pct-in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pct-in[aria-invalid] { border-color: var(--bad); }
.pct-row__res { flex: 0 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.pct-row__post { font-size: 17px; font-weight: 600; color: var(--text); margin-left: -8px; }
.pct-row__eq { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--text-faint); }
.pct-row__val { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--accent); overflow-wrap: anywhere; min-width: 0; }
.pct-row__change { margin: 0; font-size: 14px; color: var(--text-dim); }
.pct-row__formula { font-size: 13px; }
.pct-keys { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; color: var(--text-dim); }
.pct-keys__title { font-weight: 700; color: var(--text-faint); }
.pct-keys__line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0; }
/* у Manrope тонкие ×, ÷, −, → — у клавиш системный шрифт с чёткими знаками */
.pct-keys__seq { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pct-keys kbd { display: inline-block; min-width: 26px; padding: 2px 7px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--text); font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; text-align: center; }
.pct-keys__arrow { color: var(--text-faint); font-size: 15px; }
.pct-keys__seq strong { color: var(--text); }
.pct-keys__note { flex-basis: 100%; margin: 0; font-size: 12.5px; color: var(--text-faint); }
.pct__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); background: var(--surface-2); }
.pct-answer { margin: var(--sp-5) 0 0; }
@media (max-width: 600px) {
  .pct-row { padding: var(--sp-3); }
  /* фраза до «=» — одной строкой: поля не переносятся, текст между ними сам встаёт в две строки */
  .pct-row__q { font-size: 15px; flex-basis: 100%; flex-wrap: nowrap; gap: 6px; line-height: 1.2; }
  .pct-row__t { flex: 0 1 auto; }
  .pct-in { flex: 0 1 5em; width: 5em; min-width: 3.4em; font-size: 17px; padding: 6px 8px; }
  .pct-in--x { flex-basis: 3.6em; width: 3.6em; min-width: 2.8em; }
  .pct-row__line { gap: 6px; }
  .pct-row__q--split .pct-in { flex: 0 1 9em; width: 9em; }
  .pct-row__res { margin-left: 0; }
  .pct-row__post { font-size: 16px; margin-left: 0; }
  .pct-row__dot { display: none; }
  .pct-row__val { font-size: 22px; }
}

/* ---------- сумма прописью /raschet/summa-propisyu/ (Б164); каркас — классы калькулятора НДС ---------- */
.words-out { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); min-height: 88px; }
.words-out p { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.words-out.is-empty p { font-size: 15px; font-weight: 500; color: var(--text-faint); }
.words-opts { display: grid; gap: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--border); }
.words-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-3); }
.words-opt__label { flex: none; width: 96px; font-size: 12.5px; font-weight: 600; color: var(--text-faint); }
.words-opt .segmented, .words-opt .rate-chips { flex: 1 1 210px; min-width: 0; }
.segmented--sm span { padding: 6px 4px; font-size: 13px; }
.segmented--3 { grid-template-columns: 1fr 1fr 1fr; }
.words-calc .rate-chip span { padding: 6px 10px; font-size: 13.5px; }
.code-box { display: grid; gap: var(--sp-2); justify-items: start; margin: var(--sp-3) 0; }
.code-box__pre { width: 100%; margin: 0; max-height: 340px; overflow: auto; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; line-height: 1.45; }
.prose .code-box__pre code { padding: 0; border: none; background: none; font-size: inherit; white-space: pre; }
.prose kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); font-family: inherit; font-size: .9em; font-weight: 600; }
@media (max-width: 479px) {
  .words-calc .words-sign { display: none; }
  .words-calc .rate-chips { gap: 5px; }
  .words-calc .rate-chip span { padding: 6px 9px; }
  .words-calc .segmented span { font-size: 13px; padding: 8px 2px; }
  .words-opt__label { width: auto; flex-basis: 100%; }
}
.words-sign { font-weight: inherit; }
.words-calc .segmented:not(.segmented--sm) { grid-template-columns: 2fr 3fr; }

/* ---------- калькулятор вкладов и сложного процента /raschet/vklad/, /raschet/slozhnyy-procent/ (Б135) ---------- */
.dep-section { padding-top: 0; }
.dep-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.dep-form [hidden] { display: none !important; }
.dep-form.is-live [data-nojs] { display: none; }
.dep-field--sum { flex: 1 1 170px; }
.dep-field--rate { flex: 0 1 140px; }
.dep-field--term { flex: 1 1 200px; }
.dep-field--date { flex: 0 1 190px; }
.dep-field--cap { flex: 1 1 220px; }
/* варианты НДФЛ длинные — шире остальных, чтобы выбранный читался целиком */
.dep-field--tax { flex: 1 1 460px; }
.dep-term { display: flex; gap: 6px; }
.dep-term input { flex: 0 1 90px; min-width: 0; }
.dep-term select { flex: 1 1 auto; min-width: 0; }
.raschet-form__field .dep-term input, .raschet-form__field .dep-term select { width: auto; }
.dep-hint { margin: calc(-1 * var(--sp-2)) 0 0; font-size: 12.5px; }
.dep-check { margin-top: calc(-1 * var(--sp-1)); }
.dep-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.dep-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); margin-top: var(--sp-4); min-width: 0; scroll-margin-top: 80px; transition: opacity .2s; }
.dep-result[aria-busy] { opacity: .55; }
.dep-notice { margin: 0; }
.dep-head__main { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--text); }
.dep-head__main strong { font-weight: 800; white-space: nowrap; }
.dep-head__income { color: var(--accent); }
.dep-head__sub { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }
.dep-kpis { margin: 0; }
.dep-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--text-dim); }
.dep-facts li { padding-left: 14px; border-left: 3px solid var(--border-strong); }
.dep-facts strong { color: var(--text); }
.dep-facts .muted { font-size: 13px; }
.dep-fact--good { border-left-color: var(--good) !important; }
.dep-fact--bad { border-left-color: var(--bad) !important; }
.dep-tax__head h3, .dep-chart__head h3 { margin: 0; font-size: 16px; }
.dep-tax__head { padding-bottom: var(--sp-3); }
.dep-tax__head p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
.dep-tax__notes { padding-top: var(--sp-2); font-size: 12.5px; line-height: 1.5; }
.dep-tax__notes p { margin: 0 0 4px; }
.dep-tax__table, .dep-table { table-layout: auto; min-width: 0; }
.dep-sub { font-size: 12px; font-weight: 500; }
.dep-months summary { cursor: pointer; list-style: none; font-size: 14px; }
.dep-months summary::-webkit-details-marker { display: none; }
.dep-months summary::before { content: '▸ '; color: var(--text-faint); }
.dep-months[open] summary::before { content: '▾ '; }
.dep-months .table-wrap { max-height: 520px; overflow-y: auto; }
.dep-actions { margin: 0; }
.dep-answer { margin: var(--sp-5) 0 0; }

/* график: столбики по годам «вложено своих» + «начислено процентов» (палитра проверена валидатором dataviz в обеих темах) */
.dep-chart { --dep-own: #D97706; --dep-int: #4F46E5; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
:root[data-theme="dark"] .dep-chart { --dep-int: #7C80F2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dep-chart { --dep-int: #7C80F2; } }
.dep-chart__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px var(--sp-4); }
.dep-chart__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-dim); }
.dep-chart__legend span { display: inline-flex; align-items: center; gap: 6px; }
.dep-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dep-key--own { background: var(--dep-own); }
.dep-key--int { background: var(--dep-int); }
.dep-chart__body { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 220px auto; column-gap: 8px; padding-top: 20px; }
.dep-chart__y { position: relative; font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; min-width: 44px; }
.dep-chart__y span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.dep-chart__plot { position: relative; border-bottom: 1px solid var(--border-strong); }
.dep-chart__grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--border); }
.dep-chart__bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; align-items: end; }
.dep-bar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.dep-bar__stack { width: min(24px, 80%); display: flex; flex-direction: column; border-radius: 4px 4px 0 0; overflow: hidden; }
.dep-bar__int { background: var(--dep-int); flex-basis: 0; min-height: 1px; border-bottom: 2px solid var(--surface); box-sizing: content-box; }
.dep-bar__own { background: var(--dep-own); flex-basis: 0; min-height: 1px; }
.dep-bar:hover .dep-bar__stack, .dep-bar:focus .dep-bar__stack { filter: brightness(1.08); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--text-faint); }
.dep-bar__tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 3; display: none; gap: 2px; min-width: 170px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); font-size: 12.5px; line-height: 1.4; color: var(--text); white-space: nowrap; pointer-events: none; }
.dep-bar__tip span { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
.dep-bar:hover .dep-bar__tip, .dep-bar:focus .dep-bar__tip { display: grid; top: 4px; bottom: auto; }
.dep-bar:nth-child(-n+3) .dep-bar__tip { left: 0; transform: none; }
.dep-bar:nth-last-child(-n+3) .dep-bar__tip { left: auto; right: 0; transform: none; }
.dep-bar__cap { position: absolute; right: 0; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.dep-chart__x { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; padding-top: 4px; font-size: 11px; color: var(--text-faint); text-align: center; font-variant-numeric: tabular-nums; }
.dep-chart__cap { margin: 0; font-size: 12px; }
@media (max-width: 600px) {
  .dep-head__main { font-size: 18px; }
  .dep-head__main strong { white-space: normal; }
  .dep-chart__body { grid-template-rows: 180px auto; }
  .dep-field--rate { flex-basis: 120px; }
}
/* раздел «Бухгалтеру» (Б174): ссылка на него с хаба /raschet/ */
.buh-promo { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); text-decoration: none; color: var(--text); font-size: 14px; transition: border-color .15s; }
.buh-promo:hover { border-color: var(--accent); }
.buh-promo > .i:last-child { flex: none; color: var(--accent); margin-left: auto; }
.buh-promo .raschet-card__icon { flex: none; }
.buh-meta { margin: 0 auto var(--sp-3); font-size: 13px; color: var(--text-faint); }
.buh-month { table-layout: auto; }
.buh-month th:first-child, .buh-month td:first-child { text-align: left; }
.buh-month td:first-child a { color: var(--text); text-decoration: none; }
.buh-month__code { display: none; font-weight: 700; }
@media (max-width: 560px) { .buh-month__name { display: none; } .buh-month__code { display: inline; } }
.buh-idea { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-5); }
.buh-idea > div { flex: 1 1 260px; min-width: 0; }
.buh-idea h2 { font-size: 17px; margin: 0 0 4px; }
.buh-idea p { margin: 0; font-size: 13.5px; }
.buh-idea .raschet-card__icon { flex: none; }
/* «Скачать ряд» (Б147): строка под таблицей или графиком; курс в Excel формулой (Б177) */
.data-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px var(--sp-3); font-size: 13px; color: var(--text-faint); }
.data-file__what { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.data-file__links { display: inline-flex; gap: 8px; flex: none; }
/* Производственный календарь (Б178): сетка месяцев, подписи, итоги */
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px var(--sp-4); margin: 0 0 var(--sp-3); font-size: 13px; color: var(--text-dim); }
.cal-legend i { display: inline-block; width: 14px; height: 14px; margin-right: 6px; border-radius: 5px; vertical-align: -2px; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: var(--sp-3); }
.cal-month { padding: var(--sp-3) var(--sp-4) var(--sp-3); }
.cal-month--now { border-color: var(--accent); }
.cal-month h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 var(--sp-2); font-size: 15px; }
.cal-month h3 span { font-size: 12px; font-weight: 600; color: var(--text-faint); white-space: nowrap; }
table.cal { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; text-align: center; }
table.cal th { padding: 2px 0 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
table.cal th:nth-child(n+6), table.cal td.cal-we { color: var(--bad); }
table.cal td { padding: 0; }
table.cal td span { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 1px auto; border-radius: 8px; }
table.cal td.cal-hol span { background: var(--bad-soft); color: var(--bad); font-weight: 700; }
table.cal td.cal-reg span { background: color-mix(in srgb, var(--chart-2) 20%, transparent); color: var(--chart-2); font-weight: 700; }
table.cal td.cal-short span { box-shadow: inset 0 0 0 1.5px var(--chart-2); }
table.cal td.cal-wsat span { background: var(--good-soft); color: var(--good); font-weight: 700; }
.cal-swatch--hol { background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad); }
.cal-swatch--reg { background: color-mix(in srgb, var(--chart-2) 20%, transparent); box-shadow: inset 0 0 0 1px var(--chart-2); }
.cal-swatch--short { box-shadow: inset 0 0 0 1.5px var(--chart-2); }
.cal-swatch--wsat { background: var(--good-soft); box-shadow: inset 0 0 0 1px var(--good); }
.cal-swatch--we { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
table.rates tr.cal-total td { font-weight: 700; border-top: 1px solid var(--border-strong); }
table.rates tr.cal-now td { background: var(--accent-soft); }
/* ссылки в карточках и подписях календаря: глобально a без цвета и подчёркивания */
.dt-year__facts a, .kpi__who a, .dt-note a, .cal-list a, .cal-calc .muted a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.dt-year__top h2 a:hover { color: var(--accent); }
.cal-list { margin: 0; padding-left: var(--sp-5); line-height: 1.7; }
.cal-calc { display: grid; gap: var(--sp-4); }
.cal-answer { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.2; }
.cal-answer small { display: block; margin-top: 4px; font-family: var(--font-text); font-size: 14px; font-weight: 500; color: var(--text-dim); }
.xl-formula { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font: 13px/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- палитра иконок ----------
   icon() вешает на каждую <svg> класс i--<имя>. Здесь имя превращается в цвет --ic.
   Сам цвет никто не применяет автоматически: его берут только блоки ниже, где иконка
   смысловая, — плитки, плашки, пункты меню, иконки в кнопках-призраках. Служебная
   навигация (шевроны, меню, поиск, тема) остаётся в цвете текста.
   Контейнеру с классом .ic цвет достаётся от вложенной иконки — чтобы подложка плитки
   и рамка по наведению были того же оттенка. Без поддержки :has() всё падает на
   фирменный фиолетовый, как было. */
:root {
  --ic: var(--accent);
  --ic-tint: 17%;
  --ic-blue: #1D6FD6;
  --ic-teal: #0E8A86;
  --ic-green: #11875A;
  --ic-amber: #BE6C09;
  --ic-rose: #D23B5C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ic-tint: 20%;
    --ic-blue: #60A5FA;
    --ic-teal: #2DD4BF;
    --ic-green: #4ADE80;
    --ic-amber: #FBBF24;
    --ic-rose: #FB7185;
  }
}
:root[data-theme="dark"] {
  --ic-tint: 20%;
  --ic-blue: #60A5FA;
  --ic-teal: #2DD4BF;
  --ic-green: #4ADE80;
  --ic-amber: #FBBF24;
  --ic-rose: #FB7185;
}

/* учреждения, право, документы */
.i--landmark, .i--building-2, .i--scale, .i--file-text, .i--book-open, .i--info, .i--briefcase, .i--list, .i--globe, .i--network { --ic: var(--ic-blue); }
.ic:has(:is(.i--landmark, .i--building-2, .i--scale, .i--file-text, .i--book-open, .i--info, .i--briefcase, .i--list, .i--globe, .i--network)) { --ic: var(--ic-blue); }

/* города, точки на карте, связь */
.i--map-pin, .i--map, .i--navigation, .i--store, .i--train-front, .i--phone, .i--smartphone, .i--monitor, .i--house { --ic: var(--ic-teal); }
.ic:has(:is(.i--map-pin, .i--map, .i--navigation, .i--store, .i--train-front, .i--phone, .i--smartphone, .i--monitor, .i--house)) { --ic: var(--ic-teal); }

/* деньги и рост */
.i--trending-up, .i--arrow-up-right, .i--coins, .i--banknote, .i--wallet, .i--badge-check, .i--check { --ic: var(--ic-green); }
.ic:has(:is(.i--trending-up, .i--arrow-up-right, .i--coins, .i--banknote, .i--wallet, .i--badge-check, .i--check)) { --ic: var(--ic-green); }

/* время, календарь, проценты */
.i--clock, .i--calendar, .i--history, .i--rotate-ccw, .i--percent, .i--star, .i--crown, .i--sparkles, .i--bitcoin { --ic: var(--ic-amber); }
.ic:has(:is(.i--clock, .i--calendar, .i--history, .i--rotate-ccw, .i--percent, .i--star, .i--crown, .i--sparkles, .i--bitcoin)) { --ic: var(--ic-amber); }

/* спад и предупреждения */
.i--trending-down, .i--circle-alert { --ic: var(--ic-rose); }
.ic:has(:is(.i--trending-down, .i--circle-alert)) { --ic: var(--ic-rose); }

/* служебная навигация — цвет текста, как был */
.i--chevron-down, .i--chevron-right, .i--chevron-left, .i--menu, .i--x, .i--ellipsis, .i--search, .i--sun, .i--moon, .i--arrow-up, .i--arrow-down { --ic: currentColor; }

/* где цвет применяется */
.hp-calc__icon, .hp-promo__icon, .raschet-card__icon { background: color-mix(in oklab, var(--ic) var(--ic-tint), var(--surface)); color: var(--ic); }
.hp-calc:hover, .hp-promo:hover, .raschet-card:hover, .buh-promo:hover { border-color: var(--ic); }
.my-calcs h2 .i { color: var(--ic); }
.hp-plate > .i, .hp-empty > .i, .g395-event .i, .dt-more > summary .i, .data-file__what .i { color: var(--ic); }
.nav-panel a .i, .burger__items a .i, .dr-nav a .i, .btn-ghost > .i { color: var(--ic); }
.burger__city .i, .city-picker__btn .i--map-pin { color: var(--ic); }
.nav-panel a:hover .i, .dr-nav a:hover .i { color: var(--ic); }
.btn-ghost:hover > .i { color: var(--ic); }
