/* УмБаза — Light Design System */

:root {
    --bg-base: #fbfcff;
    --bg-gradient-mid: #f1f4ff;
    --text-primary: #101528;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-cyan: #0099ff;
    --accent-blue: #2563eb;
    --accent-violet: #7c3aed;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-strong-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(59, 130, 246, 0.18);
    --glass-shadow: 0 24px 70px rgba(63, 81, 181, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(148, 163, 184, 0.35);
    --neon-glow: 0 0 40px rgba(0, 153, 255, 0.15);
    --brand-gradient: linear-gradient(135deg, #2563eb 8%, #0099ff 54%, #7c3aed 100%);
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    background: radial-gradient(circle at 50% -12%, rgba(255,255,255,.98) 0 24%, rgba(228,246,255,.72) 38%, transparent 56%), linear-gradient(145deg, #fbfdff 0%, var(--bg-gradient-mid) 48%, #f8f1ff 100%);
    min-height: 100vh;
    color: var(--text-primary);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .32; background-image: radial-gradient(rgba(79,70,229,.15) .6px, transparent .6px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 70%); }

/* Glass surfaces */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: var(--glass-strong-bg);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(59, 130, 246, 0.22);
    box-shadow: var(--glass-shadow);
}

/* Glass orbs — iridescent spheres on edges */
.glass-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(200, 230, 255, 0.4) 25%,
        rgba(147, 197, 253, 0.25) 50%,
        rgba(167, 139, 250, 0.15) 75%,
        transparent 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        inset -8px -8px 20px rgba(255, 255, 255, 0.8),
        inset 8px 8px 20px rgba(59, 130, 246, 0.12),
        0 8px 40px rgba(37, 99, 235, 0.12),
        0 0 60px rgba(0, 153, 255, 0.08);
}

.glass-orb::after {
    content: '';
    position: absolute;
    top: 12%;
    left: 18%;
    width: 35%;
    height: 25%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
    filter: blur(2px);
}

.glass-orb-sm {
    width: 5rem;
    height: 5rem;
}

.glass-orb-md {
    width: 8rem;
    height: 8rem;
}

.glass-orb-lg {
    width: 12rem;
    height: 12rem;
}

.glass-orb-xl {
    width: 16rem;
    height: 16rem;
}

/* Neon gradient spots (subtle background) */
.sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.45;
}

.sphere-cyan {
    background: radial-gradient(circle, rgba(0, 153, 255, 0.35) 0%, transparent 70%);
}

.sphere-violet {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.2) 0%, transparent 70%);
}

.sphere-blue {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
}

/* Glass prisms */
.glass-prism {
    position: absolute;
    pointer-events: none;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(200, 230, 255, 0.35) 40%,
        rgba(167, 139, 250, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 22%;
    box-shadow:
        inset 0 0 20px rgba(255, 255, 255, 0.6),
        0 8px 32px rgba(37, 99, 235, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.glass-prism::before, .glass-prism::after { content: ''; position: absolute; inset: 10%; border: 1px solid rgba(112,182,255,.32); border-radius: 18%; transform: rotate(18deg); }
.glass-prism::after { inset: 25%; transform: rotate(45deg); border-color: rgba(224,104,255,.25); }

.glass-prism-sm { width: 3.5rem; height: 3.5rem; }
.glass-prism-md { width: 5rem; height: 5rem; }
.glass-prism-lg { width: 7rem; height: 7rem; }

/* Site footer */
.site-footer {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1.5rem;
    }
}

.footer-ministry {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
}

.footer-ministry img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-ministry p {
    font-size: 0.7rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.footer-partners {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-partners img {
    height: 2.25rem;
    width: auto;
    max-width: 7rem;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-partner-link {
    display: inline-flex;
    align-items: center;
}

.footer-partner-link:hover img {
    opacity: 1;
}

.footer-payment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-payment {
        align-items: flex-end;
        text-align: right;
    }
}

/* Nav — одна строка */
.site-nav {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.site-nav__inner {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 4rem;
    padding: 0.75rem 0;
    overflow: hidden;
}

.site-nav__socials {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.site-nav__social-vk {
    margin-left: auto;
}

.site-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.site-nav__logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(232,244,255,.78));
    border: 1px solid rgba(80, 146, 255, 0.24);
    box-shadow: 0 8px 22px rgba(37, 99, 235, .14), inset 0 1px 0 rgba(255,255,255,.98);
    overflow: hidden;
}

.brand-mark {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 8px 16px rgba(37, 99, 235, .18));
}

.brand-mark--nav {
    width: 100%;
    height: 100%;
    transform: none;
}

.brand-logo-compact {
    width: 2rem;
    height: 2rem;
    border-radius: .7rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(232,244,255,.78));
    border: 1px solid rgba(80,146,255,.22);
    box-shadow: 0 6px 18px rgba(37,99,235,.12), inset 0 1px 0 rgba(255,255,255,.96);
}

.brand-mark--compact {
    width: 2rem;
    height: 2rem;
    transform: scale(1.36) translateY(1px);
}

.article-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--text-primary);
    font-weight: 700;
}

.hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto .45rem;
    text-align: center;
}

.hero-brand__overline {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .4rem;
    color: #31538d;
    font-size: .68rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hero-brand__overline::before,
.hero-brand__overline::after {
    content: '';
    width: 1.8rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,.38));
}

.hero-brand__overline::after {
    transform: rotate(180deg);
}

.hero-brand__mark-wrap {
    position: relative;
    width: 5.75rem;
    height: 5.75rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-brand__glow {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,153,255,.26), rgba(124,58,237,.10) 54%, transparent 72%);
    filter: blur(16px);
    pointer-events: none;
}

.brand-mark--hero {
    position: relative;
    z-index: 1;
    width: 5.75rem;
    height: 5.75rem;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
    transform: none;
    filter: drop-shadow(0 14px 22px rgba(37,99,235,.16));
}

@media (max-width: 480px) {
    .hero-brand__overline {
        font-size: .6rem;
        letter-spacing: .13em;
    }

    .hero-brand__overline::before,
    .hero-brand__overline::after {
        width: 1rem;
    }

    .hero-brand__mark-wrap,
    .brand-mark--hero {
        width: 4.75rem;
        height: 4.75rem;
    }
}

.site-nav__title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    white-space: nowrap;
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav__links::-webkit-scrollbar { display: none; }

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--accent-blue);
}

.nav-link.is-active {
    color: var(--accent-blue);
    font-weight: 700;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    flex-shrink: 0;
    border-radius: 0.625rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 0;
}

.social-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18);
}

.social-icon img {
    display: block;
    object-fit: contain;
}

.social-icon--app {
    width: 2.25rem;
    height: 2.25rem;
}

.social-icon--app img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.625rem;
}

.btn-account {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, #0099ff 0%, #2563eb 100%);
    color: #fff;
    transition: all 0.2s;
    white-space: nowrap;
    flex: 0 0 auto;
    flex-shrink: 0;
}

