/* =====================================================================
 * Zaymi Online · дизайн-система (ds.css)
 * Мир: финтех-премиум «лес и лайм» (DESIGN.md). Один шрифт Onest.
 * Префикс классов ds-. Светлая тема одна на весь сайт.
 * ===================================================================== */

/* ---------- Шрифт: локально, кириллица + латиница ---------- */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/onest-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

/* ---------- Токены ---------- */
:root {
  --ds-canvas: #F4F6F3;
  --ds-surface: #FFFFFF;
  --ds-ink: #0F2418;
  --ds-muted: #5A6B60;
  --ds-line: #DDE5DE;
  --ds-forest: #123524;
  --ds-forest-2: #1B4632;
  --ds-lime: #A6E36E;
  --ds-lime-hover: #97D85C;
  --ds-lime-wash: #EEF8E4;
  --ds-lime-ink: #2F5A12;       /* текст «лаймового» смысла на белом, AA */
  --ds-amber: #9A5B00;
  --ds-amber-wash: #FFF4DF;
  --ds-on-forest: #E9F1EB;
  --ds-on-forest-muted: #A9BDAF;

  --ds-font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ds-fs-h1: clamp(2.125rem, 1.4rem + 3vw, 3.75rem);
  --ds-fs-h2: clamp(1.625rem, 1.25rem + 1.6vw, 2.5rem);
  --ds-fs-h3: 1.25rem;
  --ds-fs-body: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --ds-fs-small: .875rem;
  --ds-fs-micro: .75rem;

  --ds-r-sm: 12px;
  --ds-r-md: 20px;
  --ds-r-lg: 28px;
  --ds-r-pill: 999px;

  --ds-shadow-1: 0 1px 2px rgba(15,36,24,.04), 0 8px 24px rgba(15,36,24,.05);
  --ds-shadow-2: 0 2px 4px rgba(15,36,24,.05), 0 16px 40px rgba(15,36,24,.09);

  --ds-gap: clamp(16px, 2vw, 24px);
  --ds-section: clamp(48px, 8vw, 96px);
  --ds-container: 1200px;
  --ds-gutter: clamp(16px, 4vw, 32px);

  --ds-ease-out: cubic-bezier(.23, 1, .32, 1);
  --ds-ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ds-t-press: 160ms;
  --ds-t-ui: 200ms;
}

/* ---------- База (только на ds-страницах — у body есть .ds) ---------- */
.ds, .ds *, .ds *::before, .ds *::after { box-sizing: border-box; }
body.ds {
  margin: 0;
  background: var(--ds-canvas);
  color: var(--ds-ink);
  font-family: var(--ds-font);
  font-size: var(--ds-fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0;
}
.ds ::selection { background: var(--ds-lime); color: var(--ds-forest); }
.ds :focus-visible { outline: 3px solid var(--ds-lime); outline-offset: 2px; border-radius: 6px; }
.ds img { max-width: 100%; height: auto; display: block; }
.ds a { color: inherit; text-decoration-color: rgba(15,36,24,.25); text-underline-offset: .2em; }
/* :where — сброс не перебивает отступы компонентов и прозы */
:where(.ds) :where(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(.ds) :where(ul, ol) { padding: 0; list-style: none; }
:where(.ds) button { font: inherit; color: inherit; }
.ds-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Раскладка ---------- */
.ds-container { width: 100%; max-width: calc(var(--ds-container) + 2 * var(--ds-gutter)); margin-inline: auto; padding-inline: var(--ds-gutter); }
.ds-section { padding-block: var(--ds-section); }
.ds-section--tight { padding-block: calc(var(--ds-section) * .6); }
.ds-stack > * + * { margin-top: 12px; }

/* ---------- Типографика ---------- */
.ds-h1 { font-size: var(--ds-fs-h1); font-weight: 600; letter-spacing: -.03em; line-height: 1.06; text-wrap: balance; }
.ds-h2 { font-size: var(--ds-fs-h2); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; text-wrap: balance; }
.ds-h3 { font-size: var(--ds-fs-h3); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.ds-lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--ds-muted); max-width: 46ch; line-height: 1.5; }
.ds-muted { color: var(--ds-muted); }
.ds-small { font-size: var(--ds-fs-small); }
.ds-micro { font-size: var(--ds-fs-micro); color: var(--ds-muted); }
.ds-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 32px); }
.ds-section-head .ds-lead { margin-top: 8px; }

/* ---------- Кнопки ---------- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--ds-r-pill);
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--ds-t-press) var(--ds-ease-out), background-color var(--ds-t-ui) ease, border-color var(--ds-t-ui) ease, box-shadow var(--ds-t-ui) ease;
}
.ds-btn:active { transform: scale(.97); }
.ds-btn svg { width: 18px; height: 18px; flex: none; }
.ds-btn--primary { background: var(--ds-lime); color: var(--ds-forest); }
.ds-btn--secondary { background: transparent; color: var(--ds-ink); border-color: var(--ds-line); }
.ds-btn--block { width: 100%; }
.ds-btn--lg { min-height: 56px; font-size: 1.0625rem; }
.ds-btn--sm { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
@media (hover: hover) and (pointer: fine) {
  .ds-btn--primary:hover { background: var(--ds-lime-hover); }
  .ds-btn--secondary:hover { border-color: #C2CFC5; background: var(--ds-surface); }
}
@media (max-width: 767px) { .ds-btn { min-height: 52px; } .ds-btn--sm { min-height: 44px; } }

/* ---------- Чипы ---------- */
.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--ds-gutter)); padding-inline: var(--ds-gutter); scroll-padding-inline: var(--ds-gutter); scroll-snap-type: x proximity; }
@media (min-width: 1024px) { .ds-chips--scroll { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; } }
.ds-chips--scroll::-webkit-scrollbar { display: none; }
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line); background: var(--ds-surface);
  font-size: .9375rem; font-weight: 500; color: var(--ds-ink); text-decoration: none; white-space: nowrap;
  cursor: pointer; scroll-snap-align: start;
  transition: transform var(--ds-t-press) var(--ds-ease-out), background-color var(--ds-t-ui) ease, border-color var(--ds-t-ui) ease;
}
.ds-chip:active { transform: scale(.97); }
.ds-chips:not(.ds-chips--scroll) .ds-chip { max-width: 100%; white-space: normal; line-height: 1.25; padding-block: 8px; text-align: center; }
.ds-chip.is-active, .ds-chip[aria-pressed="true"] { background: var(--ds-lime-wash); border-color: var(--ds-lime); color: var(--ds-forest); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .ds-chip:hover { border-color: #C2CFC5; } }
@media (max-width: 767px) { .ds-chip { min-height: 44px; } }

/* ---------- Карточка / поверхность ---------- */
.ds-card { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); box-shadow: var(--ds-shadow-1); }
.ds-pad { padding: clamp(18px, 2.4vw, 28px); }

/* ---------- Плашки ---------- */
.ds-note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--ds-r-md); background: var(--ds-amber-wash); color: var(--ds-amber); font-size: .9375rem; line-height: 1.5; border: 1px solid #F3DFB8; }
.ds-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.ds-note strong { color: #7A4700; }
.ds-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--ds-r-pill); font-size: .8125rem; font-weight: 600; background: var(--ds-lime-wash); color: var(--ds-lime-ink); white-space: nowrap; }
.ds-badge svg { width: 14px; height: 14px; }
.ds-badge--neutral { background: #EEF2EF; color: var(--ds-muted); }

/* ---------- Крошки ---------- */
.ds-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--ds-fs-small); color: var(--ds-muted); }
.ds-crumbs a { text-decoration: none; }
.ds-crumbs [aria-current] { color: var(--ds-ink); }

/* Общие блоки на непеределанных шаблонах тоже в Onest */
.ds-header, .ds-menu, .ds-footer { font-family: var(--ds-font); line-height: 1.5; }
.ds-header *, .ds-menu *, .ds-footer * { box-sizing: border-box; }
.ds-header ul, .ds-footer ul { margin: 0; padding: 0; list-style: none; }
.ds-footer h2, .ds-footer p { margin: 0; }

/* =====================================================================
 * Шапка
 * ===================================================================== */
