:root,
html[data-theme="dark"] {
    color-scheme: dark;
    --jc-accent: #7543F4;
    --jc-accent-hover: #6335D8;
    --jc-bg: #0B1016;
    --jc-surface: #11171D;
    --jc-text: #FFFFFF;
    --jc-text-muted: #DEDEDE;
    --jc-text-secondary: #525252;
    --jc-border: rgba(82, 82, 82, 0.7);
    --jc-border-width: 0.3px;
}

html[data-theme="light"] {
    color-scheme: light;
    --jc-bg: #F8F9FB;
    --jc-surface: #FFFFFF;
    --jc-text: #222222;
    --jc-text-muted: #525252;
    --jc-text-secondary: #525252;
    --jc-border: #E5E7EB;
    --jc-border-width: 1px;
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', sans-serif;
}

.landing-theme-toggle [data-theme-icon="moon"] {
    display: none;
}

html[data-theme="light"] .landing-theme-toggle [data-theme-icon="sun"] {
    display: none !important;
}

html[data-theme="light"] .landing-theme-toggle [data-theme-icon="moon"] {
    display: block !important;
}

/* User avatar dropdown */
.user-menu-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.user-menu-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.user-menu-panel.is-closed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

html[data-theme="light"] .user-menu-panel [data-logout-trigger]:hover {
    background: rgba(82, 82, 82, 0.06);
    color: #DC2626;
}

/* Header "Ещё" dropdown */
.site-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #B2B2B2;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, padding 0.15s ease, margin 0.15s ease;
}

.site-more-toggle:hover,
.site-more-toggle[aria-expanded="true"],
.site-more-toggle.is-active {
    color: #FFFFFF;
}

.site-more-toggle[aria-expanded="true"],
.site-more-toggle.is-active {
    background: #1A222C;
    padding: 0 12px;
    margin: 0 -12px;
}

.site-more-toggle[aria-expanded="true"] [data-more-menu-icon] {
    transform: rotate(180deg);
}

.site-more-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 240px;
    padding: 8px;
    border-radius: 12px;
    background: #11171D;
    border: 1px solid rgba(71, 85, 105, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;
}

.site-more-panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.site-more-panel.is-closed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
}

.site-more-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #E2E8F0;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-more-link:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #FFFFFF;
}

.site-more-link.is-current {
    color: #FFFFFF;
    background: rgba(117, 67, 244, 0.12);
}

.site-more-link--premium {
    color: #FFCA28;
}

.site-more-link--premium:hover {
    color: #FFDF28;
}

html[data-theme="light"] .site-more-link.site-more-link--premium {
    color: #FFCA28;
}

html[data-theme="light"] .site-more-link.site-more-link--premium:hover {
    color: #E6B400;
}

html[data-theme="light"] .site-more-link.site-more-link--premium.is-current,
html[data-theme="light"] .site-more-link.site-more-link--premium.is-current:hover {
    color: #222222;
}

body.mobile-nav-open {
    overflow: hidden;
}

.site-menu-toggle {
    position: relative;
    z-index: 70;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #DEDEDE;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.site-menu-toggle__bars {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 13px;
}

.site-menu-toggle__bars span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.site-menu-toggle:hover,
.site-menu-toggle[aria-expanded="true"] {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
    .site-menu-toggle {
        display: none !important;
    }
}

.site-mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    visibility: hidden;
}

.site-mobile-nav.is-open {
    pointer-events: auto;
    visibility: visible;
}

.site-mobile-nav__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.site-mobile-nav.is-open .site-mobile-nav__overlay {
    opacity: 1;
}

.site-mobile-nav__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 380px);
    height: 100%;
    padding: 18px 22px 32px;
    background: #0B1016;
    border-right: 1px solid rgba(71, 85, 105, 0.35);
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.45);
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.site-mobile-nav.is-open .site-mobile-nav__panel {
    transform: translateX(0);
}

.site-mobile-nav__head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    margin-bottom: 28px;
}

.site-mobile-nav__close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #DEDEDE;
    cursor: pointer;
    flex-shrink: 0;
}

.site-mobile-nav__close span {
    position: relative;
    width: 16px;
    height: 16px;
}

.site-mobile-nav__close span::before,
.site-mobile-nav__close span::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.site-mobile-nav__close span::before {
    transform: translateY(-50%) rotate(45deg);
}

.site-mobile-nav__close span::after {
    transform: translateY(-50%) rotate(-45deg);
}

.site-mobile-nav__close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
}

