@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-cyrillic-400.woff2?v=69afad88a0') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'IBM Plex Wordmark'; src: url('fonts/ibm-plex-sans-cyrillic-700.woff2?v=40540598b4') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0400-045F;
}

@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-latin-ext-400.woff2?v=c93d2a12aa') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-latin-400.woff2?v=3b646991d3') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-cyrillic-500.woff2?v=200be3a2a6') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-latin-ext-500.woff2?v=2846035d85') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-latin-500.woff2?v=0717336fb3') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-cyrillic-600.woff2?v=730becc6f0') format('woff2');
  font-weight:600; font-style:normal; font-display:swap;
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-latin-ext-600.woff2?v=b25dfd4f97') format('woff2');
  font-weight:600; font-style:normal; font-display:swap;
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family:'IBM Plex Sans'; src:url('fonts/ibm-plex-sans-latin-600.woff2?v=8960851d69') format('woff2');
  font-weight:600; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2?v=08949f728d") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-cyrillic-400-normal.woff2?v=7635422bd1") format("woff2");
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2?v=01d2854474") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-cyrillic-500-normal.woff2?v=1d89462e86") format("woff2");
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2?v=0d1f0b8d07") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-mono-cyrillic-600-normal.woff2?v=2b05a8695c") format("woff2");
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@media screen {
  :root {
    --ink-secondary: #465369;
    --ink-open: #08145e;
  }

  .site-statistics:not([hidden]) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .site-statistics .button {
    width: min(100%, 11.5rem);
    min-height: 48px;
    padding: 6px 12px;
    font-size: .875rem;
  }

  :is(main, .content) :is(h1, h2, h3):not(.sheet *, .paper *) {
    letter-spacing: normal;
    line-height: 1.12;
  }
  :is(.case-hero .lead, .workspace .lead, .section-head > p, .anketa-head > p, .posle-head > p) {
    color: var(--ink-secondary);
    font-weight: 400;
    line-height: 1.6;
  }
  main details > summary:not(.sheet *, .paper *) {
    color: var(--ink);
    font-weight: 400;
    line-height: 1.5;
  }
  main details[open] > summary:not(.sheet *, .paper *) { color: var(--ink-open); }
  main details[open] > summary:not(.sheet *, .paper *)::marker { color: var(--accent); }
  .step .when { font-family: var(--control-font); }
  .desk-head > span { font-family: var(--control-font); }
  main :is(label.choice, label.choice strong) { font-weight: 400; }
  .memo .design-link, .posle-link a, .posle .goto { font-weight: 400; }

  /* Даты и реквизиты в интерфейсе. */
  :is(.ui-data, .step > .n,
      #q-step-label, #b-route-step-label, #b-doc-step-label,
      .date-control input[data-date], main input[type="date"]):not(.sheet *, .paper *):not(:where(.article-prose :is(h1, h2, h3) *)) {
    font-family: var(--font-mono);
    letter-spacing: normal;
    overflow-wrap: anywhere;
  }
  :is(.ui-money, .paybox-price b, .result .amount, .amount-summary .big) {
    font-family: var(--control-font);
    letter-spacing: normal;
  }
  :is(.paybox-price b, .result .amount, .amount-summary .big, .footer-prices strong.ui-money) { font-weight: 500; }
  :is(.ui-money, .ui-date, .site-section-price, .paybox-pay) { white-space: nowrap; }
  .calc-result .answer .big { container-type: inline-size; }
  /* В самом длинном русском формате даты 16 знаков. */
  .calc-result .answer .big .ui-date { font-size: min(clamp(32px, 3.5vw, 50px), 10cqi); }
  .result .amount { container-type: inline-size; }
  .result .amount .ui-money-long { font-size: min(1em, 7cqi); }
  @media (max-width: 37rem) {
    .amount-summary .big { container-type: inline-size; }
    .amount-summary .big .ui-money-long { font-size: min(1em, 7cqi); }
  }

  .home-page {
    --home-frame-width: min(1280px, 100%);
    --home-frame-gutter: clamp(16px, 5vw, 72px);
    --site-shell-width: calc(var(--home-frame-width) - 2 * var(--home-frame-gutter));
  }
  .site-shell {
    --header-control-width: 14rem;
    --header-control-height: 3rem;
    --header-end-padding: 10px;
    position: relative;
    z-index: 8;
    display: grid;
    gap: 12px;
    width: var(--site-shell-width, min(64rem, calc(100% - 32px)));
    margin: 16px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .site-topbar {
    --header-brand-size: clamp(1.625rem, 5vw - 11px, 3rem);
    --header-brand-gap: 8px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 6px var(--header-end-padding) 6px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
    font-family: var(--control-font);
  }
  .site-brand {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-content: center;
    align-items: center;
    gap: 3px var(--header-brand-gap);
    margin-inline-end: auto;
    min-height: 48px;
    font-size: var(--header-brand-size);
    line-height: 1.1;
    text-decoration: none;
    color: var(--accent);
  }
  .site-brand, .compact-footer__brand {
    --mark-base: #163d8a;
    --mark-facet: #1d609d;
    --mark-nib: #c4e7df;
    --mark-cut: #163d8a;
    --wordmark-middle: #546278;
  }
  .compact-footer__brand {
    --mark-base: #b6e4d3;
    --mark-facet: #87bed1;
    --mark-nib: #151f36;
    --mark-cut: #b6e4d3;
    --wordmark-middle: #b8c5d6;
  }
  .site-mark__base { fill: var(--mark-base); }
  .site-mark__facet { fill: var(--mark-facet); }
  .site-mark__nib { fill: var(--mark-nib); }
  .site-mark__cut { fill: none; stroke: var(--mark-cut); stroke-width: 1.6; }
  .site-mark__counter { fill: var(--mark-cut); }
  .site-brand .site-mark { width: 1em; height: 1em; }
  .site-wordmark {
    font: 700 1em/1 'IBM Plex Wordmark', var(--control-font);
    font-synthesis: none;
    letter-spacing: -.05em;
    white-space: nowrap;
  }
  .site-wordmark__middle { color: var(--wordmark-middle); font-family: var(--control-font); font-weight: 400; }
  .compact-footer__brand .site-wordmark { letter-spacing: -.06em; }
  .site-brand__copy { display: contents; }
  .site-brand__descriptor { color: var(--ink-2); font: 400 .875rem/1.35 var(--control-font); }
  .site-brand .site-brand__descriptor { grid-column: 2; }
  .site-brand__descriptor--mobile { display: none; }
  .site-local {
    margin: 0;
    color: var(--ink-2);
    font-size: .875rem;
  }
  .site-actions {
    justify-self: end;
    margin-inline-end: calc(var(--header-end-padding) + 1px);
  }
  .site-sections { margin: 0; }
  .site-topbar > .site-sections { flex: 0 0 var(--header-control-width); }
  .site-shell :is(.site-sections, .header-tools) > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: var(--header-control-width);
    min-height: var(--header-control-height);
    padding: 4px 8px;
    font-family: var(--control-font);
    font-size: .875rem;
    line-height: 1.25;
  }
  .site-sections summary {
    box-sizing: border-box;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    list-style: none;
  }
  .site-sections summary::-webkit-details-marker { display: none; }
  .site-sections summary svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
  }
  .site-sections[open] summary { background: var(--accent); color: #fff; border-color: var(--accent); }
  .site-sections nav {
    position: absolute;
    z-index: 6;
    inset: calc(100% + 8px) 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: min(70vh, 640px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .site-section-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    min-height: 56px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--accent-soft);
    text-decoration: none;
    line-height: 1.25;
  }
  .site-section-link :is(strong, small) { display: block; overflow-wrap: anywhere; }
  .site-section-link strong { font-weight: 500; }
  .site-section-link small { margin-top: 4px; color: var(--ink-2); font-size: .8125rem; line-height: 1.5; }
  .site-section-link[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
  .site-section-link[aria-current="page"] :is(small, .site-section-price) { color: inherit; }
  .site-section-link:hover:not([aria-current="page"]), .service-tile:hover { border-color: var(--accent); }
  .site-actions .header-tools { -webkit-tap-highlight-color: #245f4d24; }
  .header-tools:not([open]) > summary,
  .header-tools .file-action,
  .service-page button:is([data-save]:not(.save-for-later), [data-import], [data-recover], [data-access-save]),
  #draft-form button[type="submit"] {
    -webkit-tap-highlight-color: #245f4d24;
    --active-button-face: linear-gradient(180deg, #e5f5ef 0%, #d4ebe2 100%);
    --active-button-rim: linear-gradient(135deg, #9ac7b7, #f2fbf6 42%, #8ebcaa);
    --active-button-ink: #174d40;
    --active-button-hover-ink: var(--accent);
    --active-button-shadow: inset 0 1px 0 #ffffffa6, 0 3px 8px #245f4d24;
    --active-button-hover-shadow: inset 0 1px 0 #ffffffbb, 0 4px 10px #245f4d36;
  }
  .header-tools .file-action span {
    font: 400 .8125rem/1.35 var(--font-mono);
    color: inherit;
  }

  .case-hero { padding-block: clamp(34px, 5.5vw, 84px) clamp(30px, 5vw, 72px); }
  .wrap.case-hero__layout {
    width: var(--home-frame-width);
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4.5vw, 72px);
    padding-inline: var(--home-frame-gutter);
  }
  .site-label, .site-section-price, .case-row small {
    font: 500 .75rem/1.25 var(--font-mono);
    letter-spacing: .055em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .site-label {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--accent-soft);
  }
  .case-hero h1 {
    margin: 16px 0;
    font-size: clamp(3.15rem, 6vw, 5.1rem);
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.02;
    color: var(--ink);
  }
  .case-hero .lead { max-width: 39ch; margin: 0; font-size: clamp(1rem, 1.65vw, 1.25rem); }
  .case-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    margin-top: 24px;
  }
  .case-hero__actions > :is(a, button) { width: 100%; min-height: 56px; padding-inline: 12px; white-space: normal; }
  .case-hero__scope { margin: 14px 0 0; max-width: 54ch; color: var(--ink-2); font-size: .875rem; }
  .case-palette {
    min-width: 0;
    padding: clamp(12px, 2.1vw, 28px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--glass);
    box-shadow: var(--shadow);
  }
  .case-palette h2 { margin: 0 0 14px; color: var(--ink); font-size: clamp(1.23rem, 2.2vw, 1.65rem); }
  .case-palette ul { display: grid; grid-auto-rows: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .case-palette li { display: grid; min-width: 0; }
  .case-guide-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel, #fff);
    color: var(--ink);
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
  }
  .case-guide-link > [aria-hidden] { color: var(--accent); }
  .case-guide-link:hover { border-color: var(--accent); color: var(--accent); }
  .case-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.45;
    text-decoration: none;
  }
  .case-row--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  .case-row > span { font-weight: 600; }
  .case-row small {
    min-width: 0;
    color: var(--case-label-ink, var(--accent));
    overflow-wrap: anywhere;
  }
  @media (min-width: 34rem) {
    .case-palette ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  .wrap.service-directory { width: min(1280px, 100%); padding-block: clamp(32px, 6vw, 88px); }
  .service-directory > h2 { margin: 0 0 22px; font-size: clamp(2rem, 4vw, 3.4rem); }
  .service-directory__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 14px;
  }
  .service-tile {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
  }
  .service-tile h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
  .service-tile p { color: var(--ink-2); }
  .service-tile > span { color: var(--accent); font-weight: 400; }
  .band .path { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-left: 48px; }
  .band .step { position: relative; }
  .band .step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 18px;
    bottom: -32px;
    left: -31px;
    border-left: 1px solid var(--line);
  }
  .band .step .n {
    position: absolute;
    top: 14px;
    left: -49px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--accent-soft);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }
  .wrap.pay-result, .legal { max-width: 74ch; margin-inline: auto; }

  @media (max-width: 52rem) {
    .service-directory__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 63.99rem) {
    .home-page { --home-frame-gutter: 16px; }
    .wrap.case-hero__layout { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 46rem) {
    .site-topbar {
      --header-brand-size: clamp(.90625rem, 4.5vw, 1.75rem);
      --header-brand-gap: 5px;
      --header-control-width: 6.5rem;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 0 8px;
    }
    .site-topbar .site-local {
      grid-row: 3; grid-column: 1 / -1; padding-bottom: 1px; font-size: .75rem; font-style: italic;
    }
    .site-brand__copy .site-brand__descriptor { display: none; }
    .site-brand__descriptor--mobile {
      display: block; grid-column: 1 / -1; grid-row: 2; margin: 4px 0 2px;
    }
    .site-topbar :is(.site-local, .site-brand__descriptor--mobile) {
      padding-inline-start: calc(var(--header-brand-size) + var(--header-brand-gap));
    }
    .site-sections nav {
      box-sizing: border-box;
      inset: calc(100% + 8px) -16px auto;
      grid-template-columns: minmax(0, 1fr);
      grid-auto-rows: max-content;
      align-content: start;
      height: var(--sections-available-height, 60vh);
      max-height: none;
      border-radius: 0;
    }
  }
  @media (max-width: 33rem) {
    .case-hero h1 { max-width: 12ch; font-size: clamp(2.7rem, 10.5vw, 3.5rem); }
    .case-hero__actions { margin-top: 16px; }
    .case-hero__actions > :is(a, button) { line-height: 1.25; }
    .case-palette h2 { margin-bottom: 10px; }
    .case-row { min-height: 48px; padding-inline: 10px; }
    .service-directory__grid { grid-template-columns: minmax(0, 1fr); }
  }
}

