/* Schoolook mini app — «ночная тетрадь» (dark) / «бумага» (light) */
@font-face { font-family: 'Montserrat X'; src: url('../fonts/Montserrat-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Montserrat X'; src: url('../fonts/Montserrat-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat X'; src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; } /* TG 6148: подписи значений на чертеже тоньше */
@font-face { font-family: 'Montserrat X'; src: url('../fonts/Montserrat-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; } /* Игорь 05.11 TG 6716: подписи чертежей в два раза тоньше */

:root {
  --bg: #0b1530; --bg2: #101c3f; --card: rgba(255,255,255,.06); --card2: rgba(255,255,255,.10);
  --line: rgba(255,255,255,.10); --fg: #f4f6ff; --fg2: #aab3d1; --fg3: #6f7aa0;
  --accent: #f5c542; --accent2: #ffde7a; --accent-ink: #1a1500; --green: #4ade80; --red: #ff6b7a; --blue: #6cb4ff;
  --shadow: 0 10px 30px rgba(0,0,0,.35); --r: 20px; --r2: 14px;
  --tabs-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --display: 'Montserrat X', 'Montserrat', system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
  --accent-txt: var(--accent); /* акцентный ЦВЕТ ТЕКСТА: в светлой теме темнее ради контраста */
  --ease: cubic-bezier(.22,.9,.3,1); --spring: cubic-bezier(.34,1.56,.64,1);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f3ea; --bg2: #fffdf6; --card: rgba(16,28,63,.05); --card2: rgba(16,28,63,.09);
  --line: rgba(16,28,63,.10); --fg: #141a33; --fg2: #3f4a6e; --fg3: #5f6885;
  --accent: #e0a800; --accent2: #ffcf3a; --accent-ink: #1a1500; --accent-txt: #8a6200; --green: #15803d; --red: #e11d48; --blue: #1d4ed8;
  --shadow: 0 10px 30px rgba(20,26,51,.10); color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.45;
  overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased;
  transition: background .35s var(--ease), color .35s var(--ease);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.1; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
b { font-weight: 700; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* фон: мягкие «орбы» как звёзды в роликах */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.o1 { width: 60vw; height: 60vw; left: -20vw; top: -10vh; background: #2a3f8f; }
.o2 { width: 50vw; height: 50vw; right: -15vw; top: 30vh; background: #6a4bd8; animation-delay: -6s; }
.o3 { width: 45vw; height: 45vw; left: 20vw; bottom: -10vh; background: #c89a1a; opacity: .25; animation-delay: -12s; }
[data-theme="light"] .o1 { background: #ffd48a; } [data-theme="light"] .o2 { background: #b9c7ff; } [data-theme="light"] .o3 { background: #ffe9a8; opacity: .5; }
@keyframes drift { to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* сплэш до загрузки скриптов */
.splash { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--bg); transition: opacity .4s ease, visibility .4s; }
.splash.hide { opacity: 0; visibility: hidden; }
.splash .logo { width: 72px; height: 72px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 40px; display: grid; place-items: center; animation: pulse 1.4s ease-in-out infinite; }
.splash .name { font-family: var(--display); font-size: 18px; color: var(--fg2); letter-spacing: .04em; }

/* экран */
.view { position: fixed; inset: 0; bottom: calc(var(--tabs-h) + var(--safe-b)); z-index: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.page { min-height: 100%; padding: calc(16px + var(--safe-t)) 16px 24px; max-width: 640px; margin: 0 auto; will-change: transform, opacity; }
.page.enter { animation: pageIn .38s var(--ease) both; }
.page.enter-back { animation: pageInBack .38s var(--ease) both; }
.page.leave { animation: pageOut .22s ease both; position: absolute; inset: 0; pointer-events: none; }
@keyframes pageIn { from { opacity: 0; transform: translate3d(40px,0,0); } to { opacity: 1; transform: none; } }
@keyframes pageInBack { from { opacity: 0; transform: translate3d(-40px,0,0); } to { opacity: 1; transform: none; } }
@keyframes pageOut { to { opacity: 0; transform: translate3d(-24px,0,0); } }
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .03s } .stagger > *:nth-child(2) { animation-delay: .08s } .stagger > *:nth-child(3) { animation-delay: .13s }
.stagger > *:nth-child(4) { animation-delay: .18s } .stagger > *:nth-child(5) { animation-delay: .23s } .stagger > *:nth-child(6) { animation-delay: .28s }
.stagger > *:nth-child(n+7) { animation-delay: .33s }
@keyframes rise { from { opacity: 0; transform: translate3d(0,14px,0); } to { opacity: 1; transform: none; } }

/* шапка */
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 40px; }
.back { width: 40px; height: 40px; border-radius: 12px; background: var(--card); display: grid; place-items: center; flex: none; transition: transform .15s; }
.back:active { transform: scale(.9); }
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.top h1 { flex: 1; min-width: 0; font-size: 22px; overflow-wrap: anywhere; }
.top .ico, .top .pill { flex: none; }
@media (max-width: 340px) { .top h1 { font-size: 20px; } .tab { font-size: 10px; } }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg2); font-weight: 700; margin-bottom: 6px; }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hello h1 { font-size: 26px; }
.hello .sub { color: var(--fg2); font-size: 14px; margin-top: 2px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ff8a5c); display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: var(--accent-ink); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* поиск */
.search { position: sticky; top: 0; z-index: 5; padding: 4px 0 10px; margin: -4px 0 6px; } /* 10.10 Игорь: без подложки-полосы вокруг рамки; читаемость при прокрутке даёт blur на самом поле */
.search label { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--bg) 72%, var(--card2)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; transition: box-shadow .2s, border-color .2s; }
.search label:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--fg2); stroke-width: 2.2; stroke-linecap: round; flex: none; }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: 16px; min-width: 0; }
.search input::placeholder { color: var(--fg3); }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search .clr { width: 26px; height: 26px; border-radius: 50%; background: var(--card2); display: none; place-items: center; font-size: 14px; color: var(--fg2); }
.search.has .clr { display: grid; }
.results { display: flex; flex-direction: column; gap: 8px; }
.results .hit { display: flex; gap: 12px; align-items: center; text-align: left; }
.hit mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.hit .kind { font-size: 11px; color: var(--fg3); text-transform: uppercase; letter-spacing: .08em; }
.empty { text-align: center; color: var(--fg3); padding: 40px 10px; }
.empty .big { font-size: 48px; margin-bottom: 8px; }

/* карточки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .15s var(--ease), background .2s; }
.card.tap:active { transform: scale(.985); background: var(--card2); }
.card + .card, .card + .list, .list + .card, .list + .list, .section + .section, .card + .grid3, .grid3 + .card, .grid3 + .grid3, .grid2 + .card, .card + .grid2, .seg + .card { margin-top: 12px; }
.card.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, var(--card)), var(--card)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card.glow { position: relative; overflow: hidden; }
.card.glow::after { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 60%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 80%); animation: spin 7s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.card.glow > * { position: relative; z-index: 1; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--fg2); font-size: 14px; }
.tiny { color: var(--fg3); font-size: 12px; }
.chev { width: 18px; height: 18px; fill: none; stroke: var(--fg3); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--card2); flex: none; }
.ico.lg { width: 56px; height: 56px; font-size: 28px; border-radius: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--card2); font-size: 12px; font-weight: 700; color: var(--fg2); }
.pill.acc { background: var(--accent); color: var(--accent-ink); }
.pill.ok { background: color-mix(in srgb, var(--green) 25%, transparent); color: var(--green); }
.pill.soon { background: color-mix(in srgb, var(--blue) 20%, transparent); color: var(--blue); }
.section { margin-top: 20px; }
.section > h2 { margin-bottom: 10px; display: flex; align-items: baseline; justify-content: space-between; }
.section > h2 .more { font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--accent-txt); }
.list { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border-radius: 18px; padding: 14px; background: var(--card); border: 1px solid var(--line); min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; transition: transform .15s var(--ease); }
.tile:active { transform: scale(.96); }
.tile .num { font-family: var(--display); font-size: 30px; line-height: 1; }
.tile .lbl { font-size: 13px; color: var(--fg2); }
.tile .dot { position: absolute; right: -14px; top: -14px; width: 56px; height: 56px; border-radius: 50%; opacity: .35; }
.tile.active { border-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 14px; font-weight: 700; background: var(--accent); color: var(--accent-ink); transition: transform .15s var(--ease), filter .2s; width: 100%; }
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn.ghost { background: var(--card2); color: var(--fg); }
.btn.sm { width: auto; padding: 9px 14px; font-size: 14px; }
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; padding: 9px 10px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--fg2); transition: background .2s, color .2s; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

/* прогресс-кольцо */
.ring { width: 76px; height: 76px; position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: var(--accent); stroke-dasharray: 201; stroke-dashoffset: 201; transition: stroke-dashoffset 1.1s var(--ease); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 17px; }
/* 25.10 (TG 5656): полоска уровня + дни недели с буквами, чтобы серию не путали с уровнем */
.lvl-line { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; margin-top: 6px; font-weight: 700; font-size: 14px; }
.lvl-line > span { white-space: nowrap; }
.pbar.home-lvl { height: 7px; margin-top: 5px; }
.streak { display: flex; gap: 6px; margin-top: 10px; }
.streak span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.streak i { width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.streak b { font-size: 10px; font-weight: 700; color: var(--fg3); line-height: 1; }
.streak .on i { background: var(--green); }
.streak .today i { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.streak .today b { color: var(--fg); }
.bar-line { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-line i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; transition: width .9s var(--ease); }

/* теория */
.prose { font-size: 16px; line-height: 1.55; }
.prose p { margin: 0 0 10px; }
.player.inline { margin: 4px 0 14px; }
.ex .player.inline { margin: 8px 0 10px; background: var(--bg); }
.tldr { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.3; padding: 14px 16px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 0 var(--r2) var(--r2) 0; margin-bottom: 12px; }
.ex { background: color-mix(in srgb, var(--green) 9%, var(--card2)); border-left: 3px solid var(--green); border-radius: var(--r2); padding: 12px 14px; margin-top: 10px; }
.ex .eyebrow { color: var(--green); }
.ex .eyebrow { margin-bottom: 4px; }
.ex p { margin: 0 0 8px; } .ex p:last-child { margin: 0; }
.ex.pit { border-left: 3px solid var(--red); background: color-mix(in srgb, var(--red) 9%, var(--card2)); } .ex.pit .eyebrow { color: var(--red); }
/* математика как в учебнике: дробь столбиком, корень с чертой */
.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: .5em; line-height: 1; margin: 0 2px; font-size: .84em; text-align: center; } /* базовая линия inline-flex = числитель → поднимаем, чтобы черта легла на ось строки */
.fr > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 3px 1px; align-self: stretch; } /* черта во всю ширину дроби, даже если знаменатель длиннее */
.fr > span:last-child { padding: 1px 3px 0; }
.fr > span:last-child:has(.vec) { padding-top: .8em; } /* стрелка вектора в знаменателе не залезает на черту и в числитель (TG 6474) */
sup .fr { font-size: .8em; vertical-align: .9em; margin: 0 1px; } sup .fr > span:first-child { border-bottom-width: 1.2px; padding: 0 2px 1px; } sup .fr > span:last-child { padding: 1px 2px 0; } /* дробь в показателе (TG 5277): мельче и выше строки */
.nw { white-space: nowrap; }
.vec { position: relative; display: inline-block; line-height: 1; }
.vec::before { content: '→'; position: absolute; left: 50%; bottom: 1.04em; transform: translateX(-50%); font-size: .8em; line-height: 1; font-weight: 400; }
.rt { display: inline-block; position: relative; vertical-align: baseline; white-space: nowrap; margin-left: .06em; padding-left: .48em; }
.rt .rs { position: absolute; left: 0; top: 0; width: .5em; height: 100%; overflow: visible; }
.rt .rs path { fill: none; stroke: currentColor; stroke-width: .085em; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rt .rb { display: inline-block; border-top: .085em solid currentColor; padding: .02em .08em 0 .06em; line-height: 1.08; }
.rt .rb .fr { vertical-align: -0.35em; }
sub, sup { line-height: 0; font-size: .72em; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
/* пошаговый плеер анимаций (js/anims.js) */
.player { border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); margin: 12px 0; overflow: hidden; box-shadow: var(--shadow); }
.pl-svg { aspect-ratio: 16 / 10; width: 100%; cursor: pointer; position: relative; background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%); }
.pl-svg svg { width: 100%; height: 100%; display: block; }
.pl-bar { display: flex; gap: 4px; padding: 0 14px; }
.pl-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.pl-bar i.on { background: var(--accent); }
.pl-bar i.cur::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); animation: plFill var(--dur, 3s) linear forwards; }
.player.paused .pl-bar i.cur::after { animation-play-state: paused; }
@keyframes plFill { to { transform: scaleX(1); } }
.pl-cap { padding: 12px 14px 4px; font-size: 15px; line-height: 1.45; min-height: 96px; }
.pl-cap b { color: var(--accent2); }
[data-theme="light"] .pl-cap b { color: #9a6d00; }
.pl-cap .pl-n { font-family: var(--display); color: var(--accent-txt); margin-right: 8px; font-size: 13px; }
.pl-cap { padding-bottom: 14px; }
.pl-svg::before, .pl-svg::after { content: ''; position: absolute; top: 0; bottom: 0; width: 33%; opacity: 0; pointer-events: none; }
.pl-svg::before { left: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.pl-svg::after { right: 0; background: linear-gradient(-90deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.pl-svg.tap-l::before, .pl-svg.tap-r::after { animation: tapFlash .45s ease-out forwards; }
@keyframes tapFlash { from { opacity: 1; } to { opacity: 0; } }
.pl-state { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--fg); border-radius: 50%; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(6px); }
.pl-state.show { opacity: 1; }
.pl-svg.tap-c .pl-state.show { animation: pop .35s var(--spring); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--fg2); transition: background .2s, color .2s, transform .15s; scroll-snap-align: start; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip:active { transform: scale(.95); }
.done-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #052e16; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; }

/* решения — пошаговый тест */
.task-text { font-size: 17px; line-height: 1.5; font-weight: 600; }
.steps { display: flex; gap: 6px; margin: 14px 0; }
.steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transition: background .3s; }
.steps i.cur { background: var(--accent); } .steps i.ok { background: var(--green); } .steps i.bad { background: var(--red); } .steps i.warn { background: #ff9f43; }
/* разбор: полоски шагов кликабельные — зона нажатия выше самой полоски (Игорь, 14.10 TG 5079) */
.steps.tap { margin: 6px 0; }
.steps.tap i { height: 18px; background: none !important; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.steps.tap i::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: background .3s; }
.steps.tap i.cur::after { background: var(--accent); } .steps.tap i.ok::after { background: var(--green); }
.q { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 6px 0 12px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: transform .15s var(--ease), background .25s, border-color .25s; animation: rise .4s var(--ease) both; }
.opt .k { width: 28px; height: 28px; border-radius: 9px; background: var(--card2); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.opt:active { transform: scale(.98); }
.opt.ok { background: color-mix(in srgb, var(--green) 18%, var(--card)); border-color: var(--green); }
.opt.bad { background: color-mix(in srgb, var(--red) 16%, var(--card)); border-color: var(--red); animation: shake .4s; }
.opt.dim { opacity: .45; }
@keyframes shake { 20%,60% { transform: translateX(-5px) } 40%,80% { transform: translateX(5px) } }
.why { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--card2); font-size: 15px; animation: rise .35s var(--ease) both; }
.why.ok { border-left: 3px solid var(--green); } .why.bad { border-left: 3px solid var(--red); }
.why.hint { border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card2)); }
.why.calc { border-left: 3px solid var(--blue); font-family: var(--display); font-weight: 700; font-size: 16px; }
.why.calc .eyebrow { font-family: var(--body); margin-bottom: 4px; }
.why + .why { margin-top: 8px; }
.tstep { scroll-margin-top: 72px; }
.tstep + .tstep { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.tstep.past .opt { animation: none; }
/* форматы шага (Игорь, 15.10 TG 5344): варианты-рисунки, сопоставление тапами, ввод числа */
.opts.picgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt.pic { position: relative; display: block; padding: 6px 6px 2px; }
.opt.pic .k { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; font-size: 12px; }
svg.pic text.pt { stroke: var(--bg); stroke-width: 5px; paint-order: stroke; stroke-linejoin: round; }
.opt.pic .pic { width: 100%; height: auto; display: block; }
.opt.pic:has(.pic-t) { padding-top: 36px; } .opt.pic .pic-t { position: absolute; top: 10px; right: 12px; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--fg2, inherit); } /* номер рисунка сборника (ОГЭ №13), справа сверху — буква слева */
svg.pic .pa { stroke: currentColor; opacity: .55; stroke-width: 2; } svg.pic .pn { fill: currentColor; font: 700 13px var(--body); text-anchor: middle; }
svg.pic .pb { fill: none; stroke-width: 3; stroke-linecap: round; } svg.pic .pt { font: 800 13px var(--body); text-anchor: middle; }
.mt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-col { display: flex; flex-direction: column; gap: 8px; }
.mt-b { padding: 12px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 17px; text-align: center; color: inherit; transition: background .2s, border-color .2s, opacity .2s; animation: rise .4s var(--ease) both; }
.mt-b.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.mt-b.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 16%, var(--card)); animation: shake .4s; }
.mt-b.ok { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, var(--card)); }
.mt-b.dim { opacity: .4; } .mt-b:disabled { cursor: default; }
.c0 { --pc: var(--green); } .c1 { --pc: var(--blue); } .c2 { --pc: #a78bfa; } .c3 { --pc: #f472b6; }
svg.pic .c0 { stroke: var(--accent); fill: var(--accent); } svg.pic .c1 { stroke: var(--blue); fill: var(--blue); } svg.pic .pb { fill: none; }
.mt-tip { margin-top: 8px; text-align: center; }
.inp-row { display: flex; align-items: center; gap: 10px; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 22px; }
.inp-box { min-width: 120px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--accent); font-size: 24px; text-align: center; display: flex; align-items: center; justify-content: center; min-height: 52px; }
.inp-box.bad { border-color: var(--red); animation: shake .4s; } .inp-box.ok { border-color: var(--green); background: color-mix(in srgb, var(--green) 16%, var(--card)); }
.inp-box.reveal { animation: reveal 1.2s var(--ease) 1; }
.inp-caret { width: 2px; height: 26px; background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; } .inp-box.ok .inp-caret { display: none; }
.inp:not(.multi) .inp-row + .inp-row { margin-top: 10px; } .inp-box { cursor: pointer; } .inp:has(.inp-row + .inp-row) .inp-box:not(.act):not(.ok) { border-color: var(--line); } .inp:has(.inp-row + .inp-row) .inp-box:not(.act) .inp-caret { display: none; }
@keyframes blink { 50% { opacity: 0 } }
.kpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.kp { padding: 13px 0; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 20px; font-weight: 700; color: inherit; }
.kp:active { transform: scale(.96); } .kp.w2 { grid-column: span 2; } .kp.go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 16px; }
.fl-f { font-family: var(--display); font-weight: 700; font-size: 22px; text-align: center; line-height: 2.2; padding: 8px 0; }
.fl-slot { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 40px; padding: 0 8px; margin: 0 3px; vertical-align: middle; border: 2px dashed var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); cursor: pointer; transition: background .2s, border-color .2s; }
.fl-slot.sel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.fl-slot.full { border-style: solid; background: var(--card2); } .fl-slot.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 16%, var(--card)); animation: shake .4s; }
.fl-slot.ok { border-color: var(--green); border-style: solid; background: color-mix(in srgb, var(--green) 16%, var(--card)); } .fl-slot.reveal { animation: reveal 1.2s var(--ease) 1; }
.fl-tray { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.fl-tile { min-width: 52px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 19px; font-weight: 700; color: inherit; touch-action: none; user-select: none; -webkit-user-select: none; animation: rise .4s var(--ease) both; }
.fl-tile.used { visibility: hidden; }
.fl-ghost { position: fixed; z-index: 99; transform: translate(-50%, -60%); pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.25); border-color: var(--accent); background: var(--bg2); }
.ord-done:empty { display: none; } .ord-done { margin-bottom: 8px; } .ord-pool { margin-top: 0; }
.tf-row { padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.tf-row.ok { border-color: var(--green); } .tf-row.bad { border-color: var(--red); }
.tf-t { font-size: 17px; text-align: center; margin-bottom: 10px; }
.tf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tf-b { padding: 10px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); font-weight: 700; color: inherit; }
.tf-b.ok { border-color: var(--green); background: color-mix(in srgb, var(--green) 18%, var(--card)); } .tf-b.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 16%, var(--card)); animation: shake .4s; } .tf-b.dim { opacity: .4; }
.tf-why { font-size: 14px; margin-top: 8px; } .tf-why:empty { display: none; }
.ln-box { padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; } .ln-box.bad { border-color: var(--red); animation: shake .4s; } .ln-box.ok { border-color: var(--green); cursor: default; }
.ln-box.reveal { animation: reveal 1.2s var(--ease) 1; }
svg.ln .ln-pt { fill: var(--accent); } svg.ln .ln-seg { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; opacity: .7; } svg.ln .ln-v { fill: var(--accent); }
.ln-box.ok svg.ln .ln-pt, .ln-box.ok svg.ln .ln-v { fill: var(--green); } .ln-box.ok svg.ln .ln-seg { stroke: var(--green); }
.hintrow { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.hintrow .btn.sm:disabled { opacity: .6; }
.opt.bad { pointer-events: none; }
.opt.reveal { animation: reveal 1.2s var(--ease) 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 30%, transparent); }
@keyframes reveal { 0%, 100% { transform: none; } 15% { transform: scale(1.03); } 30% { transform: none; } 45% { transform: scale(1.03); } }
.card.sol.warn { border-color: color-mix(in srgb, var(--red) 50%, var(--line)); }
.card.sol .ico { width: 32px; height: 32px; border-radius: 10px; font-family: var(--display); font-size: 15px; }
.result { text-align: center; padding: 24px 10px; }
.result .big { font-size: 64px; animation: pop .6s var(--spring) both; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }

