/* --- Стили для Steps Converter (Lime Theme) --- */
:root {
    --accent-lime: #84CC16; /* Lime 500 */
    --accent-lime-dark: #365314; /* Lime 900 - Text */
    --accent-lime-light: #ECFCCB; /* Lime 100 - Card BG */
    --gradient-lime-card: linear-gradient(135deg, #ECFCCB 0%, #D9F99D 100%);
    
    --text-on-lime: #1A2E05; /* Очень темный, почти черный зеленый */
}

.calc-header { margin-bottom: 24px; }
.subtitle { color: var(--text-secondary); margin-top: 6px; }

/* Сетка (Compact) */
.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 */
.calc-inputs { gap: 16px; position: relative; z-index: 50; overflow: visible; }
.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; 
    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-lime); box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.2); }
.suffix { position: absolute; right: 14px; color: var(--text-secondary); pointer-events: none; font-size: 14px; }

/* Radio Buttons */
.radio-group { display: flex; gap: 12px; }
.radio-btn { flex: 1; position: relative; cursor: pointer; }
.radio-btn input { display: none; }
.radio-btn span {
    display: block; width: 100%; text-align: center; padding: 10px;
    border: 1px solid #E5E7EB; border-radius: 10px; font-weight: 500; font-size: 14px;
    transition: all 0.2s; color: var(--text-primary); background: #fff;
    box-sizing: border-box;
}
.radio-btn input:checked + span {
    background: var(--accent-lime-light); border-color: var(--accent-lime); color: var(--accent-lime-dark);
    font-weight: 700;
}

/* Custom Select */
.calc-select-hidden { display: none; }
.custom-select { position: relative; user-select: none; width: 100%; }
.custom-select-trigger {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 12px 14px; font-size: 16px; font-weight: 500;
    color: var(--text-primary); background: #fff;
    border: 1px solid #E5E7EB; border-radius: 10px; cursor: pointer; box-sizing: border-box;
}
.custom-select.open .custom-select-trigger { border-color: var(--accent-lime); box-shadow: 0 0 0 3px rgba(132, 204, 22, 0.2); }
.custom-arrow {
    width: 8px; height: 8px; border-right: 2px solid #9CA3AF; border-bottom: 2px solid #9CA3AF;
    transform: rotate(45deg); transition: transform 0.2s; margin-left: 12px; margin-bottom: 2px;
}
.custom-select.open .custom-arrow { transform: rotate(-135deg); margin-bottom: -2px; border-color: var(--accent-lime); }
.custom-options {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 100; opacity: 0; visibility: hidden;
    transform: translateY(-10px); transition: all 0.2s;
}
.custom-select.open .custom-options { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-option { padding: 10px 14px; font-size: 15px; cursor: pointer; border-bottom: 1px solid #F3F4F6; color: var(--text-primary); }
.custom-option:hover { background: var(--accent-lime-light); color: var(--accent-lime-dark); }
.custom-option.selected { background: var(--accent-lime-light); color: var(--accent-lime-dark); font-weight: 600; }

.divider { border: 0; border-top: 1px solid #E5E7EB; margin: 20px 0; }

/* --- CARD RESULTS --- */
.card--lime { 
    background: var(--gradient-lime-card); 
    color: var(--text-on-lime); 
    border: 1px solid rgba(132, 204, 22, 0.3);
    overflow: visible;
}

.result-header-row { margin-bottom: 16px; }
.card--lime h2 { color: var(--text-on-lime) !important; margin: 0; font-size: 20px; }

.distance-big {
    font-size: 64px; font-weight: 800; line-height: 1; margin-bottom: 16px;
    display: flex; align-items: baseline; gap: 8px; color: var(--text-on-lime) !important;
}
.distance-big small { font-size: 24px; opacity: 0.9; font-weight: 700; }

.sub-stats { display: flex; gap: 16px; margin-bottom: 20px; }
.sub-stat-item {
    flex: 1; background: rgba(255,255,255,0.5); border-radius: 10px; padding: 8px 12px;
    display: flex; flex-direction: column;
}
.sub-label { font-size: 10px; text-transform: uppercase; font-weight: 700; opacity: 0.7; margin-bottom: 2px; }
.sub-stat-item strong { font-size: 16px; font-weight: 800; color: var(--text-on-lime); }

.summary-divider { height: 1px; background: rgba(54, 83, 20, 0.15); margin: 20px 0; }

/* Equivalents */
.eq-label { font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; opacity: 0.8; }
.equivalents-list { display: flex; flex-direction: column; gap: 10px; }
.eq-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.6); padding: 10px; border-radius: 10px;
}
.eq-icon { font-size: 24px; line-height: 1; width: 32px; text-align: center; }
.eq-text { display: flex; flex-direction: column; }
.eq-text span { font-weight: 800; font-size: 16px; color: var(--text-on-lime); }
.eq-text small { font-size: 11px; opacity: 0.8; font-weight: 600; line-height: 1.2; }

.tip-box { 
    font-size: 13px; opacity: 1; line-height: 1.4; 
    font-weight: 600; color: var(--text-on-lime) !important; margin-top: 0;
}
#tip-text { color: var(--text-on-lime) !important; margin: 0; }

/* --- НИЖНИЙ КОНТЕНТ (RICH STYLE) --- */
.info-wrapper { padding: 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; gap: 16px; margin-bottom: 24px; font-size: 24px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.header-icon { 
    width: 48px; height: 48px; border-radius: 14px; background: #fff; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center; margin-top: -4px;
    flex-shrink: 0;
}
.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; }

/* Формулы (Rich Cards) */
.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; display: flex; flex-direction: column; transition: transform 0.2s;
}
.formula-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.formula-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.formula-card h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); }

.badge-lime { background: #84CC16; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; align-self: flex-start; }
.badge-blue { background: #2563EB; color: #fff; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; align-self: flex-start; }

.formula-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.math-expression {
    background: #F9FAFB; border: 1px solid #E5E7EB; padding: 12px 16px;
    border-radius: 12px; font-weight: 700; color: var(--accent-lime-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; }

/* Article & List Styling */
.calc-description p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.calc-description strong { color: var(--text-primary); }
.calc-description ul { 
    color: var(--text-secondary); margin-bottom: 32px; padding-left: 20px; line-height: 1.6; 
}
.calc-description li { margin-bottom: 8px; }

/* FAQ Lime Style (Rich) */
.faq-lime-style .faq-item {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; margin-bottom: 10px;
    overflow: hidden; transition: all 0.2s ease;
}
.faq-lime-style .faq-item[open] { border-color: var(--accent-lime); box-shadow: 0 4px 20px rgba(132, 204, 22, 0.15); }
.faq-lime-style summary.faq-question {
    padding: 16px 20px; cursor: pointer;
    font-weight: 600; color: var(--text-primary);
    list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-lime-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-lime-style .faq-item[open] summary.faq-question { color: var(--accent-lime-dark); background: var(--accent-lime-light); }
.faq-question::after { content: '+'; font-size: 20px; color: var(--text-secondary); }
.faq-lime-style .faq-item[open] summary.faq-question::after { content: '−'; color: var(--accent-lime); }
.faq-answer { padding: 20px; color: var(--text-secondary); line-height: 1.6; font-size: 15px; }

/* --- MOBILE ADAPTATION (FULL) --- */
@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; }
    .header-icon { width: 40px; height: 40px; border-radius: 12px; }
    .header-icon svg { width: 20px; height: 20px; }
    
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
    
    .info-wrapper { margin-top: 40px; padding-top: 40px; }
}