/* Topic pages /subjects/<предмет>/<тема> (generated by scripts/topics-build.js) */
.tp-crumbs { font-size:14px; color:rgba(255,255,255,.7); margin-bottom:14px; }
.tp-crumbs a { color:#fff; text-decoration:none; }
.tp-crumbs a:hover { text-decoration:underline; }
.page-hero h1 { max-width:900px; }
.page-hero p { max-width:760px; }
.page-hero p b { color:#fff; }
.tp-ctas { display:flex; gap:10px; flex-wrap:wrap; margin-top:22px; }
.tp-wrap { padding:28px 24px 48px; display:flex; flex-direction:column; gap:20px; }
.tp-card { background:#fff; border:1.5px solid var(--border); border-radius:20px; padding:28px 30px; }
.tp-card h2 { font-family:'Unbounded',sans-serif; font-size:clamp(18px,2.6vw,24px); color:var(--navy); margin:0 0 16px; letter-spacing:-.01em; }
.tp-intro { font-size:14px; margin:-6px 0 18px; }
.muted { color:var(--muted); }

/* note (same look as /notes) */
.notes-content { font-size:16px; line-height:1.75; color:var(--text); }
.notes-content p { margin:0 0 14px; }
.notes-content h2 { font-family:'Nunito',sans-serif; font-size:20px; color:var(--navy); margin:24px 0 10px; }
.notes-content h3 { font-size:17px; color:var(--navy); margin:18px 0 8px; }
.notes-content ul { margin:0 0 14px 22px; }
.notes-content li { margin-bottom:6px; }
.notes-content code { background:var(--bg); padding:2px 6px; border-radius:6px; font-size:14px; }
.notes-content table { width:100%; border-collapse:collapse; margin:12px 0 18px; font-size:15px; display:block; overflow-x:auto; }
.notes-content th, .notes-content td { border:1px solid var(--border); padding:8px 12px; text-align:left; vertical-align:top; }
.notes-content th { background:var(--bg); font-weight:800; color:var(--navy); }
.tp-lock { background:#FFFBEB; border:1.5px solid #FDE68A; border-radius:14px; padding:18px 20px; margin-top:16px; }
.tp-lock .muted { font-size:14px; margin:6px 0 12px; }

/* task cards (same classes as /practice) */
.tq { border:1.5px solid var(--border); border-radius:16px; padding:22px 22px 18px; margin-bottom:16px; background:#fff; }
.tq-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; font-size:13px; color:var(--muted); }
.tq-num { width:30px; height:30px; border-radius:50%; background:var(--navy); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-family:'Unbounded',sans-serif; font-size:12px; font-weight:700; flex-shrink:0; }
.tq-body { font-size:17px; font-weight:700; color:var(--navy); line-height:1.55; margin:0 0 16px; white-space:pre-line; }
.tq-note { font-size:14px; color:var(--muted); margin:0 0 10px; }
.tq-fig { margin:0 0 16px; }
.tq-fig img { max-width:100%; max-height:360px; border-radius:12px; border:1px solid var(--border); display:block; }
.tq-fig img:not([src]) { display:none; }
.tq-fig figcaption { font-size:12px; color:var(--muted); margin-top:6px; }
.tq-passage { border:1px solid var(--border); border-radius:12px; padding:12px 16px; margin:0 0 16px; background:var(--bg); }
.tq-passage summary { font-weight:700; color:var(--navy); cursor:pointer; }
.tq-passage-body { white-space:pre-line; font-size:15px; line-height:1.65; margin-top:10px; }
.tq-opts { display:flex; flex-direction:column; gap:10px; }
.opt { display:flex; align-items:center; gap:14px; padding:14px 18px; border:2px solid var(--border); border-radius:14px; cursor:pointer; transition:border-color .2s, background .2s, color .2s; font:inherit; font-size:16px; font-weight:600; color:var(--text); background:#fff; width:100%; text-align:left; }
.opt:hover:not(:disabled) { border-color:var(--navy); background:rgba(26,39,68,.04); }
.opt-ltr { width:34px; height:34px; border-radius:50%; background:var(--bg); border:2px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; flex-shrink:0; }
.opt:disabled { cursor:default; }
.opt.correct { border-color:var(--green); background:#F0FDF4; color:#15803D; }
.opt.correct .opt-ltr { background:var(--green); border-color:var(--green); color:#fff; }
.opt.wrong { border-color:var(--red); background:#FEF2F2; color:#B91C1C; }
.opt.wrong .opt-ltr { background:var(--red); border-color:var(--red); color:#fff; }
.tq-open { display:flex; gap:10px; flex-wrap:wrap; }
.tq-open input { flex:1; min-width:180px; padding:12px 14px; border:1.5px solid var(--border); border-radius:12px; font:inherit; font-size:16px; }
.tq-match { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.tq ol { margin:0 0 12px 22px; line-height:1.6; font-size:15px; }
.tq ol.tq-abc { list-style:none; margin-left:0; }
.tq-group { margin-bottom:10px; font-size:15px; }
.explanation { background:#F0FDF4; border:1.5px solid #BBF7D0; border-radius:14px; padding:16px 20px; margin-top:16px; font-size:15px; color:#166534; line-height:1.7; display:none; }
.explanation.show { display:block; }
.explanation.wrong-exp { background:#FEF2F2; border-color:#FECACA; color:#B91C1C; }
.tq-exp { margin-top:12px; }
.tq-exp summary { font-weight:700; color:var(--navy); cursor:pointer; font-size:15px; }
.tq-exp .explanation { margin-top:10px; }
.tq-more, .tp-more { margin:14px 0 0; font-size:15px; }
.tp-more { text-align:center; margin-top:22px; }
.tq-more a { color:var(--navy); font-weight:700; }
.tq-limit { margin-top:12px; }

.tp-upsell { background:linear-gradient(135deg,rgba(245,200,66,.16),rgba(26,39,68,.05)); border-color:rgba(245,200,66,.5); }
.tp-upsell p { margin:0 0 14px; }
.tp-list { list-style:none; margin:0 0 16px; padding:0; display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:8px 20px; }
.tp-list a { color:var(--navy); font-weight:600; text-decoration:none; font-size:15px; display:inline-block; padding:6px 0; }
.tp-list a:hover { text-decoration:underline; }
.tp-prevnext { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:15px; font-weight:700; }
.tp-prevnext a { color:var(--navy); text-decoration:none; padding:8px 0; }
.tp-prevnext a:hover { text-decoration:underline; }
.tp-next { margin-left:auto; }
.tp-all { margin:14px 0 0; font-size:15px; }
.tp-all a { color:var(--navy); font-weight:700; }

@media(max-width:600px){ .tp-wrap{padding:20px 16px 40px} .tp-card{padding:20px 16px} .tq{padding:16px 14px} .tq-match{grid-template-columns:1fr} .tq-body{font-size:16px} .opt{font-size:15px} }
