:root {
  --bg: #f6f6f3; --card: #ffffff; --ink: #1c2230; --muted: #5b6474; --line: #e2e4e9;
  --accent: #2c56c9; --accent-ink: #ffffff; --accent-soft: #e8eefc;
  --def: #2c56c9;  --def-bg: #eef3fe;
  --law: #7a3fc4;  --law-bg: #f4eefc;
  --exp: #1f8a5b;  --exp-bg: #eaf7f0;
  --note: #b7741a; --note-bg: #fdf5e7;
  --ex: #4a5568;   --ex-bg: #f1f3f6;
  --why: #0f7c8a;  --why-bg: #e8f6f8;
  --life: #c0405e; --life-bg: #fcedf1;
  --a: #1f8a5b; --b: #c0405e;
  --shadow: 0 1px 2px rgba(20,30,50,.06), 0 4px 16px rgba(20,30,50,.05);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #12151b; --card: #1a1e26; --ink: #e6e9ef; --muted: #9aa3b2; --line: #2a303b;
    --accent: #7fa2ff; --accent-ink: #0f1420; --accent-soft: #222c44;
    --def: #7fa2ff;  --def-bg: #1d2537;
    --law: #b892ef;  --law-bg: #261f35;
    --exp: #5cc996;  --exp-bg: #17291f;
    --note: #e5a84e; --note-bg: #2c2416;
    --ex: #a7b0bf;   --ex-bg: #20252e;
    --why: #5cc3cf;  --why-bg: #152a2d;
    --life: #ec8aa1; --life-bg: #2e1c22;
    --a: #5cc996; --b: #ec8aa1;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151b; --card: #1a1e26; --ink: #e6e9ef; --muted: #9aa3b2; --line: #2a303b;
  --accent: #7fa2ff; --accent-ink: #0f1420; --accent-soft: #222c44;
  --def: #7fa2ff; --def-bg: #1d2537; --law: #b892ef; --law-bg: #261f35; --exp: #5cc996; --exp-bg: #17291f;
  --note: #e5a84e; --note-bg: #2c2416; --ex: #a7b0bf; --ex-bg: #20252e; --why: #5cc3cf; --why-bg: #152a2d;
  --life: #ec8aa1; --life-bg: #2e1c22; --a: #5cc996; --b: #ec8aa1; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Segoe UI", "PT Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- шапка */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font: 700 20px/1 Georgia, serif;
}
.search { position: relative; margin-left: auto; width: min(360px, 50vw); }
.search input {
  width: 100%; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 15px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#qres {
  position: absolute; right: 0; left: 0; top: calc(100% + 6px); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 60vh; overflow: auto; display: none;
}
#qres.open { display: block; }
#qres a { display: block; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
#qres a:last-child { border-bottom: 0; }
#qres a:hover, #qres a.sel { background: var(--accent-soft); text-decoration: none; }
#qres small { display: block; color: var(--muted); font-size: 12.5px; }
#qres .none { padding: 10px 14px; color: var(--muted); font-size: 14px; }

/* ---------- раскладка */
.wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; max-width: 1180px; margin: 0 auto; padding: 24px; }
.wide .wrap, .wrap:not(:has(aside)) { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
main { min-width: 0; max-width: 820px; }
.wide main { max-width: none; }

.toc { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; font-size: 14.5px; }
.toc .up { display: inline-block; margin-bottom: 10px; color: var(--muted); }
.toc .ch { font-weight: 700; margin-bottom: 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a, .toc li span { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); line-height: 1.35; }
.toc li a:hover { background: var(--card); color: var(--ink); text-decoration: none; }
.toc li.cur a { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc li.miss span { opacity: .55; }

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 34px; line-height: 1.2; margin: 4px 0 22px; letter-spacing: -.01em; }
h1 .num { display: block; font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
h2 { font-size: 23px; margin: 0 0 12px; }
h3 { font-size: 19px; margin: 26px 0 8px; }

/* ---------- конспект */
.theory p { margin: 0 0 12px; }
.theory ul, .theory ol { margin: 0 0 12px; padding-left: 24px; }
.theory li { margin: 3px 0; }
.theory b { color: var(--accent); font-weight: 650; }
.math { margin: 10px 0 14px; overflow-x: auto; overflow-y: hidden; }
.katex { font-size: 1.08em; }
.katex-display { margin: .4em 0; }

.box { margin: 14px 0 16px; padding: 12px 16px 2px; border-radius: var(--radius); border-left: 4px solid var(--c); background: var(--cb); }
.box-t { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c); margin-bottom: 4px; }
.box p, .box ul, .box ol { margin-bottom: 10px; }
.box.def  { --c: var(--def);  --cb: var(--def-bg); }
.box.law  { --c: var(--law);  --cb: var(--law-bg); }
.box.exp  { --c: var(--exp);  --cb: var(--exp-bg); }
.box.note { --c: var(--note); --cb: var(--note-bg); }
.box.ex   { --c: var(--ex);   --cb: var(--ex-bg); }
.box.why  { --c: var(--why);  --cb: var(--why-bg); }
.box.life { --c: var(--life); --cb: var(--life-bg); }
.box b { color: inherit; }

.tbl { overflow-x: auto; margin: 10px 0 16px; }
table { border-collapse: collapse; min-width: 60%; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); font-size: 15.5px; }
th, td { padding: 7px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--accent-soft); font-weight: 650; }
tr:last-child td { border-bottom: 0; }