@media print {
  .site-shell, .site-statistics { display: none !important; }
}

@media screen {
  /* Поверхности из одобренного образца. Типографику задают стили компонентов. */
  :root {
    --idle-button-face: linear-gradient(180deg, #ffffff 0%, #f6f8fc 46%, #e9eef6 100%);
    --idle-button-rim: conic-gradient(from 25deg, #b8c2d6, #ffffff 12%, #cbd6ee 23%, #aeb8cc 38%, #f5f7fb 53%, #b3bfdc 70%, #ffffff 83%, #b8c2d6);
    --idle-button-shadow: inset 0 1px 0 #ffffff, 0 3px 7px #17203910, 0 1px 2px #17203914;
    --idle-button-hover-shadow: inset 0 1px 0 #fff, 0 4px 10px #193e9c1f, 0 1px 3px #17203914;
    --blue-button-face: linear-gradient(180deg, #2f58c9 0%, #1d45ae 48%, #14348a 100%);
    --blue-button-rim: conic-gradient(from 25deg, #7f98e0, #ffffff 12%, #9fb2ec 30%, #2a4fb8 48%, #dbe3fb 70%, #ffffff 83%, #7f98e0);
  }
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ) {
    --button-face: var(--idle-button-face);
    --button-rim: var(--idle-button-rim);
    --button-shadow: var(--idle-button-shadow);
    --button-hover-shadow: var(--idle-button-hover-shadow);
    --button-ink: var(--ink);
    --button-hover-ink: var(--accent);
    border: 1.5px solid transparent;
    background: var(--button-face) padding-box, var(--button-rim) border-box;
    box-shadow: var(--button-shadow);
    color: var(--button-ink);
    filter: none;
    transition: var(--button-transition, color .18s, box-shadow .18s, transform .18s);
  }
  /* Без вложенного CSS (&): его не понимают iOS до 16.5 и Chrome до 112, а у нас много старых телефонов.
     Каждое правило ниже начинается с того же списка кнопок, что и правило выше. */
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ):is(.cta, .btn.primary, .button:not(.secondary), .posle .card .act,
      .file-action, [data-save], [data-import], [data-recover], [data-access-save],
      [aria-current="page"], [aria-current="step"], [aria-pressed="true"],
      [aria-selected="true"], .case-row, .day:is(.last, .today),
      .site-sections[open] > summary, .header-tools > summary,
      .task-head[aria-expanded="true"], label:has(> input:checked)) {
    --button-face: var(--active-button-face, var(--blue-button-face));
    --button-rim: var(--active-button-rim, var(--blue-button-rim));
    --button-shadow: var(--active-button-shadow, inset 0 1px 0 #ffffff59, 0 3px 8px #193e9c33, 0 1px 2px #17203914);
    --button-hover-shadow: var(--active-button-hover-shadow, inset 0 1px 0 #ffffff80, 0 4px 12px #193e9c4d);
    --button-ink: var(--active-button-ink, #fff);
    --button-hover-ink: var(--active-button-hover-ink, var(--button-ink));
  }
  .case-palette {
    --active-button-face: var(--idle-button-face);
    --active-button-rim: var(--idle-button-rim);
    --active-button-shadow: var(--idle-button-shadow);
    --active-button-hover-shadow: var(--idle-button-hover-shadow);
    --active-button-ink: var(--ink);
  }
  /* При движении мыши выделение следует за курсором, при навигации с клавиатуры — за фокусом. */
  .case-palette .case-row:focus-visible,
  .case-palette:not(:where(:has(.case-row:focus-visible))) .case-row--primary {
    --active-button-face: var(--case-highlight-face, var(--blue-button-face));
    --active-button-rim: var(--case-highlight-rim, var(--blue-button-rim));
    --active-button-shadow: initial;
    --active-button-hover-shadow: initial;
    --active-button-ink: initial;
    --case-highlight-opacity: 1;
    --case-label-ink: var(--button-ink);
  }
  @media (hover: hover) {
    .case-palette:has(.case-row:hover) .case-row:not(:hover) {
      --active-button-face: inherit;
      --active-button-rim: inherit;
      --active-button-shadow: inherit;
      --active-button-hover-shadow: inherit;
      --active-button-ink: inherit;
      --case-highlight-opacity: 0;
      --case-label-ink: initial;
    }
    .case-palette .case-row:hover {
      --active-button-face: var(--case-highlight-face, var(--blue-button-face));
      --active-button-rim: var(--case-highlight-rim, var(--blue-button-rim));
      --active-button-shadow: initial;
      --active-button-hover-shadow: initial;
      --active-button-ink: initial;
      --case-highlight-opacity: 1;
      --case-label-ink: var(--button-ink);
    }
  }
  @media (hover: hover) and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
    /* Градиенты переключаются скачком. Плавно меняем прозрачность синей поверхности. */
    .case-palette {
      --case-highlight-face: var(--idle-button-face);
      --case-highlight-rim: var(--idle-button-rim);
    }
    .case-palette .case-row {
      --case-fade-duration: .24s;
      --case-fade-delay: 0s;
      --case-ink-transition: color var(--case-fade-duration) steps(2, jump-none) var(--case-fade-delay);
      --button-transition: var(--case-ink-transition), box-shadow var(--case-fade-duration) ease-in-out var(--case-fade-delay);
      position: relative;
      isolation: isolate;
    }
    /* Короткая пауза гасит вспышку первой карточки при пересечении промежутка. */
    .case-palette:not(:has(.case-row:is(:hover, :focus-visible))) .case-row--primary { --case-fade-delay: .09s; }
    .case-palette .case-row::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: -1.5px;
      border: 1.5px solid transparent;
      border-radius: inherit;
      background: var(--blue-button-face) padding-box, var(--blue-button-rim) border-box;
      opacity: var(--case-highlight-opacity, 0);
      transition: opacity var(--case-fade-duration) ease-in-out var(--case-fade-delay);
      pointer-events: none;
    }
    .case-palette .case-row small { transition: var(--case-ink-transition); }
  }
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ).day:not(.w, .today, .last) {
    --button-face: linear-gradient(180deg, #f0f3f8, #e6ecf7);
    --button-ink: var(--ink-2);
  }
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ):not(.day):has(> input:checked) :is(span, strong, small, b),
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  )[aria-expanded="true"].task-head :is(.task-status, .caption, .task-summary) { color: inherit; }

  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    body :is(
      button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
      a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
      .site-sections > summary, .header-tools > summary, .day,
      label:has(> input:is([type="radio"], [type="checkbox"])),
      .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
    ):not(.case-row, .day, :disabled, [aria-disabled="true"], label:has(> input:disabled)):hover {
      color: var(--button-hover-ink);
      box-shadow: var(--button-hover-shadow);
      transform: translateY(-1px);
    }
    body :is(
      button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
      a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
      .site-sections > summary, .header-tools > summary, .day,
      label:has(> input:is([type="radio"], [type="checkbox"])),
      .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
    ):not(.day):active { transform: none; }
  }
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ):is(:disabled, [aria-disabled="true"], label:has(> input:disabled)) {
    border-color: #c1cbdd;
    background: #e8edf6;
    box-shadow: none;
    color: #55647e;
    cursor: default;
    opacity: 1;
  }
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ):focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
  /* Отдельным правилом: без поддержки :has браузер отбросил бы и фокус кнопок выше. */
  body :is(
    button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
    a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
    .site-sections > summary, .header-tools > summary, .day,
    label:has(> input:is([type="radio"], [type="checkbox"])),
    .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
  ):has(> input:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
  @media (prefers-reduced-motion: reduce) {
    body :is(
      button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
      a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
      .site-sections > summary, .header-tools > summary, .day,
      label:has(> input:is([type="radio"], [type="checkbox"])),
      .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
    ) { transition: none; }
  }
  @media (forced-colors: active) {
    body :is(
      button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
      a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
      .site-sections > summary, .header-tools > summary, .day,
      label:has(> input:is([type="radio"], [type="checkbox"])),
      .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
    ) { border-color: ButtonText; }
    body :is(
      button:not(.instruction-link, .validation-jump, p .inline-link, .sheet *, .paper *),
      a:is(.cta, .btn, .button, .doc-link, .site-section-link, .case-row, .service-tile),
      .site-sections > summary, .header-tools > summary, .day,
      label:has(> input:is([type="radio"], [type="checkbox"])),
      .posle fieldset label.opt:has(> input:is([type="radio"], [type="checkbox"]))
    ):is(:disabled, [aria-disabled="true"]) { border-color: GrayText; }
  }

  :is(.actions, .nav, .start-actions, .result-actions, .dialog-actions,
      .page-actions, .pay-actions, .paybox-actions, .debt-actions),
  :is(.pay-actions, .paybox-actions):has(> :nth-child(2)),
  .workspace :is(.result-actions, .start-actions, .debt-actions, .page-actions),
  #modal :is(.result-actions, .dialog-actions, .footer-links, .document-downloads, .creditor-options) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    max-width: none;
    gap: 8px;
  }
  body :is(main, dialog, .workspace) :is(.actions, .nav, .start-actions, .result-actions, .dialog-actions,
      .page-actions, .pay-actions, .paybox-actions, .debt-actions, .case-hero__actions) > :is(button, a),
  :is(#cta-box, #b-doc-review, #b-promo-downloads, .panel, .purchase, .task-body, .paybox, .pay-result,
      #result-area, #restoration-actions, #pay-stub, .fee-resources) > :is(.cta, .btn, .button),
  .posle .card > :is(.act, .alt),
  #modal :is(.result-actions, .dialog-actions, .footer-links, .document-downloads, .creditor-options) > :is(button, a) {
    width: 100%;
    min-height: 56px;
    margin-inline: 0;
    padding-block: 4px;
    border-radius: 10px;
  }
  .debt-actions button { margin-block: 0; }
  .site-actions .file-tools {
    right: calc(-1px - var(--header-end-padding));
    width: calc(var(--header-control-width) + 2 * (var(--header-end-padding) + 1px));
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: 6px;
    padding: 10px;
  }
  .site-actions .file-tools > .file-action {
    min-height: var(--header-control-height);
    gap: 2px;
    padding: 3px 8px;
    font-size: .9375rem;
    line-height: 1.2;
  }
  .case-hero__actions, .paybox { gap: 8px; }
  #cta-box { display: grid; gap: 8px; }
}

