/* ==========================================================================
   #ipTaxApp — квиз калькулятора налогов ИП (Lestan / LN Consulting)
   Палитра и шрифт — как у сайта: Exo 2 + #2563eb / navy
   ========================================================================== */

.page-iptax {
    --iptax-navy: #0b2a4a;
    --iptax-navy-2: #123a63;
    --iptax-ink: #0f172a;
    --iptax-muted: #64748b;
    --iptax-line: #e2e8f0;
    --iptax-soft: #f1f5f9;
    --iptax-accent: #2563eb;
    --iptax-accent-2: #1d4ed8;
    --iptax-accent-soft: #eff6ff;
    --iptax-warn-bg: #fffbeb;
    --iptax-warn: #b45309;
    --iptax-danger-bg: #fef2f2;
    --iptax-danger: #b91c1c;
    --iptax-ok-bg: #ecfdf5;
    --iptax-ok: #047857;
    --iptax-radius: 18px;
    --iptax-radius-sm: 12px;
    --iptax-shadow: 0 22px 50px -28px rgba(11, 42, 74, 0.55);
}

/* Hero как на /articles, /documents и др.: без ужатия заголовка и без наезда карточки */
.page-iptax .about-hero--overlay .about-title {
    max-width: none;
}

.page-iptax .about-hero--overlay .about-description {
    max-width: 42rem;
    margin-left: 0;
}

/* Секция калькулятора — под hero, как контент на типовых страницах */
.iptax-wrap {
    position: relative;
    z-index: 2;
    margin-top: 0;
    padding: 2.5rem 0 4.5rem;
    background:
        radial-gradient(920px 380px at 92% 0%, rgba(37, 99, 235, 0.10), transparent 60%),
        linear-gradient(180deg, #f4f7fb 0%, #f8fafc 45%, #ffffff 100%);
}

@media (max-width: 768px) {
    .iptax-wrap {
        padding: 1.5rem 0 3rem;
    }
}

/* ---------- Каркас ---------- */
#ipTaxApp {
    width: 100%;
    max-width: none;
    margin: 0;
    font-family: var(--font-family);
    color: var(--iptax-ink);
}

#ipTaxApp > .iptax-shell {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--iptax-radius);
    box-shadow: var(--iptax-shadow);
    /* visible: иначе кастомный dropdown обрезается */
    overflow: visible;
    animation: iptax-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes iptax-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes iptax-body-in {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Прогресс ---------- */
#ipTaxApp .iptax-top {
    padding: 1.2rem 1.75rem 1rem 1.9rem;
    background:
        linear-gradient(135deg, rgba(11, 42, 74, 0.04) 0%, transparent 42%),
        linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--iptax-line);
    border-radius: var(--iptax-radius) var(--iptax-radius) 0 0;
}

#ipTaxApp .iptax-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

#ipTaxApp .iptax-step-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: var(--iptax-accent-soft);
    border: 1px solid #dbeafe;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--iptax-accent-2);
    letter-spacing: 0.02em;
}

#ipTaxApp .iptax-step-label {
    font-size: 0.8rem;
    color: var(--iptax-muted);
}

#ipTaxApp .iptax-bar {
    height: 7px;
    border-radius: 999px;
    background: #e8eef6;
    overflow: hidden;
}

#ipTaxApp .iptax-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 55%, #0b2a4a 100%);
    background-size: 140% 100%;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

/* ---------- Тело шага ---------- */
#ipTaxApp .iptax-body {
    padding: 2rem 1.75rem 1.35rem 1.9rem;
    animation: iptax-body-in 0.32s ease;
}

#ipTaxApp .iptax-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--iptax-accent);
}

#ipTaxApp .iptax-kicker::before {
    content: '';
    width: 1.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--iptax-accent);
}

#ipTaxApp .iptax-question {
    margin: 0 0 0.65rem;
    max-width: none;
    width: 100%;
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--iptax-navy);
}

#ipTaxApp .iptax-hint {
    margin: 0 0 1.35rem;
    max-width: none;
    width: 100%;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--iptax-muted);
}

#ipTaxApp .iptax-hint-examples {
    display: inline-block;
    margin-top: 0.35rem;
    color: #64748b;
}

