/* Ұпай — оформление по дизайн-системе «Индиго» (design/, https://claude.ai/artifact/KPTQ4As9VkNMVhzRjRHgq3).
   Значения цветов — из design/tokens.json. Две темы: светлая (основная) и тёмная «графит».
   Тема: data-theme на <html> (кнопка «солнце / луна»), иначе — prefers-color-scheme.
   Раскладка: одна колонка по центру (760px); главная — шире (1120px). */
:root {
  /* токены дизайн-системы */
  --bg: #ffffff; --surface: #eef0f5; --surface-2: #e3e6ef; --line: #d7dbe6; --line-strong: #a9afc4;
  --ink: #1f2233; --muted: #5c6175;
  --indigo: #3d4ba0; --indigo-hover: #323f8c; --indigo-ink: #3d4ba0; --indigo-soft: #e4e7f7; --on-indigo: #ffffff;
  --indigo-block: #3d4ba0; --indigo-band: #5864b8; --band-panel: #4a56a8; --glass: #fffffff0; --wave: #ffffff1f;
  --chip: #6b6e7e; --on-chip: #ffffff;
  --good: #1a7346; --good-soft: #e0f2e7; --on-good: #ffffff; --good-fill: #1a7346;
  --bad: #b5342b; --bad-soft: #fbe4e1; --on-bad: #ffffff; --bad-fill: #b5342b;
  --amber: #8a5300; --amber-soft: #fbf1dc; --amber-fill: #9a5a00;
  --focus: #2b3990;
  --shadow-glass: 0 18px 40px -16px #2a347066;
  /* старые имена, на которых держатся схемы конспектов и прочие места */
  --accent: var(--indigo-ink); --accent-ink: #ffffff; --accent-soft: var(--indigo-soft); --muted-soft: #e9ebf1;
  --sun: var(--amber-fill); --sun-soft: var(--amber-soft); --sun-ink: var(--amber);
  /* шрифты: Fira — все казахские буквы проверены */
  --font-xcond: "Fira Sans Extra Condensed", "Fira Sans Condensed", "Arial Narrow", sans-serif;
  --font-display: "Fira Sans Condensed", "Fira Sans", "Arial Narrow", sans-serif;
  --font-body: "Fira Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Fira Mono", ui-monospace, Consolas, monospace;
  /* формы */
  --r: 16px; --r-sm: 8px; --r-lg: 24px; --r-xl: 32px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111216; --surface: #1b1c22; --surface-2: #24262e; --line: #2c2e37; --line-strong: #4b4e5c;
    --ink: #eceef3; --muted: #a3a6b3;
    --indigo: #4f5fc4; --indigo-hover: #4353b3; --indigo-ink: #aab4ff; --indigo-soft: #262a4a;
    --indigo-block: #2b3378; --indigo-band: #1d2140; --band-panel: #161930; --glass: #1b1c22eb; --wave: #ffffff1a;
    --chip: #44475a;
    --good: #6bd49a; --good-soft: #15302a; --on-good: #0b2016; --good-fill: #2e8a57;
    --bad: #ff8f84; --bad-soft: #3a1c22; --on-bad: #2a0d10; --bad-fill: #c2453b;
    --amber: #f0c070; --amber-soft: #33280f; --amber-fill: #a8690f;
    --focus: #c3cbff; --shadow-glass: 0 18px 40px -16px #00000099;
    --accent-ink: #111216; --muted-soft: #24262e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111216; --surface: #1b1c22; --surface-2: #24262e; --line: #2c2e37; --line-strong: #4b4e5c;
  --ink: #eceef3; --muted: #a3a6b3;
  --indigo: #4f5fc4; --indigo-hover: #4353b3; --indigo-ink: #aab4ff; --indigo-soft: #262a4a;
  --indigo-block: #2b3378; --indigo-band: #1d2140; --band-panel: #161930; --glass: #1b1c22eb; --wave: #ffffff1a;
  --chip: #44475a;
  --good: #6bd49a; --good-soft: #15302a; --on-good: #0b2016; --good-fill: #2e8a57;
  --bad: #ff8f84; --bad-soft: #3a1c22; --on-bad: #2a0d10; --bad-fill: #c2453b;
  --amber: #f0c070; --amber-soft: #33280f; --amber-fill: #a8690f;
  --focus: #c3cbff; --shadow-glass: 0 18px 40px -16px #00000099;
  --accent-ink: #111216; --muted-soft: #24262e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding-block: 12px 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 32px;
}
.wrap.wide { max-width: 1152px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.85rem); }
h3 { font-size: 1.1rem; font-weight: 500; line-height: 1.25; }
h4 { font-family: var(--font-display); font-weight: 500; margin: 0; }
p { margin: 0; }
a { color: var(--indigo-ink); }
.muted { color: var(--muted); }
.eyebrow { font: 500 0.8rem/1.2 var(--font-display); color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Шапка ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; min-width: 0; }
.brand b { font: 700 1.6rem/1 var(--font-xcond); color: var(--ink); }
.brand span { font: 400 0.72rem/1.2 var(--font-display); color: var(--muted); max-width: 84px; text-align: left; }
.top-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lang, .theme { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); flex: none; }
.lang button { border: 0; background: none; color: var(--muted); font: 500 0.75rem/1 var(--font-display); padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.theme button { width: 30px; height: 27px; display: grid; place-items: center; border: 0; padding: 0; background: none; color: var(--muted); border-radius: 999px; cursor: pointer; }
.theme svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lang button:hover, .theme button:hover { color: var(--ink); }
.lang button[aria-pressed="true"], .theme button[aria-pressed="true"] { background: var(--indigo); color: var(--on-indigo); }
.acct-btn { border: 1px solid var(--indigo-ink); background: transparent; color: var(--indigo-ink); font: 500 0.82rem var(--font-body); padding: 6px 14px; border-radius: 999px; cursor: pointer; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn:hover, .acct-btn[aria-current] { background: var(--indigo-soft); }
@media (max-width: 520px) { .brand span { display: none; } .top-r { gap: 6px; } .acct-btn { max-width: 96px; padding: 6px 10px; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 0.92rem/1.15 var(--font-body); min-height: 42px; padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--indigo); cursor: pointer; text-align: center;
  background: var(--indigo); color: var(--on-indigo); transition: background .15s, color .15s, border-color .15s;
}
a.btn { text-decoration: none; }
.btn:hover { background: var(--indigo-hover); border-color: var(--indigo-hover); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--indigo); border-color: var(--indigo); }
.btn.ghost { background: transparent; color: var(--indigo-ink); border-color: var(--indigo-ink); }
.btn.ghost:hover { background: var(--indigo-soft); }
.btn.ghost[disabled]:hover { background: transparent; }
.btn.sun { background: var(--indigo); color: var(--on-indigo); border-color: var(--indigo); }
.btn.light { background: var(--on-indigo); color: var(--indigo-block); border-color: var(--on-indigo); }
.btn.light:hover { background: #ffffffd9; border-color: #ffffffd9; }
.btn.small { min-height: 34px; padding: 5px 14px; font-size: 0.85rem; }
/* стрелка «→» у действий, которые ведут на другой экран */
.btn.go::after, .linkbtn.go::after { content: ""; flex: none; width: 18px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M1 5h16M12.5 1 17 5l-4.5 4' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M1 5h16M12.5 1 17 5l-4.5 4' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.linkbtn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--indigo-ink); font: 500 0.92rem var(--font-body); cursor: pointer; padding: 4px 0; text-align: left; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.onband { color: var(--on-indigo); }

/* ---------- Заголовок страницы ---------- */
.hero { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.hero > .linkbtn { align-self: flex-start; }
.hero p { max-width: 62ch; color: var(--muted); }
.hero p strong { color: var(--ink); font-weight: 600; }

/* Главная: большой индиго-блок с узором из колец */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 32px; align-items: end;
  padding: 40px; border-radius: var(--r-xl); color: var(--on-indigo);
  background-color: var(--indigo-block);
  background-image: repeating-radial-gradient(circle at 88% 30%, transparent 0 22px, var(--wave) 22px 23px);
}
.home-hero .hh-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.home-hero h1 { font: 700 clamp(2.5rem, 6.4vw, 3.9rem)/0.95 var(--font-xcond); text-transform: uppercase; letter-spacing: -0.005em; color: var(--on-indigo); }
.home-hero p { color: var(--on-indigo); max-width: 46ch; font-size: 1rem; }
.home-hero .row-actions { align-items: center; gap: 16px; }
.home-hero .stats { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: var(--r); background: var(--wave); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.home-hero .stat b { font: 600 2.2rem/1 var(--font-xcond); color: var(--on-indigo); }
.home-hero .stat span { color: var(--on-indigo); font-size: 0.82rem; }
@media (max-width: 720px) {
  .home-hero { grid-template-columns: 1fr; padding: 28px 20px; gap: 22px; }
  .home-hero .stats { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; }
}
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.stat b { font: 600 1.6rem/1.1 var(--font-xcond); display: block; }
.stat span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Главная: выбор режима ---------- */
.section { display: flex; flex-direction: column; gap: 16px; }
.choose { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choose .exam-card { grid-column: 1 / -1; }
.exam-card {
  background: var(--surface); border-radius: var(--r-lg); padding: 28px;
  display: grid; gap: 16px 24px; grid-template-columns: 1fr auto; align-items: center;
}
.exam-card .ch-h { font-size: 1.6rem; font-weight: 600; }
.exam-card p { color: var(--muted); }
.exam-card .eyebrow { margin-bottom: 6px; }
.exam-card .score { font: 600 5.5rem/0.85 var(--font-xcond); color: var(--indigo-ink); text-align: right; letter-spacing: -0.01em; }
.exam-card .score small { display: block; font: 400 0.82rem/1.3 var(--font-body); color: var(--muted); margin-top: 8px; }
.exam-card .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.note { font-size: 0.86rem; color: var(--muted); }
.note.wide { grid-column: 1 / -1; }
.choice { background: var(--surface); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ch-h { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.choice > .muted { font-size: 0.88rem; }
.pick { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 4px; }
.pickbtn { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; }
.pickbtn b { font-weight: 500; }
.pickbtn span { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.pickbtn:hover:not([disabled]) b { color: var(--indigo-ink); }
.pickbtn[disabled] { opacity: 0.45; cursor: not-allowed; }
.choose .choice:last-child { grid-column: auto; }
@media (max-width: 900px) { .choose { grid-template-columns: 1fr 1fr; } .choose .choice:last-child { grid-column: 1 / -1; } }
@media (max-width: 620px) { .choose { grid-template-columns: 1fr; } .exam-card { grid-template-columns: 1fr; padding: 22px; } .exam-card .score { text-align: left; font-size: 4.2rem; } }

/* Чипы: профильная пара, время теста */
.pairpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pairpick > span { font: 500 0.95rem var(--font-display); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 0; background: var(--chip); color: var(--on-chip); font: 500 0.9rem/1.1 var(--font-display); min-height: 34px; padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.chips button:hover { background: var(--muted); }
.chips button[aria-selected="true"], .chips button[aria-checked="true"] { background: var(--indigo); color: var(--on-indigo); }
.chips.mins button { min-width: 78px; }

/* Предметы: серые карточки — название сверху, контурное число заданий и стрелка снизу */
.subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.subj {
  display: flex; flex-direction: column; gap: 18px; padding: 20px; min-height: 196px; border-radius: var(--r);
  background: var(--surface); border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; min-width: 0; transition: background .15s;
}
.subj:hover { background: var(--surface-2); }
.subj .stop { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.subj h3 { font-size: 1.12rem; }
.subj .sbottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; }
.subj .count { display: flex; flex-direction: column; }
.subj .count > span:last-child { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.outline { font: 500 3rem/1 var(--font-xcond); color: transparent; -webkit-text-stroke: 1px var(--indigo-ink); letter-spacing: 0.02em; }
@supports not (-webkit-text-stroke: 1px black) { .outline { color: var(--indigo-ink); } }
.arr { width: 34px; height: 14px; flex: none; color: var(--muted); }
.arr path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.subj:hover .arr { color: var(--indigo-ink); }
.subj .right { display: flex; flex-direction: column; gap: 6px; font-size: 0.75rem; color: var(--muted); }
.subj .right .meter { width: 100%; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font: 500 0.75rem/1 var(--font-display); white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.tag.profile { box-shadow: none; background: var(--chip); color: var(--on-chip); }
.meter { display: block; width: 96px; height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--indigo-ink); border-radius: inherit; }

.mist { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; background: var(--surface); border-radius: var(--r); padding: 22px 24px; }
.mist > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 280px; }
.mist h2 { font-size: 1.35rem; }
.mist .muted { font-size: 0.9rem; max-width: 70ch; }

/* ---------- Страница предмета, конспекты: список разделов ---------- */
.topics { display: flex; flex-direction: column; gap: 8px; }
.topic { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); }
.topic > div { min-width: 0; }
.topic h3 { font-size: 1.05rem; }
.topic .meta { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.secno { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px; background: var(--indigo-soft); font: 400 0.75rem var(--font-mono); color: var(--indigo-ink); margin-right: 10px; vertical-align: 1px; }
.topic-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Тест ---------- */
.qbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 10px;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.qbar .where { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.qbar .where b { font: 500 1rem/1.3 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbar .where span { font-size: 0.82rem; color: var(--muted); }
.timer { font: 400 1rem var(--font-mono); padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); }
.timer.low { color: var(--bad); background: var(--bad-soft); }
.progress { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: -20px; }
.progress i { display: block; height: 100%; background: var(--indigo-ink); border-radius: inherit; transition: width .25s; }

.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.palette button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted); font: 400 0.75rem var(--font-mono); cursor: pointer; padding: 0; }
.palette button.done { background: var(--indigo-soft); color: var(--indigo-ink); }
.palette button.cur { background: var(--indigo); color: var(--on-indigo); }
.palsubj { flex-basis: 100%; font: 500 0.82rem var(--font-display); color: var(--muted); padding-top: 6px; }
.palsubj:first-child { padding-top: 0; }

.context { background: var(--surface); border-radius: var(--r); padding: 18px 20px; }
.context .eyebrow { margin-bottom: 8px; color: var(--indigo-ink); }
.context p { white-space: pre-line; max-width: 68ch; }
.context details summary { cursor: pointer; font-weight: 600; color: var(--indigo-ink); }

.qtext { font-size: 1.18rem; line-height: 1.45; font-weight: 600; max-width: 62ch; white-space: pre-line; }
.qcode { margin: 12px 0 4px; padding: 14px 16px; background: var(--surface); border-radius: var(--r-sm); overflow-x: auto; max-width: 100%;
  font: 0.95rem/1.5 var(--font-mono); white-space: pre; tab-size: 4; color: var(--ink); }
.context .qcode { background: var(--bg); }
.qcode code { font: inherit; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.hint.multi { color: var(--indigo-ink); background: var(--indigo-soft); display: inline-block; padding: 3px 12px; border-radius: 999px; }
.qimg { display: block; max-width: 100%; height: auto; margin-block: 10px; border-radius: var(--r-sm); background: #fff; }
.srcbadge { display: inline-flex; align-items: center; height: 24px; font: 500 0.78rem var(--font-display); color: var(--indigo-ink); background: var(--indigo-soft); border-radius: 999px; padding: 0 12px; margin-bottom: 10px; }

.options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center;
  padding: 10px 16px 10px 10px; border: 2px solid transparent; border-radius: var(--r); background: var(--surface);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; width: 100%; transition: background .15s;
}
.opt:hover:not([disabled]) { background: var(--surface-2); }
.opt[disabled] { cursor: default; }
/* кружок ответа — как на бланке ЕНТ */
.bubble {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg);
  display: grid; place-items: center; font: 400 0.85rem var(--font-mono); color: var(--muted);
}
.opt.multi .bubble { border-radius: var(--r-sm); }
.opt.sel { border-color: var(--indigo); background: var(--bg); }
.opt.sel .bubble { background: var(--indigo); border-color: var(--indigo); color: var(--on-indigo); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.right .bubble { background: var(--good); border-color: var(--good); color: var(--on-good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .bubble { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }

.verdict { border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.verdict b { font: 600 1.15rem var(--font-display); }
.verdict.ok { background: var(--good-soft); } .verdict.ok b { color: var(--good); }
.verdict.no { background: var(--bad-soft); } .verdict.no b { color: var(--bad); }
.verdict.part { background: var(--amber-soft); } .verdict.part b { color: var(--amber); }
.verdict p { max-width: 68ch; }

.qnav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-bottom: 8px; }
.qnav .grow { display: flex; gap: 10px; flex-wrap: wrap; }
.confirm { background: var(--amber-soft); border-radius: var(--r); padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }

/* Соответствие: пункты A/B, у каждого свой список вариантов */
.match { display: flex; flex-direction: column; gap: 18px; }
.mrow { display: flex; flex-direction: column; gap: 8px; }
.mleft { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.mleft .bubble { border-color: var(--indigo); color: var(--on-indigo); background: var(--indigo); }
.mrow .options { padding-left: 46px; gap: 6px; }
.opt.compact { padding: 7px 12px 7px 8px; grid-template-columns: 28px 1fr; font-size: 0.95rem; }
.opt.compact .bubble { width: 28px; height: 28px; font-size: 0.75rem; }
@media (max-width: 520px) { .mrow .options { padding-left: 0; } }

/* ---------- Итоги ---------- */
.result-head {
  display: flex; flex-direction: column; gap: 10px; padding: 32px; border-radius: var(--r-xl); color: var(--on-indigo);
  background-color: var(--indigo-block);
  background-image: repeating-radial-gradient(circle at 92% 20%, transparent 0 22px, var(--wave) 22px 23px);
}
.result-head .eyebrow { align-self: flex-start; color: var(--on-indigo); background: var(--wave); padding: 4px 12px; border-radius: 999px; }
.result-head h1 { color: var(--on-indigo); }
.result-head .muted, .result-head .note { color: var(--on-indigo); }
.bigscore { font: 600 clamp(4.5rem, 16vw, 7rem)/0.85 var(--font-xcond); color: var(--on-indigo); }
.bigscore small { font: 500 0.3em var(--font-xcond); color: var(--on-indigo); }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r); padding: 6px 20px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font: 500 0.82rem var(--font-display); color: var(--muted); }
td.r, th.r { text-align: right; }
.review { display: flex; flex-direction: column; gap: 8px; }
.review details { background: var(--surface); border-radius: var(--r); padding: 14px 16px; }
.review summary { cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.review summary .mark { font: 400 0.8rem var(--font-mono); padding: 2px 8px; border-radius: 999px; }
.mark.ok { background: var(--good-soft); color: var(--good); }
.mark.no { background: var(--bad-soft); color: var(--bad); }
.mark.part { background: var(--amber-soft); color: var(--amber); }
.review .body { padding-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }

/* ---------- Подвал: индиго, внутренняя панель, подписи-таблетки ---------- */
.foot { margin-top: 32px; padding: 20px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--indigo-band); color: var(--on-indigo); }
.foot .panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; padding: 24px; border-radius: var(--r-lg); background: var(--band-panel); }
.foot .fbrand { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--wave); }
.foot .fbrand b { font: 700 1.6rem/1 var(--font-xcond); }
.foot .fbrand span { font-size: 0.8rem; padding-left: 12px; border-left: 1px solid var(--on-indigo); }
.foot .fcol { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 0.82rem; line-height: 1.45; min-width: 0; }
.foot .ftag { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; background: var(--wave); font: 500 0.75rem/1 var(--font-display); }
.foot a { color: var(--on-indigo); font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 640px) { .foot .panel { grid-template-columns: 1fr; padding: 20px; } }

@media (max-width: 520px) {
  .qtext { font-size: 1.08rem; }
  .wrap { gap: 26px; }
}

/* ---------- Шпаргалки (конспекты) ---------- */
.th-block { display: flex; flex-direction: column; gap: 12px; }
.th-block p { max-width: 68ch; }
.th-dates td { vertical-align: top; }
.th-dates td:first-child { white-space: nowrap; font-weight: 600; color: var(--indigo-ink); width: 1%; padding-right: 16px; }
.th-dates.wrap-lbl td:first-child { white-space: normal; width: 34%; }
.th-dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 16px; margin: 0; }
.th-dl dt { font-weight: 600; }
.th-dl dd { margin: 0; color: var(--ink); }
.th-topics .topic { display: block; padding: 0; background: var(--surface); border-radius: var(--r); }
.th-topics .topic + .topic { margin-top: 0; }
.th-topics .topic[open] { background: var(--indigo-soft); }
.th-topics summary { cursor: pointer; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.th-topics summary::-webkit-details-marker { display: none; }
.th-topics summary .num { font: 400 0.75rem var(--font-mono); color: var(--indigo-ink); }
.th-topics summary b { font: 500 1.02rem/1.3 var(--font-display); }
.th-topics summary b::after { content: ' +'; color: var(--indigo-ink); }
.th-topics details[open] summary b::after { content: ' −'; }
.th-topics .topic-body { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.th-topics .topic-body p { max-width: 68ch; margin: 0; }
.th-topics .topic-key { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; }
.th-topics .topic-key h3 { margin: 0 0 6px; font-size: 1rem; color: var(--indigo-ink); }
.th-topics .topic-key ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.th-topics .topic-trap { background: var(--amber-soft); border-radius: var(--r-sm); padding: 10px 14px; }
.th-tips { background: var(--amber-soft); border-radius: var(--r); padding: 16px 20px; }
.th-tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 520px) {
  .th-dl { grid-template-columns: 1fr; gap: 2px; }
  .th-dl dd { margin-bottom: 8px; }
  .topic { flex-wrap: wrap; }
}

/* ---------- Личный кабинет, статистика, рейтинг ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card h2 { font-size: 1.25rem; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; font: 500 0.88rem var(--font-display); }
.fld input { font: 1rem var(--font-body); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); width: 100%; }
.fld input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--indigo); }
.chk { display: flex; gap: 8px; align-items: center; font-size: 0.95rem; }
.chk input { width: 18px; height: 18px; accent-color: var(--indigo); }
.formerr { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: var(--r-sm); font-size: 0.92rem; }
.formok { color: var(--good); background: var(--good-soft); padding: 8px 12px; border-radius: var(--r-sm); font-size: 0.92rem; }
.netst { font-size: 0.88rem; color: var(--muted); min-height: 1.2em; }
.netst.error, .netst.bad { color: var(--bad); }
.acct-set .set-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.acct-set form.set-row { align-items: flex-end; }
.acct-set .set-row .grow { flex: 1 1 200px; }
.btn.danger { background: var(--bad-fill); border-color: var(--bad-fill); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.ghost.danger:hover { background: var(--bad-soft); }
.card .confirm, .acct-set .confirm { background: none; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 0; flex-direction: column; align-items: stretch; gap: 10px; }
.subh { font-size: 1.1rem; margin-top: 8px; }
.chart { margin: 0; background: var(--surface); border-radius: var(--r); padding: 18px 18px 8px; }
.chart figcaption { font: 500 0.95rem var(--font-display); margin-bottom: 6px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 12px var(--font-body); }
.chart .line { fill: none; stroke: var(--indigo-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--indigo-ink); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .pt:hover .dot, .chart .pt:focus .dot { r: 6.5; }
.chart .pt:focus { outline: none; }
.chart .lbl { fill: var(--ink); font: 600 13px var(--font-display); }
.secstat { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.secstat h4 { font-size: 0.98rem; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 4px 12px; align-items: center; font-size: 0.88rem; }
.srow .sname { min-width: 0; }
.srow .sval { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; margin-top: -2px; }
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface); align-self: flex-start; }
.tabs button { border: 0; background: none; color: var(--muted); font: 500 0.9rem var(--font-display); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--indigo); color: var(--on-indigo); }
.toptbl tr.me td { background: var(--indigo-soft); font-weight: 600; }
.toptbl th:first-child, .toptbl td:first-child { width: 72px; }
.note.warn { color: var(--ink); background: var(--amber-soft); padding: 8px 12px; border-radius: var(--r-sm); }
.pwform { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.pwwrap { position: relative; display: block; }
.pwwrap input { padding-right: 96px; }
.pweye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--indigo-ink); font: 500 0.85rem var(--font-body); padding: 6px 8px; cursor: pointer; border-radius: 6px; }
.pweye:hover { background: var(--surface); }
.welcome { background: var(--indigo-soft); border-radius: var(--r); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.welcome p { margin: 0; flex: 1 1 260px; color: var(--ink); font-weight: 600; }

/* ---------- Конспекты: рисунки и лента времени ---------- */
.th-fig { margin: 0; }
.th-fig a { display: block; border-radius: var(--r); overflow: hidden; background: #fff; }
.th-fig img { display: block; width: 100%; height: auto; }
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl li { position: relative; padding: 4px 0 14px 30px; display: flex; flex-direction: column; gap: 2px; }
.tl li::before { content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--indigo); border: 3px solid var(--bg); box-sizing: content-box; }
.tl li b { font-family: var(--font-display); font-size: 1rem; color: var(--accent); }
.tl li span { color: var(--ink); }
/* ---------- Выбор времени теста ---------- */


/* ================= Наглядные схемы в конспектах (js/figs.js) ================= */
.fx { margin: 0; background: var(--surface); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.fx-t { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; margin: 0; }
.fx-sub { font-family: var(--font-display); font-size: 1rem; margin: 6px 0 0; }
.fx-note { margin: 0; font-size: 0.92rem; color: var(--muted); }
.fx code { font-family: var(--font-body); font-weight: 700; }
.c-acc  { --c: var(--indigo);     --cs: var(--indigo-soft); --ct: var(--indigo-ink); }
.c-sun  { --c: var(--amber-fill); --cs: var(--amber-soft);  --ct: var(--amber); }
.c-good { --c: var(--good-fill);  --cs: var(--good-soft);   --ct: var(--good); }
.c-bad  { --c: var(--bad-fill);   --cs: var(--bad-soft);    --ct: var(--bad); }
.c-muted{ --c: var(--chip);       --cs: var(--muted-soft);  --ct: var(--muted); }

/* шаги */
.fx-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; }
.fx-steps.row1 { gap: 26px; }
.fx-step { position: relative; background: var(--cs); border-top: 5px solid var(--c); border-radius: 12px; padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 1rem; line-height: 1.4; }
.fx-step .fx-k { font-family: var(--font-display); font-size: 1.02rem; color: var(--ct); line-height: 1.25; }
.fx-step strong { font-size: 1.02rem; }
.fx-step span { color: var(--ink); }
.fx-num { position: absolute; top: -12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font: 700 0.85rem/26px var(--font-body); text-align: center; }
.fx-steps.row1 .fx-step:not(:last-child)::after { content: "→"; position: absolute; right: -22px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.3rem; font-weight: 700; }

/* шкала лет */
.fx-gantt { display: flex; flex-direction: column; gap: 10px; }
.fx-g-row { display: grid; grid-template-columns: minmax(0, 40%) 1fr; gap: 12px; align-items: center; }
.fx-g-l { display: flex; flex-direction: column; line-height: 1.25; }
.fx-g-l span { font-weight: 700; font-size: 0.98rem; }
.fx-g-l em { font-style: normal; color: var(--ct, var(--muted)); font-size: 0.9rem; font-weight: 700; }
.fx-g-tr { position: relative; height: 16px; background: var(--muted-soft); border-radius: 8px; }
.fx-g-tr i { position: absolute; top: 0; bottom: 0; min-width: 6px; background: var(--c); border-radius: 8px; }
.fx-g-tr i.approx { background: repeating-linear-gradient(135deg, var(--c) 0 4px, var(--cs) 4px 9px); border: 1.5px solid var(--c); }
.fx-g-tr i.open::after { content: "→"; position: absolute; right: -16px; top: -5px; color: var(--c); font-weight: 700; }
.fx-g-axis .fx-g-tr { background: none; height: 18px; border-top: 1px solid var(--line); border-radius: 0; }
.fx-g-axis .fx-g-tr span { position: absolute; top: 2px; transform: translateX(-50%); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.fx-g-axis .fx-g-tr span:first-child { transform: none; }
.fx-g-axis .fx-g-tr span:last-child { transform: translateX(-100%); }
.fx-g-evrow .fx-g-tr { background: none; height: 26px; }
.fx-g-evrow .fx-g-tr b { position: absolute; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--bad-fill); color: #fff; font: 700 0.8rem/24px var(--font-body); text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.fx-ev { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 16px; }
.fx-ev li { display: flex; gap: 10px; align-items: baseline; font-size: 0.96rem; line-height: 1.35; }
.fx-ev li > b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bad-fill); color: #fff; font: 700 0.8rem/24px var(--font-body); text-align: center; }
.fx-ev strong { color: var(--bad); }

/* карточки */
.fx-cards { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
.fx-card { border: 1.5px solid var(--line); border-top: 5px solid var(--c); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; line-height: 1.4; background: var(--bg); }
.fx-card .fx-h { font-family: var(--font-display); font-size: 0.98rem; color: var(--ct); line-height: 1.3; }
.fx-card strong { font-size: 1.02rem; }
.fx-card > span { color: var(--muted); }
.fx-card ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fx-card li { display: flex; flex-direction: column; }
.fx-card li span { color: var(--muted); font-size: 0.95rem; }

/* ряды блоков */
.fx-boxes { display: flex; flex-direction: column; gap: 10px; }
.fx-rowlab { margin: 4px 0 -2px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fx-brow { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 12px; }
.fx-brow.arrows { gap: 26px; }
.fx-box { position: relative; background: var(--cs); border: 1.5px solid var(--c); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; line-height: 1.35; }
.fx-box em { font-style: normal; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.fx-box b { font-family: var(--font-display); font-size: 1.02rem; color: var(--ct); line-height: 1.25; }
.fx-box span { font-size: 0.96rem; }
.fx-box.solid { background: var(--c); }
.fx-box.solid b, .fx-box.solid span, .fx-box.solid em { color: #fff; }
.fx-brow.arrows .fx-box:not(:last-child)::after { content: "→"; position: absolute; right: -21px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; font-size: 1.2rem; }
.fx-down { text-align: center; color: var(--muted); font-weight: 700; font-size: 1.2rem; line-height: 1; }

/* лестница возрастов */
.fx-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; position: relative; }
.fx-ladder::before { content: ""; position: absolute; left: 31px; top: 20px; bottom: 20px; width: 3px; background: var(--line); }
.fx-ladder > li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; padding: 8px 0; position: relative; }
.fx-age { width: 64px; height: 64px; border-radius: 50%; background: var(--c); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 4px var(--surface); }
.fx-age b { font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.fx-age small { font-size: 0.68rem; opacity: 0.95; }
.fx-ladder ul { margin: 0; padding: 10px 14px; list-style: none; background: var(--cs); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 0.98rem; line-height: 1.4; }
.fx-ladder ul li::before { content: "• "; color: var(--c); font-weight: 700; }

/* пирамида */
.fx-pyr { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: center; }
.fx-pyr-l { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fx-pyr-l > div { background: var(--c); color: #fff; text-align: center; padding: 12px 8px; border-radius: 10px; font-family: var(--font-display); font-size: 1rem; }
.fx-pyr-s { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 0.98rem; line-height: 1.4; }

/* два лагеря */
.fx-vs { display: flex; flex-direction: column; gap: 12px; }
.fx-banner { background: var(--cs); border-left: 5px solid var(--c); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.fx-banner em { font-style: normal; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ct); }
.fx-vs-mid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.fx-vs-x { align-self: center; font-family: var(--font-display); color: var(--muted); }
.fx-vs-side { background: var(--cs); border-radius: 12px; border-top: 5px solid var(--c); padding: 14px; }
.fx-vs-side b { font-family: var(--font-display); color: var(--ct); font-size: 1.05rem; }
.fx-vs-side ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 1rem; }

/* проценты */
.fx-formula { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.fx-formula span { font-weight: 700; font-size: 1.02rem; }
.fx-formula b { font-family: var(--font-display); font-size: 1.15rem; color: var(--accent); }
.fx-pbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.fx-pbar span { background: var(--accent-soft); color: var(--accent); text-align: center; padding: 12px 0; border-radius: 8px; font-weight: 700; }
.fx-pbar span.on { background: var(--indigo); color: var(--on-indigo); }
.fx-ex { margin: 0; font-size: 1rem; line-height: 1.45; }
.fx-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fx-val { font-family: var(--font-display); font-size: 1.3rem; padding: 10px 16px; border-radius: 12px; background: var(--cs); color: var(--ct); border: 1.5px solid var(--c); }
.fx-op { font-weight: 700; color: var(--ct); font-size: 1.05rem; }

/* круги Эйлера */
.fx-venn-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.fx-venn { width: 100%; max-width: 320px; }
.fx-venn .va { fill: var(--accent); fill-opacity: 0.18; stroke: var(--accent); stroke-width: 2; }
.fx-venn .vb { fill: var(--amber-fill); fill-opacity: 0.22; stroke: var(--amber-fill); stroke-width: 2; }
.fx-venn text { font-family: var(--font-display); text-anchor: middle; fill: var(--ink); }
.fx-venn .vl { font-size: 18px; } .fx-venn .vn { font-size: 24px; } .fx-venn .mid { font-size: 26px; }

/* дерево выбора */
.fx-dec { display: flex; flex-direction: column; gap: 10px; }
.fx-q { background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 12px; padding: 10px 14px; font-weight: 700; text-align: center; }
.fx-dec-b { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.fx-dec-b .fx-dec-b { grid-template-columns: 1fr 1fr; }
.fx-branch { display: flex; flex-direction: column; gap: 8px; }
.fx-branch > em { font-style: normal; font-weight: 700; text-align: center; font-size: 0.95rem; }
.fx-branch > em::before { content: "↓ "; }
.fx-branch > em.yes { color: var(--good); } .fx-branch > em.no { color: var(--bad); }
.fx-res { background: var(--cs); border-top: 5px solid var(--c); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.fx-res b { font-family: var(--font-display); color: var(--ct); font-size: 0.98rem; }
.fx-res code { font-size: 1.1rem; }
.fx-res span { color: var(--muted); font-size: 0.92rem; }

/* последовательности */
.fx-seq { display: flex; flex-direction: column; gap: 8px; }
.fx-seq p { margin: 0; font-size: 1rem; }
.fx-seq p code { color: var(--ct); margin-left: 6px; }
.fx-seq-n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.fx-seq-n b { min-width: 46px; height: 46px; padding: 0 6px; border-radius: 23px; background: var(--cs); border: 1.5px solid var(--c); color: var(--ct); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1rem; }
.fx-step-op { color: var(--muted); font-weight: 700; font-size: 0.85rem; }

/* фигуры */
.fx-shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fx-shape { background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.fx-shape svg { width: 72px; height: 72px; }
.fx-shape svg * { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.fx-shape svg .t { fill: var(--accent); fill-opacity: 0.35; }
.fx-shape svg .s { fill: var(--accent); fill-opacity: 0.55; }
.fx-shape svg .h { stroke: var(--sun); stroke-dasharray: 4 3; fill: none; }
.fx-shape b { font-family: var(--font-display); font-size: 0.9rem; overflow-wrap: anywhere; hyphens: auto; }
.fx-shape code { font-size: 1rem; color: var(--muted); }
.fx-shape code.main { color: var(--ink); font-size: 1.08rem; }

/* доли кругами */
.fx-pies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fx-pie { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 700; }
.fx-pie .pie { width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(var(--accent) var(--p), var(--accent-soft) 0); display: flex; align-items: center; justify-content: center; }
.fx-pie .pie b { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 1.15rem; color: var(--accent); }

/* ---------- телефон ---------- */
@media (max-width: 640px) {
  .fx { padding: 16px 14px; }
  .fx-steps, .fx-steps.row1 { grid-template-columns: 1fr; gap: 24px; }
  .fx-steps.row1 .fx-step:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -24px; transform: translateX(-50%); }
  .fx-g-row { grid-template-columns: 1fr; gap: 4px; }
  .fx-g-axis .fx-g-l, .fx-g-evrow .fx-g-l { display: none; }
  .fx-g-row + .fx-g-row { margin-top: 4px; }
  .fx-cards { grid-template-columns: 1fr; }
  .fx-brow, .fx-brow.arrows { grid-template-columns: 1fr; gap: 24px; }
  .fx-brow:not(.arrows) { gap: 10px; }
  .fx-brow.arrows .fx-box:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -23px; transform: translateX(-50%); }
  .fx-pyr { grid-template-columns: 1fr; }
  .fx-vs-mid { grid-template-columns: 1fr; }
  .fx-venn-wrap { grid-template-columns: 1fr; justify-items: center; }
  .fx-dec-b, .fx-dec-b .fx-dec-b { grid-template-columns: 1fr; }
  .fx-shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fx-shape { padding: 12px 8px; }
  .fx-shape b { font-size: 0.8rem; }
  .fx-shape code { font-size: 0.92rem; }
  .fx-pies { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .fx-pie .pie { width: 86px; height: 86px; } .fx-pie .pie b { width: 52px; height: 52px; font-size: 1rem; }
  .fx-pie span { font-size: 0.88rem; }
  .fx-seq-n b { min-width: 40px; height: 40px; font-size: 0.92rem; }
}
.fx-box b { overflow-wrap: anywhere; }
.fx-brow.arrows .fx-box b { font-family: var(--font-body); font-weight: 700; font-size: 1.08rem; overflow-wrap: normal; }
/* ---------- Карточки и «Нашёл ошибку» ---------- */
.flashcard { background: var(--surface); border-radius: var(--r); padding: 26px 24px; min-height: 160px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.fc-prompt { margin: 0; font: 600 1.6rem/1.15 var(--font-xcond); color: var(--indigo-ink); text-transform: uppercase; text-wrap: balance; }
.rep-link { font: 400 0.85rem var(--font-body); color: var(--muted); align-self: flex-start; border: 0; padding: 4px 0; background: none; text-align: left; cursor: pointer; }
.rep-link:hover { color: var(--indigo-ink); text-decoration: underline; text-underline-offset: 3px; }
.rep-row { margin-top: 4px; display: flex; flex-direction: column; }
.rep-row .rep-form { border: 0; border-radius: var(--r); padding: 14px 16px; background: var(--surface); }
.rep-form { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.rep-form textarea { font: 1rem var(--font-body); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); width: 100%; resize: vertical; }
.fb-form { margin-top: 0; padding-top: 20px; border-top: 0; }
.rep-ok { margin: 0; color: var(--good); font-weight: 700; font-size: 0.92rem; }


/* ---------- Главная: «Сегодня» — цель дня, серия, прогноз, моя специальность ---------- */
.today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tcard .eyebrow { color: var(--indigo-ink); }
.tcard .big { font: 600 2.4rem/1 var(--font-xcond); color: var(--ink); }
.tcard .mid { font: 600 1.25rem/1.15 var(--font-display); color: var(--ink); }
.tcard p { font-size: 0.85rem; color: var(--muted); }
.tcard .meter { width: 100%; height: 6px; }
.tcard.done .meter i { background: var(--good); }
.tcard .linkbtn { margin-top: auto; }
.tcard.accent { background: var(--indigo-soft); }
.chips.tiny { align-items: center; gap: 6px; margin-top: auto; }
.chips.tiny > span { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.chips.tiny button { min-height: 28px; padding: 3px 11px; font-size: 0.8rem; }
@media (max-width: 960px) { .today { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .today { grid-template-columns: 1fr; } .tcard .big { font-size: 2.1rem; } }

/* ---------- «Кем стать»: специальности → профильные предметы ---------- */
.csearch { max-width: 560px; }
.csearch input { font-size: 1.05rem; padding: 12px 16px; border-radius: 999px; }
.careers { display: flex; flex-direction: column; gap: 12px; }
.cpair { background: var(--surface); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.cpair[hidden], .clist li[hidden] { display: none; }
.cphead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.cphead h2 { font-size: 1.3rem; }
.cphead .meta { font-size: 0.84rem; color: var(--muted); margin-top: 2px; }
.clist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; border-top: 1px solid var(--line); }
.citem { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.citem b { font-weight: 500; font-size: 0.93rem; line-height: 1.3; }
.citem span { font-size: 0.77rem; color: var(--muted); }
.citem:hover b, .citem[aria-current="true"] b { color: var(--indigo-ink); }
.citem[aria-current="true"] b::after { content: " ✓"; }
@media (max-width: 520px) { .cpair { padding: 16px; } .clist { grid-template-columns: 1fr; } }
/* Текст главной для поисковиков (виден, пока грузится тренажёр; app.js заменяет его) */
.seo-static { padding: 32px 0; color: var(--muted); }
.seo-static h1 { font-family: var(--font-display); color: var(--ink); font-size: clamp(28px, 6vw, 44px); line-height: 1.15; margin: 0 0 16px; }
.seo-static ul { columns: 2; padding-left: 20px; }
.seo-static a { color: var(--indigo-ink); }
