  :root {
    --bg: #fafafa;
    --paper: #ffffff;
    --surface-2: #f4f4f6;
    --surface-3: #ececef;
    --border: #ececec;
    --border-strong: #e0e0e2;

    --ink: #0a0a0a;
    --ink-2: #2a2a2a;
    --ink-body: #1f1f23;
    --muted: #737378;
    --muted-2: #a3a3a8;

    --accent: #725DFF;
    --accent-50: #f1eeff;
    --accent-100: #e2dcff;
    --accent-200: #c4b8ff;
    --accent-600: #5a45e8;
    --accent-700: #4632c4;
    --accent-glow: rgba(114, 93, 255, 0.18);

    --green: #1aae5b;
    --green-soft: #e3f7eb;
    --yellow: #f5b800;
    --yellow-soft: #fef4d6;
    --orange: #ff7a1a;
    --orange-soft: #fff0e0;
    --red: #ef3b3b;
    --red-soft: #fde4e4;
    --blue: #2a8eff;
    --blue-soft: #e0efff;
    --pink: #ff4d8d;
    --pink-soft: #ffe2ec;
    --teal: #14b8a6;
    --teal-soft: #ccfbf1;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 2px rgba(15, 15, 20, 0.04);
    --shadow: 0 4px 14px rgba(15, 15, 20, 0.05), 0 1px 2px rgba(15, 15, 20, 0.04);
    --shadow-lg: 0 18px 40px -12px rgba(15, 15, 20, 0.12);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    background: var(--bg); color: var(--ink);
    font-family: "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* clip, а не hidden: hidden делает body контейнером прокрутки,
       и липкая шапка перестаёт липнуть */
    overflow-x: clip;
  }
  html { scroll-behavior: smooth; scroll-padding-top: 80px; }
  body::before {
    content: ""; position: fixed; top: -220px; right: -180px;
    width: 620px; height: 620px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none; z-index: 0;
  }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

  /* ============ ШАПКА ============ */
  .topbar {
    position: sticky; top: 0; z-index: 60;
    background: rgba(250, 250, 250, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
  }
  .topbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 12px 32px;
    display: flex; align-items: center; gap: 20px;
  }
  .logo { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
  .logo-mark {
    width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: white;
    display: grid; place-items: center;
    font-family: "Instrument Serif", serif; font-style: italic; font-size: 18px; line-height: 1;
    position: relative; overflow: hidden;
  }
  .logo-mark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--accent) 0%, transparent 60%); opacity: 0.7; }
  .logo-mark span { position: relative; z-index: 1; }

  .nav { display: flex; gap: 2px; font-size: 14px; }
  /* Не только ссылки: пункт без готовой страницы рисуется span'ом. */
  .nav > * { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; transition: all 0.2s; }
  .nav a:hover { color: var(--ink); background: var(--surface-2); }
  .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
  .btn-login { padding: 8px 16px; border-radius: 999px; background: var(--ink); color: white; font-size: 13px; font-weight: 600; }
  .btn-login:hover { background: var(--ink-2); }

  /* ============ КАРКАС ============ */
  .page { max-width: 1280px; margin: 0 auto; padding: 20px 32px 40px; position: relative; z-index: 1; }

  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px;
    transition: all 0.18s; white-space: nowrap;
  }
  .btn-primary { background: white; color: var(--ink); }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
  .btn-dark { background: var(--ink); color: white; }
  .btn-dark:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
  .btn-accent { background: var(--accent); color: white; }
  .btn-accent:hover { background: var(--accent-600); }
  .btn-ghost-light { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
  .btn-ghost-light:hover { background: rgba(255,255,255,0.17); }
  .btn-ghost { background: var(--paper); border: 1px solid var(--border-strong); color: var(--ink-2); }
  .btn-ghost:hover { background: var(--surface-2); }
  .btn-sm { padding: 9px 15px; font-size: 13px; }


  /* ============ ГЕРОЙ (общий: лендинг, соглашение, 404) ============ */
  .hero {
    position: relative; border-radius: var(--radius-xl); padding: 44px 40px 36px;
    background:
      radial-gradient(120% 100% at 0% 0%, rgba(255,255,255,0.16), transparent 52%),
      linear-gradient(135deg, #1a1530 0%, #2a1f55 38%, var(--accent) 100%);
    color: white; overflow: hidden;
  }
  .hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
  .hero::before { width: 420px; height: 420px; right: -110px; top: -150px; background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%); }
  .hero::after { width: 320px; height: 320px; left: 36%; bottom: -180px; background: radial-gradient(circle, rgba(255, 184, 0, 0.26), transparent 70%); }

  .hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 13px 6px 11px; border-radius: 999px;
    background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(10px); font-size: 12px; font-weight: 500; margin-bottom: 22px;
    position: relative;
  }
  .hero h1 {
    font-family: "Instrument Serif", serif; font-weight: 400;
    font-size: clamp(34px, 3.7vw, 52px); line-height: 1.03; letter-spacing: -0.015em;
    margin-bottom: 18px; position: relative;
  }
  .hero h1 em {
    font-style: italic;
    background: linear-gradient(90deg, #ffd966, #ff9eb6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .hero-404 h1, .doc .hero h1 { max-width: 15ch; }
  .hero .lede { max-width: 52ch; color: rgba(255,255,255,0.78); font-size: 16px; line-height: 1.6; margin-bottom: 28px; position: relative; }
  .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 2; }
  .hero-note {
    margin-top: 16px; font-size: 13px; color: rgba(255,255,255,0.58); line-height: 1.5;
    position: relative; display: flex; align-items: flex-start; gap: 8px;
  }
  .hero-note svg { flex: none; margin-top: 2px; }
  .hero-note a { color: white; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 3px; transition: text-decoration-color 0.16s; }
  .hero-note a:hover { text-decoration-color: white; }

  /* ============ ГЕРОЙ ЛЕНДИНГА ============
     Слева обещание и кнопки, справа — витрина из настоящих карточек:
     задача, её решение и конспект по теме. */
  .hero-home { padding: 56px 52px 36px; }
  .hero-grid {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px; align-items: center;
  }
  .hero-main { min-width: 0; }
  .hero-home h1 { font-size: clamp(40px, 4.5vw, 66px); line-height: 1; margin-bottom: 20px; }
  /* Обещание — своей строкой: «Весь банк ФИПИ» не рвётся посередине.
     inline-block, а не block: градиент тянется по ширине текста, а не колонки. */
  .hero-home h1 em { display: inline-block; }
  .pulse {
    width: 7px; height: 7px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 3px rgba(26, 174, 91, 0.25);
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(26, 174, 91, 0.25); }
    50% { box-shadow: 0 0 0 6px rgba(26, 174, 91, 0.08); }
  }

  .hero-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
    margin-top: 44px; padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.14); position: relative; z-index: 2;
  }
  .hero-stats .v { font-family: "Instrument Serif", serif; font-size: 40px; line-height: 1; margin-bottom: 6px; letter-spacing: -0.01em; }
  .hero-stats .l { font-size: 12.5px; color: rgba(255,255,255,0.6); font-weight: 500; }

  /* ---------- витрина ---------- */
  .preview { position: relative; min-width: 0; }
  .pv-card {
    display: block; position: relative; color: var(--ink);
    background: var(--paper); border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -24px rgba(15, 15, 20, 0.6), 0 2px 6px rgba(15, 15, 20, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .pv-card:hover { transform: translateY(-3px); box-shadow: 0 38px 70px -24px rgba(15, 15, 20, 0.7), 0 2px 6px rgba(15, 15, 20, 0.18); }
  .pv-task { padding: 20px 22px 48px; }
  .pv-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
  .pv-num {
    flex: none; width: 30px; height: 30px; border-radius: 9px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #2a1f55, var(--accent)); color: white;
    font-family: "Instrument Serif", serif; font-size: 18px;
  }
  .pv-meta { font-size: 12.5px; color: var(--muted); font-weight: 500; }
  .pv-code {
    margin-left: auto; padding: 3px 8px; border-radius: 6px; background: var(--surface-2);
    font-family: "Geist Mono", monospace; font-size: 11px; color: var(--muted);
  }
  .pv-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
  .pv-text {
    font-size: 13.5px; line-height: 1.55; color: var(--ink-body);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pv-fig {
    margin-top: 12px; padding: 10px; border-radius: var(--radius);
    background: var(--surface-2); text-align: center;
  }
  .pv-fig svg { display: block; width: 100%; height: 138px; }
  .pv-ans {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  }
  .pv-ans .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); }
  .pv-ans .cells { display: flex; gap: 4px; }
  .pv-ans .cells span {
    width: 28px; height: 34px; border-radius: 7px; display: grid; place-items: center;
    border: 1.5px solid var(--green); background: var(--green-soft);
    font-family: "Geist Mono", monospace; font-size: 16px; color: #0d7c3f;
  }
  .pv-ans .ok {
    margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px; background: var(--green-soft);
    font-size: 11.5px; font-weight: 600; color: #0d7c3f;
  }

  /* Две карточки поменьше подложены под низ задачи: решение и конспект. */
  .pv-row {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px;
    margin: -30px 14px 0;
  }
  .pv-row .pv-card { padding: 14px 16px; }
  .pv-h {
    display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-700);
  }
  .pv-sol ol { list-style: none; display: flex; flex-direction: column; gap: 6px; }
  .pv-sol li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  .pv-sol li i {
    flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
    border: 1.5px solid var(--accent-200); color: var(--accent-700);
    font-style: normal; font-family: "Geist Mono", monospace; font-size: 10px;
    transform: translateY(2px);
  }
  .pv-sol li.last i { background: var(--green); border-color: var(--green); color: white; }
  .pv-sol li span {
    min-width: 0; font-family: "Instrument Serif", serif; font-size: 16px; line-height: 1.3; color: var(--ink-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .pv-sol li sub { font-size: 0.7em; }
  .pv-note b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 6px; }
  .pv-note span { display: block; font-family: "Geist Mono", monospace; font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }

  /* ============ СЕКЦИИ ============
     Одинаковый шаг между секциями и одна шапка на всех: метка, заголовок
     с курсивом, подзаголовок. */
  .sec { margin-top: 112px; }
  .sec-head { margin-bottom: 30px; }
  .sec-label {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-700);
  }
  .sec-label::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
  .sec-row { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
  .sec-head h2 { font-size: 36px; font-weight: 600; letter-spacing: -0.028em; line-height: 1.1; }
  .sec-head h2 em {
    font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400;
    font-size: 1.08em; letter-spacing: -0.01em; color: var(--muted);
  }
  .sec-sub { margin-top: 12px; font-size: 15.5px; color: var(--muted); max-width: 66ch; line-height: 1.6; }
  .sec-link {
    margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding-bottom: 4px;
    font-size: 14px; font-weight: 600; color: var(--accent-700);
  }
  .sec-link .mi { transition: transform 0.16s; }
  .sec-link:hover { color: var(--accent); }
  .sec-link:hover .mi { transform: translateX(3px); }

  /* Заголовки старого вида — у соглашения. */
  .section-h { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 52px 0 4px; }
  .section-h h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
  .section-h h2 em { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; color: var(--muted); }
  .section-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; max-width: 66ch; line-height: 1.6; }

  .ic-violet { background: var(--accent-50); color: var(--accent-700); }
  .ic-blue { background: var(--blue-soft); color: #1a6fd0; }
  .ic-green { background: var(--green-soft); color: #0d7c3f; }
  .ic-yellow { background: var(--yellow-soft); color: #916b00; }
  .ic-red { background: var(--red-soft); color: #b62222; }
  .ic-pink { background: var(--pink-soft); color: #c72a63; }
  .ic-teal { background: var(--teal-soft); color: #0d7d72; }
  .ic-orange { background: var(--orange-soft); color: #b7500a; }

  /* ============ БАНК: КАРТОЧКИ ЭКЗАМЕНОВ ============ */
  .exams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .exam-card {
    display: flex; flex-direction: column; min-width: 0;
    padding: 28px 28px 24px; border-radius: var(--radius-xl);
    background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    position: relative; overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }
  .exam-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
  /* Цветной край сверху — единственное, чем карточки отличаются: устроены
     экзамены одинаково, и спорить друг с другом им нечем. */
  .exam-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 140px;
    background: linear-gradient(180deg, var(--accent-50), transparent);
    pointer-events: none;
  }
  .exam-card.ec-oge::before { background: linear-gradient(180deg, var(--blue-soft), transparent); }
  .exam-card.ec-ent::before { background: linear-gradient(180deg, var(--orange-soft), transparent); }
  .exam-card > * { position: relative; }
  .ec-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
  .ec-name { font-family: "Instrument Serif", serif; font-size: 56px; line-height: 0.85; letter-spacing: -0.01em; }
  .ec-name:hover { color: var(--accent-700); }
  .ec-full { font-size: 14px; color: var(--ink-2); font-weight: 500; line-height: 1.35; padding-bottom: 2px; }
  .ec-full span { display: block; font-family: "Geist Mono", monospace; font-size: 11px; font-weight: 400; color: var(--muted-2); margin-top: 3px; }

  .ec-stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper);
    margin-bottom: 22px;
  }
  .ec-stats > div { padding: 13px 16px; font-size: 12px; color: var(--muted); line-height: 1.3; min-width: 0; }
  .ec-stats > div + div { border-left: 1px solid var(--border); }
  .ec-stats b {
    display: block; font-family: "Instrument Serif", serif; font-weight: 400;
    font-size: 30px; line-height: 1.05; color: var(--ink); margin-bottom: 2px; white-space: nowrap;
  }

  .ec-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--muted-2); margin-bottom: 8px;
  }
  .ec-subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; margin-bottom: 20px; }
  .ec-subj {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding: 7px 8px; margin: 0 -8px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: background 0.16s, color 0.16s;
  }
  .ec-subj:hover { background: var(--surface-2); color: var(--accent-700); }
  .ec-subj .ic {
    flex: none; width: 28px; height: 28px; border-radius: 8px;
    display: grid; place-items: center; font-size: 11px; font-weight: 700;
  }
  .ec-subj .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ec-subj .n { margin-left: auto; font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--muted-2); }
  .ec-subj .go { width: 0; opacity: 0; color: var(--accent-700); transition: width 0.16s, opacity 0.16s; }
  .ec-subj:hover .go { width: 1em; opacity: 1; }
  .ec-foot { margin-top: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .ec-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent-700); }
  .ec-more:hover { color: var(--accent); }

  /* ============ ВЁРСТКА: БЫЛО / СТАЛО ============ */
  .ba {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px; align-items: stretch;
  }
  .ba-side {
    display: flex; flex-direction: column; min-width: 0;
    border-radius: var(--radius-xl); background: var(--paper);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
  }
  .ba-after { box-shadow: var(--shadow-lg); border-color: var(--accent-100); }
  .ba-side figcaption {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--ink-2);
  }
  .ba-side figcaption code {
    margin-left: auto; font-family: "Geist Mono", monospace; font-size: 11.5px; font-weight: 500;
    padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted);
  }
  .ba-side figcaption a {
    margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; color: var(--accent-700);
  }
  .ba-side figcaption a .mi { transition: transform 0.16s; }
  .ba-side figcaption a:hover { color: var(--accent); }
  .ba-side figcaption a:hover .mi { transform: translateX(3px); }
  .ba-tag {
    padding: 3px 10px; border-radius: 999px; background: var(--surface-2);
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  }
  .ba-tag.on { background: var(--accent-50); color: var(--accent-700); }
  .ba-body { flex: 1; min-width: 0; padding: 22px 24px 24px; }
  /* Оригинал короче нашей вёрстки: держим его посередине, а пояснение — внизу,
     чтобы под ним не оставалось пустого поля. */
  .ba-before .ba-body { display: flex; flex-direction: column; justify-content: center; gap: 14px; background: var(--surface-2); }

  /* Разметка банка как есть: шрифт Word, таблицы, жёлтая заливка. Своего
     оформления ей не даём — сравнение затем и нужно. Ограничиваем только
     ширину, чтобы width="100%" на вложенных таблицах не распирал колонку. */
  .ba-fipi {
    overflow-x: auto; padding: 14px; background: white;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font: 13px/1.5 Arial, Helvetica, sans-serif; color: var(--ink-body);
  }
  .ba-fipi img { max-width: 100%; height: auto; }
  .ba-fipi p { margin: 0 0 8px; }
  .ba-fipi table { border-collapse: separate; max-width: 100%; }
  .ba-note { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
  .ba-note .mi { flex: none; margin-top: 2px; color: var(--muted-2); }

  .ba-arrow { align-self: center; }
  .ba-arrow .mi {
    width: 44px; height: 44px; padding: 12px; border-radius: 50%;
    background: var(--ink); color: white; box-shadow: var(--shadow-lg);
  }

  .ba-meta { font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--muted-2); margin-bottom: 6px; }
  .ba-after h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 12px; }

  /* Условие — теми же правилами, что на странице задачи (task.css), но
     только нужной частью: лендинг не тянет стили всей страницы задачи. */
  .statement { font-size: 16px; line-height: 1.62; color: var(--ink-body); }
  .statement p + p { margin-top: 12px; }
  .figure {
    margin: 18px 0 0; padding: 20px 16px 12px;
    background: var(--surface-2); border-radius: var(--radius);
    text-align: center; overflow-x: auto;
  }
  .figure svg { max-width: 100%; height: auto; }
  .figure .caption, .illus figcaption {
    display: block; margin-top: 8px;
    font-family: "Geist Mono", monospace; font-size: 11px; color: var(--muted-2);
  }
  .illus { margin: 18px 0 0; text-align: center; }
  .illus img { max-width: 100%; max-height: 360px; width: auto; height: auto; border-radius: calc(var(--radius) - 4px); }
  .illus .zoom { display: inline-block; max-width: 100%; }
  .illus .origin { display: none; }
  .answer-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

  .points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
  .point {
    display: flex; gap: 12px; align-items: flex-start; min-width: 0;
    padding: 18px 18px 18px 16px; border-radius: var(--radius-lg);
    background: var(--paper); border: 1px solid var(--border);
  }
  .point > .mi {
    width: 34px; height: 34px; padding: 8px; border-radius: 10px;
    background: var(--accent-50); color: var(--accent-700);
  }
  .point b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
  .point p { font-size: 13px; color: var(--muted); line-height: 1.5; }

  /* ============ ОТВЕТЫ И РЕШЕНИЯ ============ */
  .answers { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
  .solve {
    min-width: 0; padding: 24px 26px 22px; border-radius: var(--radius-xl);
    background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .sv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
  .sv-num {
    flex: none; width: 44px; height: 44px; border-radius: 13px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #2a1f55, var(--accent)); color: white;
    font-family: "Instrument Serif", serif; font-size: 24px;
  }
  .sv-head b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
  .sv-head span { font-size: 12.5px; color: var(--muted); }

  .sv-answer {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 16px 20px; border-radius: var(--radius-lg);
    background: var(--green-soft); margin-bottom: 22px;
  }
  .sv-answer .lbl {
    font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
    color: #0d7c3f; margin-bottom: 2px;
  }
  .sv-answer .big { font-family: "Instrument Serif", serif; font-size: 46px; line-height: 1; color: #0d7c3f; }
  .sv-key {
    margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: 999px; background: var(--paper);
    font-size: 12px; font-weight: 600; color: #0d7c3f;
  }

  .sv-steps { position: relative; padding-left: 40px; }
  .sv-steps::before {
    content: ""; position: absolute; left: 13px; top: 6px; bottom: 30px; width: 2px;
    background: linear-gradient(var(--accent-200), var(--border));
  }
  .sv-step { position: relative; padding-bottom: 18px; }
  .sv-step .dot {
    position: absolute; left: -40px; top: -1px;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--paper); border: 2px solid var(--accent-200); color: var(--accent-700);
    display: grid; place-items: center;
    font-family: "Geist Mono", monospace; font-size: 12px; font-weight: 500;
  }
  .sv-step p { font-size: 14.5px; line-height: 1.6; color: var(--ink-body); }
  .fx {
    display: block; margin: 10px 0 0; padding: 12px 14px;
    background: var(--surface-2); border-radius: var(--radius);
    border-left: 3px solid var(--accent-200); text-align: center; overflow-x: auto;
  }
  .fx .katex-display { margin: 0; }
  .sv-rest {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius);
    border: 1px dashed var(--border-strong); font-size: 13px; color: var(--muted);
    transition: border-color 0.16s, color 0.16s, background 0.16s;
  }
  .sv-rest::before {
    content: ""; position: absolute; left: -33px; top: 50%; margin-top: -7px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--paper); border: 2px dashed var(--border-strong);
  }
  .sv-rest .mi { transition: transform 0.16s; }
  .sv-rest:hover { border-color: var(--accent-200); color: var(--accent-700); background: var(--accent-50); }
  .sv-rest:hover .mi { transform: translateX(3px); }
  .sv-foot {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  }
  .sv-try { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent-700); }
  .sv-try:hover { color: var(--accent); }

  .perks { list-style: none; display: flex; flex-direction: column; }
  .perks li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; }
  .perks li + li { border-top: 1px solid var(--border); }
  .perks li > .mi {
    width: 40px; height: 40px; padding: 10px; border-radius: 12px;
    background: var(--accent-50); color: var(--accent-700);
  }
  .perks b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
  .perks p { font-size: 14px; color: var(--muted); line-height: 1.55; }

  /* ============ КОНСПЕКТЫ ============ */
  .notes-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: stretch; }
  .notes-intro {
    display: flex; flex-direction: column; gap: 20px;
    padding: 26px; border-radius: var(--radius-xl);
    background: linear-gradient(160deg, var(--accent-50), var(--paper) 70%);
    border: 1px solid var(--accent-100);
  }
  .ni-stats { display: flex; flex-direction: column; gap: 14px; }
  .ni-stats > div { font-size: 13px; color: var(--muted); }
  .ni-stats b {
    display: block; font-family: "Instrument Serif", serif; font-weight: 400;
    font-size: 40px; line-height: 1; color: var(--ink); margin-bottom: 3px;
  }
  .notes-intro p { font-size: 14px; color: var(--muted); line-height: 1.6; }
  .notes-intro .btn { align-self: flex-start; margin-top: auto; }

  .notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .note-card {
    display: flex; flex-direction: column; min-width: 0;
    border-radius: var(--radius-lg); overflow: hidden;
    background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .note-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .note-cover { height: 84px; position: relative; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px; }
  .note-cover span {
    position: relative; padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,0.9); font-size: 11px; font-weight: 600; color: var(--ink-2);
  }
  .nc-go {
    width: 28px; height: 28px; padding: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.18); color: white;
    opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s;
  }
  .note-card:hover .nc-go { opacity: 1; transform: none; }
  .cov-1 { background: linear-gradient(135deg, #2a1f55, var(--accent)); }
  .cov-2 { background: linear-gradient(135deg, #1a4b8a, var(--blue)); }
  .cov-3 { background: linear-gradient(135deg, #7a3d00, var(--orange)); }
  .cov-4 { background: linear-gradient(135deg, #0d5c3a, var(--green)); }
  .note-body { flex: 1; display: flex; flex-direction: column; padding: 15px 17px 16px; }
  .note-body b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 6px; }
  .note-card:hover .note-body b { color: var(--accent-700); }
  .note-body p { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
  .note-meta { margin-top: auto; font-size: 11px; color: var(--muted-2); font-family: "Geist Mono", monospace; }

  /* ============ БЫСТРЫЙ ПЕРЕХОД ============ */
  .links {
    border-radius: var(--radius-xl); background: var(--paper);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  }
  .links-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; padding: 22px 26px; }
  .links-row + .links-row { border-top: 1px solid var(--border); }
  .lr-head { display: flex; flex-direction: column; gap: 3px; align-self: start; position: relative; padding-right: 26px; }
  .lr-head b { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; transition: color 0.16s; }
  .lr-head span { font-size: 12.5px; color: var(--muted); }
  .lr-go { position: absolute; right: 0; top: 6px; color: var(--muted-2); transition: transform 0.16s, color 0.16s; }
  .lr-head:hover b, .lr-head:hover .lr-go { color: var(--accent-700); }
  .lr-head:hover .lr-go { transform: translateX(3px); }
  .chips { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
  .chip {
    display: inline-flex; align-items: baseline; gap: 7px;
    padding: 6px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid transparent;
    font-size: 13px; font-weight: 500; color: var(--ink-2);
    transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.16s;
  }
  .chip span { font-family: "Geist Mono", monospace; font-size: 10.5px; color: var(--muted-2); transition: color 0.16s; }
  .chip:hover { background: var(--accent-50); border-color: var(--accent-100); color: var(--accent-700); transform: translateY(-1px); }
  .chip:hover span { color: var(--accent-600); }

  /* ============ ФИНАЛ ============ */
  .final {
    position: relative; overflow: hidden; margin-top: 112px;
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: center;
    padding: 52px 52px 50px; border-radius: var(--radius-xl); color: white;
    background:
      radial-gradient(80% 120% at 100% 100%, var(--accent-glow), transparent 60%),
      radial-gradient(90% 120% at 100% 0%, rgba(114, 93, 255, 0.55), transparent 60%),
      linear-gradient(135deg, var(--ink) 0%, #1a1530 55%, #2a1f55 100%);
  }
  .final::after {
    content: ""; position: absolute; width: 300px; height: 300px; left: -120px; bottom: -160px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 184, 0, 0.18), transparent 70%); pointer-events: none;
  }
  .final > * { position: relative; z-index: 1; min-width: 0; }
  .final h2 {
    font-family: "Instrument Serif", serif; font-weight: 400;
    font-size: clamp(34px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.015em; margin-bottom: 14px;
  }
  .final h2 em {
    font-style: italic;
    background: linear-gradient(90deg, #ffd966, #ff9eb6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .final-main > p { font-size: 15px; color: rgba(255,255,255,0.72); line-height: 1.6; max-width: 54ch; margin-bottom: 24px; }
  .find-field {
    display: flex; align-items: center; gap: 10px; max-width: 560px;
    padding: 6px 6px 6px 18px; border-radius: 999px;
    background: white; color: var(--ink); cursor: text;
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  }
  .find-field > svg { color: var(--muted-2); font-size: 18px; }
  .find-field input {
    flex: 1; min-width: 0; border: none; outline: none; background: none;
    font: inherit; font-size: 15.5px; color: var(--ink); padding: 10px 0;
  }
  .find-field input::placeholder { color: var(--muted-2); }
  .find-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
  .find-field button {
    flex: none; padding: 12px 22px; border-radius: 999px;
    background: var(--accent); color: white; font-size: 14px; font-weight: 600;
    transition: background 0.16s;
  }
  .find-field button:hover { background: var(--accent-600); }
  .find-field:focus-within { box-shadow: 0 0 0 4px rgba(255,255,255,0.2), 0 16px 40px rgba(0,0,0,0.3); }
  .find-eg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; }
  .find-eg span { color: rgba(255,255,255,0.5); margin-right: 2px; }
  .find-eg a {
    padding: 4px 11px; border-radius: 999px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14);
    color: white; font-weight: 500; transition: background 0.16s, border-color 0.16s;
  }
  .find-eg a.mono { font-family: "Geist Mono", monospace; font-size: 12px; }
  .find-eg a:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.3); }
  .final-side {
    padding: 24px; border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  }
  .fs-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 14px; }
  .final-cta { display: flex; flex-direction: column; gap: 10px; }
  .final-cta .btn { justify-content: space-between; }

  /* ============ ТЕКСТОВЫЕ БЛОКИ (соглашение) ============ */
  .why {
    margin-top: 20px; padding: 26px; border-radius: var(--radius-lg);
    background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  }
  .why p { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 64ch; }
  .why p + p { margin-top: 10px; }

  /* ============ ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ ============
     Класс rv-wait ставит скрипт и только тем блокам, что ниже экрана: то,
     что видно сразу, не мигает, а без JS прятать нечего. */
  .rv-wait { opacity: 0; transform: translateY(18px); }
  .rv-wait.in {
    opacity: 1; transform: none;
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--d, 0) * 80ms);
  }

  /* ============ ПОДВАЛ ============ */
  .footer { border-top: 1px solid var(--border); background: var(--paper); margin-top: 80px; position: relative; z-index: 1; }
  .footer-inner {
    max-width: 1280px; margin: 0 auto; padding: 44px 32px;
    display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px;
  }
  .footer .fx {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    padding: 3px 0;
  }
  .footer .fx b { font-weight: 650; color: var(--ink); font-size: 13px; }
  .footer .fx span { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
  .footer h4 { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
  /* Не только ссылки: пункт без готовой страницы рисуется span'ом. */
  .footer a, .footer [aria-disabled="true"] { display: block; font-size: 13.5px; color: var(--muted); padding: 4px 0; transition: color 0.16s; }
  .footer a:hover { color: var(--ink); }
  .footer .about { font-size: 13.5px; color: var(--muted); line-height: 1.6; max-width: 34ch; }
  .footer-bottom {
    border-top: 1px solid var(--border); max-width: 1280px; margin: 0 auto; padding: 16px 32px;
    display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--muted-2); flex-wrap: wrap;
  }

  /* ============ АДАПТИВ ============ */
  @media (max-width: 1180px) {
    .exams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .exam-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .hero-home { padding: 48px 40px 32px; }
    .hero-grid { gap: 40px; }
    .pv-row { grid-template-columns: minmax(0, 1fr); margin: -30px 14px 0; }
    .pv-note { display: none; }
    .ec-subjects { grid-template-columns: minmax(0, 1fr); }
    .exam-card:last-child:nth-child(odd) .ec-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 1080px) {
    .nav { display: none; }
    .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
    .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notes-wrap { grid-template-columns: 260px minmax(0, 1fr); }
    .answers { gap: 28px; }
  }
  @media (max-width: 960px) {
    /* Витрина уходит под текст и снова раскладывается в две карточки внизу. */
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .preview { max-width: 560px; }
    .pv-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .pv-note { display: block; }
    .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .exams, .answers { grid-template-columns: minmax(0, 1fr); }
    .ba { grid-template-columns: minmax(0, 1fr); }
    .ba-arrow { justify-self: center; }
    .ba-arrow .mi { transform: rotate(90deg); }
    .notes-wrap { grid-template-columns: minmax(0, 1fr); }
    .ni-stats { flex-direction: row; flex-wrap: wrap; gap: 14px 30px; }
    .final { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .final-cta { flex-direction: row; flex-wrap: wrap; }
    .final-cta .btn { justify-content: center; }
  }
  @media (max-width: 620px) {
    .page { padding: 16px 16px 40px; }
    .topbar-inner { padding: 10px 16px; gap: 12px; }
    .hero { padding: 28px 20px 24px; border-radius: var(--radius-lg); }
    .hero-home { padding: 30px 20px 24px; }
    .hero-home h1 { font-size: 40px; }
    .hero .lede { font-size: 15px; }
    .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
    .preview { margin: 0 -4px; }
    .pv-task { padding: 16px 16px 44px; }
    .pv-row { grid-template-columns: minmax(0, 1fr); margin: -30px 10px 0; }
    .pv-note { display: none; }
    .hero-stats { gap: 20px 16px; margin-top: 32px; padding-top: 22px; }
    .hero-stats .v { font-size: 32px; }
    .sec, .final { margin-top: 80px; }
    .sec-head { margin-bottom: 22px; }
    .sec-head h2 { font-size: 28px; }
    .sec-sub { font-size: 14.5px; }
    .sec-link { margin-left: 0; }
    .exam-card { padding: 22px 18px 18px; border-radius: var(--radius-lg); }
    .ec-name { font-size: 46px; }
    .ec-stats > div { padding: 10px 10px; font-size: 11px; }
    .ec-stats b { font-size: 23px; }
    .ec-subjects { grid-template-columns: minmax(0, 1fr); }
    .ba-body { padding: 16px; }
    .ba-side { border-radius: var(--radius-lg); }
    .points { grid-template-columns: minmax(0, 1fr); }
    .solve { padding: 18px 16px; border-radius: var(--radius-lg); }
    .sv-answer .big { font-size: 40px; }
    .sv-try { margin-left: 0; }
    .perks li { padding: 16px 0; }
    .notes { grid-template-columns: minmax(0, 1fr); }
    .links { border-radius: var(--radius-lg); }
    .links-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 16px; }
    /* На телефоне двадцать предметов столбиком — это два экрана чипов.
       Здесь они ложатся в три строки и листаются вбок, как полка. */
    .chips {
      display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column;
      justify-content: start; gap: 7px;
      overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px;
      scroll-snap-type: x proximity; scrollbar-width: none;
    }
    .chips::-webkit-scrollbar { display: none; }
    .chip { font-size: 12.5px; padding: 5px 11px; white-space: nowrap; scroll-snap-align: start; }
    .final { padding: 30px 20px; border-radius: var(--radius-lg); }
    .find-field { padding-left: 16px; }
    .find-field > svg { display: none; }
    .find-field button { padding: 11px 16px; }
    .find-field input { font-size: 16px; }
    .final-side { padding: 18px; }
    .final-cta .btn { flex: 1 1 auto; }
    .why { padding: 20px; }
    .footer-inner { grid-template-columns: 1fr 1fr; padding: 32px 16px; }
    .footer-bottom { padding: 16px; }
  }

  /* Кто просил без движения — получает без движения: ни появления, ни
     подъёма карточек под курсором, ни пульса. */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rv-wait { opacity: 1; transform: none; }
    .pulse { animation: none; }
    .pv-card, .exam-card, .note-card, .chip { transition: none; }
    .pv-card:hover, .exam-card:hover, .note-card:hover, .chip:hover { transform: none; }
  }

/* Material Symbols, встроенные как svg */
.mi{display:inline-block;width:1em;height:1em;vertical-align:-.14em;fill:currentColor;flex:none}
