/* Калькулятор декретного отпуска на макете редизайна. Разметка, id и подписи прежние, скрипт
   public/js/finansovie/dekretnyy-otpusk.js не менялся. Файл грузится раньше rd.css, поэтому
   селекторы начинаются с .rd #do-calc.
   redesign.css сбрасывает всем input оформление (all: unset) — радио, чекбокс и поля
   нарисованы здесь заново. Скрипт сам ставит style.display у #do-vac-wrap, поэтому отступ
   до него — через margin. Пошаговая форма повторяет больничный (rd-bolnichnyj.css). */

.rd #do-calc .calculator { display: flex; flex-direction: column; gap: 24px; margin: 0; }

/* шаги: точки в ряд, между ними линия; полосу прогресса макет не рисует */
.rd #do-calc .do-progress { margin: 0; }
.rd #do-calc .do-progress-track { display: none; }
.rd #do-calc .do-dots { display: flex; align-items: center; gap: 12px; margin: 0; }
.rd #do-calc .do-dot { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; font: 400 13px/1.2 var(--f-ui); color: var(--mute); white-space: nowrap; cursor: pointer; }
.rd #do-calc .do-dot:not(:first-child) { flex: 1 1 0; }
.rd #do-calc .do-dot:not(:first-child)::before { content: ""; flex: 1 1 auto; min-width: 12px; height: 1px; margin-right: 4px; background: var(--line); }
.rd #do-calc .do-dot span { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--pill); font: 600 12px/1 var(--f-ui); color: var(--mute); }
.rd #do-calc .do-dot:hover { color: var(--ink); }
.rd #do-calc .do-dot.cur { font-weight: 500; color: var(--ink); }
.rd #do-calc .do-dot.cur span { background: var(--ink); color: #fff; }
.rd #do-calc .do-dot.done { color: var(--ink); }
.rd #do-calc .do-dot.done span { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; color: transparent; }
.rd #do-calc .do-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.rd #do-calc .do-step { display: none; margin: 0; }
.rd #do-calc .do-step.active { display: flex; flex-direction: column; gap: 14px; }
.rd #do-calc .do-step > .label-text { display: block; margin: 0; font: 600 18px/1.3 var(--f-ui); color: var(--ink); }

/* что известно о сроке: три плитки в ряд */
.rd #do-calc .do-radio-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rd #do-calc .do-radio { display: flex; align-items: flex-start; gap: 12px; min-width: 0; box-sizing: border-box; margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--tile); cursor: pointer; transition: border-color .15s; }
.rd #do-calc .do-radio:hover { border-color: var(--accent-mid); }
.rd #do-calc .do-radio:has(input:checked) { border-color: var(--accent); }
.rd #do-calc .do-radio input { display: block; -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; border: 1.5px solid var(--mute); border-radius: 50%; background: var(--tile); cursor: pointer; }
.rd #do-calc .do-radio input:checked { border-color: var(--accent); background: radial-gradient(circle, #fff 0 3.5px, var(--accent) 4px); }
.rd #do-calc .do-radio input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd #do-calc .do-radio > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; font: 500 15px/1.35 var(--f-ui); color: var(--ink); }
.rd #do-calc .do-radio small { display: block; font: 400 13px/1.4 var(--f-ui); color: var(--mute); }

.rd #do-calc .do-mode { display: none; margin: 0; }
.rd #do-calc .do-mode.on { display: block; }
.rd #do-calc .do-now { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--tile); font: 400 14px/1.5 var(--f-ui); color: var(--ink); }
.rd #do-calc .do-now:empty { display: none; }

/* поля */
.rd #do-calc .form-group__wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin: 0; }
.rd #do-calc .form-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: calc(50% - 8px); margin: 0; }
.rd #do-calc .form-group__wrapper > .form-group { max-width: none; }
.rd #do-calc .form-group label { margin: 0; font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); }
.rd #do-calc .form-group input { display: block; -webkit-appearance: none; appearance: none; -moz-appearance: textfield; box-sizing: border-box; width: 100%; height: 48px; margin: 0; padding: 0 16px; background: var(--tile); border: 1px solid var(--line); border-radius: 14px; box-shadow: none; outline: none; font: 500 16px/46px var(--f-ui); color: var(--ink); }
.rd #do-calc .form-group input::-webkit-outer-spin-button,
.rd #do-calc .form-group input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rd #do-calc .form-group input::-webkit-date-and-time-value { text-align: left; }
.rd #do-calc .form-group input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.rd #do-calc .form-group input:focus { border-color: var(--accent); }

