
  * { box-sizing: border-box; margin: 0; padding: 0; }
  /*
    Token scale:
    - Color tokens are semantic first: page, surface, text, border, states and section accents.
    - Spacing, radius and shadow tokens are shared by cards, controls, quiz surfaces and future dashboard modules.
    - Component-specific surface tokens exist only where the UI has a real material: paper, quiz, modal, inverse preview and figures.
  */
  :root {
    --bg: #f7f8fc;
    --bg-end: #eef2fb;
    --bg-radial: rgba(79, 70, 229, 0.15);
    --surface: #ffffff;
    --surface-2: #f3f5fb;
    --surface-elevated: rgba(255, 255, 255, 0.88);
    --surface-soft: rgba(255, 255, 255, 0.72);
    --surface-card-hover: #eef2ff;
    --surface-modal: #ffffff;
    --surface-paper: #fffbf4;
    --surface-paper-border: #e8dcc8;
    --surface-paper-title: #111827;
    --surface-paper-text: #1f2937;
    --surface-quiz: #ffffff;
    --surface-quiz-text: #111827;
    --surface-figure: #f8fafc;
    --surface-figure-text: #111827;
    --surface-inverse: #0f172a;
    --surface-inverse-2: #172033;
    --surface-inverse-border: rgba(255, 255, 255, 0.10);
    --surface-inverse-text: #f8fafc;
    --surface-inverse-muted: #aab7cf;
    --card: var(--surface);
    --card2: var(--surface-2);
    --text-primary: #111827;
    --text: var(--text-primary);
    --text-strong: #020617;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-disabled: rgba(100, 116, 139, 0.62);
    --text-on-accent: #ffffff;
    --muted: var(--text-muted);
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --brand-soft: rgba(79, 70, 229, 0.11);
    --brand-border: rgba(79, 70, 229, 0.24);
    --secondary: #0891b2;
    --secondary-soft: rgba(8, 145, 178, 0.12);
    --warm: #f59e0b;
    --warm-hover: #d97706;
    --warm-soft: rgba(245, 158, 11, 0.14);
    --warm-border: rgba(245, 158, 11, 0.32);
    --accent: var(--brand);
    --accent-hover: var(--brand-hover);
    --accent-soft: var(--brand-soft);
    --accent-border: var(--brand-border);
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, 0.12);
    --success-border: rgba(22, 163, 74, 0.36);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.12);
    --danger-border: rgba(220, 38, 38, 0.42);
    --danger-strong: #991b1b;
    --warning: var(--warm);
    --warning-soft: #fff7ed;
    --warning-border: #fed7aa;
    --section-ord: var(--success);
    --section-ord-label: #15803d;
    --section-verbal: #2563eb;
    --section-verbal-soft: #eff6ff;
    --section-verbal-start: #60a5fa;
    --section-verbal-hover: #1d4ed8;
    --section-kvant: #c2410c;
    --section-kvant-label: #9a3412;
    --section-kvant-soft: #fff7ed;
    --section-kvant-hover: #fb923c;
    --section-kvant-hover-strong: #f97316;
    --section-kvant-strong: #431407;
    --verbal: var(--section-verbal);
    --kvant: var(--section-kvant);
    --correct: var(--success);
    --wrong: var(--danger);
    --border: rgba(15, 23, 42, 0.12);
    --border-soft: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.18);
    --focus: rgba(79, 70, 229, 0.42);
    --overlay-scrim: rgba(15, 23, 42, 0.58);
    --overlay-image: rgba(15, 23, 42, 0.78);
    --loader-ring: rgba(79, 70, 229, 0.18);
    --dev-banner-bg: #fde4e1;
    --dev-banner-text: #5a1a14;
    --dev-banner-border: #d6453d;
    --kvant-sheet: #fffaf3;
    --kvant-sheet-text: #111827;
    --kvant-sheet-muted: #374151;
    --kvant-sheet-subtle: #4b5563;
    --kvant-sheet-border: #fed7aa;
    --kvant-sheet-accent: #f97316;
    --kvant-sheet-accent-border: #fb923c;
    --kvant-sheet-given: #fff7ed;
    --kvant-sheet-answer: #ecfdf5;
    --kvant-sheet-answer-border: #22c55e;
    --kvant-sheet-answer-text: #16a34a;
    --kvant-sheet-calc: #eff6ff;
    --kvant-sheet-calc-border: #3b82f6;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --radius-xs: 8px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 14px;
    --radius-xl: 14px;
    --radius-2xl: 24px;
    --radius-circle: 50%;
    --radius-pill: 999px;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-reading: Georgia, "Times New Roman", serif;
    --font-weight-regular: 400;
    --font-weight-medium: 550;
    --font-weight-bold: 700;
    --font-weight-heavy: 800;
    --font-weight-black: 900;
    --letter-kicker: 0.08em;
    --type-display: clamp(48px, 6vw, 72px);
    --type-section: clamp(32px, 4vw, 40px);
    --type-subheading: clamp(20px, 2.5vw, 24px);
    --type-body-lg: 18px;
    --type-body: 16px;
    --type-small: 14px;
    --type-micro: 12px;
    --z-modal: 10000;
    --z-image-modal: 10020;
    --z-banner: 99999;
    --radius-card: var(--radius-xl);
    --radius-control: var(--radius-md);
    --radius-panel: var(--radius-2xl);
    --radius-legacy-sm: var(--radius-sm);
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.16);
    --shadow-xl: 0 34px 90px rgba(15, 23, 42, 0.30);
    --shadow-floating: 0 24px 60px rgba(79, 70, 229, 0.18);
    --shadow-paper: 0 18px 44px rgba(15, 23, 42, 0.10);
    --shadow-danger: 0 14px 34px rgba(220, 38, 38, 0.18);
    --shadow-kvant: 0 18px 44px rgba(194, 65, 12, 0.18);
    --shadow-verbal: 0 18px 44px rgba(37, 99, 235, 0.18);
    --shadow-sheet: 0 18px 44px rgba(15, 23, 42, 0.12);
    --soft-shadow: var(--shadow-md);
  }
  :root[data-theme="dark"] {
    --bg: #0b1020;
    --bg-end: #111827;
    --bg-radial: rgba(99, 102, 241, 0.18);
    --surface: #111827;
    --surface-2: #182135;
    --surface-elevated: rgba(17, 24, 39, 0.92);
    --surface-soft: rgba(24, 33, 53, 0.76);
    --surface-card-hover: #202a44;
    --surface-modal: #111827;
    --surface-paper: #242236;
    --surface-paper-border: #554b69;
    --surface-paper-title: #fff6e8;
    --surface-paper-text: #f1eadc;
    --surface-quiz: #151f33;
    --surface-quiz-text: #f4fbf1;
    --surface-figure: #f8faf8;
    --surface-figure-text: #111827;
    --surface-inverse: #020617;
    --surface-inverse-2: #0f172a;
    --surface-inverse-border: rgba(226, 232, 240, 0.14);
    --surface-inverse-text: #f8fafc;
    --surface-inverse-muted: #aab7cf;
    --card: var(--surface);
    --card2: var(--surface-2);
    --text-primary: #f8fafc;
    --text: var(--text-primary);
    --text-strong: #ffffff;
    --text-secondary: #dbe4f0;
    --text-muted: #aab7cf;
    --text-disabled: rgba(226, 232, 240, 0.58);
    --text-on-accent: #ffffff;
    --muted: var(--text-muted);
    --brand: #818cf8;
    --brand-hover: #a5b4fc;
    --brand-soft: rgba(129, 140, 248, 0.18);
    --brand-border: rgba(129, 140, 248, 0.34);
    --secondary-soft: rgba(34, 211, 238, 0.16);
    --warm: #fbbf24;
    --warm-soft: rgba(251, 191, 36, 0.16);
    --warm-border: rgba(251, 191, 36, 0.34);
    --accent: var(--brand);
    --accent-hover: var(--brand-hover);
    --accent-soft: var(--brand-soft);
    --accent-border: var(--brand-border);
    --success-soft: rgba(34, 197, 94, 0.16);
    --danger-soft: rgba(248, 113, 113, 0.17);
    --warning-soft: rgba(251, 191, 36, 0.16);
    --section-ord-label: #86efac;
    --section-verbal-soft: rgba(96, 165, 250, 0.16);
    --section-kvant-soft: rgba(251, 146, 60, 0.15);
    --section-kvant-label: #fdba74;
    --section-kvant-hover: #fb923c;
    --border: rgba(226, 232, 240, 0.14);
    --border-soft: rgba(226, 232, 240, 0.10);
    --border-strong: rgba(226, 232, 240, 0.22);
    --focus: rgba(129, 140, 248, 0.62);
    --loader-ring: rgba(129, 140, 248, 0.22);
    --kvant-sheet: #2a251d;
    --kvant-sheet-text: #fff7ea;
    --kvant-sheet-muted: #ead8bf;
    --kvant-sheet-subtle: #d8c4a9;
    --kvant-sheet-border: rgba(251, 146, 60, 0.32);
    --kvant-sheet-given: rgba(255, 180, 80, 0.12);
    --kvant-sheet-answer: rgba(34, 197, 94, 0.14);
    --kvant-sheet-calc: rgba(59, 130, 246, 0.14);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.32);
    --soft-shadow: var(--shadow-lg);
  }
  html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
  }
  body {
    font-family: var(--font-body);
    background:
      radial-gradient(circle at 10% 0%, var(--bg-radial), transparent 28%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-end) 100%);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.5;
    font-size: var(--type-body);
    font-weight: var(--font-weight-regular);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }
  ::selection {
    background: var(--brand-soft);
    color: var(--text-strong);
  }
  h1, h2, h3 {
    color: var(--text-strong);
    font-family: var(--font-display);
    letter-spacing: 0;
    line-height: 1.05;
  }
  p {
    color: var(--text-secondary);
  }
  button, input, select, textarea {
    font: inherit;
    min-width: 0;
  }
  img, svg, mjx-container {
    max-width: 100%;
  }
  mjx-container {
    overflow-x: auto;
    overflow-y: hidden;
  }
  :where(button, input, select, textarea, a, [tabindex]):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
  .sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  :where(.option, .kvant-option, .kvant-option-text, .verbal-option, .verbal-option-text, .section-tab, .verbal-subtab, .lesson-card):focus-visible {
    box-shadow: 0 0 0 4px var(--focus);
  }
  :where(button, .preview-link, .preview-primary, .preview-secondary):active {
    transform: translateY(1px);
  }
  .container { width: 100%; max-width: 980px; margin: 0 auto; min-width: 0; }
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: var(--space-3) var(--space-4);
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    gap: 16px;
  }
  h1,
  .top-title { font-size: 20px; font-weight: var(--font-weight-black); }
  .stats {
    font-size: 14px;
    color: var(--muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
  }
  .correct-count { color: var(--correct); }
  .wrong-count { color: var(--wrong); }

  /* ===== Auth ===== */
  .auth-screen {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .auth-card {
    width: min(100%, 440px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 30px;
    box-shadow: var(--soft-shadow);
  }
  .auth-card h1 {
    font-size: 30px;
    margin-bottom: 8px;
  }
  .auth-card p {
    color: var(--muted);
    margin-bottom: 24px;
  }
  .auth-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 5px;
    margin-bottom: 18px;
  }
  .auth-mode-btn {
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 10px 12px;
  }
  .auth-mode-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
  }
  .auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .auth-field {
    display: grid;
    gap: 6px;
    text-align: left;
  }
  .auth-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }
  .auth-input {
    width: 100%;
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    padding: 14px 16px;
    outline: none;
  }
  .auth-input:focus { border-color: var(--accent); }
  .auth-submit,
  .auth-google-fallback {
    width: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .auth-submit {
    background: var(--accent);
    color: var(--text-on-accent);
  }
  .auth-google-panel[hidden],
  .auth-divider[hidden] {
    display: none;
  }
  .auth-google-wrap {
    display: grid;
    justify-items: center;
    margin-bottom: 14px;
    min-height: 42px;
  }
  .auth-google-fallback {
    background: var(--accent);
    color: var(--text-on-accent);
  }
  .auth-google-fallback:disabled {
    cursor: default;
    opacity: 0.9;
  }
  .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    margin: 4px 0 16px;
  }
  .auth-divider::before,
  .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }
  .auth-error {
    color: var(--wrong);
    min-height: 20px;
    font-size: 13px;
  }
  .auth-local-note {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin-top: 14px;
    padding: 12px 14px;
  }
  .account-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 8px 10px 8px 14px;
  }
  .account-user {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
  }
  .sync-pill {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    min-height: 32px;
    padding: 6px 10px;
    white-space: nowrap;
  }
  .sync-pill::before {
    background: currentColor;
    border-radius: 999px;
    content: '';
    height: 7px;
    margin-right: 7px;
    width: 7px;
  }
  .sync-pill[data-sync-status="synced"] {
    color: var(--correct);
  }
  .sync-pill[data-sync-status="syncing"] {
    color: var(--accent);
  }
  .sync-pill[data-sync-status="offline"],
  .sync-pill[data-sync-status="error"] {
    color: var(--wrong);
  }
  .logout-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    padding: 7px 12px;
    white-space: nowrap;
  }
  .logout-btn:hover {
    color: var(--text);
    border-color: var(--text);
  }
  .theme-toggle {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 11px;
    white-space: nowrap;
  }
  .theme-toggle:hover {
    color: var(--text);
    border-color: var(--text);
  }
  .auth-back {
    width: 100%;
    margin-top: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    padding: 11px 14px;
  }
  .auth-back:hover { color: var(--text); border-color: var(--text); }

  /* ===== Preview ===== */
  body.preview-active {
    --preview-ink: #0c1812;
    --preview-ink-2: #33473c;
    --preview-muted: #62756a;
    --preview-green: #15b364;
    --preview-green-700: #0c8f4c;
    --preview-green-900: #0a6e3b;
    --preview-green-50: #e8f7ef;
    --preview-green-100: #d2efde;
    --preview-bg: #ffffff;
    --preview-bg-soft: #f3f7f3;
    --preview-bg-tint: #eaf2ec;
    --preview-line: #e3e9e3;
    --preview-amber: #f59e0b;
    --preview-amber-50: #fef3df;
    --preview-danger: #b42318;
    --preview-danger-soft: #fff1f0;
    --preview-radius: 18px;
    --preview-radius-lg: 26px;
    --preview-shadow-sm: 0 1px 2px rgba(12, 24, 18, 0.05), 0 2px 6px rgba(12, 24, 18, 0.05);
    --preview-shadow-md: 0 10px 34px rgba(12, 24, 18, 0.09);
    --preview-shadow-lg: 0 28px 70px rgba(12, 24, 18, 0.16);
    --preview-maxw: 1160px;
    background: var(--preview-bg);
    color: var(--preview-ink);
    padding: 0;
    overflow-x: hidden;
  }

  .container.preview-layout {
    max-width: none;
    min-height: 100vh;
    padding: 0;
    width: 100%;
  }

  .preview-screen {
    background: var(--preview-bg);
    color: var(--preview-ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
  }

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

  .preview-screen button,
  .preview-screen input,
  .preview-screen select,
  .preview-screen textarea { font: inherit; }

  .preview-wrap {
    margin: 0 auto;
    max-width: var(--preview-maxw);
    padding: 0 24px;
    width: 100%;
  }

  .preview-primary,
  .preview-secondary,
  .preview-login,
  .preview-link,
  .preview-logo,
  .preview-menu-button,
  .preview-countdown-banner {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
  }

  .preview-primary,
  .preview-secondary {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    line-height: 1.2;
    min-height: 48px;
    padding: 14px 26px;
    transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, color 0.14s ease, transform 0.14s ease;
    white-space: nowrap;
  }

  .preview-primary {
    background: var(--preview-green);
    box-shadow: 0 8px 20px rgba(21, 179, 100, 0.32);
    color: #ffffff;
  }

  .preview-primary:hover,
  .preview-primary:focus-visible {
    background: var(--preview-green-700);
    box-shadow: 0 12px 26px rgba(21, 179, 100, 0.4);
    transform: translateY(-2px);
  }

  .preview-secondary {
    background: #ffffff;
    border: 1.5px solid var(--preview-line);
    color: var(--preview-ink);
  }

  .preview-secondary:hover,
  .preview-secondary:focus-visible {
    border-color: var(--preview-green);
    color: var(--preview-green-700);
    transform: translateY(-2px);
  }

  .preview-primary-lg {
    font-size: 16px;
    min-height: 56px;
    padding: 17px 34px;
  }

  .preview-countdown-banner {
    align-items: center;
    background: var(--preview-ink);
    color: #eafaf0;
    display: flex;
    font-size: 13.5px;
    font-weight: 700;
    gap: 9px;
    justify-content: center;
    letter-spacing: 0.1px;
    min-height: 38px;
    padding: 9px 16px;
    text-align: center;
    width: 100%;
  }

  .preview-countdown-banner b { color: #5ee6a0; }
  .preview-countdown-dot { opacity: 0.4; }

  .preview-site-nav {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--preview-line);
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .preview-nav-inner {
    align-items: center;
    display: grid;
    grid-template-columns: auto 1fr auto;
    min-height: 68px;
    gap: 24px;
  }

  .preview-logo {
    align-items: center;
    display: inline-flex;
    font-size: 18px;
    font-weight: 850;
    gap: 10px;
    letter-spacing: -0.2px;
  }

  .preview-logo-mark {
    align-items: center;
    background: linear-gradient(150deg, var(--preview-green), var(--preview-green-900));
    border-radius: 10px;
    box-shadow: var(--preview-shadow-sm);
    color: #ffffff;
    display: inline-grid;
    font-size: 15px;
    font-weight: 900;
    height: 34px;
    place-items: center;
    width: 34px;
  }

  .preview-nav-menu {
    align-items: center;
    display: flex;
    gap: 30px;
    justify-content: center;
  }

  .preview-link {
    color: var(--preview-ink-2);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
    padding: 4px 0;
    text-align: left;
  }

  .preview-link:hover,
  .preview-link:focus-visible,
  .preview-login:hover,
  .preview-login:focus-visible { color: var(--preview-green-700); }

  .preview-nav-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
  }

  .preview-login {
    color: var(--preview-ink-2);
    font-size: 14.5px;
    font-weight: 800;
    padding: 10px 8px;
  }

  .preview-menu-button {
    align-items: center;
    border: 1px solid var(--preview-line);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    gap: 4px;
    height: 42px;
    justify-content: center;
    justify-self: end;
    width: 42px;
  }

  .preview-menu-button span {
    background: var(--preview-ink);
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 18px;
  }

  .preview-hero {
    background:
      radial-gradient(900px 480px at 88% -8%, rgba(21, 179, 100, 0.13), transparent 60%),
      radial-gradient(700px 420px at 0% 6%, rgba(21, 179, 100, 0.07), transparent 55%);
    padding: 84px 0 96px;
  }

  .preview-hero-grid {
    align-items: center;
    display: grid;
    gap: 64px;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  }

  .preview-kicker {
    align-items: center;
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 999px;
    color: var(--preview-green-900);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    margin-bottom: 22px;
    padding: 7px 14px;
  }

  .preview-kicker-pip {
    background: var(--preview-green);
    border-radius: 999px;
    display: inline-block;
    height: 6px;
    width: 6px;
  }

  .preview-title {
    color: var(--preview-ink);
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 850;
    letter-spacing: -1.6px;
    line-height: 1.06;
    margin: 0 0 20px;
    max-width: 640px;
  }

  .preview-title-highlight {
    color: var(--preview-green-700);
    position: relative;
    white-space: nowrap;
    z-index: 0;
  }

  .preview-title-highlight::after {
    background: var(--preview-green-100);
    border-radius: 3px;
    bottom: 4px;
    content: '';
    height: 11px;
    left: 0;
    position: absolute;
    right: 0;
    z-index: -1;
  }

  .preview-copy {
    color: var(--preview-ink-2);
    font-size: 18.5px;
    margin: 0 0 30px;
    max-width: 520px;
  }

  .preview-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 26px;
  }

  .preview-hero-trust {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
  }

  .preview-avatars { display: flex; }

  .preview-avatars span {
    align-items: center;
    background: var(--preview-green-100);
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: var(--preview-shadow-sm);
    color: var(--preview-green-900);
    display: grid;
    font-size: 13px;
    font-weight: 850;
    height: 36px;
    margin-left: -10px;
    place-items: center;
    width: 36px;
  }

  .preview-avatars span:first-child { margin-left: 0; }

  .preview-hero-trust-text {
    color: var(--preview-muted);
    font-size: 13.5px;
    font-weight: 700;
  }

  .preview-hero-trust-text b { color: var(--preview-ink); }

  .preview-stars {
    color: var(--preview-amber);
    font-size: 13px;
    letter-spacing: 1px;
  }

  .preview-product-frame {
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: var(--preview-radius-lg);
    box-shadow: var(--preview-shadow-lg);
    overflow: hidden;
  }

  .preview-browser-bar {
    align-items: center;
    background: var(--preview-bg-soft);
    border-bottom: 1px solid var(--preview-line);
    display: flex;
    gap: 7px;
    padding: 13px 16px;
  }

  .preview-browser-bar span {
    background: #d6ded7;
    border-radius: 999px;
    display: block;
    height: 11px;
    width: 11px;
  }

  .preview-browser-bar span:nth-child(1) { background: #f0a9a0; }
  .preview-browser-bar span:nth-child(2) { background: #f3d089; }
  .preview-browser-bar span:nth-child(3) { background: #a7dcb6; }

  .preview-browser-bar strong {
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: 7px;
    color: var(--preview-muted);
    font-size: 12px;
    font-weight: 800;
    margin-left: 10px;
    overflow: hidden;
    padding: 5px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .preview-mock-body {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    min-height: 380px;
  }

  .preview-mock-side {
    align-items: center;
    background: var(--preview-ink);
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px 0;
  }

  .preview-mock-icon {
    align-items: center;
    border-radius: 11px;
    color: #9fb3a6;
    display: grid;
    font-size: 15px;
    font-weight: 850;
    height: 38px;
    place-items: center;
    width: 38px;
  }

  .preview-mock-icon.on {
    background: rgba(94, 230, 160, 0.16);
    color: #5ee6a0;
  }

  .preview-mock-main {
    background: linear-gradient(180deg, #ffffff, #fbfdfb);
    padding: 22px 24px;
  }

  .preview-mock-hi {
    color: var(--preview-muted);
    font-size: 13px;
    font-weight: 700;
  }

  .preview-mock-title {
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -0.4px;
    margin: 2px 0 16px;
  }

  .preview-mock-pass {
    align-items: center;
    background: linear-gradient(140deg, var(--preview-green), var(--preview-green-900));
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(12, 110, 59, 0.34);
    color: #ffffff;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 18px;
  }

  .preview-mock-pass span {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    opacity: 0.86;
    text-transform: uppercase;
  }

  .preview-mock-pass strong {
    display: block;
    font-size: 17px;
    font-weight: 850;
    margin-top: 3px;
  }

  .preview-mock-pass em {
    display: block;
    font-size: 12.5px;
    font-style: normal;
    margin-top: 2px;
    opacity: 0.9;
  }

  .preview-mock-pass b {
    background: #ffffff;
    border-radius: 999px;
    color: var(--preview-green-900);
    flex: none;
    font-size: 13px;
    font-weight: 850;
    padding: 10px 18px;
  }

  .preview-mock-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
  }

  .preview-mock-stat,
  .preview-mock-mastery {
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: 13px;
  }

  .preview-mock-stat {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px;
  }

  .preview-mock-stat span {
    color: var(--preview-muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .preview-mock-stat strong {
    display: block;
    font-size: 19px;
    font-weight: 850;
    margin-top: 3px;
  }

  .preview-mock-stat .green { color: var(--preview-green-700); }
  .preview-mock-stat .amber { color: var(--preview-amber); }

  .preview-mock-mastery {
    margin-top: 14px;
    padding: 14px;
  }

  .preview-mastery-head {
    align-items: center;
    color: var(--preview-ink-2);
    display: flex;
    font-size: 12px;
    font-weight: 850;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .preview-mastery-head strong {
    color: var(--preview-green-700);
    font-weight: 850;
  }

  .preview-mastery-bar {
    align-items: center;
    display: flex;
    gap: 9px;
    margin: 7px 0;
  }

  .preview-mastery-bar span {
    color: var(--preview-ink-2);
    flex: 0 0 30px;
    font-size: 11px;
    font-weight: 850;
  }

  .preview-mastery-bar i {
    background: var(--preview-bg-tint);
    border-radius: 999px;
    flex: 1 1 auto;
    height: 8px;
    overflow: hidden;
  }

  .preview-mastery-bar b {
    background: linear-gradient(90deg, var(--preview-green), var(--preview-green-700));
    border-radius: inherit;
    display: block;
    height: 100%;
  }

  .preview-mastery-bar em {
    color: var(--preview-muted);
    flex: 0 0 32px;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    text-align: right;
  }

  .preview-trust-row {
    background: #ffffff;
    border-bottom: 1px solid var(--preview-line);
    border-top: 1px solid var(--preview-line);
  }

  .preview-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .preview-trust-cell {
    border-right: 1px solid var(--preview-line);
    padding: 30px 18px;
    text-align: center;
  }

  .preview-trust-cell:last-child { border-right: 0; }

  .preview-trust-cell strong {
    display: block;
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -0.8px;
    line-height: 1.1;
  }

  .preview-trust-cell strong.green { color: var(--preview-green-700); }

  .preview-trust-cell span {
    color: var(--preview-muted);
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    margin-top: 3px;
  }

  .preview-section {
    padding: 96px 0;
    position: relative;
  }

  .preview-section-soft { background: var(--preview-bg-soft); }

  .preview-section-head {
    margin: 0 auto 52px;
    max-width: 680px;
    text-align: center;
  }

  .preview-section-tag {
    color: var(--preview-green-700);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    text-transform: uppercase;
  }

  .preview-section-title {
    color: var(--preview-ink);
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 850;
    letter-spacing: -1px;
    line-height: 1.14;
    margin: 0;
  }

  .preview-section-sub {
    color: var(--preview-ink-2);
    font-size: 17px;
    margin-top: 14px;
  }

  .preview-sample-card,
  .preview-card {
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: var(--preview-radius-lg);
    box-shadow: var(--preview-shadow-md);
    overflow: hidden;
  }

  .preview-sample-card {
    margin: 0 auto;
    max-width: 680px;
  }

  .preview-sample-top,
  .preview-card-head {
    align-items: center;
    background: var(--preview-bg-soft);
    border-bottom: 1px solid var(--preview-line);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 16px 22px;
  }

  .preview-sample-badge,
  .preview-chip {
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 999px;
    color: var(--preview-green-900);
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    padding: 5px 11px;
  }

  .preview-chip.kvant {
    background: var(--preview-amber-50);
    border-color: #f6e0b3;
    color: #b4730a;
  }

  .preview-sample-prog,
  .preview-card-status,
  .preview-card-head > span:last-child {
    color: var(--preview-muted);
    font-size: 12.5px;
    font-weight: 800;
  }

  .preview-sample-body,
  .preview-card-body {
    padding: 26px 26px 28px;
  }

  .preview-sample-label,
  .preview-question-label {
    color: var(--preview-muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
  }

  .preview-sample-question,
  .preview-question {
    color: var(--preview-ink);
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -0.5px;
    line-height: 1.18;
    margin-bottom: 20px;
  }

  .preview-kvant-question {
    color: var(--preview-ink);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.5;
    margin-bottom: 20px;
  }

  .preview-card > .preview-question,
  .preview-card > .preview-kvant-question {
    margin: 26px 26px 20px;
  }

  .preview-card > .preview-options {
    padding: 0 26px;
  }

  .preview-options,
  .preview-sample-inline-options {
    display: grid;
    gap: 10px;
  }

  .preview-answer {
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--preview-line);
    border-radius: 13px;
    color: var(--preview-ink);
    cursor: pointer;
    display: flex;
    font-size: 15.5px;
    font-weight: 650;
    gap: 13px;
    justify-content: flex-start;
    line-height: 1.35;
    min-height: 54px;
    padding: 13px 16px;
    text-align: left;
    transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
    width: 100%;
  }

  .preview-answer:hover:not(:disabled),
  .preview-answer:focus-visible:not(:disabled) {
    border-color: var(--preview-green);
    transform: translateY(-1px);
  }

  .preview-letter {
    align-items: center;
    background: var(--preview-bg-soft);
    border-radius: 7px;
    color: var(--preview-ink-2);
    display: grid;
    flex: 0 0 26px;
    font-size: 12.5px;
    font-weight: 850;
    height: 26px;
    place-items: center;
    width: 26px;
  }

  .preview-answer.correct {
    background: var(--preview-green-50);
    border-color: var(--preview-green);
  }

  .preview-answer.correct .preview-letter {
    background: var(--preview-green);
    color: #ffffff;
  }

  .preview-answer.correct::after {
    color: var(--preview-green-700);
    content: '\2713  R\00e4tt';
    font-size: 14px;
    font-weight: 850;
    margin-left: auto;
    white-space: nowrap;
  }

  .preview-answer.wrong {
    background: var(--preview-danger-soft);
    border-color: #ffb4ab;
    color: var(--preview-danger);
  }

  .preview-answer.dim { opacity: 0.62; }
  .preview-answer:disabled { cursor: default; }

  .preview-feedback {
    color: var(--preview-muted);
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    min-height: 22px;
  }

  .preview-feedback.good { color: var(--preview-green-700); }
  .preview-feedback.miss { color: var(--preview-danger); }

  .preview-sample-inline-explanation,
  .preview-explanation {
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 13px;
    color: var(--preview-green-900);
    font-size: 14.5px;
    margin: 18px 0 0;
    padding: 15px 17px;
  }

  .preview-sample-inline-explanation[hidden],
  .preview-sample-foot[hidden] { display: none; }

  .preview-sample-foot {
    align-items: center;
    background: var(--preview-bg-soft);
    border-top: 1px solid var(--preview-line);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding: 18px 26px;
  }

  .preview-sample-foot p {
    color: var(--preview-ink-2);
    font-size: 14px;
    font-weight: 700;
    margin: 0;
  }

  .preview-sample-foot .preview-primary { min-height: 46px; }

  .preview-sample-placeholder {
    animation: previewPulse 1.35s ease-in-out infinite;
    background: linear-gradient(90deg, var(--preview-bg-soft), #ffffff, var(--preview-bg-soft));
    border: 1px solid var(--preview-line);
    border-radius: 13px;
    display: block;
    height: 54px;
  }

  @keyframes previewPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
  }

  .preview-material-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .preview-material-group-label {
    color: var(--preview-muted);
    font-size: 13px;
    font-weight: 850;
    grid-column: 1 / -1;
    letter-spacing: 1px;
    margin-top: 8px;
    text-transform: uppercase;
  }

  .preview-material-card,
  .preview-step-card {
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: var(--preview-radius);
  }

  .preview-material-card {
    padding: 22px;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
  }

  .preview-material-card:hover {
    border-color: var(--preview-green-100);
    box-shadow: var(--preview-shadow-md);
    transform: translateY(-4px);
  }

  .preview-material-badge {
    align-items: center;
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 13px;
    color: var(--preview-green-900);
    display: grid;
    font-size: 15px;
    font-weight: 900;
    height: 48px;
    margin-bottom: 14px;
    place-items: center;
    width: 48px;
  }

  .preview-material-card.kv .preview-material-badge {
    background: var(--preview-amber-50);
    border-color: #f6e0b3;
    color: #b4730a;
  }

  .preview-material-card h3,
  .preview-step-card h3,
  .preview-feature h3 {
    color: var(--preview-ink);
    font-size: 16.5px;
    font-weight: 850;
    letter-spacing: -0.3px;
    margin: 0 0 6px;
  }

  .preview-material-card p,
  .preview-step-card p,
  .preview-feature p {
    color: var(--preview-ink-2);
    font-size: 14px;
    margin: 0;
  }

  .preview-material-card p {
    color: var(--preview-muted);
    font-size: 13.5px;
    min-height: 38px;
  }

  .preview-material-count {
    color: var(--preview-green-700);
    font-size: 12.5px;
    font-weight: 850;
    margin-top: 8px;
  }

  .preview-material-card.kv .preview-material-count { color: #b4730a; }

  .preview-steps {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-step-card { padding: 28px 24px; }

  .preview-step-number {
    align-items: center;
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 12px;
    color: var(--preview-green-700);
    display: grid;
    font-size: 13px;
    font-weight: 900;
    height: 42px;
    margin-bottom: 16px;
    place-items: center;
    width: 42px;
  }

  .preview-feature-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .preview-feature-icon {
    align-items: center;
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 13px;
    display: grid;
    height: 46px;
    margin-bottom: 14px;
    place-items: center;
    width: 46px;
  }

  .preview-feature-icon svg {
    color: var(--preview-green-700);
    height: 22px;
    stroke-width: 2.1;
    width: 22px;
  }

  .preview-review-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-review-card {
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: var(--preview-radius);
    display: flex;
    flex-direction: column;
    padding: 24px;
  }

  .preview-review-card p {
    color: var(--preview-ink);
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 550;
    margin: 12px 0 0;
  }

  .preview-review-person {
    align-items: center;
    border-top: 1px solid var(--preview-line);
    display: flex;
    gap: 11px;
    margin-top: 18px;
    padding-top: 16px;
  }

  .preview-review-avatar {
    align-items: center;
    background: var(--preview-green-100);
    border-radius: 50%;
    color: var(--preview-green-900);
    display: grid;
    font-size: 14px;
    font-weight: 850;
    height: 40px;
    place-items: center;
    width: 40px;
  }

  .preview-review-name {
    color: var(--preview-ink);
    font-size: 14px;
    font-weight: 850;
  }

  .preview-review-meta {
    color: var(--preview-muted);
    font-size: 12.5px;
  }

  .preview-builtby {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--preview-line);
    border-radius: var(--preview-radius-lg);
    box-shadow: var(--preview-shadow-sm);
    display: grid;
    gap: 30px;
    grid-template-columns: auto minmax(0, 1fr);
    margin: 0 auto;
    max-width: 760px;
    padding: 34px;
  }

  .preview-builtby-photo {
    align-items: center;
    background: linear-gradient(150deg, var(--preview-green-100), var(--preview-green-50));
    border-radius: 20px;
    color: var(--preview-green-900);
    display: grid;
    flex: none;
    font-size: 13px;
    font-weight: 850;
    height: 120px;
    line-height: 1.2;
    place-items: center;
    text-align: center;
    width: 120px;
  }

  .preview-builtby h3 {
    color: var(--preview-ink);
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
  }

  .preview-builtby p {
    color: var(--preview-ink-2);
    font-size: 15px;
    margin: 0;
  }

  .preview-final-cta {
    background: linear-gradient(150deg, var(--preview-green-900), var(--preview-green-700));
    color: #ffffff;
    padding: 80px 24px;
    text-align: center;
  }

  .preview-final-cta .preview-wrap { max-width: 760px; }
  .preview-final-cta .preview-section-tag { color: #9af0c2; }

  .preview-final-cta h2 {
    color: #ffffff;
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 850;
    letter-spacing: -1px;
    line-height: 1.12;
    margin: 0;
  }

  .preview-final-cta p {
    color: #d6f5e3;
    font-size: 17px;
    margin: 14px auto 26px;
    max-width: 480px;
  }

  .preview-final-cta .preview-primary {
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    color: var(--preview-green-900);
  }

  .preview-final-cta .preview-primary:hover,
  .preview-final-cta .preview-primary:focus-visible {
    background: #eafaf0;
    color: var(--preview-green-900);
  }

  .preview-final-micro {
    color: #a9e6c4;
    font-size: 13.5px;
    font-weight: 700;
    margin-top: 20px;
  }

  .preview-footer {
    background: var(--preview-ink);
    color: #b8c8bf;
    padding: 54px 0 30px;
  }

  .preview-footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 34px;
  }

  .preview-footer-brand { max-width: 300px; }

  .preview-footer .preview-logo {
    color: #ffffff;
    margin-bottom: 12px;
  }

  .preview-footer-brand p {
    color: #8fa399;
    font-size: 14px;
    margin: 0;
  }

  .preview-footer-col h4 {
    color: #ffffff;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.8px;
    margin: 0 0 14px;
    text-transform: uppercase;
  }

  .preview-footer-col .preview-link {
    color: #b8c8bf;
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 9px;
  }

  .preview-footer-col .preview-link:hover,
  .preview-footer-col .preview-link:focus-visible { color: #5ee6a0; }

  .preview-footer-bottom {
    border-top: 1px solid #243029;
    color: #7e9389;
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
    justify-content: space-between;
    padding-top: 22px;
  }

  .preview-nav {
    align-items: center;
    border-bottom: 1px solid var(--preview-line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: var(--preview-maxw);
    padding: 20px 24px;
  }

  .preview-brand {
    color: var(--preview-ink);
    font-size: 18px;
    font-weight: 850;
    letter-spacing: -0.2px;
  }

  .preview-sample-hero {
    background:
      radial-gradient(700px 380px at 88% -8%, rgba(21, 179, 100, 0.12), transparent 60%),
      var(--preview-bg);
    margin: 0 auto;
    max-width: var(--preview-maxw);
    padding: 64px 24px 34px;
  }

  .preview-sample-hero .preview-kicker { margin-bottom: 18px; }

  .preview-sample-section {
    margin: 0 auto;
    max-width: var(--preview-maxw);
    padding: 48px 24px 88px;
  }

  .preview-sample-section > .preview-section-head {
    align-items: flex-end;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    max-width: none;
    text-align: left;
  }

  .preview-section-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
  }

  .preview-progress-pill {
    background: var(--preview-green-50);
    border: 1px solid var(--preview-green-100);
    border-radius: 999px;
    color: var(--preview-green-900);
    font-size: 13px;
    font-weight: 850;
    padding: 10px 14px;
  }

  .preview-sample-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-loading-card {
    color: var(--preview-muted);
    font-weight: 750;
    padding: 28px;
  }

  .preview-card .preview-options { margin-top: 0; }

  .preview-card .preview-feedback {
    border-top: 1px solid var(--preview-line);
    margin: 18px 0 0;
    min-height: 0;
    padding: 14px 26px 26px;
  }

  @media (max-width: 920px) {
    .preview-countdown-banner { min-height: 38px; }

    .preview-nav-inner {
      grid-template-columns: auto auto;
      gap: 12px 18px;
      padding-bottom: 12px;
      padding-top: 12px;
    }

    .preview-menu-button { display: inline-flex; }

    .preview-nav-menu,
    .preview-nav-actions {
      display: none;
      grid-column: 1 / -1;
      justify-content: stretch;
      width: 100%;
    }

    .preview-nav-menu.open {
      display: grid;
      gap: 8px;
    }

    .preview-nav-menu.open .preview-link {
      background: #ffffff;
      border: 1px solid var(--preview-line);
      border-radius: 12px;
      padding: 12px 14px;
    }

    .preview-site-nav:has(.preview-nav-menu.open) .preview-nav-actions {
      display: grid;
      gap: 10px;
    }

    .preview-site-nav:has(.preview-nav-menu.open) .preview-login,
    .preview-site-nav:has(.preview-nav-menu.open) .preview-primary { width: 100%; }

    .preview-hero { padding: 54px 0 70px; }

    .preview-hero-grid {
      gap: 46px;
      grid-template-columns: 1fr;
    }

    .preview-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .preview-trust-cell:nth-child(2) { border-right: 0; }
    .preview-trust-cell:nth-child(1),
    .preview-trust-cell:nth-child(2) { border-bottom: 1px solid var(--preview-line); }

    .preview-section { padding: 66px 0; }

    .preview-material-grid,
    .preview-feature-grid,
    .preview-sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .preview-steps,
    .preview-review-grid { grid-template-columns: 1fr; }

    .preview-builtby {
      grid-template-columns: 1fr;
      text-align: center;
    }

    .preview-builtby-photo { margin: 0 auto; }

    .preview-sample-section > .preview-section-head {
      align-items: flex-start;
      flex-direction: column;
    }

    .preview-section-actions { justify-content: flex-start; }
  }

  @media (max-width: 540px) {
    .preview-wrap { padding: 0 18px; }

    .preview-countdown-banner {
      font-size: 13px;
      min-height: 36px;
      padding: 8px 12px;
    }

    .preview-countdown-dot,
    .preview-countdown-extra { display: none; }

    .preview-title {
      font-size: clamp(36px, 13vw, 48px);
      letter-spacing: -1.1px;
    }

    .preview-copy { font-size: 17px; }

    .preview-primary,
    .preview-secondary { width: 100%; }

    .preview-product-frame { border-radius: 20px; }

    .preview-browser-bar strong {
      min-width: 0;
      max-width: 210px;
    }

    .preview-mock-body { grid-template-columns: 46px minmax(0, 1fr); }
    .preview-mock-side { padding: 14px 0; }

    .preview-mock-icon {
      border-radius: 9px;
      height: 32px;
      width: 32px;
    }

    .preview-mock-main { padding: 18px; }

    .preview-mock-pass {
      align-items: flex-start;
      flex-direction: column;
    }

    .preview-mock-pass b {
      text-align: center;
      width: 100%;
    }

    .preview-mock-row { flex-direction: column; }

    .preview-trust-grid,
    .preview-material-grid,
    .preview-feature-grid,
    .preview-sample-grid { grid-template-columns: 1fr; }

    .preview-trust-cell {
      border-bottom: 1px solid var(--preview-line);
      border-right: 0;
    }

    .preview-trust-cell:last-child { border-bottom: 0; }

    .preview-section-head { margin-bottom: 34px; }

    .preview-sample-body,
    .preview-card-body { padding: 22px 18px 24px; }

    .preview-sample-top,
    .preview-card-head {
      align-items: flex-start;
      flex-direction: column;
      gap: 8px;
      padding: 14px 18px;
    }

    .preview-sample-question,
    .preview-question { font-size: 23px; }

    .preview-sample-foot { padding: 18px; }

    .preview-card .preview-feedback {
      margin-left: 0;
      margin-right: 0;
      padding-left: 18px;
      padding-right: 18px;
    }

    .preview-builtby { padding: 26px 20px; }
    .preview-final-cta { padding: 66px 18px; }
    .preview-footer-grid { gap: 28px; }
    .preview-footer-col { flex: 1 1 135px; }
  }

  /* ===== Section tabs ===== */
  .section-tabs {
    display: flex;
    gap: 8px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-md);
  }
  .main-section-tabs.has-subtabs {
    margin-bottom: 10px;
  }
  .main-section-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .section-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 12px 16px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .section-tab:hover { color: var(--text); }
  .section-tab.active {
    background: var(--card2);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--accent-border);
  }
  .section-tab.active.kvant { color: var(--kvant); }
  .section-tab.active.ord { color: var(--accent); }
  .section-tab.active.verbal { color: var(--verbal); }
  .verbal-subtabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 6px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
  }
  .verbal-subtab {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 11px 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .verbal-subtab:hover {
    color: var(--text);
    background: var(--surface-soft);
  }
  .verbal-subtab.active {
    background: var(--card2);
    color: var(--verbal);
    box-shadow: inset 0 0 0 1px var(--section-verbal-soft);
  }
  .verbal-subtab.ord.active {
    color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent-border);
  }

  .toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .part-select {
    min-width: 190px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius-control);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    color-scheme: light;
  }
  .part-select option {
    background: var(--surface);
    color: var(--text);
  }
  :root[data-theme="dark"] .part-select {
    background: var(--card2);
    color: var(--text);
    border-color: var(--border);
    color-scheme: dark;
  }
  :root[data-theme="dark"] .part-select:disabled {
    color: var(--text-disabled);
  }
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: var(--soft-shadow);
  }
  .word {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 0;
  }
  .options { display: flex; flex-direction: column; gap: 10px; }
  .option {
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius-control);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
  }
  .option:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--surface-card-hover);
  }
  .option:disabled { cursor: default; }

  /* ===== Kvant-specifik styling ===== */
  .kvant-img-wrap {
    appearance: none;
    background: var(--surface-figure);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    color: inherit;
    cursor: zoom-in;
    display: block;
    font: inherit;
    margin: 0 0 20px;
    overflow: hidden;
    padding: 12px;
    text-align: center;
    width: 100%;
  }
  .kvant-img-wrap img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    max-height: min(70vh, 820px);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
  }
  .kvant-figure-card {
    background: var(--surface-figure);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin: 18px 0 0;
    padding: 12px;
  }
  .kvant-figure-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .kvant-figure-label {
    color: var(--surface-figure-text);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
  }
  .kvant-figure-zoom {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 12px;
  }
  .kvant-figure-zoom:hover {
    border-color: var(--kvant);
    background: var(--section-kvant-soft);
  }
  .kvant-figure-card .kvant-img-wrap {
    margin: 0;
    padding: 10px;
  }
  .kvant-figure-card .kvant-img-wrap img {
    max-height: min(54vh, 560px);
  }
  .kvant-fallback-image .kvant-img-wrap {
    margin-bottom: 18px;
  }
  .kvant-dtk-figure {
    margin-bottom: 18px;
  }
  .kvant-image-modal {
    align-items: center;
    background: var(--overlay-image);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 22px;
    position: fixed;
    z-index: var(--z-image-modal);
  }
  .kvant-modal-open {
    overflow: hidden;
  }
  .kvant-image-modal-dialog {
    background: var(--surface-figure);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: calc(100vh - 44px);
    max-width: min(1180px, calc(100vw - 44px));
    overflow: auto;
    padding: 16px;
    position: relative;
  }
  .kvant-image-modal-dialog img {
    display: block;
    height: auto;
    max-height: calc(100vh - 108px);
    max-width: 100%;
    object-fit: contain;
  }
  .kvant-image-modal-close {
    align-items: center;
    background: var(--surface-quiz-text);
    border: 0;
    border-radius: var(--radius-pill);
    color: var(--surface);
    cursor: pointer;
    display: flex;
    font-size: 24px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 38px;
    z-index: 1;
  }
  .kvant-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }
  .kvant-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .kvant-options[data-count="5"] {
    grid-template-columns: repeat(5, 1fr);
  }
  .kvant-option {
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px;
    border-radius: var(--radius-control);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .kvant-option:hover:not(:disabled) {
    border-color: var(--kvant);
    background: var(--section-kvant-soft);
  }
  .kvant-option:disabled { cursor: default; }
  .kvant-option.correct {
    background: var(--success-soft);
    border-color: var(--correct);
    color: var(--correct);
  }
  .kvant-option.wrong {
    background: var(--danger-soft);
    border-color: var(--wrong);
    color: var(--wrong);
  }
  .kvant-option.dim { opacity: 0.35; }
  .verbal-page-note {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
  }
  .verbal-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
  .verbal-option {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    padding: 14px;
    text-align: center;
    transition: all 0.15s;
  }
  .verbal-option:hover:not(:disabled) {
    background: var(--section-verbal-soft);
    border-color: var(--verbal);
  }
  .verbal-option:disabled { cursor: default; }
  .verbal-option.correct {
    background: var(--success-soft);
    border-color: var(--correct);
    color: var(--correct);
  }
  .verbal-option.wrong {
    background: var(--danger-soft);
    border-color: var(--wrong);
    color: var(--wrong);
  }
  .verbal-option.dim { opacity: 0.35; }
  /* ===== Text-baserad verbal-rendering ===== */
  .verbal-passage {
    background: var(--surface-paper);
    border: 1px solid var(--surface-paper-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-paper);
    color: var(--surface-paper-text);
    font-family: var(--font-reading);
    font-size: 15px;
    line-height: 1.32;
    margin-bottom: 18px;
    padding: 30px 34px;
  }
  .verbal-passage-title {
    color: var(--surface-paper-title);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0 auto 14px;
    max-width: 62ch;
  }
  .verbal-passage-text {
    margin: 0 auto;
    max-width: 62ch;
    overflow-wrap: break-word;
    white-space: normal;
  }
  .verbal-passage.las .verbal-passage-text {
    line-height: 1.24;
    max-width: 58ch;
  }
  .verbal-passage.las .verbal-passage-title {
    max-width: 58ch;
  }
  .verbal-question {
    background: var(--surface-quiz);
    color: var(--surface-quiz-text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 18px;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 600;
  }
  .verbal-question .blank {
    display: inline-block;
    min-width: 60px;
    border-bottom: 2px solid currentColor;
    margin: 0 4px;
  }
  .verbal-options-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .verbal-option-text {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius-control);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    width: 100%;
  }
  .verbal-option-text:hover:not(:disabled) {
    border-color: var(--verbal);
    background: var(--section-verbal-soft);
  }
  .verbal-option-text:disabled { cursor: default; }
  .verbal-option-text .verbal-option-letter {
    font-weight: 700;
    color: var(--muted);
    min-width: 24px;
    font-size: 16px;
  }
  .verbal-option-text .verbal-option-body {
    flex: 1;
    background: var(--surface-quiz);
    color: var(--surface-quiz-text);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .verbal-option-text.correct { border-color: var(--correct); background: var(--success-soft); }
  .verbal-option-text.correct .verbal-option-letter { color: var(--correct); }
  .verbal-option-text.wrong { border-color: var(--wrong); background: var(--danger-soft); }
  .verbal-option-text.wrong .verbal-option-letter { color: var(--wrong); }
  .verbal-option-text.dim { opacity: 0.4; }

  /* Text-baserade alternativ (med MathJax-rendering) */
  .kvant-question {
    font-size: 18px;
    line-height: 1.75;
    color: var(--surface-quiz-text);
    background: var(--surface-quiz);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .kvant-question br { display: block; margin: 12px 0; content: ''; }
  .kvant-dtk-question {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 18px;
    row-gap: 0;
    line-height: 1.45;
    margin-bottom: 14px;
  }
  .kvant-dtk-question-number {
    font-weight: 800;
    white-space: nowrap;
  }
  .kvant-dtk-question-text {
    min-width: 0;
  }
  .kvant-dtk-question .kvant-question-line {
    min-height: 0;
  }
  .kvant-question-line {
    display: block;
    min-height: 1.8em;
  }
  .kvant-question-line.kvant-quantity + .kvant-question-line.kvant-quantity {
    margin-top: 12px;
  }
  .kvant-options-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .kvant-dtk-options {
    margin-top: 0;
  }
  .kvant-option-text {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius-control);
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    width: 100%;
  }
  .kvant-option-text:hover:not(:disabled) {
    border-color: var(--kvant);
    background: var(--section-kvant-soft);
  }
  .kvant-option-text:disabled { cursor: default; }
  .kvant-option-text .kvant-option-letter {
    font-weight: 700;
    color: var(--muted);
    min-width: 24px;
    font-size: 16px;
  }
  .kvant-option-text .kvant-option-body {
    flex: 1;
    background: var(--surface-quiz);
    color: var(--surface-quiz-text);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .kvant-option-text.correct { border-color: var(--correct); background: var(--success-soft); }
  .kvant-option-text.correct .kvant-option-letter { color: var(--correct); }
  .kvant-option-text.wrong { border-color: var(--wrong); background: var(--danger-soft); }
  .kvant-option-text.wrong .kvant-option-letter { color: var(--wrong); }
  .kvant-option-text.dim { opacity: 0.4; }

  .quiz-key-hint {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
  }
  .quiz-key-hint-keys {
    display: inline-flex;
    gap: 4px;
  }
  .quiz-key-hint kbd {
    background: var(--card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    min-width: 24px;
    padding: 2px 6px;
    text-align: center;
  }

  /* ===== Startsida ===== */
  .home { display: flex; flex-direction: column; gap: 24px; padding-top: 4px; }
  .home-header h1 {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 6px;
  }
  .home-header p { color: var(--muted); font-size: 15px; }

  .daily-panel {
    background:
      linear-gradient(135deg, var(--accent-soft), var(--section-verbal-soft)),
      var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    box-shadow: var(--soft-shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    padding: 24px 28px;
  }
  .daily-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
  }
  .daily-head h2 {
    color: var(--text-strong);
    font-size: 28px;
    font-weight: var(--font-weight-black);
    letter-spacing: 0;
    line-height: 1.1;
    margin-bottom: 6px;
  }
  .daily-head p {
    color: var(--muted);
    font-size: 15px;
    max-width: 620px;
  }
  .daily-kicker,
  .plan-label,
  .plan-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
  }
  .daily-edit {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--muted);
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 13px;
  }
  .daily-edit:hover { border-color: var(--text); color: var(--text); }
  .plan-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .plan-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .plan-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
  }
  .plan-input {
    width: 100%;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
  }
  .plan-static {
    align-items: center;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    display: flex;
    font: inherit;
    font-weight: 800;
    min-height: 44px;
    padding: 10px 12px;
  }
  .plan-input:focus { border-color: var(--accent); outline: none; }
  .plan-weak {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }
  .plan-check-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }
  .plan-check {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 7px;
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
    text-align: center;
  }
  .plan-check input {
    accent-color: var(--accent);
    flex: 0 0 auto;
  }
  .plan-actions,
  .daily-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .daily-primary,
  .daily-secondary {
    align-items: center;
    border-radius: var(--radius-pill);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
  }
  .daily-primary {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--text-on-accent);
  }
  .daily-secondary {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--text);
  }
  .daily-secondary.danger {
    background: var(--danger-soft);
    border-color: var(--danger-border);
    color: var(--danger-strong);
  }
  .daily-secondary span {
    color: var(--wrong);
    margin-left: 4px;
  }
  .daily-secondary:disabled {
    cursor: default;
    opacity: 0.68;
  }
  .daily-primary:hover,
  .daily-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }
  .daily-secondary:disabled:hover {
    box-shadow: none;
    transform: none;
  }
  .plan-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .plan-pill {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 12px;
  }
  .daily-meter {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .daily-meter-row {
    color: var(--muted);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: space-between;
    gap: 12px;
  }
  .daily-meter-track {
    background: var(--surface-soft);
    border-radius: var(--radius-pill);
    height: 8px;
    overflow: hidden;
  }
  .daily-meter-fill {
    background: linear-gradient(90deg, var(--accent), var(--verbal));
    border-radius: inherit;
    height: 100%;
    min-width: 0;
    transition: width 0.4s ease;
  }
  .coach-recommendation-card,
  .coach-subpanel,
  .coach-stat-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-width: 0;
  }
  .coach-recommendation-card {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px;
  }
  .coach-recommendation-card h3,
  .coach-subpanel h3 {
    color: var(--text-strong);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.18;
    margin: 3px 0 4px;
  }
  .coach-recommendation-card p,
  .coach-subpanel p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
  }
  .coach-card-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
  }
  .coach-alt-actions .daily-secondary span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
  }
  .coach-activity-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .coach-stat-card {
    padding: 14px;
  }
  .coach-stat-card strong {
    color: var(--text-strong);
    display: block;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    margin-top: 6px;
  }
  .coach-stat-card span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 5px;
  }
  .coach-heatmap {
    display: grid;
    gap: 3px;
    grid-template-columns: repeat(30, minmax(0, 1fr));
  }
  .coach-heat-cell {
    aspect-ratio: 1;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    min-width: 0;
  }
  .coach-heat-cell.level-1 { background: var(--accent-soft); }
  .coach-heat-cell.level-2 { background: var(--success-soft); border-color: var(--success-border); }
  .coach-heat-cell.level-3 { background: var(--accent); border-color: var(--accent); }
  .coach-heat-cell.level-4 { background: var(--correct); border-color: var(--correct); }
  .coach-insight-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .coach-trust-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
  .coach-subpanel {
    padding: 15px;
  }
  .coach-subpanel h3 {
    color: var(--text-strong);
    font-size: 18px;
    line-height: 1.2;
    margin: 6px 0;
  }
  .coach-subpanel p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .coach-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .coach-tool-actions .daily-secondary {
    flex: 1 1 130px;
    min-width: 0;
  }
  .coach-referral-code {
    background: var(--surface-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-strong);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 12px 0;
    padding: 12px;
    text-align: center;
  }
  .coach-referral-note,
  .coach-save-status {
    color: var(--muted);
    font-size: 12px;
  }
  .coach-mastery-list,
  .coach-bookmark-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
  }
  .coach-mastery-item,
  .coach-bookmark-item {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
    padding: 10px;
  }
  .coach-mastery-item strong,
  .coach-bookmark-item strong {
    color: var(--text);
    display: block;
    font-size: 13px;
    line-height: 1.25;
  }
  .coach-mastery-item span,
  .coach-bookmark-item span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    line-height: 1.3;
    margin-top: 3px;
  }
  .coach-mastery-score {
    color: var(--accent-strong);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 900;
  }
  .coach-bookmark-item button {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    min-width: 0;
    padding: 0;
    text-align: left;
  }
  .coach-bookmark-remove {
    align-items: center;
    background: var(--danger-soft) !important;
    border: 1px solid var(--danger-border) !important;
    border-radius: var(--radius-circle) !important;
    color: var(--danger-strong) !important;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 18px !important;
    height: 28px;
    justify-content: center;
    text-align: center !important;
    width: 28px;
  }
  .diagnostic-screen {
    max-width: 920px;
    margin: 0 auto;
  }
  .diagnostic-card {
    margin-top: 8px;
  }
  .word-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 24px;
  }
  .word-row .word {
    flex: 1 1 auto;
    margin-bottom: 0;
    min-width: 0;
  }
  .word-audio-btn,
  .coach-bookmark-toggle {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    min-height: 38px;
    padding: 8px 12px;
  }
  .word-audio-btn:disabled {
    cursor: default;
    opacity: 0.55;
  }
  .coach-bookmark-controls {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
  }
  .coach-bookmark-toggle.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--text);
  }
  .coach-note-field {
    display: grid;
    gap: 6px;
  }
  .coach-note-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .coach-note-field textarea {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font: inherit;
    min-height: 68px;
    padding: 10px 12px;
    resize: vertical;
    width: 100%;
  }
  .coach-note-field textarea:focus {
    border-color: var(--accent);
    outline: none;
  }


  .progress-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-panel);
    padding: 24px 28px;
    min-width: 0;
    box-shadow: var(--soft-shadow);
  }
  .progress-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
    min-width: 0;
  }
  .progress-label {
    font-size: 11px;
    letter-spacing: 1.2px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .progress-main { font-size: 34px; font-weight: 900; letter-spacing: 0; }
  .progress-main .progress-total { color: var(--muted); font-size: 18px; font-weight: 500; }
  .progress-top > div { min-width: 0; }
  .progress-right { text-align: right; min-width: 0; }
  .progress-right .progress-main { color: var(--correct); }

  .progress-bar-wrap { margin-bottom: 22px; }
  .progress-bar-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
  }
  .progress-bar-head .progress-percent { color: var(--accent); }
  .progress-bar-track {
    height: 8px;
    background: var(--card2);
    border-radius: var(--radius-pill);
    overflow: hidden;
  }
  .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--correct));
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
  }
  .progress-bar-fill.kvant {
    background: linear-gradient(90deg, var(--kvant), var(--correct));
  }
  .progress-bar-fill.verbal {
    background: linear-gradient(90deg, var(--section-verbal-start), var(--verbal));
  }

  .progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
  }
  .pstat { text-align: center; }
  .pstat-value {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .pstat-icon { font-size: 18px; opacity: 0.8; }
  .pstat-label { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }

  .filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .filter-label {
    font-size: 11px;
    letter-spacing: 1.2px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 600;
  }
  .chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .chip {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .chip:hover { border-color: var(--accent); }
  .chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
    font-weight: 800;
  }

  .cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .cta {
    position: relative;
    padding: 18px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-on-accent);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .cta:hover { transform: translateY(-1px); box-shadow: 0 18px 38px var(--accent-border); }
  .cta.cta-learn { background: var(--correct); }
  .cta.cta-learn:hover { background: var(--accent-hover); }
  .cta.cta-review { background: var(--accent); }
  .cta.cta-review:hover { background: var(--accent-hover); }
  .cta.cta-review.kvant { background: var(--section-kvant-hover); color: var(--section-kvant-strong); }
  .cta.cta-review.kvant:hover { background: var(--section-kvant-hover-strong); box-shadow: var(--shadow-kvant); }
  .cta.cta-review.verbal { background: var(--verbal); color: var(--surface); }
  .cta.cta-review.verbal:hover { background: var(--section-verbal-hover); box-shadow: var(--shadow-verbal); }
  .cta-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--wrong);
    color: var(--surface);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    min-width: 28px;
    text-align: center;
    box-shadow: var(--shadow-danger);
  }

  .lessons-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .lessons-section .lessons-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
  }

  .lessons-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .lessons-grid.kvant-grid .lesson-card {
    flex-basis: calc((100% - 36px) / 4);
  }
  .empty-lesson-list {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--muted);
    padding: 18px;
    text-align: center;
    box-shadow: var(--soft-shadow);
  }
  .lesson-card {
    position: relative;
    flex: 0 0 140px;
    aspect-ratio: 1 / 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    box-shadow: var(--shadow-sm);
  }
  .lesson-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
  }
  .lesson-card.kvant:hover { border-color: var(--kvant); }
  .lesson-card.verbal:hover { border-color: var(--verbal); }
  .lesson-card.done {
    background: var(--success-soft);
    border-color: var(--success-border);
  }
  .lesson-card.done:hover { border-color: var(--correct); }
  .lesson-check {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--correct);
    font-size: 14px;
  }
  .lesson-ring {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background:
      conic-gradient(var(--correct) calc(var(--p, 0) * 1%), var(--card2) 0);
    position: relative;
  }
  .lesson-ring::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--card);
    border-radius: var(--radius-circle);
  }
  .lesson-card.done .lesson-ring::after { background: var(--success-soft); }
  .lesson-ring span { position: relative; z-index: 1; }
  .lesson-ring.full {
    background: var(--correct);
    color: var(--surface);
  }
  .lesson-ring.full::after { display: none; }
  .lesson-ring.full span { color: var(--surface); font-size: 18px; }
  .lesson-title { font-size: 13px; font-weight: 600; padding: 0 4px; }
  .lesson-card.kvant .lesson-title { font-size: 11px; line-height: 1.25; }
  .lesson-count { font-size: 11px; color: var(--muted); }
  .kvant-coverage {
    font-size: 12px;
    margin-top: 4px;
  }
  .kvant-coverage.good { color: var(--correct); }
  .kvant-coverage.partial { color: var(--warning); }
  .kvant-coverage.minimal { color: var(--muted); }

  .back-home {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    margin-right: auto;
  }
  .back-home:hover { color: var(--text); border-color: var(--text); }

  @media (max-width: 1040px) {
  }
  @media (max-width: 720px) {
    .lesson-card { flex-basis: calc((100% - 24px) / 3); }
    .lessons-grid.kvant-grid .lesson-card { flex-basis: calc((100% - 12px) / 2); }
    .kvant-options[data-count="5"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .progress-stats { gap: 8px; }
    .pstat-value { font-size: 18px; }
    .cta-row { grid-template-columns: 1fr; }
    .progress-card { padding: 20px; }
    .home-header h1 { font-size: 26px; }
    .daily-panel { border-radius: var(--radius-lg); padding: 20px; }
    .daily-head { align-items: stretch; flex-direction: column; gap: 12px; }
    .daily-edit { align-self: flex-start; }
    .coach-recommendation-card { align-items: stretch; flex-direction: column; }
    .coach-recommendation-card .daily-primary { width: 100%; }
    .coach-activity-grid,
    .coach-insight-grid,
    .coach-trust-grid { grid-template-columns: 1fr; }
    .coach-heatmap { grid-template-columns: repeat(18, minmax(0, 1fr)); }
    .plan-form-grid { grid-template-columns: 1fr; }
    .plan-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .daily-actions,
    .plan-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .daily-primary,
    .daily-secondary { justify-content: center; text-align: center; }
  }
  @media (max-width: 640px) {
    body {
      padding: 10px;
      line-height: 1.45;
    }
    .container {
      max-width: none;
    }
    .auth-screen {
      align-items: flex-start;
      min-height: calc(100vh - 20px);
      padding-top: 10px;
    }
    .auth-card {
      border-radius: var(--radius-lg);
      padding: 20px;
    }
    .auth-card h1 {
      font-size: 24px;
      line-height: 1.1;
    }
    .auth-card p {
      margin-bottom: 18px;
    }
    .auth-mode-toggle {
      border-radius: var(--radius-lg);
    }
    .auth-mode-btn,
    .auth-submit,
    .auth-google-fallback,
    .auth-input {
      min-height: 44px;
    }
    header {
      align-items: stretch;
      border-radius: var(--radius-lg);
      flex-direction: column;
      gap: 8px;
      margin-bottom: 12px;
      padding: 12px;
    }
    header h1,
    .top-title {
      font-size: 18px;
      text-align: center;
    }
    .stats {
      font-size: 12px;
      gap: 8px;
      justify-content: center;
    }
    .account-bar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      border-radius: var(--radius-lg);
      gap: 8px;
      padding: 10px;
    }
    .account-user {
      grid-column: 1 / -1;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .account-actions {
      display: grid;
      grid-column: 1 / -1;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      width: 100%;
    }
    .theme-toggle,
    .logout-btn {
      justify-content: center;
      text-align: center;
      width: 100%;
    }
    .section-tabs {
      border-radius: var(--radius-lg);
      gap: 5px;
      margin-bottom: 12px;
      padding: 5px;
    }
    .main-section-tabs.has-subtabs {
      margin-bottom: 8px;
    }
    .section-tab {
      min-height: 44px;
      padding: 10px 8px;
    }
    .verbal-subtabs {
      border-radius: var(--radius-lg);
      margin-bottom: 14px;
    }
    .toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 8px;
      margin-bottom: 12px;
    }
    .toolbar .back-home,
    .toolbar .part-select {
      grid-column: 1 / -1;
      margin-right: 0;
      min-width: 0;
      width: 100%;
    }
    .toolbar .btn {
      min-height: 44px;
      padding: 11px 10px;
      white-space: normal;
      width: 100%;
    }
    .toolbar .btn-danger {
      grid-column: 1 / -1;
    }
    .card {
      border-radius: var(--radius-lg);
      margin-bottom: 12px;
      padding: 14px;
    }
    .word {
      font-size: 28px;
      letter-spacing: 0;
      margin-bottom: 16px;
    }
    .option {
      border-radius: var(--radius-md);
      padding: 12px 14px;
    }
    .kvant-img-wrap {
      border-radius: var(--radius-md);
      margin-bottom: 14px;
      overflow-x: auto;
      padding: 8px;
    }
    .kvant-img-wrap img {
      max-height: min(58vh, 560px);
    }
    .kvant-figure-card {
      border-radius: var(--radius-control);
      margin-top: 14px;
      padding: 8px;
    }
    .kvant-figure-head {
      align-items: stretch;
      flex-direction: column;
      gap: 8px;
    }
    .kvant-figure-zoom {
      width: 100%;
    }
    .kvant-figure-card .kvant-img-wrap img {
      max-height: min(44vh, 420px);
    }
    .kvant-image-modal {
      padding: 10px;
    }
    .kvant-image-modal-dialog {
      border-radius: var(--radius-control);
      max-height: calc(100vh - 20px);
      max-width: calc(100vw - 20px);
      padding: 10px;
    }
    .kvant-image-modal-dialog img {
      max-height: calc(100vh - 72px);
    }
    .kvant-options,
    .kvant-options[data-count="5"] {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .verbal-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kvant-option {
      min-height: 48px;
      padding: 12px 10px;
    }
    .kvant-options-text,
    .verbal-options-text {
      gap: 8px;
    }
    .kvant-option-text,
    .verbal-option-text {
      align-items: stretch;
      border-radius: var(--radius-md);
      gap: 8px;
      padding: 10px;
    }
    .kvant-option-text .kvant-option-letter,
    .verbal-option-text .verbal-option-letter {
      min-width: 24px;
      padding-top: 8px;
    }
    .kvant-option-text .kvant-option-body,
    .verbal-option-text .verbal-option-body {
      font-size: 15px;
      line-height: 1.45;
      padding: 10px;
    }
    .verbal-question {
      border-radius: var(--radius-control);
      font-size: 16px;
      line-height: 1.5;
      padding: 14px;
    }
    .verbal-passage {
      border-radius: var(--radius-xs);
      box-shadow: none;
      font-size: 15px;
      line-height: 1.45;
      margin-left: -2px;
      margin-right: -2px;
      overflow-x: auto;
      padding: 18px 14px;
    }
    .verbal-passage-title {
      font-size: 17px;
      margin-bottom: 10px;
    }
    .verbal-passage-text {
      max-width: 100%;
      overflow-wrap: break-word;
      word-break: normal;
      word-spacing: 0.03em;
    }
    .verbal-passage.las .verbal-passage-text {
      line-height: 1.48;
    }
    .verbal-passage-title,
    .verbal-passage.las .verbal-passage-title {
      max-width: 100%;
    }
    .progress-card {
      border-radius: var(--radius-lg);
      padding: 16px;
    }
    .home-header h1 {
      line-height: 1.08;
      overflow-wrap: anywhere;
    }
    .progress-main {
      font-size: 28px;
    }
    .progress-main .progress-total {
      font-size: 16px;
    }
    .daily-panel {
      border-radius: var(--radius-lg);
      gap: 15px;
      padding: 16px;
    }
    .daily-head h2 {
      font-size: 24px;
    }
    .plan-check-grid,
    .daily-actions,
    .plan-actions {
      grid-template-columns: 1fr;
    }
    .plan-check {
      justify-content: flex-start;
      padding-left: 14px;
      text-align: left;
    }
    .daily-meter-row {
      align-items: flex-start;
      flex-direction: column;
      gap: 3px;
    }
    .coach-heatmap { grid-template-columns: repeat(15, minmax(0, 1fr)); }
    .coach-alt-actions .daily-secondary {
      align-items: flex-start;
      flex-direction: column;
    }
    .coach-alt-actions .daily-secondary span {
      margin: 3px 0 0;
    }
    .word-row {
      align-items: stretch;
      flex-direction: column;
    }
    .word-audio-btn { width: 100%; }
    .chip-row {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }
    .chip {
      padding: 9px 8px;
      text-align: center;
    }
    .cta-row {
      gap: 10px;
    }
    .cta {
      min-height: 52px;
      padding: 14px;
    }
    .lessons-grid {
      gap: 10px;
      justify-content: stretch;
    }
    .lesson-card,
    .lessons-grid.kvant-grid .lesson-card {
      border-radius: var(--radius-md);
      flex-basis: calc((100% - 10px) / 2);
      min-width: 0;
      padding: 8px;
    }
    .lesson-title {
      font-size: 12px;
      overflow-wrap: anywhere;
    }
    .lesson-card.kvant .lesson-title {
      font-size: 10.5px;
    }
    .controls {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 8px;
    }
    .controls .btn {
      min-height: 44px;
      padding: 12px 10px;
      width: 100%;
    }
    .controls .btn:only-child {
      grid-column: 1 / -1;
    }
    .kvant-explanation-title {
      font-size: 18px;
      padding: 18px 16px 8px;
    }
    .kvant-explanation-sheet {
      padding: 0 14px 16px;
    }
    .kvant-explanation-given {
      grid-template-columns: 1fr;
      padding: 12px;
    }
    .kvant-explanation-calc {
      overflow-x: auto;
      padding: 12px;
    }
    .kvant-explanation-cheatsheet {
      display: grid;
      gap: 6px;
    }
  }
  @media (max-width: 560px) {
    body { padding: 14px; }
    .auth-screen { min-height: calc(100vh - 28px); }
    .auth-card { padding: 22px; }
    .auth-card h1 { font-size: 26px; }
    .account-bar { align-items: flex-start; flex-direction: column; }
    .section-tabs { gap: 4px; padding: 5px; }
    .section-tab { padding: 10px 8px; font-size: 14px; }
    .verbal-subtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .verbal-subtab { padding: 10px 8px; }
    .progress-top { flex-direction: column; gap: 12px; }
    .progress-right { text-align: left; }
    .progress-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pstat-value { font-size: 17px; gap: 5px; }
    .pstat-label { font-size: 11px; line-height: 1.25; }
    .lesson-card,
    .lessons-grid.kvant-grid .lesson-card { flex-basis: calc((100% - 12px) / 2); }
  }
  @media (max-width: 430px) {
    body { padding: 8px; }
    .home { gap: 18px; }
    .home-header h1 { font-size: 22px; }
    .home-header p { font-size: 14px; }
    .progress-stats {
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .pstat {
      align-items: center;
      display: flex;
      justify-content: space-between;
      text-align: left;
    }
    .pstat-label {
      margin-top: 0;
      text-align: right;
    }
    .lesson-ring {
      height: 42px;
      width: 42px;
    }
  }
  .option.correct {
    background: var(--success-soft);
    border-color: var(--correct);
    color: var(--correct);
  }
  .option.wrong {
    background: var(--danger-soft);
    border-color: var(--wrong);
    color: var(--wrong);
  }
  .option.dim { opacity: 0.4; }
  .explanation {
    margin-top: 20px;
    padding: 16px;
    background: var(--card2);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--muted);
    border-left: 3px solid var(--accent);
    display: none;
  }
  .explanation.show { display: block; }
  .explanation em {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: var(--muted);
  }
  .explanation strong { color: var(--text); font-weight: 600; }
  .ord-explanation { border-left-color: var(--accent); }
  .ord-explanation-title {
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
  }
  .ord-answer-line {
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 12px;
  }
  .ord-synonym-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .7px;
    margin-bottom: 8px;
    text-transform: uppercase;
  }
  .ord-synonym-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }
  .ord-synonym-chip {
    background: var(--success-soft);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-pill);
    color: var(--success);
    font-size: 13px;
    font-weight: 700;
    padding: 7px 10px;
  }
  .ord-explanation-body {
    line-height: 1.6;
  }
  .ord-explanation-body:empty::after {
    content: "Förklaring saknas i databasen, men rätt svar visas ovan.";
    color: var(--muted);
  }
  .kvant-explanation {
    padding: 0;
    overflow: hidden;
    border-left: 0;
    background: var(--kvant-sheet);
    color: var(--kvant-sheet-text);
    border: 1px solid var(--kvant-sheet-border);
    box-shadow: var(--shadow-sheet);
  }
  .kvant-explanation strong { color: var(--kvant-sheet-text); }
  .kvant-explanation em { color: var(--kvant-sheet-subtle); }
  .kvant-explanation-title {
    color: var(--kvant-sheet-text);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
    padding: 22px 22px 10px;
    border-top: 3px solid var(--kvant-sheet-accent);
  }
  .kvant-explanation-sheet {
    padding: 0 22px 22px;
  }
  .kvant-explanation-subtitle {
    color: var(--kvant-sheet-accent);
    font-size: 18px;
    font-weight: 900;
    margin: 14px 0 6px;
  }
  .kvant-explanation-intro {
    color: var(--kvant-sheet-muted);
    line-height: 1.55;
    margin-bottom: 10px;
  }
  .kvant-explanation-given {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 18px;
    background: var(--kvant-sheet-given);
    border: 2px solid var(--kvant-sheet-accent-border);
    border-radius: 0;
    margin: 8px 0 16px;
    padding: 14px 16px;
  }
  .kvant-explanation-context {
    color: var(--kvant-sheet-muted);
    line-height: 1.55;
    grid-column: 1 / -1;
    font-weight: 700;
  }
  .kvant-explanation-quantity { min-width: 0; }
  .kvant-explanation-quantity-label {
    color: var(--kvant-sheet-text);
    font-weight: 900;
    margin-bottom: 2px;
  }
  .kvant-explanation-quantity-value {
    color: var(--kvant-sheet-text);
    font-size: 17px;
    line-height: 1.6;
  }
  .kvant-explanation-answer {
    color: var(--kvant-sheet-text);
    background: var(--kvant-sheet-answer);
    border: 2px solid var(--kvant-sheet-answer-border);
    border-radius: 0;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
    margin-top: 14px;
    padding: 12px 14px;
  }
  .kvant-explanation-answer strong { color: var(--kvant-sheet-answer-text); }
  .kvant-explanation-block {
    margin-top: 14px;
  }
  .kvant-explanation-block-title {
    color: var(--kvant-sheet-accent);
    font-size: 17px;
    font-weight: 900;
    margin-bottom: 6px;
  }
  .kvant-explanation-hint {
    color: var(--kvant-sheet-muted);
    line-height: 1.55;
  }
  .kvant-explanation-calc {
    background: var(--kvant-sheet-calc);
    border: 2px solid var(--kvant-sheet-calc-border);
    border-radius: 0;
    margin-top: 8px;
    padding: 14px 16px;
  }
  .kvant-explanation-solution {
    color: var(--kvant-sheet-muted);
    line-height: 1.6;
  }
  .kvant-explanation-solution br + br {
    display: block;
    content: "";
    margin-top: 8px;
  }
  .kvant-explanation-steps {
    margin: 0;
    padding-left: 20px;
  }
  .kvant-explanation-steps li + li {
    margin-top: 8px;
  }
  .kvant-explanation-cheatsheet {
    color: var(--kvant-sheet-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    line-height: 1.45;
    margin-top: 8px;
  }
  .kvant-explanation-cheatsheet span {
    white-space: normal;
  }
  .controls {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 16px;
  }
  .btn {
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: opacity 0.15s, border-color 0.15s, background 0.15s;
  }
  .btn:hover { opacity: 0.9; }
  .btn-secondary {
    background: var(--card2);
    color: var(--text);
    border: 1px solid var(--border);
  }
  .btn-danger {
    background: var(--danger-soft);
    color: var(--danger-strong);
    border: 1px solid var(--danger-border);
  }
  .btn.active {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--text);
  }
  .app-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-scrim);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: 20px;
    animation: appModalFadeIn 0.18s ease-out;
  }
  .app-modal {
    width: min(100%, 420px);
    background: var(--surface-modal);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--soft-shadow);
  }
  .app-modal-wide {
    width: min(100%, 640px);
  }
  .app-modal h2 {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .app-modal p {
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 20px;
  }
  .app-modal-body {
    display: grid;
    gap: 12px;
    margin: 12px 0 18px;
  }
  .privacy-copy p {
    margin: 0;
  }
  .privacy-copy code {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    padding: 2px 6px;
  }
  .app-modal-field {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }
  .app-modal-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .app-modal-error {
    color: var(--wrong);
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 14px;
  }
  .app-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
  }
  @keyframes appModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
  }
  .empty-state { text-align: center; color: var(--muted); }
  .empty-state h2 { font-size: 24px; color: var(--text); margin-bottom: 10px; }
  .empty-state p { margin-bottom: 18px; }
  .loading {
    display: grid;
    min-height: min(560px, calc(100vh - 96px));
    padding: 60px 20px;
    place-items: center;
    text-align: center;
  }
  .loading-shell {
    color: var(--muted);
    display: grid;
    gap: 12px;
    justify-items: center;
    max-width: 360px;
  }
  .loading-shell h2 {
    color: var(--text);
    font-size: 24px;
    line-height: 1.2;
  }
  .loading-shell p {
    font-size: 14px;
    line-height: 1.45;
  }
  .local-file-shell {
    max-width: 520px;
  }
  .local-file-shell code {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    padding: 2px 6px;
  }
  .local-file-shell pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    overflow-x: auto;
    padding: 12px 14px;
    width: 100%;
  }
  .local-file-shell pre code {
    background: transparent;
    border: 0;
    padding: 0;
  }
  .local-file-link {
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
  }
  .local-file-note {
    color: var(--text-muted);
    font-size: 13px;
  }
  .loading-spinner {
    animation: hpLoadingSpin 0.8s linear infinite;
    border: 3px solid var(--loader-ring);
    border-top-color: var(--accent);
    border-radius: var(--radius-circle);
    height: 34px;
    width: 34px;
  }
  @keyframes hpLoadingSpin {
    to { transform: rotate(360deg); }
  }
  #dev-validation-banner {
    position: fixed;
    top: 12px;
    left: 12px;
    right: 12px;
    background: var(--dev-banner-bg);
    color: var(--dev-banner-text);
    border: 1px solid var(--dev-banner-border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 13px;
    z-index: var(--z-banner);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  #dev-validation-banner strong { font-weight: 700; }
  #dev-validation-banner button {
    margin-left: auto;
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
  }

  /* Del 7 focused dashboard */
  .dashboard-shell {
    display: grid;
    gap: 24px;
  }
  .dashboard-status-strip {
    align-items: stretch;
    background:
      radial-gradient(circle at 100% 0%, var(--warm-soft), transparent 32%),
      var(--surface-inverse);
    border: 1px solid var(--surface-inverse-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    color: var(--surface-inverse-text);
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.15fr) minmax(150px, 0.35fr) minmax(300px, 0.85fr);
    padding: 26px;
  }
  .dashboard-eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: var(--letter-kicker);
    text-transform: uppercase;
  }
  .dashboard-status-strip h2 {
    color: #fff;
    font-size: clamp(30px, 4vw, 46px);
    margin-top: 8px;
  }
  .dashboard-status-strip p {
    color: var(--surface-inverse-muted);
    font-size: 16px;
    margin-top: 8px;
  }
  .dashboard-streak-card,
  .dashboard-status-metrics > div {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    padding: 18px;
  }
  .dashboard-streak-card {
    align-items: center;
    display: grid;
    justify-items: center;
    text-align: center;
  }
  .dashboard-streak-card span,
  .dashboard-status-metrics span {
    color: var(--surface-inverse-muted);
    display: block;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
  }
  .dashboard-streak-card strong {
    color: var(--warm);
    font-size: 58px;
    line-height: 0.95;
  }
  .dashboard-streak-card em {
    color: #fff;
    font-style: normal;
    font-weight: 800;
  }
  .dashboard-status-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-status-metrics strong {
    color: #fff;
    display: block;
    font-size: 30px;
    margin-top: 6px;
  }
  .dashboard-status-metrics small {
    color: var(--surface-inverse-muted);
    display: block;
    line-height: 1.35;
    margin-top: 4px;
  }
  .dashboard-daily-card {
    align-items: center;
    background:
      radial-gradient(circle at 90% 10%, rgba(79, 70, 229, 0.12), transparent 34%),
      var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);
    padding: 34px;
  }
  .dashboard-daily-copy h3 {
    color: var(--text-strong);
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: 0;
    line-height: 0.98;
    margin-top: 10px;
  }
  .dashboard-daily-copy p {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.65;
    margin-top: 16px;
    max-width: 720px;
  }
  .dashboard-daily-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
  }
  .dashboard-daily-meta span,
  .dashboard-plan-summary .plan-pill {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 750;
    padding: 8px 12px;
  }
  .dashboard-daily-actions {
    display: grid;
    gap: 12px;
  }
  .dashboard-start {
    font-size: 17px;
    min-height: 56px;
  }
  .dashboard-plan-summary,
  .dashboard-onboarding-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
  }
  .dashboard-plan-summary {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
  }
  .dashboard-plan-summary .plan-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dashboard-onboarding-panel {
    display: grid;
    gap: 18px;
  }
  .dashboard-onboarding-panel h3 {
    font-size: 24px;
    margin-top: 6px;
  }
  .dashboard-more-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 12px;
    min-height: 220px;
    padding: 22px;
  }
  .dashboard-action-card > span {
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: var(--letter-kicker);
    text-transform: uppercase;
  }
  .dashboard-action-card h3 {
    color: var(--text-strong);
    font-size: 22px;
  }
  .dashboard-action-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
  }
  .dashboard-action-card .daily-secondary {
    align-self: end;
    width: 100%;
  }
  .dashboard-mini-actions {
    align-self: end;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-mini-actions button {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    min-height: 42px;
  }
  .dashboard-mini-actions button:hover {
    border-color: var(--brand-border);
    color: var(--text-strong);
  }
  .dashboard-detail-panels {
    display: grid;
    gap: 16px;
  }
  .dashboard-detail-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 24px;
  }
  .dashboard-detail-panel[hidden] {
    display: none;
  }
  .dashboard-detail-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 18px;
  }
  .dashboard-detail-head h3 {
    color: var(--text-strong);
    font-size: 26px;
  }
  .dashboard-settings-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dashboard-shell .coach-heatmap {
    margin-top: 14px;
  }
  .dashboard-shell .coach-subpanel,
  .dashboard-shell .coach-stat-card {
    box-shadow: none;
  }

  @media (max-width: 980px) {
    .dashboard-status-strip,
    .dashboard-daily-card,
    .dashboard-more-grid,
    .dashboard-settings-grid {
      grid-template-columns: 1fr;
    }
    .dashboard-status-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-plan-summary {
      align-items: stretch;
      display: grid;
    }
  }

  @media (max-width: 620px) {
    .dashboard-status-strip,
    .dashboard-daily-card {
      border-radius: var(--radius-lg);
      padding: 22px;
    }
    .dashboard-status-metrics,
    .dashboard-mini-actions {
      grid-template-columns: 1fr;
    }
    .dashboard-daily-copy h3 {
      font-size: 34px;
    }
    .dashboard-daily-copy p {
      font-size: 16px;
    }
    .dashboard-detail-panel {
      border-radius: var(--radius-lg);
      padding: 18px;
    }
    .dashboard-detail-head {
      align-items: stretch;
      display: grid;
    }
  }

  /* Logged-in app redesign: hp-plugg-app-design-demo.html */
  :root {
    --app-ink: var(--text-strong);
    --app-ink-2: var(--text-secondary);
    --app-muted: var(--text-muted);
    --app-green: var(--brand);
    --app-green-700: var(--brand);
    --app-green-900: var(--brand-hover);
    --app-green-50: var(--brand-soft);
    --app-green-100: var(--brand-border);
    --app-bg: var(--surface);
    --app-bg-soft: var(--bg);
    --app-bg-tint: var(--surface-2);
    --app-line: var(--border);
    --app-line-soft: var(--border-soft);
    --app-amber: var(--warm);
    --app-amber-50: var(--warm-soft);
    --app-amber-700: var(--warm-hover);
    --app-rose: var(--danger);
    --app-rose-50: var(--danger-soft);
    --app-radius: 16px;
    --app-radius-lg: 20px;
    --app-shadow-sm: var(--shadow-sm);
    --app-shadow-md: var(--shadow-md);
    --app-shadow-lg: var(--shadow-lg);
  }

  :root[data-theme="dark"] {
    --app-ink: var(--text-strong);
    --app-ink-2: var(--text-secondary);
    --app-muted: var(--text-muted);
    --app-green: var(--brand);
    --app-green-700: var(--brand);
    --app-green-900: var(--brand-hover);
    --app-green-50: var(--brand-soft);
    --app-green-100: var(--brand-border);
    --app-bg: var(--surface);
    --app-bg-soft: var(--bg);
    --app-bg-tint: var(--surface-2);
    --app-line: var(--border);
    --app-line-soft: var(--border-soft);
    --app-amber: var(--warm);
    --app-amber-50: var(--warm-soft);
    --app-amber-700: var(--warm);
    --app-rose: var(--danger);
    --app-rose-50: var(--danger-soft);
    --app-shadow-sm: var(--shadow-sm);
    --app-shadow-md: var(--shadow-md);
    --app-shadow-lg: var(--shadow-lg);
  }

  body.tool-active,
  body.training-active {
    background: var(--app-bg-tint);
    color: var(--app-ink);
    padding: 0;
  }

  body.tool-active .container.tool-layout,
  body.training-active .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .tool-app,
  .train {
    color: var(--app-ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
  }

  .tool-app .app-icon,
  .train .app-icon {
    color: currentColor;
    display: block;
    flex: 0 0 auto;
    height: 18px;
    max-height: 18px;
    max-width: 18px;
    width: 18px;
  }

  .tool-shell {
    background: var(--app-bg-soft);
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: 100vh;
  }

  .tool-sidebar {
    background: color-mix(in srgb, var(--app-bg) 92%, var(--app-bg-soft));
    border-right: 1px solid var(--app-line);
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
  }

  .tool-sidebar-main {
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
  }

  .tool-brand {
    align-items: center;
    display: flex;
    gap: 11px;
    padding: 6px 8px 0;
  }

  .tool-brand-mark {
    align-items: center;
    background: linear-gradient(150deg, var(--app-green), var(--app-green-900));
    border-radius: 11px;
    box-shadow: var(--app-shadow-sm);
    color: #fff;
    display: grid;
    font-size: 15px;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
  }

  .tool-brand strong {
    color: var(--app-ink);
    display: block;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .tool-brand small {
    color: var(--app-muted);
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
  }

  .tool-divider {
    background: var(--app-line-soft);
    height: 1px;
    margin: 16px 6px;
  }

  .tool-nav-group {
    margin-bottom: 14px;
  }

  .tool-nav-heading {
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 0 10px 7px;
    text-transform: uppercase;
  }

  .tool-nav-item,
  .tool-footer-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--app-ink-2);
    display: flex;
    font-size: 14px;
    font-weight: 650;
    gap: 11px;
    min-height: 40px;
    padding: 9px 10px;
    text-align: left;
    transition: background .12s ease, color .12s ease, transform .12s ease;
    width: 100%;
  }

  .tool-nav-item:hover,
  .tool-footer-link:hover {
    background: var(--app-bg-tint);
    color: var(--app-ink);
  }

  .tool-nav-item.active {
    background: var(--app-green-50);
    color: var(--app-green-900);
    font-weight: 750;
  }

  .tool-nav-icon,
  .tool-footer-link svg {
    color: currentColor;
    flex: none;
    height: 18px;
    width: 18px;
  }

  .tool-nav-mono {
    align-items: center;
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 6px;
    color: var(--app-green-900);
    display: grid;
    flex: none;
    font-size: 10px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    width: 28px;
  }

  .tool-nav-item.kv .tool-nav-mono {
    background: var(--app-amber-50);
    border-color: color-mix(in srgb, var(--app-amber) 35%, var(--app-line));
    color: var(--app-amber-700);
  }

  .tool-nav-badge {
    background: var(--app-amber-50);
    border-radius: 999px;
    color: var(--app-amber-700);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    margin-left: auto;
    padding: 2px 7px;
  }

  .tool-sidebar-footer {
    border-top: 1px solid var(--app-line-soft);
    margin-top: auto;
    padding-top: 14px;
  }

  .tool-profile-row {
    align-items: center;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    padding: 8px 10px;
  }

  .tool-avatar {
    align-items: center;
    background: var(--app-green-100);
    border-radius: 50%;
    color: var(--app-green-900);
    display: grid;
    flex: none;
    font-size: 13px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
  }

  .tool-profile-copy {
    min-width: 0;
  }

  .tool-profile-name,
  .tool-profile-email {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tool-profile-name {
    color: var(--app-ink);
    font-size: 13.5px;
    font-weight: 750;
  }

  .tool-profile-email {
    color: var(--app-muted);
    font-size: 11.5px;
    font-weight: 600;
  }

  .tool-footer-link {
    font-size: 13px;
  }

  .tool-footer-link.danger {
    color: var(--app-rose);
  }

  .tool-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .tool-topbar {
    align-items: center;
    background: var(--app-bg);
    border-bottom: 1px solid var(--app-line);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0;
    padding: 18px 28px;
  }

  .tool-topbar-title h1 {
    color: var(--app-ink);
    font-size: 20px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .tool-topbar-title p {
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 600;
    margin: 1px 0 0;
  }

  .tool-topbar-utility {
    align-items: center;
    display: flex;
    gap: 10px;
  }

  .tool-mobile-menu,
  .tool-ghost-button,
  .tool-icon-button {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 10px;
    color: var(--app-ink-2);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
  }

  .tool-icon-button,
  .tool-mobile-menu {
    padding: 0;
    width: 38px;
  }

  .tool-mobile-menu {
    display: none;
  }

  .tool-ghost-button:hover,
  .tool-icon-button:hover,
  .tool-mobile-menu:hover {
    border-color: var(--app-green);
    color: var(--app-green-700);
  }

  .tool-body {
    min-width: 0;
    overflow: auto;
    padding: 26px 28px 34px;
  }

  .tool-view {
    display: grid;
    gap: 16px;
    max-width: 1180px;
  }

  .tool-greet {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 4px;
  }

  .tool-greet h2 {
    color: var(--app-ink);
    font-size: 25px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .tool-greet p,
  .tool-scope-cap,
  .tool-stat-sub,
  .tool-alt-card span,
  .tool-goal-note {
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 600;
  }

  .tool-streak-chip {
    align-items: center;
    background: var(--app-amber-50);
    border: 1px solid color-mix(in srgb, var(--app-amber) 35%, var(--app-line));
    border-radius: 999px;
    color: var(--app-amber-700);
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    padding: 9px 14px;
    white-space: nowrap;
  }

  .tool-streak-chip svg {
    height: 15px;
    width: 15px;
  }

  .tool-scope-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 2px;
  }

  .tool-scope {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 13px;
    box-shadow: var(--app-shadow-sm);
    display: inline-flex;
    gap: 3px;
    padding: 4px;
  }

  .tool-scope button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: var(--app-ink-2);
    display: inline-flex;
    font-size: 13.5px;
    font-weight: 750;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
  }

  .tool-scope button.active {
    background: var(--app-green-50);
    color: var(--app-green-900);
  }

  .tool-scope button.active.kvant {
    background: var(--app-amber-50);
    color: var(--app-amber-700);
  }

  .tool-scope-dot {
    border-radius: 999px;
    height: 8px;
    width: 8px;
  }

  .tool-scope-dot.green { background: var(--app-green); }
  .tool-scope-dot.amber { background: var(--app-amber); }

  .tool-scope-cap {
    max-width: 360px;
  }

  .tool-scope-cap b {
    color: var(--app-ink-2);
    font-weight: 750;
  }

  .tool-onboarding-card {
    align-items: start;
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--app-green-50) 78%, var(--app-bg)) 0%, var(--app-bg) 58%),
      var(--app-bg);
    border: 1px solid color-mix(in srgb, var(--app-green) 30%, var(--app-line));
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-md);
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(220px, .62fr) minmax(0, 1fr);
    padding: 22px;
  }

  .tool-onboarding-copy {
    display: grid;
    gap: 8px;
  }

  .tool-onboarding-copy h3 {
    color: var(--app-ink);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
  }

  .tool-onboarding-copy p {
    color: var(--app-ink-2);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.6;
    max-width: 440px;
  }

  .tool-onboarding-card .plan-form {
    background: color-mix(in srgb, var(--app-bg) 86%, var(--app-bg-soft));
    border: 1px solid var(--app-line);
    border-radius: 14px;
    padding: 16px;
  }

  .tool-plan-strip {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 14px;
    color: var(--app-ink-2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }

  .tool-plan-strip strong,
  .tool-plan-strip span {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line-soft);
    border-radius: 999px;
    color: var(--app-ink-2);
    font-size: 12.5px;
    font-weight: 800;
    padding: 7px 10px;
  }

  .tool-plan-strip strong {
    color: var(--app-green-900);
  }

  .tool-plan-strip .tool-plan-label {
    background: transparent;
    border: 0;
    color: var(--app-muted);
    letter-spacing: .5px;
    text-transform: uppercase;
  }

  .tool-plan-edit {
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 999px;
    color: var(--app-green-900);
    font-size: 12.5px;
    font-weight: 850;
    margin-left: auto;
    min-height: 40px;
    padding: 7px 12px;
  }

  .today-premium {
    gap: 18px;
  }

  .today-label {
    color: var(--app-muted);
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
  }

  .today-hero {
    align-items: stretch;
    background:
      radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--app-green-50) 72%, transparent), transparent 32%),
      var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 26px;
    box-shadow: var(--app-shadow-md);
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .72fr);
    padding: 28px;
  }

  .today-hero-copy {
    align-content: center;
    display: grid;
    gap: 13px;
    min-width: 0;
  }

  .today-hero-copy h2 {
    color: var(--app-ink);
    font-size: clamp(32px, 4.8vw, 54px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: .98;
    max-width: 780px;
  }

  .today-hero-copy p {
    color: var(--app-ink-2);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.65;
    max-width: 720px;
  }

  .today-hero-actions,
  .today-reco-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .today-primary-cta,
  .today-secondary-cta {
    align-items: center;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
  }

  .today-primary-cta {
    background: var(--app-ink);
    box-shadow: 0 14px 28px rgba(12,24,18,.16);
    color: var(--app-bg);
  }

  .today-primary-cta svg,
  .today-secondary-cta svg {
    height: 16px;
    width: 16px;
  }

  .today-secondary-cta {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    color: var(--app-ink-2);
  }

  .today-plan-card {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--app-bg) 88%, var(--app-green-50)), var(--app-bg)),
      var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 22px;
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .today-plan-top {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
  }

  .today-plan-top button,
  .today-block-head button,
  .today-rail-card button {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 999px;
    color: var(--app-ink-2);
    font-size: 12.5px;
    font-weight: 850;
    min-height: 38px;
    padding: 8px 12px;
  }

  .today-plan-card > strong {
    color: var(--app-ink);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .today-plan-list {
    display: grid;
    gap: 8px;
  }

  .today-plan-list span {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line-soft);
    border-radius: 999px;
    color: var(--app-ink-2);
    font-size: 13px;
    font-weight: 800;
    padding: 9px 12px;
  }

  .today-dashboard-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(292px, .34fr);
  }

  .today-main-column,
  .today-side-rail {
    display: grid;
    gap: 18px;
    min-width: 0;
  }

  .today-command-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.34fr) minmax(280px, .66fr);
  }

  .today-reco-card,
  .today-progress-card,
  .today-block,
  .today-rail-card {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 22px;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-ink);
  }

  .today-reco-card {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 24px;
  }

  .today-reco-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  .today-reco-copy h3,
  .today-block-head h3 {
    color: var(--app-ink);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
  }

  .today-reco-copy p,
  .today-block-head span,
  .today-rail-card p {
    color: var(--app-muted);
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.5;
  }

  .today-reco-meta {
    grid-column: 1 / -1;
  }

  .today-reco-meta span {
    align-items: center;
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line-soft);
    border-radius: 999px;
    color: var(--app-ink-2);
    display: inline-flex;
    font-size: 12.5px;
    font-weight: 800;
    gap: 7px;
    padding: 8px 10px;
  }

  .today-reco-meta svg {
    color: var(--app-green-700);
    height: 14px;
    width: 14px;
  }

  .today-progress-card {
    align-content: space-between;
    display: grid;
    gap: 18px;
    padding: 22px;
  }

  .today-progress-metrics {
    display: grid;
    gap: 13px;
  }

  .today-progress-metrics div {
    display: grid;
    gap: 3px;
  }

  .today-progress-metrics strong {
    color: var(--app-ink);
    font-size: 31px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .today-progress-metrics span {
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 750;
  }

  .today-daily-track,
  .today-part-progress i {
    background: var(--app-bg-tint);
    border-radius: 999px;
    display: block;
    height: 9px;
    overflow: hidden;
  }

  .today-daily-track i,
  .today-part-progress b {
    background: linear-gradient(90deg, var(--app-green), var(--app-green-700));
    border-radius: inherit;
    display: block;
    height: 100%;
  }

  .today-block {
    padding: 22px;
  }

  .today-block-head {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
  }

  .today-block-head > div {
    display: grid;
    gap: 7px;
  }

  .today-part-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .today-part-card {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line-soft);
    border-radius: 18px;
    color: var(--app-ink);
    display: grid;
    gap: 8px;
    min-height: 188px;
    padding: 16px;
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  }

  .today-part-card:hover {
    border-color: var(--app-green-100);
    box-shadow: var(--app-shadow-md);
    transform: translateY(-2px);
  }

  .today-part-card.kvant:hover {
    border-color: color-mix(in srgb, var(--app-amber) 45%, var(--app-line));
  }

  .today-part-icon {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 14px;
    color: var(--app-green-700);
    display: grid;
    height: 42px;
    justify-content: center;
    width: 42px;
  }

  .today-part-card.kvant .today-part-icon {
    color: var(--app-amber-700);
  }

  .today-part-icon svg {
    height: 19px;
    width: 19px;
  }

  .today-part-code {
    color: var(--app-green-700);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
  }

  .today-part-card.kvant .today-part-code {
    color: var(--app-amber-700);
  }

  .today-part-card strong {
    color: var(--app-ink);
    font-size: 14.5px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .today-part-card > span:not(.today-part-icon):not(.today-part-code):not(.today-part-progress) {
    color: var(--app-muted);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.4;
  }

  .today-part-progress {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: auto;
  }

  .today-part-progress em,
  .today-part-card small {
    color: var(--app-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
  }

  .today-side-rail {
    position: sticky;
    top: 96px;
  }

  .today-rail-card {
    display: grid;
    gap: 10px;
    padding: 18px;
  }

  .today-rail-card.priority {
    border-color: color-mix(in srgb, var(--app-amber) 36%, var(--app-line));
  }

  .today-rail-card > strong {
    color: var(--app-ink);
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .today-rail-card button:disabled {
    cursor: not-allowed;
    opacity: .58;
  }

  .today-mini-actions {
    display: grid;
    gap: 9px;
  }

  .today-mini-actions button {
    align-items: center;
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line-soft);
    border-radius: 14px;
    color: var(--app-ink);
    display: grid;
    gap: 3px 10px;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 58px;
    padding: 10px;
    text-align: left;
  }

  .today-mini-actions button > span {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 11px;
    color: var(--app-green-700);
    display: grid;
    grid-row: span 2;
    height: 34px;
    justify-content: center;
    width: 34px;
  }

  .today-mini-actions svg {
    height: 16px;
    width: 16px;
  }

  .today-mini-actions strong {
    color: var(--app-ink);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    min-width: 0;
  }

  .today-mini-actions em {
    color: var(--app-muted);
    font-size: 11.5px;
    font-style: normal;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tool-stat-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tool-stat,
  .tool-card,
  .tool-panel {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    box-shadow: none;
    color: var(--app-ink);
  }

  .tool-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 118px;
    padding: 16px 17px;
  }

  .tool-stat-label,
  .tool-section-label,
  .tool-reco-tag,
  .tool-alt-head {
    color: var(--app-muted);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
  }

  .tool-stat-value {
    color: var(--app-ink);
    font-size: 26px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.1;
  }

  .tool-stat-value.green { color: var(--app-green-700); }
  .tool-stat-value.amber { color: var(--app-amber-700); }

  .tool-mini-track,
  .tool-reco-track,
  .tool-goal-track,
  .tool-mastery-track {
    background: var(--app-bg-tint);
    border-radius: 999px;
    display: block;
    overflow: hidden;
  }

  .tool-mini-track {
    height: 7px;
    margin-top: 6px;
  }

  .tool-mini-track i,
  .tool-goal-track i,
  .tool-mastery-track i {
    background: linear-gradient(90deg, var(--app-green), var(--app-green-700));
    border-radius: inherit;
    display: block;
    height: 100%;
  }

  .tool-stat-ringrow {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-top: 2px;
  }

  .tool-ring {
    flex: none;
    height: 54px;
    width: 54px;
  }

  .tool-ring circle {
    fill: none;
    stroke: var(--app-bg-tint);
    stroke-width: 7;
  }

  .tool-ring circle:nth-child(2) {
    stroke: var(--app-green-700);
    stroke-dasharray: 138;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
  }

  .tool-ring text {
    fill: var(--app-ink);
    font-size: 12px;
    font-weight: 850;
    text-anchor: middle;
  }

  .tool-reco {
    background: linear-gradient(142deg, #0a5f38, #0c8f4c);
    border-radius: var(--app-radius-lg);
    box-shadow: 0 16px 36px rgba(10,110,59,.32);
    color: #fff;
    overflow: hidden;
    padding: 24px 26px;
    position: relative;
  }

  .tool-reco::after {
    background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%);
    content: "";
    height: 240px;
    position: absolute;
    right: -60px;
    top: -60px;
    width: 240px;
  }

  .tool-reco > * {
    position: relative;
    z-index: 1;
  }

  .tool-reco-tag {
    color: #9af0c2;
    letter-spacing: 1px;
  }

  .tool-reco h3 {
    color: #fff;
    font-size: 23px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 7px 0 5px;
  }

  .tool-reco p {
    color: #d6f5e3;
    font-size: 14.5px;
    font-weight: 600;
    max-width: 580px;
  }

  .tool-reco-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 16px 0 14px;
  }

  .tool-reco-meta span {
    align-items: center;
    color: #eafaf0;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
  }

  .tool-reco-meta svg {
    color: #9af0c2;
    height: 15px;
    width: 15px;
  }

  .tool-reco-track {
    background: rgba(255,255,255,.22);
    height: 8px;
    margin-bottom: 18px;
    max-width: 560px;
  }

  .tool-reco-track i {
    background: #fff;
    border-radius: inherit;
    display: block;
    height: 100%;
  }

  .tool-reco-btn,
  .tool-primary-action,
  .tool-primary-link {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 999px;
    color: #075932;
    display: inline-flex;
    font-size: 15px;
    font-weight: 850;
    gap: 9px;
    justify-content: center;
    padding: 14px 26px;
  }

  .tool-reco-btn {
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
  }

  :root[data-theme="dark"] .tool-reco {
    background: linear-gradient(142deg, #063b25, #0a6e3b);
    border: 1px solid rgba(154, 240, 194, .22);
    box-shadow: 0 18px 46px rgba(0,0,0,.42);
  }

  .tool-primary-action,
  .tool-primary-link {
    background: var(--app-green-700);
    color: #fff;
  }

  .tool-alt-head {
    margin: 2px 0 -4px;
  }

  .tool-alt-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-alt-card {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    color: var(--app-ink);
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 162px;
    padding: 18px;
    text-align: left;
    transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
  }

  .tool-alt-card:hover:not(:disabled) {
    border-color: var(--app-green-100);
    box-shadow: var(--app-shadow-md);
    transform: translateY(-3px);
  }

  .tool-alt-card:disabled {
    cursor: not-allowed;
    opacity: .62;
  }

  .tool-alt-icon {
    align-items: center;
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 11px;
    color: var(--app-green-700);
    display: grid;
    height: 40px;
    justify-content: center;
    margin-bottom: 7px;
    width: 40px;
  }

  .tool-alt-icon svg {
    height: 19px;
    width: 19px;
  }

  .tool-alt-card strong {
    color: var(--app-ink);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
  }

  .tool-alt-card em {
    color: var(--app-green-700);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    margin-top: 2px;
  }

  .tool-lower {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
    margin-top: 2px;
  }

  .tool-side-panels {
    display: grid;
    gap: 16px;
  }

  .tool-panel,
  .tool-card {
    padding: 20px;
  }

  .tool-panel-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
  }

  .tool-panel-head h3 {
    color: var(--app-ink);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
  }

  .tool-panel-head button {
    background: transparent;
    border: 0;
    color: var(--app-green-700);
    font-size: 12.5px;
    font-weight: 700;
    min-height: 40px;
    padding: 8px 10px;
  }

  .tool-mastery-row {
    align-items: center;
    display: flex;
    gap: 12px;
    margin: 11px 0;
  }

  .tool-mastery-badge {
    align-items: center;
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 7px;
    color: var(--app-green-900);
    display: grid;
    flex: none;
    font-size: 10.5px;
    font-weight: 900;
    height: 26px;
    justify-content: center;
    min-width: 42px;
    padding: 0 8px;
  }

  .tool-mastery-row.kv .tool-mastery-badge {
    background: var(--app-amber-50);
    border-color: color-mix(in srgb, var(--app-amber) 35%, var(--app-line));
    color: var(--app-amber-700);
  }

  .tool-mastery-track {
    flex: 1;
    height: 9px;
  }

  .tool-mastery-row.kv .tool-mastery-track i {
    background: linear-gradient(90deg, #f6b73c, var(--app-amber));
  }

  .tool-mastery-pct {
    color: var(--app-ink-2);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    width: 38px;
  }

  .tool-empty-panel {
    background: var(--app-bg-soft);
    border: 1px dashed var(--app-line);
    border-radius: 12px;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 650;
    padding: 16px;
  }

  .tool-heat {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 12px;
    max-width: 270px;
  }

  .tool-heat-cell {
    background: var(--app-bg-tint);
    border-radius: 3px;
    display: inline-block;
    height: 13px;
    width: 13px;
  }

  .tool-heat-cell.l1 { background: #bfe6cd; }
  .tool-heat-cell.l2 { background: #7fd0a1; }
  .tool-heat-cell.l3 { background: #3cb878; }
  .tool-heat-cell.l4 { background: var(--app-green-700); }

  .tool-heat-legend {
    align-items: center;
    color: var(--app-muted);
    display: flex;
    font-size: 11.5px;
    font-weight: 600;
    gap: 6px;
  }

  .tool-goal-big {
    color: var(--app-green-700);
    font-size: 32px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1;
  }

  .tool-goal-sub {
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0 12px;
  }

  .tool-goal-line {
    color: var(--app-ink-2);
    display: flex;
    font-size: 12px;
    font-weight: 700;
    justify-content: space-between;
    margin-bottom: 5px;
  }

  .tool-goal-track {
    height: 9px;
  }

  .tool-goal-note {
    margin: 11px 0 0;
  }

  .tool-section-view {
    gap: 16px;
  }

  .tool-section-hero {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius-lg);
    display: grid;
    gap: 16px;
    grid-template-columns: auto 1fr auto;
    padding: 20px;
  }

  .tool-section-icon {
    align-items: center;
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 14px;
    color: var(--app-green-700);
    display: grid;
    height: 52px;
    justify-content: center;
    width: 52px;
  }

  .tool-section-icon svg {
    height: 24px;
    width: 24px;
  }

  .tool-section-hero h2,
  .tool-card h2,
  .help-card h2,
  .wrongbank-card h2 {
    color: var(--app-ink);
    font-size: 24px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .tool-section-hero p,
  .tool-card p,
  .tool-info-panel p {
    color: var(--app-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
  }

  .tool-info-toggle {
    align-items: center;
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 999px;
    color: var(--app-ink-2);
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    gap: 8px;
    padding: 10px 14px;
  }

  .tool-info-panel {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius);
    padding: 16px;
  }

  .tool-info-panel[hidden] {
    display: none;
  }

  .section-progress-main {
    align-items: baseline;
    display: flex;
    gap: 6px;
    margin: 8px 0 14px;
  }

  .section-progress-main strong {
    color: var(--app-green-700);
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .section-progress-main span {
    color: var(--app-muted);
    font-weight: 750;
  }

  .progress-bar-track,
  .daily-meter-track {
    background: var(--app-bg-tint);
    border-radius: 999px;
    overflow: hidden;
  }

  .progress-bar-track {
    height: 10px;
  }

  .progress-bar-fill,
  .daily-meter-fill {
    background: linear-gradient(90deg, var(--app-green), var(--app-green-700));
    border-radius: inherit;
    height: 100%;
  }

  .progress-bar-fill.kvant {
    background: linear-gradient(90deg, #f6b73c, var(--app-amber));
  }

  .section-stat-row,
  .filter-toggle-grid,
  .question-count-row,
  .section-unlock-row {
    display: grid;
    gap: 12px;
  }

  .section-unlock-row {
    align-items: center;
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .section-unlock-row span {
    align-items: center;
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 999px;
    color: var(--app-green-900);
    display: inline-flex;
    gap: 8px;
    justify-self: start;
    min-width: 0;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 13px;
  }

  .section-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
  }

  .section-stat-row > div {
    background: var(--app-bg-soft);
    border-radius: 12px;
    padding: 14px;
  }

  .section-stat-row span,
  .progress-bar-head,
  .question-count-row > span,
  .plan-label,
  .plan-field span {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .section-stat-row strong {
    color: var(--app-ink);
    display: block;
    font-size: 22px;
    font-weight: 850;
  }

  .filter-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  .filter-toggle,
  .daily-secondary,
  .segmented-count button {
    align-items: center;
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 12px;
    color: var(--app-ink-2);
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
  }

  .filter-toggle.is-selected,
  .segmented-count button.active {
    background: var(--app-green-50);
    border-color: var(--app-green-100);
    color: var(--app-green-900);
  }

  .question-count-row {
    align-items: center;
    grid-template-columns: auto 1fr;
    margin-top: 16px;
  }

  .fixed-lesson-row {
    margin-top: 16px;
  }

  .fixed-lesson-pill {
    align-items: center;
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 16px;
    color: var(--app-green-900);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: space-between;
    padding: 14px 16px;
  }

  .fixed-lesson-pill strong {
    color: inherit;
    font-size: 14px;
    font-weight: 850;
  }

  .fixed-lesson-pill span {
    color: var(--app-ink-2);
    font-size: 13px;
    font-weight: 750;
  }

  .segmented-count {
    background: var(--app-bg-soft);
    border-radius: 12px;
    display: inline-flex;
    gap: 4px;
    justify-self: start;
    padding: 4px;
  }

  .section-start-card {
    background: transparent;
  }

  .section-start-action {
    width: auto;
  }

  .section-lessons-card {
    display: grid;
    gap: 16px;
  }

  .section-lessons-head {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
  }

  .section-lessons-head h3 {
    color: var(--app-ink);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .section-lessons-head p {
    margin-top: 6px;
  }

  .section-lessons-head > span {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 999px;
    color: var(--app-ink-2);
    flex: none;
    font-size: 12px;
    font-weight: 850;
    padding: 8px 12px;
  }

  .section-lesson-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }

  .section-lesson-grid.verbal,
  .section-lesson-grid.kvant {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .section-lesson-card {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 14px;
    color: var(--app-ink);
    cursor: pointer;
    display: grid;
    gap: 7px;
    justify-items: center;
    min-height: 158px;
    padding: 14px 12px;
    position: relative;
    text-align: center;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  }

  .section-lesson-card:hover,
  .section-lesson-card:focus-visible {
    border-color: var(--app-green);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
  }

  .section-lesson-card.kvant:hover,
  .section-lesson-card.kvant:focus-visible {
    border-color: var(--app-amber);
  }

  .section-lesson-card:disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
  }

  .section-lesson-card.done {
    background: var(--app-green-50);
    border-color: var(--app-green-100);
  }

  .section-lesson-card.kvant.done {
    background: var(--app-amber-50);
    border-color: color-mix(in srgb, var(--app-amber) 35%, var(--app-line));
  }

  .section-lesson-card .lesson-ring {
    background:
      conic-gradient(var(--app-green-700) calc(var(--p, 0) * 1%), var(--app-bg-tint) 0);
    color: var(--app-muted);
    font-weight: 850;
    height: 50px;
    width: 50px;
  }

  .section-lesson-card.kvant .lesson-ring {
    background:
      conic-gradient(var(--app-amber) calc(var(--p, 0) * 1%), var(--app-bg-tint) 0);
  }

  .section-lesson-card .lesson-ring::after {
    background: var(--app-bg);
  }

  .section-lesson-card.done .lesson-ring::after {
    background: var(--app-green-50);
  }

  .section-lesson-card.kvant.done .lesson-ring::after {
    background: var(--app-amber-50);
  }

  .section-lesson-card .lesson-ring.full {
    background: var(--app-green-700);
    color: #fff;
  }

  .section-lesson-card.kvant .lesson-ring.full {
    background: var(--app-amber);
  }

  .section-lesson-card .lesson-ring.full span {
    color: #fff;
  }

  .section-lesson-check {
    align-items: center;
    background: var(--app-green-700);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 22px;
  }

  .section-lesson-card.kvant .section-lesson-check {
    background: var(--app-amber);
  }

  .section-lesson-title {
    color: var(--app-ink);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
  }

  .section-lesson-meta,
  .section-lesson-count,
  .section-lesson-review {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
  }

  .section-lesson-review {
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 999px;
    color: var(--app-green-900);
    padding: 5px 8px;
  }

  .section-lesson-card.kvant .section-lesson-review {
    background: var(--app-amber-50);
    border-color: color-mix(in srgb, var(--app-amber) 35%, var(--app-line));
    color: var(--app-amber-700);
  }

  .section-lessons-empty {
    background: var(--app-bg-soft);
    border: 1px dashed var(--app-line);
    border-radius: 12px;
    color: var(--app-muted);
    font-size: 13px;
    font-weight: 750;
    padding: 18px;
    text-align: center;
  }

  .tool-sidebar-scrim {
    display: none;
  }

  .train {
    background: var(--app-bg-tint);
    display: grid;
    gap: 16px;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    padding: 22px;
  }

  .train-top,
  .train-progress,
  .train-stage,
  .train-foot {
    margin: 0 auto;
    max-width: 980px;
    width: 100%;
  }

  .train-top {
    align-items: center;
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 18px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr auto auto;
    padding: 12px;
  }

  .train-exit,
  .train-badge,
  .train-score,
  .train-timer,
  .bm,
  .next-btn {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
  }

  .train-exit,
  .bm {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    color: var(--app-ink-2);
    min-height: 42px;
    padding: 0 14px;
  }

  .train-badge {
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    color: var(--app-green-900);
    justify-self: start;
    min-height: 36px;
    padding: 0 14px;
  }

  .train-score {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    color: var(--app-muted);
    min-height: 36px;
    padding: 0 12px;
  }

  .train-score .ok {
    color: var(--app-green-700);
  }

  .train-score .bad {
    color: var(--app-rose);
  }

  .train-timer {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    color: var(--app-ink-2);
    min-height: 36px;
    padding: 0 12px;
  }

  .train-progress {
    background: color-mix(in srgb, var(--app-bg) 65%, transparent);
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
  }

  .train-progress i {
    background: linear-gradient(90deg, var(--app-green), var(--app-green-700));
    border-radius: inherit;
    display: block;
    height: 100%;
  }

  .train-stage {
    align-items: start;
    display: grid;
  }

  .qcard {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-lg);
    display: grid;
    gap: 18px;
    padding: 26px;
  }

  .q-count,
  .q-lbl,
  .kvant-meta {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .5px;
    text-transform: uppercase;
  }

  .q-word,
  .quiz-card .word.q-word {
    color: var(--app-ink);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .quiz-card .word-row {
    align-items: center;
    border-bottom: 1px solid var(--app-line-soft);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-bottom: 18px;
  }

  .ord-study-head {
    align-items: center;
    border-bottom: 1px solid var(--app-line-soft);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-bottom: 18px;
  }

  .ord-study-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ord-study-detail,
  .ord-study-synonyms,
  .ord-study-note,
  .ord-break-card,
  .ord-complete-card {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 16px;
    color: var(--app-ink-2);
    padding: 16px;
  }

  .ord-study-detail span,
  .ord-study-synonyms > span,
  .ord-break-meter span {
    color: var(--app-muted);
    display: block;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .4px;
    margin-bottom: 6px;
    text-transform: uppercase;
  }

  .ord-study-detail strong {
    color: var(--app-ink);
    display: block;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.25;
  }

  .ord-study-detail.answer {
    background: var(--app-green-50);
    border-color: var(--app-green-100);
  }

  .ord-study-explanation {
    background: color-mix(in srgb, var(--app-green-50) 55%, var(--app-bg));
    border: 1px solid var(--app-green-100);
    border-radius: 16px;
    color: var(--app-ink-2);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.65;
    padding: 18px;
  }

  .ord-study-synonyms div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ord-study-synonyms i {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 999px;
    color: var(--app-ink);
    font-style: normal;
    font-weight: 800;
    padding: 7px 10px;
  }

  .ord-study-note {
    color: var(--app-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
  }

  .ord-break-card,
  .ord-complete-card {
    background: var(--app-bg);
    display: grid;
    gap: 16px;
    text-align: center;
  }

  .ord-break-card h2,
  .ord-complete-card h2 {
    color: var(--app-ink);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
  }

  .ord-break-card p,
  .ord-complete-card p {
    color: var(--app-ink-2);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 620px;
  }

  .ord-break-meter {
    display: grid;
    gap: 8px;
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
  }

  .ord-complete-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .ord-complete-stats span {
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-radius: 999px;
    color: var(--app-green-900);
    font-size: 13px;
    font-weight: 800;
    padding: 9px 13px;
  }

  .quiz-card .options,
  .quiz-card .kvant-options-text,
  .quiz-card .verbal-options-text,
  .quiz-card .kvant-options,
  .quiz-card .verbal-options {
    display: grid;
    gap: 12px;
  }

  .quiz-card .option,
  .quiz-card .kvant-option-text,
  .quiz-card .verbal-option-text,
  .quiz-card .kvant-option,
  .quiz-card .verbal-option {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 14px;
    color: var(--app-ink);
    font-size: 17px;
    font-weight: 750;
    min-height: 60px;
    padding: 16px 18px;
    text-align: left;
  }

  .quiz-card .option:hover:not(:disabled),
  .quiz-card .kvant-option-text:hover:not(:disabled),
  .quiz-card .verbal-option-text:hover:not(:disabled),
  .quiz-card .kvant-option:hover:not(:disabled),
  .quiz-card .verbal-option:hover:not(:disabled) {
    border-color: var(--app-green-100);
    box-shadow: var(--app-shadow-sm);
  }

  .quiz-card .option.correct,
  .quiz-card .kvant-option-text.correct,
  .quiz-card .verbal-option-text.correct,
  .quiz-card .kvant-option.correct,
  .quiz-card .verbal-option.correct {
    background: var(--app-green-50);
    border-color: var(--app-green);
    color: var(--app-green-900);
  }

  .quiz-card .option.wrong,
  .quiz-card .kvant-option-text.wrong,
  .quiz-card .verbal-option-text.wrong,
  .quiz-card .kvant-option.wrong,
  .quiz-card .verbal-option.wrong {
    background: var(--app-rose-50);
    border-color: var(--app-rose);
    color: var(--app-rose);
  }

  .quiz-card .option.dim,
  .quiz-card .kvant-option-text.dim,
  .quiz-card .verbal-option-text.dim,
  .quiz-card .kvant-option.dim,
  .quiz-card .verbal-option.dim {
    opacity: .58;
  }

  .quiz-card .kvant-option-letter,
  .quiz-card .verbal-option-letter {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 8px;
    color: var(--app-muted);
    font-weight: 900;
  }

  .quiz-card .kvant-question,
  .quiz-card .verbal-question,
  .quiz-card .kvant-option-body,
  .quiz-card .verbal-option-body {
    color: var(--app-ink);
    font-size: 19px;
    line-height: 1.55;
  }

  .quiz-card .verbal-passage,
  .quiz-card .kvant-figure-wrap,
  .quiz-card .verbal-page-note {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 14px;
    color: var(--app-ink-2);
    padding: 16px;
  }

  .quiz-card .explanation {
    background: var(--app-green-50);
    border: 1px solid var(--app-green-100);
    border-left: 4px solid var(--app-green);
    border-radius: 14px;
    color: var(--app-ink-2);
    display: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.65;
    padding: 18px;
  }

  .quiz-card .explanation.show {
    display: block;
  }

  .quiz-bookmark-toolbar {
    background: var(--app-bg-soft);
    border: 1px solid var(--app-line);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .quiz-bookmark-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
  }

  .coach-bookmark-toggle,
  .word-audio-btn {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 999px;
    color: var(--app-ink-2);
    font-weight: 800;
    min-height: 40px;
    padding: 0 14px;
  }

  .coach-bookmark-toggle.active {
    background: var(--app-green-50);
    border-color: var(--app-green-100);
    color: var(--app-green-900);
  }

  .coach-note-field textarea {
    background: var(--app-bg);
    border: 1px solid var(--app-line);
    border-radius: 12px;
    color: var(--app-ink);
    min-height: 72px;
    padding: 10px 12px;
  }

  .train-foot {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .next-btn {
    background: var(--app-green-700);
    border: 0;
    color: #fff;
    min-height: 48px;
    padding: 0 24px;
  }

  @media (min-width: 900px) {
    .qcard .options,
    .qcard .kvant-options-text,
    .qcard .verbal-options-text {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 920px) {
    .tool-shell {
      grid-template-columns: 1fr;
    }

    .tool-sidebar {
      box-shadow: var(--app-shadow-lg);
      left: 0;
      max-width: min(320px, 86vw);
      position: fixed;
      transform: translateX(-105%);
      transition: transform .2s ease;
      width: 100%;
    }

    .tool-shell.sidebar-open .tool-sidebar {
      transform: translateX(0);
    }

    .tool-sidebar-scrim {
      background: rgba(4, 12, 7, .34);
      border: 0;
      display: block;
      inset: 0;
      opacity: 0;
      pointer-events: none;
      position: fixed;
      transition: opacity .2s ease;
      z-index: 20;
    }

    .tool-shell.sidebar-open .tool-sidebar-scrim {
      opacity: 1;
      pointer-events: auto;
    }

    .tool-mobile-menu {
      display: inline-flex;
    }

    .tool-stat-row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-alt-grid,
    .tool-onboarding-card,
    .tool-lower {
      grid-template-columns: 1fr;
    }

    .today-hero,
    .today-dashboard-layout,
    .today-command-grid {
      grid-template-columns: 1fr;
    }

    .today-side-rail {
      position: static;
    }

    .today-part-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-topbar,
    .tool-body {
      padding-left: 18px;
      padding-right: 18px;
    }
  }

  @media (max-width: 540px) {
    .tool-topbar {
      align-items: center;
      flex-direction: row;
      gap: 12px;
      justify-content: flex-start;
      margin: 0;
      min-height: 62px;
      padding-bottom: 12px;
      padding-top: 12px;
      position: sticky;
      top: 0;
      z-index: 24;
    }

    .tool-topbar-title {
      display: block;
      min-width: 0;
    }

    .tool-topbar-title h1 {
      font-size: 17px;
    }

    .tool-topbar-title p {
      font-size: 12px;
      max-width: 240px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .tool-topbar-utility {
      display: none;
    }

    .tool-mobile-menu {
      min-height: 44px;
      width: 44px;
    }

    .tool-body {
      padding: 18px 14px 28px;
    }

    .today-hero {
      border-radius: 20px;
      gap: 16px;
      padding: 18px;
    }

    .today-hero-copy h2 {
      font-size: 32px;
    }

    .today-hero-copy p {
      font-size: 14px;
    }

    .today-hero-actions,
    .today-primary-cta,
    .today-secondary-cta {
      width: 100%;
    }

    .today-plan-card,
    .today-reco-card,
    .today-progress-card,
    .today-block,
    .today-rail-card {
      border-radius: 18px;
    }

    .today-reco-card {
      align-items: stretch;
      grid-template-columns: 1fr;
      padding: 18px;
    }

    .today-reco-card .today-primary-cta {
      width: 100%;
    }

    .today-plan-top button,
    .today-block-head button,
    .today-rail-card button {
      min-height: 44px;
    }

    .today-block {
      padding: 18px;
    }

    .today-block-head {
      align-items: stretch;
      flex-direction: column;
      margin-bottom: 14px;
    }

    .today-part-grid {
      grid-template-columns: 1fr;
    }

    .today-part-card {
      min-height: 0;
    }

    .tool-greet {
      align-items: flex-start;
      flex-direction: column;
    }

    .tool-scope,
    .tool-scope button {
      width: 100%;
    }

    .tool-scope {
      display: grid;
    }

    .tool-onboarding-card {
      border-radius: var(--app-radius);
      gap: 16px;
      padding: 18px;
    }

    .tool-onboarding-card .plan-form {
      margin: 0 -2px;
      padding: 14px;
    }

    .tool-plan-strip {
      align-items: stretch;
      display: grid;
    }

    .tool-plan-edit {
      margin-left: 0;
      min-height: 44px;
      width: 100%;
    }

    .tool-stat-row,
    .filter-toggle-grid,
    .section-stat-row,
    .question-count-row,
    .tool-section-hero {
      grid-template-columns: 1fr;
    }

    .tool-section-hero {
      align-items: start;
    }

    .section-lessons-head {
      align-items: flex-start;
      flex-direction: column;
    }

    .section-lesson-grid,
    .section-lesson-grid.verbal,
    .section-lesson-grid.kvant {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .train {
      padding: 12px;
    }

    .train-top {
      grid-template-columns: 1fr 1fr;
    }

    .train-exit,
    .train-badge,
    .train-score,
    .train-timer {
      justify-self: stretch;
      width: 100%;
    }

    .qcard {
      padding: 20px;
    }

    .ord-study-head {
      align-items: flex-start;
      flex-direction: column;
    }

    .ord-study-grid {
      grid-template-columns: 1fr;
    }

    .train-foot {
      gap: 10px;
      flex-direction: column-reverse;
    }

    .bm,
    .next-btn {
      flex: 1;
      width: 100%;
    }
  }

/* Final cascade override for the logged-in mockup shell. */
body.tool-active,
body.training-active,
.train,
#app {
  background: var(--bg);
  color: var(--text);
  padding: 0;
}
body.tool-active .container.tool-layout,
body.training-active .container {
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}
body.tool-active .tool-shell {
  background: var(--bg);
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
}
body.tool-active .tool-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border-soft);
  box-shadow: none;
  gap: 14px;
  padding: 18px 16px;
}
body.tool-active .tool-sidebar-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}
body.tool-active .tool-brand {
  gap: 10px;
  padding: 0 8px 4px;
}
body.tool-active .tool-brand-mark {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--brand);
  height: 34px;
  width: 34px;
}
body.tool-active .tool-brand-icon {
  height: 30px;
  width: 30px;
}
body.tool-active .tool-brand strong {
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 800;
}
body.tool-active .tool-nav {
  display: grid;
  gap: 4px;
}
body.tool-active .tool-nav-group,
body.tool-active .tool-divider,
body.tool-active .tool-nav-heading {
  display: none;
}
body.tool-active .tool-nav-item,
body.tool-active .tool-footer-link {
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 620;
  gap: 11px;
  min-height: 41px;
  padding: 9px 11px;
}
body.tool-active .tool-nav-item:hover,
body.tool-active .tool-footer-link:hover,
body.tool-active .tool-nav-item.active,
body.tool-active .tool-nav-item.active-parent {
  background: var(--brand-soft);
  color: var(--brand);
}
body.tool-active .tool-nav-icon {
  height: 20px;
  width: 20px;
}
body.tool-active .tool-nav-chevron {
  height: 15px;
  margin-left: auto;
  width: 15px;
}
body.tool-active .tool-nav-subtree.open .tool-nav-chevron {
  transform: rotate(180deg);
}
body.tool-active .tool-subnav {
  display: grid;
  gap: 3px;
  margin: 2px 0 6px 10px;
}
body.tool-active .tool-subnav[hidden] {
  display: none;
}
body.tool-active .tool-subnav-item {
  min-height: 34px;
  padding: 7px 9px;
}
body.tool-active .tool-nav-mono {
  background: var(--surface);
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  color: var(--brand);
  font-size: 10px;
  height: 22px;
  width: 32px;
}
body.tool-active .tool-subnav-item.kv .tool-nav-mono {
  background: var(--warm-soft);
  border-color: var(--warm-border);
  color: var(--warm);
}
body.tool-active .tool-nav-badge,
body.tool-active .overview-count-badge {
  background: var(--danger-soft);
  border-radius: 8px;
  color: var(--danger);
  font-size: 12px;
  padding: 2px 7px;
}
body.tool-active .tool-plan-card,
body.tool-active .tool-profile-row {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
body.tool-active .tool-plan-card {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
}
body.tool-active .tool-plan-card-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}
body.tool-active .tool-plan-card-head strong {
  color: var(--text-strong);
  font-size: 14px;
}
body.tool-active .tool-plan-card-head button {
  background: transparent;
  border: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
body.tool-active .tool-plan-card dl {
  display: grid;
  gap: 7px;
}
body.tool-active .tool-plan-card dt {
  color: var(--text-muted);
  font-size: 12px;
}
body.tool-active .tool-plan-card dd {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
}
body.tool-active .tool-plan-progress,
body.tool-active .overview-row-track,
body.tool-active .progress-bar-track {
  background: var(--surface-2);
  border-radius: var(--radius-pill);
}
body.tool-active .tool-plan-progress {
  height: 6px;
}
body.tool-active .plan-progress-wide {
  margin: 0 20px 20px;
}
body.tool-active .tool-plan-progress i,
body.tool-active .overview-row-track i,
body.tool-active .progress-bar-fill {
  background: var(--brand);
  border-radius: inherit;
  display: block;
  height: 100%;
}
body.tool-active .tool-sidebar-footer {
  border-top: 0;
  display: grid;
  gap: 8px;
  padding-top: 12px;
}
body.tool-active .tool-profile-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 10px;
  text-align: left;
}
body.tool-active .tool-avatar {
  background: var(--brand);
  color: var(--text-on-accent);
}
body.tool-active .tool-profile-name {
  color: var(--text-strong);
  font-size: 13px;
}
body.tool-active .tool-profile-email {
  color: var(--text-muted);
  font-size: 12px;
}
body.tool-active .tool-main {
  min-width: 0;
}
body.tool-active .tool-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 1fr) minmax(250px, 420px) auto;
  margin: 0;
  min-height: 76px;
  padding: 13px 32px;
  position: sticky;
  top: 0;
  z-index: 24;
}
body.tool-active .tool-mobile-menu {
  display: none;
}
body.tool-active .tool-topbar-title h1 {
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 800;
}
body.tool-active .tool-topbar-title p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
body.tool-active .tool-search {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 0 12px;
  position: relative;
}
body.tool-active .tool-search input {
  background: transparent;
  border: 0;
  color: var(--text-strong);
  outline: 0;
}
body.tool-active .tool-search kbd {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 2px 7px;
}
body.tool-active .tool-search-results,
body.tool-active .tool-notification-popover {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
body.tool-active .tool-search-results {
  display: grid;
  left: 0;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
}
body.tool-active .tool-search-results[hidden],
body.tool-active .tool-notification-popover[hidden] {
  display: none;
}
body.tool-active .tool-search-result {
  background: transparent;
  border: 0;
  border-radius: 10px;
  display: grid;
  gap: 2px;
  padding: 10px;
  text-align: left;
}
body.tool-active .tool-search-result:hover {
  background: var(--brand-soft);
}
body.tool-active .tool-topbar-utility {
  display: flex;
  gap: 10px;
}
body.tool-active .tool-streak-indicator {
  color: var(--warm);
  font-size: 14px;
  font-weight: 800;
}
body.tool-active .tool-icon-button {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-muted);
  min-height: 44px;
  width: 44px;
}
body.tool-active .tool-icon-button.has-signal::after {
  background: var(--danger);
  border: 2px solid var(--surface);
  border-radius: var(--radius-circle);
  content: "";
  height: 10px;
  position: absolute;
  right: 8px;
  top: 7px;
  width: 10px;
}
body.tool-active .tool-notification-wrap {
  position: relative;
}
body.tool-active .tool-notification-popover {
  display: grid;
  gap: 6px;
  min-width: 280px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
}
body.tool-active .tool-notification-item {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--text-secondary);
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 10px;
  text-align: left;
}
body.tool-active .tool-notification-item:hover {
  background: var(--surface-2);
}
body.tool-active .tool-notification-item span {
  background: var(--brand-soft);
  border-radius: 8px;
  color: var(--brand);
  display: grid;
  grid-row: span 2;
  height: 32px;
  place-items: center;
  width: 32px;
}
body.tool-active .tool-theme-segment {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  display: inline-grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 48px;
  padding: 4px;
}
body.tool-active .tool-theme-segment button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 650;
  min-height: 38px;
  padding: 0 14px;
}
body.tool-active .tool-theme-segment button.active {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--brand);
}
body.tool-active .tool-body {
  padding: 22px 32px 36px;
}
body.tool-active .tool-view {
  max-width: none;
}
body.tool-active .overview-layout {
  display: grid;
  gap: 26px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
}
body.tool-active .overview-main,
body.tool-active .overview-rail,
body.tool-active .app-page-grid {
  display: grid;
  gap: 20px;
  min-width: 0;
}
body.tool-active .overview-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  color: var(--text-strong);
  overflow: hidden;
}
body.tool-active .overview-card-head {
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 20px;
}
body.tool-active .overview-card-head h2,
body.tool-active .overview-side-card h2 {
  color: var(--text-strong);
  font-size: 19px;
  margin: 0;
}
body.tool-active .overview-card-head button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  line-height: 1.2;
  min-height: 36px;
}
body.tool-active .overview-chip {
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  color: var(--brand);
  flex: none;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}
body.tool-active .overview-reco-body {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: 150px minmax(0, 1fr);
  padding: 22px;
}
body.tool-active .overview-ring {
  aspect-ratio: 1;
  background: conic-gradient(var(--success) calc(var(--p, 0) * 1%), var(--surface-2) 0);
  border-radius: var(--radius-circle);
  display: grid;
  place-items: center;
  position: relative;
  width: 140px;
}
body.tool-active .overview-ring::after {
  background: var(--surface);
  border-radius: inherit;
  content: "";
  inset: 13px;
  position: absolute;
}
body.tool-active .overview-ring span {
  display: grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}
body.tool-active .overview-ring strong {
  color: var(--text-strong);
  font-size: 27px;
}
body.tool-active .overview-ring em {
  color: var(--text-muted);
  font-style: normal;
}
body.tool-active .overview-reco-copy {
  display: grid;
  gap: 11px;
  min-width: 0;
}
body.tool-active .overview-reco-copy h3 {
  color: var(--text-strong);
  font-size: 21px;
  margin: 0;
}
body.tool-active .overview-reco-copy p,
body.tool-active .overview-side-card p,
body.tool-active .page-hero-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}
body.tool-active .overview-meta-row,
body.tool-active .overview-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
body.tool-active .overview-meta-row span {
  align-items: center;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 13px;
  gap: 7px;
  white-space: nowrap;
}
body.tool-active .overview-meta-row svg {
  color: var(--text-muted);
  height: 17px;
  width: 17px;
}
body.tool-active .overview-primary,
body.tool-active .overview-secondary {
  align-items: center;
  appearance: none;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  min-height: 42px;
  padding: 0 14px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
body.tool-active .overview-primary {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: var(--text-on-accent);
}
body.tool-active .overview-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
body.tool-active .overview-primary svg,
body.tool-active .overview-secondary svg {
  flex: none;
  height: 17px;
  width: 17px;
}
body.tool-active .overview-progress-row {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(132px, 1fr) 52px minmax(96px, .72fr) 118px 92px 18px;
  font: inherit;
  min-height: 57px;
  padding: 9px 20px;
  text-align: left;
  width: 100%;
}
body.tool-active .overview-progress-row:hover {
  background: var(--surface-2);
}
body.tool-active .overview-row-icon,
body.tool-active .overview-activity-icon {
  background: var(--brand);
  border-radius: 9px;
  color: var(--text-on-accent);
  display: grid;
  flex: none;
  height: 34px;
  place-items: center;
  width: 34px;
}
body.tool-active .overview-row-icon svg,
body.tool-active .overview-activity-icon svg {
  height: 18px;
  width: 18px;
}
body.tool-active .overview-progress-row.kvant .overview-row-icon,
body.tool-active .overview-progress-row.kvant .overview-row-track i {
  background: var(--warm);
}
body.tool-active .overview-row-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}
body.tool-active .overview-row-title strong,
body.tool-active .overview-side-card > strong,
body.tool-active .overview-side-split strong {
  color: var(--text-strong);
  font-size: 14px;
  line-height: 1.2;
}
body.tool-active .overview-row-title em,
body.tool-active .overview-row-count,
body.tool-active .overview-activity-copy em,
body.tool-active .overview-activity-row time {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.25;
}
body.tool-active .overview-row-title em {
  display: block;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.tool-active .overview-row-track {
  display: block;
  height: 7px;
  min-width: 0;
  overflow: hidden;
}
body.tool-active .overview-row-track i {
  border-radius: inherit;
  display: block;
  height: 100%;
}
body.tool-active .overview-row-count {
  white-space: nowrap;
}
body.tool-active .overview-progress-list.compact .overview-progress-row {
  grid-template-columns: 42px minmax(132px, 1fr) 52px minmax(96px, .72fr) 92px 18px;
}
body.tool-active .overview-status {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  padding: 4px 8px;
  white-space: nowrap;
}
body.tool-active .overview-status.good {
  background: var(--success-soft);
  color: var(--success);
}
body.tool-active .overview-status.warn {
  background: var(--warning-soft);
  color: var(--warm);
}
body.tool-active .overview-status.low {
  background: var(--danger-soft);
  color: var(--danger);
}
body.tool-active .overview-activity-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr) 72px 104px 18px;
  min-height: 62px;
  padding: 9px 20px;
  text-align: left;
  width: 100%;
}
body.tool-active .overview-empty {
  color: var(--text-muted);
  padding: 22px;
}
body.tool-active .overview-rail {
  align-content: start;
  display: grid;
  gap: 20px;
  position: sticky;
  top: 98px;
}
body.tool-active .overview-side-card {
  align-content: start;
  display: grid;
  gap: 13px;
  padding: 18px;
}
body.tool-active .overview-side-title,
body.tool-active .overview-streak-main,
body.tool-active .overview-upcoming-row {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}
body.tool-active .overview-side-title {
  justify-content: space-between;
}
body.tool-active .overview-streak-main svg {
  color: var(--warm);
  flex: none;
  height: 24px;
  width: 24px;
}
body.tool-active .overview-streak-main span,
body.tool-active .overview-upcoming-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
body.tool-active .overview-streak-main em,
body.tool-active .overview-upcoming-row em {
  color: var(--text-muted);
  display: block;
  font-style: normal;
  line-height: 1.35;
}
body.tool-active .overview-upcoming-row > svg {
  color: var(--text-muted);
  flex: none;
  height: 20px;
  width: 20px;
}
body.tool-active .overview-side-card button {
  align-items: center;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  text-align: center;
  width: 100%;
}
body.tool-active .overview-side-card button svg {
  flex: none;
  height: 17px;
  width: 17px;
}
body.tool-active .overview-side-split {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
}
body.tool-active .overview-side-split > span {
  background: var(--brand-soft);
  border-radius: var(--radius-circle);
  color: var(--brand);
  display: grid;
  height: 56px;
  place-items: center;
  width: 56px;
}
body.tool-active .overview-side-split > span svg {
  height: 24px;
  width: 24px;
}
body.tool-active .overview-week {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
body.tool-active .overview-week div {
  color: var(--text-muted);
  display: grid;
  font-size: 12px;
  gap: 4px;
  justify-items: center;
}
body.tool-active .overview-week i {
  color: var(--text-muted);
  display: grid;
  font-style: normal;
  height: 18px;
  place-items: center;
  width: 18px;
}
body.tool-active .overview-week .active i {
  color: var(--success);
}
body.tool-active .page-hero-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 24px;
}
body.tool-active .page-card-grid,
body.tool-active .page-metric-grid {
  display: grid;
  gap: 16px;
}
body.tool-active .page-card-grid.three,
body.tool-active .page-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.tool-active .page-card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.tool-active .page-card-grid.quiz-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
body.tool-active .quick-quiz-card {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: start;
  min-height: 150px;
  padding: 18px;
  text-align: left;
}
body.tool-active .quick-quiz-card:hover {
  background: var(--surface-2);
}
body.tool-active .notes-list {
  display: grid;
}
body.tool-active .note-row {
  border-bottom: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 20px;
}
@media (max-width: 1180px) {
  body.tool-active .tool-topbar {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  }
  body.tool-active .tool-topbar-utility {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  body.tool-active .overview-layout {
    grid-template-columns: 1fr;
  }
  body.tool-active .overview-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }
}
@media (max-width: 920px) {
  body.tool-active .tool-shell {
    grid-template-columns: 1fr;
  }
  body.tool-active .tool-sidebar {
    left: 0;
    max-width: min(320px, 86vw);
    position: fixed;
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: 100%;
  }
  body.tool-active .tool-shell.sidebar-open .tool-sidebar {
    transform: translateX(0);
  }
  body.tool-active .tool-mobile-menu {
    display: inline-flex;
  }
  body.tool-active .tool-topbar {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px 18px;
  }
  body.tool-active .tool-search,
  body.tool-active .tool-topbar-utility {
    grid-column: 1 / -1;
  }
  body.tool-active .overview-progress-row {
    grid-template-columns: 42px minmax(0, 1fr) 52px;
  }
  body.tool-active .overview-row-track,
  body.tool-active .overview-row-count,
  body.tool-active .overview-status,
  body.tool-active .overview-row-chevron {
    display: none;
  }
  body.tool-active .overview-rail,
  body.tool-active .page-card-grid.three,
  body.tool-active .page-card-grid.two,
  body.tool-active .page-card-grid.quiz-grid,
  body.tool-active .page-metric-grid {
    grid-template-columns: 1fr;
  }
  body.tool-active .page-hero-card {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  body.tool-active .tool-topbar-title h1 {
    font-size: 17px;
  }
  body.tool-active .tool-topbar-title p {
    max-width: none;
    white-space: normal;
  }
  body.tool-active .tool-topbar-utility {
    display: flex;
    flex-wrap: wrap;
  }
  body.tool-active .tool-theme-segment {
    width: 100%;
  }
  body.tool-active .overview-reco-body {
    grid-template-columns: 1fr;
  }
  body.tool-active .overview-actions,
  body.tool-active .overview-primary,
  body.tool-active .overview-secondary {
    width: 100%;
  }
}

/* Simple green app shell restored from the focused HP-plugg product design. */
body.tool-active,
body.training-active,
.train,
#app {
  --brand: #15b364;
  --brand-hover: #0c8f4c;
  --brand-soft: #e5f6ed;
  --brand-border: #c9ecd9;
  --accent: #078a49;
  --accent-border: #c9ecd9;
  --section-verbal-soft: #c9ecd9;
  --app-ink: var(--text-strong);
  --app-ink-2: #40554b;
  --app-muted: #60746b;
  --app-green: #15b364;
  --app-green-700: #078a49;
  --app-green-900: #006c3a;
  --app-green-50: #e5f6ed;
  --app-green-100: #c9ecd9;
  --app-bg: var(--surface);
  --app-bg-soft: #f3f7f3;
  --app-bg-tint: #eef5f0;
  --app-line: #dfe8e1;
  --app-line-soft: #e7eee8;
  --app-amber: #f59e0b;
  --app-amber-50: #fff7e6;
  --app-amber-700: #b86b00;
  background: var(--app-bg-tint);
  color: var(--app-ink);
}