.site-mobile-nav__logo {
    display: inline-flex;
    align-items: center;
}

.site-mobile-nav__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-mobile-nav__links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 10px;
    color: #B2B2B2;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-mobile-nav__links a:hover,
.site-mobile-nav__links a.is-current {
    color: #FFFFFF;
    background: rgba(117, 67, 244, 0.12);
}

.site-mobile-nav__premium {
    color: #FFCA28 !important;
}

.site-mobile-nav__premium:hover,
.site-mobile-nav__premium.is-current {
    color: #FFDF28 !important;
}

@media (min-width: 768px) {
    .site-mobile-nav {
        display: none !important;
    }
}

.footer-accordion__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    margin: 0 0 12px;
    border: none;
    background: transparent;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-align: left;
    cursor: default;
}

.footer-accordion__icon {
    display: none;
    font-size: 12px;
    color: #9CA3AF;
    transition: transform 0.2s ease;
}

@media (max-width: 767px) {
    .landing-footer {
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .landing-footer .footer-inner {
        gap: 28px;
    }

    .landing-footer .footer-columns {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .footer-accordion {
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }

    .footer-accordion__toggle {
        cursor: pointer;
        padding: 16px 0;
        margin: 0;
    }

    .footer-accordion__icon {
        display: block;
    }

    .footer-accordion.is-open .footer-accordion__icon {
        transform: rotate(180deg);
    }

    .footer-accordion__panel {
        display: none;
        padding: 0 0 16px;
    }

    .footer-accordion.is-open .footer-accordion__panel {
        display: flex;
    }

    .footer-social {
        margin-top: 22px;
        align-items: flex-start;
    }

    .footer-social__title {
        display: none;
    }
}

html[data-theme="light"] .site-menu-toggle {
    color: #525252;
}

html[data-theme="light"] .site-menu-toggle:hover,
html[data-theme="light"] .site-menu-toggle[aria-expanded="true"] {
    color: #222222;
    background: rgba(82, 82, 82, 0.08);
}

html[data-theme="light"] .site-mobile-nav__overlay {
    background: rgba(17, 24, 39, 0.35);
}

html[data-theme="light"] .site-mobile-nav__panel {
    background: #F8F9FB;
    border-right: 1px solid var(--jc-border);
    box-shadow: 18px 0 40px rgba(34, 34, 34, 0.1);
}

html[data-theme="light"] .site-mobile-nav__close {
    color: #525252;
}

html[data-theme="light"] .site-mobile-nav__close:hover {
    color: #222222;
    background: rgba(82, 82, 82, 0.08);
}

html[data-theme="light"] .site-mobile-nav__links a {
    color: #525252;
}

html[data-theme="light"] .site-mobile-nav__links a:hover,
html[data-theme="light"] .site-mobile-nav__links a.is-current {
    color: #222222;
    background: rgba(117, 67, 244, 0.08);
}

html[data-theme="light"] .footer-accordion__toggle {
    color: #222222;
}

html[data-theme="light"] .footer-accordion {
    border-bottom-color: var(--jc-border);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #11171D inset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Стилизация скроллбара (и для вертикального, и для горизонтального) */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px; /* Высота горизонтального скролла */
    width: 8px;  /* Ширина вертикального скролла */
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #1e293b; /* Тёмный slate фон дорожки */
    border-radius: 8px;  /* Скругляем со всех сторон для универсальности */
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569; /* Цвет ползунка */
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #64748b; /* Цвет ползунка при наведении */
}

/* Для Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

.sandbox-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.sandbox-summary--ok {
    background: rgba(52, 185, 91, 0.12);
    color: #6ee7a0;
    border: 1px solid rgba(52, 185, 91, 0.25);
}

.sandbox-summary--solved {
    margin-bottom: 0.5rem;
}

.task-solved-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #34B95B;
    color: #ffffff;
    flex-shrink: 0;
    font-size: 9px;
}

.task-solved-badge.hidden {
    display: none;
}

.sandbox-summary--fail {
    background: rgba(249, 83, 55, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(249, 83, 55, 0.25);
}

.run-result {
    padding: 0;
}

.run-result__tabs {
    display: flex;
    align-items: stretch;
    gap: 20px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.8);
    flex-shrink: 0;
}

.run-result__tab {
    position: relative;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.run-result__tab:hover {
    color: #e2e8f0;
}

.run-result__tab.is-active {
    color: #f8fafc;
    font-weight: 600;
}

.run-result__tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: #7543F4;
}

.run-result__body {
    padding: 14px 16px 16px;
}

.run-result__status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 500;
}

.run-result__status-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.run-result__status--ok {
    color: #34B95B;
}

.run-result__status--fail {
    color: #F97373;
}

.run-result__status-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
}

.run-result__solved {
    margin-bottom: 10px;
    color: #34B95B;
    font-size: 13px;
    font-weight: 600;
}

.run-result__io {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.run-result__io-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.run-result__io-box {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(55, 65, 81, 0.85);
    border-radius: 8px;
    background: rgba(17, 23, 29, 0.72);
    color: #cbd5e1;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 40px;
    overflow: auto;
}

.run-result__io-box .sql-result-table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
}

.run-result__note {
    font-size: 13px;
    color: #94a3b8;
}

.run-result__note--error {
    color: #fca5a5;
    margin-bottom: 12px;
}

.run-result__tests {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.run-result__test {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(55, 65, 81, 0.8);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(17, 23, 29, 0.6);
    color: inherit;
    cursor: pointer;
}

.run-result__test:hover {
    border-color: rgba(117, 67, 244, 0.45);
}

.run-result__test.is-selected {
    border-color: rgba(117, 67, 244, 0.7);
}

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

.run-result__test-title {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.run-result__test-meta {
    font-size: 12px;
    color: #94a3b8;
}

.run-result__test-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.run-result__test-badge--ok {
    background: #34B95B;
    color: #ffffff;
}

.run-result__test-badge--fail {
    background: #F95337;
    color: #ffffff;
}

.sandbox-test-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sandbox-test-card {
    border: 1px solid rgba(55, 65, 81, 0.8);
    border-radius: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: rgba(17, 23, 29, 0.6);
}

.sandbox-test-card--passed {
    border-color: rgba(52, 185, 91, 0.35);
}

.sandbox-test-card--failed {
    border-color: rgba(249, 83, 55, 0.35);
}

.sandbox-test-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.35rem;
}

.sandbox-test-card__badge {
    font-size: 11px;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 0.375rem;
}

.sandbox-test-card__badge--ok {
    background: rgba(52, 185, 91, 0.18);
    color: #6ee7a0;
}

.sandbox-test-card__badge--fail {
    background: rgba(249, 83, 55, 0.18);
    color: #fca5a5;
}

.sandbox-test-card__row {
    font-size: 11px;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    margin-top: 0.2rem;
}

.sandbox-test-card__row-label {
    font-size: 11px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
}

.sandbox-test-card__sql-script {
    font-size: 11px;
    color: #cbd5e1;
    background: rgba(11, 16, 22, 0.8);
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    white-space: pre-wrap;
    margin: 0;
}

.sql-result-table__label {
    font-size: 11px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.35rem;
}

.sql-result-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(55, 65, 81, 0.8);
    border-radius: 0.5rem;
    background: rgba(11, 16, 22, 0.85);
}

.sql-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sql-result-table th,
.sql-result-table td {
    border: 1px solid rgba(55, 65, 81, 0.65);
    padding: 0.35rem 0.55rem;
    text-align: left;
    white-space: nowrap;
}

.sql-result-table th {
    background: rgba(17, 23, 29, 0.95);
    color: #e2e8f0;
    font-weight: 600;
}

.sql-result-table td {
    color: #cbd5e1;
}

.sql-result-table__empty,
.sql-result-table__empty-cell {
    color: #64748b;
    font-style: italic;
}

.sandbox-test-card__row--passed-compact {
    color: #86efac;
    font-family: inherit;
    white-space: normal;
}

body.task-solution-page {
    --task-header-height: 64px;
    --task-main-padding-y: 22px;
    --task-content-min-height: calc(
        100dvh - var(--task-header-height) - var(--task-main-padding-y)
    );
    --task-workspace-inner-height: calc(var(--task-content-min-height) - 2px);
}

.task-layout {
    display: flex;
    width: 100%;
}

.task-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.task-meta-row__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.task-meta-row__difficulty {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #DEDEDE;
    white-space: nowrap;
}

.task-meta-row__topic {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.task-meta-row__favorite {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.task-meta-row__favorite:hover {
    color: #DEDEDE;
}

.task-meta-row__favorite.is-active {
    color: #FBBF24;
}

.task-meta-row__favorite-count {
    min-width: 1ch;
    text-align: left;
}

.interview-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 88px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.35);
    background: #0B1016;
    color: #E2E8F0;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.interview-timer.is-warning {
    border-color: rgba(251, 191, 36, 0.45);
    color: #FBBF24;
}

.interview-timer.is-danger {
    border-color: rgba(248, 113, 113, 0.5);
    color: #F87171;
}

.interview-timer.is-paused {
    border-color: rgba(148, 163, 184, 0.35);
    color: #94A3B8;
}

.interview-control-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.4);
    background: #0B1016;
    color: #E2E8F0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.interview-control-btn:hover {
    border-color: rgba(148, 163, 184, 0.5);
    color: #FFFFFF;
}

.interview-control-btn--muted {
    color: #94A3B8;
}

.interview-history-config {
    border-top: 1px solid rgba(71, 85, 105, 0.25);
    padding-top: 12px;
}

.interview-history-config__summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    color: #A78BFA;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.interview-history-config__summary::-webkit-details-marker {
    display: none;
}

.interview-history-config__summary:hover {
    color: #C4B5FD;
}

.interview-history-config__list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.interview-history-config__list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
}

.interview-history-config__list span {
    color: #64748B;
    flex-shrink: 0;
}

.interview-history-config__list strong {
    color: #DEDEDE;
    font-weight: 500;
    text-align: right;
}

.interview-task-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.interview-task-nav__btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(71, 85, 105, 0.35);
    color: #CBD5E1;
    background: #0B1016;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.interview-task-nav__btn:hover {
    border-color: rgba(148, 163, 184, 0.45);
    color: #FFFFFF;
}

.interview-task-nav__btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.interview-task-nav__label {
    min-width: 42px;
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
    font-variant-numeric: tabular-nums;
}

.task-nav {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
}

.task-nav__btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid transparent;
    color: #94A3B8;
    background: transparent;
    transition: color 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.task-nav__btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.task-nav__btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.task-split {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    grid-template-rows: var(--task-content-min-height);
    column-gap: 12px;
    row-gap: 0;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    position: relative;
    align-items: stretch;
}

.task-split.task-split--expanded {
    grid-template-rows: minmax(var(--task-content-min-height), auto);
}

.task-split.is-mentor-open {
    grid-template-columns: minmax(280px, 1fr) auto auto;
}

.task-description {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: var(--task-content-min-height);
    overflow-y: auto;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.task-split.task-split--expanded .task-description {
    max-height: none;
    min-height: var(--task-content-min-height);
}

.task-workspace {
    grid-column: 2;
    grid-row: 1;
    width: 686px;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    box-sizing: border-box;
}

.task-split.task-split--expanded .task-workspace {
    height: auto;
    min-height: var(--task-content-min-height);
}

.task-split.task-split--expanded .ai-mentor-panel {
    height: auto;
    min-height: var(--task-content-min-height);
}

.task-workspace__viewport {
    flex: 0 0 auto;
    height: var(--task-workspace-inner-height);
    display: grid;
    grid-template-rows: 7fr 3fr;
    gap: 16px;
    min-height: 0;
    position: relative;
}

.task-workspace__editor-block {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-workspace__panel-bottom {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.task-workspace__actions {
    flex-shrink: 0;
}

.task-workspace__run-block {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-workspace__run-output {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}

.task-workspace__editor-block .editor-resize-wrap {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.task-resizer {
    position: absolute;
    width: 6px;
    height: 48px;
    top: 0;
    left: 0;
    transform: translateY(-50%);
    cursor: col-resize;
    z-index: 5;
    touch-action: none;
    border-radius: 999px;
    pointer-events: auto;
}

.task-resizer::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(55, 65, 81, 0.45);
    border: 1px solid rgba(75, 85, 99, 0.7);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-resizer:hover::before,
.task-resizer.is-active::before {
    background: rgba(117, 67, 244, 0.22);
    border-color: rgba(117, 67, 244, 0.65);
    box-shadow: 0 0 0 2px rgba(117, 67, 244, 0.12);
}

.task-resizer--horizontal {
    width: 48px;
    height: 16px;
    transform: translate(-50%, -50%);
    cursor: ns-resize;
}

.task-resizer--horizontal::before {
    inset: auto 0;
    top: 50%;
    height: 6px;
    transform: translateY(-50%);
}

body.task-layout-resizing {
    cursor: col-resize !important;
    user-select: none;
}

body.task-layout-resizing * {
    cursor: col-resize !important;
}

body.editor-height-resizing {
    cursor: ns-resize !important;
    user-select: none;
}

body.editor-height-resizing * {
    cursor: ns-resize !important;
}

.editor-resize-wrap {
    position: relative;
}

.font-size-control button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.profile-social-link.is-empty {
    display: none !important;
}

.profile-hh-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    border-radius: 50%;
    background-color: currentColor;
    position: relative;
    flex-shrink: 0;
}

.profile-hh-logo::after {
    content: "hh";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B1016;
    font-size: 0.52em;
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 1;
    font-family: Inter, system-ui, sans-serif;
}

.profile-modal-backdrop {
    opacity: 0;
    transition: opacity 0.22s ease;
}

.profile-modal--open .profile-modal-backdrop {
    opacity: 1;
}

.profile-modal-panel {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-modal--open .profile-modal-panel {
    opacity: 1;
    transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .profile-modal-backdrop,
    .profile-modal-panel {
        transition-duration: 0.01ms !important;
    }
}

.profile-toast {
    top: 1.5rem;
    left: 50%;
    opacity: 0;
    transform: translate(-50%, 0);
    pointer-events: none;
}

html[data-theme="light"] .page-home .profile-toast,
html[data-theme="light"] .page-catalog .profile-toast,
html[data-theme="light"] .page-task .profile-toast,
html[data-theme="light"] .page-profile .profile-toast,
html[data-theme="light"] .page-rating .profile-toast,
html[data-theme="light"] .page-interview .profile-toast,
html[data-theme="light"] .page-subscription .profile-toast,
html[data-theme="light"] .page-auth .profile-toast {
    background: #ffffff;
    border: var(--jc-border-width) solid var(--jc-border);
    box-shadow: 0 12px 28px rgba(34, 34, 34, 0.12);
}

.profile-toast--visible {
    pointer-events: auto;
    animation: profile-toast-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-toast--visible .profile-toast-icon {
    animation: profile-toast-icon-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.profile-toast--hiding {
    pointer-events: none;
    animation: profile-toast-out 0.3s ease forwards;
}

@keyframes profile-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -18px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

@keyframes profile-toast-out {
    from {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -12px) scale(0.97);
    }
}

@keyframes profile-toast-icon-pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    55% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-toast--visible,
    .profile-toast--hiding,
    .profile-toast--visible .profile-toast-icon {
        animation-duration: 0.01ms !important;
    }
}

.app-toast-link {
    color: #8b5cf6;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color 0.15s ease;
}

.app-toast-link:hover {
    color: #a78bfa;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 2rem;
    padding: 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: -1px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.settings-tab i {
    color: #6b7280;
    transition: color 0.15s ease;
}

.settings-tab:hover {
    color: #e2e8f0;
}

.settings-tab:hover i {
    color: #a78bfa;
}

.settings-tab--active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.settings-tab--active i {
    color: #8b5cf6;
}

.settings-toggle-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.settings-toggle {
    position: relative;
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 9999px;
    background: #4b5563;
    border: none;
    cursor: pointer;
    transition: background-color 0.22s ease;
}

.settings-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-input:checked + .settings-toggle {
    background: #8b5cf6;
}

.settings-toggle-input:checked + .settings-toggle::after {
    transform: translateX(20px);
}

.settings-toggle-input:focus-visible + .settings-toggle {
    outline: 2px solid rgba(139, 92, 246, 0.6);
    outline-offset: 2px;
}

.settings-dropdown-item--active {
    color: #8b5cf6 !important;
    background: rgba(117, 67, 244, 0.1);
}

.settings-save-btn {
    background: #7543F4;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.settings-save-btn:not(:disabled) {
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(117, 67, 244, 0.1);
}

.settings-save-btn:not(:disabled):hover {
    background: #6335D8;
}

.settings-save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.settings-field-readonly {
    background: #0b1016;
    border: 1px solid rgba(31, 41, 55, 0.5);
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    color: #dedede;
    font-size: 14px;
}

.settings-info-banner {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: rgba(117, 67, 244, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    font-size: 13px;
    line-height: 1.5;
}

.settings-danger-zone {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(31, 41, 55, 0.4);
}

.settings-danger-btn {
    background: #EF4444;
    border: 1px solid #EF4444;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.settings-danger-btn:hover {
    background: #DC2626;
    border-color: #DC2626;
    color: #ffffff;
}

.settings-code-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.settings-code-modal.is-open {
    display: flex;
}

.settings-code-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 12, 0.72);
    backdrop-filter: blur(6px);
}

.settings-code-modal__panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #11171d;
    border: 1px solid rgba(31, 41, 55, 0.9);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.settings-code-modal__close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.55rem;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.settings-code-modal__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.verify-otp {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.verify-otp__digit {
    width: 3rem;
    height: 3.35rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(31, 41, 55, 0.95);
    background: #0b1016;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: center;
    caret-color: #a78bfa;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.verify-otp__digit:hover {
    border-color: rgba(75, 85, 99, 0.9);
}

.verify-otp__digit:focus {
    border-color: rgba(117, 67, 244, 0.85);
    box-shadow: 0 0 0 3px rgba(117, 67, 244, 0.18);
}

.verify-otp__digit.is-error {
    border-color: rgba(239, 68, 68, 0.7);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.verify-otp__digit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 420px) {
    .verify-otp {
        gap: 0.35rem;
    }

    .verify-otp__digit {
        width: 2.55rem;
        height: 3rem;
        font-size: 1.2rem;
        border-radius: 0.65rem;
    }
}

.email-verify-banner {
    position: sticky;
    top: 4rem;
    z-index: 40;
    border-bottom: 1px solid rgba(139, 92, 246, 0.25);
    background: rgba(26, 22, 40, 0.96);
    backdrop-filter: blur(10px);
}

.email-verify-banner__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.email-verify-banner__text {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #c4b5fd;
    font-size: 13px;
    line-height: 1.45;
}

.email-verify-banner__text i {
    color: #8b5cf6;
    margin-top: 0.15rem;
}

.email-verify-banner__text strong {
    color: #dedede;
    font-weight: 600;
}

.email-verify-banner__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 0.55rem;
    background: #7543f4;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.email-verify-banner__action:hover {
    background: #6335d8;
}

.email-verify-banner__controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.email-verify-banner__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 0.45rem;
    background: transparent;
    color: #8b7bb8;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.email-verify-banner__close:hover {
    color: #dedede;
    background: rgba(139, 92, 246, 0.15);
}

body.task-solution-page .email-verify-banner__inner {
    max-width: none;
    padding-left: 10px;
    padding-right: 10px;
}

html.theme-transition .email-verify-banner,
html.theme-transition .email-verify-banner__text,
html.theme-transition .email-verify-banner__text strong,
html.theme-transition .email-verify-banner__action {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
    html.theme-transition .email-verify-banner,
    html.theme-transition .email-verify-banner * {
        transition: none;
    }
}

html[data-theme="light"] .email-verify-banner {
    background: rgba(117, 67, 244, 0.08);
    border-bottom: var(--jc-border-width) solid rgba(117, 67, 244, 0.18);
}

html[data-theme="light"] .email-verify-banner__text {
    color: #525252;
}

html[data-theme="light"] .email-verify-banner__text i {
    color: #7543F4;
}

html[data-theme="light"] .email-verify-banner__text strong {
    color: #222222;
}

html[data-theme="light"] .email-verify-banner__close {
    color: #8a8a8a;
}

html[data-theme="light"] .email-verify-banner__close:hover {
    color: #222222;
    background: rgba(117, 67, 244, 0.1);
}

html[data-theme="light"] .email-verify-banner__action {
    color: #ffffff;
}

.subscription-plan-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.subscription-plan-card--current {
    border-color: rgba(52, 185, 91, 0.35);
}

.subscription-plan-card--ultimate {
    position: relative;
    border-color: rgba(117, 67, 244, 0.4);
    box-shadow: 0 0 35px -10px rgba(117, 67, 244, 0.25),
    0 0 15px -5px rgba(255, 202, 40, 0.1);
}

.subscription-plan-card--ultimate::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(117, 67, 244, 0.35), rgba(255, 202, 40, 0.2), transparent);
    border-radius: 12px;
    z-index: -1;
    pointer-events: none;
}

/* Markdown в условии задачи и подсказках */
.task-markdown > *:first-child {
    margin-top: 0;
}

.task-markdown > *:last-child {
    margin-bottom: 0;
}

.task-markdown p {
    margin: 0 0 0.75em;
}

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

.task-markdown ul,
.task-markdown ol {
    margin: 0.5em 0 0.75em;
    padding-left: 1.5rem;
}

.task-markdown ul {
    list-style-type: disc;
    list-style-position: outside;
}

.task-markdown ol {
    list-style-type: decimal;
    list-style-position: outside;
}

.task-markdown ul ul {
    list-style-type: circle;
    margin-top: 0.35em;
    margin-bottom: 0.35em;
}

.task-markdown ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.35em;
    margin-bottom: 0.35em;
}

.task-markdown li {
    margin: 0.35em 0;
    padding-left: 0.25rem;
    display: list-item;
}

.task-markdown li::marker {
    color: #94A3B8;
}

.task-markdown li > p {
    margin: 0;
}

.task-markdown li + li {
    margin-top: 0.35em;
}

.task-markdown strong {
    color: #f1f5f9;
    font-weight: 600;
}

.task-markdown em {
    font-style: italic;
}

.task-markdown code {
    display: inline;
    background: #1C212B;
    color: #94A3B8;
    padding: 0.15em 0.45em;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    border: 1px solid rgba(31, 41, 55, 0.6);
    margin: 0 2px;
    white-space: nowrap;
}

.task-markdown pre {
    margin: 0.75em 0;
    padding: 0.85em 1em;
    background: #0B1016;
    border: 1px solid rgba(31, 41, 55, 0.6);
    border-radius: 8px;
    overflow-x: auto;
}

.task-markdown pre code {
    display: block;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    white-space: pre;
    color: #DEDEDE;
    font-size: 0.85em;
}

/* —— AI mentor pane —— */
.ai-mentor-panel {
    --ai-mentor-width: 400px;
    display: flex;
    flex-direction: column;
    grid-column: 3;
    grid-row: 1;
    width: var(--ai-mentor-width);
    min-width: 0;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    box-sizing: border-box;
    overflow: hidden;
    background: #11171D;
    border: 1px solid rgba(31, 41, 55, 0.2);
    border-radius: 10px;
}

.ai-mentor-panel[hidden] {
    display: none !important;
}

.ai-mentor-resizer[hidden] {
    display: none !important;
}

.ai-mentor-btn.is-active {
    color: #C4B5FD;
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(117, 67, 244, 0.12);
}

.ai-mentor-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.65);
    flex-shrink: 0;
}