#ipTaxApp .iptax-field-hint {
    margin: 0.55rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--iptax-muted);
}

#ipTaxApp .iptax-meta {
    color: var(--iptax-muted);
    font-size: 0.86rem;
    font-weight: 600;
}

/* ---------- Кастомный dropdown ---------- */
#ipTaxApp .iptax-dd {
    position: relative;
    width: 100%;
    z-index: 1;
}

#ipTaxApp .iptax-dd.is-open {
    z-index: 40;
}

#ipTaxApp .iptax-dd-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    width: 100%;
    min-height: 60px;
    padding: 0.85rem 1.05rem;
    border: 1.5px solid #d5dee9;
    border-radius: var(--iptax-radius-sm);
    background: #fff;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#ipTaxApp .iptax-dd.is-open .iptax-dd-trigger,
#ipTaxApp .iptax-dd-trigger:hover {
    border-color: var(--iptax-accent);
}

#ipTaxApp .iptax-dd.is-open .iptax-dd-trigger {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

#ipTaxApp .iptax-dd-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

#ipTaxApp .iptax-dd-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--iptax-navy);
}

#ipTaxApp .iptax-dd-label.is-placeholder {
    font-weight: 600;
    color: #94a3b8;
}

#ipTaxApp .iptax-dd-meta {
    font-size: 0.88rem;
    color: var(--iptax-muted);
    font-weight: 400;
}

#ipTaxApp .iptax-dd-chevron {
    width: 0.7rem;
    height: 0.7rem;
    flex: none;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s ease;
}

#ipTaxApp .iptax-dd.is-open .iptax-dd-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

#ipTaxApp .iptax-dd-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    max-height: min(340px, 55vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.45);
}

#ipTaxApp .iptax-dd-panel[hidden] {
    display: none !important;
}

#ipTaxApp .iptax-dd-search-wrap {
    padding: 0.65rem 0.75rem 0.45rem;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}

#ipTaxApp .iptax-dd-search {
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    border: 1.5px solid #d5dee9;
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

#ipTaxApp .iptax-dd-search:focus {
    outline: none;
    border-color: var(--iptax-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#ipTaxApp .iptax-dd-list {
    overflow: auto;
    padding: 0.35rem;
}

#ipTaxApp .iptax-dd-option {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0.75rem 0.85rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    color: inherit;
}

#ipTaxApp .iptax-dd-option:hover {
    background: #eff6ff;
}

#ipTaxApp .iptax-dd-option.is-selected {
    background: linear-gradient(180deg, #eff6ff 0%, #e8f1ff 100%);
}

#ipTaxApp .iptax-dd-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

#ipTaxApp .iptax-dd-option-text strong {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--iptax-ink);
}

#ipTaxApp .iptax-dd-option-text span {
    font-size: 0.86rem;
    color: var(--iptax-muted);
}

#ipTaxApp .iptax-choice-extra .iptax-dd-trigger {
    background: #fff;
}

/* ---------- Футер ---------- */
#ipTaxApp .iptax-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.75rem 1.25rem 1.9rem;
    border-top: 1px solid var(--iptax-line);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-radius: 0 0 var(--iptax-radius) var(--iptax-radius);
}

#ipTaxApp .iptax-footer-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
}

#ipTaxApp .iptax-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    padding: 0.7rem 1.35rem;
    border-radius: 12px;
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

#ipTaxApp .iptax-btn:active {
    transform: translateY(1px);
}

#ipTaxApp .iptax-btn-primary {
    background: linear-gradient(180deg, #3b82f6 0%, var(--iptax-accent) 100%);
    color: #fff;
    box-shadow: 0 10px 22px -12px rgba(37, 99, 235, 0.85);
}

#ipTaxApp .iptax-btn-primary:hover {
    background: linear-gradient(180deg, #2563eb 0%, var(--iptax-accent-2) 100%);
    color: #fff;
}

#ipTaxApp .iptax-btn-ghost {
    background: #fff;
    color: var(--iptax-ink);
    border-color: #d5dee9;
}

#ipTaxApp .iptax-btn-ghost:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

#ipTaxApp .iptax-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ---------- Варианты ответа ---------- */
#ipTaxApp .iptax-choices {
    display: grid;
    gap: 0.75rem;
}

