/* СГЕНЕРИРОВАНО scripts/build-head-bundles.js из css/styles.css + css/fonts.css + css/brand.css + css/header.css — руками не править. */
/* ===== css/styles.css ===== */
/* ============================================
   EGE/OGE Calculator - Mobile-First Responsive CSS
   Breakpoints:
   - Base: 320px+ (small smartphones)
   - sm: 480px+ (large smartphones)
   - md: 768px+ (tablets)
   - lg: 1024px+ (small desktops)
   - xl: 1440px+ (large desktops)
   ============================================ */

:root {
    /* Modern color palette */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Spacing and sizing */
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Touch target minimum size (44px recommended, 24px absolute minimum) */
    --touch-target-min: 44px;
}

/* ============================================
   Reset & Base Styles (Mobile-First)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    /* Prevent horizontal overflow */
    overflow-x: hidden;
    /* Improve touch scrolling on iOS */
    -webkit-overflow-scrolling: touch;
}

body {
    background: #f0f4f8;
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    /* Prevent horizontal overflow.
       `clip` вместо `hidden`: hidden создаёт scroll container и ломает
       position:sticky у графика; clip просто обрезает без скролл-контекста. */
    overflow-x: clip;
    /* Better text rendering on mobile */
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

/* ============================================
   Container (Mobile-First)
   ============================================ */

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
    /* без fadeIn: opacity:0 в первом кадре задерживал LCP (h1 внутри) на 0.5с */
    /* Prevent overflow (clip — не ломает sticky, см. body) */
    overflow-x: clip;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .container {
        padding: 16px;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .container {
        padding: 20px;
        max-width: 1200px;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    .container {
        padding: 24px;
    }
}

/* xl: 1440px+ */
@media (min-width: 1440px) {
    .container {
        padding: 30px;
        max-width: 1400px;
    }
}

/* ============================================
   Header (Mobile-First)
   ============================================ */

header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    margin-bottom: 20px;
    border-radius: var(--radius);
    padding: 42px 16px 20px; /* compact; lang switcher is absolutely positioned */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* SEO intro paragraph: in the DOM for crawlers, collapsed so it doesn't eat the first screen */
.intro-details {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 6px auto 0;
}
.intro-details > summary {
    cursor: pointer;
    list-style: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.intro-details > summary::-webkit-details-marker { display: none; }
.intro-details > summary::after {
    content: '▾';
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}
.intro-details[open] > summary::after { transform: rotate(180deg); }
.intro-details .intro-lead {
    font-size: 0.82rem;
    line-height: 1.55;
    opacity: 0.92;
    margin: 8px auto 0;
    max-width: 620px;
}

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

header h1 {
    color: white;
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    /* Prevent text overflow */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
    z-index: 1;
    padding: 0 10px;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    header {
        padding: 44px 20px 24px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    header p {
        font-size: 1rem;
    }

    .intro-details .intro-lead {
        font-size: 0.88rem;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    header {
        padding: 26px 25px 22px;
        margin-bottom: 24px;
    }

    header h1 {
        font-size: 1.85rem;
    }

    header p {
        font-size: 1rem;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    header h1 {
        font-size: 2rem;
    }
}

/* ============================================
   Main Content Grid (Mobile-First)
   ============================================ */

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* md: 768px+ - Two column layout */
@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 350px 1fr;
        gap: 20px;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 380px 1fr;
        gap: 24px;
    }
}

/* xl: 1440px+ */
@media (min-width: 1440px) {
    .main-content {
        grid-template-columns: 420px 1fr;
        gap: 30px;
    }
}

/* ============================================
   Card Component (Mobile-First)
   ============================================ */

.card {
    background: white;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    /* Prevent overflow */
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .card {
        padding: 20px;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .card {
        padding: 25px;
    }
}

/* ============================================
   Control Panel (Mobile-First)
   ============================================ */

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .control-panel {
        gap: 20px;
    }
}

/* ============================================
   Form Elements (Mobile-First)
   ============================================ */

.form-group {
    margin-bottom: 12px;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .form-group {
        margin-bottom: 15px;
    }
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

/* md: 768px+ */
@media (min-width: 768px) {
    label {
        margin-bottom: 5px;
        font-size: 1rem;
    }
}

select, input {
    width: 100%;
    padding: 14px 16px; /* Touch-friendly padding */
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 16px; /* Prevents iOS zoom on focus */
    transition: var(--transition);
    background-color: white;
    /* Ensure minimum touch target height */
    min-height: var(--touch-target-min);
}

select:hover, input:hover {
    border-color: var(--gray-300);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* md: 768px+ - Can reduce focus effect on desktop */
@media (min-width: 768px) {
    select:focus, input:focus {
        transform: translateY(-1px);
    }
}

/* ============================================
   Exam Type Switch (Mobile-First)
   ============================================ */

.exam-type-switch {
    display: inline-flex;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--gray-300);
}

/* визуально скрыто, но остаётся в фокус-порядке: ЕГЭ/ОГЭ переключается с клавиатуры */
.exam-type-switch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.exam-type-switch input[type="radio"]:focus-visible + .exam-type-label {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.exam-type-label {
    flex: 1;
    padding: 14px 16px; /* Touch-friendly */
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-light);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    margin-bottom: 0;
    /* Ensure minimum touch target */
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

.exam-type-label:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

.exam-type-switch input[type="radio"]:checked + .exam-type-label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
    font-weight: 700;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .exam-type-switch {
        max-width: 300px;
    }

    .exam-type-label {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* ============================================
   Buttons (Mobile-First with Touch Targets)
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Touch-friendly size */
    min-height: var(--touch-target-min);
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.25);
    position: relative;
    overflow: hidden;
    /* Prevent text selection on tap */
    user-select: none;
    -webkit-user-select: none;
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.35);
}

/* Only transform on non-touch devices */
@media (hover: hover) {
    .btn:hover {
        transform: translateY(-2px);
    }
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.25);
}

/* md: 768px+ */
@media (min-width: 768px) {
    .btn {
        padding: 12px 24px;
    }
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-secondary {
    background-color: var(--light);
    color: var(--dark);
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e9ecef;
}

.btn-reset {
    background: var(--gray-100);
    color: var(--dark-light);
    box-shadow: none;
    margin-top: 12px;
    width: 100%;
    border: 1px solid var(--gray-300);
}

.btn-reset:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-share {
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-share[hidden] {
    display: none;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .btn-share {
        margin-top: 15px;
    }

    .btn-reset {
        margin-top: 15px;
    }
}

/* ============================================
   Results Section (Mobile-First)
   ============================================ */

.results {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #ede9fe 100%);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.results h3 {
    margin-bottom: 12px;
    color: var(--dark);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.results p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--dark-light);
}

.results span {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .results {
        padding: 18px;
    }

    .results h3 {
        font-size: 1.05rem;
    }

    .results p {
        font-size: 0.95rem;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .results {
        margin-top: 20px;
        padding: 20px;
    }

    .results h3 {
        margin-bottom: 15px;
        font-size: 1.1rem;
    }

    .results h3::before {
        height: 20px;
    }

    .results p {
        margin: 10px 0;
        font-size: 1rem;
    }

    .results span {
        font-size: 1.2rem;
    }
}

/* ============================================
   Graph Container (Mobile-First)
   ============================================ */

.graph-container {
    width: 100%;
    height: 350px;
    position: relative;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-wrapper {
    position: relative;
    flex: 1;
    min-height: 200px;
}

.chart-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.graph-card h2 {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.graph-card h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .graph-container {
        height: 400px;
        padding: 16px;
    }

    .graph-card h2 {
        font-size: 1.2rem;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .graph-container {
        height: 500px;
        padding: 20px;
    }

    .chart-wrapper {
        min-height: 220px;
    }

    .graph-card {
        position: sticky;
        top: 20px;
        align-self: start;
    }

    .graph-card h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .graph-card h2::before {
        height: 24px;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    .graph-container {
        height: 550px;
    }
}

/* ============================================
   Tasks Section (Mobile-First)
   ============================================ */

.tasks-section {
    margin-top: 16px;
}

.tasks-section h2 {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.tasks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.task-item {
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    background: white;
    text-align: center;
    border: 2px solid var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-weight: 600;
    font-size: 1rem;
    /* Ensure touch target - at least 44x44 */
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
    /* Remove tap highlight */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Only apply hover effects on devices that support hover */
@media (hover: hover) {
    .task-item:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary);
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    }
}

.task-item:active {
    transform: scale(0.98);
}

.task-item.selected {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border-color: var(--success);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.task-item.selected:hover {
    background: linear-gradient(135deg, #059669 0%, var(--success) 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

.task-item .task-value {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--warning);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.task-item .checkmark {
    position: absolute;
    top: 3px;
    left: 3px;
    font-size: 12px;
    color: white;
    display: none;
}

.task-item .task-input {
    -webkit-appearance: none;
    width: 100%;
    margin: 2px 0 0;
    background: transparent;
    display: none;
    cursor: pointer;
    /* Touch-friendly slider height - 44px minimum for accessibility */
    height: 32px;
    /* Ensure touch events work on mobile */
    touch-action: manipulation;
}

.task-item .task-input::-webkit-slider-runnable-track {
    height: 8px;
    width: 100%;
    background: var(--success-light);
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.task-item .task-input::-moz-range-track {
    height: 8px;
    background: var(--success-light);
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.task-item .task-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--success);
    margin-top: -8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    /* Ensure minimum touch target */
    cursor: pointer;
}

.task-item .task-input::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--success);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.task-item.selected .checkmark {
    display: block;
}

.task-item.selected .task-input {
    display: block;
}

.task-item.selected .task-value {
    display: flex;
}

/* Max points badge - always visible for multi-point tasks */
.task-item .task-max-points {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
    z-index: 1;
}

/* Hide max-points badge when selected (task-value takes over) */
.task-item.selected .task-max-points {
    display: none;
}

/* Slider container */
.task-item .task-slider-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px 8px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    display: none;
    z-index: 1;
    /* Ensure touch events work properly */
    touch-action: manipulation;
}

.task-item.selected .task-slider-container {
    display: block;
}

/* Ensure task number stays visible above slider */
.task-item > div:first-child {
    position: relative;
    z-index: 2;
    /* Make task number visible on selected items with sliders */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}

/* Task number label in selected multi-point tasks */
.task-item.selected:has(.task-slider-container) > div:first-child {
    background: var(--success);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Slider position indicators */
.slider-positions {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    margin-bottom: 4px;
    /* Add touch target padding */
    min-height: 20px;
    align-items: center;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--gray-300);
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Increase touch target with padding */
    padding: 4px;
    box-sizing: content-box;
    cursor: pointer;
    border: 2px solid transparent;
}

.slider-dot.active {
    background-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
    border-color: var(--primary-dark);
}

/* When task is selected, slider dots should be green to match the task selection */
.task-item.selected .slider-dot.active {
    background-color: var(--success);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
    border-color: #059669;
}

/* Adjust task-item for slider — extra height ONLY when selected
   (unselected multi-point cells stay the same height as the rest) */
.task-item.selected:has(.task-slider-container) {
    padding-bottom: 55px;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .tasks-container {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 10px;
    }

    .task-item {
        padding: 14px 10px;
        min-height: 55px;
    }

    .task-item .task-value {
        top: -8px;
        right: -8px;
        font-size: 12px;
        width: 20px;
        height: 20px;
    }

    .task-item .task-max-points {
        top: -8px;
        right: -8px;
        font-size: 12px;
        width: 20px;
        height: 20px;
    }

    .task-item .checkmark {
        font-size: 14px;
        top: 4px;
        left: 4px;
    }

    .slider-dot {
        width: 12px;
        height: 12px;
        /* Larger touch target on small screens */
        padding: 4px;
    }

    .task-item .task-slider-container {
        padding: 8px 10px 10px;
    }

    .task-item:has(.task-slider-container) {
        padding-bottom: 60px;
    }

    .task-item.selected:has(.task-slider-container) {
        padding-bottom: 60px;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .tasks-section {
        margin-top: 20px;
    }

    .tasks-section h2 {
        font-size: 1.25rem;
        margin-bottom: 15px;
    }

    .tasks-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        margin-top: 15px;
    }

    .task-item {
        padding: 15px;
        font-size: 1.1rem;
        min-height: 60px;
    }
}

/* ============================================
   Slider Container (Mobile-First)
   ============================================ */

.slider-container {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.slider-container input[type="range"] {
    flex: 1;
    min-width: 100px;
    /* Touch-friendly height */
    height: var(--touch-target-min);
    padding: 0;
}

.slider-container input[type="number"] {
    width: 70px;
    text-align: center;
    flex-shrink: 0;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .slider-container {
        margin-top: 15px;
        flex-wrap: nowrap;
    }
}

/* ============================================
   Two Columns Layout (Mobile-First)
   ============================================ */

.two-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .two-columns {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .two-columns {
        gap: 15px;
    }
}

/* ============================================
   Tabs (Mobile-First)
   ============================================ */

.tabs {
    display: flex;
    margin-bottom: 16px;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-sm);
    /* Prevent overflow on small screens */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    flex: 1;
    /* Touch-friendly size */
    min-height: var(--touch-target-min);
    padding: 12px 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark-light);
    text-align: center;
    background: transparent;
    /* Remove tap highlight */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

.tab.active {
    color: white;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-sm);
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .tabs {
        gap: 6px;
    }

    .tab {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .tabs {
        margin-bottom: 25px;
        gap: 8px;
    }

    .tab {
        padding: 10px 20px;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   Score Target (Mobile-First)
   ============================================ */

.score-target {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: var(--radius);
    border: 2px solid rgba(139, 92, 246, 0.2);
}

.score-target label {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0;
    text-align: center;
}

.score-target input {
    width: 100%;
    max-width: 100px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.score-target .btn {
    width: 100%;
    max-width: 150px;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .score-target {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .score-target input {
        width: 90px;
    }

    .score-target .btn {
        width: auto;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .score-target {
        margin-top: 20px;
        padding: 18px;
    }
}

/* ============================================
   Highlight Zone (Mobile-First)
   ============================================ */

.highlight-zone {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 16px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(5px);
}

.highlight-zone h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1rem;
}

.highlight-zone p {
    line-height: 1.7;
    color: var(--dark);
    font-size: 0.9rem;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .highlight-zone {
        padding: 20px;
        margin-top: 20px;
    }

    .highlight-zone h3 {
        margin-bottom: 12px;
        font-size: 1.1rem;
    }

    .highlight-zone p {
        font-size: 1rem;
    }
}

/* ============================================
   Resource Info (Mobile-First)
   ============================================ */

.resource-info {
    margin-top: 12px;
    font-size: 13px;
    color: #718096;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .resource-info {
        margin-top: 15px;
        font-size: 14px;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes pulsate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes taskClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.task-item.task-clicked {
    animation: taskClick 0.3s ease;
}

.chart-indicator {
    transition: transform 0.5s ease-out;
}

@keyframes targetAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.target-indicator {
    animation: targetAppear 0.5s ease-out;
}

/* ============================================
   Floating Score (Mobile-First)
   ============================================ */

/* Pill bottom-right: сумма баллов по ВСЕМ экзаменам (клик → модалка) */
.floating-score {
    position: fixed;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    gap: 0;
    padding: 8px 18px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
    border: 2px solid white;
    line-height: 1.15;
    cursor: pointer;
    /* Touch-friendly */
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
}

.floating-score:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.floating-score-value {
    font-weight: 800;
    font-size: 1.1rem;
}

.floating-score-label {
    font-weight: 600;
    font-size: 0.62rem;
    opacity: 0.9;
    text-transform: lowercase;
}

/* Когда показан sticky-CTA, поднять кружок над ним */
body.has-sticky-cta .floating-score {
    bottom: 78px;
}

/* ============================================
   App Loader (Mobile-First)
   ============================================ */

/* Лоадер живёт ВНУТРИ .score-hero (position:relative) и перекрывает только блок результата:
   h1 и шапка (LCP) с первого кадра видны без JS. Блок резервирует высоту сам — CLS 0. */
.app-loader {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 4px 8px;
    overflow: hidden;
}

.score-hero .app-loader .spinner {
    width: 28px;
    height: 28px;
    border-width: 3px;
    margin: 0 auto 4px;
}

.score-hero .app-loader .loader-content p {
    font-size: 0.8rem;
    margin: 0;
}

/* Фатальная ошибка загрузки: полноэкранная плашка (app.js переносит лоадер в body) */
.app-loader.app-loader--fatal {
    position: fixed;
    inset: auto;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 9999;
    padding: 20px;
}

.loader-content {
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    max-width: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-content p {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .spinner {
        width: 60px;
        height: 60px;
        border-width: 5px;
        margin-bottom: 25px;
    }

    .loader-content p {
        font-size: 1.2rem;
    }
}

/* ============================================
   Error Message (Mobile-First)
   ============================================ */

.error-message {
    background-color: #fee;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 12px;
    margin: 16px;
    color: var(--danger);
    text-align: center;
    font-size: 0.9rem;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .error-message {
        padding: 15px;
        margin: 20px;
        font-size: 1rem;
    }
}

/* ============================================
   Toast Notifications (Mobile-First)
   ============================================ */

.toast-container {
    position: fixed;
    top: 70px; /* Below floating score */
    left: 12px;
    right: 12px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background-color: white;
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    font-size: 13px;
    line-height: 1.4;
    border-left: 4px solid;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info {
    border-left-color: var(--info);
    background-color: #e8f8fc;
    color: #0891b2;
}

.toast-success {
    border-left-color: var(--success);
    background-color: #e0f7fa;
    color: #0d9488;
}

.toast-warning {
    border-left-color: var(--warning);
    background-color: #fff3e0;
    color: #ea580c;
}

.toast-error {
    border-left-color: var(--danger);
    background-color: #fee;
    color: #dc2626;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .toast-container {
        top: 80px;
        left: auto;
        right: 16px;
        max-width: 350px;
    }

    .toast {
        padding: 15px 18px;
        font-size: 14px;
        transform: translateX(100px);
    }

    .toast.show {
        transform: translateX(0);
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .toast-container {
        top: 20px;
        right: 20px;
        max-width: 400px;
        gap: 10px;
    }

    .toast {
        padding: 15px 20px;
        transform: translateX(400px);
    }
}

/* ============================================
   Scores Modal (Mobile-First)
   ============================================ */

.scores-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: flex-end; /* Slide up from bottom on mobile */
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
}

.scores-modal.show {
    opacity: 1;
}

.scores-modal-content {
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scores-modal.show .scores-modal-content {
    transform: translateY(0);
}

.scores-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 2px solid var(--gray-200);
    flex-shrink: 0;
}

.scores-modal-header h3 {
    margin: 0;
    color: var(--dark);
    font-size: 1.2rem;
    font-weight: 700;
}

.scores-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--dark-light);
    cursor: pointer;
    padding: 0;
    /* Touch-friendly */
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.scores-modal-close:hover {
    background-color: var(--gray-100);
    color: var(--danger);
}

.scores-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.scores-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--gray-100) 0%, white 100%);
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.scores-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.scores-item-info {
    flex: 1;
}

.scores-item-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
    margin-bottom: 4px;
}

.scores-item-score {
    color: var(--dark-light);
    font-size: 0.9rem;
}

.scores-item-score strong {
    color: var(--primary);
    font-size: 1.05rem;
}

.scores-item-reset {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
    /* Touch-friendly */
    min-height: var(--touch-target-min);
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.scores-item-reset:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.35);
}

@media (hover: hover) {
    .scores-item-reset:hover {
        transform: translateY(-2px);
    }
}

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

.scores-modal-footer {
    padding: 16px 20px;
    border-top: 2px solid var(--gray-200);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    flex-shrink: 0;
}

.scores-total {
    text-align: center;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
}

.scores-total strong {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .scores-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .scores-item-reset {
        width: auto;
        padding: 10px 16px;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .scores-modal {
        align-items: center;
        padding: 20px;
    }

    .scores-modal-content {
        max-width: 600px;
        max-height: 80vh;
        border-radius: var(--radius);
        transform: scale(0.9);
    }

    .scores-modal.show .scores-modal-content {
        transform: scale(1);
    }

    .scores-modal-header {
        padding: 20px 25px;
    }

    .scores-modal-header h3 {
        font-size: 1.5rem;
    }

    .scores-modal-close {
        font-size: 2rem;
    }

    .scores-modal-body {
        padding: 25px;
    }

    .scores-item {
        padding: 15px;
    }

    .scores-item:hover {
        transform: translateX(5px);
    }

    .scores-item-name {
        font-size: 1.05rem;
        margin-bottom: 5px;
    }

    .scores-item-score {
        font-size: 0.95rem;
    }

    .scores-item-score strong {
        font-size: 1.1rem;
    }

    .scores-item-reset {
        padding: 8px 16px;
    }

    .scores-modal-footer {
        padding: 20px 25px;
    }

    .scores-total {
        font-size: 1.2rem;
    }

    .scores-total strong {
        font-size: 1.5rem;
    }
}

/* ============================================
   OGE Current Grade Panel (Mobile-First)
   ============================================ */

.current-grade-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.current-grade-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.current-grade-label {
    font-weight: 600;
    color: var(--dark-light);
    font-size: 0.85rem;
}

.current-primary {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark);
    background: white;
    padding: 5px 10px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.grade-arrow {
    font-size: 1.1rem;
    color: var(--gray-300);
    font-weight: 700;
}

.current-grade {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    background: var(--primary);
    padding: 5px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
    cursor: default;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .current-grade-panel {
        padding: 16px 20px;
        margin-bottom: 16px;
    }

    .current-grade-info {
        gap: 12px;
    }

    .current-grade-label {
        font-size: 0.95rem;
    }

    .current-primary,
    .current-grade {
        font-size: 1.1rem;
        padding: 6px 14px;
    }

    .grade-arrow {
        font-size: 1.3rem;
    }
}

/* Custom tooltip for geometry warning */
.current-grade.has-tooltip {
    cursor: help;
    text-decoration: underline dotted;
    position: relative;
}

.current-grade.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
}

.current-grade.has-tooltip::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #dc2626;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.current-grade.has-tooltip:hover::after,
.current-grade.has-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .current-grade.has-tooltip::after {
        padding: 12px 16px;
        font-size: 0.85rem;
        max-width: 280px;
    }
}

/* ============================================
   Grade Conditions Panel (Mobile-First)
   ============================================ */

.grade-conditions-panel {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-radius: var(--radius);
    border-left: 4px solid #eab308;
    box-shadow: var(--shadow-sm);
}

.grade-conditions-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 10px;
}

.grade-conditions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.grade-condition-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.grade-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.grade-condition-text {
    color: var(--dark-light);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .grade-conditions-panel {
        margin-top: 20px;
        padding: 16px 20px;
    }

    .grade-conditions-title {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .grade-conditions-list {
        gap: 8px;
    }

    .grade-condition-item {
        gap: 10px;
        padding: 8px 12px;
    }

    .grade-badge {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .grade-condition-text {
        font-size: 0.9rem;
    }
}

/* ============================================
   EGE Score Panel (Mobile-First)
   ============================================ */

.ege-score-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 14px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.ege-score-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ege-score-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.ege-score-label {
    font-weight: 600;
    color: var(--dark-light);
    font-size: 0.8rem;
}

.ege-score-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    min-width: 35px;
    text-align: center;
}

.ege-score-value.primary {
    color: var(--dark);
}

.ege-score-value.test {
    color: var(--success);
}

.ege-score-max {
    font-size: 0.8rem;
    color: var(--gray-300);
    font-weight: 500;
}

.ege-score-arrow {
    font-size: 1.25rem;
    color: var(--gray-300);
    font-weight: 700;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .ege-score-panel {
        padding: 16px 20px;
        margin-bottom: 16px;
    }

    .ege-score-info {
        gap: 16px;
    }

    .ege-score-item {
        gap: 8px;
        padding: 10px 16px;
    }

    .ege-score-label {
        font-size: 0.9rem;
    }

    .ege-score-value {
        font-size: 1.5rem;
        min-width: 45px;
    }

    .ege-score-max {
        font-size: 0.85rem;
    }

    .ege-score-arrow {
        font-size: 1.5rem;
    }
}

/* ============================================
   Geometry Warning Panel (Mobile-First)
   ============================================ */

.geometry-warning {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-top: 10px;
    border-left: 4px solid var(--danger);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: warningAppear 0.3s ease-out;
}

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

.geometry-warning .warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.geometry-warning .warning-text {
    color: #991b1b;
    font-size: 0.85rem;
    line-height: 1.5;
}

.geometry-warning .warning-text strong {
    color: #7f1d1d;
    font-weight: 700;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .geometry-warning {
        padding: 16px 20px;
        margin-top: 12px;
        gap: 12px;
    }

    .geometry-warning .warning-icon {
        font-size: 1.5rem;
    }

    .geometry-warning .warning-text {
        font-size: 0.95rem;
    }
}

/* ============================================
   Language Switcher (Mobile-First)
   ============================================ */

.lang-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 3px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    /* Touch-friendly size */
    min-width: var(--touch-target-min);
    min-height: 36px;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.lang-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .lang-switcher {
        top: 12px;
        right: 12px;
        gap: 4px;
        padding: 4px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .lang-switcher {
        top: 15px;
        right: 15px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .floating-score,
    .lang-switcher,
    .toast-container,
    .app-loader {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .main-content {
        display: block;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    header {
        background: #6366f1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

/* Focus visible styles for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }

    .btn {
        border: 2px solid currentColor;
    }

    .task-item {
        border-width: 3px;
    }
}

/* ============================================
   Author/Tutor CTA Block
   ============================================ */

.author-block {
    margin-top: 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.author-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.author-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.author-avatar svg {
    color: white;
}

.author-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* When showing photo, remove gradient background */
.author-avatar.has-photo {
    background: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.author-text h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.author-text p {
    font-size: 0.95rem;
    color: var(--dark-light);
    line-height: 1.5;
}

.author-actions {
    display: flex;
    justify-content: center;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.btn-cta svg {
    transition: transform 0.2s ease;
}

.btn-cta:hover svg {
    transform: translateX(4px);
}

/* sm: 480px+ */
@media (min-width: 480px) {
    .author-info {
        flex-direction: row;
        text-align: left;
    }

    .author-text h3 {
        font-size: 1.2rem;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .author-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 24px 32px;
    }

    .author-info {
        flex: 1;
    }

    .author-actions {
        flex-shrink: 0;
    }

    .author-text h3 {
        font-size: 1.3rem;
    }

    .author-text p {
        font-size: 1rem;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    .author-block {
        margin-top: 32px;
    }

    .author-avatar {
        width: 80px;
        height: 80px;
    }

    .author-avatar svg {
        width: 56px;
        height: 56px;
    }

    .btn-cta {
        padding: 16px 32px;
        font-size: 1.05rem;
    }
}

/* ============================================
   Footer Styles
   ============================================ */

.site-footer {
    margin-top: 32px;
    padding: 24px 16px;
    text-align: center;
    color: var(--dark-light);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-copyright {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--gray-300);
}

/* Legal block in footer (Т-Банк acquiring requirements) */
.footer-legal {
    max-width: 720px;
    margin: 16px auto 0;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100, #e2e8f0);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.88rem;
}

.footer-requisites,
.footer-contacts {
    font-size: 0.84rem;
    line-height: 1.6;
    margin: 4px 0;
}

.footer-pay-note {
    font-size: 0.78rem;
    color: var(--gray-300);
    max-width: 560px;
    margin: 0 auto;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .site-footer {
        padding: 32px 24px;
    }
}

/* Print: hide author block */
@media print {
    .author-block,
    .site-footer {
        display: none;
    }
}

/* ============================================
   FAQ Section (Mobile-First)
   ============================================ */

.faq-section {
    margin-top: 24px;
}

.faq-section h2 {
    color: var(--dark);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
    flex-shrink: 0;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-sm);
    border: 2px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition);
}

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

.faq-item[open] {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: var(--transition);
    /* Touch-friendly */
    min-height: var(--touch-target-min);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    background: rgba(99, 102, 241, 0.05);
}

.faq-item p {
    padding: 0 16px 16px;
    font-size: 0.9rem;
    color: var(--dark-light);
    line-height: 1.7;
    animation: fadeIn 0.3s ease;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .faq-section {
        margin-top: 32px;
    }

    .faq-section h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .faq-container {
        gap: 16px;
    }

    .faq-item summary {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .faq-item p {
        padding: 0 20px 20px;
        font-size: 0.95rem;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    .faq-item summary {
        padding: 20px 24px;
    }

    .faq-item p {
        padding: 0 24px 24px;
        font-size: 1rem;
    }
}

/* ============================================
   SAT/ACT/AP Score Calculator Styles
   ============================================ */

/* SAT Score Panel */
.sat-score-panel,
.act-score-panel {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.sat-sections,
.act-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .sat-sections,
    .act-sections {
        flex-direction: row;
        gap: 2rem;
    }
}

.section-display {
    flex: 1;
}

.section-name {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.section-bar-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.section-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.section-score {
    font-size: 1.5rem;
    font-weight: 700;
}

.sat-composite,
.act-composite {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.composite-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.composite-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.composite-max {
    font-size: 1rem;
    opacity: 0.7;
}

/* Percentile Display */
.percentile-display {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 1rem;
}

/* Concordance Display */
.concordance-display {
    background: var(--info);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.concordance-label {
    font-size: 0.875rem;
}

.concordance-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Benchmarks Panel */
.benchmarks-panel {
    background: var(--light);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.benchmarks-panel h4 {
    margin: 0 0 1rem;
    color: var(--dark);
    font-size: 1rem;
}

.benchmarks-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.benchmark-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.benchmark-item.met {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.benchmark-item.not-met {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.benchmark-icon {
    font-size: 1.25rem;
}

.benchmark-label {
    flex: 1;
}

/* AP Score Panels */
.ap-summary-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .ap-summary-panel {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ap-stat {
    background: var(--light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.ap-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.ap-stat-label {
    font-size: 0.75rem;
    color: var(--dark-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ap-credits-panel,
.ap-savings-panel {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 1rem;
}

.ap-credits-panel h4,
.ap-savings-panel h4 {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.credits-range {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.25rem;
}

.credits-min,
.credits-max {
    font-size: 2rem;
    font-weight: 700;
}

.credits-separator {
    font-size: 1.5rem;
    opacity: 0.7;
}

.credits-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-left: 0.5rem;
}

.savings-amount {
    font-size: 1.75rem;
    font-weight: 700;
}

.savings-note {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Chart specific styles */
.sat-chart,
.act-chart,
.ap-chart {
    min-height: 250px;
}

@media (min-width: 768px) {
    .sat-chart,
    .act-chart,
    .ap-chart {
        min-height: 300px;
    }
}

/* ============================================
   Consent Banner & Modal (GDPR/CCPA)
   ============================================ */

.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 3px solid var(--primary);
}

.consent-banner-visible {
    transform: translateY(0);
}

/* Статический баннер из index.html скрыт, пока mobile-early.js не поставил
   html.needs-consent (согласия ещё нет): так он рисуется в первом кадре. */
#consent-banner { display: none; }
html.needs-consent #consent-banner { display: block; }

.consent-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .consent-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 24px 32px;
    }
}

.consent-banner-text h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.consent-banner-text p {
    font-size: 0.875rem;
    color: var(--dark-light);
    line-height: 1.5;
    margin: 0;
}

.consent-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (min-width: 480px) {
    .consent-banner-actions {
        flex-wrap: nowrap;
    }
}

.consent-btn-settings,
.consent-btn-reject,
.consent-btn-accept {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.consent-btn-settings {
    background: var(--gray-100);
    color: var(--dark-light);
    border-color: var(--gray-300);
}

.consent-btn-settings:hover {
    background: var(--gray-200);
    border-color: var(--dark-light);
}

.consent-btn-reject {
    background: white;
    color: var(--dark);
    border-color: var(--gray-300);
}

.consent-btn-reject:hover {
    background: var(--gray-100);
    border-color: var(--dark);
}

.consent-btn-accept {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.25);
}

.consent-btn-accept:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.35);
}

/* --- Компактная полоса согласия на мобиле (<768px) ---
   Фикс 2026-07-02: баннер съедал 26% вьюпорта и перекрывал платёжный CTA.
   Сжимаем до 1-строчного уведомления + кнопки в ряд. Десктоп не затронут. */
@media (max-width: 767px) {
    .consent-banner-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .consent-banner-text {
        flex: 1 1 100%;
    }

    .consent-banner-text h3 {
        display: none;
    }

    .consent-banner-text p {
        font-size: 0.72rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .consent-banner-actions {
        flex: 1 1 100%;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .consent-btn-settings,
    .consent-btn-reject,
    .consent-btn-accept {
        min-width: 0;
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    /* 2026-10-17: ещё компактнее — 1 строка текста + тонкий ряд кнопок,
       «Настроить» превращается в ссылку (~65px вместо ~100px). */
    .consent-banner-text p {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }

    .consent-banner-actions {
        align-items: center;
    }

    #consent-banner .consent-btn-reject,
    #consent-banner .consent-btn-accept {
        min-height: 44px;
        padding: 6px 8px;
        font-size: 0.8rem;
        box-shadow: none;
    }

    #consent-banner .consent-btn-reject {
        background: var(--paper-2, #fff);
        color: var(--ink, #1f1a14);
        border: 1px solid var(--gray-300);
    }

    #consent-banner .consent-btn-settings {
        flex: 0 0 auto;
        min-height: 44px;
        color: var(--ink-2, #555);
        box-shadow: none;
        padding: 6px 4px;
        background: none;
        border: none;
        text-decoration: underline;
        font-weight: 500;
        font-size: 0.8rem;
    }

    /* Баннер согласия поднят НАД нижней навигацией (и над платёжным баром,
       когда он есть), чтобы никогда не перекрывать кнопку «Купить план».
       Подъём только для видимого состояния — скрытый баннер остаётся bottom:0,
       чтобы translateY(100%) уводил его полностью за экран.
       Только одностраничный mobile-app (index) — прочие страницы не затронуты. */
    html.mobile-app #consent-banner.consent-banner-visible {
        bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px));
    }

    html.mobile-app body.has-sticky-cta #consent-banner.consent-banner-visible {
        bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px) + 60px);
    }
}

/* Consent Modal */
.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.consent-modal-visible {
    opacity: 1;
    visibility: visible;
}

.consent-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.consent-modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.consent-modal-visible .consent-modal-content {
    transform: scale(1);
}

.consent-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--gray-200);
}

.consent-modal-header h2 {
    font-size: 1.25rem;
    color: var(--dark);
    margin: 0;
}

.consent-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--dark-light);
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.consent-modal-close:hover {
    background: var(--gray-100);
    color: var(--danger);
}

.consent-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.consent-modal-body > p {
    font-size: 0.9rem;
    color: var(--dark-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.consent-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.consent-category {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.consent-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.consent-category-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.consent-category-info h4 {
    font-size: 1rem;
    color: var(--dark);
    margin: 0;
}

.consent-required {
    font-size: 0.75rem;
    background: var(--gray-300);
    color: var(--dark-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.consent-category-description {
    font-size: 0.85rem;
    color: var(--dark-light);
    line-height: 1.5;
    margin: 0;
}

/* Toggle Switch */
.consent-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    transition: var(--transition);
    border-radius: 28px;
}

.consent-toggle-slider::before {
    position: absolute;
    content: '';
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.consent-toggle input:checked + .consent-toggle-slider {
    background: var(--success);
}

.consent-toggle input:checked + .consent-toggle-slider::before {
    transform: translateX(22px);
}

.consent-toggle input:disabled + .consent-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.consent-modal-footer {
    padding: 20px 24px;
    border-top: 2px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
}

.consent-btn-save {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.25);
}

.consent-btn-save:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.35);
}

/* Print: hide consent elements */
@media print {
    .consent-banner,
    .consent-modal {
        display: none !important;
    }
}

/* ============================================
   Impact Dashboard Styles
   ============================================ */

.impact-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

.impact-hero h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.impact-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .impact-hero {
        padding: 80px 40px;
    }

    .impact-hero h1 {
        font-size: 2.5rem;
    }
}

.impact-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .impact-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

.impact-stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.impact-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.impact-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.impact-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.impact-stat-label {
    font-size: 0.875rem;
    color: var(--dark-light);
}

.impact-chart-section {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.impact-chart-section h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.impact-chart-section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}

.impact-map-placeholder,
.impact-chart-placeholder {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-light);
}

.testimonials-section {
    margin-bottom: 32px;
}

.testimonials-section h2 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 24px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.testimonial-quote {
    font-style: italic;
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 16px;
}

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

.testimonial-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    color: var(--dark);
}

.testimonial-role {
    font-size: 0.85rem;
    color: var(--dark-light);
}

/* ============================================
   Foreign Exam System Styles
   ============================================ */

.exam-system-container,
.foreign-exam-container {
    margin-bottom: 12px;
}

.exam-system-container select,
.foreign-exam-container select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: var(--transition);
    background-color: white;
    min-height: var(--touch-target-min);
}

/* ============================================
   Exam Info Block (Date, Duration, Countdown)
   ============================================ */

/* Компактная версия: одна тонкая плашка вместо сетки карточек —
   блок не должен съедать премиальное место над заданиями и
   не должен создавать горизонтальный overflow в узкой колонке. */
.exam-info-block {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 14px;
    border-left: 3px solid var(--success);
}

.exam-info-block.is-pending {
    /* зарезервированное место до первого наполнения из JS: высота есть, видимости нет */
    visibility: hidden;
}

.exam-info-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 6px;
    background: transparent;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(16, 185, 129, 0.35);
}

.countdown-icon {
    font-size: 1rem;
}

.countdown-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.countdown-text .countdown-days {
    color: var(--success);
    font-size: 1rem;
    font-weight: 700;
}

.countdown-text .countdown-urgent {
    color: var(--danger);
}

.exam-info-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
}

.exam-info-item {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.exam-info-item .info-label {
    font-size: 0.74rem;
    color: var(--dark-light);
    font-weight: 500;
}

.exam-info-item .info-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

/* Exam passed state */
.exam-info-block.exam-passed {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left-color: var(--gray-300);
}

.exam-info-block.exam-passed .countdown-text {
    color: var(--dark-light);
}

/* ============================================
   No Data Message Styles
   ============================================ */

.no-data-message,
.no-chart-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--dark-light);
    font-size: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    border: 2px dashed var(--gray-300);
    min-height: 150px;
}

.no-data-message {
    margin: 20px 0;
}

.no-chart-message {
    margin: 10px 0;
}

/* md: 768px+ */
@media (min-width: 768px) {
    .no-data-message,
    .no-chart-message {
        padding: 60px 40px;
        font-size: 1.1rem;
        min-height: 200px;
    }
}

/* ============================================
   Diagnostic CTA (under recommendations)
   ============================================ */

.cta-diagnostic {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(99, 102, 241, 0.35);
}

.cta-diagnostic-text {
    line-height: 1.6;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.cta-diagnostic-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cta-diagnostic-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--primary);
    border: 2px solid var(--primary);
    transition: all 0.2s ease;
}

.cta-diagnostic-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.cta-diagnostic-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: transparent;
}

.cta-diagnostic-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark) 100%);
    color: #fff;
}

/* Paid product (ready-made plan) sub-block */
.cta-diagnostic-plan {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(16, 185, 129, 0.4);
}

.cta-diagnostic-plan-text {
    line-height: 1.55;
    color: var(--dark);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.cta-diagnostic-btn-buy {
    color: #fff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: transparent;
}

.cta-diagnostic-btn-buy:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
}

.cta-diagnostic-plan-terms {
    margin-top: 8px;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--dark-light);
}

.cta-diagnostic-plan-terms a {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================
   UI refresh 2026-06-10: sticky chart, score hero,
   subject chips, full-width recommendations, sticky CTA
   ============================================ */

/* График «едет» рядом при прокрутке заданий (десктоп) */
@media (min-width: 768px) {
    .graph-card {
        position: sticky;
        top: 16px;
        align-self: start;
    }
}

/* --- Score hero: крупный результат + цель --- */
.score-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.score-hero-scores {
    display: flex;
    align-items: center;
    gap: 14px;
}

.score-hero-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    min-width: 64px;
}

.score-hero-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--dark);
}

.score-hero-item-accent .score-hero-value {
    color: var(--primary-dark, #4338ca);
}

.score-hero-label {
    font-size: 0.68rem;
    color: var(--dark-light);
    font-weight: 600;
    margin-top: 2px;
    text-align: center;
}

.score-hero-arrow {
    font-size: 1.3rem;
    color: var(--dark-light);
    font-weight: 700;
}

.score-hero-target {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-hero-target label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark, #4338ca);
    margin: 0;
}

.score-hero-target input {
    width: 64px;
    padding: 8px 10px;
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    color: var(--primary-dark, #4338ca);
    background: white;
}

.score-hero-target input:focus {
    outline: none;
    border-color: var(--primary);
}

@keyframes scoreHeroPulse {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.25); color: var(--success); }
    100% { transform: scale(1); }
}

.score-hero-pulse {
    animation: scoreHeroPulse 0.45s ease;
}

/* --- Чипы быстрого выбора предмета --- */
.subject-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* Чипы рисует JS (4 штуки, на телефоне 2 строки = 70px): резерв места, чтобы
   блоки ниже не прыгали при наполнении (CLS). */
@media (max-width: 767px) {
    .subject-chips {
        min-height: 70px;
        align-content: flex-start;
    }
}

.subject-chip {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1.5px solid var(--gray-300);
    background: white;
    color: var(--dark);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.subject-chip:hover {
    border-color: var(--primary);
    color: var(--primary-dark, #4338ca);
}

.subject-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    color: white;
}

/* --- Подсказка про бейджи на клетках заданий --- */
.tasks-hint {
    font-size: 0.78rem;
    color: var(--dark-light);
    margin: -6px 0 10px;
    line-height: 1.45;
}

/* --- Рекомендации на всю ширину --- */
.recommendations-section {
    margin-top: 16px;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    overflow: visible;
}

.recommendations-section .highlight-zone {
    margin-top: 0;
}

.recommendations-section:hover {
    box-shadow: none;
}

/* На десктопе CTA-кнопки в ряд, текст не зажат в колонку */
@media (min-width: 768px) {
    .cta-diagnostic-buttons {
        flex-direction: row;
        align-items: center;
    }

    .cta-diagnostic-plan {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px 16px;
    }

    .cta-diagnostic-plan-text {
        margin-bottom: 0;
        flex: 1 1 280px;
    }

    .cta-diagnostic-plan-terms {
        flex-basis: 100%;
    }
}

/* Иконки в CTA-кнопках (вместо эмодзи) */
.cta-icon {
    vertical-align: -3px;
    margin-right: 2px;
}

/* --- Sticky CTA bar внизу экрана --- */
.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 48px 10px 16px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.sticky-cta-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
}

.sticky-cta-btn {
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.sticky-cta-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.sticky-cta-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.sticky-cta-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--dark-light);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
}

.sticky-cta-close:hover {
    background: var(--gray-100, #f1f5f9);
}

/* Чтобы контент не прятался за sticky-баром */
body.has-sticky-cta .container {
    padding-bottom: 64px;
}

/* --- Заголовки групп в модалке баллов (ЕГЭ / ОГЭ / SAT…) --- */
.scores-group-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-dark, #4338ca);
    padding: 10px 0 4px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 6px;
}

/* Sticky-бар и плавающий счёт не нужны при печати */
@media print {
    .sticky-cta,
    .subject-chips {
        display: none !important;
    }
}

/* ============================================
   Mobile one-page app mode (<768px)
   Нижняя навигация Калькулятор/График/Инфо,
   одна секция за раз, компактная шапка,
   sticky-результат. Десктоп не затронут.
   ============================================ */

.mobile-nav {
    display: none;
}

@media (max-width: 767px) {
    :root {
        --mnav-h: 58px;
    }

    /* --- Нижняя навигация --- */
    .mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        display: flex;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--gray-200);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        padding: 5px 4px;
        border: none;
        background: none;
        color: var(--dark-light);
        font-size: 0.66rem;
        font-weight: 600;
        border-radius: 10px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        min-height: 48px;
    }

    .mobile-nav-btn svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    .mobile-nav-btn.active {
        color: var(--primary);
        background: rgba(99, 102, 241, 0.08);
    }

    /* --- Переключение видов: показываем одну секцию за раз --- */
    html.mview-calc .graph-card,
    html.mview-calc .faq-section,
    html.mview-calc .author-block,
    html.mview-calc .site-footer {
        display: none;
    }

    html.mview-chart header,
    html.mview-chart .control-panel,
    html.mview-chart .recommendations-section,
    html.mview-chart .faq-section,
    html.mview-chart .author-block,
    html.mview-chart .site-footer {
        display: none;
    }

    html.mview-info header,
    html.mview-info .control-panel,
    html.mview-info .recommendations-section,
    html.mview-info .graph-card {
        display: none;
    }

    /* --- Компактная шапка: одна строка вместо пол-экрана --- */
    html.mobile-app header {
        padding: 10px 96px 10px 14px;
        margin-bottom: 12px;
        text-align: left;
    }

    /* Шапка НЕ липкая на мобиле: убираем дублирующий sticky-слой (навигация уже
       продублирована в нижнем mobile-nav) и освобождаем ~14% вьюпорта при скролле,
       чтобы платёжный CTA был достижим. Только одностраничный mobile-app (index);
       десктоп и прочие страницы не затронуты. */
    html.mobile-app header.site-header {
        position: static;
    }

    html.mobile-app header h1 {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0;
    }

    /* Подзаголовок остаётся в DOM (SEO), но экран не ест */
    html.mobile-app header p {
        display: none;
    }

    html.mobile-app .intro-details {
        margin: 2px 0 0;
    }

    html.mobile-app .intro-details > summary {
        font-size: 0.74rem;
    }

    html.mobile-app .lang-switcher {
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        padding: 2px;
    }

    html.mobile-app .lang-btn {
        min-height: 32px;
        min-width: 40px;
        padding: 4px 8px;
        font-size: 0.72rem;
    }

    /* --- Результат-хиро: НЕ sticky на мобиле (иначе дублирует sticky-слои и
       съедает ~13% вьюпорта, перекрывая платёжный CTA). Скроллится с контентом,
       но остаётся визуально выделенным. Десктоп не затронут. --- */
    html.mobile-app .score-hero {
        position: static;
        background: linear-gradient(135deg, #eef0fe 0%, #f3eefe 100%);
        box-shadow: 0 6px 18px rgba(99, 102, 241, 0.18);
    }

    /* --- Место под нижнюю навигацию --- */
    html.mobile-app .container {
        padding-bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    }

    html.mobile-app body.has-sticky-cta .container {
        padding-bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px) + 70px);
    }

    /* Sticky-CTA плана — над навигацией, не вместо неё */
    html.mobile-app .sticky-cta {
        bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px));
        padding: 8px 44px 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    /* Мотивационная строка убрана на мобиле: бар в одну компактную строку
       (кнопка «Купить план» — сам CTA), высота ~52px вместо ~91px. */
    html.mobile-app .sticky-cta-text {
        display: none;
    }

    html.mobile-app .sticky-cta-btn {
        white-space: nowrap;
    }

    /* Плавающий счётчик суммы — тоже поднять над навигацией */
    html.mobile-app .floating-score {
        bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px) + 10px);
    }

    html.mobile-app body.has-sticky-cta .floating-score {
        bottom: calc(var(--mnav-h) + env(safe-area-inset-bottom, 0px) + 72px);
    }

    /* --- Вид «График»: диаграмма почти на весь экран --- */
    html.mview-chart .graph-container {
        height: calc(100dvh - 200px);
        min-height: 360px;
    }

    html.mview-chart .graph-card {
        margin-top: 4px;
    }
}