/* рисунок к заданию: вырезка из сборника, чёрные линии на прозрачном фоне; в тёмной теме инвертируем */
.fig { margin-top: 12px; text-align: center; }
.ctable-wrap { overflow-x: auto; margin: 10px 0 2px; text-align: center; }
.ctable { border-collapse: collapse; display: inline-table; font-size: 16px; }
.ctable th, .ctable td { border: 1.5px solid color-mix(in srgb, currentColor 35%, transparent); padding: 6px 10px; text-align: center; white-space: nowrap; }
.ctable th { font-weight: 700; }
.fig img { max-width: min(100%, 380px); max-height: 280px; display: inline-block; }
.fig.sm img { max-width: min(100%, 300px); max-height: 220px; }
.fig.plan { margin: 12px 0 4px; } .fig.plan img { max-width: 100%; max-height: none; width: min(100%, 420px); }
@media (min-width: 900px) { .fig.plan img { width: min(100%, 640px); } } /* план участка ОГЭ №1–5 крупнее на ПК (Игорь 03.11 TG 6562) */
.cond-opts { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin-top: 6px; } .cond-opts > span { white-space: nowrap; } /* варианты ответа в строку (TG 6562) */
.fig.wide img { width: 100%; max-width: 560px; max-height: none; } /* числовая прямая — во всю ширину, как в сборнике (TG 6562) */
[data-theme="dark"] .fig img { filter: invert(1) brightness(.92); }
.fig.bg img { background: #fff; border-radius: 12px; padding: 8px; }
.found { display: none; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card2); }
.found.open { display: flex; animation: pop .25s var(--spring) both; }
.hintrow .btn.on { border-color: var(--accent); color: var(--accent); }
.found .pill { display: inline-block; font-size: 12px; padding: 4px 9px; color: var(--fg); line-height: 1.5; }
[data-theme="dark"] .fig.bg img { filter: none; }
/* разбор по шагам */
.walk .wq { font-size: 13px; color: var(--fg2); font-weight: 700; margin-bottom: 4px; }
.walk.cur { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.walk .why.calc { font-size: 15px; }

/* профиль */
.setting { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--card2); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch.on { background: var(--green); } .switch.on::after { transform: translateX(20px); }

/* выбор класса в профиле */
.grades { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
.gbtn { aspect-ratio: 1; border-radius: 13px; background: var(--card2); font-family: var(--display); font-weight: 800; font-size: 17px; display: grid; place-items: center; color: var(--fg2); transition: transform .25s var(--spring), background .2s, box-shadow .2s, color .2s; }
.gbtn:active { transform: scale(.9); }
.gbtn.on { background: var(--gc); color: #1a1500; transform: scale(1.08); box-shadow: 0 6px 18px color-mix(in srgb, var(--gc) 55%, transparent); }

/* таб-бар */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b); z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--fg3); font-size: 10.5px; min-width: 0; font-weight: 600; position: relative; z-index: 1; transition: color .25s, transform .2s var(--spring); }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--spring); }
.tab.on { color: var(--accent-txt); } .tab.on svg { transform: translateY(-2px) scale(1.08); }
.tab:active svg { transform: scale(.85); }
.tab-pill { position: absolute; top: 6px; height: 4px; width: 28px; border-radius: 2px; background: var(--accent); left: 0; transform: translateX(calc(10vw - 14px)); transition: transform .35s var(--spring); }

