/* Phoenix INVEST — V5.9.13 ROI Calculator (UA, з тултипами + PDF-експортом) */

.calc-page {
    background: var(--color-bg);
    min-height: 100vh;
    padding: 32px 0 80px;
}

.calc-container {
    max-width: 1280px;
}

/* ============ HERO ============ */
.calc-hero {
    text-align: center;
    margin-bottom: 28px;
}
.calc-hero h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--color-text);
    letter-spacing: -0.02em;
}
.calc-subtitle {
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto 14px;
}
.calc-hero-tips {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(91, 154, 240, 0.1);
    border: 1px solid rgba(91, 154, 240, 0.25);
    border-radius: 10px;
    font-size: 13px;
    color: #95c0ff;
}
.calc-hero-tips strong { color: #fff; }
.calc-help-inline {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-bg-deep);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 18px;
    vertical-align: middle;
}

/* ============ SCENARIOS ============ */
.calc-scenarios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
}
.calc-scenarios-label {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-right: 4px;
}
.calc-scenario-btn {
    background: rgba(255,255,255,0.04);
    color: var(--color-text);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.calc-scenario-btn:hover {
    background: rgba(215, 157, 50, 0.12);
    border-color: rgba(215, 157, 50, 0.4);
    color: #ffd585;
}
.calc-scenario-btn.active {
    background: rgba(215, 157, 50, 0.2);
    border-color: var(--color-accent);
    color: #ffd585;
}

/* ============ GRID ============ */
.calc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 480px;  /* V5.9.14: +40px ширина результатів */
    gap: 24px;
    align-items: start;
}

/* ============ FORM ============ */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.calc-fs {
    background: var(--color-bg-card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 0;
}
/* V5.9.16: чистий h3-заголовок (без fieldset/legend артефактів) */
.calc-fs-title {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #ffd585;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 6px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(215, 157, 50, 0.2);
}
.calc-fs-hint {
    color: var(--color-text-muted);
    font-size: 12.5px;
    line-height: 1.55;
    margin: 6px 0 14px;
    padding: 8px 12px;
    background: rgba(91, 154, 240, 0.06);
    border-left: 3px solid rgba(91, 154, 240, 0.4);
    border-radius: 4px;
}
.calc-fs-hint code {
    background: rgba(0,0,0,0.4);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11.5px;
    color: #ffd585;
}

.calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 12px;
}
.calc-row:first-of-type { margin-top: 0; }
.calc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.calc-field span {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.calc-field span strong {
    color: #ffd585;
    font-weight: 700;
}
.calc-field input[type="number"],
.calc-field input[type="text"],
.calc-field select {
    width: 100%;
    background: rgba(0,0,0,0.4);
    color: var(--color-text);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}
.calc-field input:focus,
.calc-field select:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(0,0,0,0.5);
}
.calc-field-with-range input[type="range"] {
    width: 100%;
    margin: 6px 0 0;
    accent-color: var(--color-accent);
}

/* ============ HELP ICON & TOOLTIP ============ */
.calc-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    cursor: help;
    transition: all 0.15s;
    flex-shrink: 0;
}
.calc-help:hover,
.calc-help:focus {
    background: var(--color-accent);
    color: var(--color-bg-deep);
    transform: scale(1.1);
    outline: none;
}
.calc-tooltip {
    position: fixed;
    z-index: 10000;
    max-width: 320px;
    padding: 12px 14px;
    background: #1a2b3c;
    border: 1px solid var(--color-accent);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
    animation: tipFadeIn 0.15s ease-out;
}
.calc-tooltip::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #1a2b3c;
    border-left: 1px solid var(--color-accent);
    border-bottom: 1px solid var(--color-accent);
    transform: rotate(45deg);
}
.calc-tooltip[data-arrow="bottom"]::before {
    bottom: -5px;
    left: 50%;
    margin-left: -4px;
}
.calc-tooltip[data-arrow="top"]::before {
    top: -5px;
    left: 50%;
    margin-left: -4px;
    transform: rotate(-135deg);
}
@keyframes tipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tax radios */
.calc-radios {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.calc-radios label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.calc-radios label:hover {
    border-color: rgba(215, 157, 50, 0.3);
}
.calc-radios input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}
.calc-radios input[type="radio"]:checked + span {
    color: #ffd585;
}
.calc-radios label:has(input:checked) {
    background: rgba(215, 157, 50, 0.08);
    border-color: var(--color-accent);
}
.calc-radios span {
    font-size: 13.5px;
    color: var(--color-text);
    line-height: 1.5;
    display: block;
}
.calc-radios small {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 400;
}
.calc-radios input[type="number"] {
    background: rgba(0,0,0,0.4);
    color: var(--color-text);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 13px;
    width: 70px;
    margin-left: 6px;
}