.pic { margin: 16px 0 20px; text-align: center; }
.pic .pics { display: flex; gap: 12px; justify-content: center; align-items: flex-end; flex-wrap: wrap; }
.pic img { max-width: 100%; max-height: 380px; height: auto; border-radius: 10px; cursor: zoom-in; background: #fff; box-shadow: var(--shadow); }
.pic.row img { max-width: calc(50% - 6px); max-height: 260px; }
.pic figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.pic .src { display: block; font-size: 11.5px; opacity: .75; }
:root[data-theme="dark"] .pic img { filter: brightness(.92); }
#zoom { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; background: rgba(10,12,18,.88); cursor: zoom-out; padding: 20px; }
#zoom.open { display: grid; }
#zoom img { max-width: 96vw; max-height: 92vh; border-radius: 8px; background: #fff; }
.fig { margin: 14px 0 18px; text-align: center; }
.fig svg { max-width: 100%; height: auto; }
.fig figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }
.fig svg .s { stroke: var(--ink); }
.fig svg .f { fill: var(--ink); }
.fig svg .m { fill: var(--muted); }
.fig svg .ac { stroke: var(--accent); }
.fig svg .acf { fill: var(--accent); }
.fig svg .bg { fill: var(--card); }
.fig svg text { fill: var(--ink); font: 14px "Segoe UI", Arial, sans-serif; }

/* ---------- карточки-секции */
.card { margin: 30px 0; padding: 20px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.katex { white-space: nowrap; }
.ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 14px; margin-right: 6px; vertical-align: 3px; }
.sim-do { color: var(--muted); margin: 0 0 12px; }
.sim-credit { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; }
.sim-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.sim-name { font-weight: 600; margin-right: auto; }
.sim-frame iframe { width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; background: #000; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--accent); }

/* ---------- задачи */
.tasks-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tasks-h h2 { margin: 0 auto 0 0; }
.lvl h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lvl h3 small { font-size: 14px; font-weight: 400; color: var(--muted); }
.badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; color: #fff; font-size: 16px; align-self: center; }
.lvl-a .badge { background: var(--a); }
.lvl-b .badge { background: var(--b); }
.lvl ol { list-style: none; counter-reset: t; margin: 0; padding: 0; }
.task { counter-increment: t; position: relative; padding: 12px 0 12px 44px; border-top: 1px solid var(--line); }
.task::before {
  content: counter(t); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; border: 2px solid var(--line); color: var(--muted);
}
.task .q p { margin: 0 0 6px; }
.ans summary {
  display: inline-block; cursor: pointer; list-style: none; padding: 3px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); user-select: none;
}
.ans summary::-webkit-details-marker { display: none; }
.ans[open] summary { background: var(--accent); color: var(--accent-ink); }
.ans > div { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--bg); }
.ans > div p { margin: 0 0 4px; }

/* ---------- навигация */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 40px; }
.pn a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); line-height: 1.35; }
.pn a:hover { border-color: var(--accent); text-decoration: none; }
.pn small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.pn .next { text-align: right; grid-column: 2; }