#ipTaxApp .iptax-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    width: 100%;
    margin: 0;
    padding: 1.05rem 1.15rem;
    text-align: left;
    border: 1.5px solid #dbe3ee;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

#ipTaxApp .iptax-choice:hover {
    border-color: #93c5fd;
    background: #f8fbff;
    box-shadow: 0 10px 24px -18px rgba(37, 99, 235, 0.55);
    transform: translateY(-1px);
}

#ipTaxApp .iptax-choice.is-selected {
    border-color: var(--iptax-accent);
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12),
        0 12px 28px -20px rgba(37, 99, 235, 0.7);
}

#ipTaxApp .iptax-choice-mark {
    width: 22px;
    height: 22px;
    margin-top: 0.12rem;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    flex: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

#ipTaxApp .iptax-choice.is-selected .iptax-choice-mark {
    border-color: var(--iptax-accent);
    background: var(--iptax-accent);
}

#ipTaxApp .iptax-choice.is-selected .iptax-choice-mark::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: #fff;
}

#ipTaxApp .iptax-choice strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--iptax-ink);
    margin-bottom: 0.2rem;
}

#ipTaxApp .iptax-choice strong + span {
    display: block;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--iptax-muted);
    font-weight: 400;
}

/* Прижатое поле к варианту */
#ipTaxApp .iptax-choice-stack {
    display: flex;
    flex-direction: column;
}

#ipTaxApp .iptax-choice-stack > .iptax-choice {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

#ipTaxApp .iptax-choice-stack > .iptax-choice.is-selected {
    border-bottom-color: transparent;
    box-shadow: none;
}

#ipTaxApp .iptax-choice-extra {
    margin-top: -2px;
    padding: 0.95rem 1.1rem 1.1rem;
    border: 2px solid var(--iptax-accent);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, #eff6ff 0%, #e8f1ff 100%);
}

#ipTaxApp .iptax-choice-extra .iptax-field {
    margin: 0;
}

#ipTaxApp .iptax-choice-extra .iptax-input,
#ipTaxApp .iptax-choice-extra .iptax-select {
    background: #fff;
}

/* ---------- Поля ---------- */
#ipTaxApp .iptax-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

#ipTaxApp .iptax-input,
#ipTaxApp .iptax-select,
#ipTaxApp .iptax-search {
    width: 100%;
    min-height: 56px;
    padding: 0.85rem 1.05rem;
    border: 1.5px solid #d5dee9;
    border-radius: var(--iptax-radius-sm);
    font-family: inherit;
    font-size: 1.125rem;
    color: var(--iptax-ink);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#ipTaxApp .iptax-input:focus,
#ipTaxApp .iptax-select:focus,
#ipTaxApp .iptax-search:focus {
    outline: none;
    border-color: var(--iptax-accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

/* Поле суммы: число + блок ₸ рядом, без пустоты на всю ширину карточки */
#ipTaxApp .iptax-field--amount {
    max-width: 22rem;
}

#ipTaxApp .iptax-money-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    border: 1.5px solid #d5dee9;
    border-radius: var(--iptax-radius-sm);
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#ipTaxApp .iptax-money-wrap:focus-within {
    border-color: var(--iptax-accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

#ipTaxApp .iptax-money-wrap .iptax-input,
#ipTaxApp .iptax-money-wrap .iptax-money {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 60px;
    padding: 0.9rem 0.85rem 0.9rem 1.15rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-family: inherit;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--iptax-navy);
    background: transparent;
    box-sizing: border-box;
}

#ipTaxApp .iptax-money-wrap .iptax-input:focus,
#ipTaxApp .iptax-money-wrap .iptax-money:focus {
    outline: none;
    border: 0;
    box-shadow: none;
}

#ipTaxApp .iptax-money-suffix {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.35rem;
    padding: 0 1rem;
    border-left: 1px solid var(--iptax-line);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #64748b;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

#ipTaxApp .iptax-combo {
    position: relative;
}

#ipTaxApp .iptax-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 5;
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--iptax-line);
    border-radius: 12px;
    box-shadow: 0 16px 36px -20px rgba(15, 23, 42, 0.35);
}

#ipTaxApp .iptax-suggest button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

