/* «Учебник» /learn — по макету mockups/helper-screens (вариант A — страница урока, B — версия для печати) */
nav.menu a.on { color: var(--brand); font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--soft); margin: 24px 0 8px; }
.crumbs a { color: var(--soft); } .crumbs a:hover { color: var(--brand); }
.route { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 15px; }
.lhint { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--soft); }
.lhint svg { flex: none; color: #16A34A; }
.kbd { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--line2); box-shadow: inset 0 -1px 0 var(--line); font-size: .9em; font-weight: 600; white-space: nowrap; }
.ptile svg { width: 22px; height: 22px; }

/* снимок с метками: координаты меток — проценты снимка */
.shot { position: relative; border-radius: 12px; overflow: hidden; background: var(--line2);
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px -12px rgb(15 23 42 / .25); }
.shot img { display: block; width: 100%; height: auto; }
.zin { position: relative; }
.zhint { display: none; }
.mk { position: absolute; border: 3px solid #E7000B; border-radius: 10px; box-shadow: 0 0 0 4px rgb(231 0 11 / .20); pointer-events: none; }
.mk.dash { border: 2px dashed #E7000B; box-shadow: none; }
.mk.pulse { animation: lpulse 1.6s ease-in-out infinite; }
@keyframes lpulse { 50% { box-shadow: 0 0 0 8px rgb(231 0 11 / .12); } }
@media (prefers-reduced-motion: reduce) { .mk.pulse { animation: none; } }
.mkn { position: absolute; width: clamp(22px, 2.6vw, 34px); height: clamp(22px, 2.6vw, 34px); border-radius: 50%; background: #C10007; color: #fff;
  font: 800 clamp(12px, 1.4vw, 17px)/1 Onest, system-ui, sans-serif; display: grid; place-items: center; border: 3px solid #fff;
  box-shadow: 0 4px 10px -2px rgb(15 23 42 / .45); transform: translate(-55%, -55%); pointer-events: none; }
.mkn.r { transform: translate(-45%, -55%); }

.stepnum { width: 40px; height: 40px; border-radius: 50%; background: #C10007; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.stepnum.ok { background: #16A34A; }
.steptext { display: flex; gap: 14px; align-items: flex-start; }
.steptext h3 { font-size: 22px; font-weight: 700; }
.steptext p { font-size: 17px; color: var(--text2); line-height: 1.55; margin-top: 4px; }

/* A: страница урока */
.la { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; padding: 8px 0 72px; }
.la aside { position: sticky; top: 80px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.prog { display: flex; gap: 12px; align-items: center; }
.prog b { display: block; font-size: 16px; } .prog span { font-size: 13px; color: var(--soft); }
.lsearch { position: relative; display: block; margin: 0; } .lsearch svg { position: absolute; left: 12px; top: 13px; color: var(--soft); pointer-events: none; }
.lsearch .input { padding-left: 38px; height: 42px; font-size: 14px; width: 100%; box-sizing: border-box; }

/* поиск по учебнику (03.11.2026): /learn — крупное поле, на странице урока — внутри программы */
.lfind { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lfind.big { max-width: 760px; margin-bottom: 24px; }
.lfind.big .lsearch svg { left: 16px; top: 16px; }
.lfind.big .lsearch .input { height: 54px; padding-left: 46px; font-size: 17px; border-radius: 14px; }
.lchips { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 14px; color: var(--soft); }
.lchips button { border: 0; border-radius: 999px; background: var(--line2); color: var(--text2); font: 500 14px Onest, system-ui, sans-serif; padding: 5px 12px; cursor: pointer; }
.lchips button:hover { background: var(--brand-50); color: var(--brand); }
.lres { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lres[hidden], .lessons[hidden] { display: none; }
.lfind.big .lres { background: var(--card); border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 12px 32px -16px rgb(15 23 42 / .25); padding: 8px; max-height: 70vh; overflow-y: auto; }
.lnote { margin: 0; padding: 6px 10px; font-size: 14px; color: var(--soft); }
.lhit { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.lhit:hover, .lhit:focus-visible { background: var(--bg2); color: var(--text); }
.lhit b { font-size: 15px; font-weight: 600; line-height: 1.35; }
.lhp { font-size: 12px; color: var(--soft); font-weight: 600; }
.lhs { font-size: 14px; color: var(--text2); font-weight: 500; }
.lhx { font-size: 14px; color: var(--muted); line-height: 1.45; }
.lres mark { background: var(--amber-bg); color: inherit; border-radius: 3px; padding: 0 1px; }
.lfind.big .lhit b { font-size: 16px; }
.lmobin { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.lessons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lessons a { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; color: var(--text2); font-size: 15px; font-weight: 500; line-height: 1.35; }
.lessons a:hover { background: var(--bg2); color: var(--text); }
.lessons a .n { width: 24px; height: 24px; border-radius: 8px; background: var(--line2); color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.lessons a small { display: block; font-size: 12px; color: var(--soft); font-weight: 400; margin-top: 1px; }
.lessons a.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.lessons a.on .n { background: var(--brand); color: #fff; }
.lmob { display: none; }
.lmain { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.lmain h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.03em; }
.stepper { display: none; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.lj .stepper { display: flex; }
.stepper button { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border: 0; border-radius: 999px; background: var(--line2);
  color: var(--muted); font: 600 14px Onest, system-ui, sans-serif; cursor: pointer; }
.stepper button i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 13px; }
.stepper button.done i { background: var(--green-bg); color: var(--green); }
.stepper button.on { background: var(--brand); color: #fff; } .stepper button.on i { background: #fff; color: var(--brand); }
.stage { padding: 20px; display: flex; flex-direction: column; gap: 28px; }
.stp { display: flex; flex-direction: column; gap: 18px; }
.lj .stage { gap: 0; } .lj .stp { display: none; } .lj .stp.on { display: flex; }
.navrow { display: none; align-items: center; gap: 12px; }
.lj .navrow { display: flex; }
.navrow .grow { flex: 1; text-align: center; color: var(--soft); font-size: 14px; }
.navrow [disabled] { opacity: .45; pointer-events: none; }
.donecard { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.ok-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--green-bg); color: #16A34A; display: grid; place-items: center; }
.lfoot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }

/* без входа: размытый снимок и кнопка Telegram */
.gate { position: relative; overflow: hidden; padding: 0; min-height: 360px; display: grid; }
.gate .blur { position: absolute; inset: 0; background-size: cover; background-position: top left; filter: blur(14px) saturate(.8); transform: scale(1.08); opacity: .55; }
.gate .gin { position: relative; margin: auto; width: 100%; max-width: 520px; min-width: 0; box-sizing: border-box; padding: 32px 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.gate .lock { width: 56px; height: 56px; border-radius: 50%; background: var(--card); color: var(--brand); display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgb(15 23 42 / .35); }
.gate h2 { font-size: 22px; font-weight: 700; }
.gate p { color: var(--text2); font-size: 16px; line-height: 1.5; }
.gate .gcard { background: var(--card); border-radius: 16px; padding: 24px; box-shadow: 0 12px 32px -12px rgb(15 23 42 / .35); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.gate .btn { height: auto; min-height: 48px; padding: 10px 20px; white-space: normal; text-align: center; max-width: 100%; }
@media (max-width: 600px) { .gate .gin { padding: 20px 12px; } .gate .gcard { padding: 20px 16px; } .gate h2 { font-size: 19px; } }
.gwait { display: flex; gap: 8px; align-items: center; color: var(--soft); font-size: 14px; }
.gwait[hidden] { display: none; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: lspin 1s linear infinite; }
@keyframes lspin { to { transform: rotate(360deg); } }
.btn-tg { background: #229ED9; color: #fff; }
.btn-tg:hover { background: #1C8BC0; color: #fff; }

/* вход по номеру + код из Telegram (03.11.2026) */
.llogin { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
.lform { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; }
.lform .label { margin: 0; }
.lrow { display: flex; gap: 8px; width: 100%; }
.lform[hidden], .lmsg[hidden], .lagain[hidden], .lreg[hidden] { display: none; }
.lform .input { flex: 1; min-width: 0; height: 48px; font-size: 17px; }
.lform .btn { flex: none; min-height: 48px; }
.lform .lcode { letter-spacing: .3em; text-align: center; font-weight: 600; font-size: 20px; }
.lmsg { font-size: 15px; color: var(--text2); line-height: 1.45; margin: 0; }
.lmsg.err { color: var(--brand); }
.lagain { font-size: 14px; color: var(--soft); }
.lnk { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lreg { display: flex; flex-direction: column; gap: 8px; align-items: center; padding-top: 4px; }
.lreg small { font-size: 13px; line-height: 1.4; }
html:not(.lj) .lreg[hidden] { display: flex; }                  /* без JS — сразу регистрация через бота */
.lloginc { max-width: 560px; padding: 20px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.lloginc h2 { font-size: 19px; font-weight: 700; }
@media (max-width: 420px) { .lrow { flex-direction: column; } .lrow .input { flex: none; } .lrow .btn { width: 100%; } }

/* B: версия для печати */
.lb { max-width: 1000px; margin: 0 auto; padding: 0 24px 72px; }
.lb-head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.lb-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; letter-spacing: -.03em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.toc b { width: 100%; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.toc a { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--line2); color: var(--text2); font-size: 14px; font-weight: 600; }
.toc a i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; }
.toc a:hover { background: var(--brand-50); color: var(--brand); }
.feed { display: flex; flex-direction: column; gap: 44px; margin-top: 32px; }
.feed article { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 80px; break-inside: avoid; }
.feed article + article { padding-top: 40px; border-top: 1px solid var(--line); }
.other { margin-top: 48px; display: flex; flex-direction: column; gap: 12px; }
.other .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.other a.card { padding: 14px 16px; color: var(--text); font-weight: 600; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.other a.card:hover { box-shadow: 0 0 0 2px var(--brand); }
.other .tile { width: 32px; height: 32px; font-size: 13px; font-weight: 700; }

/* список программ и «уроки готовятся» */
.lhead { padding: 32px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.lhead h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; letter-spacing: -.03em; }
.lprogs { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); padding-bottom: 32px; }
.lprog { padding: 20px; display: flex; flex-direction: column; gap: 12px; color: var(--text); }
.lprog ol { margin: 0; padding-left: 20px; color: var(--text2); font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.lprog .also { font-size: 13px; color: var(--soft); }
.lprog .also a { color: var(--soft); text-decoration: underline; }
.lsoon { max-width: 640px; margin: 40px auto 72px; padding: 32px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.lsoon h1 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 700; letter-spacing: -.02em; }

@media (max-width: 960px) {
  .la { grid-template-columns: 1fr; gap: 16px; }
  .la aside { display: none; }
  .lmob { display: block; }
  .lmob summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
  .lmob summary::-webkit-details-marker { display: none; }
  .lmob .lessons { padding: 0; }
  .donecard { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shot.zm .zin { transform: scale(2.1); transform-origin: var(--ox) var(--oy); transition: transform .25s; }
  .shot.zm.all .zin { transform: none; }
  .shot.zm .mkn { width: 16px; height: 16px; border-width: 1.5px; font-size: 9px; }
  .shot.zm .mk { border-width: 1.5px; border-radius: 5px; }
  .shot .zhint { display: block; position: absolute; left: 8px; bottom: 8px; background: rgb(15 23 42 / .78); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
  .shot.zm.all .zhint { display: none; }
  .stage { padding: 12px; } .shot { border-radius: 8px; }
  .steptext h3 { font-size: 19px; } .steptext p { font-size: 16px; }
  .stepper button span { display: none; } .stepper button { padding: 0 6px; }
  .navrow .btn { flex: 1; padding: 0 12px; } .navrow .grow { display: none; }
  .lb { padding: 0 16px 56px; }
  .lsoon { padding: 24px 18px; margin: 24px 0 48px; }
}
@media print {
  header.top, footer, .noprint { display: none !important; }
  html, body { background: #fff !important; color: #000; }
  .lb { max-width: none; padding: 0; }
  .feed { gap: 20px; } .feed article + article { padding-top: 16px; }
  .feed article { page-break-inside: avoid; }
  .shot { box-shadow: 0 0 0 1px #ccc; }
  .mkn, .stepnum, .toc a i, .mk { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
@media (max-width: 600px) { .lsearch .input { font-size: 16px; } .lfind.big .lsearch .input { height: 50px; } }