/* ---------- оглавление класса */
.chap { margin: 0 0 30px; }
.chap h2 { font-size: 21px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.topics { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.topics li { break-inside: avoid; display: grid; grid-template-columns: 34px 1fr; gap: 4px 6px; padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
.topics .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.topics .meta { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.topics li.miss { opacity: .5; }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- главная */
.hero h1 { font-size: 40px; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 26px; }
.grades { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; }
.gcard {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; padding: 18px 22px; min-width: 240px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink);
}
.gcard:hover { border-color: var(--accent); text-decoration: none; }
.gnum { font-size: 44px; font-weight: 800; color: var(--accent); line-height: 1; grid-row: span 2; }
.gcard small { color: var(--muted); }
.howto { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.howto ol { margin: 0; padding-left: 22px; }
.howto li { margin: 6px 0; }
.credits { font-size: 13.5px; color: var(--muted); margin-top: 26px; }

/* ---------- очки, уведомления */
.xp { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.xp:hover { border-color: var(--accent); text-decoration: none; }
.xp-star { color: #f2b01e; }
.xp-l { color: var(--muted); font-weight: 500; }
.xp-l:before { content: '·'; margin-right: 6px; }
#toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.tst { padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 15px; animation: tin .25s ease-out; transition: opacity .4s, transform .4s; }
.tst.lvl { background: linear-gradient(135deg, #f2b01e, #e4572e); color: #fff; }
.tst.soft { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.tst.out { opacity: 0; transform: translateY(8px); }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- шапка темы: звёзды и термины */
.th { display: flex; align-items: flex-start; gap: 16px; }
.th h1 { flex: 1; }
.stars { display: inline-flex; gap: 2px; font-style: normal; }
.stars i { font-style: normal; font-size: 26px; color: var(--line); transition: color .3s, transform .3s; }
.stars i.on { color: #f2b01e; transform: scale(1.08); }
.stars.sm i { font-size: 15px; }
.toc .st { font-style: normal; color: #f2b01e; font-size: 11px; margin-left: 4px; letter-spacing: -1px; }
.terms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 22px; }
.terms > span:first-child { font-size: 14px; color: var(--muted); margin-right: 4px; }
.chip { font-size: 13.5px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.box.mem  { --c: #d0611b; --cb: #fff1e6; }
:root[data-theme="dark"] .box.mem { --c: #f0a066; --cb: #2d2016; }

/* ---------- кнопки шапки, скрытие боковой панели */
.tbtn { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 18px; cursor: pointer; }
.tbtn:hover { border-color: var(--accent); color: var(--accent); }
.no-aside .toc { display: none; }
.no-aside .wrap { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.no-aside main { margin: 0 auto; }

/* ---------- мини-опыты */
.ms-stage { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.ms-stage canvas { display: block; width: 100%; }
.ms-ctl { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 12px; }
.ms-sl { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.ms-sl input { width: 170px; accent-color: var(--accent); }
.ms-sl output { min-width: 70px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ms-seg { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; }
.ms-seg span { margin-right: 4px; }
.ms-seg button { font: inherit; font-size: 14px; padding: 5px 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; cursor: pointer; }
.ms-seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ms-out { flex-basis: 100%; font-size: 14.5px; color: var(--muted); }
.ms-out b { color: var(--ink); }

/* ---------- «Проверь себя» */
.qz { padding: 14px 0; border-top: 1px solid var(--line); }
.qq { display: flex; gap: 10px; font-weight: 600; margin-bottom: 10px; }
.qn { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 36px; }
.opt { font: inherit; font-size: 15.5px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt:disabled { cursor: default; }
.opt.ok { border-color: var(--a); background: color-mix(in srgb, var(--a) 14%, var(--card)); }
.opt.bad { border-color: var(--b); opacity: .55; text-decoration: line-through; }
.expl { display: none; margin: 10px 0 0 36px; padding: 8px 12px; border-radius: 10px; background: var(--bg); font-size: 15px; }
.qz.solved .expl { display: block; }
.expl:empty { display: none !important; }

/* ---------- задачи: самооценка */
.self { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.self button { font: inherit; font-size: 13.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.self button.ok { border-color: var(--a); color: var(--a); }
.okmark { color: var(--a); font-weight: 700; }
.later { color: var(--ink); }
.task.done::before { content: '✓'; border-color: var(--a); background: var(--a); color: #fff; }

/* ---------- карточки терминов */
.fcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.fc { perspective: 900px; }
.fc-in { display: grid; min-height: 130px; cursor: pointer; transition: transform .5s; transform-style: preserve-3d; }
.fc.flip .fc-in { transform: rotateY(180deg); }
.fc-f, .fc-b { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid var(--line); }
.fc-f { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px; text-align: center; align-items: center; }
.fc-f small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.fc-b { background: var(--card); transform: rotateY(180deg); font-size: 14.5px; line-height: 1.45; }
.fc-bar { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.fc-bar button { font: inherit; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.fc-bar .ok { border-color: var(--a); color: var(--a); }
.fc-bar a { margin-left: auto; }
.fc.big .fc-in { min-height: 220px; }
.fc.big .fc-f { font-size: 24px; }
.fc.big .fc-b { font-size: 17px; }
.rv-n { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.empty { color: var(--muted); }
.recall h3 { margin-top: 18px; }

/* ---------- экспресс-карта */
.map-box:not(:empty) { margin-top: 14px; }
.mm { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px 46px; align-items: center; padding: 10px 0; }
.mm-l { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.mm-c { display: flex; flex-direction: column; gap: 14px; position: relative; }
.mm-mid { display: grid; place-items: center; position: relative; z-index: 1; }
.mm-center { padding: 16px 20px; border-radius: 50%; min-width: 150px; max-width: 200px; aspect-ratio: 1.6; display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 17px; background: var(--card); border: 3px solid var(--ink); }
.mb { position: relative; z-index: 1; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--bc); background: var(--card); }
.mb-t { font-weight: 800; color: var(--bc); margin-bottom: 4px; }
.mb span { display: inline-block; font-size: 13.5px; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 999px; background: var(--bg); }

/* ---------- страница прогресса */
.lvl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lvl-big { font-size: 30px; font-weight: 800; }
.lvl-xp { font-size: 20px; font-weight: 700; color: #e4972e; }
.bar { height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #f2b01e, #e4572e); border-radius: 999px; transition: width .6s; }
.lvl-next { font-size: 14px; color: var(--muted); }
.pstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 16px; }
.pstats div { padding: 10px 12px; border-radius: 12px; background: var(--bg); text-align: center; }
.pstats b { display: block; font-size: 20px; }
.pstats span { font-size: 13px; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.bdg { padding: 12px; border-radius: 12px; border: 1px dashed var(--line); opacity: .55; filter: grayscale(1); }
.bdg.got { opacity: 1; filter: none; border-style: solid; border-color: #f2b01e; background: color-mix(in srgb, #f2b01e 10%, var(--card)); }
.bdg .bi { font-size: 26px; display: block; }
.bdg b { display: block; font-size: 15px; line-height: 1.3; }
.bdg small { color: var(--muted); font-size: 12.5px; }
.ptl { list-style: none; padding: 0; margin: 0 0 10px; columns: 2; column-gap: 26px; }
.ptl li { break-inside: avoid; display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ptl li.miss { opacity: .45; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.danger { border-color: var(--b); color: var(--b); }
.badge-ch { font-size: 14px; font-weight: 600; color: #e4972e; margin-left: 10px; }
.gcard.prog .gnum { color: #f2b01e; }

@media (max-width: 1000px) {
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--card); order: 2; }
  .topics { columns: 1; }
}
@media (max-width: 700px) {
  .mm { grid-template-columns: 1fr; gap: 12px; }
  .mm-mid { order: -1; }
  .mm-l { display: none; }
  .ptl { columns: 1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top { padding: 8px 12px; gap: 8px; }
  .bt, .xp-l { display: none; }
  .search { width: auto; flex: 1; }
  h1 { font-size: 27px; }
  .hero h1 { font-size: 30px; }
  .card { padding: 16px; }
  .stars i { font-size: 20px; }
  .opts { padding-left: 0; }
  .expl { margin-left: 0; }
  .ms-sl input { width: 120px; }
  .pn { grid-template-columns: 1fr; }
  .pn .next { grid-column: 1; }
}
@media print {
  .top, .toc, .pn, .sim, .mini, .recall, .tasks-h .btn, .self, #toast { display: none; }
  .wrap { display: block; }
}