#ipTaxApp .iptax-suggest button:hover {
    background: var(--iptax-accent-soft);
}

#ipTaxApp .iptax-region-rows {
    display: grid;
    gap: 0.75rem;
}

#ipTaxApp .iptax-region-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr auto;
    gap: 0.65rem;
    align-items: end;
}

#ipTaxApp .iptax-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
}

#ipTaxApp .iptax-check input {
    width: 1.05rem;
    height: 1.05rem;
}

#ipTaxApp .iptax-skip {
    display: inline-flex;
    margin-top: 0.85rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--iptax-accent);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#ipTaxApp .iptax-skip:hover {
    color: var(--iptax-accent-2);
}

#ipTaxApp .iptax-note,
#ipTaxApp .iptax-warn,
#ipTaxApp .iptax-error,
#ipTaxApp .iptax-ok {
    margin: 0.85rem 0;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.45;
}

#ipTaxApp .iptax-note { background: #eff6ff; color: #1e3a8a; border: 1px solid #dbeafe; }
#ipTaxApp .iptax-warn { background: var(--iptax-warn-bg); color: var(--iptax-warn); border: 1px solid #fde68a; }
#ipTaxApp .iptax-error { background: var(--iptax-danger-bg); color: var(--iptax-danger); border: 1px solid #fecaca; }
#ipTaxApp .iptax-ok { background: var(--iptax-ok-bg); color: var(--iptax-ok); border: 1px solid #a7f3d0; }

#ipTaxApp .iptax-month-table {
    width: 100%;
    border-collapse: collapse;
}

#ipTaxApp .iptax-month-table th,
#ipTaxApp .iptax-month-table td {
    padding: 0.45rem;
    border-bottom: 1px solid var(--iptax-line);
    text-align: left;
}

#ipTaxApp .iptax-month-table input {
    width: 100%;
    min-height: 42px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #d5dee9;
    border-radius: 8px;
    font: inherit;
}

/* ---------- Результат ---------- */
#ipTaxApp.is-result .iptax-body {
    padding-top: 1.75rem;
}

#ipTaxApp .iptax-result-hero {
    margin-bottom: 1.15rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--iptax-line);
}

#ipTaxApp .iptax-result-hero .iptax-question {
    max-width: none;
}

#ipTaxApp .iptax-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1.25rem;
}

#ipTaxApp .iptax-chip {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

@media (max-width: 640px) {
    #ipTaxApp .iptax-chip {
        flex: 1 1 calc(50% - 0.4rem);
    }
}

#ipTaxApp .iptax-chip span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--iptax-muted);
}

#ipTaxApp .iptax-chip strong {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--iptax-navy);
    font-variant-numeric: tabular-nums;
}

#ipTaxApp .iptax-result-grid {
    display: grid;
    gap: 0.85rem;
}

@media (min-width: 900px) {
    #ipTaxApp .iptax-result-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

#ipTaxApp .iptax-meta {
    color: var(--iptax-muted);
    font-size: 0.9rem;
}

#ipTaxApp .iptax-group {
    margin: 1.35rem 0;
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--iptax-line);
    border-radius: 14px;
    background: #fcfdff;
}

#ipTaxApp .iptax-group h3 {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--iptax-navy);
}

#ipTaxApp .iptax-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed #e8eef6;
    font-size: 1rem;
}

#ipTaxApp .iptax-line:last-of-type {
    border-bottom: 0;
}

#ipTaxApp .iptax-line span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #334155;
}

#ipTaxApp .iptax-line strong {
    font-variant-numeric: tabular-nums;
    color: var(--iptax-ink);
    text-align: right;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

#ipTaxApp .iptax-amount-note {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--iptax-muted);
}

#ipTaxApp .iptax-period-banner {
    margin: 0 0 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #c7d7f0;
    background: linear-gradient(180deg, #eef5ff 0%, #f8fbff 100%);
    color: #1e3a5f;
    font-size: 0.95rem;
    line-height: 1.45;
}

#ipTaxApp .iptax-table-note {
    margin: -0.25rem 0 0.85rem;
    color: var(--iptax-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

#ipTaxApp .iptax-load-month {
    margin-top: 0.35rem;
    color: #bfdbfe;
}

