/* ============================================
   АКВАРЕЛЬНЫЙ ДИЗАЙН - КОМПОНЕНТЫ ДЕЙСТВИЙ
   ============================================ */

/* CSS переменные для цветов */
:root {
    --color-primary: #6B8CAE;
    --color-accent: #D8A5C4;
    --color-light: #E8D5E8;
    --color-bg: #FBF8F3;
    --color-text: #3F3F3F;
    --color-success: #A8D5BA;
    --color-error: #E8A5A5;
    --color-warning: #F5D080;
    --color-blue: #89B4D1;
    --color-pink: #E5B3D3;
    --color-yellow: #F5E6D3;
    --color-green: #C9E4CA;
    
    --shadow-light: 0 4px 15px rgba(107, 140, 174, 0.1);
    --shadow-medium: 0 8px 25px rgba(107, 140, 174, 0.15);
    --shadow-hard: 0 12px 35px rgba(107, 140, 174, 0.2);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   ОБЩИЕ СТИЛИ
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, 
        #FBF8F3 0%, 
        #F3E8E8 50%, 
        #E8F0F5 100%);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-inner {
    position: relative;
}

.header-logo {
    position: absolute;
    top: -18px;
    left: 0;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(63, 63, 63, 0.18);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.18);
    z-index: 5;
    cursor: pointer;
    pointer-events: auto;
    animation: logoPulse 2.8s ease-in-out infinite;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-logo:hover,
.header-logo:focus-visible {
    transform: scale(1.05);
    box-shadow: 0 10px 28px rgba(63, 63, 63, 0.24);
    outline: none;
    animation-play-state: paused;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: linear-gradient(135deg, 
        rgba(107, 140, 174, 0.85) 0%,
        rgba(216, 165, 196, 0.85) 100%);
    backdrop-filter: blur(10px);
    padding: 60px 20px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.title {
    font-size: 3.5em;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
    font-weight: 300;
}

/* ============================================
   SECTION STYLES
   ============================================ */

.section {
    background: white;
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(216, 165, 196, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.section:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.section-header h2 {
    font-size: 2.2em;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-description {
    font-size: 1.1em;
    color: #888;
    font-weight: 300;
}

/* ============================================
   ПАМЯТКА (CHEAT SHEET)
   ============================================ */

.cheat-sheet {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.rule-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F5F0 100%);
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.rule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.rule-card:nth-child(1) {
    border-color: rgba(168, 213, 186, 0.3);
    background: linear-gradient(135deg, rgba(201, 228, 202, 0.15) 0%, rgba(255, 255, 255, 1) 100%);
}

.rule-card:nth-child(2) {
    border-color: rgba(232, 165, 165, 0.3);
    background: linear-gradient(135deg, rgba(232, 165, 165, 0.15) 0%, rgba(255, 255, 255, 1) 100%);
}

.rule-card:nth-child(3) {
    border-color: rgba(245, 208, 128, 0.3);
    background: linear-gradient(135deg, rgba(245, 208, 128, 0.15) 0%, rgba(255, 255, 255, 1) 100%);
}

.rule-card:nth-child(4) {
    border-color: rgba(137, 180, 209, 0.3);
    background: linear-gradient(135deg, rgba(137, 180, 209, 0.15) 0%, rgba(255, 255, 255, 1) 100%);
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.rule-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: inline-block;
}

.rule-card h3 {
    font-size: 1.3em;
    color: var(--color-primary);
    margin-bottom: 20px;
    font-weight: 700;
}

.rule-item {
    background: white;
    padding: 13px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.rule-name {
    font-weight: 700;
    color: #555;
    font-size: 0.92em;
}

.rule-text {
    color: #777;
    font-size: 0.84em;
    line-height: 1.35;
}

.compact-rule-item {
    align-items: center;
}

.compact-rule-item .rule-copy {
    justify-content: center;
}

.compact-rule-item .rule-name {
    margin-bottom: 0;
}

.rule-title {
    font-weight: 600;
    color: #555;
    flex: 1;
    font-size: 0.95em;
}

.rule-formula {
    background: linear-gradient(135deg, var(--color-light) 0%, rgba(216, 165, 196, 0.2) 100%);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1em;
    white-space: nowrap;
}

/* ============================================
   РАСПОЗНАВАНИЕ (RECOGNITION)
   ============================================ */

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    position: relative;
    z-index: 1;
}

.task-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F5F0 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid var(--color-light);
}

.task-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    border-color: var(--color-pink);
}

.task-question {
    font-size: 1em;
    color: var(--color-text);
    margin-bottom: 20px;
    line-height: 1.8;
}

.task-question p {
    margin-bottom: 8px;
}

.task-question strong {
    color: var(--color-primary);
    font-weight: 700;
}

.task-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color-light);
    border-radius: 10px;
    font-size: 1em;
    background: white;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

.task-select:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(107, 140, 174, 0.1);
}