.ds-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--ds-line); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); }
.ds-header__bar { display: flex; align-items: center; gap: 10px; height: 64px; }
.ds-header__logo { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; text-decoration: none; }
.ds-header__logo img { height: 22px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.ds-nav { display: none; gap: 4px; margin-inline: auto; }
.ds-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--ds-r-pill); font-size: .9375rem; font-weight: 500; text-decoration: none; color: var(--ds-ink); transition: background-color var(--ds-t-ui) ease; }
.ds-nav a.is-active { background: var(--ds-lime-wash); color: var(--ds-forest); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .ds-nav a:hover { background: #EEF2EF; } }
.ds-header__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.ds-header__tools .ds-btn--sm { padding: 0 14px; }
.ds-header__meta { display: none; font-size: .8125rem; color: var(--ds-muted); white-space: nowrap; }
.ds-burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line); background: var(--ds-surface); cursor: pointer; transition: transform var(--ds-t-press) var(--ds-ease-out); }
.ds-burger:active { transform: scale(.95); }
.ds-burger svg { width: 22px; height: 22px; }
@media (min-width: 1024px) {
  .ds-header__bar { height: 72px; gap: 24px; }
  .ds-header__logo img { height: 30px; }
  .ds-header__tools .ds-btn--sm { padding: 0 18px; }
  .ds-nav { display: flex; }
  .ds-header__tools { margin-left: 0; }
  .ds-header__meta { display: inline; }
  .ds-burger { display: none; }
}

/* Мобильное меню: выезжает сверху под шапкой */
.ds-menu { position: fixed; inset: 64px 0 0 0; z-index: 39; background: var(--ds-canvas); overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--ds-gutter) 32px; opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity var(--ds-t-ui) var(--ds-ease-out), transform var(--ds-t-ui) var(--ds-ease-out), visibility 0s linear var(--ds-t-ui); }
.ds-menu.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity var(--ds-t-ui) var(--ds-ease-out), transform var(--ds-t-ui) var(--ds-ease-out); }
.ds-menu__search { position: relative; margin-bottom: 16px; }
.ds-menu__search input { width: 100%; height: 48px; padding: 0 16px 0 44px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-pill); background: var(--ds-surface); font: inherit; font-size: 1rem; color: var(--ds-ink); }
.ds-menu__search input::placeholder { color: #6E7D73; }
.ds-menu__search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ds-muted); }
.ds-menu__links a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 4px; font-size: 1.125rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ds-line); }
.ds-menu__group { margin-top: 20px; }
.ds-menu__group summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: .9375rem; font-weight: 600; color: var(--ds-muted); }
.ds-menu__group summary::-webkit-details-marker { display: none; }
.ds-menu__group summary svg { width: 18px; height: 18px; transition: transform var(--ds-t-ui) var(--ds-ease-out); }
.ds-menu__group[open] summary svg { transform: rotate(180deg); }
.ds-menu__group .ds-chips { padding-top: 8px; }
.ds-menu .ds-btn { margin-top: 24px; }
@media (min-width: 1024px) { .ds-menu { display: none; } }
body.ds-menu-open { overflow: hidden; }

/* =====================================================================
 * Подвал
 * ===================================================================== */
.ds-footer { background: var(--ds-forest); color: var(--ds-on-forest); padding-block: clamp(48px, 7vw, 80px) 32px; margin-top: var(--ds-section); }
.ds .ds-footer { margin-top: 0; }
.ds-footer a { color: var(--ds-on-forest); text-decoration: none; }
.ds-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
/* логотип без прозрачности: ставим на светлую плашку, а не инвертируем */
.ds-footer__brand a { margin-bottom: 4px; display: inline-flex; padding: 10px 14px; border-radius: var(--ds-r-sm); background: var(--ds-surface); }
.ds-footer__brand img { height: 24px; width: auto; }
.ds-footer__about { margin-top: 20px; color: var(--ds-on-forest-muted); font-size: .9375rem; max-width: 36ch; }
.ds-footer__col h2 { font-size: .9375rem; font-weight: 600; color: var(--ds-lime); margin-bottom: 14px; }
.ds-footer__col li + li { margin-top: 10px; }
.ds-footer__col a { color: var(--ds-on-forest-muted); font-size: .9375rem; transition: color var(--ds-t-ui) ease; }
@media (hover: hover) and (pointer: fine) { .ds-footer__col a:hover { color: #FFFFFF; } }
.ds-footer__legal { margin-top: clamp(32px, 5vw, 56px); padding-top: 24px; border-top: 1px solid rgba(233,241,235,.14); display: grid; gap: 10px; font-size: .8125rem; line-height: 1.55; color: var(--ds-on-forest-muted); }
.ds-footer__legal p { max-width: 90ch; }
.ds-footer__age { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 24px; padding: 0 8px; border-radius: var(--ds-r-pill); border: 1px solid rgba(233,241,235,.3); font-weight: 600; font-size: .75rem; color: var(--ds-on-forest); margin-right: 8px; }
.ds-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.ds-footer__brand { grid-column: 1 / -1; }
@media (min-width: 1024px) { .ds-footer__grid { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 40px; } .ds-footer__brand { grid-column: auto; } }

/* =====================================================================
 * Карточка оффера
 * ===================================================================== */
.ds-offer { position: relative; display: flex; flex-direction: column; gap: 16px; padding: clamp(16px, 4vw, 20px); min-width: 0; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); box-shadow: var(--ds-shadow-1); transition: transform var(--ds-t-ui) var(--ds-ease-out), box-shadow var(--ds-t-ui) ease; }
.ds-offer.is-featured { background: var(--ds-lime-wash); border-color: #CBE8AE; }
@media (hover: hover) and (pointer: fine) { .ds-offer:hover { transform: translateY(-2px); box-shadow: var(--ds-shadow-2); } }
.ds-offer[hidden], .ds-offer.is-hidden, .ds-offer.is-capped { display: none; }
.ds-more { margin-top: 16px; }
.ds-more[hidden] { display: none; }
.ds-offers-catalog { margin-top: 12px; }
.ds-offer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ds-offer__id { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ds-offer__id > div { min-width: 0; }
.ds-offer__top .ds-badge { flex: none; }
.ds-offer__logo { width: 48px; height: 48px; flex: none; border-radius: var(--ds-r-sm); border: 1px solid var(--ds-line); background: var(--ds-surface); overflow: hidden; display: grid; place-items: center; }
.ds-offer__logo img { width: 100%; height: 100%; object-fit: contain; }
.ds-offer__logo.is-mono { background: var(--ds-forest); border-color: var(--ds-forest); color: var(--ds-lime); font-weight: 600; font-size: 1.25rem; }
.ds-offer__name { font-size: 1.125rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; }
.ds-offer__badge { margin-top: 8px; }
.ds-offer__name a { text-decoration: none; }
.ds-offer__license { display: flex; align-items: flex-start; gap: 4px; flex-wrap: nowrap; margin-top: 2px; font-size: .8125rem; color: var(--ds-muted); }
.ds-offer__license svg { width: 14px; height: 14px; color: var(--ds-lime-ink); flex: none; margin-top: 2px; }
.ds-offer__license > span { min-width: 0; }
.ds-offer__license a { color: var(--ds-lime-ink); font-weight: 500; }
.ds-offer__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--ds-line); border: 1px solid var(--ds-line); border-radius: 16px; overflow: hidden; }
.ds-offer.is-featured .ds-offer__facts { background: #D6EBC2; border-color: #D6EBC2; }
.ds-offer__facts > div { background: var(--ds-surface); padding: 12px 14px; min-width: 0; }
.ds-offer__facts dt { font-size: .75rem; color: var(--ds-muted); line-height: 1.3; }
.ds-offer__facts dd { margin-top: 2px; font-size: clamp(1rem, .95rem + .3vw, 1.125rem); font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ds-offer__facts dd.is-good { color: var(--ds-lime-ink); }
.ds-offer__facts dd.is-unknown { color: var(--ds-muted); font-weight: 500; }
.ds-offer__actions { display: grid; gap: 10px; margin-top: auto; }
.ds-offer__more { justify-self: center; font-size: .875rem; font-weight: 500; color: var(--ds-muted); text-decoration: underline; text-decoration-color: rgba(90,107,96,.35); }
.ds-offer__ad { font-size: .75rem; line-height: 1.4; color: var(--ds-muted); text-align: center; }
.ds-offers { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .ds-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ds-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ds-empty { padding: 32px; text-align: center; border: 1px dashed #C2CFC5; border-radius: var(--ds-r-md); color: var(--ds-muted); }
.ds-empty[hidden] { display: none; }

/* =====================================================================
 * FAQ
 * ===================================================================== */
.ds-faq { display: grid; gap: 10px; }
.ds-faq details { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); }
.ds-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 20px; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.ds-faq summary::-webkit-details-marker { display: none; }
.ds-faq summary svg { width: 20px; height: 20px; flex: none; color: var(--ds-muted); transition: transform var(--ds-t-ui) var(--ds-ease-out); }
.ds-faq details[open] summary svg { transform: rotate(180deg); }
.ds-faq__a { padding: 0 20px 20px; color: var(--ds-muted); max-width: 70ch; }
.ds-faq__a > * + * { margin-top: 10px; }

/* ---------- Мелочи ---------- */
.ds-only-mobile { display: flex; }
.ds-only-desktop { display: none; }
@media (min-width: 640px) { .ds-only-mobile { display: none; } .ds-only-desktop { display: inline-flex; } }

/* Cookie-уведомление (разметка из inc/compliance.php) */
.zaymi-cookie { position: fixed; inset: auto 12px 12px; z-index: 60; max-width: 560px; margin-inline: auto; padding: 10px 10px 10px 18px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); box-shadow: var(--ds-shadow-2); font-family: var(--ds-font); font-size: .875rem; color: var(--ds-ink); }
.zaymi-cookie[hidden] { display: none; }
.zaymi-cookie__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.zaymi-cookie__text a { color: var(--ds-lime-ink); }
.zaymi-cookie__ok { flex: none; min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--ds-r-pill); background: var(--ds-lime); color: var(--ds-forest); font: 600 .9375rem/1 var(--ds-font); cursor: pointer; transition: transform var(--ds-t-press) var(--ds-ease-out); }
.zaymi-cookie__ok:active { transform: scale(.97); }
.ds-lg { display: none; }
@media (min-width: 1024px) { .ds-lg { display: inline; } }
.ds-menu__links a svg { width: 18px; height: 18px; color: var(--ds-muted); }
.ds-main { display: block; }

/* =====================================================================
 * Главная
 * ===================================================================== */
.ds-hero { padding-block: clamp(24px, 5vw, 72px) clamp(8px, 2vw, 24px); }
.ds-hero__grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.ds-hero__copy { display: grid; gap: 16px; }
.ds-hero__copy .ds-lead { max-width: 40ch; }
@media (min-width: 1024px) {
  .ds-hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .ds-hero__copy { gap: 20px; padding-bottom: 24px; }
}

/* Калькулятор */
.ds-picker { padding: clamp(20px, 2.6vw, 32px); display: grid; gap: 14px; box-shadow: var(--ds-shadow-2); }
.ds-picker__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ds-picker__label { font-size: .9375rem; font-weight: 500; color: var(--ds-muted); }
.ds-picker__value { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--ds-ink); }
.ds-picker__scale { display: flex; justify-content: space-between; margin-top: -6px; }
.ds-picker__chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ds-picker__chips .ds-chip--opt { display: none; }
@media (min-width: 480px) { .ds-picker__chips { grid-template-columns: repeat(5, minmax(0, 1fr)); } .ds-picker__chips .ds-chip--opt { display: inline-flex; } }
.ds-picker__chips .ds-chip { justify-content: center; padding: 0 4px; min-width: 0; font-size: .875rem; }
@media (min-width: 480px) { .ds-picker__chips .ds-chip { font-size: .9375rem; } }
.ds-picker .ds-btn { margin-top: 6px; }

.ds-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 14%; }
.ds-range:focus-visible { outline: none; }
.ds-range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--ds-forest) 0 var(--p), #E2E9E3 var(--p) 100%); }
.ds-range::-moz-range-track { height: 8px; border-radius: 999px; background: #E2E9E3; }
.ds-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--ds-forest); }
.ds-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: var(--ds-lime); border: 4px solid var(--ds-forest); box-shadow: 0 2px 8px rgba(15,36,24,.2); transition: transform var(--ds-t-press) var(--ds-ease-out); }
.ds-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ds-lime); border: 4px solid var(--ds-forest); box-shadow: 0 2px 8px rgba(15,36,24,.2); }
.ds-range:active::-webkit-slider-thumb { transform: scale(1.08); }
.ds-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(166,227,110,.6); }

