/* ==========================================================================
   kinjala — site styles (no build step needed; edit directly)
   ========================================================================== */

:root {
    --accent: #C6F24E;          /* overridden from Admin → Settings */
    --on-accent: #0E0F0C;
    --ink: #0E0F0C;
    --ink-2: #12140F;
    --surface: #171914;
    --surface-2: #1E211A;
    --line: #2A2D25;
    --line-soft: #23261F;
    --line-strong: #3A3E33;
    --text: #F2F1EA;
    --text-2: #D6D5CA;
    --muted: #A3A396;
    --muted-2: #8E8D82;
    --danger: #FFB48A;
    --danger-bg: #3A2418;
    --ok-bg: #1F2A14;

    --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
    --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 26px;
    --container: 1240px;
    --gutter: clamp(16px, 4vw, 24px);
}

*, *::before, *::after { box-sizing: border-box; }

/* Standard Cyrillic letter shapes (the fonts otherwise switch to Bulgarian-style italic-like shapes). */
html { font-feature-settings: "locl" 0; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 200;
    background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700;
}
.skip-link:focus { top: 12px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.accent { color: var(--accent); }
.icon { flex: 0 0 auto; }

/* ---------- Type ---------- */
.display {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.2rem, 4.6vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.03em;
}
.h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.02em; line-height: 1.1; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.12; }
.h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: #B4B3A7; max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 12px 22px;
    border-radius: 12px; border: 1px solid transparent;
    font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center;
    cursor: pointer; transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted-2); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #5C3522; }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 15px; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 26px; }
.btn-block { width: 100%; }
.link-strong { font-weight: 700; text-decoration: none; }
.link-strong:hover { text-decoration: underline; }
.link-button {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 0;
    font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; min-height: 36px;
}
.link-button.danger { color: var(--danger); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer;
}

/* ---------- Brand & language ---------- */
.brand {
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
    font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; white-space: nowrap;
}
.brand-mark {
    width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
    display: inline-flex; align-items: center; justify-content: center; font-size: 17px; text-transform: lowercase;
}
.brand-logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; }

