:root {
  --ground: #e6e9de;
  --paper: #f5f6f0;
  --ink: #1a1f17;
  --muted: #5a6352;
  --rule: #cbd1bf;
  --accent: #14703f;
  --accent-soft: #d4e6d5;
  --warn: #9a4a1c;
  --warn-soft: #f1e2d6;
  --code-bg: #eceee5;
  --glass: #c3cbb2;
  --seg: #1b2017;
  --seg-off: rgba(27, 32, 23, .07);
  --hot: #a8551e;
  --hot-soft: #f3e3d3;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0f1117;
    --paper: #161a24;
    --ink: #e4e7ec;
    --muted: #949cae;
    --rule: #2b3244;
    --accent: #46d983;
    --accent-soft: #173826;
    --warn: #f0a46a;
    --warn-soft: #3a2616;
    --code-bg: #1c2130;
    --glass: #b9c2a6;
    --hot: #f0a46a;
    --hot-soft: #3a2616;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0f1117;
  --paper: #161a24;
  --ink: #e4e7ec;
  --muted: #949cae;
  --rule: #2b3244;
  --accent: #46d983;
  --accent-soft: #173826;
  --warn: #f0a46a;
  --warn-soft: #3a2616;
  --code-bg: #1c2130;
  --glass: #b9c2a6;
  --hot: #f0a46a;
  --hot-soft: #3a2616;
}

body { margin: 0; background: var(--ground); color: var(--ink); font: 18px/1.65 var(--sans); }
.page { max-width: 1360px; margin: 0 auto; padding-inline: 20px; padding-block: 12px 72px; }
html { scroll-padding-top: 76px; }

/* закреплённая полоса сверху: своя подложка — ничего не наезжает на текст */
.top { position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top, 0px); background: color-mix(in srgb, var(--ground) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top-in { max-width: 1360px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar-home { font: 600 17px/1.2 var(--cond); color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar-home:hover { color: var(--accent); }
.bar-r { display: flex; align-items: center; gap: 10px; flex: none; }
.theme { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; padding: 0; }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .ic-moon { fill: currentColor; stroke: none; }
.theme .ic-sun { display: none; }
:root[data-theme="dark"] .theme .ic-sun { display: block; }
:root[data-theme="dark"] .theme .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .ic-sun { display: block; }
  :root:not([data-theme="light"]) .theme .ic-moon { display: none; }
}
.theme:hover { color: var(--accent); }
.theme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.langs { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); padding: 3px; gap: 2px; }
.langs button { font: 600 13px/1 var(--cond); letter-spacing: .06em; border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.langs button.on { background: var(--ink); color: var(--paper); }
.langs button:focus-visible, .copy:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* шапка */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 32px; align-items: center; padding-block: 18px 34px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.eyebrow { font: 600 13px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font: 700 clamp(36px, 6vw, 60px)/1.02 var(--cond); letter-spacing: -.01em; margin: 0 0 14px; text-wrap: balance; }
.lead { font-size: 20px; color: var(--muted); margin: 0; max-width: 56ch; }
.device { background: #2a3141; border-radius: 18px; padding: 18px; box-shadow: inset 0 0 0 2px #3a4258, 0 12px 30px rgba(0,0,0,.18); }
.lcd { display: block; width: 100%; height: auto; background: var(--glass); border-radius: 6px; padding: 10px 12px; box-sizing: border-box; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), inset 0 2px 6px rgba(0,0,0,.18); }
.lcd .on, .lcd .colon rect { fill: var(--seg); }
.lcd .off { fill: var(--seg-off); }
.lcd .colon { animation: blink 1s steps(1, end) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lcd .colon { animation: none; } }

/* раскладка */
.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); max-height: calc(100vh - 100px); overflow: auto; font-size: 16px; line-height: 1.35; padding-right: 6px; }
.toc-h { font: 600 13px/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc > ol > li { margin-bottom: 9px; }
.toc > ol > li > a { font-weight: 600; color: var(--ink); }
.toc ol ol { display: none; margin: 6px 0 4px 10px; border-left: 1px solid var(--rule); padding-left: 12px; }
.toc li.open > ol { display: block; }
.toc ol ol a { color: var(--muted); font-size: 15px; display: block; padding: 3px 0; }
.toc a { text-decoration: none; }
.toc a:hover, .toc a.here { color: var(--accent); }
main { min-width: 0; max-width: 980px; }

/* урок */
.lesson { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 36px 40px 40px; margin-bottom: 30px; }
.lesson-title { font: 700 clamp(30px, 3.8vw, 40px)/1.1 var(--cond); margin: 0 0 16px; text-wrap: balance; }
.lesson h3 { font: 600 26px/1.25 var(--cond); margin: 34px 0 10px; text-wrap: balance; scroll-margin-top: 80px; }
.lesson h4 { font: 600 19px/1.3 var(--sans); margin: 24px 0 8px; scroll-margin-top: 80px; }
.lesson p { margin: 0 0 16px; }
.lesson ul, .lesson ol { margin: 0 0 16px; padding-left: 22px; }
.lesson li { margin-bottom: 6px; }
.lesson hr { border: 0; border-top: 1px dashed var(--rule); margin: 26px 0; }
.lesson strong { font-weight: 600; }
.lesson a { color: var(--accent); }
.lesson code { font: 500 .88em/1 var(--mono); background: var(--code-bg); padding: .12em .36em; border-radius: 4px; white-space: nowrap; }
.lesson blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.warn-mark { color: var(--warn); font-weight: 700; }

/* таблицы сборки */
.tbl { overflow-x: auto; margin: 6px 0 18px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.tbl table { border-collapse: collapse; width: 100%; font: 15px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font: 600 13px/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--code-bg); padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.tbl td { padding: 7px 14px; vertical-align: top; border-top: 1px solid transparent; }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--code-bg) 45%, transparent); }
.tbl tr.grp td { border-top-color: var(--rule); }
.tbl tbody tr.grp:first-child td { border-top-color: transparent; }
.tbl td:first-child { font-weight: 600; white-space: nowrap; }
.tbl td.note { color: var(--accent); font-family: var(--sans); font-size: 15px; white-space: nowrap; }
.tbl td.span { font-family: var(--cond); font-weight: 600; letter-spacing: .05em; color: var(--muted); text-transform: none; background: var(--code-bg) !important; }