.ai-mentor-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #C4B5FD;
    font-size: 14px;
    font-weight: 600;
}

.ai-mentor-panel__header-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ai-mentor-panel__remaining {
    font-size: 11px;
    color: #94A3B8;
    white-space: nowrap;
}

.ai-mentor-panel__icon-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.7);
    background: transparent;
    color: #94A3B8;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ai-mentor-panel__icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.5);
}

.ai-mentor-panel__icon-btn.hidden {
    display: none !important;
}

.ai-mentor-panel__icon-btn--danger:hover {
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
}

.ai-mentor-panel__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ai-mentor-panel__start,
.ai-mentor-panel__locked {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    text-align: center;
}

.ai-mentor-panel__locked {
    justify-content: center;
}

.ai-mentor-panel__start {
    justify-content: flex-end;
    align-items: stretch;
    padding: 16px;
}

.ai-mentor-panel__start .ai-mentor-panel__hint {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-bottom: 8px;
}

.ai-mentor-panel__start .ai-mentor-panel__actions {
    justify-content: flex-start;
}

.ai-mentor-panel__start.hidden,
.ai-mentor-panel__locked.hidden,
.ai-mentor-panel__chat.hidden,
.ai-mentor-panel__footer.hidden,
.ai-mentor-panel__readonly.hidden {
    display: none !important;
}

