/* --- Стили для 52 Weeks Challenge (Emerald Theme) --- */
:root {
    --accent-emerald: #10B981;
    --accent-emerald-dark: #047857;
    --accent-emerald-light: #D1FAE5;
    --gradient-emerald-card: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    
    /* Максимально темный цвет для текста */
    --text-on-emerald: #022C22; 
}

.calc-header { margin-bottom: 24px; }
.subtitle { color: var(--text-secondary); margin-top: 6px; }

/* Сетка - Компактная */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Inputs - Compact */
.calc-inputs { gap: 16px; }
.input-group { margin-bottom: 16px; }

.input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }

.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper input {
    width: 100%; padding: 12px 14px; padding-right: 40px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 10px;
    outline: none; transition: border 0.2s, box-shadow 0.2s;
    font-family: var(--font-main);
}
.input-wrapper input:focus { border-color: var(--accent-emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
.currency { position: absolute; right: 14px; color: var(--text-secondary); pointer-events: none; font-size: 14px; }
.input-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.3; }

.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 20px 0; }

/* Чекбокс */
.switch-trip { margin-top: 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-trip input { display: none; }
.checkbox-box {
    width: 22px; height: 22px; border: 2px solid #D1D5DB; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.2s;
    flex-shrink: 0;
}
.switch-trip input:checked + .checkbox-box {
    background: var(--accent-emerald); border-color: var(--accent-emerald); color: #fff;
}
.switch-trip span:last-child { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* --- КАРТОЧКА РЕЗУЛЬТАТА --- */
.card--emerald { 
    background: var(--gradient-emerald-card); 
    color: var(--text-on-emerald); 
    border: 1px solid rgba(16, 185, 129, 0.2);
    overflow: visible;
}

.card--emerald h2 { 
    color: var(--text-on-emerald) !important; 
    margin-bottom: 0; 
    opacity: 1; font-size: 20px;
}

.result-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }

@media (min-width: 900px) { .sticky-card { position: sticky; top: 24px; } }

.fuel-price-big {
    font-size: 48px; font-weight: 800; line-height: 1; margin-bottom: 20px;
    display: flex; align-items: baseline; gap: 6px; 
    color: var(--text-on-emerald) !important;
}
.fuel-price-big small { font-size: 20px; opacity: 0.9; font-weight: 600; }

.result-stats-row {
    display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}
.stat-item {
    background: rgba(255,255,255,0.7); border-radius: 10px; padding: 10px 12px;
    flex: 1; display: flex; flex-direction: column; align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.stat-label { 
    font-size: 11px; text-transform: uppercase; font-weight: 800; 
    opacity: 0.7; margin-bottom: 2px; 
    color: var(--text-on-emerald) !important; 
}
.stat-item strong { 
    font-size: 18px; font-weight: 800; 
    color: var(--text-on-emerald); 
}

/* --- ГРАФИК --- */
.staircase-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.staircase-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; text-transform: uppercase; }

.staircase-graph {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100px;
    gap: 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid #E5E7EB;
}

.graph-bar {
    flex: 1;
    background: var(--accent-emerald);
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease, background 0.2s;
    position: relative;
    cursor: pointer;
    min-width: 2px;
    opacity: 0.8;
}
.graph-bar:hover, .graph-bar.active {
    background: var(--accent-emerald-dark);
    opacity: 1;
}

/* Тултип */
.graph-bar::after {
    content: attr(data-val);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #1F2937;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.graph-bar:hover::after { opacity: 1; }

/* ФИКС ДЛЯ КРАЙНИХ ТУЛТИПОВ (Чтобы не обрезались) */
.graph-bar:nth-last-child(-n+8)::after { left: auto; right: 0; transform: translateY(-6px); }
.graph-bar:nth-child(-n+8)::after { left: 0; transform: translateY(-6px); }

.staircase-axis {
    display: flex; justify-content: space-between; margin-top: 6px;
    font-size: 10px; color: var(--text-secondary); text-transform: uppercase; font-weight: 600;
}

.mobile-hint {
    display: none;
    margin-top: 10px;
    text-align: center;
    font-size: 11px;
    color: var(--accent-emerald-dark); 
    font-weight: 600;
    background: var(--accent-emerald-light);
    padding: 6px;
    border-radius: 6px;
}
@media (max-width: 900px) {
    .mobile-hint { display: block; }
}

.summary-divider { height: 1px; background: rgba(4, 120, 87, 0.2); margin: 16px 0; }

/* Подсказка внизу карточки */
.tip-box { 
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 13px; opacity: 1; line-height: 1.4; 
    font-weight: 600;
}
#tip-text { color: var(--text-on-emerald) !important; }

/* --- НИЖНИЙ КОНТЕНТ (ИНФО) - BOGATY STYLE --- */
.info-wrapper {
    padding: 60px 0 60px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.info-wrapper .container { max-width: 800px; margin: 0 auto; }

.icon-heading {
    display: flex; align-items: flex-start; gap: 16px;
    margin-bottom: 24px; font-size: 24px; font-weight: 800;
    color: var(--text-primary); line-height: 1.3;
}
.header-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 14px;
    background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    flex-shrink: 0; margin-top: -4px;
}
.header-icon svg { width: 24px; height: 24px; stroke-width: 2px; }

.blue-icon svg { color: #2563EB; }
.orange-icon svg { color: #F59E0B; }
.green-icon svg { color: #10B981; }

.small-heading { margin-top: 40px; margin-bottom: 16px; font-size: 20px; }
.small-heading .header-icon { width: 40px; height: 40px; }
.small-heading .header-icon svg { width: 20px; height: 20px; }

.intro-text {
    font-size: 16px; color: var(--text-secondary);
    margin-bottom: 32px; line-height: 1.6;
}

/* Формулы (Стиль Kitchen) */
.formulas-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 24px; margin-bottom: 48px;
}
.formula-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-radius: 24px; padding: 24px;
    transition: all 0.3s; display: flex; flex-direction: column;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }

.formula-header {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 12px; margin-bottom: 16px;
}
.formula-card h3 {
    margin: 0; font-size: 18px; font-weight: 700;
    color: var(--text-primary); line-height: 1.3;
}

.badge-green { background: #10B981; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-blue { background: #2563EB; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }

.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.math-expression {
    background: #F9FAFB; border: 1px solid #E5E7EB;
    padding: 12px 16px; border-radius: 12px;
    font-weight: 700; color: var(--accent-emerald-dark);
    text-align: center; margin-bottom: 16px; font-size: 15px;
}

.soft-divider {
    border: none; height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description strong { color: var(--text-primary); }

/* FAQ Emerald Style (Стиль Kitchen) */
.faq-emerald-style .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 12px;
    overflow: hidden; transition: all 0.2s ease;
}

.faq-emerald-style .faq-item[open] {
    border-color: var(--accent-emerald);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.faq-emerald-style summary.faq-question {
    padding: 16px 20px; cursor: pointer;
    font-weight: 600; color: var(--text-primary);
    list-style: none; position: relative;
    display: flex; justify-content: space-between;
    align-items: center; transition: background 0.2s;
}

.faq-emerald-style summary.faq-question:hover { background-color: #F9FAFB; }

.faq-emerald-style .faq-item[open] summary.faq-question {
    color: var(--accent-emerald-dark);
    background: var(--accent-emerald-light);
}

.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); line-height: 1; }
.faq-question .icon-plus { display: none; }
.faq-emerald-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--accent-emerald); }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { width: 100%; align-items: center; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
}