:root {
    --stress-primary: #6B21A8;
    --stress-bg: #F3E8FF;
    --stress-border: #E9D5FF;
    --stress-hover: #F5F3FF;
    --stress-green: #10B981;
    --stress-yellow: #F59E0B;
    --stress-red: #EF4444;
    --stress-dark-red: #DC2626;
    --text-main: #1F2937;
}

.stress-page {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* === HEADER & LAYOUT === */
.classic-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 24px;
}

.classic-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 12px 0;
    color: #111827;
}

.intro-lead {
    font-size: 18px;
    color: #4B5563;
    line-height: 1.6;
    max-width: 800px;
}

.back-link {
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--stress-primary);
}

.classic-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
}

@media (min-width: 992px) {
    .classic-layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* === CALCULATOR CARD === */
.calculator-box {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 64px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.calc-form {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-label {
    display: block;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
    color: #0F172A;
}

/* === RADIO CARDS (FIXED HEIGHT) === */
.radio-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch; /* ✅ ВСЕ КАРТОЧКИ ОДИНАКОВОЙ ВЫСОТЫ */
}

.radio-card {
    cursor: pointer;
    position: relative;
    display: flex; /* ✅ ДЛЯ РАВНОЙ ВЫСОТЫ */
    height: 100%; /* ✅ ЗАПОЛНЯЕТ ВСЮ ВЫСОТУ ЯЧЕЙКИ */
}

.radio-card input {
    display: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* ✅ ЦЕНТРИРОВАНИЕ ПО ВЕРТИКАЛИ */
    gap: 8px;
    padding: 20px 12px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s;
    width: 100%; /* ✅ ЗАПОЛНЯЕТ ВСЮ ШИРИНУ */
    height: 100%; /* ✅ ЗАПОЛНЯЕТ ВСЮ ВЫСОТУ */
    box-sizing: border-box; /* ✅ УЧИТЫВАЕТ PADDING В ВЫСОТЕ */
}

.radio-card input:checked + .card-content {
    border-color: var(--stress-primary);
    background: var(--stress-bg);
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.15);
    transform: translateY(-2px);
}

.card-content .icon {
    font-size: 28px;
    flex-shrink: 0; /* ✅ ИКОНКА НЕ СЖИМАЕТСЯ */
}

.card-content .title {
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    line-height: 1.3;
}

.card-content .sub {
    font-size: 13px;
    color: var(--text-main);
    text-align: center;
}

/* === QUESTIONS LIST === */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.question-item:hover {
    border-color: var(--stress-primary);
    background: var(--stress-bg);
}

.question-text {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 16px;
    line-height: 1.5;
}

.question-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: var(--stress-primary);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-size: 13px;
    font-weight: 700;
    margin-right: 10px;
}

/* === RATING SCALE === */
.rating-scale {
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.rating-option {
    flex: 1;
    position: relative;
}

.rating-option input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.rating-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: var(--text-main);
    height: 100%;
    box-sizing: border-box;
}

.rating-option input:checked + label {
    border-color: var(--stress-primary);
    background: var(--stress-bg);
    color: var(--stress-primary);
    font-weight: 700;
}

.rating-option label:hover {
    border-color: var(--stress-primary);
}

.rating-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.rating-label {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    white-space: pre-line; /* ✅ ПЕРЕНОС СТРОК В ТЕКСТЕ */
}

/* === CALCULATE BUTTON === */
.btn-calculate {
    width: 100%;
    padding: 16px;
    background: var(--stress-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-calculate:hover {
    background: #581C87;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 33, 168, 0.3);
}

/* === RESULT SECTION === */
.calc-result {
    background: var(--stress-bg);
    border: 1px solid var(--stress-border);
    border-radius: 16px;
    padding: 32px;
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px dashed var(--stress-border);
}

.result-header h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--stress-primary);
}

.stress-emoji {
    font-size: 64px;
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.total-amount {
    font-size: 48px;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
}

.total-caption {
    font-size: 16px;
    color: var(--text-main);
    margin-top: 8px;
    font-weight: 600;
}

/* === KILLER FEATURE: STRESS GAUGE === */
.stress-gauge {
    margin: 32px 0;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--stress-border);
}

