/* Займометр 2026 — FinTech Redesign */

@import url('../fonts/fonts.css');

:root {
    --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Типографическая шкала */
    --fs-xs: 0.875rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1rem;
    --fs-md: 1.0625rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.3125rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 2rem;
    --fs-4xl: clamp(2.25rem, 3.5vw, 3.25rem);

    --page-pad: clamp(24px, 4vw, 64px);

    --bg-main: #F0FDFA;
    --bg-surface: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-header: rgba(255, 255, 255, 0.88);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-hover: #CBD5E1;

    --primary: #0D9488;
    --primary-hover: #0F766E;
    --primary-light: rgba(13, 148, 136, 0.1);
    --primary-glow: rgba(13, 148, 136, 0.25);

    --accent: #F59E0B;
    --accent-light: rgba(245, 158, 11, 0.12);
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 20px 48px rgba(15, 23, 42, 0.12);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --header-h: 72px;
    --transition: 0.25s ease;
    --range-fill: 50%;
}

[data-theme="dark"] {
    --bg-main: #0B1220;
    --bg-surface: #1E293B;
    --bg-elevated: #1E293B;
    --bg-header: rgba(11, 18, 32, 0.92);
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --border: #334155;
    --border-hover: #475569;
    --primary: #2DD4BF;
    --primary-hover: #5EEAD4;
    --primary-light: rgba(45, 212, 191, 0.12);
    --primary-glow: rgba(45, 212, 191, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: clamp(17px, 1.05vw, 19px);
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-base);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--primary-hover); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

.container {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 var(--page-pad);
}

/* Reading progress */
.reading-progress {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    z-index: 99;
}

.reading-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.1s linear;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: var(--fs-2xl);
    color: var(--text-primary);
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.logo img, .logo svg { flex-shrink: 0; }

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--fs-md);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: var(--fs-md);
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-dropdown-trigger:hover,
.nav-dropdown.open .nav-dropdown-trigger {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-dropdown-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.nav-dropdown.open .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 110;
}

.nav-dropdown.open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-dropdown-link.active { font-weight: 600; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-toggle-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition), background var(--transition);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.theme-toggle-btn svg { width: 20px; height: 20px; }

[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }
.theme-toggle-btn .sun-icon { display: none; }
.theme-toggle-btn .moon-icon { display: block; }

.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
}

.burger-menu svg { width: 26px; height: 26px; }

/* Hero */
.hero-section {
    padding: calc(var(--header-h) + 48px) 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.hero-title {
    font-family: var(--font-family);
    font-size: var(--fs-4xl);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary), #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    max-width: none;
    margin-bottom: 24px;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.trust-badge svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

.hero-visual-glow {
    position: absolute;
    inset: 10%;
    background: var(--primary-glow);
    filter: blur(40px);
    z-index: -1;
    border-radius: 50%;
}

/* Calculator */
.calc-wrapper { margin-bottom: 72px; }

.calc-bento {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(20px, 2.5vw, 28px);
    align-items: stretch;
}

.calc-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 3vw, 32px);
    box-shadow: var(--shadow-md);
}

.calc-panel-header {
    margin-bottom: clamp(20px, 2.5vw, 28px);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.calc-panel-title {
    font-family: var(--font-family);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.calc-panel-desc {
    margin-top: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.5;
}

.calc-inputs {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: clamp(20px, 2.5vw, 26px);
}

.input-group { display: flex; flex-direction: column; gap: 12px; }

.input-group-payment {
    margin-top: auto;
    padding-top: 4px;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 44px;
}

.input-label {
    font-weight: 600;
    font-size: var(--fs-md);
    color: var(--text-primary);
}

.input-value-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 148px;
    border: 1px solid var(--border);
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-value-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-numeric {
    border: none;
    background: none;
    font-family: var(--font-family);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--text-primary);
    width: 140px;
    text-align: right;
    outline: none;
    font-variant-numeric: tabular-nums;
}

.input-suffix {
    font-size: var(--fs-md);
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 4px;
}

.range-slider { position: relative; }

.range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--primary) var(--range-fill), var(--border) var(--range-fill));
    outline: none;
    margin: 8px 0;
    cursor: pointer;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--primary-glow);
    border: 2px solid #fff;
    transition: transform 0.15s ease;
}