#ipTaxApp .iptax-month-table {
    font-size: 0.9rem;
}

#ipTaxApp .iptax-month-table th,
#ipTaxApp .iptax-month-table td {
    white-space: nowrap;
}

#ipTaxApp .iptax-help {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--iptax-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

#ipTaxApp .iptax-tooltip {
    display: none;
    margin: 0.25rem 0 0.55rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--iptax-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

#ipTaxApp .iptax-tooltip.is-open { display: block; }

#ipTaxApp .iptax-group:has(.iptax-total),
#ipTaxApp .iptax-group-total {
    background: linear-gradient(135deg, var(--iptax-navy) 0%, var(--iptax-navy-2) 55%, #1e40af 100%);
    border: 0;
    color: #fff;
    box-shadow: 0 18px 36px -22px rgba(11, 42, 74, 0.75);
}

#ipTaxApp .iptax-group:has(.iptax-total) h3,
#ipTaxApp .iptax-group-total h3 {
    color: rgba(255, 255, 255, 0.78);
}

#ipTaxApp .iptax-total {
    margin: 0.15rem 0 0.25rem;
    font-size: clamp(1.85rem, 3.5vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

#ipTaxApp .iptax-load {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    color: #93c5fd;
}

#ipTaxApp .iptax-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--iptax-line);
    border-radius: 14px;
}

#ipTaxApp .iptax-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

#ipTaxApp .iptax-result-table th,
#ipTaxApp .iptax-result-table td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #eef2f7;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#ipTaxApp .iptax-result-table th:first-child,
#ipTaxApp .iptax-result-table td:first-child {
    text-align: left;
}

#ipTaxApp .iptax-result-table thead th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--iptax-navy);
}

#ipTaxApp .iptax-result-table tfoot td {
    font-weight: 800;
}

#ipTaxApp .iptax-cta {
    margin: 1.35rem 0;
    padding: 1.35rem 1.4rem;
    border-radius: 14px;
    background:
        radial-gradient(500px 180px at 100% 0%, rgba(37, 99, 235, 0.18), transparent 55%),
        linear-gradient(135deg, #0b2a4a 0%, #123a63 100%);
    color: #fff;
}

#ipTaxApp .iptax-cta h3 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
    color: #fff;
}

#ipTaxApp .iptax-cta p {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 48rem;
}

#ipTaxApp .iptax-cta .iptax-btn-primary {
    background: #fff;
    color: var(--iptax-navy);
    box-shadow: none;
}

#ipTaxApp .iptax-cta .iptax-btn-primary:hover {
    background: #eff6ff;
    color: var(--iptax-navy);
}

#ipTaxApp .iptax-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

#ipTaxApp .iptax-disclaimer {
    font-size: 0.875rem;
    color: var(--iptax-muted);
    margin-top: 1rem;
    line-height: 1.5;
}

/* SEO-блок ниже квиза */
.iptax-content {
    padding: 2.5rem 0 2rem;
}

.iptax-prose {
    max-width: none;
    width: 100%;
}

.iptax-prose h2 {
    margin-top: 2rem;
}

.iptax-sources a {
    word-break: break-word;
}

/* ---------- Адаптив ---------- */
@media (max-width: 720px) {
    #ipTaxApp .iptax-body,
    #ipTaxApp .iptax-top,
    #ipTaxApp .iptax-footer {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    #ipTaxApp .iptax-body {
        padding-left: 1.25rem;
    }

    #ipTaxApp .iptax-region-row {
        grid-template-columns: 1fr;
    }

    #ipTaxApp .iptax-footer {
        flex-wrap: wrap;
    }

    #ipTaxApp .iptax-footer-right {
        width: 100%;
        margin-left: 0;
    }

    #ipTaxApp .iptax-footer-right .iptax-btn,
    #ipTaxApp .iptax-footer > .iptax-btn {
        flex: 1;
    }

    #ipTaxApp .iptax-step-label {
        display: none;
    }

    #ipTaxApp .iptax-question {
        max-width: none;
    }
}

