﻿/* ================================================================
   VORTEX · В«Современная школаВ» — Duolingo × Khan Academy × Notion
   Nunito (display) · Golos Text (UI) · JetBrains Mono (code)
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&family=Golos+Text:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #FBF7F1;
  --bg-alt: #F4EEE4;
  --surface: #FFFFFF;
  --ink: #2C2833;
  --text: #3D3847;
  --text2: #6F697B;
  --label: #9B94A8;
  --border: rgba(44,40,51,0.10);
  --hairline: rgba(44,40,51,0.06);
  --accent: #E8543F;
  --accent-hover: #D4452F;
  --accent-light: rgba(232,84,63,0.08);
  --accent-glow: rgba(232,84,63,0.20);
  --cyan: #1E9E7E;
  --cyan-light: rgba(30,158,126,0.08);
  --pink: #C75590;
  --pink-light: rgba(199,85,144,0.08);
  --yellow: #F0A93B;
  --yellow-light: rgba(240,169,59,0.10);
  --green: #279D66;
  --green-light: rgba(39,157,102,0.10);
  --ok: #279D66;
  --ok-bg: #E2F6EC;
  --err: #CE3D5A;
  --err-bg: #FBE7EB;
  --chat-bg: #F4EEE4;
  --bubble-ai: #FFFFFF;
  --bubble-ai-border: rgba(44,40,51,0.08);
  --input-bg: #FFFFFF;
  --av-user-bg: #E8543F;
  --btn-ink: #2C2833;
  --btn-ink-text: #FFFFFF;
  --font-display: 'Nunito', 'Segoe UI', sans-serif;
  --font-ui: 'Golos Text', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --r-xs: 12px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 24px;
  --r-xl: 999px;
  --shadow-sm: 0 2px 10px rgba(44,40,51,0.05);
  --shadow-card: 0 4px 24px rgba(44,40,51,0.07), 0 1px 4px rgba(44,40,51,0.04);
  --shadow-pop: 0 24px 64px rgba(44,40,51,0.14), 0 8px 20px rgba(44,40,51,0.06);
  --shadow-bounce: 0 8px 28px rgba(232,84,63,0.28);
}

body.dark {
  --bg: #17141A;
  --bg-alt: #1E1A22;
  --surface: #241F2A;
  --ink: #F2EEE9;
  --text: #D9D3DC;
  --text2: #9C93A6;
  --label: #746C80;
  --border: rgba(242,238,233,0.10);
  --hairline: rgba(242,238,233,0.06);
  --accent: #FF8266;
  --accent-hover: #FFA894;
  --accent-light: rgba(255,130,102,0.10);
  --accent-glow: rgba(255,130,102,0.22);
  --cyan: #1E9E7E;
  --cyan-light: rgba(30,158,126,0.10);
  --pink: #C75590;
  --pink-light: rgba(199,85,144,0.10);
  --yellow: #F0A93B;
  --yellow-light: rgba(240,169,59,0.10);
  --green: #279D66;
  --green-light: rgba(39,157,102,0.10);
  --ok: #279D66;
  --ok-bg: #1E2B24;
  --err: #FF7C95;
  --err-bg: #33202B;
  --chat-bg: #1B1720;
  --bubble-ai: #241F2A;
  --bubble-ai-border: rgba(242,238,233,0.10);
  --input-bg: #1E1A22;
  --av-user-bg: #FF8266;
  --btn-ink: #F2EEE9;
  --btn-ink-text: #17141A;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.30);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.25);
  --shadow-pop: 0 24px 64px rgba(0,0,0,0.55), 0 8px 20px rgba(0,0,0,0.40);
  --shadow-bounce: 0 8px 28px rgba(255,130,102,0.32);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(232,84,63,0.10), transparent 65%),
    radial-gradient(700px 500px at 100% 0%, rgba(30,158,126,0.08), transparent 70%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .35s ease, color .35s ease;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.015em; line-height: 1.2; font-weight: 700; }
em { font-style: italic; color: var(--accent); }
strong { font-weight: 700; }
a { color: var(--accent); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent-hover); }

/* ---- Focus-visible: keyboard accessibility ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.nav-link:focus-visible { background: var(--accent-light); color: var(--accent); outline: none; }
.nav-cta:focus-visible { outline-offset: 4px; }
.nav-theme-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.btn-primary:focus-visible, .auth-btn:focus-visible, .welcome-btn:focus-visible,
.quiz-start-btn:focus-visible, .quiz-check-btn:focus-visible, .next-task-btn:focus-visible,
.theory-task-link:focus-visible, .exam-nav-btn:focus-visible { outline-offset: 4px; }
.btn-ghost:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.btn-white:focus-visible { outline-offset: 4px; }
.auth-tab:focus-visible:not(.active) { color: var(--text); outline: none; background: var(--bg-alt); }
.stab:focus-visible { background: var(--bg-alt); color: var(--text); outline: none; }
.qbtn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.sbtn:focus-visible { outline-offset: 4px; }
.back-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.icon-btn:focus-visible { color: var(--accent); border-color: var(--accent); background: var(--accent-light); outline: none; }
.subject-item:focus-within { background: var(--accent-light); border-color: var(--accent-light); }
.subject-del:focus-visible { color: var(--err); background: var(--err-bg); outline: none; }
.add-subject-btn:focus-visible { border-color: var(--accent); background: var(--accent-light); outline: none; }
.subject-option:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.subj-row:focus-visible { background: var(--accent-light); padding-left: 28px; outline: none; }
.subj-row:focus-visible .arr { transform: translateX(6px); }
.exam-type-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.exam-task-num:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.toc-chip:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.quiz-nav-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.learn-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.choice-label:focus-within { border-color: var(--accent); background: var(--accent-light); }
.modal-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.modal-close:focus-visible { color: var(--err); background: var(--err-bg); outline: none; }
.modal-grade-opt:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.logout-btn:focus-visible { background: var(--err-bg); outline: none; }
.onb-grade-opt:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.onb-subject-opt:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.nav-chip:focus-visible { border-color: var(--accent); background: var(--accent-light); color: var(--accent); outline: none; }
.grade-pop-opt:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.mobile-nav-link:focus-visible { background: var(--accent-light); color: var(--accent); outline: none; }
.mobile-menu-close:focus-visible { color: var(--err); border-color: var(--err); background: var(--err-bg); outline: none; }
.nav-hamburger:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.av-opt:focus-visible { border-color: var(--accent); transform: scale(1.1); outline: none; }
.upload-av-btn:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-light); outline: none; }
.toggle input:focus-visible + .toggle-slider { box-shadow: 0 0 0 4px var(--accent-light); }
.auth-input:focus-visible, .quiz-input:focus-visible, .api-input:focus-visible,
.input-area textarea:focus-visible { outline: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--label); }

/* ════════════ HEADER / NAV ════════════ */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,247,241,0.80);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
  padding: 0 24px;
  transition: background .35s ease, box-shadow .35s ease;
  box-shadow: 0 1px 0 var(--hairline);
}
body.dark .site-nav { background: rgba(23,20,26,0.85); }
body.dark .modal-overlay { background: rgba(0,0,0,0.60); }
body.dark .mobile-overlay { background: rgba(0,0,0,0.55); }
body.dark .consent-modal { background: rgba(0,0,0,0.72); }
.app-nav { background: rgba(251,247,241,0.88); }
body.dark .app-nav { background: rgba(23,20,26,0.90); }