.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; font-size: 13px; font-weight: 700; }
.lang a { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.lang a.is-active { background: var(--surface-2); color: var(--text); }

/* ---------- Site header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(14, 15, 12, .88);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
    padding-top: env(safe-area-inset-top);
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-links { display: flex; gap: 28px; font-size: 15px; }
.site-links a { color: #C9C8BC; text-decoration: none; }
.site-links a:hover { color: var(--text); }
.site-actions { display: flex; align-items: center; gap: 16px; }
.site-menu-toggle { display: none; }

@media (max-width: 880px) {
    .site-menu-toggle { display: inline-flex; }
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 20px;
        background: var(--ink-2); border-bottom: 1px solid var(--line); padding: 20px var(--gutter) 24px;
    }
    .site-nav.is-open { display: flex; }
    .site-links { flex-direction: column; gap: 4px; font-size: 17px; }
    .site-links a { padding: 10px 0; }
    .site-actions { flex-wrap: wrap; }
}

.flash-top { padding-top: 20px; }

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: clamp(48px, 9vw, 96px); }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero-visual { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; }
.pill {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
    border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; font-size: 14px; color: #C9C8BC;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: 14px; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks .icon { color: var(--accent); width: 16px; height: 16px; }

.preview {
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px;
    display: flex; flex-direction: column; gap: 18px; transform: rotate(-1.2deg);
}
.preview-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.preview-video {
    aspect-ratio: 16 / 9; border-radius: var(--r-md);
    background: repeating-linear-gradient(135deg, #1E211A 0 12px, #1A1C16 12px 24px);
    display: flex; align-items: center; justify-content: center;
}
.play {
    width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
    display: flex; align-items: center; justify-content: center;
}
.play .icon { width: 24px; height: 24px; margin-left: 3px; }
.preview-progress { display: flex; align-items: center; gap: 18px; }
.preview-progress > div { display: flex; flex-direction: column; }
.preview-percent { font-family: var(--font-display); font-size: 26px; }

.ring { width: 72px; height: 72px; flex: 0 0 72px; }
.ring-track, .ring-fill { fill: none; stroke-width: 12; }
.ring-track { stroke: var(--line); }
.ring-fill {
    stroke: var(--accent); stroke-linecap: round;
    stroke-dasharray: 326.7px; stroke-dashoffset: calc(326.7px * (1 - var(--p, 0)));
    transform: rotate(-90deg); transform-origin: 60px 60px;
}

.toast-card {
    align-self: flex-end; margin: -18px 8px 0 0; max-width: 340px;
    background: var(--text); color: var(--ink); border-radius: 16px; padding: 14px 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transform: rotate(1.5deg);
}
.toast-card > span:last-child { display: flex; flex-direction: column; }
.toast-card .small { color: #4A4B42; }
.toast-icon {
    flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent);
    display: flex; align-items: center; justify-content: center;
}

/* The one orchestrated moment: the lesson card settles, the ring fills, the approval lands. */
@media (prefers-reduced-motion: no-preference) {
    .hero-visual .preview { animation: settle .9s cubic-bezier(.2, .8, .2, 1) both; }
    .hero-visual .ring-fill { animation: fill 1.4s .35s cubic-bezier(.3, .7, .2, 1) both; }
    .hero-visual .toast-card { animation: land .6s 1.5s cubic-bezier(.2, 1.3, .4, 1) both; }
}
@keyframes settle { from { opacity: 0; transform: rotate(-4deg) translateY(24px); } }
@keyframes fill { from { stroke-dashoffset: 326.7px; } }
@keyframes land { from { opacity: 0; transform: rotate(6deg) translateY(16px) scale(.92); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(36px, 6vw, 72px); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.section-head p { max-width: 44ch; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step { border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.step-last { background: var(--surface); }
.step-num {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.step h3 { font-size: 19px; }
.step p { color: var(--muted); font-size: 15px; }

.faq-wrap { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.faq { flex: 999 1 560px; min-width: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 22px 0; font-weight: 700; font-size: 18px; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: #B4B3A7; padding-bottom: 22px; max-width: 64ch; }
.plus-minus { position: relative; width: 18px; height: 18px; flex: 0 0 18px; }
.plus-minus::before, .plus-minus::after {
    content: ""; position: absolute; left: 0; top: 8px; width: 18px; height: 2px; background: var(--muted); border-radius: 2px;
    transition: transform .2s ease, background-color .2s ease;
}
.plus-minus::after { transform: rotate(90deg); }
.faq details[open] .plus-minus::before { background: var(--accent); }
.faq details[open] .plus-minus::after { transform: rotate(0deg); opacity: 0; }

.contact { display: flex; flex-wrap: wrap; gap: 40px; }
.contact-copy { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-form { flex: 2 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.contact-form > .grid-2, .contact-form > .field, .contact-form > .alert { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { border-top: 1px solid var(--line-soft); margin-top: 24px; padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.site-footer-brand { display: flex; flex-direction: column; gap: 10px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.site-footer-links a { color: var(--muted); text-decoration: none; }
.site-footer-links a:hover { color: var(--text); }

.prose { max-width: 760px; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 19px; margin-top: 1.4em; }
.prose p, .prose li { color: var(--text-2); }
.prose a { color: var(--accent); }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 14px; font-weight: 600; color: #C9C8BC; }
.field input, .field textarea, .field select, .copy-row input {
    width: 100%; min-height: 48px; padding: 12px 14px;
    background: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    color: var(--text); font-size: 16px; /* 16px stops iOS from zooming in */
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-hint { font-size: 13px; color: var(--muted-2); }
.field-error { font-size: 14px; color: var(--danger); font-weight: 600; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input, .toggle-row input, .segmented input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 20px; }
.check a { color: var(--accent); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 56px; }
.password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}

.segmented { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.segmented label {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 48px;
    border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; font-weight: 600;
}
.segmented label:has(input:checked) { border-color: var(--accent); background: var(--ok-bg); }

.toggle-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.toggle-row > span { display: flex; flex-direction: column; gap: 2px; }

.alert { border-radius: 12px; padding: 14px 16px; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.alert-success { background: var(--ok-bg); border: 1px solid #3A4A22; color: #DDF5A4; }
.alert-error { background: var(--danger-bg); border: 1px solid #5C3522; color: var(--danger); }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-top {
    width: 100%; max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: calc(20px + env(safe-area-inset-top)) var(--gutter) 0;
}
.auth-grid {
    flex: 1; width: 100%; max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(40px, 7vw, 96px);
    align-items: center; padding: 40px var(--gutter) calc(48px + env(safe-area-inset-bottom));
}
.auth-intro { display: flex; flex-direction: column; gap: 28px; max-width: 520px; }
.auth-intro-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; }
.auth-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 17px; color: var(--text-2); }
.auth-benefits li { display: flex; align-items: center; gap: 14px; }
.auth-toast { align-self: flex-start; margin: 8px 0 0; }
.auth-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
    padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.auth-card .h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); }

@media (max-width: 900px) {
    .auth-grid { grid-template-columns: 1fr; align-items: start; padding-top: 24px; }
    .auth-intro { display: none; }
    .auth-card { box-shadow: none; }
}

/* ---------- App (student area) ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100dvh; }
.app-side {
    flex: 0 0 288px; max-width: 288px; background: var(--ink-2); border-right: 1px solid var(--line-soft);
    padding: calc(22px + env(safe-area-inset-top)) 16px 22px;
    display: flex; flex-direction: column; gap: 24px;
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
}
.app-side-top { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; }
.app-menu-toggle { display: none; }
.app-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.app-nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; min-height: 44px;
    border-radius: var(--r-sm); color: #B4B3A7; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap;
}
.app-nav-link:hover { background: var(--surface); color: var(--text); }
.app-nav-link.is-active { background: var(--surface-2); color: var(--text); }
.app-nav-link.is-active .icon { color: var(--accent); }
.app-nav-link.is-disabled { color: #6E6D64; cursor: default; }
.app-nav-link.is-disabled:hover { background: none; color: #6E6D64; }
.app-nav-link.as-button { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
.soon { margin-left: auto; font-size: 11px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; }
.app-nav-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.app-nav-foot form { width: 100%; }

.app-main { flex: 1 1 0;  min-width: 0; padding: clamp(20px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 900px) {
    .app { flex-direction: column; }
    .app-side { flex-basis: auto; max-width: none; width: 100%; height: auto; position: sticky; top: 0; z-index: 40; border-right: 0; border-bottom: 1px solid var(--line-soft); padding-block: calc(12px + env(safe-area-inset-top)) 12px; gap: 0; }
    .app-menu-toggle { display: inline-flex; }
    .app-nav { display: none; padding-top: 14px; }
    .app-nav.is-open { display: flex; max-height: calc(100dvh - 80px); overflow-y: auto; }
}

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-head > div { display: flex; flex-direction: column; gap: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 2.5vw, 24px); display: flex; flex-direction: column; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat-label { font-size: 14px; color: var(--muted); }
.stat-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 2 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.empty { align-items: flex-start; padding-block: 32px; }
.empty .icon { color: var(--accent); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .icon { width: 18px; height: 18px; color: var(--line-strong); }
.checklist li.done { color: var(--text); }
.checklist li.done .icon { color: var(--accent); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 13px; color: #C9C8BC; }
.install-card .icon { color: var(--accent); }
.card .btn { align-self: flex-start; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto;
    border-radius: 50%; background: var(--line); color: var(--text); font-weight: 800; text-decoration: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar-xl { width: 112px; height: 112px; font-size: 32px; }
.avatar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.tabs-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--ink); padding-top: 4px; }
.tabs-nav::-webkit-scrollbar { display: none; }
.tabs-nav a { white-space: nowrap; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); color: #C9C8BC; text-decoration: none; font-size: 14px; font-weight: 600; }
.tabs-nav a:hover { border-color: var(--line-strong); color: var(--text); }
@media (max-width: 900px) { .tabs-nav { position: static; } }
.profile { display: flex; flex-direction: column; gap: 20px; max-width: 860px; }
.profile-section { gap: 16px; scroll-margin-top: 20px; }

.danger-zone { border: 1px solid #5C3522; border-radius: var(--r-md); padding: 4px 16px; }
.danger-zone summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--danger); min-height: 44px; display: flex; align-items: center; }
.danger-zone form { padding-bottom: 16px; }

/* ---------- Dialog ---------- */
.dialog {
    background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 24px; max-width: min(420px, calc(100vw - 32px));
}
.dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog form { display: flex; flex-direction: column; gap: 16px; }
.dialog-title { font-size: 20px; }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }


/* ---------- Homepage ---------- */
.btn-dark { background: var(--ink); color: var(--text); }
.btn-dark:hover { background: #24271E; color: #fff; }

.hero { position: relative; }
.hero-visual { position: relative; }
.hero-visual::before {
    content: ""; position: absolute; inset: 10% -10% -10% 10%; z-index: -1;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
    filter: blur(20px); pointer-events: none;
}

.chip {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700;
    background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
}
.chip-accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.avatar-sm { width: 40px; height: 40px; font-size: 15px; background: #3A3E33; }

/* Bento grid: tiles of different sizes so the eye can jump between them */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile, .panel { --tile: #1F221C; --tile-inner: #141611; }
.tile {
    background: var(--tile); border: 1px solid #30332B; border-radius: var(--r-xl);
    padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.tile h3 { font-size: 21px; line-height: 1.25; }
.tile p { color: var(--muted); font-size: 15px; }
.tile-text { display: flex; flex-direction: column; gap: 10px; }

.tile-mentor { grid-column: span 7; grid-row: span 2; justify-content: space-between; gap: 28px; }
.tile-points { grid-column: span 5; background: var(--accent); border-color: transparent; color: var(--on-accent); }
.tile-points p { color: #2C3313; }
.tile-calls { grid-column: span 5; justify-content: space-between; }
.tile-video { grid-column: span 4; justify-content: space-between; }
.tile-cert { grid-column: span 4; }
.tile-app { grid-column: span 4; }

.points-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; }

.mentor-flow { display: flex; flex-direction: column; gap: 12px; }
.upload-row { display: flex; align-items: center; gap: 12px; background: var(--tile-inner); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 14px 16px; }
.upload-row > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.file-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.feedback { background: var(--tile-inner); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.feedback-head { display: flex; align-items: center; gap: 12px; }
.feedback-head > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.feedback-body { color: var(--text-2) !important; font-size: 16px !important; line-height: 1.5; }
.feedback-foot { display: flex; flex-wrap: wrap; gap: 8px; }

.slot { display: flex; align-items: center; gap: 14px; background: var(--tile-inner); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.slot-date {
    width: 52px; height: 56px; border-radius: 12px; background: var(--surface-2);
    display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 52px;
}
.slot-date span { font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; }
.slot-date strong { font-family: var(--font-display); font-size: 19px; }
.slot-time { display: flex; flex-direction: column; flex: 1; }

.mini-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.mini-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.mini-steps .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--tile-inner); }
.mini-steps li.done .icon { background: var(--accent); color: var(--on-accent); }
.mini-steps li.now { color: var(--text); }
.mini-steps li.now .icon { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }

.cert {
    background: var(--tile-inner); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
    display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; position: relative;
}
.cert-seal {
    position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center;
}
.cert-line { height: 8px; border-radius: 4px; background: #3A3E33; }
.cert-line.w70 { width: 70%; margin-top: 4px; }
.cert-line.w45 { width: 45%; }

.tile-icon {
    width: 52px; height: 52px; border-radius: 16px; background: var(--tile-inner); color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
}

@media (max-width: 1000px) {
    .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .tile-mentor, .tile-points, .tile-calls { grid-column: span 6; grid-row: auto; }
    .tile-video, .tile-cert, .tile-app { grid-column: span 3; }
}
@media (max-width: 640px) {
    .bento { grid-template-columns: 1fr; }
    .bento > .tile { grid-column: auto; }
}

/* How it works */
.panel { background: var(--tile); border: 1px solid #30332B; border-radius: var(--r-xl); padding: clamp(22px, 4vw, 48px); }
.how .section-head { margin-bottom: 40px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--accent)); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 10px; }
.timeline h3 { font-size: 18px; margin-top: 8px; }
.timeline p { color: var(--muted); font-size: 15px; }
.timeline-num {
    width: 46px; height: 46px; border-radius: 50%; background: var(--tile); border: 2px solid var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; position: relative;
}
.timeline-num.is-final { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 860px) {
    .timeline { grid-template-columns: 1fr; gap: 28px; }
    .timeline::before { left: 22px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; background: linear-gradient(180deg, var(--line-strong), var(--accent)); }
    .timeline li { padding-left: 64px; }
    .timeline-num { position: absolute; left: 0; top: 0; }
    .timeline h3 { margin-top: 10px; }
}

/* Call to action */
.cta {
    position: relative; overflow: hidden; border-radius: var(--r-xl); border: 1px solid var(--line);
    background:
        radial-gradient(600px 240px at 90% 120%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
        var(--ink-2);
    padding: clamp(28px, 5vw, 56px);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-copy { display: flex; flex-direction: column; gap: 10px; max-width: 620px; }
.cta-copy p { font-size: 18px; }

/* Questions + contact */
.help { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.help-faq { display: flex; flex-direction: column; gap: 12px; }
.help-contact { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 96px; }
.help-contact .h3 { font-size: 22px; }
@media (max-width: 900px) { .help { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Courses (Phase 2)
   ========================================================================== */
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: 1; min-width: 60px; }
.bar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.course-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.course-card {
    --tile: #1F221C; background: var(--tile); border: 1px solid #30332B; border-radius: var(--r-xl);
    overflow: hidden; display: flex; flex-direction: column; min-width: 0;
}
.course-cover { position: relative; aspect-ratio: 16 / 9; background: #141611; display: block; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--accent);
    background: repeating-linear-gradient(135deg, #1A1C16 0 14px, #161813 14px 28px); }
.course-buy-cover .course-cover-empty { position: static; height: 100%; }
.course-level { position: absolute; left: 14px; top: 14px; background: rgba(14, 15, 12, .85); }
.course-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-body h3 { font-size: 19px; line-height: 1.3; }
.course-body h3 a { text-decoration: none; }
.course-body h3 a:hover { text-decoration: underline; }
.course-summary { color: var(--muted); font-size: 15px; }
.course-mentors { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 14px; }
.course-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.course-foot .course-progress { flex: 1 1 140px; }
.course-price { font-weight: 800; }
.empty-tile { align-items: flex-start; }
.empty-tile .icon { color: var(--accent); }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; align-self: flex-start; }
.back-link:hover { color: var(--text); }
.preview-note { margin-top: 20px; }

.course-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(28px, 5vw, 64px); padding-top: clamp(28px, 5vw, 56px); align-items: start; }
.course-hero-copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.course-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-weight: 600; font-size: 15px; }
.course-facts li { display: flex; align-items: center; gap: 8px; }
.course-facts .icon { color: var(--accent); }
.mentor-list { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 6px; }
.mentor { display: flex; align-items: center; gap: 12px; }
.mentor > span:last-child { display: flex; flex-direction: column; }
.course-buy { position: sticky; top: 96px; gap: 16px; }
.course-buy-cover { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #141611; margin: -6px -6px 4px; }
.course-buy-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-price-big { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) {
    .course-hero { grid-template-columns: 1fr; }
    .course-buy { position: static; }
}

.course-detail { display: block; }
.course-main { max-width: 820px; display: flex; flex-direction: column; gap: 28px; }
.curriculum { display: flex; flex-direction: column; gap: 12px; }
.curriculum-module { --tile: #1F221C; background: var(--tile); border: 1px solid #30332B; border-radius: var(--r-lg); }
.curriculum-module summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 22px; min-height: 44px;
}
.curriculum-module summary::-webkit-details-marker { display: none; }
.curriculum-module summary > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.curriculum-steps { list-style: none; margin: 0; padding: 0 22px 14px; }
.curriculum-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; }
.curriculum-steps li a { text-decoration: none; }
.curriculum-steps li a:hover { text-decoration: underline; }
.curriculum-steps .step-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.step-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #141611; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
li.is-done .step-icon { background: var(--accent); color: var(--on-accent); }

/* Dashboard */
.continue-card { flex-direction: row; flex-wrap: wrap; gap: 20px; align-items: center; }
.continue-cover { flex: 1 1 200px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #141611; position: relative; max-width: 280px; }
.continue-cover img { width: 100%; height: 100%; object-fit: cover; }
.continue-body { flex: 2 1 260px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mini-courses { list-style: none; margin: 0; padding: 0; }
.mini-courses li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mini-courses a { text-decoration: none; font-weight: 600; }

/* ---------- Lesson player ---------- */
.page-learn { min-height: 100dvh; }
.learn-top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
    padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
    background: rgba(14, 15, 12, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}
.learn-top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.learn-top-title > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learn-top-progress { display: flex; align-items: center; gap: 10px; max-width: 420px; }
.learn-steps-toggle { display: none; }

.learn { display: grid; grid-template-columns: minmax(0, 1fr) 340px; max-width: 1400px; margin: 0 auto; }
.learn-main { padding: clamp(16px, 3vw, 36px) var(--gutter) 60px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.learn-head { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.learn-text { max-width: 760px; }
.learn-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.final-note { align-items: flex-start; }
.final-note .icon { color: var(--accent); }

.learn-steps {
    border-left: 1px solid var(--line-soft); background: var(--ink-2); padding: 20px 16px 40px;
    position: sticky; top: 64px; height: calc(100dvh - 64px); overflow-y: auto;
}
.learn-module + .learn-module { margin-top: 18px; }
.learn-module-title { display: flex; flex-direction: column; gap: 2px; font-weight: 700; padding: 0 8px 8px; }
.learn-module ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.learn-module li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.learn-module li a { color: inherit; text-decoration: none; flex: 1; }
.learn-module li .step-icon { width: 26px; height: 26px; flex-basis: 26px; }
.learn-module li.is-current { background: var(--surface-2); color: var(--text); }
.learn-module li.is-current .step-icon { border: 1.5px solid var(--accent); color: var(--accent); }
.learn-module li.is-locked { color: #6E6D64; }

@media (max-width: 960px) {
    .learn { grid-template-columns: 1fr; }
    .learn-steps-toggle { display: inline-flex; }
    .learn-steps { display: none; position: fixed; inset: 64px 0 0 0; height: auto; z-index: 25; border-left: 0; }
    .learn-steps.is-open { display: block; }
    .learn-main { padding-inline: 12px; }
    .video-frame { border-radius: 12px; margin-inline: -4px; }
}

/* Quiz */
.quiz { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.quiz-q { --tile: #1F221C; background: var(--tile); border: 1px solid #30332B; border-radius: var(--r-lg); padding: 18px 20px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.quiz-q.is-ok { border-color: #5E7A23; }
.quiz-q.is-wrong { border-color: #7A3A1F; }
.quiz-q legend { float: left; width: 100%; padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 17px; display: flex; gap: 12px; align-items: flex-start; }
.quiz-num { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: #141611; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.quiz-a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; min-height: 48px; }
.quiz-a:has(input:checked) { border-color: var(--accent); background: #232A15; }
.quiz-a input { width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 20px; margin: 0; }

.quiz-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   Final tasks, certificates, points (Phase 3)
   ========================================================================== */
.chip-warn { background: var(--danger-bg); color: var(--danger); border-color: #5C3522; }
.task-status, .task-form, .task-history { max-width: 760px; }
.task-status-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-status.is-approved { border-color: #5E7A23; }
.task-status.is-returned { border-color: #7A3A1F; }
.feedback-box { background: #141611; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.feedback-box p { color: var(--text-2); }
.retry { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.submitted { display: flex; flex-direction: column; gap: 8px; }
.file-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-links li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-links a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--accent); word-break: break-all; }
.file-links a:hover { text-decoration: underline; }

.dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    text-align: center; padding: 28px 18px; border: 1.5px dashed var(--line-strong); border-radius: 16px; background: #141611; cursor: pointer;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--accent); }
.dropzone .icon { color: var(--accent); transform: rotate(180deg); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.file-list .too-big { color: var(--danger); }
.task-history summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.task-history-item { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.task-row .row-between { align-items: flex-start; }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cert-card-seal { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }

.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ledger-list li:first-child { border-top: 0; }
.ledger-amount { font-family: var(--font-display); font-weight: 700; font-size: 18px; white-space: nowrap; }
.ledger-amount.is-plus { color: var(--accent); }

.verify { display: flex; justify-content: center; }
.verify-wrap { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 24px; }
.verify-form { display: flex; gap: 10px; }
.verify-form input {
    flex: 1; min-width: 0; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong);
    background: var(--ink); color: var(--text); font-size: 18px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.verify-form input:focus { outline: none; border-color: var(--accent); }
.verify-bad { border-color: #7A3A1F; }
.verify-card { max-width: 560px; width: 100%; align-items: flex-start; }
.verify-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; }
.verify-list { margin: 0; width: 100%; }
.verify-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.verify-list dt { color: var(--muted); }
.verify-list dd { margin: 0; font-weight: 700; text-align: right; }
.verify-wrap .verify-card { max-width: none; }

/* ==========================================================================
   Ranks and payments (Phase 4)
   ========================================================================== */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; align-items: stretch; }
.rank-card {
    --tile: #1F221C; position: relative; background: var(--tile); border: 1px solid #30332B; border-radius: var(--r-xl);
    padding: 28px 26px; display: flex; flex-direction: column; gap: 14px;
}
.rank-card.is-featured { border: 2px solid var(--rank); }
.rank-card.is-current { border: 2px solid var(--accent); }
.rank-flag { position: absolute; top: -13px; left: 24px; background: var(--rank, var(--accent)); color: var(--on-accent); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 800; }
.rank-card.is-current .rank-flag { background: var(--accent); }
.rank-head { display: flex; align-items: center; gap: 12px; }
.rank-head h3 { font-family: var(--font-display); font-size: 22px; }
.rank-badge { color: var(--rank, var(--accent)); display: inline-flex; }
.rank-price strong { font-family: var(--font-display); font-size: 32px; }
.rank-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-2); }
.rank-perks li { display: flex; gap: 10px; align-items: flex-start; }
.rank-perks .icon { color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }
.rank-cta { margin-top: auto; padding-top: 8px; }
.rank-note { margin-top: 18px; }
.rank-current .rank-name { font-family: var(--font-display); font-size: 22px; color: var(--rank); }
.nav-rank { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.nav-rank > span:last-child { display: flex; flex-direction: column; }
.nav-rank .rank-badge { color: var(--rank); }

.buy-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.buy-points { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.included-in { color: var(--text-2); }
.checkout-result { max-width: 640px; align-items: flex-start; gap: 14px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table .num { text-align: right; }

.chips-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip-link { padding: 9px 16px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line-strong); color: #C9C8BC; text-decoration: none; font-weight: 600; font-size: 14px; }
.chip-link:hover { border-color: var(--muted-2); color: var(--text); }
.chip-link.is-active { background: var(--text); border-color: var(--text); color: var(--ink); }
.course-type { position: absolute; right: 14px; top: 14px; background: rgba(14, 15, 12, .85); border-color: var(--type); color: var(--type); }
.center-actions { display: flex; justify-content: center; margin-top: 26px; }

.rank-head h3 a { text-decoration: none; }
.rank-head h3 a:hover { text-decoration: underline; }
.rank-more { color: var(--muted); }
.rank-show { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .rank-show { grid-template-columns: 1fr; } }
.rank-show .rank-grid { grid-template-columns: 1fr; }

/* ==========================================================================
   Calls, messages, notifications (Phase 5)
   ========================================================================== */
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.app-side-top { gap: 8px; }
.app-side-top .brand { margin-right: auto; }
.app-bell { position: relative; }
.bell-dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (min-width: 901px) { .app-bell { display: none; } }

.booking-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.booking-row:first-of-type { border-top: 0; }
.booking-row.is-past { opacity: .75; }
.booking-date { width: 58px; height: 62px; flex: 0 0 58px; border-radius: 14px; background: #141611; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.booking-date span { font-size: 11px; font-weight: 800; color: var(--accent); text-transform: uppercase; }
.booking-date strong { font-family: var(--font-display); font-size: 16px; }
.booking-main { flex: 1 1 220px; min-width: 0; }

.book-step .h3 { display: flex; align-items: center; gap: 10px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 14px; text-decoration: none; font-weight: 600; min-height: 48px; }
.choice-wide { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 200px; }
.choice:hover { border-color: var(--muted-2); }
.choice.is-active { border-color: var(--accent); background: #232A15; }
.choice.is-disabled { opacity: .45; pointer-events: none; }
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day { flex: 0 0 64px; height: 78px; border-radius: 14px; border: 1px solid var(--line-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; font-size: 12px; color: var(--muted); }
.day strong { font-family: var(--font-display); font-size: 20px; color: var(--text); }
.day.is-active { border-color: var(--accent); background: #232A15; }
.day.is-empty { opacity: .35; pointer-events: none; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.slot-btn { min-height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 12px; text-decoration: none; font-weight: 700; }
.slot-btn:hover { border-color: var(--accent); }
.slot-btn.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.page-call { min-height: 100dvh; }
.call-main { max-width: 1200px; margin: 0 auto; padding: 16px var(--gutter) 40px; display: flex; flex-direction: column; gap: 16px; }
.call-frame { position: relative; width: 100%; height: min(78dvh, 760px); border-radius: var(--r-lg); overflow: hidden; background: #000; }
.call-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.call-box { align-items: flex-start; }
.call-hint { text-align: center; }

.convo-list { gap: 0; padding: 6px clamp(14px, 2vw, 20px); }
.convo, .notice { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--line); text-decoration: none; }
.convo:first-child, .notice:first-child { border-top: 0; }
.convo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.convo-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo.is-unread strong, .notice.is-unread strong { color: var(--accent); }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: 0 0 10px; }
.notice-icon { width: 36px; height: 36px; border-radius: 12px; background: #141611; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; }

.chat { gap: 0; padding: 0; overflow: hidden; }
.chat-log { height: min(62dvh, 620px); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; }
.msg { display: flex; }
.msg.is-mine { justify-content: flex-end; }
.msg-bubble { max-width: min(78%, 560px); background: #141611; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.msg.is-mine .msg-bubble { background: #26301A; border-color: #3A4A22; border-radius: 16px 16px 4px 16px; }
.msg-author { font-size: 12px; font-weight: 700; color: var(--accent); }
.msg-bubble p { overflow-wrap: anywhere; }
.msg-time { font-size: 11px; color: var(--muted-2); align-self: flex-end; }
.chat-form { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--ink-2); }
.chat-form textarea { width: 100%; min-height: 48px; max-height: 200px; resize: vertical; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--ink); color: var(--text); font-size: 16px; }
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
.chat-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-actions .btn-primary { margin-left: auto; }