.gauge-track {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.gauge-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.gauge-zone.low {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.gauge-zone.medium {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.gauge-zone.high {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.gauge-zone.critical {
    background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
}

.zone-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

.gauge-marker {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 56px;
    background: #1F2937;
    border-radius: 2px;
    transition: left 1s ease-out;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.gauge-marker::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -6px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #1F2937;
}

.gauge-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-main);
    font-weight: 600;
}

/* === RECOMMENDATION BOX === */
.recommendation-box {
    margin: 24px 0;
    padding: 20px;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.recommendation-box i {
    font-size: 24px;
    color: #B45309;
    flex-shrink: 0;
    margin-top: 2px;
}

.recommendation-box p {
    margin: 0;
    font-size: 15px;
    color: #92400E;
    line-height: 1.6;
}

/* === META STATS === */
.meta-stats {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--stress-border);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row strong {
    color: var(--stress-primary);
    font-weight: 700;
}

/* === RETAKE BUTTON === */
.btn-retake {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: var(--stress-primary);
    border: 2px solid var(--stress-primary);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-top: 24px;
}

.btn-retake:hover {
    background: var(--stress-bg);
}

/* === CONTENT STYLES === */
.content-article {
    margin-top: 64px;
    line-height: 1.8;
    color: #334155;
}

.content-article h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0F172A;
    margin-top: 0;
    margin-bottom: 24px;
}

.section-h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0F172A;
    margin-top: 64px;
    margin-bottom: 32px;
}

.article-lead {
    font-size: 18px;
    margin-bottom: 32px;
    color: #475569;
}

/* === META BAR === */
.content-meta-bar {
    display: flex;
    gap: 24px;
    margin-bottom: 48px;
    padding: 24px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 180px;
    min-width: 160px;
    padding: 12px 16px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid #F3F4F6;
}

.meta-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stress-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.meta-icon i {
    font-size: 24px;
    color: var(--stress-primary);
}

.meta-item div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.meta-item .label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.meta-item .val {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
}

/* === FORMULAS SECTION === */
.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-main);
}

.badge-blue {
    background: #2563EB;
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green {
    background: var(--stress-green);
    color: #fff;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.formula-card p {
    font-size: 14px;
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.math-expression {
    background: var(--stress-bg);
    border: 1px solid var(--stress-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--stress-primary);
    text-align: center;
    margin-bottom: 16px;
    font-size: 15px;
}

/* === DIVIDER === */
.soft-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E5E7EB, transparent);
    margin: 48px 0;
}

/* === DESCRIPTION === */
.calc-description p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 24px;
}

.calc-description strong {
    color: #0F172A;
}

/* === ICON HEADINGS === */
.icon-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    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;
}

.purple-icon svg {
    color: var(--stress-primary);
}

.green-icon svg {
    color: var(--stress-green);
}

.yellow-icon svg {
    color: #F59E0B;
}

.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;
}

/* === FAQ === */
.faq-section .faq-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-section .faq-item[open] {
    border-color: var(--stress-primary);
    box-shadow: 0 4px 20px rgba(107, 33, 168, 0.15);
}

summary.faq-question {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary.faq-question:hover {
    background-color: #F9FAFB;
}

.faq-section .faq-item[open] summary.faq-question {
    color: var(--stress-primary);
    background: var(--stress-bg);
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--text-main);
    font-weight: 400;
    line-height: 1;
}

.faq-question .icon-plus {
    display: none;
}

.faq-section .faq-item[open] summary.faq-question::after {
    content: '−';
    color: var(--stress-primary);
}

.faq-answer {
    padding: 20px;
    color: var(--text-main);
    line-height: 1.6;
    font-size: 15px;
}