.ai-mentor-panel__hint {
    max-width: 280px;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #94A3B8;
}

.ai-mentor-panel__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.ai-mentor-panel__locked-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(117, 67, 244, 0.12);
    color: #A78BFA;
    font-size: 18px;
}

.ai-mentor-panel__locked-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.ai-mentor-panel__locked-text {
    max-width: 300px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #94A3B8;
}

.ai-mentor-panel__locked-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 12px;
    background: #7543F4;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ai-mentor-panel__locked-cta:hover {
    background: #6335D8;
}

.ai-mentor-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 36px;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: #7543F4;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.ai-mentor-action-btn:hover:not(:disabled) {
    background: #6335D8;
}

.ai-mentor-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ai-mentor-panel__chat {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ai-mentor-panel__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
}

.ai-mentor-msg {
    flex-shrink: 0;
    min-width: 0;
}

.ai-mentor-msg--user {
    align-self: flex-end;
    max-width: min(85%, 320px);
    padding: 10px 12px;
    border-radius: 12px;
    background: #252B36;
}

.ai-mentor-msg--assistant {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ai-mentor-msg__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #A78BFA;
    font-size: 12px;
    line-height: 1;
}

.ai-mentor-msg__label {
    display: none;
}

.ai-mentor-msg__body {
    font-size: 15px;
    line-height: 1.55;
    color: #DEDEDE;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-mentor-msg--user .ai-mentor-msg__body {
    color: #F8FAFC;
}