.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 32px; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-orb {
  width: 40px; height: 40px; border-radius: var(--r-xs);
  background: linear-gradient(135deg, #E8543F 0%, #FF8266 50%, #1E9E7E 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 800;
  box-shadow: 0 4px 16px rgba(232,84,63,0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-logo:hover .nav-orb { transform: rotate(-8deg) scale(1.08); box-shadow: 0 6px 22px rgba(232,84,63,0.45); }
.nav-name { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: var(--r-xl); font-size: 14px; font-weight: 600;
  color: var(--text2); text-decoration: none; transition: all .25s ease; letter-spacing: -0.01em;
}
.nav-link:hover { background: var(--accent-light); color: var(--accent); }
.nav-link.is-active { background: var(--accent-light); color: var(--accent); font-weight: 700; }
.nav-theme-btn {
  background: none; border: 1.5px solid var(--border); border-radius: var(--r-xl);
  width: 40px; height: 40px; cursor: pointer; color: var(--text2);
  display: flex; align-items: center; justify-content: center; transition: all .25s ease; flex-shrink: 0;
}
.nav-theme-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.nav-theme-btn .ic { width: 18px; height: 18px; }
.nav-cta {
  padding: 10px 26px; border-radius: var(--r-xl); background: linear-gradient(135deg, #E8543F 0%, #FF8266 100%);
  color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: all .3s ease;
  box-shadow: 0 4px 16px rgba(232,84,63,0.30); flex-shrink: 0; white-space: nowrap; letter-spacing: -0.01em;
}
.nav-cta:hover { background: linear-gradient(135deg, #D4452F 0%, #FF9680 100%); box-shadow: var(--shadow-bounce); color: #fff; transform: translateY(-2px); }
/* ════════════ APP NAV RIGHT ════════════ */
.app-nav-right { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-shrink: 0; }
.app-nav-actions { display: flex; flex-direction: row; align-items: center; gap: 6px; }

/* ─── CONSENT / LEGAL ─── */
.consent-modal {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(23, 20, 26, 0.70); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.consent-card {
  width: min(680px, 100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; box-shadow: var(--shadow-pop); padding: 28px; color: var(--text);
}
.consent-card h2 { margin-bottom: 10px; font-size: 24px; }
.consent-card p { margin-bottom: 14px; color: var(--text2); }
.consent-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.consent-links a { font-size: 14px; font-weight: 700; color: var(--accent); }
.consent-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 20px; font-size: 14px; line-height: 1.5;
  color: var(--text);
}
.consent-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.consent-continue {
  border: none; border-radius: 999px; padding: 12px 22px; background: linear-gradient(135deg, #FF7A59, #E8543F);
  color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(232,84,63,0.24);
}
.consent-continue.is-disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }
.site-legal-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 18px; padding: 14px 20px 24px;
  font-size: 13px; color: var(--text2); border-top: 1px solid var(--hairline); margin-top: 22px;
}
.site-legal-links a { color: var(--text2); font-weight: 600; }
.site-legal-links a:hover { color: var(--accent); }

/* ════════════ HERO ════════════ */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 80px 24px 64px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 18px; border-radius: var(--r-xl);
  background: var(--accent-light); color: var(--accent);
  font-size: 13px; font-weight: 700; letter-spacing: .02em; margin-bottom: 20px;
}
.hero-title { font-size: clamp(38px, 5.5vw, 56px); font-weight: 800; color: var(--ink); margin-bottom: 20px; line-height: 1.12; letter-spacing: -0.025em; }
.hero-title em { font-style: normal; background: linear-gradient(135deg, #FF7A59, #E8543F); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-sub { font-size: 18px; line-height: 1.75; color: var(--text2); margin-bottom: 36px; max-width: 500px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 36px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, #E8543F 0%, #FF8266 100%); color: #fff;
  font-size: 16px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 24px rgba(232,84,63,0.35); transition: all .3s ease; border: none; cursor: pointer;
  font-family: var(--font-ui); letter-spacing: -0.01em;
}
.btn-primary:hover { box-shadow: var(--shadow-bounce); transform: translateY(-3px); color: #fff; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; border-radius: var(--r-xl);
  border: 2px solid var(--border); color: var(--text); font-size: 16px; font-weight: 600;
  text-decoration: none; transition: all .3s ease; background: transparent; cursor: pointer;
  font-family: var(--font-ui);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: translateY(-2px); }
.btn-white {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 40px; border-radius: var(--r-xl);
  background: #FFFFFF; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 20px rgba(44,40,51,0.10); transition: all .3s ease; border: none; cursor: pointer;
  font-family: var(--font-ui);
}
.btn-white:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(44,40,51,0.15); }

.hero-stats { display: flex; gap: 36px; margin-top: 32px; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat b { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1; }
.hero-stat span { font-size: 13px; color: var(--label); font-weight: 600; margin-top: 4px; }

.hero-mock {
  background: var(--surface); border-radius: var(--r-lg); border: 1.5px solid var(--hairline);
  box-shadow: var(--shadow-card); overflow: hidden; padding: 24px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.hero-mock:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.mock-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--hairline); font-size: 12px; color: var(--label); font-weight: 600; font-family: var(--font-mono); }
.mock-live { padding: 4px 12px; border-radius: var(--r-xl); background: var(--green-light); color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.mock-msgs { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.mock-msg { display: flex; gap: 10px; align-items: flex-start; }
.mock-av { width: 34px; height: 34px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.mock-msg.user .mock-av { background: linear-gradient(135deg, var(--accent), #FF8266); color: #fff; }
.mock-msg.ai .mock-av { background: linear-gradient(135deg, var(--cyan), #279D66); color: #fff; }
.mock-bubble { padding: 12px 16px; border-radius: 18px 18px 18px 6px; background: var(--bg-alt); font-size: 13.5px; line-height: 1.55; color: var(--text); }
.mock-msg.ai .mock-bubble { border-radius: 6px 18px 18px 18px; background: var(--surface); border: 1.5px solid var(--hairline); }
.mock-svg { margin-top: 12px; border-radius: var(--r-xs); overflow: hidden; background: var(--surface); border: 1px solid var(--hairline); }

/* ════════════ SECTIONS ════════════ */
.section { max-width: 1200px; margin: 0 auto; padding: 80px 24px; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 12px; }
.section-index { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .08em; padding: 4px 12px; border-radius: var(--r-xl); background: var(--accent-light); }
.section-title { font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.section-title em { font-style: normal; color: var(--accent); }
.section-sub { font-size: 17px; color: var(--text2); line-height: 1.7; margin-bottom: 44px; max-width: 640px; }

/* ════════════ FEATURES ════════════ */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.feature-card {
  position: relative; padding: 32px 28px; border-radius: var(--r-lg); background: var(--surface);
  border: 1.5px solid var(--hairline); box-shadow: var(--shadow-sm); transition: all .35s ease; overflow: hidden;
  cursor: default;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(90deg, var(--accent), var(--cyan), var(--pink), var(--yellow)); opacity: 0; transition: opacity .35s ease; }
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(44,40,51,0.10); border-color: var(--border); }
.feature-card:hover::before { opacity: 1; }
.feature-num { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .06em; display: block; margin-bottom: 12px; align-self: flex-start; text-align: left; width: 100%; }
.feature-icon { width: 64px; height: 64px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; background: transparent; color: var(--accent); margin-bottom: 18px; transition: transform .25s ease; overflow: hidden; }
.feature-card:hover .feature-icon { transform: scale(1.08); }
.feature-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }
.feature-icon .ic { width: 24px; height: 24px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; color: var(--text2); line-height: 1.65; }

/* ════════════ SUBJECTS ════════════ */
.subj-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.subj-index { display: flex; flex-direction: column; gap: 4px; }
.subj-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--r-sm); text-decoration: none; transition: all .3s ease; }
.subj-row:hover { background: var(--accent-light); padding-left: 28px; }
.subj-row .n { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); width: 30px; flex-shrink: 0; }
.subj-row .name { font-size: 15px; font-weight: 700; color: var(--ink); flex: 0 0 auto; }
.subj-row .note { font-size: 13px; color: var(--label); flex: 1; text-align: right; font-family: var(--font-mono); }
.subj-row .arr { font-size: 16px; color: var(--accent); transition: transform .3s ease; }
.subj-row:hover .arr { transform: translateX(6px); }

/* ════════════ STEPS ════════════ */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
.step-card { padding: 32px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--hairline); box-shadow: var(--shadow-sm); transition: all .35s ease; }
.step-card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(44,40,51,0.09); border-color: var(--border); }
.step-num { display: inline-block; padding: 5px 14px; border-radius: var(--r-xl); background: var(--cyan-light); color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: .04em; margin-bottom: 14px; font-family: var(--font-mono); }
.step-card:nth-child(2) .step-num { background: var(--pink-light); color: var(--pink); }
.step-card:nth-child(3) .step-num { background: var(--yellow-light); color: #C98A22; }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 14.5px; color: var(--text2); line-height: 1.65; }

/* ════════════ CTA BAND ════════════ */
.cta-band { max-width: 1200px; margin: 48px auto 72px; padding: 0 24px; }
.cta-band-inner { text-align: center; padding: 72px 48px; border-radius: var(--r-lg); background: linear-gradient(135deg, #2C2833 0%, #45303F 50%, #2C2833 100%); color: #fff; position: relative; overflow: hidden; }
.cta-band-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 40%, rgba(232,84,63,0.30) 0%, transparent 55%), radial-gradient(circle at 75% 60%, rgba(30,158,126,0.20) 0%, transparent 55%), radial-gradient(circle at 50% 80%, rgba(199,85,144,0.15) 0%, transparent 55%); }
.cta-band-inner h2 { color: #fff; font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 14px; position: relative; font-weight: 800; }
.cta-band-inner p { font-size: 17px; opacity: .85; margin-bottom: 32px; position: relative; }
.cta-band-inner .btn-white { position: relative; }

/* ════════════ FOOTER ════════════ */
.site-footer { border-top: 1px solid var(--hairline); padding: 56px 24px 28px; background: var(--surface); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand h4, .footer-col h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 16px; letter-spacing: -0.01em; }
.footer-brand p { font-size: 14px; color: var(--text2); line-height: 1.7; margin-top: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--text2); text-decoration: none; transition: color .25s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1200px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; font-size: 12.5px; color: var(--label); }

/* ════════════ AUTH ════════════ */
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--r-lg); border: 1.5px solid var(--hairline); box-shadow: var(--shadow-card); padding: 44px 40px; }
.auth-logo { width: 76px; height: 76px; border-radius: 20px; background: linear-gradient(135deg, #E8543F 0%, #FF8266 50%, #1E9E7E 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 36px; font-weight: 800; margin: 0 auto 20px; box-shadow: 0 8px 28px rgba(232,84,63,0.35); }
.auth-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-sub { font-size: 14.5px; color: var(--text2); margin-bottom: 32px; }
.auth-tabs { display: flex; gap: 4px; background: var(--bg-alt); border-radius: var(--r-xl); padding: 5px; margin-bottom: 28px; }
.auth-tab { flex: 1; padding: 11px 16px; border-radius: var(--r-xl); border: none; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .3s ease; background: transparent; color: var(--text2); font-family: var(--font-ui); }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 10px rgba(44,40,51,0.08); }
.auth-tab:hover:not(.active) { color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: .01em; }
.auth-input { width: 100%; padding: 14px 18px; border-radius: var(--r-sm); border: 1.5px solid var(--border); font-size: 15px; font-family: var(--font-ui); color: var(--text); background: var(--input-bg); outline: none; transition: border-color .25s ease, box-shadow .25s ease; }
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.auth-error { display: none; padding: 11px 16px; border-radius: var(--r-xs); background: var(--err-bg); color: var(--err); font-size: 13px; font-weight: 600; }
.auth-btn { width: 100%; padding: 15px; border-radius: var(--r-xl); border: none; background: linear-gradient(135deg, #E8543F 0%, #FF8266 100%); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: all .3s ease; box-shadow: 0 5px 20px rgba(232,84,63,0.30); font-family: var(--font-ui); letter-spacing: -0.01em; }
.auth-btn:hover { box-shadow: var(--shadow-bounce); transform: translateY(-2px); }
.auth-home-link { display: block; text-align: center; margin-top: 28px; font-size: 14px; color: var(--label); text-decoration: none; transition: color .25s ease; }
.auth-home-link:hover { color: var(--accent); }

/* ════════════ ONBOARDING ════════════ */
.onb-grade-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 18px 0 6px; }
.onb-grade-opt { padding: 15px 6px; border-radius: var(--r-sm); border: 2px solid var(--hairline); background: var(--surface); font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--text2); cursor: pointer; text-align: center; transition: all .25s ease; }
.onb-grade-opt:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: translateY(-2px); }
.onb-grade-opt.selected { border-color: var(--accent); background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; box-shadow: 0 4px 16px rgba(232,84,63,0.25); }
.onb-subject-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.onb-subject-opt { padding: 11px 22px; border-radius: var(--r-xl); border: 2px solid var(--hairline); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text2); cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.onb-subject-opt:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: translateY(-2px); }
.onb-subject-opt.selected { border-color: var(--accent); background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; }

/* ─── SUBJECTS CABINET ─── */
.app-shell { min-height: 100vh; padding: 24px; display: flex; align-items: center; justify-content: center; }
.dashboard-shell { width: min(1120px, 100%); background: var(--surface); border: 1px solid var(--hairline); border-radius: 28px; box-shadow: var(--shadow-card); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.dashboard-brand { display: flex; align-items: center; gap: 14px; }
.dashboard-kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.dashboard-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--ink); }
.dashboard-actions { display: flex; align-items: center; gap: 10px; }
.streak-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: 999px; background: var(--accent-light); color: var(--accent); font-size: 13px; font-weight: 700; }
.streak-pill .ic { width: 16px; height: 16px; fill: currentColor; }
.dashboard-hero { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 18px; padding: 8px 0; }
.hero-copy { padding: 24px; border-radius: 24px; background: linear-gradient(135deg, rgba(232,84,63,0.10), rgba(30,158,126,0.10)); border: 1px solid var(--hairline); }
.hero-copy h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 10px; }
.hero-copy p { color: var(--text2); max-width: 620px; }
.hero-badge { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; background: var(--surface); color: var(--accent); font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ghost-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; transition: all .25s ease; }
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.ghost-btn.small { padding: 8px 12px; font-size: 13px; }
.hero-summary { padding: 20px; border-radius: 24px; background: var(--bg-alt); border: 1px solid var(--hairline); display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.summary-top { display: flex; align-items: center; justify-content: space-between; }
.summary-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--label); }
.summary-top strong { font-size: 32px; color: var(--ink); }
.summary-grid { display: grid; gap: 10px; }
.summary-chip { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; }
.summary-chip span { color: var(--text2); font-size: 13px; }
.summary-chip strong { color: var(--ink); font-size: 15px; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 18px; }
.dashboard-card { padding: 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--hairline); }
.dashboard-card.wide { padding-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h3 { font-size: 20px; margin-bottom: 2px; }
.card-head p { color: var(--text2); font-size: 13px; }
.subjects-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.subject-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 18px; transition: all .25s ease; border: 1px solid transparent; background: var(--bg-alt); }
.subject-item:hover { background: var(--accent-light); border-color: var(--accent-light); }
.subject-item-left { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; }
.subject-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--accent); transition: transform .2s ease; }
.subject-item:hover .subject-icon { transform: scale(1.06); }
.subject-icon .ic { width: 22px; height: 22px; }
.subject-meta { display: flex; flex-direction: column; gap: 2px; }
.subject-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.subject-note { font-size: 12px; color: var(--text2); }
.subject-del { background: none; border: none; color: var(--label); font-size: 16px; cursor: pointer; padding: 8px; border-radius: 999px; transition: all .25s ease; }
.subject-del:hover { color: var(--err); background: var(--err-bg); }
.add-panel { display: none; margin-top: 8px; padding: 16px; border-radius: 18px; background: var(--bg-alt); border: 1px solid var(--hairline); }
.add-panel p { font-size: 13px; color: var(--label); font-weight: 600; margin-bottom: 10px; }
.subject-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.subject-option { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.subject-option:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.empty-state { padding: 18px; border-radius: 18px; text-align: center; background: var(--bg-alt); color: var(--text2); }
.empty-state p { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.empty-small { color: var(--text2); font-size: 13px; }
.mini-stack { display: flex; flex-direction: column; gap: 10px; }
.mini-card { padding: 14px; border-radius: 18px; background: var(--bg-alt); border: 1px solid var(--hairline); }
.mini-card.accent { background: linear-gradient(135deg, rgba(232,84,63,0.08), rgba(30,158,126,0.08)); }
.mini-card span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--label); margin-bottom: 6px; }
.mini-card strong { font-size: 14px; color: var(--ink); line-height: 1.45; }
.dashboard-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.logout-btn { padding: 10px 16px; border-radius: 999px; border: none; background: linear-gradient(135deg, #E8543F 0%, #FF8266 100%); color: #fff; font-weight: 700; cursor: pointer; }
.exam-nav-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 11px 18px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .3s ease; text-decoration: none; font-family: var(--font-ui); background: var(--btn-ink); color: var(--btn-ink-text); border: none; }
.exam-nav-btn:hover { opacity: .92; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(44,40,51,0.15); }
.icon-btn { background: none; border: 1.5px solid var(--border); border-radius: var(--r-xs); width: 40px; height: 40px; cursor: pointer; color: var(--text2); display: flex; align-items: center; justify-content: center; transition: all .25s ease; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }
.icon-btn .ic { width: 17px; height: 17px; }

@media (max-width: 920px) {
  .dashboard-hero,
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-shell { padding: 12px; }
  .dashboard-shell { padding: 16px; border-radius: 20px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .dashboard-actions { width: 100%; justify-content: space-between; }
  .hero-copy, .hero-summary, .dashboard-card { padding: 16px; }
  .subject-item { padding: 12px; }
}
/* ════════════ WELCOME ════════════ */
.welcome-card { text-align: center; padding: 56px 40px; }
.welcome-emoji { display: flex; justify-content: center; margin-bottom: 24px; color: var(--accent); }
.welcome-emoji .ic { width: 56px; height: 56px; stroke-width: 1.2; }
.welcome-title { font-family: var(--font-display); font-size: 32px; font-weight: 800; margin-bottom: 18px; color: var(--ink); letter-spacing: -0.02em; }
.welcome-text { font-size: 16px; color: var(--text2); line-height: 1.8; margin-bottom: 36px; max-width: 460px; margin-left: auto; margin-right: auto; }
.welcome-btn { padding: 16px 44px; border: none; border-radius: var(--r-xl); background: linear-gradient(135deg, #E8543F 0%, #FF8266 100%); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: all .3s ease; box-shadow: 0 5px 20px rgba(232,84,63,0.28); font-family: var(--font-ui); }
.welcome-btn:hover { box-shadow: var(--shadow-bounce); transform: translateY(-3px); }
.welcome-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ════════════ CHAT ════════════ */
#screen-chat, #screen-exam-chat, #screen-theory { flex-direction: column; align-items: center; justify-content: flex-start; padding: 20px; }
.chat-app { background: var(--surface); border: 1.5px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-card); width: 100%; max-width: 680px; display: flex; flex-direction: column; min-height: calc(100vh - 40px); overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--hairline); flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.back-btn { padding: 9px 16px; border-radius: var(--r-xl); border: 1.5px solid var(--border); background: none; color: var(--text2); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); display: inline-flex; align-items: center; gap: 6px; }
.back-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.topbar-subject { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.topbar-subject .ic { width: 20px; height: 20px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.stabs-bar { display: flex; gap: 6px; padding: 12px 16px; overflow-x: auto; flex-shrink: 0; border-bottom: 1px solid var(--hairline); }
.stab { padding: 8px 18px; border-radius: var(--r-xl); border: none; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .25s ease; background: transparent; color: var(--text2); font-family: var(--font-ui); }
.stab:hover { background: var(--bg-alt); color: var(--text); }
.stab.active { background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; box-shadow: 0 3px 12px rgba(232,84,63,0.25); }

.qbtns { display: flex; gap: 8px; padding: 14px 16px; overflow-x: auto; flex-shrink: 0; flex-wrap: wrap; }
.qbtn { padding: 9px 18px; border-radius: var(--r-xl); border: 1.5px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; transition: all .25s ease; font-family: var(--font-ui); }
.qbtn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: translateY(-1px); }

.chat { flex: 1; overflow-y: auto; padding: 24px 18px; display: flex; flex-direction: column; gap: 20px; background: var(--bg-alt); }
.msg { display: flex; gap: 12px; max-width: 88%; animation: msgIn .3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.ai { align-self: flex-start; }
.av { width: 38px; height: 38px; border-radius: var(--r-xs); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; overflow: hidden; }
.av.user { background: linear-gradient(135deg, var(--accent), #FF8266); color: #fff; }
.av.ai { background: linear-gradient(135deg, var(--cyan), #279D66); color: #fff; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.bubble { padding: 13px 18px; border-radius: 18px; font-size: 14.5px; line-height: 1.7; color: var(--text); }
.msg.user .bubble { background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; border-radius: 18px 6px 18px 18px; }
.msg.ai .bubble { background: var(--surface); border: 1.5px solid var(--hairline); border-radius: 6px 18px 18px 18px; }

.typing { display: flex; gap: 5px; padding: 8px 0; }
.typing .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: bounce 1.2s infinite ease; }
.typing .dot:nth-child(2) { animation-delay: .15s; }
.typing .dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-8px); opacity: 1; } }

.input-area { display: flex; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--hairline); flex-shrink: 0; background: var(--surface); }
.input-area textarea { flex: 1; padding: 13px 18px; border-radius: var(--r-xl); border: 1.5px solid var(--border); font-size: 15px; font-family: var(--font-ui); color: var(--text); background: var(--input-bg); outline: none; resize: none; transition: border-color .25s ease, box-shadow .25s ease; }
.input-area textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.sbtn { width: 48px; height: 48px; border-radius: 50%; border: none; background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .3s ease; box-shadow: 0 4px 16px rgba(232,84,63,0.30); }
.sbtn:hover { box-shadow: var(--shadow-bounce); transform: scale(1.05); }
.sbtn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }
.sbtn .ic { width: 20px; height: 20px; }

.status { padding: 10px 16px; font-size: 12.5px; font-weight: 600; text-align: center; min-height: 22px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.streak-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-xl); background: var(--accent-light); color: var(--accent); font-size: 13px; font-weight: 700; }
.streak-badge .ic { width: 15px; height: 15px; }

.svg-wrap { margin: 16px 0; border-radius: var(--r-md); overflow: hidden; border: 1.5px solid var(--hairline); background: var(--bg); max-width: 100%; }
.svg-wrap svg { display: block; width: 100%; height: auto; }

/* ════════════ QUIZ ════════════ */
.quiz-cards { margin: 14px 0; }
.quiz-header { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 16px; padding: 12px 18px; background: var(--surface); border-radius: var(--r-sm); border: 1.5px solid var(--hairline); }
.quiz-card { background: var(--surface); border: 1.5px solid var(--hairline); border-radius: var(--r-md); padding: 24px; margin-bottom: 14px; transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease; }
.quiz-card:hover { box-shadow: 0 4px 16px rgba(44,40,51,0.06); transform: translateY(-2px); border-color: var(--border); }
.quiz-qnum { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: .06em; margin-bottom: 10px; }
.quiz-qtext { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.65; margin-bottom: 16px; }
.quiz-input { width: 100%; padding: 12px 16px; border-radius: var(--r-sm); border: 1.5px solid var(--border); font-size: 15px; font-family: var(--font-ui); color: var(--text); background: var(--input-bg); outline: none; margin-bottom: 12px; transition: border-color .25s ease, box-shadow .25s ease; }
.quiz-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.quiz-input:disabled { opacity: .6; background: var(--bg-alt); }
.quiz-actions { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.quiz-check-btn { padding: 10px 22px; border-radius: var(--r-xl); border: none; background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .3s ease; font-family: var(--font-ui); }
.quiz-check-btn:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(232,84,63,0.25); transform: translateY(-1px); }
.quiz-check-btn:disabled { opacity: .4; cursor: not-allowed; }
.quiz-nav-btn { padding: 10px 20px; border-radius: var(--r-xl); border: 1.5px solid var(--border); background: transparent; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.quiz-nav-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.quiz-feedback { padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; line-height: 1.65; margin-top: 10px; }
.quiz-feedback.correct { background: var(--ok-bg); color: var(--ok); }
.quiz-feedback.wrong { background: var(--err-bg); color: var(--err); }
.quiz-summary { margin-top: 18px; text-align: center; }
.quiz-btn-wrap { text-align: center; margin: 18px 0 6px; }
.quiz-start-btn { padding: 14px 32px; border-radius: var(--r-xl); border: none; background: linear-gradient(135deg, #FF7A59, #E8543F); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .3s ease; box-shadow: 0 5px 20px rgba(232,84,63,0.25); font-family: var(--font-ui); }
.quiz-start-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-bounce); }

.choice-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.choice-label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-sm); border: 1.5px solid var(--border); cursor: pointer; transition: all .25s ease; font-size: 14px; font-weight: 500; }
.choice-label:hover { border-color: var(--accent); background: var(--accent-light); }
.choice-label input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; }