/* ============ RESULTS ============ */
.calc-results-sticky {
    position: sticky;
    top: 20px;
    background: var(--color-bg-card);
    border: 1px solid rgba(215, 157, 50, 0.25);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.calc-results-title {
    font-family: 'Manrope', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 18px;
    color: var(--color-text);
}

/* KPI grid */
.calc-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.calc-kpi {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 16px;
    /* V5.9.14: контейнер не обрізає текст */
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
}
.calc-kpi-hero {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(215, 157, 50, 0.18), rgba(155, 224, 185, 0.06));
    border-color: rgba(215, 157, 50, 0.4);
    padding: 18px 20px;
}
.calc-kpi-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 500;
    display: block;
}
.calc-kpi-value {
    font-family: 'Manrope', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffd585;
    line-height: 1.1;
    transition: color 0.2s;
    /* V5.9.14: цифри в одну колонку, не виходять за рамки */
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
    word-break: break-word;
}
.calc-kpi-hero .calc-kpi-value {
    font-size: 34px;
    line-height: 1.05;
}
.calc-kpi-sub {
    font-size: 11.5px;
    color: var(--color-text-muted);
    margin-top: 5px;
    overflow-wrap: break-word;
}
/* V5.9.14: короткий опис під значенням */
.calc-kpi-desc {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255,255,255,0.08);
    font-size: 11.5px;
    color: var(--color-text-muted);
    line-height: 1.45;
}
.calc-kpi-desc strong {
    color: #ffd585;
    font-weight: 600;
}
.calc-kpi-hero .calc-kpi-desc {
    border-top-color: rgba(215, 157, 50, 0.25);
    color: rgba(255, 213, 133, 0.85);
}
.calc-kpi-hero .calc-kpi-desc strong { color: #fff; }

.calc-kpi.changed .calc-kpi-value {
    animation: kpiFlash 0.4s ease-out;
}
@keyframes kpiFlash {
    0%   { color: #fff; }
    100% { color: #ffd585; }
}

/* Breakdowns */
.calc-breakdown {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.calc-breakdown summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    font-size: 14px;
    user-select: none;
    list-style: none;
    padding: 2px 0;
}
.calc-breakdown summary::-webkit-details-marker { display: none; }
.calc-breakdown summary::before {
    content: "▸ ";
    color: var(--color-accent);
    transition: transform 0.2s;
    display: inline-block;
}
.calc-breakdown[open] summary::before {
    transform: rotate(90deg);
}

.calc-breakdown-table,
.calc-projection-table {
    width: 100%;
    margin-top: 12px;
    border-collapse: collapse;
    font-size: 13px;
}
.calc-breakdown-table th,
.calc-projection-table th {
    text-align: left;
    color: var(--color-text-muted);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.calc-breakdown-table td,
.calc-projection-table td {
    text-align: right;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.calc-bk-minus td { color: #ff8a8a; }
.calc-bk-total {
    font-size: 15px;
}
.calc-bk-total th {
    color: #ffd585;
    font-weight: 800;
    font-size: 14px;
    border-bottom: none;
    padding-top: 10px;
}
.calc-bk-total td {
    color: #9be0b9;
    font-size: 16px;
    font-weight: 800;
    border-bottom: none;
    padding-top: 10px;
}

.calc-projection-table th:first-child,
.calc-projection-table td:first-child { text-align: left; }
.calc-projection-table thead th {
    color: #ffd585;
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Compare with deposit */
.calc-compare {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.calc-compare strong { color: #ffd585; }
.calc-compare p { color: var(--color-text-muted); margin: 4px 0; }
.calc-compare-result {
    background: rgba(155, 224, 185, 0.08);
    border: 1px solid rgba(155, 224, 185, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    color: #9be0b9;
    font-weight: 600;
}

/* Actions */
.calc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.calc-actions .btn {
    flex: 1 1 auto;
}
.calc-actions .btn-lg {
    flex: 1 0 100%;
}

.calc-disclaimer {
    margin-top: 16px;
    font-size: 11.5px;
    color: var(--color-text-muted);
    line-height: 1.5;
    font-style: italic;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
    .calc-results-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .calc-page { padding: 20px 0 60px; }
    .calc-hero h1 { font-size: 30px; }
    .calc-subtitle { font-size: 14px; }
    .calc-hero-tips { font-size: 12px; padding: 8px 12px; }
    .calc-scenarios {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .calc-scenarios-label { margin: 0 0 4px; }
    .calc-scenario-btn { width: 100%; text-align: left; }
    .calc-fs { padding: 16px 16px; }
    .calc-fs-title { font-size: 13px; padding-bottom: 10px; }
    .calc-row { grid-template-columns: 1fr; gap: 12px; }
    .calc-results-sticky { padding: 18px 16px; }
    .calc-kpi-grid { grid-template-columns: 1fr; gap: 10px; }
    .calc-kpi-hero { grid-column: span 1; padding: 16px 18px; }
    .calc-kpi-hero .calc-kpi-value { font-size: 30px; }
    .calc-tooltip { max-width: calc(100vw - 24px); }
    .calc-actions .btn { flex: 1 0 100%; }
}

@media (max-width: 400px) {
    .calc-hero h1 { font-size: 24px; }
    .calc-results-title { font-size: 19px; }
    .calc-kpi-hero .calc-kpi-value { font-size: 26px; }
    .calc-kpi-value { font-size: 19px; }
    .calc-kpi { padding: 12px 14px; }
    .calc-kpi-desc { font-size: 11px; line-height: 1.4; }
}

/* ============================================
   V5.9.18 — PRINT / PDF (window.print → Save as PDF)
   ============================================
   Поради клієнту: у діалозі друку зніми «Колонтитули» (Headers and footers)
   щоб PDF був без URL/дати/номерів сторінок.
*/
/* ============================================
   V5.9.27 — PDF Loading Overlay
   ============================================ */
#pdf-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    animation: pdfLoadingFadeIn 0.2s ease-out;
}
.pdf-loading-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(215, 157, 50, 0.4);
    border-radius: 16px;
    padding: 36px 44px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    max-width: 400px;
}
.pdf-loading-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    border: 3px solid rgba(215, 157, 50, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: pdfSpin 0.9s linear infinite;
}
.pdf-loading-card h3 {
    margin: 0 0 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text);
}
.pdf-loading-card p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.5;
}
@keyframes pdfLoadingFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pdfSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   V5.9.26 — PDF Modal (інструкція перед друком — DEPRECATED V5.9.27)
   ============================================ */
#pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pdfModalFadeIn 0.2s ease-out;
}
.pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}
.pdf-modal-card {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid rgba(215, 157, 50, 0.35);
    border-radius: 18px;
    padding: 32px 36px;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    animation: pdfModalSlideIn 0.25s ease-out;
}
.pdf-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}
.pdf-modal-close:hover {
    background: rgba(255, 100, 100, 0.15);
    color: #fff;
    border-color: rgba(255, 100, 100, 0.4);
}
.pdf-modal-card h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 12px;
    padding-right: 30px;
}
.pdf-modal-lead {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 22px;
}
.pdf-modal-lead strong { color: #ffd585; }

.pdf-modal-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pdf-modal-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}
.pdf-modal-steps li.pdf-modal-step-important {
    background: rgba(215, 157, 50, 0.1);
    border-color: rgba(215, 157, 50, 0.4);
}
.pdf-modal-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(215, 157, 50, 0.2);
    color: #ffd585;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
}
.pdf-modal-step-important .pdf-modal-num {
    background: var(--color-accent);
    color: var(--color-bg-deep);
}
.pdf-modal-steps li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.pdf-modal-steps strong {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
.pdf-modal-step-important strong { color: #ffd585; }
.pdf-modal-steps small {
    color: var(--color-text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.pdf-modal-tip {
    background: rgba(91, 154, 240, 0.1);
    border: 1px solid rgba(91, 154, 240, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    color: #95c0ff;
    font-size: 12.5px;
    line-height: 1.55;
    margin-bottom: 22px;
}
.pdf-modal-tip strong { color: #fff; }

.pdf-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.pdf-modal-cancel,
.pdf-modal-proceed {
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.pdf-modal-cancel {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.pdf-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}
.pdf-modal-proceed {
    background: var(--color-accent);
    color: var(--color-bg-deep);
    box-shadow: 0 6px 20px rgba(215, 157, 50, 0.35);
}
.pdf-modal-proceed:hover {
    background: var(--color-accent-bright);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(215, 157, 50, 0.5);
}

@keyframes pdfModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pdfModalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
    .pdf-modal-card { padding: 24px 22px; }
    .pdf-modal-card h2 { font-size: 19px; }
    .pdf-modal-actions { flex-direction: column-reverse; }
    .pdf-modal-actions button { width: 100%; }
}

@media print {
    @page {
        size: A4;
        margin: 8mm 8mm;  /* V5.9.26: менший margin → менше місця для browser headers */
    }

    /* Прибрати усе зайве */
    .header, .footer,
    .calc-scenarios, .calc-actions, .calc-hero-tips,
    .calc-disclaimer, .calc-help, .calc-tooltip, .calc-fs-hint,
    nav, .nav, .header-phone-btn,
    input[type="range"],
    #pdf-modal,
    #pdf-loading-overlay,
    #pdf-export-temp { display: none !important; }

    /* Білий фон і чорний текст */
    html, body {
        background: #ffffff !important;
        color: #1a2b3c !important;
        font-size: 11pt !important;
        line-height: 1.45 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Calc page */
    .calc-page {
        background: #ffffff !important;
        padding: 0 !important;
        min-height: auto !important;
    }
    .calc-container { padding: 0 !important; max-width: 100% !important; }

    /* Hero */
    .calc-hero {
        text-align: left !important;
        padding-bottom: 8pt !important;
        border-bottom: 2pt solid #1a2b3c !important;
        margin-bottom: 12pt !important;
    }
    .calc-hero h1 {
        color: #1a2b3c !important;
        font-size: 22pt !important;
        margin: 0 0 4pt !important;
    }
    .calc-subtitle {
        color: #555 !important;
        font-size: 10pt !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    /* Grid → 2 колонки на A4 */
    .calc-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10pt !important;
        align-items: start !important;
    }
    .calc-form { gap: 8pt !important; }

    /* Sections (form blocks) */
    .calc-fs {
        background: #ffffff !important;
        border: 1.5pt solid #1a2b3c !important;
        border-radius: 4pt !important;
        padding: 8pt 10pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .calc-fs-title {
        color: #b8862b !important;
        background: #ffffff !important;
        font-size: 10pt !important;
        font-weight: 800 !important;
        padding: 0 0 4pt !important;
        margin: 0 0 6pt !important;
        border-bottom: 1pt solid #b8862b !important;
    }

    /* Form fields */
    .calc-row { gap: 8pt !important; margin-top: 6pt !important; }
    .calc-field span {
        color: #1a2b3c !important;
        font-size: 9pt !important;
        font-weight: 600 !important;
    }
    .calc-field span strong { color: #b8862b !important; }
    .calc-field input, .calc-field select {
        background: #ffffff !important;
        color: #1a2b3c !important;
        border: 1pt solid #ccc !important;
        font-size: 10pt !important;
        font-weight: 600 !important;
        padding: 3pt 5pt !important;
        border-radius: 2pt !important;
    }
    /* Range slider — заміняємо на показ значення */
    .calc-field-with-range::after {
        content: '';
    }

    /* Tax radios */
    .calc-radios { gap: 5pt !important; }
    .calc-radios label {
        background: #ffffff !important;
        border: 1pt solid #ccc !important;
        color: #1a2b3c !important;
        font-size: 9pt !important;
        padding: 5pt 7pt !important;
        border-radius: 3pt !important;
    }
    .calc-radios label:has(input:checked) {
        background: #fff8e8 !important;
        border-color: #b8862b !important;
    }
    .calc-radios span { color: #1a2b3c !important; }
    .calc-radios small { color: #555 !important; font-size: 8pt !important; }

    /* Results */
    .calc-results-sticky {
        background: #ffffff !important;
        border: 2pt solid #b8862b !important;
        border-radius: 5pt !important;
        padding: 10pt 12pt !important;
        position: static !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .calc-results-title {
        color: #1a2b3c !important;
        font-size: 13pt !important;
        margin: 0 0 8pt !important;
        padding-bottom: 4pt !important;
        border-bottom: 1pt solid #ccc !important;
    }

    /* KPIs */
    .calc-kpi-grid {
        gap: 5pt !important;
        margin-bottom: 10pt !important;
    }
    .calc-kpi {
        background: #ffffff !important;
        border: 1pt solid #1a2b3c !important;
        border-radius: 3pt !important;
        padding: 6pt 8pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .calc-kpi-hero {
        background: #fff8e8 !important;
        border: 2pt solid #b8862b !important;
    }
    .calc-kpi-label {
        color: #555 !important;
        font-size: 7.5pt !important;
        margin-bottom: 2pt !important;
    }
    .calc-kpi-value {
        color: #1a2b3c !important;
        font-size: 13pt !important;
    }
    .calc-kpi-hero .calc-kpi-value {
        color: #b8862b !important;
        font-size: 22pt !important;
    }
    .calc-kpi-sub { color: #555 !important; font-size: 7.5pt !important; }
    .calc-kpi-desc {
        color: #555 !important;
        font-size: 7pt !important;
        border-top: 0.5pt dashed #ccc !important;
        margin-top: 4pt !important;
        padding-top: 3pt !important;
    }
    .calc-kpi-desc strong { color: #1a2b3c !important; }
    .calc-kpi-hero .calc-kpi-desc { color: #b8862b !important; }

    /* Breakdowns — розкриваємо всі */
    .calc-breakdown {
        background: #ffffff !important;
        border: 1pt solid #1a2b3c !important;
        border-radius: 3pt !important;
        padding: 6pt 8pt !important;
        margin-bottom: 6pt !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .calc-breakdown summary {
        color: #1a2b3c !important;
        font-size: 10pt !important;
        font-weight: 700 !important;
        cursor: default !important;
    }
    .calc-breakdown summary::before { color: #b8862b !important; }

    .calc-breakdown-table th,
    .calc-projection-table th {
        color: #1a2b3c !important;
        border-bottom: 0.5pt solid #ccc !important;
        font-size: 8.5pt !important;
        padding: 4pt 0 !important;
    }
    .calc-breakdown-table td,
    .calc-projection-table td {
        color: #1a2b3c !important;
        border-bottom: 0.5pt solid #ccc !important;
        font-size: 8.5pt !important;
        padding: 4pt 0 !important;
    }
    .calc-bk-minus td { color: #c41a1a !important; }
    .calc-bk-total th, .calc-bk-total td {
        font-size: 10pt !important;
        font-weight: 800 !important;
        border-top: 1.5pt solid #1a2b3c !important;
        border-bottom: none !important;
    }
    .calc-bk-total th { color: #1a2b3c !important; }
    .calc-bk-total td { color: #0f7c4f !important; }

    .calc-projection-table thead th {
        color: #b8862b !important;
        font-size: 7.5pt !important;
    }

    /* Compare deposit */
    .calc-compare strong { color: #b8862b !important; }
    .calc-compare p { color: #555 !important; }
    .calc-compare-result {
        background: #e8f5e8 !important;
        border: 1pt solid #0f7c4f !important;
        color: #0f7c4f !important;
    }

    /* Footer note (опційно) */
    .calc-page::after {
        content: "Phoenix INVEST · phoenix-invest.ua · Інвестиційна нерухомість Карпат";
        display: block;
        margin-top: 10pt;
        padding-top: 6pt;
        border-top: 0.5pt solid #ccc;
        font-size: 7.5pt;
        color: #888;
        font-style: italic;
        text-align: center;
    }
}