@media screen {
  body main .document-delivery-actions:has(> button:not([hidden]) ~ button:not([hidden])) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    grid-auto-rows: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  body main .document-delivery-actions:has(> button:not([hidden]) ~ button:not([hidden])) > button { width: 100%; }
  .document-review { margin: 8px 0; font-size: .875rem; line-height: 1.5; }
  .document-review > a { color: #a31375; font-weight: 600; text-decoration: underline; text-underline-offset: .15em; }
}
@media print { .document-review { display: none !important; } }

@media screen and (max-width: 46rem) {
  .site-topbar { --header-brand-size: clamp(1.0625rem, 5.25vw, 1.75rem); }
  .site-topbar > #site-sections > summary {
    width: 82px;
    min-height: 44px;
    padding-inline: 8px 4px;
    gap: 3px;
    font-size: .8125rem;
    overflow-wrap: normal;
    white-space: nowrap;
    position: relative;
    isolation: isolate;
    border: 0;
    border-radius: 999px;
    background: none;
    box-shadow: none;
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  /* Видимая плашка 32px, область нажатия 44px. */
  .site-topbar > #site-sections > summary::before {
    content: '';
    position: absolute;
    inset: 6px 0;
    z-index: -1;
    border: 1.5px solid transparent;
    border-radius: inherit;
    background: var(--idle-button-face) padding-box, var(--idle-button-rim) border-box;
    box-shadow: var(--idle-button-shadow);
    pointer-events: none;
  }
  .site-topbar > #site-sections > summary svg { flex: none; width: 12px; height: 12px; }
}

@media screen and (max-width: 46rem) and (forced-colors: active) {
  .site-topbar > #site-sections > summary { -webkit-tap-highlight-color: revert; }
  .site-topbar > #site-sections > summary::before { border-color: ButtonText; }
}