/* иллюстрации-схемы */
.ill { margin: 10px 0 22px; }
.ill-box { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 12px; color: var(--ink); overflow-x: auto; }
.ill svg { display: block; width: 100%; min-width: 520px; height: auto; }
.ill figcaption { font-size: 16px; line-height: 1.5; color: var(--muted); margin-top: 8px; }
.ill .w, .ill .wv { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.ill .w.hot, .ill .wv.hot { stroke: var(--hot); stroke-width: 2.4; }
.ill .dsh { stroke-dasharray: 5 4; }
.ill .jd { fill: currentColor; }
.ill .jd.hot, .ill .ahd.hot { fill: var(--hot); }
.ill .ahd { fill: currentColor; }
.ill .bx, .ill .gt { fill: var(--paper); stroke: currentColor; stroke-width: 1.6; }
.ill .bx.hot, .ill .gt.hot { fill: var(--hot-soft); stroke: var(--hot); stroke-width: 2; }
.ill .t { font: 500 13px var(--mono); fill: currentColor; dominant-baseline: auto; }
.ill .t.b { font-weight: 600; font-size: 14px; }
.ill .t.s { font-size: 11.5px; }
.ill .t.m { fill: var(--muted); }
.ill .t.h { fill: var(--hot); }
.ill .bus { fill: var(--paper); stroke: currentColor; stroke-width: 1.2; }
.ill .bus.hot { fill: var(--hot-soft); stroke: var(--hot); }
.ill .pulse { fill: var(--hot); opacity: .22; }
.ill .em { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; }
.ill .glass { fill: var(--glass); }
.ill .ch { stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.ill .ch.g { stroke-width: 2; }
.ill .ch.hot { stroke: var(--hot); }
.ill .ch.off { stroke: var(--muted); stroke-dasharray: 3 5; }
.ill .rl { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ill .sg { fill: rgba(27, 32, 23, .08); }
.ill .sg.on { fill: var(--seg); }

/* игра в «Перед началом» */
.game-embed { margin: 8px 0 20px; }

/* экран главы 2 (точки ЖК) */
.scr .bgd { fill: rgba(27, 32, 23, .26); }
.scr .on { fill: var(--seg); }
.scr .off { fill: rgba(27, 32, 23, .06); }
.lcd.scr { padding: 8px; }
.ill-box.scrbox { background: var(--glass); }
.scrbox svg.scr { display: block; width: 100%; height: auto; min-width: 0; }
details.reveal { margin: 10px 0 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
details.reveal > summary { cursor: pointer; padding: 9px 14px; font: 600 15px/1.3 var(--sans); color: var(--accent); list-style: none; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal > summary::before { content: '▸'; display: inline-block; width: 1.1em; transition: transform .15s; }
details.reveal[open] > summary::before { transform: rotate(90deg); }
details.reveal > :not(summary) { margin: 0 14px 12px; }
details.reveal.hint p { margin: 0 14px 10px; }
.scr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .scr-grid { grid-template-columns: 1fr; } }
.scr-cell .ill-box { padding: 8px; }
.scr-cap { font-size: 15px; line-height: 1.4; color: var(--muted); margin-top: 6px; text-align: center; }
.scrbox .pix { display: block; width: 100%; max-width: 576px; height: auto; margin: 0 auto; image-rendering: pixelated; }
.map .nm { font: 600 3.1px var(--mono); fill: #a8551e; }
.map .nm.dg { font-size: 3.4px; }
.ill .cell { fill: none; stroke: currentColor; stroke-width: 1.2; }
.ill .cell.on { fill: var(--hot); stroke: var(--hot); }

/* оглавление: заголовки глав */
.toc .toc-group { font: 600 13px/1.2 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 16px 0 8px; }

/* все детали (как в LEGO) */
.pack { margin: 22px 0 26px; }
.pk { display: flex; align-items: baseline; gap: 12px; }
.pknum { font: 700 12px/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); background: var(--ink); padding: 5px 9px; border-radius: 6px; }
.pkh { font: 600 24px/1.2 var(--cond); margin: 0; }
.pknote { color: var(--muted); font-size: 16px; margin: 6px 0 12px; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 10px; }
.pcard { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 10px 12px; text-align: center; }
.pcard .pic { display: block; width: 80px; height: 60px; margin: 0 auto 4px; color: var(--ink); }
.pcard .pn { font: 700 22px/1.1 var(--cond); font-variant-numeric: tabular-nums; }
.pcard .pname { font: 600 14.5px/1.25 var(--mono); margin-top: 3px; word-break: break-word; }
.pcard .psub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.pic .w, .pic .wv { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.pic .w.hot { stroke: var(--hot); stroke-width: 2.2; }
.pic .bx, .pic .gt { fill: var(--paper); stroke: currentColor; stroke-width: 1.6; }
.pic .gt.hot { fill: var(--hot-soft); stroke: var(--hot); }
.pic .t { font: 600 11px var(--mono); fill: currentColor; }
.pic .t.h { fill: var(--hot); }
.pic .t.s { font-size: 10px; }
.pic .ch { stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.pic .ch.off { stroke: currentColor; stroke-dasharray: none; }
.pic .ch.g { stroke-width: 2; }
.pic .rl { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pic .jd { fill: currentColor; }
.pic .glass { fill: var(--glass); }
.pic .sg { fill: rgba(27, 32, 23, .1); }
.pic .sg.on { fill: var(--seg); }

/* блоки кода */
.code { position: relative; margin: 6px 0 18px; }
.code .ln { display: block; white-space: pre; min-height: 1.5em; }
.code.fig .ln { min-height: 1.25em; }
.segfig { margin: 8px 0 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.segbox { background: var(--glass); border-radius: 10px; padding: 14px 22px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), inset 0 2px 6px rgba(0,0,0,.15); }
.segbox svg { display: block; width: 150px; height: auto; }
.segfig .sg { fill: var(--seg); }
.segfig .sl { font: 600 15px var(--mono); fill: #1b2017; text-anchor: middle; dominant-baseline: middle; }
.segfig figcaption { font-size: 16px; color: var(--muted); }
.code pre { margin: 0; overflow-x: auto; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; font: 15px/1.5 var(--mono); }
.code.fig pre { line-height: 1.25; }
.code.net pre { max-height: 420px; }
.copy { position: absolute; top: 8px; right: 8px; font: 600 13px/1 var(--cond); letter-spacing: .05em; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.copy.done { color: var(--accent); border-color: var(--accent); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }   /* на узком экране — полное содержание в начале курса */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .device { max-width: 420px; }
}
@media (max-width: 520px) {
  .page { padding-inline: 16px; }
  .top-in { padding: 0 16px; height: 52px; }
  .bar-home { font-size: 15px; }
  .lesson { padding: 22px 18px 24px; border-radius: 12px; }
  body { font-size: 17px; }
}

/* полное содержание в начале курса (как в книге) */
.contents .cgroup { font: 600 14px/1.2 var(--cond); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 30px 0 12px; }
.contents .cgroup:first-of-type { margin-top: 8px; }
.contents ol { list-style: none; margin: 0; padding: 0; }
.contents > ol > li { margin: 0 0 18px; }
.contents .cl { font: 600 21px/1.3 var(--cond); color: var(--ink); text-decoration: none; }
.contents .cl:hover { color: var(--accent); }
.contents ol ol { margin: 6px 0 0; padding-left: 16px; border-left: 2px solid var(--rule); }
.contents ol ol li { margin: 0; }
.contents ol ol a { color: var(--muted); text-decoration: none; display: block; padding: 2px 0; }
.contents ol ol a:hover { color: var(--accent); }
.toc-h a { color: inherit; text-decoration: none; }
.toc-h a:hover { color: var(--accent); }

/* две ширины: текст — узкой колонкой (~65–70 знаков), таблицы/схемы/нетлисты — на всю ширину блока (до 900px) */
.lesson > p, .lesson > ul, .lesson > ol, .lesson > h3, .lesson > h4, .lesson > blockquote, .lesson > .lesson-title,
.contents > ol, .contents > .cgroup, .lesson figcaption, .pknote { max-width: 680px; }

/* снимки экрана симулятора с номерами-выносками */
.ill.shot .shot-box { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); background: #111; }
.ill.shot img { display: block; width: 100%; height: auto; }
.ill.shot .shot-ov { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; }
.ill.shot .shot-ov circle { fill: #e8833a; stroke: #fff; stroke-width: 4; }
.ill.shot .shot-ov line { stroke: #e8833a; stroke-width: 4; }
.ill.shot .shot-ov circle.tip { fill: #e8833a; stroke: #fff; stroke-width: 2; }
.ill.shot .shot-ov text { fill: #fff; font: 700 26px var(--sans); text-anchor: middle; }
.shot-leg { list-style: none; margin: 10px 0 4px; padding: 0; columns: 2 300px; column-gap: 28px; font-size: 15.5px; line-height: 1.4; }
.shot-leg li { break-inside: avoid; margin: 0 0 6px; }
.shot-leg b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e8833a; color: #fff; font-size: 13px; margin-right: 6px; }

.ill.shot.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ill.shot.pair figcaption { grid-column: 1 / -1; }
.ill.shot.pair .shot-cell p { font-size: 15px; color: var(--muted); margin: 6px 2px 0; line-height: 1.4; }
@media (max-width: 600px) { .ill.shot.pair { grid-template-columns: 1fr; } }
/* прибор игры главы 2 — свой «предметный» вид, цвета заданы явно (одинаков в светлой и тёмной теме) */
.shx { --shx-shell: #cfc8b8; --shx-shell-dk: #a59d8b; --shx-bezel: #2f3440; --shx-glass: #bfc8ac; --shx-btn: #c4452c; --shx-btn-dk: #8e2f1d; --shx-label: #4d4636;
  background: linear-gradient(180deg, var(--shx-shell), var(--shx-shell-dk)); border-radius: 22px; padding: 18px 16px 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.shx-side { display: grid; gap: 22px; justify-items: center; }
.shx-screen { background: var(--shx-bezel); border-radius: 12px; padding: 12px; box-shadow: inset 0 2px 8px rgba(0,0,0,.5); }
.shx-lcd { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--shx-glass); touch-action: none; }
.shx-pad { width: 64px; height: 64px; border-radius: 50%; border: 0; background: radial-gradient(circle at 40% 35%, #e0674c, var(--shx-btn) 55%, var(--shx-btn-dk));
  box-shadow: 0 4px 0 #5b1d12, 0 6px 10px rgba(0,0,0,.35); cursor: pointer; color: #fbe9e3; font: 600 12px/1 "IBM Plex Mono", ui-monospace, monospace; touch-action: none; }
.shx-pad.on, .shx-pad:active { transform: translateY(3px); box-shadow: 0 1px 0 #5b1d12, 0 2px 4px rgba(0,0,0,.35); }
.shx-pad:focus-visible, .shx-start:focus-visible { outline: 2px solid #e9b949; outline-offset: 3px; }
.shx-padlbl { font: 500 11px/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--shx-label); letter-spacing: .08em; margin-top: -14px; }
.shx-under { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-inline: 6px; }
.shx-brand { font: 700 15px/1 "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--shx-label); }
.shx-brand span { color: var(--shx-btn-dk); }
.shx-start { border: 0; border-radius: 999px; padding: 9px 18px; background: #3a3f4a; color: #f1eee6; font: 600 12px/1 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .12em; cursor: pointer; box-shadow: 0 3px 0 #1f2228; }
.shx-start:active { transform: translateY(2px); box-shadow: 0 1px 0 #1f2228; }
@media (max-width: 720px) {
  .shx { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 14px 12px 12px; }
  .shx-screen { grid-column: 1 / -1; grid-row: 1; }
  .shx-side { grid-row: 2; grid-template-columns: auto auto; gap: 14px; }
  .shx-side.r { justify-self: end; }
  .shx-padlbl { display: none; }
  .shx-pad { width: 58px; height: 58px; }
}

.toc a .lock, .contents a .lock, .pager .lock { width: .8em; height: .8em; margin-left: .35em; vertical-align: -.05em; fill: none; stroke: currentColor; stroke-width: 2.2; opacity: .55; }
.pager { display: flex; justify-content: space-between; gap: 14px; margin: 8px 0 30px; }
.pager a { flex: 1 1 0; max-width: 48%; border: 1px solid var(--rule); background: var(--paper); border-radius: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; font: 600 17px/1.3 var(--cond); }
.pager a span { display: block; font: 500 13px/1.2 var(--sans); color: var(--muted); margin-bottom: 4px; }
.pager a.next { margin-left: auto; text-align: right; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-style: normal; color: var(--muted); margin: 0 .45em; }
.crumbs a:last-child:not(:first-child) { font-weight: 500; }
.langs a { font: 600 13px/1 var(--cond); letter-spacing: .06em; color: var(--muted); padding: 7px 14px; border-radius: 999px; text-decoration: none; }
.langs a.on { background: var(--ink); color: var(--paper); }
.langs a:hover:not(.on) { color: var(--ink); }
.stuck { margin: 18px 0 6px; font-size: 16px; color: var(--muted); }
.stuck a { color: var(--accent); font-weight: 600; }
footer.legal { font-size: 14px; color: var(--muted); padding: 0 4px 20px; }
footer.legal a { color: var(--muted); }
.pics-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 7px 14px 7px 10px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; font: 600 15px/1 var(--cond); }
.pics-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pics-link:hover { border-color: var(--accent); color: var(--accent); }
.pics-top { margin: 0 0 18px; font-size: 16px; }
.sheets .sheet { background: #fff; border-radius: 8px; overflow: hidden; margin: 0 0 18px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.08); }
.sheets .sheet svg { display: block; width: 100%; height: auto; }
