/* Новый вид Академии, экран «Программа» (07.11.2026): навигация «модуль → раздел → уроки» как в Базе знаний сайта (компонент «Н1»)
   и как образец obrazec-v4/akademiya.html: три шага, выбранная карточка сжимается в корешок слева, панели на всю ширину
   (ПК - вбок, телефон - вниз), корешок нажимается для возврата. Цвета и шрифты - только токены сайта (site-style/).
   Движение - из токенов сайта: .38 s, ease(.32,0,.2,1). Разметку и поведение рисует vid/n1.js. */
:root{--n1-ease:cubic-bezier(.32,0,.2,1);--n1-dur:.38s;--n1-rail:56px;--n1-stage:360px;--n1-card:120px;--n1-art:112px;
  --n1-ok:#3f9a62;
  /* правило Макса (07.11): никаких свечений, стекла, полупрозрачных рамок и теней - только сплошные заливки из токенов */
  --n1-glass-fill:var(--ds-surface);--n1-glass-sheen:none;--n1-glass-shadow:none}
:root[data-theme=light]{--n1-ok:#27783f}

.n1-page{font-family:var(--ds-ui-font-onest,inherit);font-size:16px;line-height:1.45;color:var(--ds-text);font-variant-numeric:tabular-nums}
.n1-page .n1-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:4px 0 26px}
.n1-page .n1-head h1{font-family:var(--ds-academy-font-heading,inherit);font-weight:400;font-size:36px;line-height:1.1;margin:0;outline:none}
.n1-page .n1-head h1 small{display:block;font-family:var(--ds-ui-font-onest,inherit);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--ds-muted);margin-top:6px}
.n1-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.n1-tools .button{white-space:nowrap;font-size:16px;font-weight:600}
.n1-page .n1-notices:empty{display:none}

/* шапка шага: имя текущего уровня и «Шаг N из 3 · …» */
.n1{container:n1/inline-size;overflow:clip;padding:6px 6px 28px;margin:-6px -6px -28px}   /* запас под тень и рамку фокуса карточек, низ не режется */
.n1-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:18px}
.n1-page .n1-heading h2{font-size:22px;line-height:1.15;font-weight:600;margin:0;outline:none;scroll-margin-top:96px;font-family:var(--ds-ui-font-onest,inherit)}
.n1-heading p{margin:0;font-size:14px;color:var(--ds-muted);white-space:nowrap}
.n1-body{display:flex;gap:16px;align-items:stretch;position:relative;min-height:var(--n1-stage)}
.n1[data-depth="0"] .n1-body{min-height:0}
.n1-rails{display:flex;gap:12px;flex-shrink:0;align-self:flex-start;position:sticky;top:12px}
.n1-rails:empty{display:none}
.n1-rail{all:unset;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;width:var(--n1-rail);height:var(--n1-stage);padding:12px 6px;
  border:1px solid var(--ds-border);border-top:3px solid var(--ds-accent);border-radius:8px;cursor:pointer;color:var(--ds-text);text-align:center;overflow:hidden;will-change:transform;
  background:var(--n1-glass-sheen),var(--n1-glass-fill);box-shadow:var(--n1-glass-shadow)}
.n1-rail>span{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ds-muted)}
.n1-rail svg{width:16px;height:16px}
.n1-rail b{writing-mode:vertical-rl;text-orientation:mixed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px;font-weight:600;line-height:1.2;flex:1;max-height:304px}
.n1-rail small{display:none}
.n1-rail:focus-visible{outline:2px solid var(--ds-text);outline-offset:3px}
.n1-viewport{position:relative;flex:1;min-width:0;display:grid;overflow:clip;align-items:start;padding:6px 6px 28px;margin:-6px -6px -28px}
.n1-pane{grid-area:1/1;min-width:0;width:100%;display:grid;gap:16px;transform-origin:left center;will-change:transform}
.n1-pane.leaving{pointer-events:none}

