/* Оформление 01Обществознание: зелёно-белая гамма, мягкие поверхности, структура экранов 01Математики. */
@font-face { font-family: Ubuntu; src: url(../fonts/ubuntu-regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Ubuntu; src: url(../fonts/ubuntu-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Ubuntu Condensed'; src: url(../fonts/ubuntu-condensed.woff2) format('woff2'); font-display: swap; }
:root {
  --pine: #141c4f; --pine-2: #1b2a78; --forest: #1a3a9c; --brand: #0066ff; --brand-2: #2f8bff; --mint-glow: #5cc1fa; --lime: #ffd166;
  --bg: #f4f6fc; --surface: #fff; --mint: #e8f0ff; --mint-2: #c9dcff; --ink: #1a2150; --ink-soft: #4a5378; --muted: #6d7693; --line: #e0e5f2; --bad: #c0392b; --bad-bg: #fdefec; --warn: #8a6d12;
  --green: #12a367; --orange: #f39c12; --burgundy: #991747;
  --grad: linear-gradient(135deg, #1f7bff, #0052d6);
  --band: radial-gradient(900px 260px at 88% -40%, rgba(92,193,250,.42), transparent 70%), linear-gradient(95deg, #141c4f 0%, #27307f 52%, #0f8f7a 100%);
  --home: radial-gradient(1000px 620px at 85% -5%, rgba(92,193,250,.32), transparent 65%), radial-gradient(800px 620px at 5% 100%, rgba(18,163,103,.38), transparent 65%), linear-gradient(155deg, #141c4f 0%, #2b2a86 55%, #0d7f70 100%);
  --r-lg: 18px; --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(20,28,79,.05), 0 8px 24px rgba(20,28,79,.08);
  --shadow-lg: 0 2px 4px rgba(20,28,79,.08), 0 18px 40px rgba(20,28,79,.16);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 15px/1.5 Ubuntu, 'Helvetica Neue', Arial, sans-serif; overflow-x: hidden; }
html:has(body.is-home) { background: #10163f; }
body.is-home { background: transparent; }
/* Фон отдельным неподвижным слоем: background-attachment: fixed рвётся при прокрутке и не работает на телефонах. */
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 10px; }
:focus-visible { outline: 3px solid var(--mint-glow); outline-offset: 2px; }
main:focus { outline: none; }
.container { width: 1060px; max-width: 100%; margin: 0 auto; padding: 0 20px; }

/* Шапка */
#hdr { position: relative; background: var(--band); color: #fff; overflow: hidden; }
body.is-home #hdr { background: transparent; overflow: visible; z-index: 2; }
#hdr::after { content: 'Аа'; position: absolute; right: 4%; bottom: -46px; font: 700 190px/1 Ubuntu, sans-serif; color: rgba(255,255,255,.07); pointer-events: none; }
body.is-home #hdr::after { display: none; }
#menu { position: relative; z-index: 1; height: 60px; border-bottom: 1px solid rgba(255,255,255,.12); }
#menu .container { display: flex; align-items: center; gap: 4px; height: 59px; overflow-x: auto; }
#menu a { display: flex; align-items: center; height: 38px; padding: 0 15px; color: rgba(255,255,255,.88); text-decoration: none; font-size: 14px; border-radius: 19px; white-space: nowrap; transition: background .15s, color .15s; }
#menu a:hover { background: rgba(255,255,255,.12); color: #fff; }
#menu a.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; }
#menu a.home { padding: 0 11px; }
#menu .spacer { flex: 1; }
#menu .who { display: flex; align-items: center; gap: 8px; color: #fff; }
#menu .who i { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--forest); display: grid; place-items: center; font-style: normal; }
#pagehead { position: relative; z-index: 1; padding: 26px 0 0; }
#pagehead h1 { font: 700 34px/1.15 Ubuntu, sans-serif; letter-spacing: -.3px; padding-bottom: 8px; }
.crumbs { font-size: 13px; color: rgba(255,255,255,.72); padding: 0 0 22px; }
.crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs i { font-style: normal; margin: 0 7px; opacity: .6; }
.crumbs svg { vertical-align: -1px; }

/* Каркас */
#page-wrap { flex: 1; display: flex; width: 100%; position: relative; }
#main { flex: 1; min-width: 0; }
.page { padding: 28px 20px 44px; width: 1060px; max-width: 100%; margin: 0 auto; }
.page.wide { width: auto; max-width: none; padding: 20px 24px; }
#ftr { color: rgba(255,255,255,.72); background: var(--pine); margin-top: auto; }
body.is-home #ftr { background: rgba(20,28,79,.5); position: relative; z-index: 1; }
#ftr .container { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; font-size: 13px; }
#ftr a { color: #fff; text-decoration: none; }
#ftr .spacer { flex: 1; }
.tools-btn { position: fixed; right: 26px; bottom: 26px; z-index: 40; background: #fff; color: var(--forest); border: 0; border-radius: 26px; padding: 13px 22px; font-weight: 700; box-shadow: var(--shadow-lg); min-height: 44px; }
.tools-btn:hover { background: var(--mint); }
.tools-menu { position: fixed; right: 26px; bottom: 84px; z-index: 40; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; min-width: 190px; }
.tools-menu a { display: block; padding: 10px 14px; color: var(--ink); text-decoration: none; border-radius: var(--r-sm); }
.tools-menu a:hover { background: var(--mint); }

/* Главная */
.home-page { position: relative; z-index: 1; width: 1060px; max-width: 100%; margin: 0 auto; padding: 30px 20px 56px; color: #fff; }
.home-logo { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 10px; }
.home-logo img { width: 112px; height: auto; filter: drop-shadow(0 10px 26px rgba(0,0,0,.4)); }
.home-logo .word { font: 700 86px/1 Ubuntu, sans-serif; letter-spacing: -2px; }
.home-logo .word b { background: linear-gradient(120deg, #5cc1fa, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-sub { text-align: center; font-size: 19px; color: #dcf8ea; margin: 0 0 34px; }
.all-topics { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 0 auto 48px; min-height: 54px; background: #0066ff; color: #fff; border-radius: 10px; text-decoration: none; font-size: 16px; font-weight: 700; box-shadow: 0 10px 30px rgba(92,193,250,.3); transition: transform .15s, box-shadow .15s; }
.all-topics:hover { transform: translateY(-2px); background: #1f7bff; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 158px; padding: 22px 10px 32px; border-radius: var(--r-lg); background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); color: #fff; text-decoration: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .18s, background .18s, border-color .18s; }
.tile:hover { transform: translateY(-4px); background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.tile .count { position: absolute; top: 10px; right: 13px; font-size: 12px; color: rgba(255,255,255,.75); }
.tile b { font-size: 50px; line-height: 1; font-weight: 700; letter-spacing: -1px; }
.tile span { font-size: 16px; }
.tile small { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.75); }
.tile-bar { position: absolute; left: 16px; right: 16px; bottom: 9px; height: 3px; background: rgba(255,255,255,.18); border-radius: 2px; overflow: hidden; }
.tile-bar i { display: block; height: 100%; background: var(--mint-glow); }
.tile.exam { background: #fff; color: var(--forest); border-color: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.tile.exam:hover { background: #eef4ff; }
.tile.exam .count, .tile.exam small { color: var(--muted); }
.tile.exam b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile.exam .tile-bar { background: var(--mint); } .tile.exam .tile-bar i { background: var(--brand); }
.tile.junior { background: rgba(20,28,79,.42); border-color: rgba(255,255,255,.1); }

/* Поля и кнопки */
input[type=search], input[type=text], input[type=password], input[type=date], select { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 13px; min-height: 44px; background: #fff; max-width: 100%; }
input:focus, select:focus { border-color: var(--brand-2); outline: 3px solid var(--mint-2); outline-offset: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 22px; border-radius: 22px; border: 1px solid var(--mint-2); background: #fff; color: var(--forest); text-decoration: none; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--mint); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(0,102,255,.28); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(0,102,255,.34); }
.btn.full { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.lead { font-size: 16px; }
.section-title { font-size: 22px; margin-bottom: 14px; }
.course-title { font-size: 19px; color: var(--forest); margin: 22px 0 10px; font-weight: 700; }
.course-title small { font-size: 13px; color: var(--muted); font-weight: 400; }
.tag { font-size: 12px; background: var(--mint); color: var(--forest); padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.overline { font-size: 11px; letter-spacing: .08em; color: var(--brand); font-weight: 700; margin-bottom: 6px; }

/* Каталог */
.themes-tools { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.search { position: relative; display: flex; width: 320px; max-width: 100%; }
.search input { flex: 1; min-width: 0; border-radius: 22px; padding-left: 42px; box-shadow: var(--shadow); border-color: transparent; }
.search span { position: absolute; left: 15px; top: 14px; color: var(--muted); }
.themes-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.class-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 3px; background: var(--surface); padding: 10px; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.class-list a { display: block; white-space: nowrap; padding: 10px 14px; text-decoration: none; color: var(--ink-soft); border-radius: var(--r-sm); transition: background .15s; }
.class-list a:hover { background: var(--mint); color: var(--forest); }
.class-list a.on { background: var(--grad); color: #fff; font-weight: 700; }
.cat { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; }
.cat > summary, .sub > summary { list-style: none; cursor: pointer; }
.cat > summary::-webkit-details-marker, .sub > summary::-webkit-details-marker { display: none; }
.cat > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 16px; font-weight: 700; color: var(--ink); min-height: 54px; border-radius: var(--r); }
.cat > summary:hover { background: #f6f9ff; }
.cat > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.cat[open] > summary::after { transform: rotate(-135deg); }
.cat > summary small { font-weight: 400; }
.pill { display: inline-block; flex: none; background: var(--pine); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.cat > summary .pill { background: var(--grad); color: #fff; }
.subs { list-style: none; margin: 0; padding: 0 12px 10px; }
.sub { position: relative; }
.sub > summary { display: flex; align-items: center; gap: 12px; padding: 8px 8px; min-height: 42px; border-radius: var(--r-sm); }
.sub > summary:hover, .sub[open] > summary { background: var(--mint); }
.sub .t { flex: 0 1 auto; }
.sub[open] .t { font-weight: 700; color: var(--forest); }
.sub .dots { flex: 1; min-width: 12px; }
.lv { display: inline-flex; gap: 3px; flex: none; }
.lv i { width: 16px; height: 6px; border-radius: 3px; background: var(--mint-2); }
.lv i.on { background: var(--brand-2); }
.popover-menu { position: absolute; left: 110px; top: 44px; z-index: 30; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 7px; min-width: 240px; }
.popover-menu a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: var(--ink); text-decoration: none; min-height: 40px; border-radius: var(--r-sm); }
.popover-menu a:hover { background: var(--mint); }
.popover-menu svg { color: var(--brand); flex: none; }
.popover-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.src-note { margin: 14px 0 0 4px; }

/* Выполнение заданий */
.go-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; align-items: start; }
.task-card, .theory-card, .result-card, .card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.task-card, .theory-card, .result-card { position: relative; padding: 30px 30px 26px; margin-bottom: 20px; }
.theory-card { font-size: 17px; line-height: 1.65; }
.theory-card .card-label { display: table; margin-bottom: 12px; }
.result-card { text-align: center; }
.card-label { display: inline-block; background: var(--mint); color: var(--forest); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 12px; margin-bottom: 16px; }
.task-q { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.task-q:focus { outline: none; }
.passage { margin: 0 0 18px; padding: 16px 18px; background: var(--bg); border-left: 4px solid var(--brand-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; line-height: 1.7; font-size: 16px; }
.task-area { display: flex; flex-direction: column; gap: 10px; counter-reset: opt; }
.opt { display: flex; align-items: center; gap: 13px; text-align: left; padding: 11px 15px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); min-height: 54px; font-size: 16px; transition: border-color .15s, background .15s; }
.opt::before { counter-increment: opt; content: counter(opt, upper-alpha); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--forest); font-size: 13px; font-weight: 700; }
.opt:hover:not(:disabled) { border-color: var(--brand-2); }
.opt.on { background: var(--mint); border-color: var(--brand); font-weight: 700; }
.opt.on::before { background: var(--brand); color: #fff; }
.answer { font-size: 22px; width: 220px; }
.order-line { display: flex; flex-wrap: wrap; gap: 8px; min-height: 62px; padding: 10px; border: 2px dashed var(--mint-2); border-radius: var(--r); align-items: center; background: #f9fbff; }
.order-hint { color: var(--muted); font-size: 14px; }
.order-pool { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 15px; border: 1px solid var(--mint-2); border-radius: 20px; background: #fff; min-height: 44px; font-size: 15px; }
.chip:hover { border-color: var(--brand-2); }
.chip.placed { background: var(--grad); color: #fff; border-color: transparent; }
.pick-text { font-size: 21px; line-height: 2.1; margin: 0; }
.pick-word { background: none; border: 0; border-bottom: 2px dotted var(--mint-2); padding: 2px 5px; font-size: 21px; min-height: 44px; }
.pick-word:hover { background: var(--mint); border-radius: 6px; }
.pick-word.on { background: var(--grad); color: #fff; border-radius: 6px; }
.pick-letters { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.pick-letter { width: 46px; height: 58px; font-size: 26px; background: #fff; border: 2px solid var(--line); border-radius: var(--r-sm); }
.pick-letter:hover { border-color: var(--brand-2); }
.pick-letter.on { background: var(--grad); color: #fff; border-color: transparent; }
.feedback { margin: 14px 0 0; min-height: 1px; }
.feedback.good { color: #fff; background: linear-gradient(135deg, #17b37a, #0c8a5c); padding: 13px 16px; border-radius: var(--r); font-weight: 700; }
.feedback.bad { color: var(--bad); background: var(--bad-bg); padding: 13px 16px; border-radius: var(--r); }
.feedback.warn { color: var(--warn); }
.checks label { display: block; padding: 7px 0; }
.side-card { position: relative; border-radius: var(--r-lg); background: linear-gradient(165deg, var(--pine-2), var(--forest)); color: #fff; padding: 20px 18px 18px; text-align: center; box-shadow: var(--shadow-lg); margin-bottom: 16px; }
.side-card .card-label { background: rgba(255,255,255,.14); color: #fff; margin-bottom: 4px; }
.side-level { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: 6px; border-radius: 50%; font-weight: 700; color: var(--pine); background: var(--mint-glow); vertical-align: top; }
.side-score { font-size: 62px; line-height: 1; margin: 12px 0 10px; font-weight: 700; color: #fff; }
.side-score em { font-style: normal; font-size: 32px; color: rgba(255,255,255,.4); margin: 0 5px; }
.side-score u { text-decoration: none; font-size: 36px; color: var(--mint-glow); }
.side-line { font-size: 12px; color: rgba(255,255,255,.75); margin-bottom: 8px; }
.meter { position: relative; height: 18px; background: rgba(255,255,255,.16); border-radius: 9px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--mint-glow)); transition: width .3s; }
.meter span { position: absolute; inset: 0; text-align: center; color: #fff; font-size: 11px; line-height: 18px; }
.meter.thin { height: 8px; background: var(--mint); }
.side-card .btn.full { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
.side-card .btn.full:hover { background: rgba(255,255,255,.2); }
.result-card .row-actions { justify-content: center; }
.result-pct { font-size: 72px; line-height: 1.1; font-weight: 700; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.good-note { color: var(--forest); font-weight: 700; }
.frp-box { margin: 0 0 16px; padding: 14px 18px; border-left: 4px solid var(--brand-2); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; box-shadow: var(--shadow); font-size: 15px; }
.frp-box p:last-child { margin: 0; }
cite { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
.link-list { padding: 0; margin: 0 0 12px; list-style: none; }
.link-list li { margin: 4px 0; }
.link-list button { background: none; border: 0; color: var(--brand); text-decoration: underline; padding: 4px 0; text-align: left; }

/* Кабинет */
.cab-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cab-avatar { width: 62px; height: 62px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; box-shadow: 0 8px 20px rgba(0,102,255,.3); }
.cab-head h2 { font-size: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-row div { background: var(--grad); color: #fff; border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-row div:nth-child(2) { background: linear-gradient(135deg, #064a33, #03231a); }
.stat-row div:nth-child(3) { background: linear-gradient(135deg, #12a56e, #087a4c); }
.stat-row svg { opacity: .75; float: right; }
.stat-row b { font-size: 38px; line-height: 1.1; display: block; }
.stat-row span { font-size: 14px; opacity: .9; }
.cab-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-top: 20px; }
.card { padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 17px; margin-bottom: 10px; }
.track-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px 0; }
.track-row a { text-decoration: none; color: var(--ink); }
.next-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.next-row:last-child { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 400; font-size: 13px; }
.login-form { max-width: 380px; margin: 0 auto; display: grid; gap: 10px; }
.login-form[hidden] { display: none; }
.login-form label { display: grid; gap: 4px; }
.login-form input, .login-form select { width: 100%; }
.exam-score b { font-size: 30px; color: var(--brand); }
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; }
.panel > summary { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; font-weight: 700; cursor: pointer; list-style: none; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary em { font-style: normal; font-weight: 400; color: var(--muted); flex: none; }
.frp-tabs { margin: 14px 0; } .frp-tabs input { width: 100%; }
.frp-list { margin: 0; padding: 0 18px 12px 42px; }
.frp-item { margin-bottom: 9px; } .frp-item p { margin: 0; }
.frp-links { font-size: 13px; }

/* Домашние задания */
.hw-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px 28px; }
.hw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.hw-head b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; }
.hw-head h2 { font-size: 18px; }
.hw-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; } .hw-row input { flex: 1; min-width: 150px; }
.hw-list { border: 1px solid var(--line); border-radius: var(--r-sm); height: 200px; overflow-y: auto; padding: 6px; }
.hw-list button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 6px; }
.hw-list button:hover { background: var(--mint); } .hw-list button.on { background: var(--grad); color: #fff; }
.hw-kinds label { display: block; padding: 6px 2px; }
.hw-date input { margin-left: 8px; }
.link { background: none; border: 0; color: var(--brand); text-decoration: underline; }
.hw-tasks { padding: 0; list-style: none; }
.hw-tasks li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hw-tasks li a { flex: 1; min-width: 180px; }

/* Граф */
.graph-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--surface); border-radius: 22px; padding: 3px; box-shadow: var(--shadow); }
.seg button { border: 0; background: transparent; padding: 7px 14px; min-height: 40px; color: var(--ink-soft); border-radius: 20px; }
.seg button.on { background: var(--grad); color: #fff; font-weight: 700; }
#search, #atlas-q { min-width: 200px; }
.zoom { display: inline-flex; gap: 4px; margin-left: auto; }
.zoom button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); font-size: 18px; color: var(--forest); }
.graph-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.graph-stage { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--pine); box-shadow: var(--shadow-lg); }
#graph-canvas, #atlas-canvas { display: block; width: 100%; height: calc(100vh - 300px); min-height: 500px; touch-action: none; cursor: grab; }
.legend { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 12px; color: #eafff3; font-size: 12px; background: rgba(20,28,79,.78); padding: 7px 12px; border-radius: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.n { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.n0 { background: #fff; } .n2 { background: #9fe9c0; } .n4 { background: #16b36a; }
.n.ring { border: 2px solid #b7f5d3; } .n.dash { border: 2px dashed #b7f5d3; }
.graph-panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; max-height: calc(100vh - 300px); min-height: 500px; overflow-y: auto; }
.graph-panel h2 { font-size: 21px; margin-bottom: 8px; }
.graph-panel h3 { font-size: 15px; margin: 14px 0 4px; color: var(--forest); }
.atlas-quote { font-size: 16px; line-height: 1.55; margin-bottom: 10px; }
.atlas-source { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.atlas-hits { list-style: none; padding: 0; margin: 8px 0 0; }
.atlas-hits button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 8px; font-size: 14px; }
.atlas-hits button:hover { background: var(--mint); }
.atlas-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.atlas-stats div { background: var(--mint); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.atlas-stats b { display: block; font-size: 20px; color: var(--forest); }
.atlas-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #eafff3; }

/* Цветовые акценты */
:root { --amber: #ffb547; --coral: #ff7f6e; --sky: #4fb7ff; --violet: #9d7bff; }
.tile.senior { background: #0066ff; border-color: transparent; }
.tile.senior:hover { background: #1f7bff; }
.tile.junior { background: #3f9f7c; border-color: transparent; }
.tile.junior:hover { background: #4fb28e; }
.tile.exam.ege, .tile.exam.oge { background: #f39c12; border-color: transparent; color: #fff; }
.tile.exam.ege:hover, .tile.exam.oge:hover { background: #ffab2b; }
.tile.exam b { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }
.tile.exam .count, .tile.exam small { color: rgba(255,255,255,.88); opacity: 1; }
.tile.exam .tile-bar { background: rgba(255,255,255,.25); } .tile.exam .tile-bar i { background: #fff; }
.tile.senior .tile-bar i, .tile.junior .tile-bar i { background: #fff; }
.tile, .tile.senior, .tile.junior { box-shadow: 0 8px 22px rgba(10,14,50,.28); backdrop-filter: none; -webkit-backdrop-filter: none; }
.stat-row div:nth-child(1) { background: linear-gradient(135deg, #2f9bf0, #1766c9); }
.stat-row div:nth-child(2) { background: linear-gradient(135deg, #17b37a, #0c8a5c); }
.stat-row div:nth-child(3) { background: linear-gradient(135deg, #ffa24a, #ee6a3f); }
.side-card { background: linear-gradient(165deg, #141c4f, #2b2a86); }
.card-label { background: #fff1d6; color: #7a4a00; }
.side-card .card-label { background: rgba(255,255,255,.16); color: #fff; }
.cat > summary .pill { background: var(--pine); }
.opt::before { background: #e6f1ff; color: #1766c9; }
.lv i.on { background: #12a367; }
.card h3 { color: var(--ink); }
.exam-score b { color: #ee6a3f; }

/* Новые формы заданий */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-grid > div { display: flex; flex-direction: column; gap: 8px; }
.match-item { display: flex; align-items: center; gap: 10px; text-align: left; min-height: 52px; padding: 9px 13px; background: #fff; border: 2px solid var(--line); border-radius: var(--r); }
.match-item:hover:not(:disabled) { border-color: var(--sky); }
.match-item.active { border-color: var(--sky); background: #e8f4ff; }
.match-item.done { background: #f1ecff; border-color: var(--violet); }
.match-item i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--violet); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; }
.sort-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.sort-group { min-height: 110px; padding: 11px; border: 2px dashed #bcdcf7; border-radius: var(--r); background: #f5fbff; cursor: pointer; }
.sort-group:hover { border-color: var(--sky); }
.sort-group b { display: block; color: #17528f; margin-bottom: 8px; font-size: 14px; }
.sort-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.in { background: #dff0ff; border-color: var(--sky); }
.gap { display: inline-block; height: 38px; min-height: 0 !important; padding: 2px 4px !important; text-align: center; font-size: 19px; margin: 0 3px; background: #fff8e8 !important; border: 2px solid var(--amber) !important; border-radius: 7px !important; vertical-align: middle; }
.gap-select { min-height: 38px !important; padding: 2px 8px !important; font-size: 18px; margin: 0 4px; background: #fff8e8 !important; border: 2px solid var(--amber) !important; }
.stress-list { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.stress-word { display: inline-flex; align-items: flex-end; font-size: 28px; }
.stress-word span { padding: 0 1px; }
.stress-v { min-width: 34px; height: 50px; background: #fff3dc; border: 0; border-radius: 8px; font-size: 28px; margin: 0 1px; color: var(--ink); }
.stress-v:hover:not(:disabled) { background: #ffe2ad; }
.stress-v.on { background: var(--amber); font-weight: 700; color: #4a2300; }
.comma-text { display: flex; flex-wrap: wrap; align-items: center; font-size: 22px; line-height: 2.2; margin: 0; }
.comma-gap, .split-gap { width: 24px; height: 40px; background: var(--mint); border: 0; border-radius: 6px; margin: 0 2px; font-size: 24px; font-weight: 700; line-height: 1; color: #fff; }
.comma-gap:hover:not(:disabled), .split-gap:hover:not(:disabled) { background: var(--mint-2); }
.comma-gap.on, .split-gap.on { background: var(--coral); }
.split-word { display: flex; flex-wrap: wrap; align-items: center; font-size: 30px; margin: 0; }
.fix-input { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.morph-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.morph-tool { padding: 8px 14px; min-height: 44px; border-radius: 20px; border: 2px solid transparent; font-weight: 700; opacity: .72; }
.morph-tool.on { opacity: 1; border-color: var(--ink); }
.m-п { background: #dcecff !important; color: #17528f !important; } .m-к { background: #c9f2dc !important; color: #06623b !important; } .m-с { background: #ffe9c2 !important; color: #7a4a00 !important; } .m-о { background: #ece2ff !important; color: #4b2aa3 !important; }
.tf-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tf-row span { flex: 1; min-width: 200px; font-size: 16px; }
.tf-row > div { display: flex; gap: 6px; }
.tf { min-height: 44px; padding: 7px 15px; background: #fff; border: 2px solid var(--line); border-radius: 22px; }
.tf.yes { background: #c9f2dc; border-color: var(--brand); font-weight: 700; } .tf.no { background: #ffe0da; border-color: var(--coral); font-weight: 700; }

/* Перенесено из 01Математики */
.tools-menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; color: var(--ink); background: none; border: 0; border-radius: var(--r-sm); }
.tools-menu button:hover { background: var(--mint); }
.draw-layer { position: absolute; left: 0; top: 0; z-index: 45; touch-action: none; cursor: crosshair; }
.draw-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 46; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: calc(100vw - 24px); background: #fff; padding: 7px; border-radius: 16px; box-shadow: var(--shadow-lg); }
.draw-bar button { min-height: 44px; padding: 6px 13px; border: 0; background: transparent; border-radius: 11px; }
.draw-bar button:hover { background: var(--mint); }
.draw-bar button.on { background: var(--grad); color: #fff; }
.feedback.hint { background: #fff5dc; color: #6e4a00; padding: 13px 16px; border-radius: var(--r); }
.link.report { display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 10px 4px; font-size: 13px; color: var(--muted); }
.foot-link { background: none; border: 0; color: #fff; padding: 0; font-size: 13px; }
.finish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.finish-stats div { background: var(--bg); border-radius: var(--r); padding: 12px; }
.finish-stats b { display: block; font-size: 24px; color: var(--forest); }
.finish-stats span { font-size: 13px; color: var(--muted); }
.medals { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.medal { position: relative; width: 104px; text-align: center; font-size: 12px; }
.medal img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 4px; }
.medal b { font-weight: 400; }
.medal .badge { position: absolute; right: 12px; top: 0; background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.bad-note { color: var(--bad); font-weight: 700; }
.task-card.lesson { margin-bottom: 14px; }
.task-card.lesson.solved { border-left: 5px solid var(--brand-2); }
.lesson-text { font-size: 17px; line-height: 1.65; }
.bug-dialog { border: 0; border-radius: var(--r-lg); padding: 24px; width: min(480px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
.bug-dialog::backdrop { background: rgba(20,28,79,.5); }
.bug-dialog h2 { font-size: 20px; margin-bottom: 8px; }
.bug-dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; font: inherit; resize: vertical; }
.theme-tabs { margin-bottom: 14px; }
.theme-tabs a { padding: 8px 22px; min-height: 40px; color: var(--ink-soft); border-radius: 20px; text-decoration: none; display: flex; align-items: center; }
.theme-tabs a.on { background: var(--grad); color: #fff; font-weight: 700; }
.cw-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-height: 54px; }
.cw-row a { font-weight: 700; color: var(--ink); text-decoration: none; }
.cw-row a:hover { color: var(--brand); }
.cw-row .pill { background: #fff1d6; color: #7a4a00; }
@media print {
  #menu, #ftr, .tools-btn, .tools-menu, .draw-bar, .go-side, #acts, .link.report, .crumbs { display: none !important; }
  body { background: #fff !important; }
  #hdr { background: none !important; color: #000; }
  #hdr::after { display: none; }
  .go-grid { display: block; }
  .task-card, .card, .result-card { box-shadow: none; border: 1px solid #ccc; }
}

/* Админка */
.admin-page label { display: grid; gap: 4px; margin-bottom: 10px; font-size: 14px; color: var(--ink-soft); }
.admin-page textarea, .admin-page input[type=text], .admin-page select { width: 100%; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; background: #fff; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-preview { box-shadow: none; padding: 0; margin: 0; }
.admin-page .task-area label { display: block; }
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-item p { margin: 6px 0 0; }
.admin-item.off { opacity: .55; }
.panel .admin-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .admin-grid, .admin-row { grid-template-columns: 1fr; } }

/* Большой граф как на 01math.com/graph */
.atlas-count { margin: 0 0 10px; color: var(--ink-soft); }
.atlas-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; }

/* Разбор темы */
.g-lead { margin: 0 0 12px; font-size: 19px; font-weight: 600; line-height: 1.45; color: #141c4f; }
.g-rules { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 7px; }
.g-rules li { position: relative; padding-left: 20px; }
.g-rules li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand, #0066ff); }
.g-ex { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.g-ex span { padding: 6px 12px; border-radius: 10px; background: #fff5e6; color: #7a4a00; font-size: 15px; }
.g-note { margin: 0 0 10px; padding: 11px 14px; border-radius: 10px; background: #eaf7ef; }
.g-src { margin: 8px 0 0; font-size: 12.5px; color: var(--muted, #778); }

/* Подробная теория */
.g-h { margin: 22px 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #5a6a8a; }
.g-text p { margin: 0 0 10px; }
.g-table-wrap { overflow-x: auto; margin: 0 0 8px; border-radius: 12px; border: 1px solid #e3e9f2; }
.g-table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.4; }
.g-table th { background: #141c4f; color: #fff; text-align: left; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.g-table td { padding: 9px 12px; border-top: 1px solid #edf1f7; vertical-align: top; }
.g-table tbody tr:nth-child(even) { background: #f7f9fd; }
.g-table td:first-child { font-weight: 600; color: #141c4f; }
.g-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.g-steps li { counter-increment: s; position: relative; padding: 2px 0 2px 38px; min-height: 26px; }
.g-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--brand, #0066ff); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.g-bad { display: grid; gap: 8px; }
.g-bad div { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 9px 12px; border-radius: 10px; background: #fff3f1; }
.g-bad s { color: #c0392b; }
.g-bad b { color: #1a8a4a; }
.g-bad span { flex-basis: 100%; font-size: 14px; color: #6a5a58; }
.g-note { margin-top: 14px; }
.self-check .row-actions { margin-top: 12px; }

/* Главная: классы ровными рядами, экзамены отдельным рядом */
.home-page .tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.home-page .tile { grid-column: span 3; }
.home-page .tile.senior:nth-child(n+9) { grid-column: span 4; }
.home-page .tile.exam { grid-column: span 6; }
@media (max-width: 720px) { .home-page .tile, .home-page .tile.senior:nth-child(n+9) { grid-column: span 6; } .home-page .tile.senior:nth-child(11) { grid-column: span 12; } .home-page .tile.exam { grid-column: span 6; } }
#ftr { padding-right: 140px; }

/* Граф знаний: узлы и маршрут */
.kg-dot { display: inline-block; width: 10px; height: 10px; margin: 0 7px 0 0; border-radius: 50%; background: #c6d2e6; vertical-align: 1px; }
.kg-dot.kg-mastered { background: #17a673; } .kg-dot.kg-learning { background: #f5a524; } .kg-dot.kg-ready { background: #2f9bf0; }
.kg-legend { margin-left: 10px; color: #55627d; font-size: 13px; } .kg-legend .kg-dot { margin-left: 10px; }
.kg-card { margin-top: 14px; } .kg-card h4 { margin: 10px 0 6px; font-size: 13px; }
.kg-name { margin: 8px 0; font-weight: 700; color: inherit; }
.kg-note { margin: 8px 0; font-size: 13.5px; opacity: .85; }
.kg-list { margin: 8px 0; padding: 0; list-style: none; display: grid; gap: 5px; font-size: 13.5px; }
.kg-list a { color: inherit; }
.kg-path { margin: 12px 0; padding-left: 22px; display: grid; gap: 6px; } .kg-path small { margin-left: 8px; color: #7a88a4; }
.kg-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.kg-level { display: grid; padding: 8px 4px; border-radius: 10px; background: #eef2f8; color: #3b4764; text-align: center; font-size: 12px; line-height: 1.25; }
.kg-level b { font-size: 16px; } .kg-level small { color: inherit; opacity: .75; font-size: 10.5px; }
.kg-level.kg-mastered { background: #17a673; color: #fff; } .kg-level.kg-learning { background: #fff0d4; color: #7a4a00; } .kg-level.kg-ready { background: #e2f1ff; color: #0b5a9c; }
.kg-goal label { display: flex; gap: 10px; align-items: center; font-weight: 700; margin-bottom: 12px; } .kg-goal .btn { margin: 6px 8px 0 0; }

/* Красивая теория */
.guide-card { padding: 0 !important; overflow: hidden; }
.guide-card .g-src { margin: 0; padding: 12px 26px 20px; }
.gx { font-size: 17px; line-height: 1.6; color: #1d2547; }
.gx-hero { position: relative; padding: 30px 30px 32px; color: #fff; background: radial-gradient(120% 140% at 100% 0, #2f8bff 0, #0066ff 38%, #141c4f 100%); }
.gx-hero::after { content: 'Аа'; position: absolute; right: 18px; bottom: -22px; font-size: 118px; font-weight: 800; line-height: 1; color: rgba(255,255,255,.1); pointer-events: none; }
.gx-hero span { display: inline-block; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.gx-hero p { position: relative; z-index: 1; margin: 12px 0 0; max-width: 680px; font-size: 23px; font-weight: 700; line-height: 1.32; }
.gx-nav { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 26px; background: #f5f8ff; border-bottom: 1px solid #e6edf8; }
.gx-nav button { padding: 7px 14px; border: 1px solid #d6e2f6; border-radius: 999px; background: #fff; color: #0052cc; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.gx-nav button:hover { background: #0066ff; border-color: #0066ff; color: #fff; }
.gx-sec { --c: #0066ff; --bg: #eef4ff; padding: 22px 26px 4px; scroll-margin-top: 12px; }
.gx-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 19px; color: #141c4f; }
.gx-sec h3 svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--bg); fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gx-text { display: grid; gap: 12px; }
.gx-text p { margin: 0; padding: 13px 16px; border-radius: 12px; background: #f7f9fe; }
.gx-text p:first-child { background: #eef4ff; font-weight: 500; }
.gx-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #e1e9f6; border-radius: 14px; overflow: hidden; font-size: 15.5px; line-height: 1.42; }
.gx-table th { padding: 11px 14px; background: #141c4f; color: #fff; text-align: left; font-size: 13px; font-weight: 600; }
.gx-table td { padding: 11px 14px; border-top: 1px solid #edf2f9; vertical-align: top; }
.gx-table tbody tr:nth-child(even) td { background: #f7f9fe; }
.gx-table tbody tr:hover td { background: #eef4ff; }
.gx-table td:first-child { font-weight: 700; color: #141c4f; }
.gx-steps { --c: #17a673; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.gx-steps li { counter-increment: s; position: relative; padding: 4px 0 18px 48px; }
.gx-steps li:last-child { padding-bottom: 6px; }
.gx-steps li::before { content: counter(s); position: absolute; z-index: 1; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #1fc48a, #0c8a5c); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.gx-steps li::after { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: #cfeee1; }
.gx-steps li:last-child::after { display: none; }
.gx-s-steps { --c: #0c8a5c; --bg: #e5f7ef; }
.gx-s-bad { --c: #d64533; --bg: #fdece9; }
.gx-s-ex { --c: #d98200; --bg: #fff3df; }
.gx-bad-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.gx-bad-row > div { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 12px; }
.gx-bad-row i { flex: none; width: 21px; height: 21px; border-radius: 50%; color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.gx-wrong { background: #fdece9; } .gx-wrong i { background: #d64533; } .gx-wrong span { color: #a33; text-decoration: line-through; text-decoration-color: rgba(214,69,51,.5); }
.gx-right { background: #e5f7ef; } .gx-right i { background: #17a673; } .gx-right span { color: #0b6b47; font-weight: 600; }
.gx-bad-row p { grid-column: 1 / -1; margin: 0; padding: 0 4px; font-size: 14.5px; color: #5e6b85; }
.gx-ex { display: flex; flex-wrap: wrap; gap: 9px; padding-bottom: 8px; }
.gx-ex span { padding: 9px 15px; border-radius: 12px; background: linear-gradient(135deg, #fff6e6, #ffedcc); color: #6d4300; font-weight: 500; box-shadow: inset 0 0 0 1px #fbe0ad; }
.gx-note { display: flex; gap: 14px; align-items: flex-start; margin: 18px 26px 12px; padding: 16px 18px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #6a4dff, #3c2bbd); }
.gx-note svg { flex: none; width: 28px; height: 28px; fill: #ffd76a; }
.gx-note b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.gx-note p { margin: 2px 0 0; font-size: 18px; font-weight: 600; line-height: 1.4; }
@media (max-width: 640px) {
  .gx-hero { padding: 24px 20px 26px; } .gx-hero p { font-size: 20px; }
  .gx-nav { padding: 12px 16px; flex-wrap: nowrap; overflow-x: auto; } .gx-nav button { flex: none; }
  .gx-sec { padding: 18px 16px 2px; } .gx-note { margin: 16px; } .guide-card .g-src { padding: 10px 16px 16px; }
  .gx-table, .gx-table tbody, .gx-table tr, .gx-table td { display: block; border: 0; } .gx-table { overflow: visible; } .gx-table thead { display: none; }
  .gx-table tr { margin-bottom: 10px; padding: 8px 2px; border-radius: 12px; background: #f7f9fe; box-shadow: inset 0 0 0 1px #e6edf8; }
  .gx-table tbody tr:nth-child(even) td, .gx-table tbody tr:hover td { background: transparent; }
  .gx-table td { padding: 5px 13px; } .gx-table td::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: #7a88a4; text-transform: uppercase; }
  .gx-bad-row { grid-template-columns: 1fr; }
}

/* Теория: дословный текст документа */
.doc-src { margin: 0 0 18px; font-size: 13px; color: var(--muted, #667); }
.doc-group { margin: 0 0 22px; }
.doc-group:last-child { margin-bottom: 0; }
.doc-group h3 { display: inline-block; margin: 0 0 12px; padding: 5px 13px; border-radius: 999px; background: #e9f1ff; color: #0052cc; font-size: 14px; font-weight: 700; line-height: 1.3; }
.doc-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc-items li { position: relative; display: flex; gap: 14px; justify-content: space-between; align-items: baseline; padding: 11px 14px 11px 18px; border-radius: 10px; background: #f6f8fd; }
.doc-items li::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--brand, #0066ff); }
.doc-items cite { flex: none; font-style: normal; font-size: 12px; color: var(--muted, #778); white-space: nowrap; }
@media (max-width: 560px) { .doc-items li { flex-direction: column; gap: 4px; } }

/* Доска: экран пополам */
body.desk-open { padding-left: var(--desk-w, 50vw); }
.desk-split { position: fixed; left: 0; top: 0; bottom: 0; width: var(--desk-w, 50vw); z-index: 50; background: #fff; }
.desk-split iframe { width: 100%; height: 100%; border: 0; display: block; }
.desk-split.dragging iframe { pointer-events: none; }
.desk-close { position: absolute; right: 16px; top: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--pine); color: #fff; font-size: 20px; line-height: 1; z-index: 2; }
.desk-handle { position: absolute; right: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; touch-action: none; }
.desk-handle::after { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.desk-handle:hover::after { background: var(--brand); }
@media (max-width: 720px) { body.desk-open { padding-left: 0; } .desk-split { width: 100vw !important; } }
.theory-card ul, .theory-card ol { margin: 6px 0 12px; padding-left: 22px; }
.theory-card li { margin: 4px 0; }

@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .go-grid, .graph-layout, .hw-grid, .cab-grid { grid-template-columns: 1fr; }
  #graph-canvas, #atlas-canvas { height: 60vh; min-height: 360px; }
  .graph-panel { max-height: none; min-height: 0; }
}
@media (max-width: 720px) {
  #menu .container { overflow-x: auto; padding: 0 8px; }
  #menu a { padding: 0 11px; font-size: 13px; }
  #pagehead { padding-top: 18px; }
  #pagehead h1 { font-size: 25px; }
  #hdr::after { font-size: 120px; bottom: -30px; }
  .container, .page, .home-page { padding-left: 16px; padding-right: 16px; }
  .home-page { padding-top: 22px; }
  .home-logo { gap: 10px; }
  .home-logo .word { font-size: 50px; letter-spacing: -1px; }
  .home-logo img { width: 62px; }
  .home-sub { font-size: 15px; margin-bottom: 22px; }
  .all-topics { margin-bottom: 30px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile { min-height: 132px; }
  .themes-layout { grid-template-columns: 1fr; gap: 14px; }
  .class-list { position: static; flex-direction: row; overflow-x: auto; }
  .class-list a { white-space: nowrap; }
  .sub > summary { flex-wrap: wrap; }
  .sub .dots { display: none; }
  .popover-menu { left: 8px; right: 8px; min-width: 0; }
  .task-card, .theory-card, .result-card { padding: 22px 18px; }
  #page-wrap { display: block; }
  .stat-row { grid-template-columns: 1fr; }
  .tools-btn { right: 12px; bottom: 12px; }
  .tools-menu { right: 12px; bottom: 70px; }
  .zoom { margin-left: 0; }
  .legend { position: static; border-radius: 0; }
  .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Большой граф: тёмная сцена как в презентации */
.atlas-dark { position: relative; display: block; }
.atlas-stage { background: radial-gradient(ellipse 70% 80% at 42% 46%, #1b2a78 0%, #141c4f 48%, #0a0e2e 100%); }
#atlas-box { width: 100%; height: calc(100vh - 230px); min-height: 600px; }
.g3d { display: block; touch-action: none; cursor: grab; }
.atlas-stage .atlas-loading { color: #eef1ff; }
.atlas-dark .graph-panel { --ink: #eef1ff; --ink-soft: #c9d1f2; --muted: #aab6e0; --forest: #9fdcff; --mint: rgba(92,193,250,.14); --line: rgba(160,178,255,.25); --surface: rgba(92,193,250,.12); position: absolute; top: 14px; right: 14px; bottom: 14px; width: 344px; max-height: none; min-height: 0; color: var(--ink); background: rgba(13,19,62,.78); border: 1px solid rgba(160,178,255,.22); box-shadow: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.atlas-dark .graph-panel .btn:not(.primary) { color: #eef1ff; }
.atlas-dark .atlas-hits button { color: #dfe5ff; }
.atlas-groups { position: absolute; left: 16px; bottom: 16px; right: 374px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: #dfe5ff; font-size: 13px; pointer-events: none; }
.atlas-groups span { display: inline-flex; align-items: center; gap: 7px; }
.atlas-groups i { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.atlas-hint { position: absolute; left: 16px; top: 14px; margin: 0; max-width: calc(100% - 520px); color: #aab6e0; font-size: 13px; pointer-events: none; }
.atlas-kinds { position: absolute; top: 12px; right: 372px; color: #eef1ff; font-size: 13px; background: rgba(13,19,62,.78); border: 1px solid rgba(160,178,255,.22); border-radius: 12px; padding: 7px 12px; }
.atlas-kinds summary { cursor: pointer; }
.atlas-kinds label { display: flex; align-items: center; gap: 7px; margin-top: 7px; cursor: pointer; }
@media (max-width: 980px) {
  .atlas-dark .graph-panel { position: static; width: auto; margin-top: 12px; background: #141c4f; }
  .atlas-groups { right: 16px; }
  .atlas-kinds { right: 12px; }
  .atlas-hint { display: none; }
  #atlas-box { height: 66vh; min-height: 420px; }
}

/* Ежедневные занятия и тетрадь ошибок. */
.study-plan { margin-bottom: 24px; }
.study-plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.study-plan h2 { margin: 4px 0 10px; font-size: 26px; }
.study-streak { flex: none; min-width: 94px; padding: 12px; border-radius: 14px; background: var(--mint); color: var(--forest); text-align: center; font-size: 24px; font-weight: 700; }
.study-streak small { display: block; font-size: 11px; font-weight: 400; }
.study-numbers { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 16px 0 12px; font-size: 13px; }
.study-numbers b { font-size: 20px; margin-right: 4px; }
.study-plan progress { appearance: none; width: 100%; height: 8px; border: 0; border-radius: 8px; overflow: hidden; background: var(--mint); }
.study-plan progress::-webkit-progress-bar { background: var(--mint); }
.study-plan progress::-webkit-progress-value { background: var(--green); border-radius: 8px; }
.study-plan progress::-moz-progress-bar { background: var(--green); }
.study-settings { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.study-settings label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.study-settings p { flex-basis: 100%; }
.study-plan-home { border: 1px solid rgba(255,255,255,.25); background: rgba(20,28,79,.68); border-radius: 18px; padding: 24px; margin: 0 0 24px; }
.study-plan-home .overline, .study-plan-home .study-numbers a { color: #a7dcff; }
.study-plan-home .study-streak { background: rgba(255,255,255,.1); color: white; }
.study-plan-home h2 { color: white; }
#review-task { scroll-margin-top: 20px; }
.answer-review { color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 16px 0; font-size: 15px; font-weight: 400; }
.answer-review h3 { font-size: 21px; margin-bottom: 18px; }
.answer-review h4, .theory-extension h4 { font-size: 16px; margin: 16px 0 8px; }
.answer-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-compare > div { padding: 14px; background: var(--bad-bg); border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.answer-compare > div + div { background: #e9f8f0; }
.answer-compare span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.answer-compare p { font-weight: 700; margin: 0; white-space: pre-wrap; }
.answer-solution { margin: 18px 0; line-height: 1.7; }
.answer-theory { border-top: 1px solid var(--line); padding: 14px 0; }
.answer-theory summary { cursor: pointer; font-weight: 700; }
.answer-theory > div { margin-top: 18px; }
.theory-extension { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); line-height: 1.75; }
.theory-extension > h3 { margin-bottom: 16px; font-size: 22px; }
.worked-example { padding: 20px; border-radius: 12px; background: var(--bg); border-left: 3px solid var(--brand); margin-top: 16px; }
.worked-example h4 { margin-top: 8px; }
.example-condition { white-space: pre-wrap; }
@media (max-width: 600px) {
  .study-plan h2 { font-size: 21px; }
  .study-plan-home, .answer-review { padding: 16px; }
  .study-streak { min-width: 70px; font-size: 20px; padding: 10px; }
  .study-plan-head { gap: 10px; }
  .study-numbers { gap: 8px 16px; }
  .answer-compare { grid-template-columns: 1fr; }
  .worked-example { padding: 14px; }
  .study-settings label { width: 100%; }
}
@media print { .study-settings, #progress-export, #progress-import-open { display: none; } }

/* Главный экран: контраст подписей, поиск, строка «Продолжить» */
.home-logo { font-size: inherit; font-weight: inherit; margin-top: 0; }
.home-sub { margin-bottom: 26px; }
.home-actions { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; margin-bottom: 34px; }
.home-actions .all-topics { margin: 0; }
.home-search { position: relative; }
.home-search input { width: 100%; height: 54px; padding: 0 18px; font-size: 16px; color: var(--ink); background: #fff; border: 0; border-radius: 10px; }
.home-hits { position: absolute; z-index: 5; top: 60px; left: 0; right: 0; padding: 6px; color: var(--ink); background: #fff; border-radius: 12px; box-shadow: 0 18px 44px rgba(10,14,50,.4); }
.home-hits a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 12px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.home-hits a:hover, .home-hits a:focus-visible { background: var(--mint); }
.home-hits b { font-weight: 400; }
.home-hits small { flex: none; color: var(--muted); }
.home-hits p { margin: 0; padding: 10px 12px; color: var(--ink-soft); }
.home-continue { display: flex; align-items: stretch; gap: 12px; margin-bottom: 12px; padding: 8px; background: rgba(20,28,79,.55); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.home-next { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 9px 16px; color: var(--ink); text-decoration: none; background: #fff; border-radius: 8px; }
.home-next small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.home-next b { font-size: 18px; overflow-wrap: anywhere; }
.home-next span { color: var(--brand); font-size: 14px; white-space: nowrap; }
.home-today { display: flex; align-items: center; gap: 20px; padding: 0 14px; color: #fff; font-size: 14px; }
.home-today a { min-height: 44px; display: inline-flex; align-items: center; color: #fff; }
.home-today span, .home-today a { white-space: nowrap; }
.home-today b { margin-right: 3px; font-size: 18px; }
.tile.junior { background: #2c8768; }
.tile.junior:hover { background: #329673; }
.tile.exam.ege, .tile.exam.oge { background: linear-gradient(165deg, #ec8c08, #c76c00); }
.tile.exam.ege:hover, .tile.exam.oge:hover { background: linear-gradient(165deg, #f4970f, #d27502); }
.tile .count, .tile small, .tile.exam .count, .tile.exam small { color: #fff; font-size: 13px; opacity: 1; }
@media (max-width: 720px) {
  .home-actions { grid-template-columns: 1fr; }
  .home-continue { flex-direction: column; }
  .home-today { flex-wrap: wrap; gap: 6px 18px; padding: 2px 8px 6px; }
  .home-logo { gap: 10px; }
  .home-logo img { width: 72px; }
  .home-logo .word { font-size: 50px; }
  .home-sub { font-size: 16px; }
  .home-page .tile { min-height: 136px; padding-top: 32px; }
  body.is-home #menu a[href="/about"] { display: none; }
  .tile b { font-size: 40px; }
}
body.is-home #ftr { background: transparent; border-top: 1px solid rgba(255,255,255,.12); }

/* Фон главной: градиент, мягкое свечение и зерно, которое убирает полосы на плавных переходах. */
body.is-home::before { content: ''; position: fixed; inset: 0; z-index: -3; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(155deg, #0b1036 0%, #161d66 48%, #0d3a70 100%); }
body.is-home::after { content: ''; position: fixed; inset: -18%; z-index: -2; pointer-events: none; background: radial-gradient(38% 34% at 80% 16%, rgba(52,130,255,.62), transparent 70%), radial-gradient(34% 36% at 14% 78%, rgba(22,196,160,.42), transparent 70%), radial-gradient(30% 30% at 16% 18%, rgba(116,84,255,.40), transparent 70%), radial-gradient(26% 24% at 86% 84%, rgba(92,193,250,.34), transparent 70%); filter: blur(30px); animation: home-aurora 26s ease-in-out infinite alternate; }
@keyframes home-aurora { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 3%, 0) scale(1.08); } }
.home-sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.home-sky span { position: absolute; font: 700 clamp(120px, 17vw, 300px)/1 Ubuntu, sans-serif; color: rgba(255,255,255,.055); animation: home-letter 22s ease-in-out infinite alternate; }
.home-sky span:nth-child(1) { left: 2%; top: 10%; }
.home-sky span:nth-child(2) { right: 2%; top: 44%; animation-delay: -8s; }
.home-sky span:nth-child(3) { left: 3%; bottom: 4%; animation-delay: -15s; }
.home-sky span:nth-child(4) { right: 5%; top: 2%; animation-delay: -4s; }
@keyframes home-letter { from { transform: translateY(-14px) rotate(-3deg); } to { transform: translateY(14px) rotate(3deg); } }
@media (max-width: 1180px) { .home-sky { display: none; } }
@media (prefers-reduced-motion: reduce) { body.is-home::after, .home-sky span { animation: none; } }