.range-input::-webkit-slider-thumb:hover { transform: scale(1.12); }

.range-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--primary-glow);
    border: 2px solid #fff;
}

.range-input::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: var(--border);
}

.range-limits {
    display: flex;
    justify-content: space-between;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.input-hint {
    margin-top: 8px;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.5;
}

.reviews-disclaimer {
    font-size: var(--fs-sm) !important;
    color: var(--text-muted) !important;
    margin-top: 0 !important;
}

.payment-type-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 5px;
    border-radius: var(--radius-md);
    gap: 5px;
}

.type-btn {
    border: none;
    background: none;
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
    padding: 13px 12px;
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.type-btn.active {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Results panel */
.calc-results {
    background: linear-gradient(165deg, var(--primary-light) 0%, var(--bg-surface) 48%);
    border-color: rgba(13, 148, 136, 0.22);
}

[data-theme="dark"] .calc-results {
    background: linear-gradient(165deg, rgba(45, 212, 191, 0.08) 0%, var(--bg-surface) 52%);
    border-color: rgba(45, 212, 191, 0.18);
}

.calc-panel-header-results {
    border-bottom-color: rgba(13, 148, 136, 0.14);
}

[data-theme="dark"] .calc-panel-header-results {
    border-bottom-color: rgba(45, 212, 191, 0.12);
}

.result-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.result-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.result-params {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.result-param {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .result-param {
    background: rgba(30, 41, 59, 0.55);
}

.result-param-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.result-param-value {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.result-breakdown {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: clamp(16px, 2.5vw, 22px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.result-breakdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.result-breakdown-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-primary);
}

.result-breakdown-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: var(--radius-full);
}

.result-breakdown-bar {
    display: flex;
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: var(--radius-full);
    background: var(--border);
}

.result-breakdown-principal,
.result-breakdown-interest {
    display: block;
    height: 100%;
    min-width: 2px;
    transition: width 0.35s ease;
}

.result-breakdown-principal {
    background: var(--primary);
    border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.result-breakdown-interest {
    background: var(--accent);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.result-breakdown-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-xs);
    color: var(--text-secondary);
}

.result-legend-item strong {
    margin-left: auto;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.result-legend-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.result-legend-dot.principal { background: var(--primary); }
.result-legend-dot.interest { background: var(--accent); }

.result-hero {
    text-align: center;
    padding: clamp(20px, 3vw, 28px) clamp(16px, 2vw, 24px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.result-hero .result-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.result-hero .result-value {
    font-family: var(--font-family);
    font-size: clamp(1.875rem, 3.2vw, 2.625rem);
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.result-hero .result-desc {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.45;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
}

.result-stat .result-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.result-stat .result-value {
    font-family: var(--font-family);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    word-break: break-word;
}

.result-stat.overpayment {
    background: var(--accent-light);
    border-color: rgba(245, 158, 11, 0.22);
}

.result-stat.overpayment .result-value { color: var(--accent); }

.calc-results .action-btn {
    flex-shrink: 0;
    margin-top: 0;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: var(--fs-md);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 16px var(--primary-glow);
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.action-btn:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* Charts bento */
.calc-charts-bento {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: clamp(16px, 2vw, 24px);
    margin-top: 20px;
    width: 100%;
}

.chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.chart-card-title {
    font-family: var(--font-family);
    font-size: var(--fs-md);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.chart-canvas-wrap {
    position: relative;
    height: 260px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.chart-canvas-wrap.donut { height: 220px; }

.chart-canvas-wrap canvas {
    display: block;
    max-width: 100% !important;
}

.schedule-card {
    margin-top: 20px;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-outline {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    min-width: 480px;
}

.schedule-table th,
.schedule-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.schedule-table th {
    background: var(--bg-main);
    font-weight: 600;
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}

.schedule-table tbody tr:hover td { background: var(--primary-light); }

.schedule-container .table-responsive {
    max-height: 360px;
    overflow-y: auto;
}

/* Mobile sticky results */
.mobile-result-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
    z-index: 90;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-result-bar .label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.mobile-result-bar .value {
    font-family: var(--font-family);
    font-weight: 800;
    font-size: var(--fs-xl);
    color: var(--primary);
}

.mobile-bar-cta {
    width: auto;
    padding: 10px 18px;
    font-size: var(--fs-sm);
}

/* Sections */
.section { padding: 72px 0; }

.section-bg {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-family);
    font-size: var(--fs-3xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    max-width: none;
    margin: 0 auto;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
    width: 100%;
}

.offer-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: clamp(20px, 2vw, 28px);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    min-width: 0;
    height: 100%;
}

.offer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.offer-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.offer-badge {
    flex-shrink: 0;
    background: var(--success-light);
    color: var(--success);
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    line-height: 1.3;
    text-align: right;
    max-width: 48%;
}

.offer-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.offer-icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.offer-name {
    font-family: var(--font-family);
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.offer-params {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-bottom: 20px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex: 1;
}

.offer-param {
    min-width: 0;
}

.offer-param-label {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: 4px;
}

.offer-param-value {
    font-size: var(--fs-md);
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.offer-param-success { color: var(--success); }

.offer-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    background: var(--primary);
    color: #fff;
    font-size: var(--fs-md);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background var(--transition), transform var(--transition);
    margin-top: auto;
}

.offer-btn:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }

/* Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.benefit-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.benefit-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.benefit-icon-wrapper {
    width: 52px;
    height: 52px;
    background: var(--primary-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 16px;
}

.benefit-title {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.benefit-desc { color: var(--text-secondary); font-size: var(--fs-md); }

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.step-card { text-align: center; }

.step-number {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 0 0 5px var(--primary-light);
}

.step-title {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-desc { color: var(--text-secondary); font-size: var(--fs-sm); }

/* FAQ */
.faq-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}

.faq-item:hover, .faq-item.active { border-color: var(--primary); }

.faq-trigger {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: var(--fs-lg);
}

.faq-trigger svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition), color var(--transition);
}

.faq-item.active .faq-trigger svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition) ease-out;
}

.faq-content p {
    padding: 0 22px 18px;
    color: var(--text-secondary);
    font-size: var(--fs-md);
}

/* Reviews carousel */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.review-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.review-rating { color: var(--accent); margin-bottom: 12px; letter-spacing: 2px; }
.review-text { color: var(--text-secondary); font-style: italic; margin-bottom: 16px; font-size: var(--fs-md); }

.review-author { display: flex; align-items: center; gap: 12px; }

.author-avatar {
    width: 42px;
    height: 42px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
}

.author-info h4 { font-size: var(--fs-md); font-weight: 700; }
.author-info p { font-size: var(--fs-sm); color: var(--text-muted); }

/* Footer */
.footer {
    margin-top: auto;
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-surface) 28%);
    border-top: 1px solid var(--border);
    padding: clamp(48px, 6vw, 72px) 0 clamp(24px, 3vw, 36px);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.55fr) repeat(2, minmax(160px, 1fr));
    gap: clamp(32px, 5vw, 56px);
    align-items: start;
    margin-bottom: clamp(28px, 4vw, 44px);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

.footer-logo {
    align-self: flex-start;
    font-size: var(--fs-xl);
    font-weight: 800;
    gap: 10px;
}

.footer-tagline,
.footer-info p {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.65;
    max-width: none;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-links-title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: var(--fs-sm);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.4;
    transition: color var(--transition), transform var(--transition);
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: clamp(20px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-copyright {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-disclaimer {
    max-width: none;
    margin: 0;
    padding: 16px 20px;
    font-size: var(--fs-xs);
    line-height: 1.65;
    color: var(--text-muted);
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

/* SEO pages */
.seo-layout { padding: calc(var(--header-h) + 32px) 0 60px; }

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: var(--border-hover); }

.seo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.seo-content h1 {
    font-family: var(--font-family);
    font-size: var(--fs-4xl);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.seo-content h2 {
    font-family: var(--font-family);
    font-size: var(--fs-2xl);
    font-weight: 700;
    margin: 36px 0 14px;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.seo-content h3 {
    font-family: var(--font-family);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 24px 0 10px;
}

.seo-content p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-size: var(--fs-md);
}

.seo-content ul, .seo-content ol {
    margin-bottom: 20px;
    padding-left: 22px;
    color: var(--text-secondary);
}

.seo-content li { margin-bottom: 6px; }

.formula-box {
    background: var(--primary-light);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: monospace;
    font-size: var(--fs-lg);
    text-align: center;
    margin: 16px 0;
    border: 1px solid rgba(13, 148, 136, 0.15);
}

.seo-content .table-responsive {
    margin: 20px 0;
}

.seo-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    min-width: 500px;
}

.seo-content table th,
.seo-content table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.seo-content table th {
    background: var(--bg-main);
    font-weight: 600;
    color: var(--text-primary);
}

.seo-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget.highlight {
    background: var(--primary-light);
    border-color: rgba(13, 148, 136, 0.25);
}

.sidebar-widget-title {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: var(--fs-lg);
    margin-bottom: 14px;
}

.sidebar-widget-text {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.sidebar-links, .toc-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-link, .toc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    padding: 6px 0;
    transition: color var(--transition);
}

.toc-link {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
}

.toc-link.active, .toc-link:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.sidebar-link:hover { color: var(--primary); }

.related-articles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.related-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    transition: border-color var(--transition), transform var(--transition);
}

.related-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.related-card h4 {
    font-family: var(--font-family);
    font-size: var(--fs-md);
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.related-card p {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 100%; margin: 0 auto; }
    .calc-bento {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .calc-panel { height: auto; }

    .result-body,
    .result-details,
    .result-breakdown { flex: none; }
    .calc-charts-bento {
        grid-template-columns: minmax(0, 1fr);
    }
    .seo-grid { grid-template-columns: 1fr; }
    .seo-sidebar { position: static; }
    .benefits-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .related-articles { grid-template-columns: 1fr; }
    .offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .offers-grid { grid-template-columns: minmax(0, 1fr); }
    .offer-card-header { flex-direction: column; align-items: stretch; }
    .offer-badge { max-width: none; text-align: left; align-self: flex-start; }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-main);
        padding: 20px;
        gap: 4px;
        z-index: 99;
        overflow-y: auto;
        align-items: stretch;
    }

    .nav-menu.active { display: flex; }

    .nav-link, .nav-dropdown-trigger {
        padding: 14px 16px;
        font-size: 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown { width: 100%; }

    .nav-dropdown-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 12px;
        display: none;
        min-width: auto;
    }

    .nav-dropdown.open .nav-dropdown-panel { display: block; }

    .burger-menu { display: block; }

    .reviews-grid { grid-template-columns: 1fr; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-info { max-width: none; }

    .footer-col + .footer-col {
        padding-top: 4px;
    }

    .calc-panel { padding: 20px; }

    .calc-panel-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .input-group-payment { margin-top: 0; }
    .mobile-result-bar { display: flex; }
    body.has-mobile-bar { padding-bottom: 64px; }

    .footer-bottom { text-align: left; }
}

@media (max-width: 480px) {
    .steps-grid { grid-template-columns: 1fr; }
    .result-stats { grid-template-columns: 1fr; }
    .trust-badges { flex-direction: column; }
    .input-numeric { width: 100px; }
}