.ai-mentor-msg--assistant .ai-mentor-msg__body {
    width: 100%;
}

.ai-mentor-msg__body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    background: #0B1016;
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 5px;
    padding: 0.1em 0.35em;
}

.ai-mentor-msg__body pre {
    margin: 0.6em 0;
    padding: 0.75em 0.85em;
    background: #0B1016;
    border: 1px solid rgba(55, 65, 81, 0.7);
    border-radius: 8px;
    overflow-x: auto;
}

.ai-mentor-msg__body pre code {
    border: none;
    background: transparent;
    padding: 0;
    white-space: pre;
}

.ai-mentor-msg--streaming .ai-mentor-msg__body::after {
    content: '▍';
    display: inline-block;
    margin-left: 2px;
    color: #A78BFA;
    animation: ai-mentor-caret 1s steps(1) infinite;
}

.ai-mentor-msg--streaming .ai-mentor-msg__actions {
    display: none;
}

.ai-mentor-msg__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.ai-mentor-msg__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94A3B8;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.ai-mentor-msg__action:hover {
    color: #E2E8F0;
    background: rgba(255, 255, 255, 0.06);
}

.ai-mentor-msg__action.is-copied,
.ai-mentor-msg__action.is-copied:hover {
    color: #34D399;
}

.ai-mentor-msg__action[hidden] {
    display: none !important;
}

