/* Дополнения к стилям appsec-lections для курса «ИИ для инженеров» */
.doc-block { margin: 1.6rem 0 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-card, var(--panel)); }
.doc-block h3 { margin: 0 0 .4rem; }
.doc-block > p { margin: 0 0 .6rem; color: var(--muted); }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.doc-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.doc-list li:first-child { border-top: 0; }
.doc-links { white-space: nowrap; color: var(--muted); }
.doc-links a { font-weight: 600; }
.diag-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.diag { margin: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-card, var(--panel)); }
.diag img { width: 100%; height: auto; border-radius: 10px; background: #fff; display: block; }
.diag figcaption { margin-top: .6rem; font-weight: 600; }
.tag-kind { display: inline-block; margin: .2rem 0 0; padding: .05rem .6rem; border-radius: 999px; font-size: .82rem; border: 1px solid var(--line); color: var(--muted); }
.kind-лекция { color: var(--cyan); border-color: var(--cyan); }
.kind-практика { color: var(--good); border-color: var(--good); }
.kind-контроль { color: var(--amber); border-color: var(--amber); }
/* Лекции заметнее практик (17.11.2026): цвет курса, плотнее заголовок,
   залитая плашка. Подсветка «идёт сейчас» (--live) остаётся отдельной. */
.tag-kind.kind-лекция { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 14%, transparent); font-weight: 700; letter-spacing: .02em; }
.timeline-item.is-lecture .timeline-body { margin: .25rem 0 .9rem; padding: .55rem .9rem .75rem; border-left: 3px solid var(--cyan); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.timeline-item.is-lecture .timeline-body h3 { color: var(--cyan); font-weight: 800; }
.timeline-item.is-lecture .timeline-dot { background: var(--cyan); }
.plan-list li.is-lecture .plan-what { color: var(--cyan); font-weight: 700; }
.author-card { padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-card, var(--panel)); max-width: 640px; }
.author-card h3 { margin: .2rem 0 .5rem; font-size: 1.4rem; }
.author-reg { list-style: none; margin: 0 0 .8rem; padding: 0; color: var(--text-soft, var(--text)); }
.author-reg li { margin: .15rem 0; }
.author-contacts { margin: 0; line-height: 1.7; }
.quiet-link { opacity: .7; font-size: .92em; }
.hero-art img { width: 100%; height: auto; }
table td a { text-decoration: none; }
@media (max-width: 640px) { .doc-list li { flex-direction: column; } .doc-links { white-space: normal; } }
@media (max-width: 640px) { #hero-title { font-size: clamp(2.1rem, 10.5vw, 3.2rem); max-width: none; } }
/* 12.11.2026: компактные шапки – страница дня с планом справа, страница занятия без большой шапки */
.compact-hero { min-height: auto; padding: 3rem 0 3.2rem; }
.compact-hero #hero-title { font-size: clamp(2.2rem, 3.8vw, 3.6rem); line-height: 1.04; max-width: 20ch; }
.day-hero .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 2.5rem; align-items: start; }
.hero-aside { padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-card, var(--panel)); }
.hero-aside .caption { margin: 0 0 .2rem; }
.plan-title { margin: 0 0 .7rem; font-size: 1.25rem; }
.plan-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0; }
.plan-list li { display: grid; grid-template-columns: 6.6rem 1fr auto; gap: .2rem .7rem; align-items: baseline; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.35; }
.plan-list li:first-child { border-top: 0; }
.plan-time { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.plan-list .tag-kind { margin: 0; font-size: .74rem; }
.lesson-head { padding-top: 2.2rem; }
.lesson-title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .6rem 1.5rem; margin-bottom: 1.3rem; }
.lesson-head #hero-title { font-size: clamp(1.7rem, 2.8vw, 2.6rem); line-height: 1.08; max-width: none; margin: 0; letter-spacing: -0.03em; }
.lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; margin: 0; color: var(--muted); }
.lesson-meta b { color: var(--text); }
@media (max-width: 980px) { .day-hero .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .plan-list li { grid-template-columns: 1fr auto; } .plan-time { grid-column: 1 / -1; } }
.program-download{margin-top:28px}
/* Частые вопросы и глоссарий */
.faq-toc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 2rem; }
.faq-toc-list > li { min-width: 0; }
.faq-toc-sec { margin: 0 0 .3rem; font-weight: 750; }
.faq-toc-sec a { color: var(--text); text-decoration: none; }
.faq-toc-sec b { color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; margin-right: .3rem; }
.faq-toc-list ol { margin: 0; padding-left: 1.9rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.faq-toc-list ol li { margin: .18rem 0; }
.faq-item { margin: 1.4rem 0 0; padding: 1.15rem 1.25rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-card, var(--panel)); scroll-margin-top: 5.5rem; }
.faq-item h3 { margin: 0 0 .7rem; font-size: 1.18rem; line-height: 1.3; }
.faq-num { display: inline-block; min-width: 1.9rem; margin-right: .35rem; padding: .05rem .45rem; border-radius: 8px; background: var(--notice-bg); color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; text-align: center; vertical-align: .12em; }
.faq-short { margin: 0 0 .8rem; padding: .7rem .95rem; border-left: 3px solid var(--good); border-radius: 0 10px 10px 0; background: var(--notice-bg); }
.faq-short p { margin: 0; line-height: 1.55; }
.faq-short .faq-short-label { margin-bottom: .2rem; color: var(--good); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.faq-text p, .faq-text li { line-height: 1.62; }
.faq-text p { margin: .55rem 0; }
.faq-text table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .9rem; }
.faq-text th, .faq-text td { padding: .45rem .6rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.faq-text blockquote { margin: .8rem 0; padding: .4rem 0 .4rem .9rem; border-left: 3px solid var(--line); color: var(--text-soft, var(--text)); }
/* список источников: выделен источник, на который перешли по [n], и только у него – «↩ к тексту» */
.faq-sources li:target { background: var(--surface-subtle); outline: 2px solid var(--line-strong); outline-offset: 2px; border-radius: 6px; }
.faq-sources .src-back { display: none; margin-left: .4rem; white-space: nowrap; font-weight: 600; }
.faq-sources li:target .src-back { display: inline; }
/* пример файла (SKILL.md): тёмный блок кода в обеих темах, длинные строки переносятся – без прокрутки на телефоне */
.faq-text pre { margin: .8rem 0; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--code-bg); white-space: pre-wrap; overflow-wrap: anywhere; }
.faq-diag { margin: 1rem 0 .6rem; max-width: 880px; }
.faq-diag-note { color: var(--muted); font-weight: 400; }
.faq-up { margin: .6rem 0 0; font-size: .85rem; }
.faq-sources ul { padding-left: 1.2rem; }
.faq-sources li { margin: .3rem 0; line-height: 1.5; overflow-wrap: anywhere; }
.gloss-index { list-style: none; margin: 0; padding: 0; columns: 3 14rem; column-gap: 2rem; }
.gloss-index li { margin: .15rem 0; break-inside: avoid; }
.term { scroll-margin-top: 5.5rem; }
@media (max-width: 760px) { .faq-toc-list { grid-template-columns: 1fr; } .faq-item { padding: 1rem .95rem .9rem; } }