/* --- Карточка «Купить план» во вкладке Инфо (только мобильный app-режим).
   На десктопе и в других вкладках скрыта: там план продают
   inline-кнопка в рекомендациях и sticky-бар. --- */
.plan-offer-card {
    display: none;
}

@media (max-width: 767px) {
    html.mview-info .plan-offer-card {
        display: block;
    }

    .plan-offer-card h2 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--dark);
        margin-bottom: 8px;
    }

    .plan-offer-text {
        font-size: 0.9rem;
        color: var(--dark-light);
        margin-bottom: 12px;
    }

    .plan-offer-card .cta-diagnostic-btn-buy {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 6px;
    }

    .plan-offer-card .cta-diagnostic-plan-terms {
        margin-top: 10px;
    }

    .plan-offer-note {
        font-size: 0.88rem;
        color: var(--dark-light);
        margin: 0;
    }
}

/* 2026-10-17: первый экран на телефоне.
   Пустой счёт не показываем; подписи не мельче 12px; кнопка «Сообщить
   об ошибке» меньше и прозрачнее, чтобы не лежала поверх контента. */
.floating-score.is-empty {
    display: none !important;
}

@media (max-width: 767px) {
    .exam-info-item .info-label,
    .score-hero-label,
    html.mobile-app .intro-details > summary,
    .mobile-nav-btn span,
    .task-item .task-max-points,
    .floating-score-label,
    html.mobile-app .lang-btn {
        font-size: 12px;
    }

    #fb-root #fb-btn.fb-mini {
        width: 34px;
        height: 34px;
        font-size: 15px;
        opacity: 0.5;
    }
}