.task-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(107, 140, 174, 0.2);
}


.recognition-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.recognition-bank-note {
    color: #9a9a9a;
    font-size: 0.9em;
}

.shuffle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid rgba(107, 140, 174, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--color-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(107, 140, 174, 0.1);
    transition: var(--transition);
}

.shuffle-btn:hover,
.shuffle-btn:focus-visible {
    transform: translateY(-2px);
    background: white;
    border-color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(107, 140, 174, 0.18);
    outline: none;
}

.shuffle-btn:active {
    transform: translateY(0);
}

.recognition-refresh {
    animation: recognitionRefresh 0.35s ease;
}

@keyframes recognitionRefresh {
    from {
        opacity: 0.35;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-feedback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    display: none;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.task-feedback.show {
    display: block;
}

.task-feedback.correct {
    background: var(--color-success);
    color: #2d5a3d;
    border-left: 4px solid #2d5a3d;
}

.task-feedback.incorrect {
    background: var(--color-error);
    color: #5a2d2d;
    border-left: 4px solid #5a2d2d;
}

/* ============================================
   УРАВНЕНИЯ
   ============================================ */

.equations-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    position: relative;
    z-index: 1;
}

.equation-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9F5F0 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 2px solid var(--color-light);
    position: relative;
    overflow: hidden;
}

.equation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-blue) 0%,
        var(--color-pink) 50%,
        var(--color-yellow) 100%);
}

.equation-card.middle::before {
    background: linear-gradient(90deg, 
        var(--color-pink) 0%,
        var(--color-green) 50%,
        var(--color-blue) 100%);
}

.equation-card.hard::before {
    background: linear-gradient(90deg, 
        var(--color-yellow) 0%,
        var(--color-accent) 50%,
        var(--color-pink) 100%);
}

.equation-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.equation-type {
    display: inline-block;
    background: var(--color-light);
    color: var(--color-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.equation-problem {
    font-size: clamp(1.25rem, 2.1vw, 1.8rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(107, 140, 174, 0.05);
    border-radius: 10px;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.hint-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 9px 12px;
    border: 1px dashed rgba(245, 208, 128, 0.95);
    border-radius: 9px;
    background: rgba(245, 208, 128, 0.08);
    color: #777;
    font: inherit;
    font-size: 0.92em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.hint-toggle:hover,
.hint-toggle:focus-visible {
    background: rgba(245, 208, 128, 0.18);
    border-color: var(--color-warning);
    outline: none;
}

.hint-bulb {
    display: inline-block;
    font-size: 1.1em;
    animation: hintPulse 1.35s ease-in-out infinite;
    transform-origin: center;
}

.hint-toggle[aria-expanded="true"] .hint-bulb {
    animation: none;
}

.equation-hint {
    font-size: 0.95em;
    color: #888;
    margin-bottom: 15px;
    padding: 12px 14px;
    background: rgba(245, 208, 128, 0.1);
    border-left: 4px solid var(--color-warning);
    border-radius: 5px;
    font-weight: 500;
}

.equation-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color-light);
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    color: var(--color-primary);
    transition: var(--transition);
    margin-bottom: 15px;
}

.equation-input:hover {
    border-color: var(--color-primary);
}

.equation-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(107, 140, 174, 0.2);
}

.check-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-blue) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(107, 140, 174, 0.3);
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 140, 174, 0.4);
}

.check-btn:active {
    transform: translateY(0);
}