.result-card { text-align: center; padding: 32px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 4px 20px rgba(232,84,63,0.10); transition: transform .3s ease, box-shadow .3s ease; }
.result-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,84,63,0.15); }
.result-score { font-family: var(--font-display); font-size: 52px; font-weight: 800; color: var(--accent); line-height: 1; }

.next-task-btn, .learn-btn { padding: 11px 24px; border-radius: var(--r-xl); font-size: 14px; font-weight: 700; cursor: pointer; transition: all .3s ease; font-family: var(--font-ui); border: none; display: inline-flex; align-items: center; gap: 8px; }
.next-task-btn { background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; }
.next-task-btn:hover { box-shadow: 0 4px 16px rgba(232,84,63,0.25); transform: translateY(-2px); }
.learn-btn { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.learn-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.task-card { padding: 16px 20px; border-radius: var(--r-md); background: var(--accent-light); border: 1.5px solid var(--accent-light); margin-bottom: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.task-card:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(232,84,63,0.10); }
.theory-task-link { padding: 11px 24px; border-radius: var(--r-xl); border: none; background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .3s ease; font-family: var(--font-ui); margin-top: 12px; }
.theory-task-link:hover { box-shadow: 0 4px 16px rgba(232,84,63,0.25); transform: translateY(-2px); }

.exam-type-btn { padding: 11px 30px; border-radius: var(--r-xl); border: 2px solid var(--hairline); background: var(--surface); font-size: 15px; font-weight: 700; color: var(--text2); cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.exam-type-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.exam-type-btn.active { border-color: var(--accent); background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; box-shadow: 0 4px 16px rgba(232,84,63,0.20); }
.exam-task-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; margin-top: 18px; }
.exam-task-num { padding: 14px 6px; border-radius: var(--r-sm); border: 2px solid var(--hairline); background: var(--surface); font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; transition: all .25s ease; text-align: center; }
.exam-task-num:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: translateY(-2px); }
.theory-open-btn { display: inline-flex; padding: 11px 22px; border-radius: var(--r-xl); background: var(--cyan-light); color: var(--cyan); font-size: 14px; font-weight: 700; margin-bottom: 18px; transition: all .25s ease; cursor: pointer; }
.theory-open-btn:hover { background: rgba(30,158,126,0.15); transform: translateY(-1px); }
body.dark .theory-open-btn:hover { background: rgba(30,158,126,0.18); }