/* === МОБИЛЬНАЯ АДАПТАЦИЯ (ОПТИМИЗИРОВАНО) === */
@media (max-width: 768px) {
    .calculator-box {
        padding: 24px;
    }
    
    .calc-result {
        padding: 24px;
    }
    
    .total-amount {
        font-size: 36px;
    }
    
    .stress-emoji {
        font-size: 48px;
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    /* Мета-карточки на мобильном */
    .content-meta-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .meta-item {
        width: 100%;
        flex: 1 1 100%;
        padding: 14px 16px;
    }
    
    .meta-icon {
        width: 40px;
        height: 40px;
    }
    
    .meta-icon i {
        font-size: 20px;
    }
    
    /* Gauge на мобильном */
    .gauge-track {
        height: 32px;
    }
    
    .gauge-zone {
        font-size: 9px;
    }
    
    .zone-label {
        display: none;
    }
    
    .gauge-marker {
        height: 48px;
        top: -8px;
    }
    
    .gauge-scale {
        font-size: 10px;
    }
    
    /* === RADIO CARDS НА МОБИЛЬНОМ (FIXED HEIGHT) === */
    .radio-selector {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch; /* ✅ ВСЕ ОДИНАКОВОЙ ВЫСОТЫ */
    }
    
    .radio-card {
        height: auto; /* ✅ АВТО ВЫСОТА */
        min-height: 100px; /* ✅ МИНИМАЛЬНАЯ ВЫСОТА */
    }
    
    .card-content {
        padding: 16px 12px;
        min-height: 100px; /* ✅ ЕДИНАЯ МИНИМАЛЬНАЯ ВЫСОТА */
    }
    
    .card-content .icon {
        font-size: 24px;
    }
    
    .card-content .title {
        font-size: 15px;
    }
    
    .card-content .sub {
        font-size: 13px;
    }
    
    /* Questions на мобильном */
    .question-item {
        padding: 16px;
    }
    
    .question-text {
        font-size: 14px;
    }
    
    .rating-scale {
        gap: 4px;
    }
    
    .rating-option label {
        padding: 8px 2px;
        font-size: 10px;
    }
    
    .rating-value {
        font-size: 14px;
    }
    
    .rating-label {
        font-size: 9px;
    }
    
    .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: 20px;
        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;
    }
    
    /* Classic header на мобильном */
    .classic-header h1 {
        font-size: 24px;
    }
    
    .intro-lead {
        font-size: 16px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .helper-text {
        font-size: 11px;
    }
    
    .btn-calculate {
        padding: 14px;
        font-size: 15px;
    }
    
    /* FAQ на мобильном */
    .faq-section .faq-item {
        margin-bottom: 10px;
    }
    
    summary.faq-question {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .faq-answer {
        padding: 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calculator-box {
        padding: 16px;
        margin-bottom: 40px;
    }
    
    .calc-result {
        padding: 16px;
    }
    
    .total-amount {
        font-size: 32px;
    }
    
    .result-header h3 {
        font-size: 16px;
    }
    
    .stress-emoji {
        font-size: 40px;
    }
    
    .gauge-track {
        height: 28px;
    }
    
    .gauge-zone {
        font-size: 8px;
    }
    
    .gauge-scale span:nth-child(2),
    .gauge-scale span:nth-child(3),
    .gauge-scale span:nth-child(4) {
        display: none;
    }
    
    .recommendation-box {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .recommendation-box i {
        margin: 0 auto 8px;
    }
    
    .meta-item {
        padding: 12px 14px;
    }
    
    .meta-icon {
        width: 36px;
        height: 36px;
    }
    
    .meta-icon i {
        font-size: 18px;
    }
    
    .meta-item .label {
        font-size: 11px;
    }
    
    .meta-item .val {
        font-size: 15px;
    }
    
    .stat-row {
        font-size: 14px;
    }
    
    .question-number {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 11px;
    }
    
    .rating-option label {
        padding: 6px 2px;
    }
    
    .rating-value {
        font-size: 13px;
    }
    
    /* Radio cards на очень маленьких экранах */
    .radio-card {
        min-height: 90px;
    }
    
    .card-content {
        min-height: 90px;
        padding: 14px 10px;
    }
    
    .card-content .icon {
        font-size: 22px;
    }
    
    .card-content .title {
        font-size: 14px;
    }
    
    .card-content .sub {
        font-size: 12px;
    }
}