.equation-feedback {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    display: none;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.equation-feedback.show {
    display: block;
}

.equation-feedback.correct {
    background: var(--color-success);
    color: #2d5a3d;
    border-left: 4px solid #2d5a3d;
}

.equation-feedback.incorrect {
    background: var(--color-error);
    color: #5a2d2d;
    border-left: 4px solid #5a2d2d;
}

/* ============================================
   РЕЗУЛЬТАТЫ
   ============================================ */

.results-section {
    background: linear-gradient(135deg, 
        rgba(107, 140, 174, 0.1) 0%,
        rgba(216, 165, 196, 0.1) 100%);
    border: 2px solid var(--color-light);
}

.results-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.result-item {
    background: white;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.result-label {
    font-weight: 600;
    color: #666;
    font-size: 0.94em;
    white-space: nowrap;
}

.result-value {
    font-size: 1.65em;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.result-value.correct {
    color: var(--color-success);
}

.result-value.incorrect {
    color: var(--color-error);
}

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

.reset-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-pink) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(232, 165, 165, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 165, 165, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, 
        var(--color-primary) 0%,
        var(--color-accent) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

.footer p {
    margin-bottom: 10px;
    font-weight: 300;
}

.footer p:last-child {
    margin-bottom: 0;
}


.footer-credit {
    margin-top: 18px;
    font-weight: 600;
}

.footer-credit a {
    color: white;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: #fffbe9;
    border-bottom-color: #fffbe9;
    outline: none;
}

/* ============================================
   АНИМАЦИИ
   ============================================ */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes hintPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.18);
        filter: brightness(1.25);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(63, 63, 63, 0.18);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 10px 28px rgba(107, 140, 174, 0.26);
    }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 992px) {
    .results-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .section {
        padding: 30px 20px;
    }
    
    .section-header h2 {
        font-size: 1.8em;
    }

    .header {
        padding-top: 110px;
    }

    .header-logo {
        top: -80px;
        left: 50%;
        transform: translateX(-50%);
        width: 82px;
        height: 82px;
    }

    .header-logo:hover,
    .header-logo:focus-visible {
        transform: translateX(-50%) scale(1.05);
    }
    
    .cheat-sheet {
        grid-template-columns: 1fr;
    }
    
    .tasks-grid,
    .equations-grid,
    .results-container {
        grid-template-columns: 1fr;
    }


    .recognition-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .recognition-bank-note {
        text-align: center;
    }

    .shuffle-btn {
        width: 100%;
    }
    
    .equation-problem {
        font-size: 1.5em;
    }

    .result-item {
        padding: 14px 16px;
    }

    .result-label {
        white-space: normal;
    }
    
    .task-select,
    .equation-input,
    .check-btn {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8em;
    }
    
    .section {
        padding: 20px 15px;
        margin-bottom: 25px;
    }
    
    .section-header h2 {
        font-size: 1.4em;
    }
    
    .rule-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rule-formula {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   ТЕМНЫЕ ТЕНИ АКВАРЕЛЬ
   ============================================ */

.memory-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(243, 232, 232, 0.8) 100%);
}

.recognition-section {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(232, 213, 232, 0.8) 100%);
}

.equations-simple {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(245, 230, 211, 0.8) 100%);
}

.equations-middle {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(229, 179, 211, 0.8) 100%);
}

.equations-hard {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(201, 228, 202, 0.8) 100%);
}

/* ============================================
   МЕТОДИЧЕСКИЕ ДОРАБОТКИ
   ============================================ */

/* Словесное правило — главный акцент, формула — вторичный. */
.rule-text {
    color: #525b66;
    font-size: 0.9em;
    line-height: 1.45;
    font-weight: 600;
}

.rule-formula {
    background: rgba(216, 165, 196, 0.10);
    border: 1px solid rgba(107, 140, 174, 0.14);
    color: rgba(107, 140, 174, 0.70);
    font-size: 0.98em;
    font-weight: 600;
    box-shadow: none;
}

/* Задание "Найди ошибку" */
.error-section {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.96) 0%,
        rgba(232, 240, 245, 0.82) 100%);
}

.error-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    position: relative;
    z-index: 1;
}

.error-card {
    display: flex;
    flex-direction: column;
}

.error-equation {
    font-family: 'Courier New', monospace;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(107, 140, 174, 0.06);
    white-space: nowrap;
}

.student-solution {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(232, 165, 165, 0.10);
    border-left: 4px solid rgba(232, 165, 165, 0.75);
    color: #626262;
    font-weight: 650;
}

.student-solution span {
    color: #8b6b6b;
    font-weight: 700;
}

.error-question {
    margin: 2px 0 12px;
    color: #666;
    font-weight: 600;
}

/* Трёхступенчатая подсказка */
.equation-hint {
    color: #5f6670;
    line-height: 1.45;
    min-height: 48px;
}

.hint-step-label {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(245, 208, 128, 0.24);
    color: #8a7346;
    font-size: 0.82em;
    font-weight: 800;
    white-space: nowrap;
}

/* Результаты: не оценка, а учебная картина. */
.result-value.with-hint {
    color: #c59d49;
}

.result-note {
    position: relative;
    z-index: 1;
    margin: -8px 0 24px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.62);
    color: #6d7480;
    font-size: 0.94em;
    text-align: center;
}

@media (max-width: 768px) {
    .error-grid {
        grid-template-columns: 1fr;
    }
}