.theory-toc { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; padding: 18px; }
.toc-chip { padding: 9px 18px; border-radius: var(--r-xl); border: 1.5px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.toc-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.theory-body { padding: 0 18px 44px; }
.theory-block { margin-bottom: 30px; padding: 28px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--hairline); box-shadow: var(--shadow-sm); transition: box-shadow .25s ease; }
.theory-block:hover { box-shadow: 0 6px 20px rgba(44,40,51,0.07); }
.theory-block h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 16px; letter-spacing: -0.015em; }

/* ════════════ MODAL ════════════ */
.modal-overlay { display: flex; position: fixed; inset: 0; z-index: 200; background: rgba(44,40,51,0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); align-items: center; justify-content: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card { width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: var(--r-lg); border: 1.5px solid var(--hairline); box-shadow: var(--shadow-pop); padding: 36px 32px; transform: translateY(20px) scale(0.97); transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.open .modal-card { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.modal-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--label); cursor: pointer; padding: 6px 10px; border-radius: var(--r-xs); transition: all .25s ease; }
.modal-close:hover { color: var(--err); background: var(--err-bg); }
.modal-section { margin-bottom: 24px; }
.settings-label { display: block; font-size: 13px; font-weight: 700; color: var(--label); letter-spacing: .04em; margin-bottom: 12px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; }

.toggle { position: relative; display: inline-flex; }
.toggle input { display: none; }
.toggle-slider { width: 50px; height: 28px; border-radius: 999px; background: var(--border); cursor: pointer; transition: background .3s ease; position: relative; }
.toggle-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 6px rgba(0,0,0,.12); transition: transform .3s ease; }
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::after { transform: translateX(22px); }