:root[data-theme="dark"] body.tool-active,
:root[data-theme="dark"] body.training-active,
:root[data-theme="dark"] .train,
:root[data-theme="dark"] #app {
  --brand: #30d27c;
  --brand-hover: #54e493;
  --brand-soft: rgba(48, 210, 124, .16);
  --brand-border: rgba(48, 210, 124, .28);
  --accent: #30d27c;
  --accent-border: rgba(48, 210, 124, .28);
  --section-verbal-soft: rgba(48, 210, 124, .28);
  --app-ink: var(--text-strong);
  --app-ink-2: var(--text-secondary);
  --app-muted: var(--text-muted);
  --app-green: #30d27c;
  --app-green-700: #30d27c;
  --app-green-900: #54e493;
  --app-green-50: rgba(48, 210, 124, .16);
  --app-green-100: rgba(48, 210, 124, .28);
  --app-bg: var(--surface);
  --app-bg-soft: var(--bg);
  --app-bg-tint: var(--surface-2);
  --app-line: var(--border);
  --app-line-soft: var(--border-soft);
  --app-amber-50: rgba(245, 158, 11, .14);
}

body.training-active {
  background: var(--app-bg-tint);
  color: var(--app-ink);
}

.train {
  background:
    radial-gradient(circle at 14% 0%, color-mix(in srgb, var(--app-green-50) 72%, transparent), transparent 34%),
    var(--app-bg-tint);
}