/* тост */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px); opacity: 0; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 20; pointer-events: none; transition: all .3s var(--ease); max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* анимации теории (svg) */
.sv-stroke { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sv-text { font-family: var(--display); font-weight: 800; fill: var(--fg); }
.sv-dim { fill: var(--fg3); }
.draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s var(--ease) forwards; }
.pl-svg .draw { animation-duration: 2.3s; } /* плеер медленнее (Игорь, 13.10) */
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade { opacity: 0; animation: fadeIn .5s ease forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.slide { animation: slideIn .7s var(--spring) both; }
@keyframes slideIn { from { transform: translateX(-40px); opacity: 0; } }
.pulse { animation: pulse 1.6s ease-in-out infinite; transform-origin: center; }
.in { animation: svgIn .55s var(--ease) both; transform-box: fill-box; transform-origin: center; }
.pl-svg .in { animation-duration: .9s; }
@keyframes svgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
text.hi { fill: var(--accent) !important; animation: hiPulse 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
rect.hi, circle.hi { stroke: var(--accent) !important; stroke-width: 3 !important; }
@keyframes hiPulse { 50% { transform: scale(1.14); } }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ===== десктоп: Telegram Desktop на весь экран (Игорь, 10.10 — «полезная инфа только по центру») =====
   ≥ 900px: навигация — боковая панель слева, страницы шире, главная и теория — в две колонки, списки — в две. */
.brand { display: none; }
@media (min-width: 900px) {
  .page > .stagger.inline-anim { max-width: 760px; } /* встроенные плееры: одна читаемая колонка */
  :root { --rail: 236px; }
  .tabs { left: 0; right: auto; top: 0; bottom: 0; width: var(--rail); height: auto; padding: 22px 14px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); }
  .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .02em; }
  .brand .logo { width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 20px; flex: none; }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; font-size: 15px; transition: background .2s, color .2s; }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { background: var(--card2); }
  .tab.on svg, .tab:active svg { transform: none; }
  .tab:hover:not(.on) { background: var(--card); color: var(--fg2); }
  .tab-pill { display: none; }
  .view { left: var(--rail); bottom: 0; }
  .view::-webkit-scrollbar { width: 10px; } .view::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
  .page { max-width: 1120px; padding: 28px 40px 40px; }
  .toast { left: calc(50% + var(--rail) / 2); bottom: 28px; }
  .chips { margin: 0; padding-left: 0; padding-right: 0; }
  .search { max-width: 720px; }
  .seg { max-width: 440px; }
  .hello h1 { font-size: 32px; } .top h1 { font-size: 28px; }
  .top { margin-bottom: 18px; }

  /* главная: слева прогресс → задача дня → фишка, справа быстрый старт и новости */
  #homeBody { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; grid-template-areas: "hero quick" "task news" "fact news" ". news"; gap: 16px 20px; }
  #homeBody > * { margin-top: 0 !important; }
  #homeBody > :nth-child(1) { grid-area: hero; } #homeBody > :nth-child(2) { grid-area: task; } #homeBody > :nth-child(3) { grid-area: fact; }
  #homeBody > :nth-child(4) { grid-area: news; } #homeBody > :nth-child(5) { grid-area: quick; }
  #homeBody .list { grid-template-columns: 1fr; }

  /* списки тем/задач/форматов — в две колонки; карточки в ряду одной высоты */
  .page > .list, .page > .stagger > .section > .list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
  .page > .list > *, .page > .stagger > .section > .list > * { margin-top: 0 !important; }
  .page > .list > .empty { grid-column: 1 / -1; }
  /* классы в шпаргалке — одним рядом */
  .page > .grid3 { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
  .page > .stagger > .grid3 { max-width: 560px; }
  .grades { max-width: 520px; }

  /* теория: плеер слева (липнет при прокрутке), текст справа */
  .page > .stagger:has(> .player) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .page > .stagger:has(> .player) > .tldr, .page > .stagger:has(> .player) > .lead { grid-column: 1 / -1; }
  .page > .stagger:has(> .player) > .player { grid-column: 1; grid-row: 2 / span 6; margin: 0; position: sticky; top: 0; }
  .page > .stagger:has(> .player) > :not(.tldr):not(.player) { grid-column: 2; }
  .page > .stagger:has(> .player) > .prose { margin-top: 0; }

  /* задача и фишка дня — читаемая колонка */
  .page[data-route^="solve/task/"], .page[data-route^="review/task/"], .page[data-route^="home/fact/"] { max-width: 860px; }
}
@media (min-width: 1700px) {
  .page { max-width: 1320px; }
}
/* мышь: курсор и подсветка наведения */
@media (hover: hover) and (pointer: fine) {
  .card.tap, .tile, .btn, .chip, .gbtn, .opt, .seg button, .switch, .back, .hit, [data-go] { cursor: pointer; }
  .card.tap:hover, .tile:hover { background: var(--card2); }
  .opt:not(.dim):not(.ok):not(.bad):hover { background: var(--card2); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
  .btn:hover { filter: brightness(1.06); }
  .chip:not(.on):hover, .gbtn:not(.on):hover { color: var(--fg); }
}
/* «Подробнее» у шага задачи (Игорь, 12.10): простая арифметика свёрнута */
details.more { margin-top: 8px; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; color: var(--blue); padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 12%, transparent); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '▾'; transition: transform .2s; }
details.more[open] > summary::after { transform: rotate(180deg); }
details.more .calc { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: var(--card2); border-left: 3px solid var(--blue); font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.7; animation: rise .3s var(--ease) both; }
.player.step { margin: 10px 0 4px; }
/* Разбор: один шаг на экран + «Сейчас имеем» сверху (Игорь, 12.10 TG 4892) */
.wk .card { padding: 16px; }
.wk-cond > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wk-cond > summary::-webkit-details-marker { display: none; }
.wk-cond-t { font-size: 13px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.wk-cond-t::after { content: ' ▾'; }
.wk-cond[open] .wk-cond-t::after { content: ' ▴'; }
.wk-cond[open] > summary { margin-bottom: 8px; }
.wk-have { margin-top: 12px; border-left: 3px solid var(--green); background: color-mix(in srgb, var(--green) 9%, var(--card)); }
.wk-have.pop { animation: rise .45s var(--ease) both; }
.wk-res { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.6; margin-top: 4px; }
.wk-step { margin-top: 12px; }
.wk-step.enter { animation: rise .35s var(--ease) both; }
.wk-q { font-size: 18px; color: var(--fg); font-weight: 800; margin: 6px 0 8px; line-height: 1.35; } /* название шага — не мелким серым (Игорь, TG 4999) */
.wk-act { font-size: 19px; font-weight: 700; line-height: 1.65; }
.wk-rule { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--card2)); border-left: 3px solid var(--accent); font-size: 16px; line-height: 1.6; }
.wk-rule .eyebrow { display: block; margin-bottom: 2px; }
.wk .why.calc { font-size: 17px; line-height: 1.65; margin-top: 12px; }
.wk-nav { display: flex; gap: 10px; margin-top: 14px; }
.wk-nav .btn { flex: 1; }
.wk-all { display: block; margin: 12px auto 0; }
.wk .list .wk-step { margin-top: 0; }
/* чертежи SL_GEO (12.10): свой движок, 3D крутится пальцем */
.geo { position: relative; border-radius: var(--r); background: var(--bg2); border: 1px solid var(--line); margin: 12px 0; overflow: hidden; }
.geo svg { display: block; width: 100%; height: auto; cursor: grab; user-select: none; -webkit-user-select: none; }
.geo-hint { position: absolute; right: 10px; top: 8px; font-size: 12px; font-weight: 700; color: var(--fg3); pointer-events: none; transition: opacity .4s; }
.geo.used .geo-hint { opacity: 0; }
.geo-pulse { animation: geoPulse 1.6s ease-in-out infinite; }
/* Игорь 15.10 TG 5281: наложенные подсветки — по очереди (2,6 с на фигуру, плавно), без смешения цветов */
.geo-alt2 { opacity: 0; animation: geoAlt2 5.2s ease-in-out infinite; } .geo-alt3 { opacity: 0; animation: geoAlt3 7.8s ease-in-out infinite; }
@keyframes geoAlt2 { 0% { opacity: 0; } 9% { opacity: 1; } 41% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes geoAlt3 { 0% { opacity: 0; } 6% { opacity: 1; } 27% { opacity: 1; } 33% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .geo-alt2, .geo-alt3 { animation: none; opacity: 1; } }
@keyframes geoPulse { 50% { opacity: .55; } }
.fr > span:last-child:has(.rt) { padding-top: 4px; } .fr > span:first-child:has(.rt) { padding-bottom: 3px; }
.wk-calc { margin-top: 10px; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.7; color: var(--fg); }
.ss { display: inline-block; vertical-align: -0.4em; line-height: 1; font-size: .72em; margin-left: 1px; text-align: left; } .ss sup, .ss sub { display: block; font-size: 1em; vertical-align: 0; line-height: 1.05; } /* log_{a}^{2}, C_{n}^{k}: верхний над строкой, нижний под ней (TG 5195) */
/* корень над дробью (Игорь, TG 4910): глиф √ не растягивается — рисуем знак маской на всю высоту подкоренного выражения, верх знака = черта */
/* (старая маска √ над дробью не нужна: знак корня теперь SVG-линия на всю высоту, TG 5197) */
.rt:has(> .rb .fr) .rb { padding-top: 2px; margin-left: 0; }
.rt .rb .fr { vertical-align: middle; }

/* ---- правки Игоря 13.10 (TG 4953) ---- */
/* жёлтым — только формулы; пояснение под ними на обычном фоне; зелёный — пример, красный — внимание/частая ошибка */
.tldr.fbox { text-align: center; font-size: 20px; line-height: 1.7; }
.lead { font-size: 16px; line-height: 1.5; margin: 0 0 12px; color: var(--fg); }
.call { border-radius: var(--r2); padding: 12px 14px; margin: 10px 0; line-height: 1.55; }
.call.red { background: color-mix(in srgb, var(--red) 10%, var(--card2)); border-left: 3px solid var(--red); }
.call.green { background: color-mix(in srgb, var(--green) 9%, var(--card2)); border-left: 3px solid var(--green); }
.call.yel { background: color-mix(in srgb, var(--accent) 12%, transparent); border-left: 4px solid var(--accent); font-family: var(--display); font-weight: 700; font-size: 18px; text-align: center; }
/* подчёркивание «от руки» и подсветка */
.ul { background: linear-gradient(var(--blue), var(--blue)) no-repeat 0 100% / 0 2.5px; padding-bottom: 3px; border-radius: 2px; animation: ulDraw 1.1s var(--ease) .4s forwards; }
@keyframes ulDraw { to { background-size: 100% 2.5px; } }
.hl { background: color-mix(in srgb, var(--blue) 20%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 55%, transparent); border-radius: 6px; padding: 0 3px; }
/* Игорь 26.10 TG 5757: [hl2]/[hl3] и в основном потоке — зелёный/фиолетовый (в.11 №13: проценты зелёным, долг синим, как в сцене) */
.hl.hl2 { background: color-mix(in srgb, var(--green) 20%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 55%, transparent); }
.hl.hl3 { background: color-mix(in srgb, #b388ff 20%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, #b388ff 55%, transparent); }
/* кнопки под шагом в ряд: «Формулы» и «Подробнее» */
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.btnrow:empty { display: none; }
.btnrow > details { flex: 0 1 auto; }
.btnrow > details[open] { flex-basis: 100%; }
details.more.rule > summary { color: var(--accent-txt, var(--accent)); background: color-mix(in srgb, var(--accent) 14%, transparent); }
details.more.rule .calc { border-left-color: var(--accent); }
.rule-i + .rule-i { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.rule-n { font-family: var(--body); font-weight: 700; font-size: 16px; color: var(--fg); margin-bottom: 4px; } /* название правила — обычным цветом, не мелким серым (TG 5084) */
.rule-f { margin-bottom: 4px; } .rule-f:last-child { margin-bottom: 0; }
.rule-t { font-family: var(--body); font-weight: 500; font-size: 16px; line-height: 1.5; color: var(--fg); margin-top: 4px; }
.rule-link { display: block; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
.rule-arr { font-weight: 600; font-size: 13px; color: var(--accent-txt, var(--accent)); white-space: nowrap; }
/* подстановка (Игорь, 13.10 TG 4962): без фона и перелёта — обводка, key плавно тает, на его месте проявляется выражение */
.sub { position: relative; margin: 10px 0 4px; font-weight: 700; font-size: 18px; line-height: 1.8; }
.sub-ln { padding: 2px 3px; } /* длинные строки переносятся (№14) */
.sub-more .sub { text-align: center; margin-top: 8px; } .sub-more .sub-cap { padding: 0 36px; } /* подстановка по центру (TG 5096) */
.sub-def { margin-top: 2px; }
/* Игорь, 14.10 TG 5005 «анимация храмает»: одна рамка-слот, в ней key и выражение лежат друг на друге;
   рамка плавно меняет ширину с key на выражение, key тает, выражение проявляется — ничего не обрезается и не прыгает */
.sub { --c0: var(--blue); --c1: #b388ff; --c2: var(--accent); --c3: var(--green); --sc: var(--c0); }
[data-theme="light"] .sub { --c1: #7c3aed; }
.c1 { --sc: var(--c1); } .c2 { --sc: var(--c2); } .c3 { --sc: var(--c3); }
.sub-slot, .sub-k2, .sub-by { display: inline-block; position: relative; isolation: isolate; padding: 0 4px; }
/* Игорь, 14.10 TG 5006: не обводка, а маркер — полупрозрачная полоса цвета замены прорисовывается слева направо */
.sub-slot::before, .sub-k2::before, .sub-by::before { content: ''; position: absolute; z-index: -1; left: 0; right: 0; top: 14%; bottom: 8%; border-radius: 5px 3px 6px 3px; background: color-mix(in srgb, var(--sc) 38%, transparent); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.sub-by::before { transition-delay: .5s; }
[data-theme="light"] .sub-slot::before, [data-theme="light"] .sub-k2::before, [data-theme="light"] .sub-by::before { background: color-mix(in srgb, var(--sc) 30%, transparent); }
.sub-slot { display: inline-grid; vertical-align: baseline; } /* TG 5013: форма маркера постоянная (по большему из двух), только выцветание/появление — текст не разносит */
.sub-slot > span { grid-area: 1 / 1; justify-self: center; white-space: nowrap; }
.sub-slot:has(.fr) { vertical-align: middle; } .sub-slot:has(.fr) > span { align-self: center; } /* TG 6950: и новое значение (0,5 вместо sin 5π/6) — по центру высокой ячейки, не у верха */ /* Игорь 05.11 TG 6700: key («sin α») до замены стоял у верха высокой ячейки дроби — «плыл» вверх */ /* Игорь 04.11 TG 6613 (в.17 №17 ш6): baseline сетки брался по скрытому key («z») — подставленная дробь уезжала вниз */
/* TG 6512: в WebKit подстановка в числителе дроби рвалась на строки «0,58·(−» / «√3» / «)» — числитель и знаменатель дроби в подстановке не переносим */
.sub .fr > span, .sub-slot, .sub-new, .sub-key { white-space: nowrap; }
.sub .fr > span { flex-wrap: nowrap; }
.sub-key { transition: opacity .7s ease; }
.sub-new { opacity: 0; transition: opacity 1.1s ease; }
.sub.p1 .sub-slot::before, .sub.p1 .sub-k2::before, .sub.p1 .sub-by::before { transform: scaleX(1); }
.sub.p2 .sub-key { opacity: 0; }
.sub.p2b .sub-new { opacity: 1; } /* сначала key тает, потом на том же месте проявляется выражение */
.sub-cap { min-height: 22px; margin-top: 4px; padding-right: 36px; font-weight: 600; font-size: 14px; line-height: 1.45; color: var(--blue); opacity: 0; }
.sub-cap.show { animation: rise .6s var(--ease) both; opacity: 1; }
.sub-re { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--card2); color: var(--fg2); font-size: 15px; }
.wk-act.long { font-size: 16.5px; font-weight: 500; line-height: 1.55; } /* длинное «зачем» — обычным текстом, не крупным жирным */
.calc-note { display: block; margin: 10px 0 2px; font-family: var(--body); font-weight: 500; font-size: 17px; line-height: 1.5; color: var(--fg); text-align: left; } /* пояснение словами — обычный абзац */
.calc-f { text-align: center; margin: 2px 0; } /* выражение — отдельной строкой по центру (TG 5083) */
.wk-calc > .calc-note:first-child { margin-top: 0; }
.wk-ans { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--display); font-weight: 800; font-size: 20px; }
.player.paused .pl-svg svg * { animation-play-state: paused !important; } /* пауза останавливает и рисование внутри кадра (Игорь, 13.10 TG 4978) */
.wk-calc .fr, .sub-ln .fr, details.more .calc .fr { margin: 5px 2px; } /* дроби в соседних строках не слипаются (№15) */

/* «Что уже знаем» вместо «Сейчас имеем» (Игорь, 14.10 TG 5016): под кнопкой — дано и найденное зелёным, выраженное через неизвестные жёлтым */
.wk-know { margin-top: 12px; padding: 0; }
.wk-know > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.wk-know > summary::-webkit-details-marker { display: none; }
.wk-know > summary::after { content: '▾'; margin-left: auto; color: var(--fg3); transition: transform .25s; }
.wk-know[open] > summary::after { transform: rotate(180deg); }
.kn-body { padding: 0 16px 14px; animation: rise .3s var(--ease) both; }
.kn-h { font-size: 12px; font-weight: 700; color: var(--fg3); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 4px; }
.kn-i { display: inline-block; margin: 3px 4px 3px 0; padding: 3px 10px; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.6; }
.kn-i.g { background: color-mix(in srgb, var(--green) 16%, transparent); box-shadow: inset 3px 0 0 var(--green); }
.kn-i.y { background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.geo-val { paint-order: stroke; stroke: var(--bg2); stroke-width: 2.5px; stroke-linejoin: round; } /* TG 6148: ореол тоньше */

.back-sol { display: block; width: 100%; margin: 0 0 12px; } /* возврат из шпаргалки к шагу решения (TG 5099) */
/* поток шага (Игорь, 14.10, исправления в.3): система под фигурной скобкой, умножение в столбик, «Подробнее» в любом месте хода */
.calc-sys { display: table; position: relative; margin: 4px auto; padding-left: 18px; }
.sys-br { position: absolute; left: 0; top: 4px; width: 12px; height: calc(100% - 8px); overflow: visible; }
.sys-br path { fill: none; stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.sys-in > .calc-f { text-align: left; }
.col-mul { display: table; margin: 6px auto; font-variant-numeric: tabular-nums; white-space: pre; text-align: right; line-height: 1.45; }
.col-mul hr { border: 0; border-top: 2px solid currentColor; margin: 2px 0; }
.col-mul .cm-op { position: relative; } .col-mul .cm-op > span { position: absolute; left: -1.1em; }
.col-mul .cm-res { color: var(--blue); }
details.more.inl { margin: 6px 0 4px; }
details.more.inl .inl-calc { font-size: 17px; }
details.more.inl .calc-note { font-size: 15px; margin: 6px 0 2px; }
details.more.inl .calc-note.side-lbl { font-weight: 600; margin-top: 10px; } /* Игорь 05.11 TG 6699: «Левая часть:» / «Правая часть:» в ходе */
/* Игорь, 14.10 TG 5183: переменные в тексте словами — шрифтом формул, жирно (латинская y ≠ русская «у») */
.mv { font-family: var(--display); font-weight: 700; }
.mv:has(.fr) { white-space: nowrap; } /* TG 6971: дробь и знак неравенства после неё не разрываются по строкам («≤ 1» не уезжает вниз) */
/* Игорь, 14.10 TG 5190: тело, объём которого считаем, — заливка всех граней, 3 с видно / 3 с нет */
.geo-blink { animation: geoBlink 5s ease-in-out infinite; } /* 15.10 TG 5274: плавно, раз в 5 с */
@keyframes geoBlink { 0% { opacity: 0; } 22% { opacity: 1; } 55% { opacity: 1; } 80% { opacity: 0; } 100% { opacity: 0; } }
/* TG 5610: тело мигает и пока крутят пальцем (раньше по TG 5274 гасили) — фаза по времени, перерисовка её не сбрасывает */
@media (prefers-reduced-motion: reduce) { .geo-blink { animation: none; } }
/* деление в столбик (Игорь, 14.10 TG 5211) */
.col-div { display: flex; justify-content: center; align-items: flex-start; margin: 6px auto; font-variant-numeric: tabular-nums; white-space: pre; line-height: 1.45; }
.col-div .cd-r { border-left: 2px solid currentColor; padding-left: .35em; margin-left: .1em; }
.col-div .cd-dv { border-bottom: 2px solid currentColor; padding-right: .5em; }
.col-div .cd-q { color: var(--blue); }
.col-div .cd-ul { border-bottom: 2px solid currentColor; }
.col-div .cd-mi { position: relative; top: -.72em; } /* TG 6637: минус на полстроки выше — между числами */
.col-div .cd-l { letter-spacing: .18em; } /* цифры врозь — между ними место для запятой (TG 6481, 6483) */
.col-div .cd-cm { display: inline-block; width: 0; position: relative; } /* запятая без своей колонки, как в тетради */
.col-div .cd-cm > i { display: inline-block; position: relative; left: -.09em; transform: translateX(-50%); font-style: normal; letter-spacing: 0; } /* центр запятой — ровно посередине промежутка между цифрами, от шрифта не зависит */

/* дробь в дроби (Игорь 15.10, TG 5316): внешняя дробь — две равные половины (сетка 1fr/1fr), черта ровно посередине и на оси строки (middle); внутренняя чуть мельче */
/* корни в числителе и знаменателе (√361/√100, Игорь 03.11 TG 6492) — та же сетка, иначе черта уезжает вниз */
.fr:has(.fr), .fr:has(> span:first-child > .rt):has(> span:last-child > .rt), .fr:has(> span:first-child .ss) { display: inline-grid; grid-template-rows: 1fr 1fr; vertical-align: middle; }
.fr:has(.fr) > span, .fr:has(> span:first-child > .rt):has(> span:last-child > .rt) > span, .fr:has(> span:first-child .ss) > span { display: block; align-self: end; text-align: center; white-space: nowrap; } /* Игорь 04.11 TG 6596 (в.17 №8, №14): был flex-column — скобки, минус и слагаемые числителя вставали столбиком; теперь строкой, прижато к черте */
.fr:has(.fr) > span:last-child, .fr:has(> span:first-child > .rt):has(> span:last-child > .rt) > span:last-child, .fr:has(> span:first-child .ss) > span:last-child { align-self: start; }
.fr .fr { font-size: .92em; vertical-align: middle; margin: 2px 1px; }

.grade-hint { display: block; margin: 10px auto 0; padding: 6px 10px; background: none; border: 0; color: var(--fg3); font: inherit; font-size: 13px; cursor: pointer; } /* Игорь 15.10, TG 5319: подсказка на главной, ведёт в Профиль */
.grade-hint:active { color: var(--accent); }
/* несколько полей (Игорь 15.10, TG 5398/5407/5418): одна общая сетка — колонка подписей по ширине самой длинной, колонка полей; вся сетка по центру */
.inp.multi { display: grid; grid-template-columns: minmax(0, 1fr) auto 116px minmax(0, 1fr); column-gap: 0; row-gap: 8px; align-items: center; }
.inp.multi .inp-pre { grid-column: 2; padding-right: 10px; } .inp.multi .inp-box { grid-column: 3; }
.inp.multi .inp-row { display: contents; }
.inp.multi .inp-pre { text-align: right; line-height: 1.35; white-space: nowrap; font-size: 18px; }
.inp.multi .inp-box { min-width: 0; width: 116px; min-height: 46px; padding: 6px 8px; font-size: 20px; }
.inp.multi .kpad { grid-column: 1 / -1; }
/* подпись не влезает рядом с полем — каждая подпись над своим полем, по центру (TG 5415) */
.inp.multi.stack { grid-template-columns: 1fr; justify-items: center; row-gap: 4px; } .inp.multi.stack .inp-pre, .inp.multi.stack .inp-box { grid-column: 1; }
.inp.multi.stack .inp-pre { text-align: center; white-space: normal; } .inp.multi.stack .inp-box { margin-bottom: 6px; } .inp.multi.stack .kpad { justify-self: stretch; }
/* таблица с пропусками — почти во всю ширину экрана (TG 5398) */
.tstep .ctable-wrap:has(.fl-t) { margin: 10px -10px 2px; }
.ctable.fl-t { display: table; width: 100%; font-size: 15px; }
.fl-t td, .fl-t th { padding: 6px 4px; }
.tneed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; } .tn-i { padding: 5px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); font-size: 15px; white-space: pre-line; }
.tfig { margin: -4px 0 12px; } .tfig .fig { margin: 0; }
.fl-t td, .fl-t th { padding: 8px 6px; } .fl-t .fl-slot { min-width: 54px; margin: 0; }
.why.soft { border-left: 3px solid #f5a524; background: color-mix(in srgb, #f5a524 12%, var(--card2)); }
.opt.soft, .fl-slot.soft, .inp-box.soft { border-color: #f5a524; background: color-mix(in srgb, #f5a524 16%, var(--card)); }
/* таблица в условии — тоже почти во всю ширину (Игорь 15.10, TG 5401) */
.card > .ctable-wrap, .tfig > .ctable-wrap { margin: 10px -10px 2px; } .card > .ctable-wrap .ctable, .tfig > .ctable-wrap .ctable { display: table; width: 100%; }
/* на компьютере поля и клавиатура не растягиваются на всю ширину (TG 5403) */
@media (min-width: 700px) { .inp { max-width: 460px; margin: 0 auto; } }

/* TG 5442: поля ввода прямо в формуле (input.f) */
.inp.fx .fl-f { line-height: 2.6; white-space: nowrap; overflow-x: auto; }
.inp.fx .fl-f { font-size: 19px; padding-left: 4px; padding-right: 4px; }
.inp.fx .inp-box { display: inline-flex; vertical-align: middle; min-width: 38px; min-height: 38px; padding: 2px 5px; margin: 2px 1px; font-size: 18px; border-radius: 10px; }
.inp.fx .inp-box:not(.act):not(.ok):not(.bad) { border-color: var(--line); } .inp.fx .inp-box:not(.act) .inp-caret { display: none; } .inp.fx .inp-caret { height: 20px; }
.sov { display: inline-flex; flex-direction: column; vertical-align: .5em; position: relative; padding-left: 12px; margin-left: 2px; line-height: 1; text-align: left; } /* как у .fr: базовая линия = верхняя строка, поднимаем — граница строк встаёт на черту дроби (TG 5449) */
.sov::before { content: ''; position: absolute; left: 2px; top: 4px; bottom: 4px; width: 6px; border: 2.5px solid currentColor; border-right: none; }
.sov > span + span { margin-top: 3px; }
.inp.fx .inp-box.sg { min-width: 34px; height: 38px; font-size: 20px; line-height: 1; } .inp.fx .inp-box.sg.empty .inp-v::before { content: '±'; opacity: .35; } .inp.fx .inp-box.sg .inp-caret { display: none; }
/* TG 5448: плитки вокруг формулы */
.fl-stage { margin: 4px 0 2px; }
.fl-stage .fl-tray { margin-top: 0; align-items: flex-start; }
.fl-stage .fl-z.zt { min-height: 8px; margin-bottom: 4px; } .fl-stage .fl-z.zb { margin-top: 6px; }
.fl-row { display: flex; align-items: center; justify-content: center; gap: 6px; }
.fl-row .fl-f { flex: 0 1 auto; min-width: 0; white-space: nowrap; } .fl-row.wide .fl-f { white-space: normal; }
.fl-row .fl-z.zl, .fl-row .fl-z.zr { flex-direction: column; flex: 0 0 auto; align-items: center; gap: 8px; } .fl-row .fl-z:empty { display: none; }
/* TG 5456: формула в карточке, плитки ровными рядами; ⟨k⟩ — цель подстановки */
.fl-stage .fl-z { gap: 10px; justify-content: center; } .fl-stage .fl-z.zt { margin-bottom: 12px; } .fl-stage .fl-z.zb { margin-top: 12px; }
.fl-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; font-size: 24px; box-shadow: var(--shadow); }
.fl-slot.tgt:not(.full) { border-style: dashed; border-color: var(--accent); animation: tgtPulse 1.6s ease-in-out infinite; }
.fl-tg { opacity: .45; font-weight: 700; }
@keyframes tgtPulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); } }
.inp.fx .fx-line { white-space: nowrap; margin: 6px 0; text-align: center; line-height: 1.2; }
.inp.fx .fx-line .fr, .inp.fx .fx-line .sov, .inp.fx .fx-line .inp-box { vertical-align: middle; margin-left: .2em; margin-right: .2em; } /* TG 5457: «=» на черте дроби и середине совокупности */
.task-text .cond-sys { margin: 4px 0; }

/* 25.10 (Игорь TG 5643): чип класса у аватарки на главной, прогресс-бары профиля, подсветка выбора класса, режим «по номерам» */
.gchip { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; padding: 0; font: inherit; color: inherit; flex: none; }
.gchip .gl { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--gc, var(--accent)); color: #1a1500; white-space: nowrap; }
.gchip:active .avatar { transform: scale(.94); }
.prow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow .ico { font-size: 22px; width: 32px; text-align: center; flex: none; margin-top: 2px; }
.pbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--green)); transition: width 1.1s var(--ease); }
.grades.flash .gbtn { animation: gflash 1.3s ease-in-out 2; }
@keyframes gflash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gc) 60%, transparent); transform: scale(1.06); } }
.seg.sm button { padding: 7px 8px; font-size: 13px; }
.numgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.numgrid .empty { grid-column: 1 / -1; }
.numgrid > .card { margin: 0; } /* в сетке правило .card + .card не должно сдвигать карточки */
.numcard { text-align: left; padding: 12px 9px 11px 10px; display: flex; flex-direction: column; gap: 4px; min-height: 104px; min-width: 0; overflow: hidden; position: relative; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
.numcard .nc-n { font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: -.5px; }
.numcard .nc-n s { text-decoration: none; font-size: 14px; color: var(--fg3); margin-right: 1px; vertical-align: 8px; }
.numcard .nc-t { font-size: 11.5px; letter-spacing: -.15px; color: var(--fg2); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; overflow-wrap: normal; }
.numcard .nc-t.sm { font-size: 10.5px; letter-spacing: -.3px; }
.numcard .nc-dots { display: flex; gap: 3px; margin-top: auto; padding-top: 6px; }
.numcard .nc-dots i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); max-width: 14px; }
.numcard .nc-dots i.ok { background: var(--green); } .numcard .nc-dots i.clean { background: var(--accent); } .numcard .nc-dots i.cur { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.numcard .nc-note { font-size: 11px; color: var(--fg3); }
.numcard.all { border-color: color-mix(in srgb, var(--green) 70%, var(--line)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent); }
.numcard.all .nc-n { color: var(--green); }
.numcard:active { transform: scale(.96); }
@media (min-width: 900px) { .numgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 760px; } }