.avatar-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.av-opt { width: 42px; height: 42px; border-radius: var(--r-xs); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; transition: all .25s ease; border: 2px solid transparent; background: var(--bg-alt); }
.av-opt:hover { border-color: var(--accent); transform: scale(1.1); }
.av-opt.selected { border-color: var(--accent); background: var(--accent-light); box-shadow: 0 0 0 3px var(--accent-glow); }
.upload-av-btn { display: inline-flex; padding: 9px 20px; border-radius: var(--r-xl); border: 1.5px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.upload-av-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.api-input { width: 100%; padding: 12px 16px; border-radius: var(--r-sm); border: 1.5px solid var(--border); font-size: 13px; font-family: var(--font-mono); color: var(--text); background: var(--input-bg); outline: none; margin-bottom: 12px; transition: border-color .25s ease; }
.api-input:focus { border-color: var(--accent); }

.modal-btn { padding: 10px 22px; border-radius: var(--r-xl); border: 1.5px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; font-family: var(--font-ui); transition: all .25s ease; }
.modal-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.modal-grade-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-grade-opt { width: 40px; height: 40px; border-radius: var(--r-xs); border: 2px solid var(--hairline); background: var(--surface); font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text2); cursor: pointer; transition: all .25s ease; display: flex; align-items: center; justify-content: center; }
.modal-grade-opt:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: scale(1.08); }
.modal-grade-opt.selected { border-color: var(--accent); background: linear-gradient(135deg, #E8543F, #FF8266); color: #fff; box-shadow: 0 3px 12px rgba(232,84,63,0.20); }

.logout-btn { padding: 11px 22px; border-radius: var(--r-xl); border: 1.5px solid var(--err); background: transparent; color: var(--err); font-size: 14px; font-weight: 700; cursor: pointer; transition: all .25s ease; font-family: var(--font-ui); }
.logout-btn:hover { background: var(--err-bg); }

.stat-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.stat-cell { text-align: center; padding: 20px 14px; border-radius: var(--r-md); background: var(--bg-alt); border: 1px solid var(--hairline); transition: transform .25s ease; }
.stat-cell:hover { transform: translateY(-2px); }
.stat-cell .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--accent); display: flex; align-items: center; justify-content: center; gap: 8px; }
.stat-cell .num .ic { width: 22px; height: 22px; }
.stat-cell .cap { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--label); margin-top: 8px; }
.stat-cell .sub { font-size: 12px; color: var(--text2); margin-top: 6px; line-height: 1.4; }