.ds-segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--ds-r-pill); background: #EEF2EF; }
.ds-segment__btn { min-height: 44px; border: 0; border-radius: var(--ds-r-pill); background: transparent; font-weight: 500; font-size: .9375rem; color: var(--ds-muted); cursor: pointer; transition: background-color var(--ds-t-ui) ease, color var(--ds-t-ui) ease, transform var(--ds-t-press) var(--ds-ease-out); }
.ds-segment__btn:active { transform: scale(.97); }
.ds-segment__btn[aria-pressed="true"] { background: var(--ds-surface); color: var(--ds-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15,36,24,.12); }

/* Офферы */
.ds-section--offers { padding-top: clamp(32px, 5vw, 64px); }
.ds-offers-count { margin-top: 6px; }

/* Как выбрать */
.ds-guide { display: grid; gap: clamp(24px, 4vw, 64px); }
.ds-guide__intro { display: grid; gap: 14px; align-content: start; }
.ds-guide__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ds-lime-ink); text-decoration: none; min-height: 44px; }
.ds-guide__link svg { width: 18px; height: 18px; transition: transform var(--ds-t-ui) var(--ds-ease-out); }
@media (hover: hover) and (pointer: fine) { .ds-guide__link:hover svg { transform: translateX(3px); } }
.ds-steps { counter-reset: ds-step; display: grid; gap: 0; }
.ds-steps li { counter-increment: ds-step; position: relative; padding: 22px 0 22px 64px; border-top: 1px solid var(--ds-line); }
.ds-steps li:last-child { border-bottom: 1px solid var(--ds-line); }
.ds-steps li::before { content: counter(ds-step); position: absolute; left: 0; top: 20px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--ds-forest); color: var(--ds-lime); font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-steps h3 { margin-bottom: 6px; }
.ds-steps p { max-width: 60ch; }
@media (min-width: 1024px) { .ds-guide { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } .ds-guide__intro { position: sticky; top: 104px; } }

/* Подборки */
.ds-hubs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: clamp(20px, 3vw, 32px); padding: clamp(20px, 3vw, 36px); background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-lg); }
.ds-hubs__group { min-width: 0; }
.ds-hubs__title { font-size: .9375rem; font-weight: 600; color: var(--ds-muted); margin-bottom: 10px; }
@media (max-width: 767px) {
  .ds-hubs { padding: 20px 0; background: transparent; border: 0; }
  .ds-hubs .ds-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--ds-gutter)); padding-inline: var(--ds-gutter); }
  .ds-hubs .ds-chips::-webkit-scrollbar { display: none; }
  .ds-hubs .ds-chips .ds-chip { white-space: nowrap; flex: none; }
}