@keyframes ai-mentor-caret {
    50% { opacity: 0; }
}

.ai-mentor-panel__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(55, 65, 81, 0.65);
    flex-shrink: 0;
}

.ai-mentor-panel__footer .ai-mentor-panel__actions {
    justify-content: flex-start;
}

.ai-mentor-composer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    padding: 10px 10px 8px;
    border-radius: 16px;
    border: 1px solid rgba(75, 85, 99, 0.45);
    background: #11171d;
}

.ai-mentor-panel__start .ai-mentor-composer {
    align-self: stretch;
    max-width: 100%;
    margin-top: 4px;
}

.ai-mentor-composer:focus-within {
    border-color: rgba(148, 163, 184, 0.55);
}

.ai-mentor-composer__input {
    width: 100%;
    min-height: 52px;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 4px 6px 2px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #F8FAFC;
    font-size: 14px;
    line-height: 1.45;
    font-family: inherit;
}

.ai-mentor-composer__input::placeholder {
    color: #8B95A5;
}

.ai-mentor-composer__input:focus {
    outline: none;
}

.ai-mentor-composer__input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ai-mentor-composer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    padding: 0 2px;
}

.ai-mentor-composer__count {
    font-size: 11px;
    color: #6B7280;
}

.ai-mentor-composer.is-at-limit .ai-mentor-composer__count {
    color: #F59E0B;
}

