:root {
  /* светлый современный вид: белый фон, серые поверхности, коралловый акцент в тон иконкам */
  --bg: #ffffff;
  --card: #f4f5f7;
  --ink: #16181d;
  --ink-2: #3e4350;
  --muted: #6e7380;
  --faint: #a2a6b0;
  --line: #e7e8ec;
  --line-2: #eff0f3;
  --accent: #16181d;
  --accent-ink: #ffffff;
  --accent-soft: #eef0f4;
  --warm: #ee6440; --warm-bg: #ffece5;
  /* оттенки разделов: фон и краска */
  --sand-bg: #fff3da; --sand: #a97a22;
  --sage-bg: #e3f5e9; --sage: #3f8a5a;
  --terra-bg: #ffe9e0; --terra: #c8562f;
  --blue-bg: #e7efff; --blue: #3d6cc0;
  --rose-bg: #fdebf0; --rose: #b54e68;
  --slate-bg: #eef0f6; --slate: #4e5875;
  --lilac-bg: #f1ebff; --lilac: #7152b8;
  --good: #256245;
  --good-soft: #e9f3ee;
  --bad: #9f3a2c;
  --bad-soft: #f8ecea;
  --chip: #f1f2f4;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
/* Только светлая тема — как у портала вакансий */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-text-size-adjust: 100%; overscroll-behavior-x: none;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- главная ---------- */
#home { max-width: 680px; margin: 0 auto; padding: calc(14px + var(--top)) 16px calc(28px + var(--bottom)); }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
h1 { font-size: 24px; line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.015em; }
.sub { color: var(--muted); font-size: 13px; margin-top: 3px; min-height: 18px; }
.head .tools { width: 40px; height: 40px; margin: -6px -8px 0 0; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.head .tools svg { width: 22px; height: 22px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: var(--card); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }

.go { display: block; width: 100%; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); }
.go b { display: block; font-size: 17px; font-weight: 650; }
.go span { font-size: 13px; opacity: .8; }
.go2 { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 8px; padding: 12px 16px; border-radius: 14px; background: var(--card); font-weight: 600; }
.go2 .n { color: var(--bad); font-variant-numeric: tabular-nums; }

.block { margin-top: 22px; }
.block-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin: 0 2px 8px; }
.list { background: var(--card); border-radius: 14px; overflow: hidden; }
.topic { display: block; width: 100%; padding: 11px 14px 12px; border-top: 1px solid var(--line-2); }
.topic:first-child { border-top: 0; }
.topic .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.topic .name { font-weight: 550; font-size: 15px; line-height: 1.3; }
.topic .num { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topic .num.bad { color: var(--bad); }
.bar { height: 4px; border-radius: 2px; background: var(--line-2); margin-top: 7px; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar i.try { background: #b7c5d8; }
.topic .note { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.topic.soon .name { color: var(--muted); }

.days { display: flex; align-items: flex-end; gap: 3px; height: 64px; background: var(--card); border-radius: 14px; padding: 10px 12px 8px; }
.days .d { flex: 1; display: flex; flex-direction: column-reverse; height: 100%; border-radius: 2px; }
.days .d i { display: block; width: 100%; }
.days .d .ok { background: var(--accent); }
.days .d .no { background: #d9a79f; }
.days .d.empty { background: var(--line-2); max-height: 3px; margin-top: auto; }
.days-caption { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin: 5px 4px 0; }

.mistake { display: block; width: 100%; padding: 11px 14px; border-top: 1px solid var(--line-2); }
.mistake:first-child { border-top: 0; }
.mistake .mq { font-size: 14.5px; line-height: 1.35; }
.mistake .mm { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.empty-note { color: var(--muted); font-size: 14px; padding: 14px; background: var(--card); border-radius: 14px; }

/* ---------- вопрос ---------- */
.quiz { position: fixed; inset: 0; z-index: 10; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.quiz-top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: calc(8px + var(--top)) 16px 8px; }
.quiz-top-inner { max-width: 680px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.quiz-top .close { width: 36px; height: 36px; margin-left: -8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); flex: none; }
.quiz-top .close svg { width: 22px; height: 22px; }
.steps { flex: 1; display: flex; gap: 3px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.ok { background: var(--good); }
.steps i.no { background: var(--bad); }
.steps i.now { background: var(--accent); }
.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }

.q { max-width: 680px; margin: 0 auto; padding: 4px 16px calc(96px + var(--bottom)); }
.q-topic { font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; }
.q-text { font-size: 18px; line-height: 1.35; font-weight: 600; margin: 0 0 12px; letter-spacing: -.005em; }
.q-hint { font-size: 13.5px; color: var(--muted); margin: -6px 0 12px; }

.pic { position: relative; margin: 0 -16px 12px; background: #e9eaed; display: flex; justify-content: center; }
.pic .frame { position: relative; max-width: 100%; }
.pic img { display: block; max-width: 100%; max-height: 64vh; width: auto; height: auto; }
.pic .zoom-btn { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 17px; background: rgba(17, 24, 39, .55); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.pic .zoom-btn svg { width: 18px; height: 18px; stroke-width: 2; }
.pic.tap img { cursor: crosshair; max-height: 72vh; }
.pic .mark { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid var(--accent); background: rgba(31, 58, 95, .18); box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.pic .mark.no { border-color: var(--bad); background: rgba(159, 58, 44, .18); }
.pic .mark.ok { border-color: var(--good); background: rgba(37, 98, 69, .18); }
.pic .area { position: absolute; border: 2.5px solid var(--good); border-radius: 6px; background: rgba(37, 98, 69, .12); pointer-events: none; }
.caption { font-size: 12.5px; color: var(--muted); margin: -6px 0 12px; }

.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--card); font-size: 15.5px; line-height: 1.35; }
.opt .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--faint); display: inline-flex; align-items: center; justify-content: center; }
.opts.multi .opt .box { border-radius: 6px; }
.opt .box svg { width: 13px; height: 13px; stroke-width: 2.6; color: #fff; opacity: 0; }
.opt.on { border-color: var(--accent); }
.opt.on .box { background: var(--accent); border-color: var(--accent); }
.opt.on .box svg { opacity: 1; }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.right .box { background: var(--good); border-color: var(--good); }
.opt.right .box svg { opacity: 1; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .box { background: var(--bad); border-color: var(--bad); }
.opt.wrong .box svg { opacity: 1; }
.opt.missed { border-color: var(--good); border-style: dashed; }
.opts.done .opt { cursor: default; }
.opt kbd { font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace; background: var(--chip); border-radius: 5px; padding: 3px 6px; }

.opts.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts.pics .opt { flex-direction: column; align-items: stretch; padding: 6px; gap: 6px; }
.opts.pics .opt img { width: 100%; height: auto; border-radius: 7px; display: block; background: #e9eaed; }
.opts.pics .opt .lbl { display: flex; align-items: center; gap: 7px; font-size: 13.5px; padding: 0 4px 3px; }

.order .opt { align-items: center; }
.order .opt .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--muted); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.order .opt.on .n { background: var(--accent); color: #fff; }
.order .opt.right .n { background: var(--good); color: #fff; }
.order .opt.wrong .n { background: var(--bad); color: #fff; }

.verdict { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--card); }
.verdict .v { font-weight: 700; font-size: 15.5px; }
.verdict .v.ok { color: var(--good); }
.verdict .v.no { color: var(--bad); }
.verdict p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.verdict .path { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); background: var(--accent-soft); border-radius: 8px; padding: 7px 10px; }
.verdict .path b { font-weight: 600; }

.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 10px 16px calc(10px + var(--bottom)); background: linear-gradient(to bottom, rgba(243, 244, 246, 0), var(--bg) 30%); }
.bottom-inner { max-width: 680px; margin: 0 auto; display: flex; gap: 8px; }
.bottom button { flex: 1; padding: 14px; border-radius: 13px; font-weight: 650; font-size: 16px; background: var(--accent); color: var(--accent-ink); text-align: center; }
.bottom button.second { background: var(--card); color: var(--ink); flex: 0 0 auto; padding: 14px 18px; }
.bottom button:disabled { opacity: .4; }

/* итог тренировки */
.result { text-align: center; padding: 26px 0 8px; }
.result b { display: block; font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result span { color: var(--muted); font-size: 14px; }
.result-topics { margin-top: 18px; }

/* ---------- увеличенная картинка ---------- */
.zoom { position: fixed; inset: 0; z-index: 30; background: #111; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.zoom img { display: block; width: 200%; max-width: none; height: auto; }
.zoom .x { position: fixed; top: calc(10px + var(--top)); right: 12px; width: 40px; height: 40px; border-radius: 20px; background: rgba(255, 255, 255, .92); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; z-index: 2; }
.zoom .x svg { width: 20px; height: 20px; stroke-width: 2; }

/* ---------- лист ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .32); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 680px; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + var(--bottom)); }
.sheet h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.3; }
.sheet .sub { margin-bottom: 12px; }
.sheet .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.sheet .facts div { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.sheet .facts b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.sheet .facts span { font-size: 12px; color: var(--muted); }
.sheet .row { display: flex; gap: 8px; margin-top: 14px; }
.sheet .row button { flex: 1; padding: 13px; border-radius: 12px; font-weight: 650; background: var(--chip); text-align: center; }
.sheet .row button.main { background: var(--accent); color: var(--accent-ink); }
.sheet .qlist { margin-top: 6px; }
.sheet .qlist div { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; display: flex; gap: 8px; }
.sheet .qlist div:first-child { border-top: 0; }
.sheet .qlist .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--line); }
.sheet .qlist .dot.l1 { background: #d9a79f; }
.sheet .qlist .dot.l2 { background: #b7c5d8; }
.sheet .qlist .dot.l3 { background: var(--accent); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--bottom)); z-index: 40;
  background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 10px; font-size: 13.5px; max-width: calc(100% - 32px);
}

/* ---------- дизайн-проект: листы и навыки ----------
   Светлый современный вид: белый фон, серые поверхности шагов, пастельные плитки разделов, коралловые номера. */
a { color: inherit; }
#home.wide { max-width: 1160px; }
#home.page { padding-top: 0; }
.warm h1, .warm h2, .warm h3 { letter-spacing: -.02em; }

/* оттенки разделов: .t-<цвет> задаёт --t (фон) и --tc (краска) для вложенного */
.t-sand { --t: var(--sand-bg); --tc: var(--sand); }
.t-sage { --t: var(--sage-bg); --tc: var(--sage); }
.t-terra { --t: var(--terra-bg); --tc: var(--terra); }
.t-blue { --t: var(--blue-bg); --tc: var(--blue); }
.t-rose { --t: var(--rose-bg); --tc: var(--rose); }
.t-slate { --t: var(--slate-bg); --tc: var(--slate); }
.t-lilac { --t: var(--lilac-bg); --tc: var(--lilac); }
.t-skill { --t: var(--card); --tc: #5d6474; }
.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ic.xs { width: 30px; height: 30px; }
.ic.sm { width: 40px; height: 40px; }
.ic.big { width: 108px; height: 108px; }

/* Лист — иконка на бумажном листке с загнутым уголком; навык — иконка в круглом значке со «строчкой».
   Уголок закрашен цветом плашки (--t), поэтому листок кладём только на цветной фон. */
.ic.paper { position: relative; background: #fff; border-radius: 3px; padding: 5px 9px; --fold: 15px;
  box-shadow: 0 1px 2px rgba(40, 45, 70, .1), 0 3px 8px rgba(40, 45, 70, .07); transform: rotate(-2deg); }
.ic.paper::after { content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold);
  background: linear-gradient(225deg, var(--t, #f4f5f7) 50%, #e7e3de 50%); border-bottom-left-radius: 2px; }
.ic.paper img { width: auto; max-width: 100%; }
.tile:nth-child(even) .ic.paper { transform: rotate(1.5deg); }
.tile .ic.paper { width: 88px; height: 64px; }
.sheet-head .ic.paper { width: 136px; height: 98px; padding: 8px 14px; --fold: 22px; --t: #fff; }
.mini .ic.paper { width: 42px; height: 31px; padding: 3px 5px; --fold: 8px; border-radius: 2px; }
.ic.badge { border-radius: 50%; background: #fff; padding: 9px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px rgba(40, 45, 70, .1), 0 2px 7px rgba(40, 45, 70, .08);
  outline: 1.5px dashed rgba(40, 45, 70, .18); outline-offset: -5px; }
.ic.badge.xs { padding: 4px; outline-width: 1px; outline-offset: -2px; box-shadow: 0 0 0 1.5px rgba(40, 45, 70, .1); }
.ic.xxs { width: 24px; height: 24px; }
.ic.badge.xxs { padding: 3px; outline: none; box-shadow: 0 0 0 1px var(--tc, rgba(40, 45, 70, .2)); }
.sk-head .ic.badge { width: 52px; height: 52px; margin-right: 4px; }
/* над заголовком навыка — раздел навыков: значок и название, ведёт к списку навыков */
.grp-line { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px 3px; font-size: 14px; font-weight: 700; color: var(--tc); text-decoration: none; }
.grp-line:hover { color: var(--ink); }
.grp-line .ic.badge { width: 38px; height: 38px; padding: 6px; outline-offset: -4px; outline-width: 1px; }
.pill { display: inline-block; font-size: 12px; font-weight: 650; color: var(--tc, var(--ink-2)); background: var(--t, var(--card)); border-radius: 999px; padding: 3px 10px; } /* спокойный цвет раздела: красный читался как предупреждение */

/* шапка разделов и переключатель «Листы альбома / Навыки» */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero h1 { font-size: 30px; line-height: 1.12; font-weight: 800; }
.hero p { margin: 6px 0 0; color: var(--muted); font-size: 15.5px; max-width: 520px; }
.hero-ic { width: 84px; height: 84px; flex: none; }
.hero-ic img { width: 100%; height: 100%; object-fit: contain; }
.top-tabs { display: inline-flex; gap: 4px; margin: 18px 0 6px; padding: 4px; background: var(--card); border-radius: 14px; }
.top-tabs a { padding: 8px 18px; border-radius: 10px; font-weight: 650; font-size: 14.5px; text-decoration: none; color: var(--ink-2); }
.top-tabs a.on { background: var(--ink); color: #fff; }
.top-tabs a:not(.on):hover { background: #e9ebef; }

/* «Листы альбома»: разделы, в разделе — пастельные плитки с иконкой */
.album-part { margin-top: 26px; }
.part-h { margin: 0 2px 12px; font-size: 18px; font-weight: 750; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 14px 16px; background: var(--t); border-radius: 20px; text-decoration: none; transition: transform .15s; }
.tile .ic { width: 72px; height: 72px; }
.tile .tt { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.tile:hover { transform: translateY(-2px); }
@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
  .tile { padding: 18px 16px 18px; }
  .tile .ic { width: 92px; height: 92px; }
  .tile .ic.paper { width: 112px; height: 80px; padding: 6px 12px; --fold: 17px; }
  .tile .tt { font-size: 15px; }
}

/* «Навыки»: разделы навыков, в разделе — плитки */
.skill-groups { display: flex; flex-direction: column; gap: 26px; margin-top: 22px; }
.sk-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
.sk-head h3 { margin: 0; font-size: 18px; font-weight: 750; }
.sk-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .sk-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; } }
.sk-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 84px; padding: 14px 14px 12px; background: var(--t); border-radius: 18px; text-decoration: none; transition: transform .15s; }
.sk-tile b { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.sk-tile small { font-size: 12.5px; color: var(--tc); font-weight: 600; }
.sk-tile:hover { transform: translateY(-2px); }

/* страница листа или навыка */
.page-top { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: calc(8px + var(--top)) 16px 8px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.page-top-inner { display: flex; align-items: center; gap: 4px; min-width: 0; }
.page-top .back { display: inline-flex; align-items: center; gap: 2px; padding: 6px 10px 6px 2px; margin-left: -4px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 15px; min-width: 0; }
.page-top .back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-top .back svg { width: 22px; height: 22px; stroke-width: 2; flex: none; }
.page-top .back:hover { background: var(--card); }
.page-top .pt-title { display: none; min-width: 0; font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-top.stuck { box-shadow: 0 1px 0 var(--line); }
.page-top.stuck .back span { display: none; }
.page-top.stuck .back { padding-right: 4px; }
.page-top.stuck .pt-title { display: block; }
.ph-text { min-width: 0; }
.ph-text .pill { margin-top: 10px; }
.sheet-head, .skill-head { display: flex; align-items: center; gap: 20px; margin: 6px 0 22px; }
.sheet-head h1, .skill-head h1 { font-size: 30px; line-height: 1.12; font-weight: 800; }
.sheet-head .kicker { font-size: 13.5px; font-weight: 700; color: var(--tc); margin-bottom: 4px; }
.sheet-head .lead { font-size: 16px; color: var(--ink-2); margin: 6px 0 0; }
/* навык — пастельная плашка раздела с иконкой справа: сразу видно, что это не лист */
.skill-head { background: var(--t); border-radius: 24px; padding: 20px 24px 22px; }
.skill-head .lead { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); margin: 8px 0 0; max-width: 720px; }
@media (max-width: 600px) {
  .ic.big { width: 72px; height: 72px; }
  .sheet-head { align-items: flex-start; gap: 14px; }
  .sheet-head h1, .skill-head h1 { font-size: 24px; }
  .skill-head { padding: 16px 18px 18px; }
  .sheet-head .ic.paper { width: 92px; height: 66px; padding: 5px 9px; --fold: 14px; }
  .hero h1 { font-size: 26px; }
  .hero-ic { width: 64px; height: 64px; }
}

.page-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.page-grid .main, .page-grid .side { min-width: 0; }
@media (min-width: 960px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
  .page-grid .side { order: 2; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; padding-bottom: 12px; }
  .page-grid .main { order: 1; }
}
@media (max-width: 959px) {
  .page-grid .side-last { order: 2; margin-top: 26px; }
  .page-grid .side-last + .main { order: 1; }
}
.main .block-label, .side .block-label { margin-top: 26px; }
.side > .block-label:first-child, .side-nav > .block-label:first-child { margin-top: 0; }
.main > .block-label:first-child { margin-top: 0; }
.block-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 0 2px 10px; }
.intro { font-size: 16px; line-height: 1.6; margin: 0; max-width: 720px; color: var(--ink-2); }
.xref { color: inherit; text-decoration: underline; text-decoration-color: rgba(22, 24, 29, .28); text-underline-offset: 3px; }
.xref:hover { text-decoration-color: var(--warm); color: var(--warm); }
/* иконка Archicad перед названием команды/инструмента в тексте шага; нажатие — подсказка .ac-pop */
.aci { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 0 3px 0 1px;
  padding: 0; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line); vertical-align: -5px; cursor: pointer; }
.aci img { width: 18px; height: 18px; display: block; }
.aci:hover, .aci.on { box-shadow: 0 0 0 1.5px var(--warm); }
.ac-pop { position: fixed; z-index: 60; max-width: min(340px, calc(100vw - 16px)); background: #fff; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 6px 24px rgba(22, 24, 29, .16), 0 0 0 1px var(--line); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ac-pop .ah { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14.5px; }
.ac-pop .ah img { width: 24px; height: 24px; }
.ac-pop .where { margin-top: 6px; color: var(--ink); }
.ac-pop .what { margin-top: 4px; color: var(--muted); }

/* образцы: на телефоне лентой вбок, на компьютере сеткой сбоку */
.samples { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.samples::-webkit-scrollbar { display: none; }
.sample { flex: 0 0 172px; width: 172px; min-width: 0; overflow: hidden; scroll-snap-align: start; text-decoration: none; background: var(--card); border-radius: 14px; padding: 6px 6px 9px; }
.sample .thumb { display: block; aspect-ratio: 1.414; background: #fff; border-radius: 9px; overflow: hidden; }
.sample img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sample .st { font-size: 12.5px; font-weight: 650; line-height: 1.3; margin: 7px 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sample .ss { display: block; font-size: 11.5px; color: var(--muted); margin: 2px 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 960px) {
  .samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .sample { width: auto; transition: transform .15s; }
  .sample:hover { transform: translateY(-2px); }
}

.toc { display: none; }
@media (min-width: 960px) {
  .toc { display: block; }
  .toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 9px; text-decoration: none; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
  .toc a span { flex: none; width: 18px; color: var(--warm); font-weight: 700; font-variant-numeric: tabular-nums; }
  .toc a:hover { background: var(--card); }
}

/* навыки на странице листа — чипы с точкой цвета их раздела */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 10px; font-size: 13.5px; line-height: 1.3; text-decoration: none; color: var(--ink); }
.chip { padding-left: 5px; }
a.chip:hover { border-color: var(--ink-2); }

/* шаги листа — маршрут: коралловые номера на пунктире, шаг — серая карточка */
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.step { position: relative; display: flex; gap: 14px; margin-bottom: 10px; scroll-margin-top: 64px; }
.step .sn { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--warm); color: #fff; font-weight: 750; font-size: 14.5px; display: flex; align-items: center; justify-content: center; margin-top: 14px; box-shadow: 0 0 0 4px var(--bg); }
.step .sb { flex: 1; min-width: 0; background: var(--card); border-radius: 18px; padding: 16px 18px 16px; }
.step h3, .tech h3 { margin: 0 0 5px; font-size: 16.5px; line-height: 1.35; font-weight: 700; }
.step p, .tech p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.tappable { cursor: pointer; transition: background .15s; }
.step .sb.tappable:hover { background: #eef0f3; }
.more-link { margin-top: 8px; padding: 2px 0; font-size: 14px; font-weight: 650; color: var(--warm); }
.see-also { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.step-more { margin-top: 2px; cursor: auto; }
.details { margin: 8px 0 0; padding: 0 0 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.details li { margin: 5px 0; }
.vids { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.vid { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 12px; background: #fff; text-decoration: none; max-width: 560px; }
.vid:hover { box-shadow: 0 2px 10px rgba(22, 24, 29, .08); }
.vid .play { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #e5483b; color: #fff; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.vid .play svg { width: 13px; height: 13px; margin-left: 2px; }
.vid .vt { min-width: 0; }
.vid .vt b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.vid .vt small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 600px) {
  .path::before { left: 12px; }
  .step { gap: 9px; }
  .step .sn { width: 26px; height: 26px; font-size: 13px; }
  .step .sb { padding: 13px 14px 14px; }
}

/* навык: приёмы — пастельные карточки раздела без номеров, в две колонки */
.tech-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tech { background: var(--t, var(--card)); border-radius: 18px; padding: 16px 18px; scroll-margin-top: 64px; }
.tech .vid { background: rgba(255, 255, 255, .8); }
/* листы, для которых нужен навык */
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: var(--t); border-radius: 14px; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.3; transition: transform .15s; }
.mini:hover { transform: translateY(-1px); }
/* все навыки деревом: раздел — раскрывается, текущий раскрыт */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group summary { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-weight: 650; font-size: 14px; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--card); }
.nav-group[open] summary { color: var(--tc); }
.nav-item { display: block; margin: 0 0 1px 46px; padding: 5px 10px; border-radius: 8px; font-size: 14px; line-height: 1.35; color: var(--ink-2); text-decoration: none; }
a.nav-item:hover { background: var(--card); }
.nav-item.on { background: var(--t); color: var(--ink); font-weight: 650; }
.nav-group[open] { padding-bottom: 6px; }
@media (max-width: 959px) { .side-nav { background: var(--card); border-radius: 18px; padding: 14px 8px 10px; } .side-nav > .block-label { margin-left: 10px; } }

.checklist { background: var(--card); border-radius: 18px; margin: 0; padding: 12px 18px 12px 36px; }
.checklist li { padding: 4px 0; font-size: 14.5px; line-height: 1.5; }
.main .empty-note { margin-top: 18px; }

/* все уроки — свёрнуто */
.all-lessons { margin-top: 26px; }
.all-lessons summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; background: var(--card); border-radius: 18px; font-weight: 650; }
.all-lessons summary::-webkit-details-marker { display: none; }
.all-lessons summary span { font-weight: 500; font-size: 13px; color: var(--muted); }
.all-lessons[open] summary { margin-bottom: 10px; }
.legend { font-size: 12.5px; color: var(--muted); margin: 0 2px 10px; }
.course { background: var(--card); border-radius: 18px; overflow: hidden; margin-bottom: 10px; }
.course .ch { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 16px 8px; }
.course .ch b { font-size: 14px; line-height: 1.3; }
.course .ch span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lesson { padding: 9px 16px 11px; border-top: 1px solid var(--line); }
.course .ch + .lesson { border-top: 0; }
.lesson .fl { font-size: 14px; font-weight: 550; line-height: 1.3; }
.lesson .len { color: var(--faint); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.jumps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.jump { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 8px; background: #fff; text-decoration: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.jump svg { width: 11px; height: 11px; color: #e5483b; }
.jump .tag { margin-left: 2px; }

/* образец крупно */
.zoom.lb { background: #1b1d21; overflow: hidden; touch-action: auto; display: flex; flex-direction: column; }
.lb-top { flex: none; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--top)) 12px 10px 16px; color: #fff; }
.lb-title { flex: 1; min-width: 0; }
.lb-title b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-title span { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { font-size: 13px; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-x { width: 38px; height: 38px; border-radius: 19px; background: rgba(255, 255, 255, .12); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.lb-x svg { width: 20px; height: 20px; stroke-width: 2; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px; overflow: hidden; }
.lb-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; cursor: zoom-in; border-radius: 2px; }
.lb-stage.full { display: block; overflow: auto; padding: 0; touch-action: pan-x pan-y pinch-zoom; }
.lb-stage.full img { max-width: none; max-height: none; width: 2000px; cursor: grab; }
.lb-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 22px; background: rgba(255, 255, 255, .14); color: #fff; display: none; align-items: center; justify-content: center; }
.lb-nav svg { width: 24px; height: 24px; stroke-width: 2; }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }
.lb-nav.next svg { transform: rotate(180deg); }
.lb-nav:hover { background: rgba(255, 255, 255, .24); }
@media (min-width: 720px) { .lb-nav { display: flex; } .lb-stage { padding: 0 72px; } .lb-stage.full { padding: 0; } }
.lb-note { flex: none; max-height: 22vh; overflow-y: auto; padding: 10px 16px calc(12px + var(--bottom)); color: rgba(255, 255, 255, .82); font-size: 13.5px; line-height: 1.45; }
.lb-note p { margin: 0 auto; max-width: 820px; }

/* вход на своём адресе: имя справа от переключателя, по нажатию — почта и «Выйти» */
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct { position: relative; }
.acct-btn { margin-top: 12px; padding: 8px 14px; border-radius: 12px; background: var(--card); font-weight: 600; font-size: 14px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: 0 8px 30px rgba(22, 24, 29, .16); }
.acct.open .acct-menu { display: block; }
.acct-menu b { display: block; font-size: 15px; }
.acct-menu span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.acct-menu button { margin-top: 10px; width: 100%; padding: 9px; border-radius: 10px; background: var(--card); font-weight: 600; text-align: center; }

/* «Изучено»: кнопка в шапке листа и навыка, галочка на плитке, счётчик под заголовком раздела */
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.head-actions .pill { margin-top: 0; }
.done-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 650; font-size: 13.5px; color: var(--ink-2); }
.done-btn:hover { border-color: var(--ink-2); }
.done-btn svg { width: 15px; height: 15px; stroke-width: 2.6; }
.done-btn.on { border-color: var(--sage); background: var(--sage); color: #fff; }
.tile, .sk-tile { position: relative; }
.tile.done::after, .sk-tile.done::after { content: ""; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.progress-slot { display: block; margin-top: 8px; font-size: 13.5px; font-weight: 650; color: var(--sage); }
.progress-slot:empty { display: none; }
.acct-btn.login { background: var(--ink); color: #fff; }