/* Блок «следующий шаг» → репетитор (экран результата ЕГЭ) */
.cta-tutor-next {
    margin-top: 12px;
}

/* Блок «Куда проходите» (экран результата ЕГЭ) */
.cta-vuz-where { margin-top: 14px; font-size: 14px; }
.cta-vuz-where .vuz-where-title { margin: 0 0 6px; }
.cta-vuz-where .vuz-where-list { margin: 0 0 8px; padding-left: 18px; }
.cta-vuz-where .vuz-where-list li { margin-bottom: 4px; }
.cta-vuz-where .vuz-where-near-title { margin: 8px 0 4px; opacity: 0.8; }
.cta-vuz-where .vuz-where-all { display: inline-block; margin: 4px 0; }
.cta-vuz-where .vuz-where-disclaimer { margin: 6px 0 0; font-size: 12px; opacity: 0.7; }

/* Происхождение цифр vuz.json в блоках «Куда проходите» / «Сколько добрать» / «Мои направления»:
   пометка текстом (не только цветом), переносится на 360px — без горизонтального скролла */
.cta-vuz-where { max-width: 100%; overflow-wrap: anywhere; }
.vuz-src-badge {
    display: inline-block; max-width: 100%; box-sizing: border-box; padding: 0 4px; border: 1px dashed currentColor; border-radius: 4px;
    font-size: 12px; white-space: normal; opacity: 0.85;
}
.vuz-src-link { font-size: 12px; overflow-wrap: anywhere; }
.vuz-src-facts { display: block; font-size: 12px; opacity: 0.8; }
.cta-vuz-where .vuz-src-count,
.cta-vuz-dobrat .vuz-src-count,
.cta-my-directions .vuz-src-count { margin: 0 0 6px; font-size: 12px; opacity: 0.85; }
.cta-my-directions .my-directions-facts { flex: 1 1 100%; min-width: 0; }