.btn-account:hover {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

@media (max-width: 899px) {
    .site-nav__inner {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: .45rem .65rem;
        padding-top: .6rem;
        padding-bottom: .5rem;
        overflow: visible;
    }

    .site-nav__brand {
        grid-column: 1;
    }

    .site-nav__links {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        width: 100%;
        gap: 1rem;
        padding: .15rem 0 .25rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
    }

    .site-nav__links .nav-link { scroll-snap-align: start; }

    .site-nav__socials {
        grid-column: 2;
        justify-self: end;
        margin-left: auto;
        gap: 0.2rem;
    }

    .site-nav__inner > .btn-account {
        grid-column: 3;
    }

    .social-icon--app {
        width: 2rem;
        height: 2rem;
    }

    .btn-account {
        padding: 0.45rem 0.55rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 420px) {
    .site-nav__title { display: none; }

    .social-icon--app {
        width: 1.75rem;
        height: 1.75rem;
    }

    .btn-account { padding-inline: .55rem; }
}

.guest-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.guest-hint-warning {
    color: #b45309;
}

/* FAQ accordion */
.faq-item summary::-webkit-details-marker {
    display: none;
}

/* Payment modal */
.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.payment-modal.active {
    display: flex;
}

.payment-modal-card {
    max-width: 24rem;
    width: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}


/* Greeting hero */
.greeting-hero {
    min-height: 3.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.greeting-text {
    font-size: clamp(2rem, 5.2vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.15;
    white-space: nowrap;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

.greeting-text--slogan {
    white-space: normal;
    max-width: 16ch;
    margin-inline: auto;
}

@media (max-width: 640px) {
    .greeting-text {
        font-size: clamp(1.35rem, 5.5vw, 2rem);
        letter-spacing: -0.04em;
    }

    .greeting-hero {
        min-height: 2.8rem;
    }

    .greeting-text--slogan {
        max-width: 12ch;
    }
}

.premium-panel { position: relative; overflow: hidden; }
.premium-panel::before { content: ''; position: absolute; width: 220px; height: 220px; right: -90px; top: -120px; border-radius: 50%; background: conic-gradient(from 90deg, rgba(91,197,255,.4), rgba(218,142,255,.35), rgba(255,255,255,.2)); filter: blur(12px); }
.section-heading { max-width: 700px; margin: 0 auto 2rem; text-align: center; }
.section-heading span, .plan-kicker { color: var(--accent-blue); font-size: .7rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.section-heading h2 { margin-top: .65rem; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.12; letter-spacing: -.04em; font-weight: 750; }
.section-heading p { max-width: 35rem; margin: .85rem auto 0; color: var(--text-secondary); font-size: .92rem; line-height: 1.65; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 1.6rem; border-radius: 1.5rem; overflow: hidden; transition: transform .35s ease, box-shadow .35s ease; }
.plan-card:hover { transform: translateY(-6px) rotateX(2deg); box-shadow: 0 28px 80px rgba(70,82,180,.16); }
.plan-price { display: flex; align-items: baseline; gap: .4rem; margin: .55rem 0 .75rem; }
.plan-price strong { font-size: clamp(1.85rem, 3vw, 2.35rem); line-height: 1; letter-spacing: -.055em; }
.plan-price span { color: var(--text-muted); font-size: .78rem; font-weight: 700; }
.plan-audience { color: var(--text-secondary); font-size: .82rem; line-height: 1.55; min-height: 3.85rem; }
.plan-features { display: grid; gap: .68rem; margin-top: 1.25rem; color: var(--text-secondary); font-size: .78rem; line-height: 1.45; }
.plan-features li { position: relative; padding-left: 1.35rem; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; top: .02rem; display: grid; place-items: center; width: .95rem; height: .95rem; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)); font-size: .58rem; font-weight: 900; }
.plan-featured { border-color: rgba(80,118,255,.4); background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(231,241,255,.82)); box-shadow: 0 28px 80px rgba(70,82,180,.13); }
.plan-ribbon { position: absolute; top: 1rem; right: -2.15rem; width: 8rem; padding: .28rem 0; transform: rotate(36deg); color: #fff; background: var(--brand-gradient); text-align: center; font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-link { display: inline-block; margin-top: 1rem; color: var(--accent-blue); font-size: .82rem; font-weight: 700; }
.plan-link--button { width: 100%; margin-top: auto; padding: .8rem 1rem; border: 1px solid rgba(37,99,235,.22); border-radius: .9rem; background: rgba(255,255,255,.72); text-align: center; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.plan-link--button:hover { color: #fff; background: var(--brand-gradient); box-shadow: 0 10px 26px rgba(37,99,235,.22); }
.plan-features + .plan-link--button { margin-top: 1.5rem; }
.plan-free-note { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; max-width: 54rem; margin: 0 auto 1rem; padding: .85rem 1rem; border-radius: 1rem; }
.plan-free-note__mark { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .8rem; color: var(--accent-blue); background: rgba(37,99,235,.09); font-size: .72rem; font-weight: 800; }
.plan-free-note p { color: var(--text-secondary); font-size: .78rem; line-height: 1.5; }
.plan-free-note strong { color: var(--text-primary); }
.plan-free-note a { color: var(--accent-blue); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.plan-launch-note { margin-top: 1rem; color: var(--text-muted); font-size: .72rem; line-height: 1.5; text-align: center; }
.support-fab { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 50; display: flex; align-items: center; gap: .55rem; padding: .55rem .9rem .55rem .55rem; border-radius: 999px; color: #fff; background: rgba(21,35,75,.88); backdrop-filter: blur(18px); box-shadow: 0 16px 45px rgba(30,41,90,.24); }
.support-fab span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: linear-gradient(135deg, #70d6ff, #8b5cf6); font-weight: 800; }
.support-fab em { font-size: .76rem; font-style: normal; font-weight: 700; }
.support-card { position: relative; }
.modal-close { position: absolute; right: 1rem; top: .75rem; font-size: 1.5rem; color: var(--text-muted); }
@media (max-width: 767px) { .plan-grid { grid-template-columns: 1fr; } .plan-audience { min-height: auto; } .plan-free-note { grid-template-columns: auto 1fr; } .plan-free-note a { grid-column: 2; } .support-fab em { display: none; } .support-fab { padding: .5rem; } }

/* SEO hub: «Репетитор по предметам» */
.tutor-hero { position: relative; overflow: hidden; padding: clamp(1.5rem, 5vw, 3rem); border-radius: 2rem; }
.tutor-hero::after { content: '∑'; position: absolute; right: clamp(1rem, 6vw, 3rem); top: 50%; transform: translateY(-52%) rotate(-8deg); color: rgba(37,99,235,.08); font-size: clamp(6rem, 19vw, 11rem); font-weight: 800; line-height: 1; pointer-events: none; }
.tutor-hero__content { position: relative; z-index: 1; max-width: 38rem; }
.tutor-subjects { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.35rem; }
.tutor-subjects span { padding: .42rem .72rem; border: 1px solid rgba(37,99,235,.14); border-radius: 999px; color: var(--text-secondary); background: rgba(255,255,255,.72); font-size: .7rem; font-weight: 700; }
.tutor-empty { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; padding: 1.35rem; border-radius: 1.25rem; }
.tutor-empty__icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .85rem; color: #fff; background: var(--brand-gradient); font-size: 1.1rem; font-weight: 800; box-shadow: 0 10px 28px rgba(37,99,235,.2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #0099ff 0%, #2563eb 100%);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: #fff;
    border-radius: 0.875rem;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3), 0 0 30px rgba(0, 153, 255, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00aaff 0%, #3b82f6 100%);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.4), 0 0 40px rgba(0, 153, 255, 0.25);
    transform: translateY(-1px);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--input-border);
    color: var(--text-secondary);
    border-radius: 0.875rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background: #fff;
    border-color: rgba(37, 99, 235, 0.35);
    color: var(--accent-blue);
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-ghost:hover {
    color: var(--accent-blue);
}

/* Level selector */
.levels-cta {
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.levels-cta__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.levels-cta__badge::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: levelsBadgePulse 2s ease-in-out infinite;
}

@keyframes levelsBadgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.level-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--input-border);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    text-align: left;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
    color: var(--text-primary);
}

.level-btn--cta {
    padding: 1.35rem 1.5rem 1.25rem;
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(255, 255, 255, 0.88);
}

.level-btn__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.55rem;
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.level-btn__mark--violet {
    color: var(--accent-violet);
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.15);
}

.level-btn--hint::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid rgba(37, 99, 235, 0.35);
    opacity: 0;
    pointer-events: none;
    animation: levelRingPulse 2.6s ease-in-out infinite;
}

.level-btn--hint:nth-child(2)::after {
    animation-delay: 0.45s;
}

.level-btn--hint:nth-child(3)::after {
    animation-delay: 0.9s;
}

@keyframes levelRingPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    45%, 55% { opacity: 0.75; transform: scale(1.015); }
}

.level-btn:hover:not(.level-btn-disabled):not(.level-btn-active) {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: var(--neon-glow);
}

.level-btn-active {
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 30px rgba(0, 153, 255, 0.15);
}

.level-btn-active::after,
.level-btn-active.level-btn--hint::after {
    animation: none;
    opacity: 0;
}

.level-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compact steps — вторичный блок после CTA */
.hero-steps--compact {
    opacity: 0.92;
}

.hero-steps__label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.step-card--compact {
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.step-card__num {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.12);
    margin-bottom: 0.5rem;
}

.step-card__num--violet {
    color: var(--accent-violet);
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .levels-cta__badge::before,
    .level-btn--hint::after {
        animation: none;
    }
}

.badge-soon {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-violet);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Workspace panel */
.workspace-panel {
    display: none;
    opacity: 0;
}

.workspace-panel.is-visible {
    display: block;
    opacity: 1;
}

.level-selected-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Hero animations */
.hero-badge,
.hero-greeting,
.hero-about,
.hero-steps,
.hero-levels {
    opacity: 0;
    transform: translateY(20px);
}

.step-card {
    opacity: 0;
    transform: translateY(24px);
}

/* Form inputs */
.input-glass {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.input-glass::placeholder {
    color: var(--text-muted);
}

.input-glass:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-glass option {
    background: #fff;
    color: var(--text-primary);
}

/* Lesson page */
.lesson-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.lesson-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.lesson-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.lesson-content ul,
.lesson-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.lesson-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.lesson-content ul li {
    list-style-type: disc;
}

.lesson-content ol li {
    list-style-type: decimal;
}

.lesson-content strong {
    color: var(--text-primary);
}

.lesson-content .katex-display {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.875rem;
    border: 1px solid var(--input-border);
    overflow-x: auto;
}

/* Quiz */
.quiz-option {
    padding: 1rem;
    border-radius: 0.875rem;
    border: 1px solid var(--input-border);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.quiz-option:hover {
    border-color: rgba(37, 99, 235, 0.4);
    background: rgba(37, 99, 235, 0.04);
}

.quiz-option.selected {
    border-color: rgba(37, 99, 235, 0.55);
    background: rgba(37, 99, 235, 0.08);
}

.quiz-option.correct {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.08);
}

.quiz-option.incorrect {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.08);
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.gen-status {
    font-size: 0.875rem;
    color: var(--text-muted);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Image gallery */
.lesson-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

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

.lesson-gallery img {
    width: 100%;
    height: 14rem;
    object-fit: contain;
    background: #f4f6f8;
    border-radius: 0.875rem;
    border: 1px solid var(--input-border);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0.5rem;
}

.lesson-gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.image-attribution {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.image-attribution a {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 50;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

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

.toast-success {
    background: rgba(34, 197, 94, 0.95);
    color: #fff;
    backdrop-filter: blur(8px);
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    backdrop-filter: blur(8px);
}

.toast-info {
    background: rgba(37, 99, 235, 0.95);
    color: #fff;
    backdrop-filter: blur(8px);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.875rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* Text utilities */
.text-theme-primary { color: var(--text-primary); }
.text-theme-secondary { color: var(--text-secondary); }
.text-theme-muted { color: var(--text-muted); }
.border-theme { border-color: rgba(148, 163, 184, 0.2); }

/* —— Prize roulette —— */
.prize-roulette-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

.prize-roulette-modal.hidden { display: none; }

.prize-roulette-modal__card {
    width: min(100%, 52rem);
    background: linear-gradient(155deg, rgba(255,255,255,.98) 0%, rgba(238,247,255,.96) 58%, rgba(241,235,255,.96) 100%);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 2rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    padding: clamp(1.25rem, 4vw, 2.25rem);
    text-align: center;
}

.prize-roulette {
    width: 100%;
}

.prize-roulette__viewport {
    position: relative;
    height: 14rem;
    overflow: hidden;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(0,153,255,.18), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,.9), rgba(228,240,255,.92));
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 18px 45px rgba(37,99,235,.12);
}

.prize-roulette__track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.prize-roulette__cell {
    flex: 0 0 210px;
    width: 210px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem;
    box-sizing: border-box;
    border-right: 1px solid rgba(37,99,235,.12);
}

.prize-roulette__cell img {
    width: 10.5rem;
    height: 8.5rem;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(37,99,235,.2));
    background: transparent;
}

.prize-roulette__cell span {
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--text-primary);
    max-width: 11rem;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prize-roulette__cell.is-winner {
    background: linear-gradient(180deg, rgba(0,153,255,.16), rgba(124,58,237,.12));
    box-shadow: inset 0 0 0 2px rgba(37,99,235,.6), 0 0 35px rgba(37,99,235,.2);
}

.prize-roulette__pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 118%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(37,99,235,.55));
}

.prize-roulette-modal__result {
    margin-top: 1rem;
    min-height: 2.5rem;
}

@media (max-width: 640px) {
    .prize-roulette-modal__card { border-radius: 1.5rem; padding: 1.1rem; }
    .prize-roulette__viewport { height: 11.5rem; }
    .prize-roulette__cell { flex-basis: 160px; width: 160px; padding: .65rem; }
    .prize-roulette__cell img { width: 8rem; height: 6.8rem; }
}

/* —— Plans page —— */
.plans-hero { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: clamp(1.5rem, 5vw, 4rem); align-items: end; }
.plans-hero__eyebrow { color: var(--accent-blue); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.plans-hero h1 { max-width: 13ch; margin-top: .75rem; font-size: clamp(2.35rem, 7vw, 5.2rem); line-height: .94; letter-spacing: -.065em; font-weight: 800; }
.plans-hero > div > p { max-width: 38rem; margin-top: 1.2rem; color: var(--text-secondary); line-height: 1.7; }
.plans-hero__lesson { position: relative; padding: 1.35rem; border-left: 2px solid rgba(37,99,235,.3); }
.plans-hero__lesson span { color: var(--accent-blue); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.plans-hero__lesson strong { display: block; margin: .1rem 0 -.25rem; color: var(--text-primary); font-size: 5.5rem; line-height: 1; letter-spacing: -.09em; }
.plans-hero__lesson p { color: var(--text-secondary); font-size: .78rem; line-height: 1.45; }
.plans-hero__lesson a { display: inline-block; margin-top: .8rem; color: var(--accent-blue); font-size: .76rem; font-weight: 800; }
.limit-notice { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 1rem 1.15rem; border-radius: 1rem; }
.limit-notice.hidden { display: none; }
.limit-notice__mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .8rem; color: #fff; background: var(--brand-gradient); font-weight: 800; }
.limit-notice strong { color: var(--text-primary); font-size: .9rem; }
.limit-notice p { margin-top: .15rem; color: var(--text-secondary); font-size: .76rem; }
.plan-card--suggested { outline: 3px solid rgba(0,153,255,.28); outline-offset: 4px; }
.plan-link--button:disabled { opacity: .65; cursor: wait; }
.payment-state { min-height: 1.5rem; margin-top: 1rem; color: var(--text-secondary); font-size: .78rem; text-align: center; }
.payment-state--error { color: #dc2626; }
.payment-trust { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .65rem; margin-top: .2rem; }
.payment-trust img { width: auto; height: 1.25rem; object-fit: contain; opacity: .78; }
.payment-trust .plan-launch-note { width: 100%; margin-top: 0; }
@media (max-width: 767px) {
    .plans-hero { grid-template-columns: 1fr; }
    .plans-hero__lesson { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; border-left: 0; border-top: 2px solid rgba(37,99,235,.2); }
    .plans-hero__lesson span, .plans-hero__lesson a { grid-column: 1 / -1; }
    .plans-hero__lesson strong { font-size: 4.5rem; }
}

/* —— Leaderboard —— */
.leaderboard-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 1rem;
    border-radius: 0.85rem;
}

.leaderboard-row--me {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.leaderboard-row--top {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), transparent);
}

.leaderboard-rank {
    font-weight: 800;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.leaderboard-rank--gold { color: #d97706; }
.leaderboard-rank--silver { color: #64748b; }
.leaderboard-rank--bronze { color: #b45309; }

/* —— News feed and publisher —— */
.news-section-heading { display: flex; align-items: end; gap: 1.25rem; margin-bottom: 1.25rem; }
.news-section-heading__line { flex: 1; height: 1px; margin-bottom: .35rem; background: linear-gradient(90deg, rgba(37,99,235,.25), transparent); }
.news-feed-card { overflow: hidden; border: 1px solid rgba(37,99,235,.12); transition: transform .25s ease, box-shadow .25s ease; }
.news-feed-card:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(37,99,235,.12); }
.news-feed-card__media { display: block; aspect-ratio: 16 / 8.5; overflow: hidden; background: #eaf1ff; }
.news-feed-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.news-feed-card:hover .news-feed-card__media img { transform: scale(1.025); }
.news-feed-card__body { padding: clamp(1.25rem, 4vw, 1.75rem); }
.news-feed-card__meta, .news-preview-card__meta { display: flex; align-items: center; gap: .55rem; color: var(--text-muted); font-size: .72rem; font-weight: 600; }
.news-feed-card__dot, .news-preview-card__meta span { width: .48rem; height: .48rem; border-radius: 50%; background: var(--accent-blue); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.news-feed-card__title { overflow-wrap: anywhere; margin: .7rem 0 .55rem; color: var(--text-primary); font-size: calc(var(--news-title-size, 2.25rem) * .667); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.news-feed-card__title a:hover { color: var(--accent-blue); }
.news-feed-card__excerpt { color: var(--text-secondary); font-size: .9rem; line-height: 1.7; }
.news-feed-card__read-more { display: inline-flex; margin-top: 1rem; color: var(--accent-blue); font-size: .8rem; font-weight: 800; }

.news-article-header { max-width: 45rem; margin-bottom: 2rem; }
.news-article-kicker { display: flex; align-items: center; gap: .65rem; color: var(--accent-blue); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.news-article-kicker span { width: 1.8rem; height: 2px; background: var(--brand-gradient); }
.news-article-header h1 { overflow-wrap: anywhere; margin: 1rem 0 1.2rem; color: var(--text-primary); font-size: var(--news-title-size, 2.25rem); font-weight: 800; line-height: 1.08; letter-spacing: -.045em; }
.news-article-header > p { max-width: 42rem; color: var(--text-secondary); font-size: clamp(1rem, 2.5vw, 1.2rem); line-height: 1.7; }
.news-article-image { width: 100%; max-height: 34rem; margin: 0 0 1.5rem; border-radius: 1.5rem; object-fit: cover; box-shadow: 0 24px 60px rgba(37,99,235,.15); }
.news-article-content { padding: clamp(1.5rem, 5vw, 3rem); color: var(--text-primary); font-size: clamp(1rem, 2vw, 1.08rem); line-height: 1.85; }
.news-article-content p + p { margin-top: 1.35em; }
.news-article-content p { white-space: pre-line; }
.news-article-footer { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(148,163,184,.22); }
.news-article-footer a, .news-article-error a { color: var(--accent-blue); font-size: .85rem; font-weight: 800; }
.news-article-loading { min-height: 18rem; display: flex; align-items: center; justify-content: center; gap: .45rem; color: var(--text-muted); }
.news-article-loading span { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent-blue); animation: news-loading 1.2s infinite ease-in-out; }
.news-article-loading span:nth-child(2) { animation-delay: .12s; }
.news-article-loading span:nth-child(3) { animation-delay: .24s; }
.news-article-loading p { margin-left: .5rem; font-size: .8rem; }
.news-article-error { padding: 2rem; text-align: center; }
.news-article-error a { display: inline-block; margin-top: .75rem; }
@keyframes news-loading { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-7px); opacity: 1; } }

.news-editor-page { background: radial-gradient(circle at 80% 10%, rgba(124,58,237,.09), transparent 30rem), radial-gradient(circle at 5% 40%, rgba(0,153,255,.08), transparent 28rem), var(--bg-base); }
.news-editor-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; margin-bottom: 2.25rem; }
.news-editor-eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--accent-blue); font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.news-editor-eyebrow span { width: 2rem; height: 2px; background: var(--brand-gradient); }
.news-editor-hero h1 { margin: .7rem 0 .7rem; color: var(--text-primary); font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: .96; font-weight: 800; letter-spacing: -.06em; }
.news-editor-hero p { max-width: 42rem; color: var(--text-secondary); line-height: 1.65; }
.news-editor-steps { display: flex; align-items: center; gap: .55rem; padding-bottom: .35rem; }
.news-editor-steps span { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid rgba(148,163,184,.3); border-radius: 50%; color: var(--text-muted); font-size: .65rem; font-weight: 800; }
.news-editor-steps span.is-active { border-color: transparent; color: #fff; background: var(--brand-gradient); box-shadow: 0 8px 20px rgba(37,99,235,.25); }
.news-editor-steps i { width: 1.6rem; height: 1px; background: rgba(148,163,184,.3); }
.editor-access-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.4rem; }
.editor-access-card strong { color: var(--text-primary); font-size: .9rem; }
.editor-access-card p { margin-top: .1rem; color: var(--text-muted); font-size: .75rem; }
.editor-access-card--denied .btn-primary { margin-left: auto; padding: .65rem 1rem; font-size: .75rem; }
.editor-spinner { width: 1.8rem; height: 1.8rem; border: 2px solid rgba(37,99,235,.15); border-top-color: var(--accent-blue); border-radius: 50%; animation: editor-spin .75s linear infinite; }
.editor-access-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .65rem; color: #dc2626; background: rgba(220,38,38,.1); font-weight: 800; }
@keyframes editor-spin { to { transform: rotate(360deg); } }
.news-editor-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(18rem, .7fr); gap: clamp(1.25rem, 4vw, 2.5rem); align-items: start; }
.news-editor-form { padding: clamp(1.25rem, 4vw, 2.25rem); border: 1px solid rgba(37,99,235,.12); }
.editor-form-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin-bottom: 1.75rem; }
.editor-form-head span { color: var(--accent-blue); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.editor-form-head h2 { margin-top: .25rem; color: var(--text-primary); font-size: 1.55rem; font-weight: 800; letter-spacing: -.035em; }
.editor-form-head .editor-account { max-width: 13rem; overflow: hidden; color: var(--text-muted); font-size: .65rem; letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.editor-field { display: block; margin-top: 1.35rem; }
.editor-field__label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; color: var(--text-primary); font-size: .77rem; font-weight: 800; }
.editor-field__label b { color: var(--text-muted); font-size: .65rem; font-weight: 600; }
.editor-field input[type="text"], .editor-field textarea { width: 100%; border: 1px solid rgba(148,163,184,.3); border-radius: 1rem; outline: none; background: rgba(255,255,255,.72); color: var(--text-primary); font: inherit; font-size: .9rem; line-height: 1.65; transition: border-color .2s, box-shadow .2s, background .2s; }
.editor-field input[type="text"] { padding: .9rem 1rem; }
.editor-field textarea { min-height: 5.5rem; padding: 1rem; resize: vertical; }
.editor-field input:focus, .editor-field textarea:focus { border-color: rgba(37,99,235,.5); background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.editor-field input[type="range"] { width: 100%; accent-color: var(--accent-blue); cursor: pointer; }
.editor-field output { color: var(--text-muted); font-weight: 600; }
.editor-field small { display: block; margin-top: .4rem; color: var(--text-muted); font-size: .68rem; line-height: 1.45; }
.news-image-drop { display: flex; align-items: center; gap: 1rem; min-height: 7rem; padding: 1.2rem; border: 1.5px dashed rgba(37,99,235,.3); border-radius: 1.15rem; background: linear-gradient(135deg, rgba(239,246,255,.8), rgba(245,243,255,.7)); cursor: pointer; transition: border-color .2s, transform .2s, background .2s; }
.news-image-drop:hover, .news-image-drop.is-dragging { border-color: var(--accent-blue); background: rgba(239,246,255,.95); transform: translateY(-1px); }
.news-image-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.news-image-drop__icon { display: grid; flex: 0 0 auto; place-items: center; width: 3rem; height: 3rem; border-radius: 1rem; color: #fff; background: var(--brand-gradient); box-shadow: 0 10px 24px rgba(37,99,235,.22); }
.news-image-drop__icon svg { width: 1.35rem; height: 1.35rem; }
.news-image-drop strong { display: block; color: var(--text-primary); font-size: .82rem; }
.news-image-drop small { margin-top: .25rem; }
.selected-image { display: grid; grid-template-columns: 3.5rem 1fr auto; gap: .8rem; align-items: center; margin-top: .65rem; padding: .65rem; border: 1px solid rgba(37,99,235,.14); border-radius: .9rem; background: rgba(255,255,255,.75); }
.selected-image img { width: 3.5rem; height: 3.5rem; border-radius: .65rem; object-fit: cover; }
.selected-image strong { display: block; max-width: 20rem; overflow: hidden; color: var(--text-primary); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.selected-image small { margin-top: .1rem; }
.selected-image button { width: 2rem; height: 2rem; border-radius: .65rem; color: var(--text-muted); font-size: 1.25rem; }
.selected-image button:hover { color: #dc2626; background: rgba(220,38,38,.08); }
.editor-message { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; padding: .9rem 1rem; border-radius: .9rem; font-size: .75rem; font-weight: 700; }
.editor-message--success { color: #047857; background: rgba(16,185,129,.1); }
.editor-message--error { color: #b91c1c; background: rgba(239,68,68,.09); }
.editor-message a { text-decoration: underline; white-space: nowrap; }
.editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid rgba(148,163,184,.2); }
.editor-actions p { display: flex; align-items: center; gap: .5rem; max-width: 16rem; color: var(--text-muted); font-size: .67rem; line-height: 1.45; }
.editor-actions p span { flex: 0 0 auto; width: .48rem; height: .48rem; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.1); }
.editor-publish-button { display: inline-flex; align-items: center; gap: .9rem; padding: .8rem 1.2rem; }
.editor-publish-button b { font-size: 1.1rem; }
.editor-publish-button:disabled { cursor: wait; opacity: .65; }
.news-preview-column { position: sticky; top: 1.5rem; }
.news-preview-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 .2rem .75rem; }
.news-preview-heading span { color: var(--text-primary); font-size: .75rem; font-weight: 800; }
.news-preview-heading i { color: var(--text-muted); font-size: .65rem; font-style: normal; }
.news-preview-card { overflow: hidden; border: 1px solid rgba(37,99,235,.13); box-shadow: 0 22px 50px rgba(37,99,235,.09); }
.news-preview-card__image { aspect-ratio: 16 / 9; overflow: hidden; background: #eaf1ff; }
.news-preview-card__image img { width: 100%; height: 100%; object-fit: cover; }
.news-preview-card__body { padding: 1.25rem; }
.news-preview-card h2 { margin: .75rem 0 .55rem; color: var(--text-primary); font-size: calc(var(--news-title-size, 2.25rem) * .667); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.news-preview-card p { display: -webkit-box; overflow: hidden; color: var(--text-secondary); font-size: .78rem; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.news-preview-card__link { display: inline-block; margin-top: 1rem; color: var(--accent-blue); font-size: .72rem; font-weight: 800; }
.news-preview-hint { margin: .85rem .25rem 0; color: var(--text-muted); font-size: .66rem; line-height: 1.55; }
@media (max-width: 860px) {
    .news-editor-grid { grid-template-columns: 1fr; }
    .news-preview-column { position: static; max-width: 32rem; width: 100%; margin: 0 auto; }
}
@media (max-width: 640px) {
    .news-article-header h1 { font-size: max(1.5rem, calc(var(--news-title-size, 2.25rem) * .75)); }
    .news-feed-card__title, .news-preview-card h2 { font-size: max(1rem, calc(var(--news-title-size, 2.25rem) * .5)); }
    .news-editor-hero { grid-template-columns: 1fr; }
    .news-editor-steps { display: none; }
    .editor-form-head { display: block; }
    .editor-form-head .editor-account { display: block; margin-top: .5rem; }
    .news-image-drop { align-items: flex-start; }
    .editor-actions { align-items: stretch; flex-direction: column; }
    .editor-publish-button { justify-content: center; width: 100%; }
    .editor-message { flex-direction: column; }
    .editor-access-card--denied { align-items: flex-start; flex-wrap: wrap; }
    .editor-access-card--denied .btn-primary { width: 100%; margin-left: 0; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .news-feed-card, .news-feed-card__media img, .news-image-drop { transition: none; }
    .news-article-loading span, .editor-spinner { animation: none; }
}