/* 25.10 (TG 5649): уровни и баллы */
.lvl .lvl-badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, var(--accent) 22%, var(--card2)); flex: none; }
.lvl h2 { margin: 2px 0; }
.lvl-bar { margin-top: 12px; height: 10px; }
.lvl-rule { font-size: 12px; color: var(--fg3); margin-top: 8px; }
.btn.share { width: 100%; margin-top: 12px; }
.pts-gain { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-size: 15px; animation: pop .6s var(--spring) both; animation-delay: .35s; }

/* 25.10 (TG 5651): читалка новостей */
.news { max-width: 640px; }
.news .news-meta { margin-bottom: 8px; }
.news .news-h { font-size: 24px; line-height: 1.2; margin: 0 0 12px; }
.news .news-lead { font-weight: 700; font-size: 17px; line-height: 1.45; margin: 0 0 12px; }
.news p { font-size: 17px; line-height: 1.55; margin: 0 0 12px; max-width: 38em; }
.news .news-src { display: block; width: 100%; text-align: center; margin: 16px 0 6px; text-decoration: none; }
.news .section { margin-top: 18px; }
.share-row { display: flex; gap: 10px; margin-top: 12px; }
.share-row .btn.share { flex: 1; margin-top: 0; padding-left: 8px; padding-right: 8px; font-size: 14px; }