.train .section-tab.active,
.train .section-tab.active.ord,
.train .section-tab.active.verbal,
.train .section-tab.active.kvant,
.train .verbal-subtab.active,
.train .verbal-subtab.ord.active,
#app .section-tab.active,
#app .section-tab.active.ord,
#app .section-tab.active.verbal,
#app .section-tab.active.kvant,
#app .verbal-subtab.active,
#app .verbal-subtab.ord.active {
  color: var(--app-green-900);
}

.train .section-tab.active,
.train .verbal-subtab.active,
#app .section-tab.active,
#app .verbal-subtab.active {
  background: var(--app-bg);
  box-shadow: inset 0 0 0 1px var(--app-green-100);
}

.train .theme-toggle:hover,
.train .logout-btn:hover,
#app .theme-toggle:hover,
#app .logout-btn:hover {
  border-color: var(--app-green-100);
  color: var(--app-green-900);
}

body.tool-active .tool-shell {
  background: linear-gradient(180deg, var(--app-bg-tint), var(--app-bg-soft));
  grid-template-columns: 320px minmax(0, 1fr);
}

body.tool-active .tool-sidebar {
  background: color-mix(in srgb, var(--app-bg) 92%, var(--app-bg-soft));
  border-right: 1px solid var(--app-line);
  box-shadow: none;
  gap: 18px;
  padding: 28px 18px 22px;
}

