:root {
  --paper:#F7F1E5; --paper2:#EFE6D3; --ink:#26221B; --soft:#5B5345;
  --terra:#D2663A; --line:rgba(38,34,27,.14);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
* { box-sizing:border-box; }
html { background:var(--paper); }
body { margin:0; font-family:var(--font); background:transparent; color:var(--ink); line-height:1.5; }
html, body { overflow-x:hidden; max-width:100%; }
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }

/* header */
.hdr { border-bottom:2px solid var(--ink); background:rgba(247,241,229,.97); position:sticky; top:0; z-index:10; }
.hdr__top { display:flex; align-items:center; gap:16px; max-width:1080px; margin:0 auto; padding:12px clamp(14px,4vw,28px) 10px; }
.hdr__logo { font-weight:800; font-size:20px; color:var(--terra); white-space:nowrap; }
.hdr__search { display:flex; flex:1; gap:8px; max-width:720px; }
.hdr__search input { flex:1; padding:10px 14px; border:2px solid var(--line); border-radius:10px; font:inherit; background:#fff; }
.hdr__search button { padding:10px 18px; border:none; border-radius:10px; background:var(--terra); color:#fff; font-weight:700; cursor:pointer; }
.clsnav { display:flex; gap:6px; overflow-x:auto; max-width:1080px; margin:0 auto; padding:0 clamp(14px,4vw,28px) 10px; -webkit-overflow-scrolling:touch; }
.clsnav a { flex:none; padding:5px 12px; border:1.5px solid var(--line); border-radius:999px; font-size:13px; font-weight:700; background:#fff; }
.clsnav a:hover { border-color:var(--terra); color:var(--terra); }
.hdr__logo { display:inline-flex; align-items:center; gap:8px; }
.hdr__logo svg { width:24px; height:24px; color:var(--terra); flex:none; }
.hdr__nav { display:flex; gap:16px; max-width:1080px; margin:0 auto; padding:0 clamp(14px,4vw,28px) 10px; font-size:14px; font-weight:600; }
.hdr__nav a { color:var(--soft); }
.hdr__nav a:hover { color:var(--terra); }
.hdr__burger { display:none; width:40px; height:40px; border:2px solid var(--line); border-radius:10px; background:#fff; font-size:18px; line-height:1; cursor:pointer; }
html[data-theme="dark"] .hdr__burger { background:#232019; color:var(--ink); }

/* layout */
.wrap { max-width:1080px; margin:0 auto; padding:24px clamp(14px,4vw,28px) 56px; }
h1 { font-size:clamp(22px,3.4vw,32px); margin:0 0 12px; line-height:1.15; }
h2 { font-size:clamp(19px,2.4vw,24px); margin:34px 0 14px; display:flex; align-items:center; gap:10px; }
h2::before { content:""; width:6px; height:1.02em; background:var(--terra); border-radius:3px; flex:none; }
.h2-sm { font-size:17px; margin:26px 0 10px; }
.lead { color:var(--soft); max-width:70ch; margin-bottom:8px; }
.muted { color:var(--soft); }
.crumbs { font-size:13px; color:var(--soft); margin-bottom:14px; }
.crumbs ol { list-style:none; display:flex; flex-wrap:wrap; gap:6px; padding:0; margin:0; }
.crumbs li:not(:last-child)::after { content:"›"; margin-left:6px; color:var(--soft); opacity:.6; }
.crumbs a { color:var(--soft); }
.crumbs a:hover { color:var(--terra); }
.crumbs span { color:var(--ink); font-weight:600; }

/* cards / grids */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:14px; margin-top:14px; }
.card { display:flex; flex-direction:column; gap:6px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px 18px; transition:transform .2s, box-shadow .2s, border-color .2s; min-width:0; }
.card:hover { transform:translateY(-3px); box-shadow:0 14px 30px rgba(38,34,27,.12); border-color:#e2cbbd; }
.card b { font-size:16px; }
.card span { font-size:13px; color:var(--soft); }

/* chips */
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.chip-link { padding:7px 14px; border:2px solid var(--line); border-radius:999px; font-size:14px; font-weight:600; background:#fff; }
.chip-link:hover { border-color:var(--terra); color:var(--terra); }
.chip-link.active { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.chips--cls { margin:4px 0 18px; }

/* section jump nav */
.sec-nav { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 4px; }
.sec-nav a { padding:6px 12px; border:1px solid var(--line); border-radius:8px; font-size:13px; background:#fff; }
.sec-nav a:hover { border-color:var(--terra); color:var(--terra); }

/* tasks */
.sec-block { margin-top:22px; }
.sec-block h3 { font-size:15px; margin:0 0 10px; }
.tasks { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.task-btn { min-width:48px; text-align:center; padding:9px 12px; background:#fff; border:2px solid var(--line); border-radius:10px; font-weight:700; font-size:14px; white-space:nowrap; }
.task-btn:hover { border-color:var(--terra); color:var(--terra); }

/* solution */
.sol-wrap { margin-top:8px; }
.sol { display:block; margin:16px auto; max-width:100%; height:auto; min-height:120px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.task-nav { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.btn-nav { padding:10px 16px; border:2px solid var(--ink); border-radius:10px; font-weight:700; font-size:14px; background:#fff; }
.btn-nav:hover { background:var(--ink); color:var(--paper); }
.btn-nav--off { opacity:.35; pointer-events:none; }

/* search filters */
.filters { display:grid; grid-template-columns:1fr auto auto auto auto; gap:8px; align-items:center; max-width:900px; margin:12px 0 18px; }
.filters__q { padding:11px 14px; border:2px solid var(--line); border-radius:10px; font:inherit; background:#fff; min-width:0; }
.filters select { padding:10px 12px; border:2px solid var(--line); border-radius:10px; font:inherit; background:#fff; }
.filters button { padding:11px 18px; border:none; border-radius:10px; background:var(--terra); color:#fff; font-weight:700; cursor:pointer; }
@media (max-width:760px) {
  .filters { grid-template-columns:1fr 1fr; }
  .filters__q { grid-column:1/-1; }
  .filters button { grid-column:1/-1; }
}
html[data-theme="dark"] .filters__q, html[data-theme="dark"] .filters select { background:#232019; color:var(--ink); }

/* search */
.searchbox { display:flex; gap:8px; max-width:680px; margin:10px 0 18px; }
.searchbox input { flex:1; padding:11px 14px; border:2px solid var(--line); border-radius:10px; font:inherit; background:#fff; }
.searchbox button { padding:11px 18px; border:none; border-radius:10px; background:var(--terra); color:#fff; font-weight:700; cursor:pointer; }
.results { list-style:none; padding:0; margin:8px 0; display:grid; gap:8px; }
.results a { display:flex; flex-direction:column; gap:2px; padding:12px 15px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.results a:hover { border-color:var(--terra); }
.res__t { font-weight:600; }
.res__c { font-size:12.5px; color:var(--soft); }
.pager { margin-top:20px; display:flex; flex-wrap:wrap; gap:6px; }
.pager a { padding:6px 11px; border:1px solid var(--line); border-radius:8px; font-size:13px; background:#fff; }
.pager a.active { background:var(--ink); color:var(--paper); border-color:var(--ink); }

/* ad + footer */
.ad-slot { max-width:1080px; margin:0 auto 30px; padding:0 clamp(14px,4vw,28px); }
.ftr { border-top:2px solid var(--ink); padding:26px clamp(14px,4vw,40px); font-size:13.5px; color:var(--soft); }
.ftr__cols { max-width:1080px; margin:0 auto; display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:22px; }
.ftr__col { display:flex; flex-direction:column; gap:7px; }
.ftr__col b { color:var(--ink); font-size:13px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:2px; }
.ftr__col a:hover { color:var(--terra); }
.ftr__bottom { max-width:1080px; margin:22px auto 0; padding-top:14px; border-top:1px solid var(--line); }

@media (max-width:560px) {
  .hdr__top { flex-wrap:wrap; gap:8px; row-gap:8px; }
  .hdr__logo { flex:1 1 auto; min-width:0; }
  .hdr__theme { order:2; }
  .hdr__burger { display:grid; place-items:center; order:3; }
  .hdr__search { order:4; flex-basis:100%; }
  .hdr__search input, .searchbox input { min-width:0; }
  .hdr__nav { display:none; }
  .hdr__nav.open { display:flex; flex-direction:column; gap:12px; padding:12px clamp(14px,4vw,28px) 16px; border-top:1px solid var(--line); }
  .grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .card { padding:12px 13px; }
  .card--class, .card--subj { gap:10px; }
  .card__num, .card__ico { width:40px; height:40px; border-radius:11px; font-size:15px; }
  .card__ico .si { width:22px; height:22px; }
  .card__tx b { font-size:14px; }
  .card__tx > span { font-size:12px; }
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline:3px solid var(--terra); outline-offset:2px; border-radius:6px; }

/* cookie bar */
.cookie { position:fixed; left:12px; right:12px; bottom:12px; z-index:50; background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 16px; display:flex; gap:14px; align-items:center; justify-content:space-between; flex-wrap:wrap; box-shadow:0 14px 40px rgba(38,34,27,.18); }
.cookie__tx { font-size:13.5px; color:var(--soft); max-width:70ch; }
.cookie__btns { display:flex; gap:8px; }
.cookie button { padding:9px 16px; border-radius:9px; font:inherit; font-weight:700; cursor:pointer; border:2px solid var(--line); background:#fff; }
#ckOk { background:var(--terra); color:#fff; border-color:var(--terra); }
html[data-theme="dark"] .cookie { background:#232019; }
html[data-theme="dark"] .cookie button { background:#232019; color:var(--ink); }
html[data-theme="dark"] #ckOk { background:var(--terra); color:#fff; }

/* contact form */
.cform { display:grid; gap:10px; max-width:680px; margin:14px 0; }
.cform label { display:grid; gap:5px; font-size:13.5px; color:var(--soft); }
.cform input[type=text], .cform textarea, .cform select { padding:10px 12px; border:2px solid var(--line); border-radius:10px; font:inherit; background:#fff; min-width:0; }
.cform textarea { min-height:120px; resize:vertical; }
.cform button { justify-self:start; padding:10px 20px; border:none; border-radius:10px; background:var(--terra); color:#fff; font-weight:700; cursor:pointer; }
html[data-theme="dark"] .cform input[type=text], html[data-theme="dark"] .cform textarea, html[data-theme="dark"] .cform select { background:#232019; color:var(--ink); }
.ftr__disc { max-width:80ch; margin:0 0 10px; }

/* empty state */
.empty { display:grid; justify-items:center; gap:8px; text-align:center; padding:28px 12px; color:var(--soft); }
.empty svg { width:60px; height:60px; opacity:.7; }
.empty p { margin:0; }
.empty p:first-of-type { font-size:17px; font-weight:600; color:var(--terra); }

/* 2026 vibe */
:root { --amber:#FFC24B; }
h1 { letter-spacing:-.02em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline:2.5px dashed var(--amber); outline-offset:2px; }
.card { box-shadow:0 8px 22px rgba(38,34,27,.05); }
.chip-link.active, .more-btn:hover { background:var(--terra); color:#fff; border-color:var(--terra); }

/* chalkboard chat */
.board-wrap { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:20px; align-items:stretch; margin:22px 0 28px; }
.board { position:relative; display:flex; flex-direction:column; justify-content:center; gap:10px; min-height:220px; padding:26px 26px 30px; border-radius:18px; background:radial-gradient(120% 120% at 30% 10%, #1f5a43 0%, #16402f 60%, #123528 100%); border:10px solid #8a5a34; box-shadow:inset 0 0 60px rgba(0,0,0,.45), 0 18px 40px rgba(24,34,27,.25); color:#F4FBF1; text-decoration:none; overflow:hidden; transition:transform .18s, box-shadow .18s; }
.board::after { content:""; position:absolute; inset:8px; border-radius:12px; border:1px solid rgba(255,255,255,.08); pointer-events:none; }
.board:hover { transform:translateY(-2px); box-shadow:inset 0 0 60px rgba(0,0,0,.45), 0 24px 50px rgba(24,34,27,.3); }
.board__chalk { font-family:'Segoe Script','Bradley Hand','Comic Sans MS',cursive; font-size:clamp(18px,2.4vw,26px); line-height:1.35; text-shadow:0 0 6px rgba(255,255,255,.25); }
.board__by { font-size:13px; color:#CDE7D6; opacity:.9; }
.board__hint { font-size:13px; color:#A9CDB8; }
.board__side { display:flex; flex-direction:column; gap:10px; min-width:0; }
.board__side .btn-nav { align-self:flex-start; margin-top:auto; }
.board__hist { list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.board__hist li { background:#fff; border:1px solid var(--line); border-radius:12px; padding:9px 13px; }
.board__hist .n { font-weight:700; color:var(--terra); margin-right:8px; }
.board__hist .t { font-size:12px; color:var(--soft); }
.board__hist .b { margin-top:3px; white-space:pre-line; word-break:break-word; }
html[data-theme="dark"] .board__hist li { background:#232019; }
@media (max-width:760px) { .board-wrap { grid-template-columns:1fr; gap:14px; } .board { min-height:180px; border-width:8px; padding:20px; } }

.solution-text { margin:0 0 12px; color:#2f2a22; }

/* faq / steps */
.steps { max-width:70ch; padding-left:22px; display:grid; gap:8px; }
.steps li { padding-left:4px; }
.faq { display:grid; gap:8px; margin-top:14px; max-width:820px; }
.faq__item { background:#fff; border:1px solid var(--line); border-radius:12px; padding:0 16px; }
.faq__item summary { cursor:pointer; font-weight:700; padding:14px 0; list-style:none; position:relative; padding-right:28px; }
.faq__item summary::-webkit-details-marker { display:none; }
.faq__item summary::after { content:"+"; position:absolute; right:0; top:12px; font-size:20px; color:var(--terra); }
.faq__item[open] summary::after { content:"–"; }
.faq__item p { margin:0 0 16px; color:var(--soft); }

/* solution tools */
.sol-text.is-collapsed { display:none; }
.sol-tools { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 10px; }
.copy-btn, .sol-toggle { padding:8px 14px; border:1.5px solid var(--line); border-radius:9px; background:#fff; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; }
.copy-btn:hover, .sol-toggle:hover { border-color:var(--terra); color:var(--terra); }
.copy-btn.is-done { border-color:#2e7d32; color:#2e7d32; }

/* theme toggle */
.hdr__theme { flex:none; width:40px; height:40px; border:2px solid var(--line); border-radius:10px; background:#fff; font-size:17px; line-height:1; cursor:pointer; }
.hdr__theme:hover { border-color:var(--terra); color:var(--terra); }

/* dark theme */
html[data-theme="dark"] {
  --paper:#1b1a17; --paper2:#232019; --ink:#EDE6D8; --soft:#B4AA98;
  --terra:#E8825A; --line:rgba(237,230,216,.16);
}
html[data-theme="dark"] .hdr { background:rgba(27,26,23,.97); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .task-btn,
html[data-theme="dark"] .chip-link,
html[data-theme="dark"] .clsnav a,
html[data-theme="dark"] .sec-nav a,
html[data-theme="dark"] .results a,
html[data-theme="dark"] .pager a,
html[data-theme="dark"] .btn-nav,
html[data-theme="dark"] .hdr__search input,
html[data-theme="dark"] .searchbox input,
html[data-theme="dark"] .hdr__theme,
html[data-theme="dark"] .copy-btn,
html[data-theme="dark"] .sol-toggle,
html[data-theme="dark"] .faq__item { background:#232019; color:var(--ink); }
html[data-theme="dark"] .solution-text { color:#DED6C6; }
html[data-theme="dark"] .btn-nav:hover { background:var(--ink); color:var(--paper); }

@media (max-width:640px) {
  .task-nav { position:sticky; bottom:0; background:var(--paper); padding:10px 0; border-top:1px solid var(--line); z-index:9; }
}

/* ads */
.ad-slot--inline { margin:20px 0; }
.ad-sticky { display:none; }
@media (max-width:640px) {
  .ad-sticky { display:block; position:sticky; bottom:0; z-index:11; background:var(--paper); border-top:1px solid var(--line); padding:6px 0; }
}

/* task tools / report */
.task-tools { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 4px; }
.print-btn, .share-btn { padding:8px 14px; border:1.5px solid var(--line); border-radius:9px; background:#fff; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; }
.print-btn:hover, .share-btn:hover { border-color:var(--terra); color:var(--terra); }
.report { margin:18px 0 0; max-width:760px; }
.report summary { cursor:pointer; font-size:13.5px; color:var(--soft); }
.report summary:hover { color:var(--terra); }
.report form { display:grid; gap:8px; margin-top:10px; }
.report textarea { min-height:90px; padding:10px 12px; border:1.5px solid var(--line); border-radius:10px; font:inherit; background:#fff; resize:vertical; }
.report button { justify-self:start; padding:9px 18px; border:none; border-radius:9px; background:var(--terra); color:#fff; font-weight:700; cursor:pointer; }
.hp { position:absolute !important; left:-9999px !important; top:auto !important; width:1px !important; height:1px !important; opacity:0 !important; overflow:hidden !important; pointer-events:none; }
.ok { padding:10px 14px; background:#e8f5e9; color:#256029; border-radius:10px; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .ok { background:#1e3320; color:#bfe3c2; }
}
html[data-theme="dark"] .report textarea,
html[data-theme="dark"] .print-btn,
html[data-theme="dark"] .share-btn { background:#232019; color:var(--ink); }

/* search suggest */
.hdr__search { position:relative; }
.hdr__sug { display:none; position:absolute; top:calc(100% + 6px); left:0; right:0; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 40px rgba(38,34,27,.16); overflow:hidden; z-index:30; max-height:60vh; overflow-y:auto; }
.hdr__sug.on { display:block; }
.hdr__sug a { display:block; padding:11px 15px; border-bottom:1px solid var(--line); font-size:14px; }
.hdr__sug a:last-child { border-bottom:none; }
.hdr__sug a:hover { background:var(--paper2); color:var(--terra); }
html[data-theme="dark"] .hdr__sug { background:#232019; }
html[data-theme="dark"] .hdr__sug a:hover { background:#2c281f; }

/* recently viewed */
.recent { margin:18px 0 6px; }

/* school chat */
.chat { list-style:none; padding:0; margin:10px 0 18px; display:grid; gap:8px; max-width:760px; }
.chat__m { background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 14px; }
.chat__n { font-weight:700; color:var(--terra); margin-right:8px; }
.chat__t { font-size:12px; color:var(--soft); }
.chat__b { margin-top:4px; white-space:pre-line; word-break:break-word; }
.chat__form { display:grid; gap:8px; max-width:640px; }
.chat__form input[type=text], .chat__form textarea { padding:10px 12px; border:2px solid var(--line); border-radius:10px; font:inherit; background:#fff; min-width:0; }
.chat__form textarea { min-height:80px; resize:vertical; }
.chat__cap { font-size:13.5px; color:var(--soft); }
.chat__cap input { width:72px; padding:6px 8px; border:2px solid var(--line); border-radius:8px; font:inherit; }
.chat__form button { justify-self:start; padding:10px 20px; border:none; border-radius:10px; background:var(--terra); color:#fff; font-weight:700; cursor:pointer; }
.err { padding:10px 14px; background:#fdecea; color:#b3261e; border-radius:10px; }
html[data-theme="dark"] .chat__m,
html[data-theme="dark"] .chat__form input[type=text],
html[data-theme="dark"] .chat__form textarea { background:#232019; color:var(--ink); }

/* subject icons */
.si { width:1.15em; height:1.15em; flex:none; vertical-align:-0.2em; }

/* hero */
.hero { display:grid; grid-template-columns:1.5fr 1fr; gap:24px; align-items:center; background:linear-gradient(180deg,#fff,#FBF6EC); border:1px solid var(--line); border-radius:22px; padding:clamp(18px,3vw,36px); margin-bottom:26px; position:relative; overflow:hidden; }
.hero__tx h1 { margin-top:0; }
.hero__search { margin:16px 0 10px; max-width:560px; }
.hero__hints { font-size:13.5px; color:var(--soft); display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.hero__hints a { color:var(--terra); font-weight:600; }
.hero__art { display:flex; justify-content:center; }
.hero__svg { width:min(300px,100%); height:auto; }
@media (max-width:760px) {
  .hero { grid-template-columns:1fr; gap:14px; }
  .hero__art { order:-1; }
  .hero__svg { width:180px; }
}

/* class / subject cards */
.card--class, .card--subj { flex-direction:row; align-items:center; gap:14px; position:relative; overflow:hidden; }
.card--class::after { content:""; position:absolute; top:7px; right:9px; width:16px; height:16px; opacity:.2; transform:rotate(14deg); background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D2663A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4-1L18 9l-3-3L5 16z'/%3E%3Cpath d='M14 6l3 3'/%3E%3C/svg%3E") no-repeat center/contain; pointer-events:none; }
.card__num { flex:none; width:48px; height:48px; display:grid; place-items:center; border-radius:13px; background:var(--ink); color:var(--paper); font-weight:800; font-size:18px; }
.card__ico { flex:none; width:48px; height:48px; display:grid; place-items:center; border-radius:13px; background:var(--paper2); color:var(--terra); }
.card__ico .si { width:27px; height:27px; }
.card__tx { display:flex; flex-direction:column; gap:3px; min-width:0; }
.card__tx b { font-size:15.5px; }
.card__tx > span { font-size:12.5px; color:var(--soft); }

.chip-link--subj { display:inline-flex; align-items:center; gap:8px; }
.chip-link--subj .si { width:18px; height:18px; color:var(--terra); }

html[data-theme="dark"] .hero { background:linear-gradient(180deg,#201d18,#232019); }
html[data-theme="dark"] .card__ico { background:#2c281f; }
.more-btn { margin-top:10px; padding:9px 16px; border:2px solid var(--line); border-radius:10px; background:#fff; font:inherit; font-weight:700; font-size:14px; cursor:pointer; }
.more-btn:hover { border-color:var(--terra); color:var(--terra); }
html[data-theme="dark"] .more-btn { background:#232019; color:var(--ink); }

/* structured solution */
.sol-h { margin:18px 0 6px; }
.answer { margin:14px 0; padding:12px 16px; background:#fff; border:1px solid var(--line); border-left:4px solid var(--terra); border-radius:10px; }
.answer b { color:var(--terra); }
.sol-steps { margin:10px 0 14px; padding-left:24px; display:grid; gap:6px; }
.sol-steps li { padding-left:2px; }
html[data-theme="dark"] .answer { background:#232019; }

@media print {
  .hdr, .ftr, .ad-slot, .ad-sticky, .task-nav, .task-tools, .report, .sec-nav, .crumbs, #recentBox, .hdr__sug, .sol-tools { display:none !important; }
  .wrap { max-width:100%; padding:0; }
  body { background:#fff; color:#000; }
  .sol img { border:none; }
  a { color:#000; text-decoration:none; }
}

/* меловой фон-сленг + «плёнка» под формами/футером */
.chalkbg { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.chalkbg span { position:absolute; font-family:'Segoe Script','Bradley Hand','Comic Sans MS',cursive; font-weight:700; white-space:nowrap; color:rgba(38,34,27,.07); text-shadow:0 1px 0 rgba(255,255,255,.5); letter-spacing:.04em; user-select:none; }
html[data-theme="dark"] .chalkbg span { color:rgba(255,255,255,.075); text-shadow:none; }
.hdr, .wrap, .ftr, .ad-slot { position:relative; z-index:1; }
.ftr { background:rgba(247,241,229,.82); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
html[data-theme="dark"] .ftr { background:rgba(27,26,23,.82); }
.cform, .chat__form { background:rgba(255,255,255,.72); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); border:1px solid var(--line); border-radius:16px; padding:16px; }
html[data-theme="dark"] .cform, html[data-theme="dark"] .chat__form { background:rgba(35,32,25,.72); }
@media (prefers-reduced-transparency: reduce) { .chalkbg { display:none; } .ftr, .cform, .chat__form { background:var(--paper); backdrop-filter:none; } }
@media (max-width:560px) { .chalkbg span { font-size:1.6rem !important; } }

/* карточки учебников */
.bcards { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; margin-top:14px; }
.bcard { display:flex; flex-direction:column; gap:4px; background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 16px; min-width:0; transition:transform .18s, box-shadow .18s, border-color .18s; }
.bcard:hover { transform:translateY(-2px); box-shadow:0 12px 26px rgba(38,34,27,.1); border-color:#e2cbbd; }
.bcard b { font-size:14.5px; line-height:1.25; }
.bcard span { font-size:12.5px; color:var(--soft); }

/* недавно смотрели */
.rcards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; margin-top:8px; }
.rcard { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:11px 14px; min-width:0; }
.rcard:hover { border-color:var(--terra); }
.rcard__i { flex:none; width:34px; height:34px; display:grid; place-items:center; border-radius:9px; background:var(--paper2); color:var(--terra); }
.rcard__i svg { width:19px; height:19px; }
.rcard__t { font-size:14px; line-height:1.3; }
html[data-theme="dark"] .bcard, html[data-theme="dark"] .rcard { background:#232019; }
@media (max-width:560px) { .bcards { grid-template-columns:1fr 1fr; } .bcard b { font-size:13px; } .bcard { padding:11px 12px; } }