/* галочки плашками, как на зарплате */
.rd #do-calc .do-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--tile); font: 400 14px/1.45 var(--f-ui); color: var(--ink); cursor: pointer; transition: border-color .15s; }
.rd #do-calc .do-check:hover { border-color: var(--accent-mid); }
.rd #do-calc .do-check:has(input:checked) { border-color: var(--accent); }
.rd #do-calc .do-check input { display: block; -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; border: 1.5px solid var(--mute); border-radius: 5px; background: var(--tile); cursor: pointer; }
.rd #do-calc .do-check input:checked { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.rd #do-calc .do-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rd #do-calc #do-vac-wrap { margin: 0; }
.rd #do-calc .do-hint { display: block; margin: 0; font: 400 13px/1.5 var(--f-ui); color: var(--mute); opacity: 1; }

/* навигация по шагам */
.rd #do-calc .do-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.rd #do-calc #do-back { display: inline-flex; align-items: center; justify-content: center; height: 44px; margin: 0; padding: 0 24px; border: 0; border-radius: 999px; background: var(--pill); font: 400 13px/1.2 var(--f-ui); color: var(--ink); white-space: nowrap; cursor: pointer; }
.rd #do-calc #do-back:disabled { opacity: .5; cursor: default; }
.rd #do-calc .do-step-label { margin: 0; font: 400 11px/1.3 var(--f-mono); letter-spacing: 1px; color: var(--mute); text-align: center; }
.rd #do-calc #do-next { display: inline-flex; align-items: center; justify-content: center; height: 46px; margin: 0; padding: 0 28px; border: 0; border-radius: 999px; background: var(--ink); font: 500 15px/1.2 var(--f-ui); color: #fff; white-space: nowrap; cursor: pointer; }
.rd #do-calc #do-back:not(:disabled):hover,
.rd #do-calc #do-next:hover { opacity: .85; }

/* результат: дата ухода крупно, строки, плитки ухода за ребёнком, хронология */
.rd #do-calc #do-result { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 28px; border-radius: 20px; background: var(--tile); }
.rd #do-calc .tax-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rd #do-calc .tax-result > span { min-width: 0; font: 400 15px/1.35 var(--f-ui); color: var(--mute); }
.rd #do-calc .tax-result .amount-group { flex: 0 0 auto; max-width: 60%; margin: 0; text-align: right; }
.rd #do-calc .tax-result .amount-group span { font: 600 17px/1.3 var(--f-ui); letter-spacing: -.2px; color: var(--ink); }
.rd #do-calc .tax-result.do-main { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 0 18px; }
.rd #do-calc .do-main > span { display: flex; flex-direction: column; gap: 2px; font-weight: 600; color: var(--ink); }
.rd #do-calc .do-main small { display: block; font: 400 13px/1.4 var(--f-ui); color: var(--mute); }
.rd #do-calc .do-main .amount-group { max-width: none; text-align: left; }
.rd #do-calc .do-main .amount-group span { font-size: 34px; line-height: 1.1; letter-spacing: -1px; }

.rd #do-calc .do-note { margin: 20px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--card); font: 400 14px/1.5 var(--f-ui); color: var(--ink); }
.rd #do-calc .do-note:empty { display: none; }
.rd #do-calc .do-note.ok { background: #E3F2EA; }
.rd #do-calc .do-note.warn { background: #FBF0E0; color: #92400E; }

.rd #do-calc .do-extra { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; border: 0; }
.rd #do-calc .do-extra > div { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; padding: 18px; border-radius: 16px; background: var(--card); }
.rd #do-calc .do-extra span { font: 400 13px/1.4 var(--f-ui); color: var(--mute); }
.rd #do-calc .do-extra b { font: 600 18px/1.25 var(--f-ui); letter-spacing: -.3px; color: var(--ink); }

/* хронология: вертикальная линия, ключевые даты залиты */
.rd #do-calc .do-line { list-style: none; margin: 24px 0 0; padding: 0 0 0 8px; }
.rd #do-calc .do-line:empty { display: none; }
.rd #do-calc .do-line li { position: relative; margin: 0; padding: 0 0 16px 22px; border-left: 1px solid var(--line); }
.rd #do-calc .do-line li:last-child { padding-bottom: 0; border-left-color: transparent; }
.rd #do-calc .do-line li::before { content: ""; position: absolute; left: -6px; top: 3px; box-sizing: border-box; width: 11px; height: 11px; border: 1.5px solid var(--mute); border-radius: 50%; background: var(--tile); }
.rd #do-calc .do-line li.key::before { border-color: var(--accent); background: var(--accent); }
.rd #do-calc .do-line li.past { opacity: .5; }
.rd #do-calc .do-line b { display: block; font: 600 14px/1.4 var(--f-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.rd #do-calc .do-line span { display: block; margin-top: 2px; font: 400 13px/1.45 var(--f-ui); color: var(--mute); }