/* ════════════ AD SLOTS ════════════ */
.ad-wrapper { display: flex; justify-content: center; gap: 24px; align-items: flex-start; padding-top: 24px; }
.ad-slot { width: 160px; min-height: 600px; border: 2px dashed var(--border); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--label); font-size: 12px; font-weight: 600; flex-shrink: 0; text-align: center; padding: 16px; background: var(--bg-alt); }

/* ════════════ SCREENS ════════════ */
.screen { display: none; }
.screen.active { display: flex; }

/* ════════════ ICON ════════════ */
.ic { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic-s { width: 16px; height: 16px; vertical-align: -3px; }

/* ════════════ MOBILE HAMBURGER ════════════ */
.nav-hamburger { display: none; background: none; border: 1.5px solid var(--border); border-radius: var(--r-xs); width: 40px; height: 40px; cursor: pointer; color: var(--text2); align-items: center; justify-content: center; padding: 0; transition: all .25s ease; flex-shrink: 0; }
.nav-hamburger:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.nav-hamburger .ic { width: 22px; height: 22px; }

.mobile-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(44,40,51,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.mobile-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu {
  position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; height: 100dvh;
  z-index: 160; background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(44,40,51,0.18);
  display: flex; flex-direction: column; padding: 24px 18px;
  transition: right .35s cubic-bezier(0.22, 0.61, 0.36, 1); overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.mobile-menu-head .nav-logo { flex: 1; }
.mobile-menu-close { background: none; border: 1.5px solid var(--border); border-radius: var(--r-xs); width: 40px; height: 40px; cursor: pointer; color: var(--text2); display: flex; align-items: center; justify-content: center; transition: all .25s ease; flex-shrink: 0; }
.mobile-menu-close:hover { color: var(--err); border-color: var(--err); background: var(--err-bg); }

.mobile-nav-links { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mobile-nav-link {
  display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-radius: var(--r-sm);
  font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; transition: all .2s ease;
}
.mobile-nav-link:hover { background: var(--accent-light); color: var(--accent); }
.mobile-nav-link.is-active { background: var(--accent-light); color: var(--accent); }
.mobile-nav-link .nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; opacity: 0; transition: opacity .25s ease, transform .25s ease; }
.mobile-nav-link.is-active .nav-dot, .mobile-nav-link:hover .nav-dot { opacity: 1; }
.mobile-nav-link:hover .nav-dot { transform: scale(1.3); }

.mobile-nav-footer { padding-top: 20px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; }
.mobile-nav-footer .nav-theme-btn { width: 100%; justify-content: flex-start; gap: 12px; padding: 14px 18px; font-size: 14px; font-weight: 600; font-family: var(--font-ui); border-radius: var(--r-sm); height: auto; }
.mobile-nav-footer .logout-btn, .mobile-nav-footer .app-nav-exit { width: 100%; text-align: center; }

/* ════════════ SAFE AREA ════════════ */
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

/* ════════════ RESPONSIVE - TABLET ════════════ */
@media (max-width: 900px) {
  .site-nav { padding: 0 18px; }
  .nav-inner { height: 58px; gap: 14px; }
  .nav-links { display: none; }
  .nav-chips { display: none; }
  .nav-hamburger { display: flex; }
  
/* ════════════ NAV RIGHT ACTIONS ════════════ */



  .hero { grid-template-columns: 1fr; gap: 40px; padding: 44px 20px 40px; }
  .hero-mock { max-width: 480px; margin: 0 auto; }
  .hero-title { font-size: clamp(28px, 7vw, 44px); }
  .hero-sub { font-size: 16px; }
  .hero-stats { gap: 24px; }
  .hero-stat b { font-size: 28px; }

  .features-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .subj-cols { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }

  .chat-app { max-width: 100%; border-radius: var(--r-md); min-height: calc(100dvh - 84px); }
  #screen-chat, #screen-exam-chat, #screen-theory { padding: 10px; }

  .subjects-card { max-width: 100%; border-radius: var(--r-md); }
  .auth-card { max-width: 100%; padding: 32px 24px; }

  .exam-task-grid { grid-template-columns: repeat(6, 1fr); }
  .theory-toc { padding: 14px 10px; }
}

/* ════════════ RESPONSIVE - PHONE ════════════ */
@media (max-width: 600px) {
  .nav-inner { height: 52px; gap: 10px; }
  .nav-name { font-size: 18px; }
  .nav-orb { width: 36px; height: 36px; font-size: 18px; }
  .nav-cta { padding: 8px 18px; font-size: 13px; }
  .nav-hamburger { width: 36px; height: 36px; }

  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 24px 20px; }

  .section { padding: 44px 16px; }
  .section-head { flex-direction: column; gap: 10px; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 15px; margin-bottom: 30px; }

  .hero { padding: 32px 16px 36px; }
  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stat b { font-size: 24px; }
  .hero-stat span { font-size: 11px; }

  .mock-msgs { gap: 12px; }
  .mock-bubble { font-size: 12px; padding: 10px 14px; }

  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; font-size: 11px; }
  .cta-band-inner { padding: 36px 24px; }

  .subj-row { padding: 14px 16px; }
  .subj-row .note { display: none; }

  .step-card { padding: 24px 20px; }

  /* chat */
  .chat-app { border-radius: 0; min-height: 100dvh; max-width: 100%; }
  #screen-chat, #screen-exam-chat, #screen-theory { padding: 0; }
  .chat { padding: 16px 12px; gap: 16px; }
  .msg { max-width: 92%; }
  .bubble { font-size: 14px; padding: 11px 15px; }
  .stabs-bar { padding: 10px 12px; gap: 4px; }
  .stab { padding: 7px 14px; font-size: 12px; }
  .qbtns { padding: 10px 12px; gap: 6px; }
  .qbtn { padding: 8px 14px; font-size: 12px; }
  .input-area { padding: 12px; gap: 10px; position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 5; }
  .input-area textarea { padding: 11px 15px; font-size: 15px; }
  .sbtn { width: 44px; height: 44px; }

  /* topbar */
  .topbar { padding: 12px; }
  .topbar-subject { font-size: 15px; }
  .back-btn { padding: 7px 12px; font-size: 13px; }
  .streak-badge { font-size: 11px; padding: 5px 10px; }

  /* auth */
  .auth-card { padding: 28px 20px; border-radius: var(--r-md); }
  .auth-logo { width: 60px; height: 60px; font-size: 28px; }
  .auth-title { font-size: 24px; }

  /* onboarding */
  .onb-grade-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .onb-grade-opt { padding: 13px 4px; font-size: 14px; }
  .onb-subject-opt { padding: 9px 16px; font-size: 13px; }

  /* cabinet */
  .subjects-card { padding: 24px 18px; border-radius: var(--r-md); }
  .subjects-greeting { font-size: 22px; }
  .subject-item { padding: 12px 14px; }
  .subject-icon { width: 38px; height: 38px; }
  .subject-icon .ic { width: 18px; height: 18px; }
  .subject-name { font-size: 14px; }

  /* exam */
  .exam-task-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .exam-task-num { padding: 12px 4px; font-size: 13px; }
  .exam-type-btn { padding: 9px 20px; font-size: 14px; }

  /* quiz */
  .quiz-card { padding: 18px 16px; }
  .quiz-qtext { font-size: 14px; }
  .quiz-actions { flex-direction: column; }
  .quiz-check-btn, .quiz-nav-btn { width: 100%; text-align: center; justify-content: center; }

  /* modal */
  .modal-card { max-width: 100%; max-height: 100dvh; border-radius: 0; padding: 28px 20px; }
  .modal-overlay { padding: 0; }

  /* result */
  .result-score { font-size: 40px; }

  /* mobile menu */
  .mobile-menu { width: 260px; }

  /* touch targets */
  button, .btn-primary, .btn-ghost, .btn-white, .nav-link, .subj-row, .exam-task-num, .toc-chip,
  .qbtn, .stab, .subject-option, .quiz-check-btn, .quiz-nav-btn, .auth-tab, .onb-grade-opt,
  .onb-subject-opt, .theory-task-link, .next-task-btn, .learn-btn, .add-subject-btn {
    min-height: 44px;
  }
  .subj-row { min-height: 48px; }
  .exam-task-num { min-height: 44px; }
}

/* ════════════ RESPONSIVE - SMALL PHONE ════════════ */
@media (max-width: 380px) {
  .hero-title { font-size: 24px; }
  .section-title { font-size: 22px; }
  .nav-name { font-size: 16px; }
  .onb-grade-grid { grid-template-columns: repeat(4, 1fr); }
  .exam-task-grid { grid-template-columns: repeat(3, 1fr); }
  .stabs-bar { padding: 8px 8px; }
  .stab { padding: 6px 12px; font-size: 11px; }
}

/* ════════════ NAV CHIPS (класс + предмет прямо в шапке) ════════════ */
.nav-chips { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px;
  border-radius: var(--r-xl); border: 1.5px solid var(--border);
  background: var(--bg); font-family: var(--font-ui); font-size: 13px;
  font-weight: 700; color: var(--text); cursor: pointer; white-space: nowrap;
  transition: all .2s; height: 36px;
}
.nav-chip:hover { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.nav-chip span { font-weight: 700; }
.nav-chip.chip-warn { border-color: var(--accent); animation: chip-pulse 2s infinite; }
@keyframes chip-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(232,84,63,.25)}50%{box-shadow:0 0 0 6px rgba(232,84,63,0)} }