/* --- Живое расписание дня (live-schedule.js): прошедшее – серое время, идущее – красное, перерыв, ход дня --- */
:root { --live: #ff6b6b; --live-soft: rgba(255, 107, 107, 0.1); }
:root[data-theme="light"] { --live: #d92d20; --live-soft: rgba(217, 45, 32, 0.07); }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 var(--live); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.live-head { margin: -.2rem 0 .9rem; }
.live-clock { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 700; color: var(--live); font-variant-numeric: tabular-nums; }
.live-clock::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--live); animation: live-pulse 1.8s infinite; flex: none; }
.live-head:has(+ [data-live-state="before"]) .live-clock::before,
.live-head:has(+ [data-live-state="after"]) .live-clock::before { animation: none; background: var(--muted); }
.live-head:has(+ [data-live-state="before"]) .live-clock, .live-head:has(+ [data-live-state="after"]) .live-clock { color: var(--muted); }
.live-day-bar { position: relative; display: block; height: 6px; margin-top: .5rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.live-day-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--done, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--live)); transition: width .6s ease; }
.plan-list li, .timeline-item { position: relative; transition: opacity .3s ease; }
.plan-list li.is-past .plan-time, .timeline-item.is-past .timeline-time { color: var(--muted); opacity: .45; font-weight: 600; }
.plan-list li.is-now { margin: 0 -.65rem; padding-left: .65rem; padding-right: .65rem; padding-bottom: .95rem; border-radius: 12px; background: var(--live-soft); box-shadow: inset 3px 0 0 var(--live); border-top-color: transparent; }
.plan-list li.is-now + li { border-top-color: transparent; }
.plan-list li.is-now .plan-time, .timeline-item.is-now .timeline-time { color: var(--live); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.live-left { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; color: var(--live); font-size: .78rem; font-weight: 700; }
.live-left::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--live); animation: live-pulse 1.8s infinite; flex: none; }
.live-progress { position: absolute; left: .65rem; right: .65rem; bottom: .35rem; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.live-progress::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--done, 0%); background: var(--live); border-radius: inherit; transition: width .6s ease; }
.timeline-item .live-progress { left: auto; right: 0; bottom: 0; width: calc(100% - 7rem); }
.timeline-item.is-now .timeline-dot { background: var(--live); border-color: var(--live); animation: live-pulse 1.8s infinite; }
.timeline-item.is-past .timeline-dot { opacity: .45; }
.live-gap, .plan-list li.live-gap { display: flex; align-items: center; gap: .55rem; padding: .5rem 0; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: .82rem; font-weight: 600; list-style: none; }
.plan-list .live-gap + li { border-top-style: dashed; }
.live-gap-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--amber); animation: live-pulse 2.4s infinite; flex: none; }
.timeline .live-gap { margin: .2rem 0 .2rem 7rem; }
@media (prefers-reduced-motion: reduce) { .live-clock::before, .live-left::before, .live-gap-dot, .timeline-item.is-now .timeline-dot { animation: none; } .live-day-bar::after, .live-progress::after { transition: none; } }
@media (max-width: 640px) { .timeline .live-gap { margin-left: 0; } .timeline-item .live-progress { width: 100%; } }