/* Статьи: одна крупная + две компактные */
.ds-posts { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (max-width: 767px) { .ds-post:not(.ds-post--lead) .ds-post__link { grid-template-columns: 96px 1fr; align-items: center; } .ds-post:not(.ds-post--lead) .ds-post__img { aspect-ratio: 1; } .ds-post:not(.ds-post--lead) .ds-post__body { padding: 0; } }
.ds-post__link { display: grid; gap: 14px; height: 100%; text-decoration: none; padding: 12px; border-radius: var(--ds-r-md); background: var(--ds-surface); border: 1px solid var(--ds-line); transition: box-shadow var(--ds-t-ui) ease, transform var(--ds-t-ui) var(--ds-ease-out); }
@media (hover: hover) and (pointer: fine) { .ds-post__link:hover { box-shadow: var(--ds-shadow-2); transform: translateY(-2px); } }
.ds-post__img { display: block; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 9; background: #E6ECE7; }
.ds-post__img img { width: 100%; height: 100%; object-fit: cover; }
.ds-post__body { display: grid; gap: 8px; padding: 0 6px 6px; }
.ds-post__title { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.ds-post--lead .ds-post__title { font-size: clamp(1.1875rem, 1.05rem + .6vw, 1.5rem); }
@media (min-width: 768px) {
  .ds-posts { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
  .ds-post--lead { grid-row: span 2; }
  .ds-post:not(.ds-post--lead) .ds-post__link { grid-template-columns: 160px 1fr; align-items: center; }
  .ds-post:not(.ds-post--lead) .ds-post__img { aspect-ratio: 4 / 3; }
}

/* FAQ */
.ds-faq-wrap { display: grid; gap: clamp(20px, 3vw, 40px); }
@media (min-width: 1024px) { .ds-faq-wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; } }


/* =====================================================================
 * Общее для внутренних страниц
 * ===================================================================== */
.ds-mfo__crumbs { padding-top: clamp(16px, 3vw, 28px); padding-bottom: 16px; }
.ds-crumbs svg { width: 14px; height: 14px; color: #A3B1A7; flex: none; }
.ds-mt { margin-top: 20px; }
.ds-mt-lg { margin-top: var(--ds-gap); }
.ds-two { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .ds-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-ticks { display: grid; gap: 10px; margin-top: 12px; }
.ds-ticks li { position: relative; padding-left: 30px; line-height: 1.5; }
.ds-ticks li::before { content: ""; position: absolute; left: 0; top: .15em; width: 20px; height: 20px; border-radius: 50%; background: var(--ds-lime-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F5A12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ds-ticks--minus li::before { background: #F1F3F1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6B60' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ds-ticks a { color: var(--ds-lime-ink); font-weight: 500; }
.ds-prose { max-width: 72ch; color: var(--ds-ink); }
.ds-prose > * + * { margin-top: 1em; }
.ds-prose h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.01em; margin-top: 1.6em; }
.ds-prose h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.4em; }
.ds-prose ul { list-style: disc; padding-left: 1.3em; }
.ds-prose ol { list-style: decimal; padding-left: 1.3em; }
.ds-prose li + li { margin-top: .4em; }
.ds-prose a { color: var(--ds-lime-ink); font-weight: 500; }
.ds-prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ds-prose th, .ds-prose td { padding: 10px 12px; border-bottom: 1px solid var(--ds-line); text-align: left; }
.ds-prose img { border-radius: var(--ds-r-sm); }

/* =====================================================================
 * Страница МФО
 * ===================================================================== */
.ds-mfo-hero { display: grid; gap: 20px; padding: clamp(20px, 3vw, 36px); box-shadow: var(--ds-shadow-2); }
.ds-mfo-hero__id { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.ds-mfo-hero__logo { width: 64px; height: 64px; flex: none; border-radius: 16px; border: 1px solid var(--ds-line); background: var(--ds-surface); overflow: hidden; display: grid; place-items: center; }
.ds-mfo-hero__logo img { width: 100%; height: 100%; object-fit: contain; }
.ds-mfo-hero__logo.is-mono { background: var(--ds-forest); border-color: var(--ds-forest); color: var(--ds-lime); font-weight: 600; font-size: 1.75rem; }
.ds-mfo-hero__titles { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.ds-mfo-hero__h1 { font-size: clamp(1.625rem, 1.2rem + 2vw, 2.75rem); overflow-wrap: break-word; }
.ds-mfo-hero__legal { font-size: .875rem; color: var(--ds-muted); }
.ds-mfo-hero__legal a { color: var(--ds-lime-ink); }
.ds-mfo-hero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-mfo-hero__facts > div { padding: 14px 16px; border-radius: 16px; background: #F4F7F4; border: 1px solid var(--ds-line); min-width: 0; }
.ds-mfo-hero__facts > div.is-accent { background: var(--ds-lime-wash); border-color: #CBE8AE; }
.ds-mfo-hero__facts dt { font-size: .8125rem; color: var(--ds-muted); }
.ds-mfo-hero__facts dd { margin-top: 4px; font-size: clamp(1.0625rem, 1rem + .5vw, 1.375rem); font-weight: 600; line-height: 1.2; }
.ds-mfo-hero__facts dd.is-good { color: var(--ds-lime-ink); }
.ds-mfo-hero__facts dd.is-unknown { color: var(--ds-muted); font-weight: 500; }
.ds-mfo-hero__cta { display: grid; gap: 8px; }
@media (min-width: 1024px) {
  .ds-mfo-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; column-gap: 40px; }
  .ds-mfo-hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-row: span 2; }
  .ds-mfo-hero__cta { grid-column: 1; }
  .ds-mfo-hero__facts { grid-column: 2; grid-row: 1 / span 2; }
}

.ds-anchors { position: sticky; top: 64px; z-index: 30; margin-top: 20px; padding-block: 10px; background: rgba(244,246,243,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ds-line); }
@media (min-width: 1024px) { .ds-anchors { top: 72px; } }
.ds-mfo__body { display: grid; gap: clamp(40px, 6vw, 72px); padding-block: clamp(32px, 5vw, 56px); }
.ds-mfo-sec { scroll-margin-top: 140px; display: grid; gap: 16px; }
.ds-mfo-sec > .ds-h2 { margin-bottom: 4px; }

.ds-spec { display: grid; grid-template-columns: minmax(0, 1fr); padding: 4px clamp(16px, 2.4vw, 24px); }
.ds-spec > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ds-line); }
.ds-spec > div:last-child { border-bottom: 0; }
.ds-spec dt { color: var(--ds-muted); }
.ds-spec dd { font-weight: 600; text-align: right; }

.ds-calc { padding: clamp(20px, 3vw, 32px); display: grid; gap: 20px; }
.ds-calc__inputs { display: grid; gap: 18px; }
.ds-calc__val { font-size: 1.25rem; font-weight: 600; }
.ds-calc__result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-calc__result > div { padding: 14px 16px; border-radius: 16px; background: #F4F7F4; border: 1px solid var(--ds-line); }
.ds-calc__result > div.is-total { background: var(--ds-forest); border-color: var(--ds-forest); color: var(--ds-on-forest); }
.ds-calc__result dt { font-size: .8125rem; color: var(--ds-muted); }
.ds-calc__result .is-total dt { color: var(--ds-on-forest-muted); }
.ds-calc__result dd { margin-top: 4px; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem); font-weight: 600; }
.ds-calc__result .is-total dd { color: var(--ds-lime); }
@media (min-width: 768px) { .ds-calc { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; column-gap: 32px; } .ds-calc .ds-micro { grid-column: 1 / -1; } }

.ds-table-wrap { position: relative; overflow-x: auto; } /* relative: .ds-sr внутри таблицы не вылезает за прокрутку и не расширяет страницу */
.ds-table { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 520px; }
.ds-table th { text-align: left; font-weight: 500; color: var(--ds-muted); font-size: .8125rem; padding: 14px 16px; border-bottom: 1px solid var(--ds-line); }
.ds-table td { padding: 14px 16px; border-bottom: 1px solid var(--ds-line); font-weight: 600; }
.ds-table tr:last-child td { border-bottom: 0; }

.ds-check p + .ds-ticks { margin-bottom: 16px; }
.ds-check .ds-small { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ds-line); }
.ds-check .ds-small a { color: var(--ds-lime-ink); font-weight: 500; }

/* Отзывы: разметка из inc/reviews.php */
.ds-reviews__empty { text-align: left; background: var(--ds-surface); border-style: solid; color: var(--ds-ink); }
.ds-reviews__empty strong { font-weight: 600; }
.zaymi-reviews__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.zaymi-reviews__rating-num { font-size: 1.75rem; font-weight: 600; }
.zaymi-reviews__stars { color: #C98A00; letter-spacing: 2px; }
.zaymi-reviews__count { color: var(--ds-muted); font-size: .875rem; }
.zaymi-reviews__list { display: grid; gap: 12px; }
.zaymi-reviews__item { padding: 18px 20px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); }
.zaymi-reviews__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .875rem; color: var(--ds-muted); margin-bottom: 8px; }
.zaymi-reviews__meta strong { color: var(--ds-ink); }
.zaymi-reviews__item time { display: block; margin-top: 8px; font-size: .8125rem; color: var(--ds-muted); }
.zaymi-review-form { display: grid; gap: 12px; padding: clamp(20px, 3vw, 28px); background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); }
.zaymi-review-form h3 { font-size: 1.125rem; font-weight: 600; margin: 0; }
.zaymi-review-form__row { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .zaymi-review-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.zaymi-review-form input[type=text], .zaymi-review-form textarea { width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid #C9D4CC; border-radius: 14px; background: var(--ds-surface); font: inherit; font-size: 1rem; color: var(--ds-ink); }
.zaymi-review-form textarea { min-height: 120px; resize: vertical; }
.zaymi-review-form input::placeholder, .zaymi-review-form textarea::placeholder { color: #6E7D73; }
.zaymi-review-form input:focus-visible, .zaymi-review-form textarea:focus-visible { outline: 3px solid var(--ds-lime); outline-offset: 1px; border-color: var(--ds-forest); }
.zaymi-review-form__rating { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.zaymi-review-form__rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zaymi-review-form__rating label { font-size: 1.75rem; line-height: 1; color: #CBD5CE; cursor: pointer; padding: 4px; }
.zaymi-review-form__rating input:checked ~ label, .zaymi-review-form__rating label:hover, .zaymi-review-form__rating label:hover ~ label { color: #C98A00; }
.zaymi-review-form__rating input:focus-visible + label { outline: 3px solid var(--ds-lime); border-radius: 6px; }
.zaymi-review-form button[type=submit] { justify-self: start; min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--ds-r-pill); background: var(--ds-forest); color: #FFFFFF; font-weight: 600; cursor: pointer; transition: transform var(--ds-t-press) var(--ds-ease-out); }
.zaymi-review-form button[type=submit]:active { transform: scale(.97); }
.zaymi-review-form__msg { font-size: .9375rem; }
.zaymi-review-form__msg.ok { color: var(--ds-lime-ink); }
.zaymi-review-form__msg.err { color: #A3261B; }
.zaymi-hp { position: absolute !important; left: -9999px !important; }

/* Закреплённая кнопка на мобильном */
.ds-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--ds-gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--ds-line); box-shadow: 0 -8px 24px rgba(15,36,24,.08); transform: translateY(110%); transition: transform 240ms var(--ds-ease-out); font-family: var(--ds-font); }
.ds-sticky.is-visible { transform: none; }
.ds-sticky__info { display: grid; min-width: 0; line-height: 1.25; }
.ds-sticky__info strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-sticky__info span { font-size: .8125rem; color: var(--ds-muted); }
.ds-sticky .ds-btn { flex: none; min-height: 48px; }
@media (min-width: 1024px) { .ds-sticky { display: none; } }
body.single-mfo .zaymi-cookie { bottom: 84px; }

/* =====================================================================
 * Каталог
 * ===================================================================== */
.ds-catalog__head { display: grid; gap: 12px; padding-bottom: 8px; }
.ds-catalog__controls { position: sticky; top: 64px; z-index: 30; padding-block: 12px; background: rgba(244,246,243,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ds-line); }
@media (min-width: 1024px) { .ds-catalog__controls { top: 72px; } }
.ds-catalog__controls .ds-chips { padding-bottom: 2px; }
.ds-chip__n { margin-left: 2px; font-size: .8125rem; color: var(--ds-muted); font-weight: 500; }
.ds-chip.is-active .ds-chip__n { color: var(--ds-lime-ink); }
.ds-catalog__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.ds-sort { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ds-segment--compact { display: flex; gap: 2px; padding: 3px; }
.ds-segment--compact .ds-segment__btn { min-height: 36px; padding: 0 12px; font-size: .875rem; white-space: nowrap; }
@media (max-width: 639px) {
  .ds-sort__label { display: none; }
  .ds-sort { width: 100%; }
  .ds-segment--compact { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .ds-segment--compact .ds-segment__btn { flex: 1 0 auto; min-height: 40px; }
}
.ds-catalog .ds-section--offers { padding-top: 24px; }


/* ---------- Фаза 2: правки после ревью ---------- */
/* Цифры в карточках одного ряда на одной высоте (subgrid), фолбэк — flex */
@supports (grid-template-rows: subgrid) {
  .ds-offers { grid-auto-rows: auto; }
  .ds-offer { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 16px; align-content: start; }
  .ds-offer.is-hidden, .ds-offer.is-capped, .ds-offer[hidden] { display: none; }
  .ds-offer__actions { align-self: end; }
}

/* Страница МФО: две колонки на десктопе, закреплённая сводка справа */
.ds-mfo__layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.ds-mfo__aside { display: none; }
@media (min-width: 1024px) {
  .ds-mfo__layout { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 48px; align-items: start; }
  .ds-mfo__body { max-width: 760px; }
  .ds-mfo__aside { display: block; position: sticky; top: 140px; margin-top: clamp(32px, 5vw, 56px); }
}
.ds-mfo-aside { padding: 20px; display: grid; gap: 14px; }
.ds-mfo-aside__name { font-size: 1.125rem; font-weight: 600; }
.ds-mfo-aside__facts { display: grid; gap: 0; }
.ds-mfo-aside__facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ds-line); font-size: .9375rem; }
.ds-mfo-aside__facts > div:last-child { border-bottom: 0; }
.ds-mfo-aside__facts dt { color: var(--ds-muted); }
.ds-mfo-aside__facts dd { font-weight: 600; text-align: right; }
.ds-anchors { margin-top: 28px; }

/* Активный раздел в якорях */
.ds-anchors .ds-chip[aria-current="true"] { background: var(--ds-lime-wash); border-color: var(--ds-lime); color: var(--ds-forest); font-weight: 600; }

/* Чипы сравнения: длинные названия читаются слева */
.ds-mfo-sec .ds-chips .ds-chip { text-align: left; }

/* Таблица тарифов: первая колонка закреплена, цифры вправо */
.ds-table th:not(:first-child), .ds-table td:not(:first-child) { text-align: right; }
.ds-table th:first-child, .ds-table td:first-child { position: sticky; left: 0; background: var(--ds-surface); }

/* Сортировка на мобильном: тач-цель 44px */
@media (max-width: 639px) { .ds-segment--compact .ds-segment__btn { min-height: 44px; } }
.ds-catalog__bar { margin: 0 0 16px; }
.ds-catalog .ds-section--offers { padding-top: 20px; }

/* «Похожие материалы» (inc/seo-embed-links.php) */
.ds-related { margin: 28px 0 0; padding: 20px 22px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); font-family: var(--ds-font); }
.ds-related__title { margin: 0 0 10px; font-size: 1.0625rem; font-weight: 600; color: var(--ds-ink); }
.ds-related__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ds-related__list a { color: var(--ds-lime-ink); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(47,90,18,.3); text-underline-offset: .2em; }

/* Форма отзыва: подписи над полями, звёзды без предвыбора */
.zaymi-review-form__field { display: grid; gap: 6px; font-size: .9375rem; font-weight: 500; }
.zaymi-review-form__field small { color: var(--ds-muted); font-weight: 400; }
.zaymi-review-form__rategroup { margin: 0; padding: 0; border: 0; }
.zaymi-review-form__rategroup legend { padding: 0; margin-bottom: 4px; font-size: .9375rem; font-weight: 500; }
.zaymi-review-form button[type=submit] { background: transparent; color: var(--ds-ink); border: 1px solid var(--ds-line); }
@media (hover: hover) and (pointer: fine) { .zaymi-review-form button[type=submit]:hover { border-color: #C2CFC5; } }

/* =====================================================================
 * Статья (single.php)
 * ===================================================================== */
.ds-article__head { display: grid; justify-items: start; gap: 16px; max-width: calc(860px + 2 * var(--ds-gutter)); margin-inline: 0; padding-top: 8px; }
@media (min-width: 1024px) { .ds-article__head { margin-inline: auto; max-width: calc(var(--ds-container) + 2 * var(--ds-gutter)); } .ds-article__head > * { max-width: 820px; } }
.ds-badge--link { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .ds-badge--link:hover { background: #E2F3D2; } }
.ds-article__title { font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem); overflow-wrap: break-word; }
.ds-article__meta { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px 12px; font-size: var(--ds-fs-small); color: var(--ds-muted); }
.ds-article__meta .ds-article__facts { grid-column: 1 / -1; }
@media (min-width: 768px) { .ds-article__meta { display: flex; flex-wrap: wrap; gap: 10px 16px; } }
.ds-article__avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; background: #E6ECE7; }
.ds-article__by { display: grid; line-height: 1.3; }
.ds-article__by strong { color: var(--ds-ink); font-weight: 600; }
.ds-article__facts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ds-article__facts > * + *::before { content: "·"; margin-right: 14px; color: #A3B1A7; }
.ds-article__lead { max-width: 62ch; color: var(--ds-ink); opacity: .82; }
.ds-article__cover { margin-top: clamp(20px, 3vw, 32px); }
.ds-article__cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--ds-r-lg); background: #E6ECE7; }
.ds-article__cover figcaption { margin-top: 8px; text-align: right; }
.ds-article__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding-block: clamp(24px, 4vw, 48px) var(--ds-section); }
.ds-article__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); min-width: 0; align-content: start; }
.ds-article__aside { display: none; }
@media (min-width: 1024px) {
  .ds-article__layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .ds-article__aside { display: grid; gap: 16px; align-content: start; position: sticky; top: 96px; }
  .ds-toc--inline { display: none; }
}

/* Содержание: на мобиле раскрывашка, на десктопе липкая колонка */
.ds-toc ol { list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.ds-toc li { counter-increment: toc; }
.ds-toc a { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 6px; min-height: 44px; padding: 8px 10px; border-radius: 10px; font-size: .9375rem; line-height: 1.4; color: var(--ds-ink); text-decoration: none; transition: background-color var(--ds-t-ui) ease; }
.ds-toc a::before { content: counter(toc) "."; color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.ds-toc a[aria-current="true"] { background: var(--ds-lime-wash); color: var(--ds-lime-ink); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .ds-toc a:hover { background: #EEF2EF; } }
.ds-toc--inline { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); }
.ds-toc--inline summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 18px; font-weight: 600; }
.ds-toc--inline summary::-webkit-details-marker { display: none; }
.ds-toc--inline summary svg { width: 20px; height: 20px; margin-left: auto; color: var(--ds-muted); transition: transform var(--ds-t-ui) var(--ds-ease-out); }
.ds-toc--inline[open] summary svg { transform: rotate(180deg); }
.ds-toc--inline ol { padding: 0 8px 12px; }
.ds-toc--side { padding: 18px 12px 12px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); max-height: calc(100vh - 340px); overflow-y: auto; }
.ds-toc__title { padding: 0 10px 8px; font-weight: 600; }
.ds-article__cta { display: grid; gap: 10px; padding: 20px; }
.ds-article__cta-title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }

/* Текст статьи */
.ds-prose--article { min-width: 0; max-width: 70ch; font-size: clamp(1.0625rem, 1rem + .2vw, 1.125rem); line-height: 1.7; }
.ds-prose--article > * + * { margin-top: 1.1em; }
.ds-prose--article h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.2; letter-spacing: -.02em; margin-top: 1.8em; scroll-margin-top: 96px; }
.ds-prose--article > h2:first-child { margin-top: 0; }
.ds-prose--article h3 { font-size: 1.25rem; line-height: 1.3; margin-top: 1.5em; }
.ds-prose--article ul li::marker { color: #7FAF55; }
.ds-prose--article ol li::marker { color: var(--ds-muted); font-weight: 600; }
.ds-prose--article a { text-decoration: underline; text-decoration-color: rgba(47,90,18,.3); text-underline-offset: .2em; }
.ds-prose--article blockquote { margin-inline: 0; padding: 18px 22px; background: var(--ds-lime-wash); border: 1px solid #CBE8AE; border-radius: var(--ds-r-md); }
.ds-prose--article img { height: auto; }
.ds-prose--article .zaymi-editor-source { font-size: .9375rem; color: var(--ds-muted); padding: 12px 16px; background: #EEF2EF; border-radius: var(--ds-r-sm); }
.ds-prose--article > table, .ds-prose--article .zaymi-ai-mfo-table { display: block; overflow-x: auto; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); font-size: .9375rem; line-height: 1.4; }
.ds-prose--article .zaymi-ai-mfo-table h3 { margin: 0; padding: 16px 16px 4px; font-size: 1.0625rem; }
.ds-prose--article .zaymi-ai-mfo-table table { min-width: 560px; }
.ds-prose--article th { font-size: .8125rem; font-weight: 500; color: var(--ds-muted); white-space: nowrap; }
.ds-prose--article td, .ds-prose--article th { padding: 12px 16px; vertical-align: middle; }
.ds-prose--article tr:last-child td { border-bottom: 0; }
.ds-prose--article .btn-go { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--ds-r-pill); background: var(--ds-lime); color: var(--ds-forest); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform var(--ds-t-press) var(--ds-ease-out); }
.ds-prose--article .btn-go:active { transform: scale(.97); }

/* Офферы внутри статьи */
.ds-inline-offers { display: grid; gap: 14px; margin-block: 2em; padding: clamp(10px, 2.4vw, 24px); background: var(--ds-lime-wash); border: 1px solid #CBE8AE; border-radius: var(--ds-r-lg); font-size: var(--ds-fs-body); line-height: 1.5; }
.ds-inline-offers__title { font-size: 1.125rem; font-weight: 600; }
.ds-prose--article .ds-inline-offers a { text-decoration: none; }
.ds-prose .ds-inline-offers a { color: inherit; font-weight: inherit; }
.ds-prose .ds-inline-offers .ds-btn--primary { color: var(--ds-forest); font-weight: 600; }
.ds-prose .ds-inline-offers .ds-offer__license a, .ds-prose .ds-inline-offers .ds-guide__link { color: var(--ds-lime-ink); }
.ds-prose--article .ds-inline-offers h3 { margin: 0; font-size: 1.125rem; }
.ds-prose--article .ds-inline-offers > * + * { margin-top: 0; }
@media (min-width: 1024px) { .ds-offers--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ds-article__sec { display: grid; gap: 20px; }
.ds-article__avatar.is-mono, .ds-author__photo.is-mono { display: inline-grid; place-items: center; background: var(--ds-forest); color: var(--ds-lime); font-weight: 600; }
.ds-author { display: grid; gap: 14px; justify-items: start; padding: clamp(18px, 2.4vw, 28px); }
.ds-author__id { display: flex; gap: 14px; align-items: center; }
.ds-author__photo { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; background: #E6ECE7; font-size: 1.375rem; }
.ds-author__name { font-size: 1.125rem; font-weight: 600; }
.ds-author__bio { max-width: 68ch; }
.ds-author__checks { display: grid; gap: 18px; width: 100%; padding-block: 16px; border-block: 1px solid var(--ds-line); }
@media (min-width: 640px) { .ds-author__checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-author__label { font-size: .875rem; font-weight: 600; }
.ds-author__checks .ds-ticks { margin-top: 10px; font-size: .9375rem; }
.ds-author__sources { display: grid; gap: 6px; margin-top: 10px; font-size: .9375rem; }
.ds-author__sources a { color: var(--ds-lime-ink); text-decoration: underline; text-decoration-color: rgba(47,90,18,.3); }

/* Шеринг и прогресс чтения (разметка из inc/article-enhancements.php) */
.ds .zaymi-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2em; padding-top: 20px; border-top: 1px solid var(--ds-line); }
.ds .zaymi-share__label { font-size: .9375rem; font-weight: 600; margin-right: 4px; }
.ds .zaymi-share__btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line); background: var(--ds-surface); color: var(--ds-ink); font: 500 .9375rem/1 var(--ds-font); text-decoration: none; cursor: pointer; transition: border-color var(--ds-t-ui) ease, transform var(--ds-t-press) var(--ds-ease-out); }
.ds .zaymi-share__btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ds .zaymi-share__btn:hover { border-color: #C2CFC5; } }
.ds .zaymi-reading-progress { position: fixed; top: 0; left: 0; z-index: 70; height: 3px; width: 0; background: var(--ds-lime); pointer-events: none; }
.ds-section--posts { padding-top: 0; }

/* =====================================================================
 * Блог и рубрики (home.php)
 * ===================================================================== */
.ds-blog__head { display: grid; gap: 20px; padding-top: 8px; }
.ds-blog__head .ds-lead { margin-top: 12px; max-width: 58ch; }
@media (min-width: 1024px) { .ds-blog__head { grid-template-columns: minmax(0, 1fr) 360px; align-items: end; } }
.ds-search { position: relative; display: flex; align-items: center; }
.ds-search svg { position: absolute; left: 18px; width: 18px; height: 18px; color: var(--ds-muted); pointer-events: none; }
.ds-search input[type=search] { width: 100%; min-height: 52px; padding: 0 20px 0 46px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-pill); background: var(--ds-surface); font: inherit; font-size: 1rem; color: var(--ds-ink); transition: border-color var(--ds-t-ui) ease, box-shadow var(--ds-t-ui) ease; }
.ds-search input[type=search]::placeholder { color: #8A998F; }
.ds-search input[type=search]:focus { outline: none; border-color: #7FAF55; box-shadow: 0 0 0 3px rgba(166,227,110,.45); }
.ds-blog__cats { margin-top: 20px; }
.ds-section--blog { padding-top: clamp(20px, 3vw, 32px); }
.ds-post__cat { font-size: .8125rem; font-weight: 600; color: var(--ds-lime-ink); }
.ds-post__excerpt { color: var(--ds-muted); line-height: 1.55; }
.ds-blog__feature { margin-bottom: var(--ds-gap); }
.ds-blog__grid { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .ds-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ds-blog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) {
  .ds-blog .ds-post .ds-post__link { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .ds-blog .ds-post .ds-post__img { aspect-ratio: 16 / 9; }
}
.ds-post--feature .ds-post__title { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.75rem); line-height: 1.25; }
.ds-blog .ds-post--feature .ds-post__link { grid-template-columns: minmax(0, 1fr); }
.ds-blog .ds-post--feature .ds-post__img { aspect-ratio: 16 / 9; }
@media (min-width: 900px) {
  .ds-blog .ds-post--feature .ds-post__link { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 28px; padding: 14px; }
  .ds-blog .ds-post--feature .ds-post__img { aspect-ratio: 16 / 10; }
  .ds-post--feature .ds-post__body { gap: 12px; padding: 8px 20px 8px 0; }
}
.ds-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(28px, 4vw, 48px); }
.ds-pager .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: var(--ds-r-pill); border: 1px solid var(--ds-line); background: var(--ds-surface); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--ds-ink); transition: border-color var(--ds-t-ui) ease, transform var(--ds-t-press) var(--ds-ease-out); }
.ds-pager .page-numbers.current { background: var(--ds-forest); border-color: var(--ds-forest); color: var(--ds-on-forest); }
.ds-pager .page-numbers.dots { border: 0; background: none; min-width: 24px; padding: 0; }
.ds-pager a.page-numbers:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .ds-pager a.page-numbers:hover { border-color: #C2CFC5; } }

/* =====================================================================
 * Хабы: подборка / город / сумма (template-parts/ds/hub-term.php) и индексы (inc/tax-hubs.php)
 * ===================================================================== */
.ds-hub__head { display: grid; justify-items: start; gap: 14px; padding-top: 8px; }
.ds-hub__title { max-width: 22ch; }
.ds-hub__lead { max-width: 62ch; }
.ds-hub__lead > * + * { margin-top: .6em; }
.ds-hub__meta { display: inline-flex; align-items: center; gap: 8px; }
.ds-hub__meta svg { width: 16px; height: 16px; }
.ds-hub__tips-wrap { margin-top: clamp(24px, 3.5vw, 40px); }
.ds-hub__tips { padding: clamp(20px, 2.6vw, 32px); }
.ds-hub__tips-title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; margin-bottom: 18px; }
/* В DOM советы идут после списка (мобила, скринридер); на планшете и десктопе визуально поднимаем их над списком, как в макете */
.ds-hub__tips-wrap { margin-bottom: clamp(28px, 4vw, 44px); }
@media (min-width: 768px) {
  .ds-hub { display: flex; flex-direction: column; }
  .ds-hub > * { order: 2; }
  .ds-hub > .ds-mfo__crumbs, .ds-hub > .ds-hub__head { order: 0; }
  .ds-hub > .ds-hub__tips-wrap { order: 1; margin-bottom: 0; }
}
.ds-hub__tips ul { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .ds-hub__tips ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
@media (min-width: 1024px) { .ds-hub__tips ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ds-hub__tips li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.ds-hub__tips h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.ds-hub__tips p { margin-top: 4px; font-size: .9375rem; color: var(--ds-muted); line-height: 1.5; }
.ds-hub__tick { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ds-lime-wash); border: 1px solid #CBE8AE; color: var(--ds-lime-ink); }
.ds-hub__tick svg { width: 15px; height: 15px; stroke-width: 2.5; }
.ds-hub__list { padding-top: clamp(28px, 4vw, 44px); }
.ds-hub__list .ds-note { margin-bottom: 16px; }
.ds-hub__count { color: var(--ds-ink); }
.ds-hub__disclaimer { margin-top: 16px; }
.ds-hub__related { display: grid; gap: 14px; }
.ds-hub__seo { padding-bottom: 0; }
.ds-hub__posts { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .ds-hub__posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-hub__post { position: relative; display: grid; gap: 10px; justify-items: start; padding: clamp(18px, 2.4vw, 26px); transition: box-shadow var(--ds-t-ui) ease, transform var(--ds-t-ui) var(--ds-ease-out); }
.ds-hub__post a { text-decoration: none; }
.ds-hub__post a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
@media (hover: hover) and (pointer: fine) { .ds-hub__post:hover { box-shadow: var(--ds-shadow-2); transform: translateY(-2px); } }

.ds-hubindex__stats { margin-top: 12px; }
.ds-hubindex__body { padding-top: clamp(20px, 3vw, 32px); }
.ds-hubindex__abc { margin-bottom: clamp(20px, 3vw, 32px); }
.ds-hubindex__abc .ds-chip { min-width: 44px; justify-content: center; }
.ds-hubindex__group + .ds-hubindex__group { margin-top: clamp(24px, 3vw, 36px); }
.ds-hubindex__group { scroll-margin-top: 96px; }
.ds-hubindex__letter { font-size: 1.25rem; font-weight: 600; color: var(--ds-muted); margin-bottom: 12px; }
.ds-tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .ds-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .ds-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ds-tiles--wide { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .ds-tiles--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ds-tiles--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ds-tile { position: relative; display: grid; gap: 4px; min-height: 76px; padding: 16px 44px 16px 18px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); text-decoration: none; color: var(--ds-ink); transition: border-color var(--ds-t-ui) ease, box-shadow var(--ds-t-ui) ease, transform var(--ds-t-press) var(--ds-ease-out); }
.ds-tile[hidden], .ds-hubindex [hidden] { display: none; }
.ds-tile:active { transform: scale(.98); }
.ds-tile__title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ds-tile__meta { font-size: .875rem; color: var(--ds-muted); }
.ds-tile svg { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: #A3B1A7; transition: transform var(--ds-t-ui) var(--ds-ease-out), color var(--ds-t-ui) ease; }
.ds-tile--summa .ds-tile__title { font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .ds-tile:hover { border-color: #C2CFC5; box-shadow: var(--ds-shadow-1); }
  .ds-tile:hover svg { transform: translateX(3px); color: var(--ds-lime-ink); }
}

/* =====================================================================
 * Фаза 4: сравнение двух МФО, «сумма на срок», обычные и служебные страницы, 404
 * ===================================================================== */
.ds-offers-block--bare { margin-block: 1.6em; }
.ds-offers-block__title { margin-bottom: 16px; }
.ds-offers-block__note { margin-bottom: 16px; }

/* Таблицы: строковые заголовки (th scope=row) и выравнивание по левому краю для текстовых значений */
.ds-table tbody th { font-size: .9375rem; font-weight: 500; color: var(--ds-ink); text-align: left; }
.ds-table td.is-unknown { color: var(--ds-muted); font-weight: 500; }
.ds-table.ds-table--compare th, .ds-table.ds-table--compare td { text-align: left; }
.ds-table--compare { min-width: 560px; }
.ds-table--compare tbody th { color: var(--ds-muted); width: 28%; }
.ds-table--compare thead th:not(:first-child) { color: var(--ds-ink); font-size: .9375rem; font-weight: 600; }
.ds-table--compare tr:last-child th { border-bottom: 0; }
/* Мобила: строка таблицы = параметр сверху и два значения рядом, подпись МФО из data-name */
@media (max-width: 639px) {
  .ds-table.ds-table--compare { min-width: 0; }
  .ds-table--compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds-table--compare tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--ds-line); }
  .ds-table--compare tbody tr:last-child { border-bottom: 0; }
  .ds-table.ds-table--compare tbody th, .ds-table.ds-table--compare tbody td { position: static; width: auto; padding: 0; border: 0; background: none; }
  .ds-table.ds-table--compare tbody th { grid-column: 1 / -1; margin-bottom: 6px; font-size: .8125rem; }
  .ds-table--compare tbody td::before { content: attr(data-name); content: attr(data-name) / ""; display: block; font-size: .75rem; font-weight: 500; color: var(--ds-muted); }
  .ds-compare__win { margin-left: 0; margin-top: 4px; }
}
.ds-compare__win { margin-left: 6px; min-height: 22px; font-size: .75rem; vertical-align: 1px; }
.ds-table--plain { min-width: 0; }
.ds-table--plain tr:last-child th { border-bottom: 0; }
.ds-table--mfo { min-width: 760px; }
.ds-table.ds-table--mfo th, .ds-table.ds-table--mfo td { text-align: left; vertical-align: middle; }
.ds-table.ds-table--mfo td:last-child { text-align: right; white-space: nowrap; }
.ds-table__mfo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; color: var(--ds-ink); }
.ds-table__mfo .ds-offer__logo { width: 32px; height: 32px; border-radius: 10px; font-size: .9375rem; }
.ds-table__ad { display: block; margin-top: 4px; font-weight: 400; white-space: normal; max-width: 200px; margin-left: auto; }

.ds-compare__sec { padding-top: 8px; }
.ds-compare__cols { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); margin-top: clamp(20px, 3vw, 32px); }
@media (min-width: 768px) { .ds-compare__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ds-compare__col { display: grid; gap: 14px; align-content: start; justify-items: start; padding: clamp(20px, 2.6vw, 30px); }
.ds-compare__col .ds-ticks { margin-top: 0; }
.ds-compare__pc { display: grid; gap: 10px; width: 100%; padding-top: 14px; border-top: 1px solid var(--ds-line); }
.ds-amount .ds-hub__related { padding-top: var(--ds-section); }

.ds-amount__calc { margin-top: 8px; }
.ds-amount__calc .ds-h2 { font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem); }
.ds-amount__info { align-items: start; row-gap: clamp(28px, 4vw, 40px); }
.ds-steps--compact li { padding: 14px 0 14px 52px; }
.ds-steps--compact li::before { width: 36px; height: 36px; top: 12px; font-size: .9375rem; }

/* /sravnenie-mfo/ на мобиле: строка = карточка (название, факты 2×2, кнопка с пометкой «Реклама») */
@media (max-width: 639px) {
  .ds-table.ds-table--mfo { min-width: 0; }
  .ds-table--mfo thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds-table--mfo tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 16px; border-bottom: 1px solid var(--ds-line); }
  .ds-table--mfo tbody tr:last-child { border-bottom: 0; }
  .ds-table.ds-table--mfo tbody th, .ds-table.ds-table--mfo tbody td { position: static; padding: 0; border: 0; background: none; text-align: left; white-space: normal; }
  .ds-table.ds-table--mfo tbody th, .ds-table.ds-table--mfo tbody td:last-child { grid-column: 1 / -1; }
  .ds-table--mfo tbody td[data-label]::before { content: attr(data-label); content: attr(data-label) / ""; display: block; font-size: .75rem; font-weight: 500; color: var(--ds-muted); }
  .ds-table--mfo tbody td:last-child .ds-btn { width: 100%; min-height: 44px; }
  .ds-table--mfo .ds-table__ad { max-width: none; margin: 6px 0 0; text-align: center; }
}

/* Обычные страницы: текст 70ch, встроенные блоки (каталог, суммы) на всю ширину контейнера */
.ds-page__body { padding-block: clamp(20px, 3vw, 32px) var(--ds-section); }
.ds-page__prose { max-width: none; }
.ds-page__prose > *:not(.ds-embed--wide) { max-width: 70ch; }
.ds-page__prose .wp-block-group > * + * { margin-top: 1.1em; }
.ds-page__prose .wp-block-group > h2:first-child { margin-top: 0; }
.ds-page__prose .wp-block-group + .wp-block-group { margin-top: 2em; }
.ds-embed { margin-block: 1.8em; font-size: var(--ds-fs-body); line-height: 1.6; }
.ds-embed > h2 { margin-bottom: 16px; }
.ds-prose .ds-embed a { text-decoration: none; color: inherit; font-weight: inherit; }
.ds-prose .ds-embed .ds-btn--primary { color: var(--ds-forest); font-weight: 600; }
.ds-prose .ds-embed .ds-offer__license a, .ds-prose .ds-embed .ds-guide__link { color: var(--ds-lime-ink); }
.ds-prose .ds-embed ul, .ds-prose .ds-embed ol, .ds-prose .ds-inline-offers ul { list-style: none; padding-left: 0; }
.ds-prose .ds-embed .ds-faq__a > * + * { margin-top: 10px; }

/* Служебные страницы (inc/service-pages.php) */
.ds-service__head { display: grid; gap: var(--ds-gap); padding-top: 8px; align-items: start; }
@media (min-width: 1024px) { .ds-service__head { grid-template-columns: minmax(0, 1fr) 340px; column-gap: 48px; } }
.ds-service__lead { display: grid; gap: 14px; }
.ds-service__lead .ds-lead { max-width: 60ch; }
.ds-service__side { display: grid; gap: 6px; padding: 22px; background: var(--ds-forest); border-color: var(--ds-forest); color: var(--ds-on-forest); }
.ds-service__side .ds-muted { color: var(--ds-on-forest-muted); }
.ds-service__side-value { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; color: var(--ds-lime); }
.ds-service__body { padding-block: clamp(28px, 4vw, 48px) var(--ds-section); }
.ds-service .zo-service__grid { display: grid; gap: var(--ds-gap); grid-template-columns: minmax(0, 1fr); }
.ds-service .zo-service__grid + .zo-service__grid { margin-top: var(--ds-gap); }
@media (min-width: 768px) { .ds-service .zo-service__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds-service .zo-service__wide { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .ds-service .zo-service__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ds-service .zo-service__section { padding: clamp(20px, 2.4vw, 28px); background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); }
.ds-service .zo-service__section > * + * { margin-top: 10px; }
.ds-service .zo-service__section h2 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.ds-service .zo-service__section p, .ds-service .zo-service__section li { color: var(--ds-muted); line-height: 1.6; }
.ds-service .zo-service__section ul { display: grid; gap: 8px; padding-left: 1.2em; list-style: disc; }
.ds-service .zo-service__section li::marker { color: #7FAF55; }
.ds-service .zo-service__section a { color: var(--ds-lime-ink); text-decoration: underline; text-decoration-color: rgba(47,90,18,.3); }
.ds-service .zo-service__note { padding: 14px 16px; border-radius: var(--ds-r-sm); background: var(--ds-amber-wash); border: 1px solid #F3DFB8; color: #7A4700; }
.ds-service .zo-service__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ds-service .zo-service__section a.zo-service__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--ds-r-pill); font-weight: 600; text-decoration: none; border: 1px solid var(--ds-line); color: var(--ds-ink); }
.ds-service .zo-service__section a.zo-service__btn--primary { background: var(--ds-lime); border-color: var(--ds-lime); color: var(--ds-forest); }

/* 404 */
.ds-404__head { display: grid; justify-items: start; gap: 16px; padding-block: clamp(32px, 6vw, 72px) clamp(8px, 2vw, 16px); }
.ds-404__code { font-size: clamp(4rem, 2.5rem + 8vw, 8rem); font-weight: 600; line-height: .9; letter-spacing: -.05em; color: var(--ds-lime-ink); }
.ds-404__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ds-404__search { width: 100%; max-width: 480px; margin-top: 8px; }

/* ---------- Движение: только появление секций, один раз ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ds-reveal { animation: ds-rise 480ms var(--ds-ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes ds-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .ds *, .ds *::before, .ds *::after { transition-duration: 1ms !important; animation: none !important; }
}