/* ════════════ QUICK BAR (убрана — чипы в шапке) ════════════ */
.quick-bar { display: none; }

/* ════════════ GRADE / SUBJECT POPPER ════════════ */
.grade-pop {
  position: absolute; z-index: 120; min-width: 260px; max-width: 340px;
  background: var(--surface); border-radius: var(--r-lg); border: 2px solid var(--border);
  box-shadow: var(--shadow-pop); padding: 20px;
  opacity: 0; transform: translateY(-8px) scale(0.96);
  transform-origin: top center;
  transition: opacity .25s ease, transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.grade-pop.show {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.grade-pop-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.grade-pop-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.grade-pop-opt {
  padding: 10px 18px; border-radius: var(--r-xl); border: 2px solid var(--hairline);
  background: var(--surface); font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  color: var(--text); cursor: pointer; transition: all .15s;
  min-height: 44px;
}
.grade-pop-opt:hover { border-color: var(--accent); color: var(--accent); }
.grade-pop-opt.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
.pop-divider { width: 100%; font-size: 11px; font-weight: 700; color: var(--label); text-transform: uppercase; letter-spacing: .06em; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--hairline); }

@media (max-width: 600px) {
  .quick-bar { padding: 10px 12px; gap: 8px; top: 50px; }
  .qb-chip { padding: 8px 14px; font-size: 14px; gap: 6px; }
  .grade-pop { min-width: 220px; padding: 16px; }
  .grade-pop-opt { padding: 8px 14px; font-size: 14px; }
}


/* ════════════ FAQ ════════════ */
.faq-list { display: flex; flex-direction: column; gap: 2px; }
.faq-item { border-radius: var(--r-md); overflow: hidden; border: 1.5px solid var(--hairline); background: var(--surface); transition: all .2s; }
.faq-item[open] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); margin: 4px 0; }
.faq-question { padding: 16px 20px; font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; transition: color .2s; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: '+'; font-family: var(--font-mono); font-size: 20px; color: var(--accent); transition: transform .3s; flex-shrink: 0; margin-left: 12px; }
.faq-item[open] .faq-question::after { content: '−'; transform: rotate(180deg); }
.faq-question:hover { color: var(--accent); }
.faq-answer { padding: 0 20px 16px; font-size: 14px; color: var(--text2); line-height: 1.65; }
.footer-legal { max-width: 1200px; margin: 12px auto 0; text-align: center; }
.footer-legal small { font-size: 11px; color: var(--label); line-height: 1.5; }

@media (max-width: 600px) {
  .faq-question { padding: 14px 16px; font-size: 14px; }
  .faq-answer { padding: 0 16px 14px; font-size: 13px; }
}