@media (max-width: 640px) {
    #ipTaxApp .iptax-result-table:not(.iptax-month-table) thead { display: none; }
    #ipTaxApp .iptax-result-table:not(.iptax-month-table),
    #ipTaxApp .iptax-result-table:not(.iptax-month-table) tbody,
    #ipTaxApp .iptax-result-table:not(.iptax-month-table) tr,
    #ipTaxApp .iptax-result-table:not(.iptax-month-table) td {
        display: block;
        width: 100%;
    }

    #ipTaxApp .iptax-result-table:not(.iptax-month-table) tr {
        padding: 0.75rem 0.9rem;
        border-bottom: 1px solid var(--iptax-line);
    }

    #ipTaxApp .iptax-result-table:not(.iptax-month-table) td {
        text-align: right;
        padding: 0.25rem 0;
        border: 0;
    }

    #ipTaxApp .iptax-result-table:not(.iptax-month-table) td:first-child {
        text-align: left;
        font-weight: 700;
        margin-bottom: 0.35rem;
    }

    #ipTaxApp .iptax-result-table:not(.iptax-month-table) td:nth-child(2)::before { content: 'В месяц (среднее)'; float: left; color: var(--iptax-muted); font-weight: 400; }
    #ipTaxApp .iptax-result-table:not(.iptax-month-table) td:nth-child(3)::before { content: 'За период'; float: left; color: var(--iptax-muted); font-weight: 400; }
    #ipTaxApp .iptax-result-table:not(.iptax-month-table) td:nth-child(4)::before { content: 'За год (прогноз)'; float: left; color: var(--iptax-muted); font-weight: 400; }

    #ipTaxApp .iptax-month-table {
        min-width: 720px;
    }
}

/* Широкий экран: варианты в 2–3 колонки, если их мало */
@media (min-width: 900px) {
    #ipTaxApp .iptax-choices:has(> .iptax-choice:nth-child(2):last-child),
    #ipTaxApp .iptax-choices:has(> .iptax-choice-stack:nth-child(2):last-child),
    #ipTaxApp .iptax-choices:has(> .iptax-choice:nth-child(1)):has(> .iptax-choice:nth-child(2)):not(:has(> :nth-child(4))) {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        align-items: stretch;
    }

    #ipTaxApp .iptax-choices:has(.iptax-choice-stack) {
        grid-template-columns: 1fr;
    }

    #ipTaxApp .iptax-body {
        padding: 2.25rem 2.25rem 1.5rem 2.4rem;
    }

    #ipTaxApp .iptax-top,
    #ipTaxApp .iptax-footer {
        padding-left: 2.4rem;
        padding-right: 2.25rem;
    }
}

/* Квиз: статусы результата */
#ipTaxApp .iptax-period-banner.iptax-tone-ok {
    border-color: #a7d4b5;
    background: linear-gradient(180deg, #eefaf2 0%, #f7fcf8 100%);
    color: #14532d;
}

#ipTaxApp .iptax-period-banner.iptax-tone-warn {
    border-color: #e8d39a;
    background: linear-gradient(180deg, #fff8e8 0%, #fffdf5 100%);
    color: #7a4f00;
}

#ipTaxApp .iptax-period-banner.iptax-tone-danger {
    border-color: #e8b4b4;
    background: linear-gradient(180deg, #fff1f1 0%, #fffafa 100%);
    color: #7f1d1d;
}

#ipTaxApp .iptax-flag-bad {
    color: #b91c1c;
}

#ipTaxApp .iptax-flag-unk {
    color: #a16207;
}

#ipTaxApp .iptax-suggest-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    text-align: left;
}

#ipTaxApp .iptax-suggest-item span {
    color: var(--iptax-muted);
    font-size: 0.85rem;
}

#ipTaxApp .trq-badge {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 600;
    color: #166534;
    background: #ecfdf5;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}

#ipTaxApp .trq-badge-bad {
    color: #991b1b;
    background: #fef2f2;
}

#ipTaxApp .trq-checklist {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--iptax-navy, #0b2a4a);
    line-height: 1.55;
}

#ipTaxApp .trq-checklist li {
    margin: 0.35rem 0;
}

@media (prefers-reduced-motion: reduce) {
    #ipTaxApp .iptax-shell,
    #ipTaxApp .iptax-body,
    #ipTaxApp .iptax-choice,
    #ipTaxApp .iptax-bar > i {
        animation: none !important;
        transition: none !important;
    }
}