.ai-mentor-composer__send {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    background: #E5E7EB;
    color: #111827;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.ai-mentor-composer__send:hover:not(:disabled) {
    background: #fff;
}

.ai-mentor-composer__send:disabled {
    background: #3A4350;
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: 1;
}

.ai-mentor-panel.is-hint-only .ai-mentor-panel__start {
    justify-content: center;
}

.ai-mentor-panel.is-hint-only .ai-mentor-panel__start .ai-mentor-panel__hint {
    flex: none;
    margin-bottom: 0;
}

.ai-mentor-panel.is-hint-only .ai-mentor-panel__start .ai-mentor-panel__actions {
    justify-content: center;
}

.ai-mentor-panel.is-hint-only .ai-mentor-review-action {
    display: none !important;
}

.ai-mentor-panel.is-hint-only .ai-mentor-composer {
    display: none !important;
}

.ai-mentor-panel__readonly {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(55, 65, 81, 0.65);
    flex-shrink: 0;
}

.ai-mentor-panel__readonly-text {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #94A3B8;
}

.ai-mentor-panel__readonly-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    background: #7543F4;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}

.ai-mentor-panel__readonly-cta:hover {
    background: #6335D8;
}

@media (max-width: 640px) {
    .task-split.is-mentor-open {
        grid-template-columns: minmax(280px, 1fr) auto;
    }

    .ai-mentor-panel {
        position: fixed;
        top: var(--task-header-height, 64px);
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw !important;
        --ai-mentor-width: 100vw;
        grid-column: auto;
        grid-row: auto;
        height: auto;
        z-index: 80;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }

    .ai-mentor-resizer {
        display: none !important;
    }
}

html[data-theme="light"] .text-red-400,
html[data-theme="light"] .text-red-500 {
    color: #DC2626 !important;
}

html[data-theme="light"] .text-amber-300,
html[data-theme="light"] .text-amber-300\/90 {
    color: #D97706 !important;
}