.rd #do-calc .do-how { margin: 24px 0 0; padding: 14px 20px; border-radius: 14px; background: var(--card); }
.rd #do-calc .do-how summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; font: 500 14px/1.4 var(--f-ui); color: var(--ink); cursor: pointer; }
.rd #do-calc .do-how summary::-webkit-details-marker { display: none; }
.rd #do-calc .do-how summary::before { content: none; }
.rd #do-calc .do-how summary::after { content: ""; flex: 0 0 18px; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D0D0D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat; transition: transform .15s; }
.rd #do-calc .do-how[open] summary::after { transform: rotate(180deg); }
.rd #do-calc .do-how ol { margin: 12px 0 0; padding: 0 0 0 22px; list-style: decimal outside; font: 400 14px/1.55 var(--f-ui); color: var(--ink); }
.rd #do-calc .do-how li::marker { font-family: var(--f-mono); font-size: 12px; color: var(--mute); }
.rd #do-calc .do-how li { margin: 0; padding: 0; }
.rd #do-calc .do-how li + li { margin-top: 8px; }
.rd #do-calc .do-how li::before { content: none; }
.rd #do-calc .do-how-h { display: block; font-weight: 600; }
.rd #do-calc .do-how-b { display: block; font-variant-numeric: tabular-nums; }
.rd #do-calc .do-how b { font-weight: 600; }

@media (max-width: 1100px) {
    .rd #do-calc .do-radio-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 639px) {
    .rd #do-calc .calculator { gap: 20px; }
    .rd #do-calc .do-dots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .rd #do-calc .do-dot { flex-direction: column; gap: 6px; font-size: 12px; white-space: normal; text-align: center; }
    .rd #do-calc .do-dot:not(:first-child)::before { display: none; }
    .rd #do-calc .do-dot.cur { font-weight: 600; }
    .rd #do-calc .do-step > .label-text { font-size: 17px; }
    .rd #do-calc .form-group { max-width: none; }
    .rd #do-calc .form-group__wrapper { gap: 12px; }
    .rd #do-calc #do-back { height: 42px; padding: 0 18px; font-size: 14px; }
    .rd #do-calc #do-next { height: 44px; padding: 0 22px; font-size: 14px; }
    .rd #do-calc #do-result { padding: 18px 16px; }
    .rd #do-calc .tax-result { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 0; }
    .rd #do-calc .tax-result .amount-group { max-width: none; text-align: left; }
    .rd #do-calc .tax-result > span { font-size: 14px; }
    .rd #do-calc .tax-result .amount-group span { font-size: 15px; }
    .rd #do-calc .tax-result.do-main { padding: 0 0 16px; }
    .rd #do-calc .do-main > span { font-size: 15px; }
    .rd #do-calc .do-main .amount-group span { font-size: 28px; letter-spacing: -.5px; }
    .rd #do-calc .do-extra { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .rd #do-calc .do-extra > div { padding: 14px 16px; }
    .rd #do-calc .do-how { padding: 14px 16px; }
    .rd #do-calc .do-how summary::after { flex-basis: 16px; width: 16px; height: 16px; background-size: 16px; }
}

/* источники и дисклеймер в боковой колонке статьи */
.rd .rda-src h2.rd-label { margin: 0; padding: 0; border: 0; font: 400 11px/1.4 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--mute); scroll-margin-top: 16px; }
.rd .rda-src__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rd .rda-src__list li { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rd .rda-src__list li:last-child { padding-bottom: 0; border-bottom: 0; }
.rd .rda-src__list li::before { display: none; }
.rd .rda-src__list b { font: 600 14px/1.35 var(--f-ui); color: var(--ink); }
.rd .rda-src__list span { font: 400 13px/1.45 var(--f-ui); color: var(--mute); }
.rd .rda-src__list a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-mid); text-underline-offset: 2px; }
.rd .rd-article__aside .ymyl-disclaimer { margin: 0; padding: 24px; border-radius: 22px; }
.rd .rd-article__aside .ymyl-disclaimer strong { display: block; margin-bottom: 10px; font: 400 11px/1.4 var(--f-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--ink); }
@media (max-width: 639px) {
    .rd .rd-article__aside .ymyl-disclaimer { padding: 20px; border-radius: 20px; }
}