/* карточки выбора: ровная сетка одинаковых карточек, текст слева, художественная часть справа */
.n1-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px;align-items:stretch}
.n1-choice{all:unset;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) var(--n1-art);min-height:var(--n1-card);height:100%;border:1px solid var(--ds-border);border-radius:8px;
  color:var(--ds-text);text-align:left;overflow:hidden;cursor:pointer;will-change:transform;background:var(--n1-glass-sheen),var(--n1-glass-fill);box-shadow:var(--n1-glass-shadow)}
.n1-choice:focus-visible{outline:2px solid var(--ds-text);outline-offset:3px}
.n1-text{display:flex;flex-direction:column;justify-content:flex-start;gap:8px;padding:16px;min-width:0}
.n1-top{display:flex;min-width:0}
.n1-top>b{min-width:0}
.n1-choice{position:relative}
/* плашка новинки (образец obrazec-v4/karta.html, .knew, утвердил Макс): красная заливка, белый текст, без рамки, тени и точки, одинаково в обеих темах */
.n1-new{position:absolute;top:10px;right:10px;z-index:3;height:20px;line-height:20px;padding:0 8px;font-style:normal;font-weight:600;font-size:11px;white-space:nowrap;color:#fff;border-radius:4px;background:#c8102e}
.n1-new.inrow{position:static;display:inline-block;margin-left:8px;vertical-align:1px}
/* строка состояния внизу карточки с полоской (образец obrazec-v4/karta.html) */
.n1-text>span.n1-foot{margin-top:auto;display:flex;flex-direction:column;align-items:stretch;gap:6px;padding-top:4px;font-size:13px;color:var(--ds-muted)}
.n1-line{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--ds-muted)}
.n1-line b{color:var(--ds-text);font-weight:600}
.n1-track{display:block;height:5px;border-radius:3px;background:var(--ds-border);overflow:hidden}
.n1-track i{display:block;height:100%;background:var(--ds-accent)}
.n1-choice.locked .n1-line,.n1-choice.locked .n1-line b{color:var(--ds-muted)}
.n1-text>b,.n1-top>b{font-size:16px;font-weight:600;line-height:1.2;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.n1-text>p{margin:0;color:var(--ds-muted);font-size:13px;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.n1-text>small{color:var(--ds-muted);font-size:12px;line-height:1.35}
.n1-text>span{display:flex;align-items:center;gap:6px;color:var(--ds-muted);font-size:12px}
.n1-text>span svg{width:16px;height:16px;flex:none}
.n1-text>span.lock{color:var(--ds-text)}
.n1-text>span.n1-top{color:var(--ds-text)}
.n1-choice.done .n1-text>b::after,.n1-choice.done .n1-top>b::after{content:" ✓";color:var(--n1-ok)}
.n1-choice.locked .n1-art{opacity:.55}
.n1-art{position:relative;display:flex;align-items:center;justify-content:center;align-self:stretch;overflow:visible;color:var(--ds-muted)}
.n1-art>svg{width:56px;height:56px;stroke-width:1.25;opacity:.55;transition:opacity var(--n1-dur) var(--n1-ease)}
.n1-art>svg.acc{position:absolute;inset:0;margin:auto;color:var(--ds-accent);opacity:0}
@media(hover:hover){.n1-choice:hover .n1-art>svg.ink{opacity:0}.n1-choice:hover .n1-art>svg.acc{opacity:.9}}
/* стопка фото (База знаний сайта, вариант drop; как .deck и .dk в obrazec-v4/karta.html): карты лежат колодой, без теней */
.n1-fan{position:relative;width:100%;height:100%;min-height:96px}
.n1-deck{overflow:visible}
.n1-deck.dealing{overflow:hidden}
.n1-dk{position:absolute;left:50%;top:50%;width:80px;aspect-ratio:1.5;box-sizing:border-box;border:1px solid var(--ds-border);border-radius:6px;background:#fff;overflow:hidden;display:block}
.n1-dk img{display:block;width:100%;height:100%;padding:3px;box-sizing:border-box;object-fit:contain}
/* 09.11: обложки разделов из наших 3D-моделей и настоящих экранов (uroki/_kartinki/oblozhki/*.webp, кадр 3:2 с прозрачным фоном): вместо белой подложки студийный фон, кадр на всю карту */
.n1-dk.own{width:90px;background:radial-gradient(120% 130% at 40% 25%,#8b8e95 0%,#5b5e65 100%)}
:root[data-theme=light] .n1-dk.own{background:radial-gradient(120% 130% at 40% 25%,#e4e6e9 0%,#a9adb5 100%)}
.n1-dk.own img{padding:0;object-fit:cover}
.n1-fan .badge{position:absolute;left:50%;top:50%;width:76px;height:76px;margin:-38px 0 0 -38px;object-fit:contain}
.n1-fan .badge.grey{filter:grayscale(1) opacity(.55)}

/* знак раздела или модуля: серый, пока не заслужен */
.n1-award{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px dashed var(--ds-border);border-radius:8px;color:var(--ds-muted);font-size:14px}
.n1-award img{width:44px;height:44px;object-fit:contain;filter:grayscale(1) opacity(.55);flex:none}
.n1-award.earned{border-style:solid;border-color:var(--n1-ok);color:var(--ds-text)}.n1-award.earned img{filter:none}
.n1-award b{display:block;color:var(--ds-text);font-size:15px}
.n1-award .vbadge{width:52px;height:52px;margin:0;flex:none;filter:drop-shadow(0 3px 6px #0000002e)}

/* описание модуля и офлайн-копия (компактно, под шапкой шага) */
.n1-about{display:flex;flex-wrap:wrap;align-items:center;gap:10px 24px;padding:12px 16px;border:1px solid var(--ds-border);border-radius:8px;background:var(--n1-glass-sheen),var(--n1-glass-fill);box-shadow:var(--n1-glass-shadow)}
.n1-about>p{margin:0;font-size:14px;line-height:1.45;flex-basis:100%}
.n1-about .n1-meter{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--ds-muted);flex:1 1 260px;min-width:0}
.n1-about .n1-meter svg{width:16px;height:16px;flex:none}
.n1-about .n1-meter i{flex:1;max-width:260px;height:4px;border-radius:4px;background:var(--ds-border);overflow:hidden;display:block}
.n1-about .n1-meter i::after{content:"";display:block;height:100%;width:var(--n1-pct,0%);background:var(--n1-ok)}
.n1-about .n1-meter.locked{color:var(--ds-text)}
.n1-page .offline-pack.n1-offline{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0;padding:0;justify-items:start}
.n1-about .n1-offline{margin-left:auto;max-width:100%}
.n1-about .n1-offline small{max-width:260px}
.n1-page .n1-offline small{color:var(--ds-muted);font-size:12px;line-height:1.35}
.n1-page .n1-offline .button{font-size:13px;min-height:44px;font-weight:500}
.n1-page .n1-offline .offline-status{flex-basis:100%;margin:0;font-size:12px;color:var(--ds-muted)}
.n1-page .n1-offline .offline-status:empty{display:none}
.n1-page .n1-offline .dl-progress{flex-basis:100%}

/* список уроков раздела: номер, название, минуты, состояние; галочка у пройденных */
.n1-lessons{display:grid;gap:8px}
.n1-block{margin:10px 0 2px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--ds-muted)}
.n1-lesson{position:relative;box-sizing:border-box;display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid var(--ds-border);border-radius:8px;
  color:var(--ds-text);background:var(--n1-glass-sheen),var(--n1-glass-fill);box-shadow:var(--n1-glass-shadow)}
.n1-lesson.can:hover{border-color:var(--ds-text)}
.n1-lesson .mark{width:28px;height:28px;border-radius:50%;border:2px solid var(--ds-border);display:grid;place-items:center;color:#fff;font-size:13px;font-weight:700;box-sizing:border-box}
.n1-lesson .mark svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.n1-lesson.done .mark{background:var(--n1-ok);border-color:var(--n1-ok)}
.n1-lesson.now .mark{border-color:var(--ds-accent-text,var(--ds-accent))}
.n1-lesson.now .mark::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--ds-accent-text,var(--ds-accent))}
.n1-lesson.locked .mark{color:var(--ds-muted);border-style:dashed}
.n1-lesson.planned .mark,.n1-lesson.planned .st{opacity:.6}
.n1-lesson.kt{border-left:3px solid var(--ds-accent)}
.n1-go{all:unset;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:44px;cursor:pointer}
.n1-go::before{content:"";position:absolute;inset:0;border-radius:8px}
.n1-go:focus-visible::before{outline:2px solid var(--ds-text);outline-offset:3px}
.n1-go[disabled]{cursor:default;opacity:1}
.n1-lesson.locked b,.n1-lesson.locked b i{color:var(--ds-muted)}
.n1-lesson b{display:block;font-size:15px;font-weight:600;line-height:1.3}
.n1-lesson b i{font-style:normal;color:var(--ds-muted);font-weight:400;margin-right:8px}
.n1-lesson small{display:block;font-size:12px;color:var(--ds-muted);margin-top:2px}
.n1-side{display:grid;gap:4px;justify-items:end;text-align:right;max-width:220px}
.n1-lesson .st{font-size:12px;color:var(--ds-muted);line-height:1.3}
.n1-lesson.done .st{color:var(--n1-ok)}.n1-lesson.now .st{color:var(--ds-accent-text,var(--ds-accent));font-weight:600}.n1-lesson.locked .st{color:var(--ds-muted)}
.n1-page .n1-dl{all:unset;position:relative;z-index:1;cursor:pointer;font-size:12px;color:var(--ds-muted);text-decoration:underline;text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px;padding:0 2px;margin:-14px 0}
.n1-page .n1-dl:hover{color:var(--ds-text)}
.n1-page .n1-dl[disabled]{cursor:default;text-decoration:none}
.n1-empty{padding:14px 16px;border:1px dashed var(--ds-border);border-radius:8px;color:var(--ds-muted);font-size:14px}

/* задания и эфиры под навигацией: те же стеклянные карточки */
.n1-after{display:grid;gap:16px;margin-top:28px}
.n1-page .n1-after .tasks-summary{margin:0;border:1px solid var(--ds-border);border-radius:8px;background:var(--n1-glass-sheen),var(--n1-glass-fill);box-shadow:var(--n1-glass-shadow);color:var(--ds-text);padding:14px 16px;gap:8px}
.n1-page .n1-after .tasks-summary .eyebrow{color:var(--ds-muted);margin:0;letter-spacing:.06em;font-size:11px;font-weight:600}
.n1-page .n1-after .tasks-summary .tasks-go{color:var(--ds-muted);font-size:12px}
.n1-page .n1-after .today-schedule{margin:0}
.n1-page .n1-after .section-title{font-size:15px;font-weight:600;margin:0 0 10px;font-family:inherit}
.n1-page .n1-after .surface{margin-top:0!important;border:1px solid var(--ds-border);border-radius:8px;background:var(--n1-glass-sheen),var(--n1-glass-fill);box-shadow:var(--n1-glass-shadow)}
.n1-page .n1-after .muted{color:var(--ds-muted);font-size:13px;margin:0}
.n1-page .n1-after [data-offline-status]:empty{display:none}
.n1-page .n1-after .tasks-nums{display:flex;flex-wrap:wrap;gap:6px 22px}
.n1-page .n1-after .tasks-nums>span{flex-direction:row;align-items:baseline;gap:6px;background:none;padding:0;border-radius:0;font-size:13px;color:var(--ds-muted)}
.n1-page .n1-after .tasks-nums b{font-size:18px;line-height:1.1;color:var(--ds-text)}
.n1-page .n1-after .tasks-nums .warn b{color:var(--ds-accent)}
.n1-page .n1-after .offline-banner{border-left-width:1px;border-left-color:var(--ds-border);padding:14px 16px}

/* телефон: корешки лежат сверху горизонтальной полосой, панели едут по вертикали */
@container n1 (max-width:767px){
  .n1-heading{flex-direction:column;align-items:start;gap:4px}
  .n1-page .n1-heading h2{font-size:19px}
  .n1-heading p{white-space:normal}
  .n1-body{flex-direction:column;gap:12px;min-height:0}
  .n1-rails{flex-direction:column;width:100%;align-self:stretch;gap:8px}
  .n1-rail{flex-direction:row;align-items:center;justify-content:flex-start;width:100%;height:auto;min-height:48px;padding:10px 12px;gap:12px;border-top-width:1px;border-left:3px solid var(--ds-accent)}
  .n1-rail>span{flex:none;flex-direction:row}
  .n1-rail b{writing-mode:horizontal-tb;max-height:none;flex:1;font-size:14px;text-align:left}
  .n1-viewport{width:auto;margin-left:0;margin-right:0;padding-left:0;padding-right:0}
  .n1-rails{position:static}
  .n1-pane{display:flex;flex-direction:column}
  .n1-pane .n1-lessons{order:-1}
  .n1-pane{transform-origin:center top}
  .n1-choice{grid-template-columns:minmax(0,1fr) 100px;min-height:112px}
  .n1-text{padding:12px;gap:6px}
  .n1-art>svg{width:44px;height:44px}
  .n1-dk{width:64px}
  .n1-dk.own{width:74px}
  .n1-lesson{grid-template-columns:24px minmax(0,1fr);padding:10px 12px}
  .n1-side{grid-column:2;justify-items:start;text-align:left;max-width:none}
}
/* то же для браузеров без @container (запас) */
@media(max-width:767px){
  .n1-heading{flex-direction:column;align-items:start;gap:4px}
  .n1-page .n1-heading h2{font-size:19px}
  .n1-heading p{white-space:normal}
  .n1-body{flex-direction:column;gap:12px;min-height:0}
  .n1-rails{flex-direction:column;width:100%;align-self:stretch;gap:8px}
  .n1-rail{flex-direction:row;align-items:center;justify-content:flex-start;width:100%;height:auto;min-height:48px;padding:10px 12px;gap:12px;border-top-width:1px;border-left:3px solid var(--ds-accent)}
  .n1-rail>span{flex:none;flex-direction:row}
  .n1-rail b{writing-mode:horizontal-tb;max-height:none;flex:1;font-size:14px;text-align:left}
  .n1-viewport{width:auto;margin-left:0;margin-right:0;padding-left:0;padding-right:0}
  .n1-rails{position:static}
  .n1-pane{display:flex;flex-direction:column}
  .n1-pane .n1-lessons{order:-1}
  .n1-pane{transform-origin:center top}
  .n1-choice{grid-template-columns:minmax(0,1fr) 100px;min-height:112px}
  .n1-text{padding:12px;gap:6px}
  .n1-art>svg{width:44px;height:44px}
  .n1-dk{width:64px}
  .n1-dk.own{width:74px}
  .n1-lesson{grid-template-columns:24px minmax(0,1fr);padding:10px 12px}
  .n1-side{grid-column:2;justify-items:start;text-align:left;max-width:none}
}
@media(max-width:600px){.n1-page .n1-head{margin-bottom:18px}.n1-about .n1-offline{margin-left:0}.n1-page .n1-head h1{font-size:28px}.n1-tools{width:100%}.n1-tools .button{white-space:normal;text-align:left}}
@media(prefers-reduced-motion:reduce){.n1-choice,.n1-rail,.n1-dk,.n1-art>svg{transition:none!important;animation:none!important}}
/* 10.11 (Макс): объявление прапорщика над «Программой» - рация как в уроках (стили - копия .pr из obrazec-v4/lekciya.css под токены сайта) */
.n1-obyav{margin:0 0 22px;padding:14px 16px 12px;border:1px solid var(--ds-border);border-left:3px solid var(--ds-accent);border-radius:8px;background:var(--ds-surface,transparent)}
.n1-obyav[hidden]{display:none}
.n1-obyav .pr{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px;align-items:start;margin:0}
.n1-obyav .pr-btn{all:unset;cursor:pointer;display:block;width:44px;height:66px;position:relative;-webkit-tap-highlight-color:transparent}
.n1-obyav .pr-btn svg{width:44px;height:66px;display:block;overflow:visible}
.n1-obyav .pr-btn:focus-visible svg{outline:2px solid var(--ds-accent);outline-offset:4px;border-radius:6px}
.n1-obyav .pr-btn .pr-led{fill:#3a3c40;transition:fill .15s}
.n1-obyav .pr[data-state=efir] .pr-led{animation:n1PrLed .32s steps(2) infinite}
.n1-obyav .pr[data-state=say] .pr-led{fill:#38c56a;filter:drop-shadow(0 0 3px #38c56a)}
.n1-obyav .pr-btn .pr-ptt{transition:transform .08s}
.n1-obyav .pr-btn:active .pr-ptt,.n1-obyav .pr[data-state=efir] .pr-ptt{transform:translateX(1.5px)}
.n1-obyav .pr-body{padding-top:4px;min-width:0}
.n1-obyav .pr-name{font-family:var(--ds-font-mono,monospace);font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--ds-muted)}
.n1-obyav .pr-hint{font-size:16px;font-weight:600;color:var(--ds-text);margin-top:6px}
.n1-obyav .pr[data-state=efir] .pr-hint,.n1-obyav .pr[data-state=say] .pr-hint,.n1-obyav .pr[data-state=done] .pr-hint{display:none}
.n1-obyav .pr-efir{display:none;align-items:center;gap:3px;height:22px;margin-top:8px}
.n1-obyav .pr[data-state=efir] .pr-efir{display:flex}
.n1-obyav .pr-efir i{display:block;width:3px;height:6px;background:var(--ds-accent);border-radius:1px;animation:n1PrBar .5s ease-in-out infinite alternate}
.n1-obyav .pr-efir i:nth-child(2){animation-delay:.08s}.n1-obyav .pr-efir i:nth-child(3){animation-delay:.16s}.n1-obyav .pr-efir i:nth-child(4){animation-delay:.24s}.n1-obyav .pr-efir i:nth-child(5){animation-delay:.32s}.n1-obyav .pr-efir i:nth-child(6){animation-delay:.4s}.n1-obyav .pr-efir i:nth-child(7){animation-delay:.48s}
.n1-obyav .pr-say{margin:6px 0 0;font-family:var(--ds-font-mono,monospace);font-size:15px;line-height:1.55;color:var(--ds-text);display:none;white-space:pre-wrap}
.n1-obyav .pr[data-state=say] .pr-say,.n1-obyav .pr[data-state=done] .pr-say{display:block}
.n1-obyav .pr[data-state=say] .pr-say::after{content:'▌';color:var(--ds-accent);animation:n1PrCur .9s steps(2) infinite}
@keyframes n1PrLed{0%{fill:#e03131;filter:drop-shadow(0 0 4px #e03131)}100%{fill:#5a1a1a;filter:none}}
@keyframes n1PrBar{from{height:4px;opacity:.5}to{height:20px;opacity:1}}
@keyframes n1PrCur{to{opacity:0}}
@media (prefers-reduced-motion:reduce){.n1-obyav .pr-efir i,.n1-obyav .pr[data-state=efir] .pr-led,.n1-obyav .pr[data-state=say] .pr-say::after{animation:none}}
@media (max-width:600px){.n1-obyav{margin-bottom:16px;padding:12px 12px 10px}.n1-obyav .pr-say{font-size:14px}}