/* 25.10 (TG 5660): приём дня */
.kbadge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--card2); color: var(--fg2); }
.kbadge.k-трюк { background: color-mix(in srgb, var(--accent) 28%, var(--card2)); color: var(--fg); }
.kbadge.k-ошибка { background: color-mix(in srgb, var(--red) 22%, var(--card2)); color: var(--fg); }
.kbadge.k-формула { background: color-mix(in srgb, var(--blue) 24%, var(--card2)); color: var(--fg); }
.kbadge.k-лайфхак { background: color-mix(in srgb, var(--green) 22%, var(--card2)); color: var(--fg); }
.tipcard h2 { font-size: 20px; line-height: 1.2; }
.tip .tip-h { font-size: 24px; line-height: 1.2; margin: 12px 0 10px; }
.tip .tip-d { font-size: 17px; line-height: 1.5; }
.tip .tip-ex { padding: 12px 14px; }
.tip .tip-anim { margin-top: 12px; }
.tip .tip-ex .eyebrow { margin-bottom: 4px; }
.tip .tip-q .q { font-size: 18px; font-weight: 700; margin: 8px 0 12px; line-height: 1.35; }
.tip .whyb:not(:empty) { margin-top: 12px; }
/* «вверх к условию / обратно» в Разборе и Решениях (TG 5666): полупрозрачная, над таб-баром справа, не перекрывает текст */
.jump { position: fixed; right: 14px; bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); z-index: 9; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 62%, transparent); color: var(--fg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 14px rgba(0,0,0,.12); opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; transition: opacity .25s, transform .25s; display: grid; place-items: center; padding: 0; cursor: pointer; }
.jump.show { opacity: .62; transform: none; pointer-events: auto; }
.jump:active { opacity: 1; transform: scale(.94); }
.jump .ja { font-weight: 800; font-size: 20px; line-height: 1; }
@media (hover: hover) { .jump.show:hover { opacity: 1; } }
@media (min-width: 900px) {
  /* ПК (TG 5668): кнопка у правого края колонки задачи, а не в углу экрана */
  .jump { right: auto; left: min(calc(var(--rail) + (100vw - var(--rail)) / 2 + 402px), calc(100vw - 64px)); bottom: 28px; width: 48px; height: 48px; }
  .jump .ja { font-size: 23px; }
}
/* Игорь 26.10 TG 5707: вместо кнопки «Подробнее» — подчёркнутая строка, тап раскрывает/сворачивает ход под ней */
details.more.tl { margin: 0; }
details.more.tl > summary { display: block; padding: 0; background: none; border-radius: 0; font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
details.more.tl > summary::after { content: none; }
details.more.tl > summary > .calc-note { font-size: 17px; margin: 10px 0 2px; }
details.more.tl > summary .tl-u { border-bottom: 2px solid color-mix(in srgb, var(--blue) 75%, transparent); padding-bottom: 2px; cursor: pointer; }
/* Игорь 26.10 TG 5734: text-decoration не заходит под корень/дробь (inline-block) — линия рвалась; рамкой снизу — одна сплошная. Строка-формула с дробью — под всей формулой */
details.more.tl > summary .calc-f > .tl-u { display: inline-block; padding-bottom: 0; }
/* Игорь 27.10 TG 5813: в строке-пояснении линия шла по знаменателю дроби (рамка инлайна — по базовой строке, знаменатель висит ниже). Кусок с дробью/корнем — inline-block: рамка под всей дробью */
details.more.tl > summary .calc-note .tl-u:has(.fr) { display: inline-block; padding-bottom: 1px; line-height: 1.5; }
details.more.tl > summary .tl-u::after { content: '▾'; display: inline-block; margin-left: 5px; font-size: .8em; color: var(--blue); text-decoration: none; transition: transform .2s; }
details.more.tl[open] > summary .tl-u::after { transform: rotate(180deg); }
details.more.tl[open] > summary .tl-u { border-bottom-color: var(--blue); }
details.more.tl > .calc { margin-top: 6px; }
/* TG 5710: подсветка в ходе — прозрачнее и без рамки */
details.more .calc .hl { background: color-mix(in srgb, var(--blue) 14%, transparent); box-shadow: none; }
details.more .calc .hl.hl2 { background: color-mix(in srgb, var(--green) 14%, transparent); }
details.more .calc .hl.hl3 { background: color-mix(in srgb, #b388ff 16%, transparent); }
[data-theme="light"] details.more .calc .hl.hl3 { background: color-mix(in srgb, #7c3aed 11%, transparent); }
details.more .calc .hl { margin: 0 2px; }
sup .sub-slot { padding: 0 1px; } /* подстановка в показатель: без широких полей, «2^{2²−3}» не разъезжается (TG 5712) */
details.more .calc .hl:has(.fr) { display: inline-block; padding: 0 4px; vertical-align: middle; } /* подсветка дроби — на всю высоту (TG 5715) */

/* ---------- подписка Schoolook+ (26.10, TG 5767): замки, карточка подписки, защита от копирования + водяной знак ---------- */
.lock { flex: none; font-size: 15px; opacity: .7; }
.card.hero.pro h2 { font-size: 24px; margin-top: 2px; }
.card.hero.pro .muted { margin-top: 6px; }
.pro-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.pro-list li { position: relative; padding-left: 26px; font-weight: 600; }
.pro-list li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #052e16; font-size: 12px; font-weight: 800; display: grid; place-items: center; margin-top: 2px; }
.pro-price { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 12px; }
.pro-price b { font-family: var(--display); font-size: 34px; line-height: 1; }
.pro-price span { color: var(--fg2); font-weight: 600; }
.pro-free { margin-top: 10px; line-height: 1.4; }
.pro-row { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pro-row .ico.lg { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.faq { gap: 12px; }
.faq .muted { font-size: 14px; margin-top: 2px; }
.btn[disabled] { opacity: .7; }
/* Игорь 26.10 TG 5768: не копировать текст и не выделять (кроме полей ввода); водяной знак — id пользователя, еле заметно, поверх контента, тапы сквозь него */
body.guard { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.guard input, body.guard textarea { -webkit-user-select: text; user-select: text; }
#wm { position: fixed; inset: -30% -30%; z-index: 8; pointer-events: none; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 96px 72px; padding: 40px; transform: rotate(-18deg); opacity: .055; font: 700 13px/1 var(--body); color: var(--fg); letter-spacing: .04em; white-space: nowrap; overflow: hidden; }
[data-theme="light"] #wm { opacity: .07; }
@media print { body.guard #view { display: none; } }
.pro-mail { display: block; margin: 0 0 10px; }
.pro-mail input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; outline: none; }
.pro-mail input:focus { border-color: var(--accent); }
.pro-mail .tiny { display: block; margin: 6px 2px 0; }
/* согласие на сохранение карты и блок привязанной карты (ЮKassa: сценарий отвязки — чекбокс + кнопка удаления) */
.chk { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; line-height: 1.35; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk .box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--fg3); margin-top: 1px; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.chk input:checked + .box { background: var(--accent); border-color: var(--accent); }
.chk input:checked + .box::after { content: ''; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.chk input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.chk input:disabled ~ * { opacity: .6; }
.pro-cardbox { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pro-card { margin: 0 0 12px; }
.btn.danger { color: var(--red); }

/* шпаргалка v2 (26.10, TG 5792): примеры по шагам, типичные ошибки, углублёнка */
.pill.deep { background: color-mix(in srgb, var(--purple, #a855f7) 22%, transparent); color: var(--purple, #a855f7); padding: 2px 8px; font-size: 11px; vertical-align: 2px; }
.ex2 .eyebrow { display: flex; align-items: center; gap: 8px; }
.ex2 .lvl { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; text-transform: none; letter-spacing: 0; background: color-mix(in srgb, var(--green) 18%, transparent); }
.ex2 .lvl.l2 { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--fg); }
.ex2 .lvl.l3 { background: color-mix(in srgb, var(--red) 20%, transparent); color: var(--fg); }
.ex2 .q { font-weight: 600; margin: 2px 0 8px; }
.ex2 .exs { margin: 0 0 8px; padding-left: 22px; line-height: 1.55; } .ex2 .exs li { margin: 0 0 5px; } .ex2 .exs li::marker { color: var(--green); font-weight: 800; }
.ex2 .ans { font-weight: 700; margin-top: 6px; }
.errs .err { padding: 10px 0; border-top: 1px dashed color-mix(in srgb, var(--red) 30%, transparent); } .errs .err:first-of-type { border-top: 0; padding-top: 2px; }
.errs .bad, .errs .good { display: flex; gap: 8px; line-height: 1.5; margin: 0 0 4px; } .errs i { font-style: normal; font-weight: 800; flex: none; width: 16px; }
.errs .bad i { color: var(--red); }
.errs .good i { color: var(--green); }
.errs .ewhy { color: var(--fg2); font-size: 14px; line-height: 1.5; margin-left: 24px; }
.errs .player.inline { margin: 8px 0 4px; background: var(--bg); }
/* выбор класса новичку (TG 5811) */
/* Приветствие новичку в стиле iOS (Игорь 27.10, TG 5826): сцены сменяют друг друга с размытием и пружиной, экскурсия листается вбок */
.onb { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; grid-template-rows: 1fr auto; padding: calc(24px + var(--safe-t)) 20px calc(28px + var(--safe-b)); overflow: hidden; opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.onb::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); pointer-events: none; }
.onb.show { opacity: 1; }
.onb.bye { opacity: 0; transform: scale(1.05); pointer-events: none; transition-duration: .9s; }
.onb-stage { position: relative; }
.onb-scene { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 12px; max-width: 480px; margin: 0 auto; width: 100%; }
.onb-scene > * { opacity: 0; transform: translate3d(0, 22px, 0) scale(.97); filter: blur(10px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); }
.onb-scene.h > * { transform: translate3d(56px, 0, 0) scale(.97); }
.onb-scene.in > * { opacity: 1; transform: none; filter: none; }
.onb-scene.in > :nth-child(2) { transition-delay: .18s; } .onb-scene.in > :nth-child(3) { transition-delay: .36s; } .onb-scene.in > :nth-child(4) { transition-delay: .54s; }
.onb-scene.out { pointer-events: none; } .onb-scene.out > * { opacity: 0; transform: translate3d(0, -22px, 0) scale(.97); filter: blur(10px); transition-duration: .8s; transition-delay: 0s; transition-timing-function: var(--ease); }
.onb-scene.h.out > * { transform: translate3d(-56px, 0, 0) scale(.97); }
.onb-hello { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1.05; letter-spacing: -.02em; }
.onb-wave { font-size: 72px; line-height: 1; } .onb-scene.in .onb-wave:not(.still) { animation: wave 1.6s ease-in-out 1.1s 1; transform-origin: 70% 70%; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-10deg); } 60% { transform: rotate(14deg); } 80% { transform: rotate(-6deg); } }
.onb-sub { color: var(--fg2); font-size: 17px; line-height: 1.4; max-width: 340px; }
.onb-scene h2 { font-size: 30px; }
.onb-ico { width: 104px; height: 104px; border-radius: 30px; background: linear-gradient(145deg, var(--accent2), var(--accent)); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 38%, transparent); margin-bottom: 8px; }
.onb-ico svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.onb-scene .grades { width: 100%; max-width: 360px; margin-top: 10px; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.onb-scene .gbtn { font-size: 20px; border-radius: 16px; transition: opacity .9s var(--ease), transform .6s var(--spring), background .2s, box-shadow .2s, color .2s; }
.onb-scene:not(.in) .gbtn { opacity: 0; transform: translateY(12px) scale(.85); } .onb-scene.in .gbtn:not(.on) { transform: none; }
.onb-foot { position: relative; display: grid; gap: 14px; justify-items: center; width: 100%; max-width: 480px; margin: 0 auto; min-height: 104px; opacity: 0; transform: translateY(12px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.onb-foot.in { opacity: 1; transform: none; }
.onb-foot .btn { width: 100%; max-width: 360px; padding: 15px 18px; font-size: 16px; border-radius: 16px; }
.onb-dots { display: flex; gap: 6px; } .onb-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--fg3); opacity: .45; transition: width .35s var(--spring), opacity .3s, background .3s; } .onb-dots i.on { width: 22px; background: var(--accent); opacity: 1; }
.onb-skip { color: var(--fg3); font-size: 14px; padding: 4px 10px; }
.onb-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 340px; margin-top: 10px; }
.tcard { display: grid; gap: 10px; justify-items: center; padding: 12px 12px 14px; border-radius: 20px; background: var(--card); border: 2px solid var(--line); transition: transform .3s var(--spring), border-color .25s, box-shadow .25s; }
.tcard.on { border-color: var(--accent); transform: scale(1.04); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent); }
.tcard:active { transform: scale(.97); }
.tph { display: grid; gap: 7px; align-content: start; width: 92px; height: 120px; border-radius: 16px; padding: 12px 10px; border: 1px solid rgba(128,128,128,.25); }
.tph i { display: block; height: 8px; border-radius: 4px; width: 100%; }
.tph i:first-child { width: 22px; height: 22px; border-radius: 7px; background: #f5c542; margin-bottom: 4px; }
.tph.light { background: #f6f3ea; } .tph.light i:nth-child(n+2) { background: rgba(16,28,63,.14); } .tph.light i:nth-child(3) { width: 70%; }
.tph.dark { background: #0b1530; } .tph.dark i:nth-child(n+2) { background: rgba(255,255,255,.16); } .tph.dark i:nth-child(3) { width: 70%; }
@media (min-width: 900px) { .onb { padding-left: 40px; padding-right: 40px; } .onb-hello { font-size: 56px; } }
/* развилки в «Решениях» (TG 5880): другой верный путь — alt, тупик — серый с меткой, свёрнутая тупиковая ветка — .tdead */
.why.fork { border-left: 3px solid var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--card2)); }
.why.dead { border-left: 3px solid var(--fg3); background: color-mix(in srgb, var(--fg3) 14%, var(--card2)); }
.opt.alt, .opt.deadalt { border: 1px dashed var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--card)); } /* другой верный ход — синий, как плашка «Развилка» (Игорь 29.10 TG 6030) */
.opt.deadopt { opacity: .55; border-style: dashed; }
.otag { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--fg3); }
.otag.done { color: var(--green); }
.tdead-card { margin: 14px 0; } .tdead-card .btn { width: 100%; margin-top: 10px; }
details.tdead { margin: 10px 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--r2); background: var(--card); color: var(--fg2); }
details.tdead summary { cursor: pointer; font-weight: 600; } details.tdead ol { margin: 8px 0 0 18px; padding: 0; font-size: 14px; } details.tdead li { margin: 4px 0; }
.fork-btn { width: 100%; margin-top: 14px; background: var(--blue); color: #fff; }
/* поле/плитка в показателе степени — над строкой, правее и выше основания, как сам показатель (Игорь 28.10 TG 5891) */
.inp.fx .fx-line sup .inp-box, sup .fl-slot { vertical-align: .55em; min-width: 30px; min-height: 30px; padding: 0 4px; margin: 0 0 0 1px; font-size: 15px; border-radius: 8px; }
/* нижний индекс в числителе (log_{a} x) не касается черты дроби (Игорь 28.10 TG 5897) */
.fr > span:first-child:has(sub) { padding-bottom: .32em; }
/* конструктор уравнения eq (Игорь 28.10 TG 5903): слагаемые — плитки, скобка — блок, знак при переносе/раскрытии ставит ученик */
.eq-card { margin: 4px 0 2px; padding: 12px 6px; font-size: 17px; }
.eq-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 4px; font-family: var(--display); font-weight: 700; font-size: 17px; }
.eq-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 4px; min-height: 44px; min-width: 44px; padding: 2px 4px; border-radius: 12px; }
.eq-eq { font-size: 22px; margin: 0 4px; }
.eq-zero { opacity: .75; padding: 0 6px; }
.eq-t { display: inline-block; vertical-align: middle; white-space: nowrap; line-height: 1.25; min-height: 40px; padding: 7px 8px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg2, var(--card)); color: inherit; font: inherit; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.eq-t .eq-s { margin-right: 2px; }
.eq-t.sel { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.eq-t.eq-g { border-style: dashed; border-color: var(--accent); }
.eq-t.eq-pend { border-style: dashed; border-color: var(--blue, var(--accent)); cursor: default; }
.eq-pm { display: inline-flex; gap: 3px; margin-right: 4px; vertical-align: middle; } .eq-pm button { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: inherit; font: 800 18px var(--body); line-height: 1; padding: 0; }
.eq-t.bad { border-color: var(--red); animation: shake .4s; }
.eq-card.ok .eq-f { display: block; text-align: center; }
.eq-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.eq-b { padding: 8px 11px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: inherit; font: 700 14px var(--body); }
.eq-b:disabled { opacity: .38; }
.eq-pick:not(:empty) { margin-top: 10px; text-align: center; } .eq-pick .fl-tray { justify-content: center; margin-top: 6px; } .eq-ch.bad { border-color: var(--red); animation: shake .4s; }
.eq-nw { white-space: nowrap; display: inline-block; }
/* TG 5930: утверждения «верно/неверно» по одному; ответ — испаряется, в конце видны все; живой чертёж — в текущем шаге */
.tf.one .tf-row.wait, .tf.one .tf-row.hid { display: none; }
.tf.one .tf-row.gone { animation: tfGone .45s ease forwards; pointer-events: none; }
.tf.one .tf-row.enter { animation: tfIn .35s ease; }
@keyframes tfGone { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes tfIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tf-nx { margin-top: 10px; }
.geo-slot.in-step { margin: 10px -10px 12px; } /* Игорь 29.10 TG 6083: чертёж шага шире — почти до краёв экрана */
@media (min-width: 900px) { .geo-slot.in-step { margin: 10px 0 12px; } }
/* ОГЭ №1–5 (Игорь 28.10 TG 5936): общий текст, черта «Задание», ниже — своё условие номера */
.cond-own-sep { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; color: var(--fg2); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cond-own-sep::before, .cond-own-sep::after { content: ''; flex: 1; height: 1.5px; background: var(--line); }
.cond-own-sep::before { flex: 0 0 14px; }
/* дуга окружности на чертеже (TG 5938, 5941): полупрозрачная полоса цветом подсветки */
.geo-arc { opacity: .4; }
/* дробь из окошек в формуле с пропусками — по середине строки: пустое окошко не даёт базовой линии, и дробь съезжала вниз от скобок и «=» (Игорь 28.10 TG 5961, в.1 №17 ш5) */
.fl-f .fr:has(.fl-slot) { vertical-align: middle; margin-left: .15em; margin-right: .15em; }
.bpar { display: inline-flex; align-items: center; vertical-align: middle; line-height: 1; } .bpar > .fr { vertical-align: baseline; margin: 0 .05em; } .bpar > .mv { display: inline-flex; align-items: center; } .bpar + sup { vertical-align: 1.1em; } /* (дробь)² в тексте: показатель у верхнего края скобки (TG 6562) */
.bpar { position: relative; padding: 0 .34em; } .bpar > .nw { display: inline-flex; align-items: center; } .bpar .fr { margin-top: 0; margin-bottom: 0; } .bpar > .bp { position: absolute; top: -.06em; width: .3em; height: calc(100% + .12em); overflow: visible; } .bpar > .bp:first-child { left: 0; } .bpar > .bp:last-child { right: 0; } .bpar > .bp path { fill: none; stroke: currentColor; stroke-width: .12em; stroke-linecap: round; vector-effect: non-scaling-stroke; } /* TG 6705: скобка линией толщиной шрифта (как .rs у корня) */
/* подсказка сворачивается тапом в одну строку и открывается обратно (Игорь 29.10 TG 6017) */
.why.hint { cursor: pointer; }
.why.hint.off { font-size: 0; opacity: .7; }
.why.hint.off > * { display: none; }
.tstep:has(.hb) .why.hint.off { display: none; } /* есть кнопка — она и открывает */
.why.hint.off::before { content: '💡 Подсказка · открыть'; font-size: 13px; font-weight: 600; }
/* развилка: верный ход, который ведёт в тупик, после выбора основного не зелёный — серый пунктир (Игорь 29.10 TG 6027) */
.opt.deadalt::after { content: '🚧'; margin-left: auto; padding-left: 8px; font-size: 18px; } /* тупиковый ход — значок тупика рядом */
/* упрощение выражения simp (Игорь 29.10): дробь — блок числитель/черта/знаменатель, множители — плитки, черта выделяет всю дробь; окошки — своя клавиатура */
.sx-card { margin: 4px 0 2px; padding: 14px 4px; }
.sx-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 2px; font-family: var(--display); font-weight: 700; font-size: 18px; }
.sx-lhs, .sx-sum, .sx-tm, .sx-nu, .sx-de, .sx-br { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 2px; }
.sx-lhs { margin-right: 2px; }
.sx-s { padding: 0 3px; }
.sx-fr { display: inline-flex; flex-direction: column; align-items: stretch; margin: 0 2px; padding: 2px; border-radius: 12px; }
.sx-fr.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.sx-ln { display: block; height: 18px; min-width: 40px; border: 0; background: none; padding: 0; margin: 0; position: relative; cursor: pointer; color: inherit; }
.sx-ln::after { content: ''; position: absolute; left: 2px; right: 2px; top: 8px; height: 2px; border-radius: 1px; background: currentColor; }
.sx-fr.sel > .sx-ln::after { background: var(--accent); height: 3px; top: 7.5px; }
.sx-t { display: inline-block; white-space: nowrap; line-height: 1.2; min-height: 36px; min-width: 34px; padding: 5px 7px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg2, var(--card)); color: inherit; font: inherit; cursor: pointer; }
.sx-par { min-height: 36px; padding: 0 2px; border: 1.5px solid transparent; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: 1.25em; font-weight: 400; cursor: pointer; white-space: nowrap; }
.sx-par sup { font-size: .62em; font-weight: 700; }
.sx-t.sel, .sx-br.sel > .sx-par { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.sx-t.bad, .sx-par.bad, .sx-box.bad { border-color: var(--red); animation: shake .4s; }
.sx-ln.bad::after { background: var(--red); }
.sx-fr .sx-fr, .sx-br .sx-fr { font-size: .94em; }
.sx-br .sx-t { min-height: 32px; padding: 3px 6px; }
.sx-card.ok .sx-f { display: block; text-align: center; }
.sx-pad:not(:empty) { margin-top: 10px; padding: 12px 10px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--card); }
.sx-pt { font-size: 14px; color: var(--fg2); text-align: center; margin-bottom: 10px; }
.sx-rows { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; }
.sx-mfr { display: inline-flex; flex-direction: column; align-items: stretch; vertical-align: middle; }
.sx-mfr > span { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 8px; }
.sx-mfr > span:first-child { border-bottom: 2px solid currentColor; }
.sx-pw { display: inline-flex; align-items: flex-start; white-space: nowrap; } .sx-pw > .sx-bs { padding-top: 16px; line-height: 1.2; } .sx-pw > .sx-box { margin-left: 2px; }
.sx-box { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 6px; border-radius: 10px; border: 2px solid color-mix(in srgb, var(--fg) 30%, transparent); background: var(--bg2, var(--card)); color: inherit; font: 700 18px var(--display); cursor: pointer; vertical-align: middle; }
.sx-pw > .sx-box { min-width: 32px; min-height: 32px; font-size: 16px; }
.sx-box.act { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.sx-sq { display: inline-flex; align-items: center; } .sx-pb { font-size: 2.4em; font-weight: 300; line-height: 1; transform: scaleX(.7); }
.sx-sq2 { align-self: flex-start; font-size: .8em; margin-top: -2px; }
.sx-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; } .sx-lab { font-size: 16px; color: var(--fg2); font-weight: 600; }
/* simp: раскрыть / свернуть по формуле (29.10) — окошки-слагаемые, знаки тапом, плитки снизу */
.sx-slot, .sx-mir { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; min-height: 46px; padding: 2px 6px; border-radius: 11px; border: 2px dashed color-mix(in srgb, var(--fg) 30%, transparent); font: 700 18px var(--display); cursor: pointer; vertical-align: middle; }
.sx-slot.act { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.sx-slot.full { border-style: solid; background: var(--bg2, var(--card)); }
.sx-slot.bad { border-color: var(--red); animation: shake .4s; }
.sx-mir { cursor: default; border-style: dotted; opacity: .85; min-width: 40px; }
.sx-sg { width: 34px; height: 34px; margin: 0 4px; padding: 0; border-radius: 9px; border: 1.5px solid var(--line); background: var(--card); color: inherit; font: 800 20px var(--body); line-height: 1; vertical-align: middle; }
.sx-rows .sx-sq { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
.sx-tray { justify-content: center; margin-top: 12px; } .sx-tl { font-family: var(--display); }
.sx-ctl { display: flex; justify-content: center; gap: 10px; margin-top: 12px; } .sx-ctl .kp.go { padding: 10px 26px; }
/* Решения: значение известного по тапу (Игорь 29.10 TG 6063) — с ореолом фона, читается поверх линий */
.geo-kv, .geo-kv text { paint-order: stroke; stroke: var(--bg2); stroke-width: 2.5px; stroke-linejoin: round; } /* TG 6157: обводка подписи по тапу меньше (было 7px) */
/* выносной плоский чертёж (Игорь 30.10 TG 6183): плоскость — главный чертёж, тело — маленькое в углу; тап по маленькому меняет местами */
.geo-dual { position: relative; }
.geo-dual > .geo-3, .geo-dual.geo-sw > .geo-fl { display: none; } /* Игорь 30.10 TG 6192: один чертёж, переключатель 2D/3D */
.geo-dual.geo-sw > .geo-3 { display: block; }
.geo-dual .geo-fl .geo-hint { display: none; } /* на плоском подсказка наезжала на верхнюю вершину (в.1 №15, S) */
.geo-swap { position: absolute; left: 8px; top: 10px; z-index: 3; display: flex; padding: 0; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent); cursor: pointer; font: 800 12px/1 var(--display); letter-spacing: .02em; transition: transform .25s var(--spring); } /* Игорь 30.10 TG 6236: в стиле приложения — жёлтая таблетка с иконкой, как chip.on */
.geo-swap:active { transform: scale(.9); }
.geo-swap::before { content: ''; position: absolute; inset: -10px; } /* палец попадает с запасом */
.geo-swap b { display: flex; align-items: center; gap: 5px; padding: 6px 11px 6px 9px; }
.geo-swap svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.geo-dual:not(.geo-sw) .geo-swap b:first-child, .geo-dual.geo-sw .geo-swap b:last-child { display: none; } /* Игорь 30.10 TG 6233: одна секция — на 3D «2D», на 2D «3D» */
/* «⚠️ Ошибка» / «↩ Назад» на шагах (Игорь 05.11 TG 6748): маленькие, как «Подсказка»; «Ошибка» — приглушённая, справа */
.stepbar { display: flex; justify-content: flex-end; margin-top: 8px; }
.btn.sm.bugb { padding: 6px 10px; font-size: 13px; opacity: .7; }
.hintrow .bugb, .btnrow .bugb { margin-left: auto; }
.bugbox { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); display: grid; gap: 8px; }
.bugbox textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 52px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: inherit; font: inherit; font-size: 15px; }
.bugrow { display: flex; gap: 8px; }
.btnrow .bugb { margin-top: 4px; }
/* Игорь 07.11 TG 6905: «сократим {{…/…}}» — одинаковые множители сверху и снизу перечёркиваются по очереди, пара — одним цветом */
.cx-fr { font-size: .92em; }
.cx { position: relative; display: inline-block; --c: var(--blue); animation: cxDim .35s ease calc(var(--d) + .45s) forwards; }
.cx.cx2 { --c: var(--green); } .cx.cx3 { --c: #b388ff; } .cx.cx4 { --c: #ff9f43; }
.cx::after { content: ''; position: absolute; left: -1px; right: -1px; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--c); transform-origin: left center; transform: rotate(-18deg) scaleX(0); animation: cxStrike .45s var(--ease) var(--d) forwards; }
@keyframes cxStrike { to { transform: rotate(-18deg) scaleX(1); } }
@keyframes cxDim { to { color: color-mix(in srgb, var(--c) 70%, var(--fg)); opacity: .55; } }
/* TG 6915: «5→1» — после зачёркивания над числом (в знаменателе — под ним) появляется новое */
.cx-has-to { padding: .75em 0; }
.cx-new { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font-size: .78em; line-height: 1; white-space: nowrap; color: var(--c); opacity: 0; animation: cxNew .35s ease calc(var(--d) + .45s) forwards; }
.fr > span:last-child .cx-new { bottom: auto; top: 100%; }
.cx-to { animation-name: cxDimC; }
@keyframes cxDimC { to { color: color-mix(in srgb, var(--c) 50%, transparent); } }
@keyframes cxNew { from { opacity: 0; transform: translateX(-50%) scale(.6); } to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* TG 6948: «вынесем a: …» — правая часть a·(…) проявляется после раскрытия хода */
details.more .calc .ox-line .hl, .ox-line .hl { margin: 0; }
.ox-sg { padding: 0 2px; }
.ox-in { display: inline-block; opacity: 0; transform: translateX(-6px); animation: oxIn .45s var(--ease) .6s forwards; }
@keyframes oxIn { to { opacity: 1; transform: none; } }

/* engine-calc-0811: подставленные движком числа в «формула … | …» — синим, как подстановка */
.eng-sub { color: var(--blue); }
/* Игорь 12.11 TG 7324 (в.1 №14 ш10): окошко в числителе — дробь «плыла» вниз: половины разной высоты, middle ставил на ось не черту, а середину высокого числителя.
   Дробь с окошком/плиткой — сетка из двух равных половин (как .fr:has(.fr)), черта на оси строки; окошко и π в числителе — по центру одной строки */
.fr:has(.inp-box), .fr:has(.fl-slot) { display: inline-grid; grid-template-rows: 1fr 1fr; vertical-align: middle; }
.fr:has(.inp-box) > span, .fr:has(.fl-slot) > span { display: block; text-align: center; white-space: nowrap; align-self: end; }
.fr:has(.inp-box) .inp-box, .fr:has(.fl-slot) .fl-slot { vertical-align: middle; } /* индексы d₂ в числителе — обычной строкой (не flex) */
.fr:has(.inp-box) > span:last-child, .fr:has(.fl-slot) > span:last-child { align-self: start; }
/* отбор корней на окружности — шаг circ (Игорь 12.11 TG 7324, в.1 №14 ш10): окружность рисует движок, подписи — HTML поверх (дроби) */
.circ-fig { position: relative; width: min(100%, 300px); margin: 4px auto 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.circ-fig .c-svg { width: 100%; height: auto; display: block; overflow: visible; }
.circ-fig.bad { animation: shake .4s; }
.circ .c-ax { stroke: var(--fg3); stroke-width: 1; opacity: .55; }
.circ .c-c { fill: none; stroke: var(--fg); stroke-width: 2; opacity: .8; }
.circ .c-arc { fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round; opacity: .55; }
.circ .c-g { fill: var(--bg2); stroke: var(--fg2); stroke-width: 1.6; }
.circ .c-e { fill: var(--fg); stroke: var(--bg2); stroke-width: 2; }
.circ .c-r { stroke: var(--bg2); stroke-width: 2.5; } .circ .c-r.c0 { fill: var(--accent); } .circ .c-r.c1 { fill: var(--blue); } .circ .c-r.c2 { fill: #a78bfa; } .circ .c-r.c3 { fill: #f472b6; }
.circ .c-r.bad { fill: var(--red); }
.circ .c-lb { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap; pointer-events: none; color: var(--fg); }
.circ .c-lb.z { color: var(--fg2); font-size: 13px; font-weight: 600; }
.circ .c-lb.r { font-size: 14px; padding: 2px 4px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.circ .c-lb.r.c0, .circ .c-x.c0 { color: var(--accent); } .circ .c-lb.r.c1, .circ .c-x.c1 { color: var(--blue); }
[data-theme="light"] .circ .c-lb.r.c0, [data-theme="light"] .circ .c-x.c0 { color: #9a6d00; }
.circ-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 6px; }
.circ .c-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 4px 10px; border-radius: 999px; background: var(--card); }
.circ .c-chip i { width: 11px; height: 11px; border-radius: 50%; background: var(--pc); } .circ .c-chip.c0 { --pc: var(--accent); } .circ .c-chip.c1 { --pc: var(--blue); }
.circ .c-rows { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 0 8px; }
.circ .c-row { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; }
.circ .c-box { min-width: 86px; min-height: 48px; padding: 4px 10px; font-size: 20px; }
.circ .c-box:not(.act):not(.ok):not(.bad) { border-color: var(--line); } .circ .c-box:not(.act) .inp-caret { display: none; }
.circ .c-box .fr { font-size: .8em; }
.circ .c-ans { text-align: center; font-weight: 700; margin-top: 8px; }
.fr:has(.inp-box) > span:not(:has(sub, sup)), .fr:has(.fl-slot) > span:not(:has(sub, sup)) { display: flex; align-items: center; justify-content: center; } /* окошко и π рядом — по центру одной строки (без индексов — иначе индекс теряет сдвиг) */
/* ось знаков — шаг sign (Игорь 12.11 TG 7330, в.1 №10 ш5): нули на ось, закрашенные/выколотые, знаки тапом, выделить промежутки */
.sg-fig { position: relative; width: min(100%, 340px); margin: 6px auto 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.sg-fig .s-svg { width: 100%; height: auto; display: block; overflow: visible; }
.sg-fig.bad, .p-fig.bad { animation: shake .4s; }
.sgn .s-ax { stroke: var(--fg); stroke-width: 2; fill: none; opacity: .85; }
.sgn .s-sel { fill: url(#sgHatch); stroke: var(--blue); stroke-width: 1.5; } /* решение — штриховка синим (П30: зелёный/красный заняты знаками) */
.sgn .s-pt { stroke: var(--fg); stroke-width: 2; } .sgn .s-pt.f, .sgn .s-pt.u { fill: var(--fg); } .sgn .s-pt.u { opacity: .6; } .sgn .s-pt.o { fill: var(--bg2); }
.sgn .s-pt.bad { fill: var(--red); stroke: var(--red); }
.sgn .s-lb { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap; pointer-events: none; color: var(--fg); }
.sgn .s-lb.v { font-style: italic; color: var(--fg2); } .sgn .s-lb.s-sv { font-size: 22px; } .sgn .s-lb.s-sv.p { color: var(--green); } .sgn .s-lb.s-sv.m { color: var(--red); }
.sgn .s-sg { position: absolute; transform: translate(-50%, -50%); min-width: 40px; height: 40px; border-radius: 12px; font-size: 22px; font-weight: 800; background: var(--card); border: 1.5px solid var(--accent); color: var(--fg); }
.sgn .s-sg.e { color: var(--fg3); border-style: dashed; } .sgn .s-sg.bad { border-color: var(--red); animation: shake .4s; }
.sg-chips, .p-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.sg-chips .sg-c { min-width: 64px; font-size: 17px; } .sg-chips .sg-c.act { background: var(--accent); color: var(--accent-ink); }
.sg-ans, .p-ans { text-align: center; font-weight: 700; margin-top: 8px; font-size: 17px; }
/* график — шаг plot (Игорь 12.11 TG 7329, в.1 №9): рисунок + слой движка (точки, участки, подсветка линии) */
.p-fig { position: relative; width: min(100%, 420px); margin: 6px auto 30px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.p-fig .p-img { width: 100%; height: auto; display: block; }
[data-theme="dark"] .p-fig .p-img { filter: invert(1) brightness(.92); }
.p-top { position: absolute; inset: 0; cursor: pointer; } .p-top .p-ov { width: 100%; height: 100%; display: block; overflow: visible; }
.plot .p-dim { fill: var(--bg); opacity: .55; }
.plot .p-band { opacity: .16; } .plot .p-band.sel { fill: var(--accent); opacity: .22; } .plot .p-band.c0 { fill: var(--green); } .plot .p-band.c1 { fill: var(--red); } .plot .p-band.c2 { fill: var(--blue); }
.plot .p-cv { fill: none; stroke-width: 5; stroke-linecap: round; opacity: .9; } .plot .p-cv.sel { stroke: var(--accent); } .plot .p-cv.c0 { stroke: var(--green); } .plot .p-cv.c1 { stroke: var(--red); } .plot .p-cv.c2 { stroke: var(--blue); }
.plot .p-axl { stroke-width: 6; opacity: .8; } .plot .p-axl.sel { stroke: var(--accent); } .plot .p-axl.c0 { stroke: var(--green); } .plot .p-axl.c1 { stroke: var(--red); } .plot .p-axl.c2 { stroke: var(--blue); }
.plot .p-end { stroke: var(--accent); stroke-width: 3; }
.plot .p-pt { fill: var(--accent); stroke: var(--bg2); stroke-width: 2.5; } .plot .p-pt.bad { fill: var(--red); } .plot .p-pt.ans { fill: var(--blue); }
.plot .p-lb { position: absolute; transform: translate(-50%, -50%); font-weight: 700; font-size: 13px; line-height: 1; white-space: nowrap; pointer-events: none; padding: 3px 5px; border-radius: 8px; background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--fg); }
.plot .p-lb.c0 { color: var(--green); } .plot .p-lb.c1 { color: var(--red); } .plot .p-lb.c2 { color: var(--blue); } .plot .p-lb.ans { color: var(--blue); font-size: 14px; }