body.tool-active .tool-sidebar-main {
  display: block;
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
}

body.tool-active .tool-brand {
  align-items: center;
  gap: 12px;
  padding: 0 10px 20px;
}

body.tool-active .tool-brand-mark {
  background: linear-gradient(145deg, var(--app-green), var(--app-green-900));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(5, 126, 67, .18);
  color: #fff;
  display: grid;
  font-size: 15px;
  font-weight: 900;
  height: 48px;
  place-items: center;
  width: 48px;
}

body.tool-active .tool-brand strong {
  color: var(--app-ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.05;
}

body.tool-active .tool-brand small {
  color: var(--app-ink-2);
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-top: 2px;
}

body.tool-active .tool-nav {
  border-top: 1px solid var(--app-line-soft);
  display: grid;
  gap: 22px;
  padding-top: 20px;
}

body.tool-active .tool-nav-group {
  display: grid;
  gap: 6px;
  margin: 0;
}

body.tool-active .tool-nav-heading {
  color: var(--app-muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .7px;
  padding: 0 12px 5px;
  text-transform: uppercase;
}

body.tool-active .tool-nav-item,
body.tool-active .tool-footer-link {
  border-radius: 12px;
  color: var(--app-ink-2);
  font-size: 16px;
  font-weight: 760;
  gap: 12px;
  min-height: 50px;
  padding: 11px 12px;
}

body.tool-active .tool-nav-item:hover,
body.tool-active .tool-footer-link:hover,
body.tool-active .tool-nav-item.active {
  background: var(--app-green-50);
  color: var(--app-green-900);
}

body.tool-active .tool-nav-icon,
body.tool-active .tool-footer-link svg {
  height: 21px;
  width: 21px;
}

body.tool-active .tool-nav-mono {
  background: var(--app-green-50);
  border: 1px solid var(--app-green-100);
  border-radius: 7px;
  color: var(--app-green-900);
  font-size: 11px;
  height: 28px;
  width: 36px;
}

body.tool-active .tool-nav-item.kv .tool-nav-mono {
  background: var(--app-amber-50);
  border-color: color-mix(in srgb, var(--app-amber) 42%, var(--app-line));
  color: var(--app-amber-700);
}

body.tool-active .tool-nav-badge {
  background: var(--app-amber-50);
  color: var(--app-amber-700);
}

body.tool-active .tool-sidebar-footer {
  border-top: 1px solid var(--app-line-soft);
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}

body.tool-active .tool-profile-row {
  background: transparent;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  display: flex;
  min-height: 58px;
  padding: 8px 10px;
}

body.tool-active .tool-avatar {
  background: var(--app-green-100);
  color: var(--app-green-900);
  height: 42px;
  width: 42px;
}

body.tool-active .tool-profile-name {
  color: var(--app-ink);
  font-size: 15px;
}

body.tool-active .tool-profile-email {
  color: var(--app-muted);
  font-size: 13px;
}

body.tool-active .tool-footer-link.danger {
  color: var(--danger);
}

body.tool-active .tool-main {
  background: transparent;
  min-width: 0;
}

body.tool-active .tool-topbar {
  align-items: center;
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-left: 0;
  border-radius: 0 0 48px 48px;
  box-shadow: 0 22px 48px rgba(47, 82, 61, .12);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0;
  min-height: 100px;
  padding: 24px 34px;
  position: static;
}

:root[data-theme="dark"] body.tool-active .tool-topbar {
  box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
}

body.tool-active .tool-topbar-title h1 {
  color: var(--app-ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

body.tool-active .tool-topbar-title p {
  color: var(--app-ink-2);
  font-size: 15px;
  font-weight: 700;
  margin-top: 4px;
}

body.tool-active .tool-topbar-utility {
  display: flex;
  flex: none;
  gap: 12px;
}

body.tool-active .tool-ghost-button,
body.tool-active .tool-icon-button {
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: 14px;
  color: var(--app-ink-2);
  font-size: 15px;
  font-weight: 800;
  min-height: 48px;
}

body.tool-active .tool-ghost-button {
  padding: 0 18px;
}

body.tool-active .tool-icon-button {
  position: relative;
  width: 48px;
}

body.tool-active .tool-ghost-button:hover,
body.tool-active .tool-icon-button:hover {
  background: var(--app-green-50);
  color: var(--app-green-900);
}

body.tool-active .tool-body {
  padding: 52px 34px 42px;
}

body.tool-active .tool-view {
  display: grid;
  gap: 20px;
  margin: 0 auto;
  max-width: 1480px;
  width: 100%;
}

body.tool-active .tool-greet {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

body.tool-active .tool-greet h2 {
  color: var(--app-ink);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
}

body.tool-active .tool-greet p {
  color: var(--app-ink-2);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

body.tool-active .tool-streak-chip {
  align-items: center;
  background: var(--app-amber-50);
  border: 1px solid color-mix(in srgb, var(--app-amber) 35%, var(--app-line));
  border-radius: 999px;
  color: var(--app-amber-700);
  display: inline-flex;
  flex: none;
  font-size: 16px;
  font-weight: 850;
  gap: 8px;
  padding: 12px 20px;
}

body.tool-active .tool-scope-row {
  align-items: center;
  display: flex;
  gap: 18px;
}

body.tool-active .tool-scope {
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(39, 73, 54, .08);
  display: inline-flex;
  gap: 6px;
  padding: 6px;
}

body.tool-active .tool-scope button {
  border-radius: 12px;
  font-size: 15px;
  font-weight: 850;
  min-height: 48px;
  padding: 0 20px;
}

body.tool-active .tool-scope button.active {
  background: var(--app-green-50);
  color: var(--app-green-900);
}

body.tool-active .tool-scope-cap {
  color: var(--app-ink-2);
  font-size: 15px;
  font-weight: 700;
  max-width: 520px;
}

body.tool-active .tool-stat-row {
  gap: 16px;
}

body.tool-active .tool-stat,
body.tool-active .tool-card,
body.tool-active .tool-panel,
body.tool-active .tool-alt-card {
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: 18px;
  box-shadow: none;
}

body.tool-active .tool-stat {
  min-height: 150px;
  padding: 22px;
}

body.tool-active .tool-stat-label,
body.tool-active .tool-section-label,
body.tool-active .tool-alt-head,
body.tool-active .tool-reco-tag {
  color: var(--app-muted);
  font-size: 13px;
  letter-spacing: .45px;
}

body.tool-active .tool-stat-value {
  color: var(--app-ink);
  font-size: 32px;
}

body.tool-active .tool-stat-value.green,
body.tool-active .tool-goal-big {
  color: var(--app-green-700);
}

body.tool-active .tool-reco {
  background:
    radial-gradient(circle at 86% 8%, rgba(255, 255, 255, .24), transparent 28%),
    linear-gradient(142deg, var(--app-green-900), var(--app-green-700) 72%, var(--app-green));
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 52px rgba(5, 126, 67, .28);
  min-height: 314px;
  padding: 34px;
}

body.tool-active .tool-reco h3 {
  font-size: 30px;
}

body.tool-active .tool-reco p {
  font-size: 17px;
}

body.tool-active .tool-reco-btn {
  min-height: 64px;
  min-width: 184px;
}

body.tool-active .tool-alt-grid {
  gap: 18px;
}

body.tool-active .tool-alt-card {
  min-height: 180px;
  padding: 24px;
}

body.tool-active .tool-lower {
  gap: 20px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
}

body.tool-active .tool-panel,
body.tool-active .tool-card {
  padding: 24px;
}

body.tool-active .tool-section-hero,
body.tool-active .tool-section-view .tool-card {
  border-radius: 20px;
}

body.tool-active .tool-search,
body.tool-active .tool-streak-indicator,
body.tool-active .tool-notification-wrap,
body.tool-active .tool-theme-segment {
  display: none;
}

body.tool-active .generated-exam-view {
  gap: 18px;
}

body.tool-active .generated-exam-hero {
  align-items: end;
}

body.tool-active .generated-exam-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

body.tool-active .generated-exam-status {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr);
  padding: 18px 20px;
}

body.tool-active .generated-exam-status > div:first-child {
  display: grid;
  gap: 3px;
}

body.tool-active .generated-exam-status strong {
  color: var(--app-ink);
  font-size: 18px;
  line-height: 1.2;
}

body.tool-active .generated-exam-status span {
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 750;
}

body.tool-active .generated-exam-list {
  display: grid;
  gap: 14px;
}

body.tool-active .generated-exam-question {
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: 14px;
  display: grid;
  gap: 16px;
  padding: 20px;
}

body.tool-active .generated-exam-question.missing {
  border-color: color-mix(in srgb, var(--app-amber) 64%, var(--app-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-amber-50) 74%, transparent);
}

body.tool-active .generated-exam-question.correct {
  border-color: var(--app-green-100);
}

body.tool-active .generated-exam-question.wrong {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--app-line));
}

body.tool-active .generated-question-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

body.tool-active .generated-question-head span,
body.tool-active .generated-question-head strong {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .28px;
  line-height: 1;
  padding: 7px 9px;
  text-transform: uppercase;
}

body.tool-active .generated-question-head span {
  background: var(--app-green-50);
  color: var(--app-green-900);
}

body.tool-active .generated-question-head strong.ok {
  background: var(--success-soft);
  color: var(--success);
}

body.tool-active .generated-question-head strong.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

body.tool-active .generated-question-head strong.warn {
  background: var(--app-amber-50);
  color: var(--app-amber-700);
}

body.tool-active .generated-exam-question h3 {
  color: var(--app-ink);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
  overflow-wrap: anywhere;
}

body.tool-active .generated-exam-options {
  display: grid;
  gap: 9px;
}

body.tool-active .generated-exam-options button {
  align-items: center;
  appearance: none;
  background: var(--app-bg-soft);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  color: var(--app-ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 16px;
  font-weight: 760;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  line-height: 1.25;
  min-height: 52px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  width: 100%;
}

body.tool-active .generated-exam-options button:hover:not(:disabled),
body.tool-active .generated-exam-options button.selected {
  background: var(--app-green-50);
  border-color: var(--app-green-100);
  color: var(--app-green-900);
}

body.tool-active .generated-exam-options button span {
  align-items: center;
  background: var(--app-bg);
  border: 1px solid var(--app-line);
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

body.tool-active .generated-exam-options button.correct {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

body.tool-active .generated-exam-options button.wrong {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

body.tool-active .generated-exam-options button.dim {
  opacity: .46;
}

body.tool-active .generated-exam-options button:disabled {
  cursor: default;
}

body.tool-active .generated-exam-explanation {
  background: var(--app-bg-soft);
  border: 1px solid var(--app-line-soft);
  border-radius: 12px;
  color: var(--app-ink-2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  padding: 14px;
}

body.tool-active .generated-exam-history {
  display: grid;
}

body.tool-active .generated-history-list {
  display: grid;
}

body.tool-active .generated-history-row {
  align-items: center;
  border-top: 1px solid var(--app-line-soft);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 12px 20px;
}

body.tool-active .generated-history-row:first-child {
  border-top: 0;
}

body.tool-active .generated-history-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.tool-active .generated-history-row strong,
body.tool-active .generated-history-row b {
  color: var(--app-ink);
  font-size: 15px;
}

body.tool-active .generated-history-row em {
  color: var(--app-muted);
  font-size: 13px;
  font-style: normal;
}

@media (max-width: 1180px) {
  body.tool-active .tool-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  body.tool-active .tool-stat-row,
  body.tool-active .tool-alt-grid,
  body.tool-active .tool-lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.tool-active .tool-lower .tool-panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  body.tool-active .tool-shell {
    grid-template-columns: 1fr;
  }

  body.tool-active .tool-sidebar {
    left: 0;
    max-width: min(320px, 88vw);
    position: fixed;
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: 100%;
  }

  body.tool-active .tool-shell.sidebar-open .tool-sidebar {
    transform: translateX(0);
  }

  body.tool-active .tool-mobile-menu {
    display: inline-flex;
  }

  body.tool-active .tool-topbar {
    border-left: 1px solid var(--app-line);
    border-radius: 0 0 30px 30px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 78px;
    padding: 14px 18px;
  }

  body.tool-active .tool-topbar-title h1 {
    font-size: 20px;
  }

  body.tool-active .tool-topbar-title p {
    font-size: 13px;
  }

  body.tool-active .tool-body {
    padding: 28px 16px 32px;
  }

  body.tool-active .tool-greet,
  body.tool-active .tool-scope-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.tool-active .tool-stat-row,
  body.tool-active .tool-alt-grid,
  body.tool-active .tool-lower,
  body.tool-active .tool-side-panels {
    grid-template-columns: 1fr;
  }

  body.tool-active .generated-exam-hero,
  body.tool-active .generated-exam-status {
    grid-template-columns: 1fr;
  }

  body.tool-active .generated-exam-actions {
    justify-content: stretch;
  }

  body.tool-active .generated-exam-actions .overview-primary,
  body.tool-active .generated-exam-actions .overview-secondary {
    width: 100%;
  }
}

@media (max-width: 540px) {
  body.tool-active .tool-topbar-utility {
    gap: 8px;
  }

  body.tool-active .tool-ghost-button {
    padding: 0 12px;
  }

  body.tool-active .tool-greet h2 {
    font-size: 25px;
  }

  body.tool-active .tool-scope {
    align-items: stretch;
    flex-direction: column;
  }

  body.tool-active .generated-exam-question {
    padding: 16px;
  }

  body.tool-active .generated-question-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.tool-active .generated-exam-question h3 {
    font-size: 24px;
  }

  body.tool-active .generated-exam-options button {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 50px;
    padding: 9px 12px 9px 9px;
  }

  body.tool-active .generated-exam-options button span {
    height: 30px;
    width: 30px;
  }

  body.tool-active .tool-reco {
    border-radius: 22px;
    min-height: 0;
    padding: 24px;
  }

  body.tool-active .tool-reco h3 {
    font-size: 24px;
  }
}