/* Блок «Сколько баллов добрать» (экран результата ЕГЭ); мобильный 360px — select'ы во всю ширину */
.cta-vuz-dobrat { margin-top: 14px; font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
.cta-vuz-dobrat .vuz-dobrat-title { margin: 0 0 6px; }
.cta-vuz-dobrat .vuz-dobrat-select {
    display: block; width: 100%; max-width: 100%; box-sizing: border-box;
    margin: 0 0 8px; padding: 8px; font-size: 16px; text-overflow: ellipsis;
}
.cta-vuz-dobrat .vuz-dobrat-result p { margin: 4px 0; }
.cta-vuz-dobrat .vuz-dobrat-verdict { font-weight: 600; }
.cta-vuz-dobrat .vuz-dobrat-list { margin: 4px 0 6px; padding-left: 18px; }
.cta-vuz-dobrat .vuz-dobrat-list li { margin-bottom: 2px; }
.cta-vuz-dobrat .vuz-dobrat-best { font-weight: 600; }
.cta-vuz-dobrat .vuz-dobrat-rule { font-size: 12px; opacity: 0.8; }
.cta-vuz-dobrat .vuz-dobrat-tutor { display: inline-block; margin: 4px 0; }
.cta-vuz-dobrat .vuz-dobrat-disclaimer { margin: 6px 0 0; font-size: 12px; opacity: 0.7; }

/* Блок «Мои направления» (экран результата ЕГЭ); 360px: без горизонтального скролла, тач-цели ≥44px */
.cta-my-directions { margin-top: 14px; font-size: 14px; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.cta-my-directions .my-directions-title { margin: 0 0 6px; }
.cta-my-directions .my-directions-count { margin: 0 0 6px; font-size: 13px; opacity: 0.85; }
.cta-my-directions .my-directions-list { list-style: none; margin: 0 0 10px; padding: 0; }
.cta-my-directions .my-directions-item {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0;
    margin: 0 0 6px; padding: 8px; border: 1px solid rgba(128, 128, 128, 0.35); border-radius: 8px;
}
.cta-my-directions .my-directions-name { flex: 1 1 100%; min-width: 0; font-weight: 600; }
.cta-my-directions .my-directions-need { flex: 1 1 100%; min-width: 0; font-size: 13px; opacity: 0.85; }
.cta-my-directions .my-directions-status { flex: 1 1 140px; min-width: 0; font-weight: 600; }
.cta-my-directions .my-directions-pass .my-directions-status { color: #1b7f3b; }
.cta-my-directions .my-directions-short .my-directions-status,
.cta-my-directions .my-directions-unreachable .my-directions-status { color: #b3261e; }
.cta-my-directions .my-directions-aboveMax .my-directions-status { color: #8a5a00; }
.cta-my-directions .my-directions-missing .my-directions-status { color: #5f6368; }
.cta-my-directions .my-directions-empty { margin: 0 0 6px; font-size: 13px; opacity: 0.85; }
.cta-my-directions .my-directions-select {
    display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
    margin: 0 0 8px; padding: 8px; min-height: 44px; font-size: 16px; text-overflow: ellipsis;
}
.cta-my-directions .my-directions-add,
.cta-my-directions .my-directions-remove {
    min-height: 44px; min-width: 44px; padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.cta-my-directions .my-directions-add { display: block; max-width: 100%; }
.cta-my-directions .my-directions-msg { margin: 6px 0 0; min-height: 0; font-size: 13px; font-weight: 600; }
.cta-my-directions .my-directions-msg:empty { display: none; }
.cta-my-directions .my-directions-disclaimer { margin: 6px 0 0; font-size: 12px; opacity: 0.7; }

/* ===== css/fonts.css ===== */
/* Self-hosted (perf 2026-11-22): Manrope + Source Serif 4, subsets cyrillic+latin, variable woff2; Source Serif: ось opsz зафиксирована на 24, wght 400-700 (подрезка fonttools, -70% веса).
   Заменяет блокирующий CSS fonts.googleapis.com. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-serif-4-italic-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-serif-4-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-serif-4-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/source-serif-4-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== css/brand.css ===== */
/* ============================================================
   PODLEVSKIKH — БРЕНД-СЛОЙ (override для calc.podlevskikh.com)
   Тема поверх styles.css: тёплая бумага, антиква, ОДНО золото.
   Грузится ПОСЛЕ styles.css. Источник токенов: brand-layer.
   ============================================================ */

:root {
  /* — переопределяем палитру сайта (фиолетовый → золото) — */
  --primary:        #9A6A28;  /* было #6366f1 */
  --primary-light:  #B5853C;
  --primary-dark:   #7E551E;
  --secondary:      #9A6A28;  /* = primary → фиолетовые градиенты становятся сплошным золотом */
  --success:        #3E7D55;  --success-light: #4E9A6A;
  --danger:         #B0472F;
  --warning:        #B07A1E;
  --info:           #9A6A28;
  --dark:           #211D16;  /* тёплый почти-чёрный текст */
  --dark-light:     #6B6354;
  --light:          #FCF8F0;
  --gray-100:       #F7F1E5;
  --gray-200:       #E5DCC9;
  --gray-300:       #C7BCA6;

  /* — брендовые токены (для новых правил ниже) — */
  --paper:   #F7F1E5;  --paper-2: #FCF8F0;  --surface: #FFFFFF;
  --ink:     #211D16;  --ink-2:   #6B6354;  --ink-3:   #9A9182;
  --hairline:#E5DCC9;  --hairline-2:#D8CDB6;
  --gold:    #9A6A28;  --gold-deep:#7E551E;  --gold-tint:#EEE2C9; --gold-ink:#6E4A19;
  --navy:    #1C2536;  --navy-2:  #28324A;   --on-navy:#F3EEE2;   --on-navy-2:#A9B0C0;
  --ok-tint: #E4EFE6;  --warn-tint:#F3E8CE;  --stop-tint:#F3E1D9;
  --brand-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --brand-sans:  "Manrope", -apple-system, "Segoe UI", system-ui, sans-serif;
}

/* — фон и базовый шрифт (перебиваем правило * { font-family } ) — */
body { background: var(--paper) !important; color: var(--ink); }
body, body *:not(i):not([class*="icon"]):not([class*="material"]) {
  font-family: var(--brand-sans);
}

/* — заголовки → антиква — */
h1, h2, h3, h4, h5,
.calc-title, .result-title, .section-title, .card-title {
  font-family: var(--brand-serif) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--gold-ink); }

/* ============================================================
   ШАПКА: фиолетовый градиент → тёплая бумага
   ============================================================ */
header {
  background: var(--paper-2) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--hairline) !important;
}
header h1, header p, header summary, header .intro-lead { color: var(--ink); }
header p, header .intro-lead { color: var(--ink-2); }
@media print { header { background: var(--paper-2) !important; } }

/* EN/RU переключатель (бренд .lang-toggle) — на светлой шапке */
.lang-switcher {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  backdrop-filter: none;
}
.lang-btn { color: var(--ink-2); }
.lang-btn:hover { background: var(--gold-tint); color: var(--ink); }
.lang-btn.active { background: var(--ink); color: var(--paper-2); }

/* ============================================================
   КНОПКИ / CTA — сплошное золото
   ============================================================ */
.btn, button.btn, a.btn {
  background: var(--gold);
  color: var(--paper-2);
}
.btn:hover { background: var(--gold-deep); }

/* ============================================================
   ПОДЛОЖКИ-ПОДСКАЗКИ → gold-tint
   ============================================================ */
.tasks-hint, .intro-details, .info-box, .hint, .callout {
  background: var(--gold-tint);
  border-color: var(--hairline-2);
}

/* ============================================================
   ФУТЕР → общий navy
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: var(--on-navy-2);
  margin-top: var(--s7, 48px);
  padding: 40px 16px 28px;
  border-radius: var(--radius, 12px);
}
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-copyright,
.site-footer .footer-requisites,
.site-footer .footer-contacts,
.site-footer .footer-pay-note { color: var(--on-navy-2); }
.site-footer .footer-legal { border-top-color: rgba(255,255,255,.12); }
#footer-author-link, .site-footer .footer-links a { color: #D9B477; }

/* ===== css/header.css ===== */
/* ============================================================
   СЛИМ-ШАПКА (дизайн user data/brand/header-A-final.html)
   Грузится ПОСЛЕ styles.css и brand.css — перебивает старый
   градиентный hero-header. Десктоп: липкая строка-навигация.
   Мобайл: app-bar сжимается при прокрутке + лента-чипсы + меню «⋯».
   Палитра берётся из brand.css (золото), структура — из макета.
   ============================================================ */

/* — сброс старого hero-header — */
header.site-header {
  background: var(--paper-2, #F7F0E1) !important;
  border: 1px solid var(--hairline, #E6DBC2) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 18px !important;
  overflow: visible !important;
  text-align: left;
  position: sticky;
  top: 8px;
  z-index: 40;
  transition: box-shadow .2s ease;
}
header.site-header::before { display: none !important; }
header.site-header.scrolled { box-shadow: 0 8px 22px rgba(70, 50, 20, .12) !important; }

/* — верхняя строка — */
.site-header .hbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  min-height: 62px;
}

/* бренд (иконка + название = h1 для SEO) */
.site-header .hbrand {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: none;
  text-decoration: none;
  color: inherit;
}
.site-header .hbrand-ic {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  background: linear-gradient(135deg, var(--gold, #9A6A23), var(--gold-deep, #7E561D));
}
.site-header .hbrand-name {
  margin: 0;
  font-family: var(--brand-serif, "Source Serif 4", Georgia, serif);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.05;
  color: var(--ink, #2A2724);
  letter-spacing: -0.01em;
}
.site-header .hbrand-short { display: none; }

/* десктоп: название в две строки (как в макете) — освобождает место навигации */
@media (min-width: 768px) {
  .site-header .hbar { min-height: 66px; }
  .site-header .hbrand-name {
    max-width: 200px;
    white-space: normal;
    font-size: 18px;
    line-height: 1.08;
  }
}

/* навигация */
.site-header .hnav {
  display: flex;
  align-items: center;
  gap: 9px 18px;
  flex-wrap: wrap;
}
.site-header .hnav a {
  color: var(--gold-ink, #7C551B);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.site-header .hnav a:hover { color: var(--gold, #9A6A23); text-decoration: underline; }

/* правая группа: промо + язык + кебаб */
.site-header .hright {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.site-header .hpromo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--gold, #9A6A23), var(--gold-deep, #7E561D));
  border-radius: 11px;
  padding: 9px 15px;
  box-shadow: 0 6px 16px rgba(120, 80, 25, .25);
  transition: filter .15s ease, transform .15s ease;
}
.site-header .hpromo:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* язык — в строке (перебиваем absolute из styles.css) */
.site-header .lang-switcher {
  position: static;
  top: auto; right: auto;
  flex: none;
  background: var(--surface, #fff);
  border: 1px solid var(--hairline-2, #D8CDB6);
  backdrop-filter: none;
  padding: 3px;
  border-radius: 11px;
}

/* кебаб (только мобайл-сжатый) */
.site-header .hkebab {
  display: none;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 10px;
  border: 1px solid var(--hairline, #E6DBC2);
  background: #fff;
  color: var(--gold-deep, #7C551B);
  font-size: 18px;
  align-items: center; justify-content: center;
  cursor: pointer;
}

/* чипсы и меню скрыты на десктопе */
.site-header .hchips,
.site-header .hmenu { display: none; }

/* ============================================================
   SEO-абзац «Как считается балл» — теперь на бумаге, не на градиенте
   ============================================================ */
.intro-details {
  margin: 0 0 16px;
  max-width: 820px;
  background: var(--gold-tint, #EEE2C9);
  border: 1px solid var(--hairline, #E6DBC2);
  border-radius: 12px;
  padding: 0;
}
.intro-details > summary {
  color: var(--gold-ink, #7C551B);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 14px;
}
.intro-details[open] > summary { padding-bottom: 6px; }
.intro-details .intro-subtitle {
  color: #5f574a;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 8px;
  padding: 0 14px;
  opacity: 1;
}
.intro-details .intro-lead {
  color: #5f574a;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  padding: 0 14px 14px;
  max-width: 820px;
  opacity: 1;
}

/* ============================================================
   МОБАЙЛ (<768px): app-bar + лента-чипсы + сжатие + меню
   ============================================================ */
@media (max-width: 767px) {
  header.site-header {
    margin-bottom: 12px !important;
    border-radius: 12px !important;
    top: 0;
  }

  .site-header .hbar {
    gap: 10px;
    padding: 11px 14px;
    min-height: 0;
  }
  .site-header .hbrand { gap: 10px; flex: 1; min-width: 0; }
  .site-header .hbrand-ic {
    width: 30px; height: 30px;
    font-size: 15px; border-radius: 9px;
    transition: .2s ease;
  }
  .site-header .hbrand-name { font-size: 15.5px; flex: 1; min-width: 0; }
  .site-header .hbrand-full { display: block; }
  .site-header .hbrand-short {
    display: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* ссылки и промо уезжают в чипсы/меню */
  .site-header .hnav { display: none; }
  .site-header .hpromo { display: none; }
  .site-header .hright { margin-left: auto; gap: 8px; }

  /* лента-чипсы */
  .site-header .hchips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 14px 11px;
    scrollbar-width: none;
    border-top: 1px solid #EFE7D4;
    transition: max-height .22s ease, opacity .22s ease, padding .22s ease;
  }
  .site-header .hchips::-webkit-scrollbar { display: none; }
  .site-header .hchips a {
    flex: none;
    background: var(--gold-tint, #E9DFC6);
    color: var(--gold-ink, #7C551B);
    font-weight: 700;
    font-size: 12.5px;
    border-radius: 999px;
    padding: 7px 13px;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--hairline, #E6DBC2);
  }
  .site-header .hchips a.hchip-promo {
    background: linear-gradient(135deg, var(--gold, #9A6A23), var(--gold-deep, #7E561D));
    color: #fff;
    border-color: transparent;
  }

  /* сжатое состояние (при прокрутке) */
  header.site-header.cond .hbar { padding-top: 8px; padding-bottom: 8px; }
  header.site-header.cond .hbrand-ic { width: 26px; height: 26px; font-size: 13px; }
  /* scrolled/condensed: держим бренд в одну строку (логотип теперь один текст-узел, без full/short) */
  header.site-header.cond .hbrand-name {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  header.site-header.cond .lang-switcher { display: none; }
  header.site-header.cond .hkebab { display: flex; }
  header.site-header.cond .hchips {
    max-height: 0;
    padding-top: 0; padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    border-top: 0;
  }

  /* меню «⋯» */
  .site-header .hmenu {
    position: absolute;
    top: 52px; right: 12px;
    z-index: 60;
    width: 252px;
    background: #fff;
    border: 1px solid var(--hairline, #E6DBC2);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(60, 40, 15, .22);
    overflow: hidden;
    display: block;
  }
  .site-header .hmenu[hidden] { display: none; }
  .site-header .hmenu .promo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    background: linear-gradient(135deg, var(--gold, #9A6A23), var(--gold-deep, #7E561D));
  }
  .site-header .hmenu a:not(.promo-row) {
    display: block;
    padding: 12px 15px;
    color: var(--gold-ink, #7C551B);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border-top: 1px solid #F0E8D5;
  }

  /* — перебиваем старые html.mobile-app header-правила из styles.css — */
  html.mobile-app header.site-header {
    padding: 0 !important;
    margin-bottom: 12px !important;
    text-align: left;
  }
  html.mobile-app header.site-header .hbrand-name {
    font-size: 15.5px !important;
    line-height: 1.05;
    margin: 0;
  }
  html.mobile-app header.site-header.cond .hbrand-name { font-size: 15px !important; }
  html.mobile-app header.site-header .lang-switcher {
    position: static !important;
    top: auto !important; right: auto !important;
    transform: none !important;
  }
}

/* Телефон: уплотнение всего, что выше результата ЕГЭ, — блок «следующий шаг»
   должен начинаться не ниже 1600px на 360×800. Только отступы, кегль h1 и сетка
   заданий; клетки и поля не меньше 44px, ничего не скрыто. */
@media (max-width: 479px) {
  .site-header { margin-bottom: 8px; }
  .control-panel.card { padding-top: 10px; gap: 8px; }
  .control-panel .panel-heading { font-size: 1.25rem; line-height: 1.25; }
  .control-panel .form-group,
  .control-panel .exam-info-block,
  .control-panel .score-hero,
  .control-panel .tabs { margin-bottom: 0; }
  .control-panel .subject-chips { margin-top: 6px; }
  .control-panel .exam-info-block { padding-top: 6px; padding-bottom: 6px; }
  .control-panel .exam-info-countdown { margin-bottom: 2px; padding-bottom: 2px; }
  .control-panel .score-hero { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .control-panel .tasks-section { margin-top: 0; }
  .control-panel .tasks-section h2 { margin-bottom: 8px; }
  .control-panel .tasks-hint { margin-top: -4px; margin-bottom: 0; }
  .control-panel .tasks-container { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; margin-top: 8px; }
  .control-panel .tasks-container .task-item { min-height: 48px; padding-left: 2px; padding-right: 2px; }
  .control-panel .tasks-container .task-item:not(.selected) { padding-top: 10px; padding-bottom: 10px; }
  .control-panel .tasks-container .task-slider-container { padding-left: 3px; padding-right: 3px; }
}
