/* Фон на всю ширину экрана; размер калькулятора сохранён. */
.serg-buh-section {
    position: relative;
    left: 50%;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    margin: 0;
    padding: 64px 0;
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: 0;
    background-color: #f8fbff;
    background-image: url("fon/accounting-calculator-background.webp");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
.serg-buh-section > .serg-buh {
    margin: 0 auto;
}
@media (max-width: 1100px) {
    .serg-buh-section {
        padding-top: 44px;
        padding-bottom: 44px;
    }
}
@media (max-width: 760px) {
    .serg-buh-section {
        padding-top: 28px;
        padding-bottom: 28px;
    }
}

/* Единая панель калькулятора. Стили ограничены .serg-buh. */
.serg-buh {
    --buh-navy: #071f63;
    --buh-teal: #0b96c6;
    --buh-muted: #526785;
    --buh-line: #d5dfed;
    --buh-orange: #ff5725;
    --buh-action-bg: linear-gradient(110deg, #ff6425, #ff4522);
    --buh-space: 44px;
    /* Основной шрифт приходит из темы; для цифр можно задать --font-numbers в main.css. */
    --buh-font-numbers: var(--font-numbers, 'Times New Roman', Times, 'Liberation Serif', serif);
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin: 64px auto;
    padding: 0 20px;
    color: var(--buh-navy);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: 'lnum' 1, 'tnum' 1;
    container-name: serg-buh-calculator;
    container-type: inline-size;
}
.serg-buh *, .serg-buh *::before, .serg-buh *::after { box-sizing: border-box; }
.serg-buh [hidden] { display: none !important; }
.serg-buh .serg-buh__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.serg-buh__panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ccd9eb;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(21, 49, 88, .08);
}
.serg-buh .serg-buh__intro { margin: 0; padding: 34px var(--buh-space) 30px; }
.serg-buh .serg-buh__eyebrow {
    margin: 0 0 12px;
    color: var(--buh-teal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.serg-buh h2 {
    margin: 0 0 16px;
    color: var(--buh-navy);
    font-family: var(--font-heading, inherit);
    font-size: clamp(28px, 3.3vw, 42px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.015em;
}
.serg-buh h2 > span { display: block; }
.serg-buh .serg-buh__intro > p:last-child { margin: 0; color: var(--buh-muted); font-size: 18px; }
.serg-buh__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.serg-buh .serg-buh__form { min-width: 0; margin: 0; padding: 0 var(--buh-space) 28px; }
.serg-buh__wizard-progress { margin: 0 0 25px; padding: 0 0 25px; border-bottom: 1px solid var(--buh-line); }
.serg-buh .serg-buh__wizard-list { display: flex; align-items: center; gap: 18px; margin: 0; padding: 0; list-style: none; }
.serg-buh__wizard-item { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; margin: 0; padding: 0; }
.serg-buh__wizard-item::after { content: ''; flex: 1 1 16px; min-width: 12px; height: 1px; background: var(--buh-line); }
.serg-buh__wizard-item:last-child { flex-grow: 0; }
.serg-buh__wizard-item:last-child::after { display: none; }
.serg-buh__step {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #9bafc9;
    border-radius: 50%;
    background: #fff;
    color: #516589;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.serg-buh__wizard-label { position: relative; padding: 8px 0; color: var(--buh-muted); font-size: 14px; line-height: 1.3; white-space: nowrap; }
.serg-buh__label-short { display: none; }
.serg-buh__wizard-item.is-current .serg-buh__step { border-color: transparent; background: linear-gradient(135deg, #3d7d9b, #245187); color: #fff; }
.serg-buh__wizard-item.is-current .serg-buh__wizard-label { color: var(--buh-navy); font-weight: 700; }
.serg-buh__wizard-item.is-current .serg-buh__wizard-label::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--buh-teal); }
.serg-buh .serg-buh__card { min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.serg-buh__step-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 10px; }
.serg-buh .serg-buh__step-heading h3 { min-width: 0; margin: 0; color: var(--buh-navy); font-family: var(--font-heading, inherit); font-size: 26px; font-weight: 700; line-height: 1.25; }
.serg-buh__step-count { flex: 0 0 auto; color: var(--buh-muted); font-size: 13px; white-space: nowrap; }
.serg-buh .serg-buh__description { margin: 0 0 24px; color: var(--buh-muted); font-size: 15px; line-height: 1.5; }
.serg-buh__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.serg-buh__grid--business { grid-template-columns: 1.05fr 1.25fr .9fr; }
.serg-buh__field { min-width: 0; }
.serg-buh .serg-buh__field label { display: block; margin: 0 0 9px; color: var(--buh-navy); font-size: 14px; font-weight: 700; line-height: 1.4; }
.serg-buh .serg-buh__grid:not(.serg-buh__grid--business) label { min-height: 2.8em; }
.serg-buh .serg-buh__field input, .serg-buh .serg-buh__field select {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 54px;
    min-height: 54px;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid #b8cbe1;
    border-radius: 7px;
    background: #fff;
    box-shadow: none;
    color: var(--buh-navy);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    transition: border-color .15s, box-shadow .15s;
}
.serg-buh .serg-buh__field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23071f63' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.serg-buh .serg-buh__field input::placeholder { color: #6d7e91; opacity: 1; }
.serg-buh .serg-buh__field input:disabled, .serg-buh .serg-buh__field select:disabled { background-color: #f4f7fb; color: #657790; opacity: 1; cursor: not-allowed; }
.serg-buh .serg-buh__field [aria-invalid="true"] { border-color: #b33222; }
.serg-buh .serg-buh__field input:focus, .serg-buh .serg-buh__field select:focus { outline: 2px solid var(--buh-teal); outline-offset: 2px; border-color: var(--buh-teal); }
.serg-buh .serg-buh__field small { display: block; margin: 7px 0 0; color: var(--buh-muted); font-size: 12px; line-height: 1.4; }
.serg-buh__actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; }
.serg-buh .serg-buh__reset { width: auto; margin: 0; padding: 9px 0; border: 0; background: transparent; color: var(--buh-navy); box-shadow: none; font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.4; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.serg-buh .serg-buh__reset:hover { color: var(--buh-teal); background: transparent; }
.serg-buh__navigation { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.serg-buh .serg-buh__previous, .serg-buh .serg-buh__next { width: auto; min-height: 50px; margin: 0; padding: 12px 26px; border-radius: 7px; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.3; cursor: pointer; box-shadow: none; transition: background-color .15s, filter .15s; }
.serg-buh .serg-buh__previous { border: 1px solid #b8cbe1; color: var(--buh-navy); background: #fff; }
.serg-buh .serg-buh__previous::before { content: '← '; }
.serg-buh .serg-buh__next { min-width: 150px; border: 1px solid transparent; color: #fff; background: var(--buh-action-bg); }
.serg-buh .serg-buh__next::after { content: ' →'; }
.serg-buh .serg-buh__previous:hover { color: var(--buh-navy); background: #f4f7fb; }
.serg-buh .serg-buh__next:hover { color: #fff; filter: brightness(1.05); }
.serg-buh .serg-buh__step-error { margin: 20px 0 0; color: #a62b20; font-size: 14px; }
.serg-buh__card:focus, .serg-buh__summary:focus { outline: none; }
.serg-buh button:focus-visible, .serg-buh a:focus-visible, .serg-buh summary:focus-visible { outline: 2px solid var(--buh-teal); outline-offset: 4px; }
.serg-buh .serg-buh__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 34px;
    min-width: 0;
    margin: 0;
    padding: 30px var(--buh-space) 22px;
    border: 0;
    border-top: 3px solid var(--buh-teal);
    border-radius: 0;
    background: linear-gradient(135deg, #12a8d8 0%, #087fb2 100%);
    color: #fff;
    box-shadow: none;
}
.serg-buh__summary-main, .serg-buh__summary-info { min-width: 0; }
.serg-buh__summary-main { flex: .85 1 300px; }
.serg-buh__summary-info { flex: 1.35 1 440px; }
.serg-buh__summary-info { padding-left: 34px; border-left: 1px solid rgba(255, 255, 255, .24); }
.serg-buh .serg-buh__summary-label { margin: 0 0 13px; color: #fff; font-size: 17px; }
.serg-buh__price { margin: 0; overflow-wrap: anywhere; }
.serg-buh__price-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; font-size: clamp(36px, 4.2vw, 52px); font-weight: 700; line-height: 1.1; }
.serg-buh [data-total] { display: block; min-width: 0; max-width: 100%; color: #fff; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.serg-buh__currency { color: #fff; font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.serg-buh [data-total-unit] { display: block; margin-top: 5px; color: #e0ecf7; font-size: 17px; }
.serg-buh .serg-buh__status { margin: 14px 0 0; color: #fff; font-size: 14px; }
.serg-buh .serg-buh__breakdown { margin: 0; padding: 0; }
.serg-buh__breakdown > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 18px; margin: 0 0 11px; }
.serg-buh__breakdown > div:last-child { margin-bottom: 0; }
.serg-buh .serg-buh__breakdown dt { color: #fff; font-size: 14px; font-weight: 400; }
.serg-buh .serg-buh__breakdown dd { max-width: 180px; margin: 0; color: #fff; text-align: right; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.serg-buh__summary-foot { display: flex; flex: 0 0 100%; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; min-width: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .28); }
.serg-buh__summary-foot > .serg-buh__note { flex: 1 1 320px; }
.serg-buh .serg-buh__note { margin: 0; padding: 0; color: #fff; font-size: 12px; line-height: 1.5; }
.serg-buh .serg-buh__cta { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: center; width: auto; max-width: 100%; min-height: 50px; margin: 0; padding: 12px 26px; border: 1px solid transparent; border-radius: 7px; background: var(--buh-action-bg); color: #fff; box-shadow: none; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; transition: filter .15s; }
.serg-buh .serg-buh__cta:hover { color: #fff; background: var(--buh-action-bg); text-decoration: none; filter: brightness(1.05); }
/* Ровные цифры: одна высота и одинаковая ширина. Текстовые поля и подписи наследуют тему. */
.serg-buh .serg-buh__price-value,
.serg-buh .serg-buh__breakdown dd,
.serg-buh .serg-buh__field input[inputmode="numeric"],
.serg-buh .serg-buh__field input[inputmode="decimal"],
.serg-buh .serg-buh__step,
.serg-buh .serg-buh__step-count {
    font-family: var(--buh-font-numbers);
    font-variant-numeric: lining-nums tabular-nums;
    font-feature-settings: 'lnum' 1, 'tnum' 1;
}
@media (max-width: 1100px) {
    .serg-buh { --buh-space: 32px; }
    .serg-buh__wizard-item { gap: 8px; }
    .serg-buh .serg-buh__wizard-list { gap: 12px; }
    .serg-buh__wizard-label { font-size: 13px; }
    .serg-buh__wizard-item::after { min-width: 8px; }
    .serg-buh__grid--business { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .serg-buh__label-full { display: none; }
    .serg-buh__label-short { display: inline; }
    .serg-buh__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .serg-buh .serg-buh__summary { gap: 22px; }
    .serg-buh__summary-info { padding-left: 22px; }
}
@media (max-width: 760px) {
    .serg-buh { --buh-space: 22px; margin: 40px auto; padding: 0 16px; }
    .serg-buh__panel { border-radius: 18px; }
    .serg-buh .serg-buh__intro { padding-top: 26px; padding-bottom: 24px; }
    .serg-buh .serg-buh__intro > p:last-child { font-size: 16px; }
    .serg-buh .serg-buh__eyebrow { font-size: 10px; letter-spacing: .08em; }
    .serg-buh .serg-buh__wizard-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 8px; }
    .serg-buh__wizard-item { flex-direction: column; align-items: center; gap: 4px; }
    .serg-buh__wizard-item::after { display: none; }
    .serg-buh__step { flex-basis: 34px; width: 34px; height: 34px; font-size: 13px; }
    .serg-buh__wizard-label { width: 100%; padding: 5px 0 7px; font-size: 11px; text-align: center; white-space: normal; }
    .serg-buh__wizard-item.is-current .serg-buh__wizard-label::after { right: 10%; left: 10%; height: 2px; }
    .serg-buh__wizard-progress { padding-bottom: 20px; margin-bottom: 22px; }
    .serg-buh__step-heading { flex-direction: column; gap: 5px; margin-bottom: 10px; }
    .serg-buh .serg-buh__step-heading h3 { font-size: 23px; }
    .serg-buh__step-count { order: -1; font-size: 12px; }
    .serg-buh .serg-buh__description { font-size: 14px; margin-bottom: 20px; }
    .serg-buh__grid, .serg-buh__grid--business { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .serg-buh .serg-buh__grid:not(.serg-buh__grid--business) label { min-height: 0; }
    .serg-buh__actions { flex-wrap: wrap; gap: 16px; margin-top: 22px; }
    .serg-buh__navigation { width: 100%; order: -1; }
    .serg-buh .serg-buh__previous { padding-right: 18px; padding-left: 18px; }
    .serg-buh .serg-buh__next { flex: 1 1 auto; min-width: 0; }
    .serg-buh .serg-buh__summary { padding-top: 26px; }
    .serg-buh__summary-main, .serg-buh__summary-info { flex-basis: 100%; }
    .serg-buh__summary-info { padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .24); }
    .serg-buh__summary-foot { flex-direction: column; align-items: stretch; }
    .serg-buh__summary-foot > .serg-buh__note { flex: 0 0 auto; }
    .serg-buh .serg-buh__cta { width: 100%; }
    .serg-buh .serg-buh__breakdown dt, .serg-buh .serg-buh__breakdown dd { font-size: 13px; }
    .serg-buh .serg-buh__summary-label { font-size: 16px; }
    .serg-buh__price-value { font-size: 40px; }
}
@media (max-width: 360px) {
    .serg-buh { --buh-space: 16px; padding: 0 10px; }
    .serg-buh__wizard-label { font-size: 10px; }
    .serg-buh .serg-buh__step-heading h3 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    .serg-buh .serg-buh__field input, .serg-buh .serg-buh__field select,
    .serg-buh .serg-buh__previous, .serg-buh .serg-buh__next,
    .serg-buh .serg-buh__cta { transition: none; }
}
/* Та же адаптация, если секция размещена в узкой колонке широкой страницы. */
@container serg-buh-calculator (max-width: 900px) {
    .serg-buh__label-full { display: none; }
    .serg-buh__label-short { display: inline; }
    .serg-buh__grid, .serg-buh__grid--business { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container serg-buh-calculator (max-width: 760px) {
    .serg-buh__panel { --buh-space: 22px; }
    .serg-buh h2 { font-size: 28px; }
    .serg-buh .serg-buh__wizard-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 8px; }
    .serg-buh__wizard-item { flex-direction: column; align-items: center; gap: 4px; }
    .serg-buh__wizard-item::after { display: none; }
    .serg-buh__step { flex-basis: 34px; width: 34px; height: 34px; font-size: 13px; }
    .serg-buh__wizard-label { width: 100%; padding: 5px 0 7px; font-size: 11px; text-align: center; white-space: normal; }
    .serg-buh__step-heading { flex-direction: column; gap: 5px; }
    .serg-buh .serg-buh__step-heading h3 { font-size: 23px; }
    .serg-buh__step-count { order: -1; }
    .serg-buh__grid, .serg-buh__grid--business { grid-template-columns: minmax(0, 1fr); }
    .serg-buh .serg-buh__grid:not(.serg-buh__grid--business) label { min-height: 0; }
    .serg-buh__actions { flex-wrap: wrap; gap: 16px; }
    .serg-buh__navigation { width: 100%; order: -1; }
    .serg-buh .serg-buh__next { flex: 1 1 auto; min-width: 0; }
    .serg-buh__summary-main, .serg-buh__summary-info { flex-basis: 100%; }
    .serg-buh__summary-info { padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .24); }
    .serg-buh__summary-foot { flex-direction: column; align-items: stretch; }
    .serg-buh__summary-foot > .serg-buh__note { flex: 0 0 auto; }
    .serg-buh .serg-buh__cta { width: 100%; }
    .serg-buh__price-value { font-size: 40px; }
}
@container serg-buh-calculator (max-width: 360px) {
    .serg-buh__panel { --buh-space: 16px; }
    .serg-buh__wizard-label { font-size: 10px; }
}
