/* ===== Требования к инфраструктуре WMS 2.0 ===== */
.infra { --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace; --hl: color-mix(in srgb, var(--tape) 26%, var(--panel)); }
.i-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--tape); z-index: 20; }
.eyebrow { font: 700 12px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: 16px; }

/* шапка документа */
.i-mast { padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line);
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px);
  background-size: 120px 120px; background-position: -1px -1px; }
.i-mast h1 { font-size: clamp(27px, 5.2vw, 64px); letter-spacing: -0.035em; line-height: 1.04; max-width: 15ch; }
.i-lede { margin-top: 20px; max-width: 46em; color: var(--steel); font-size: clamp(17px, 1.5vw, 19px); }
.i-meta { margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.i-meta div { background: var(--panel); padding: 14px 16px; }
.i-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); }
.i-meta dd { margin: 4px 0 0; font-weight: 500; font-size: 15px; }
@media (max-width: 900px) { .i-meta { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .i-meta { grid-template-columns: 1fr; } }

.i-sizer { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.i-sizer__label { font-weight: 600; margin-right: 4px; }
.i-sizer button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--panel); color: var(--ink); font: 700 16px var(--f-display); cursor: pointer; transition: background .2s; }
.i-sizer button small { font: 500 13px var(--f-text); color: var(--steel); }
.i-sizer button[aria-pressed="true"] { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.i-sizer button[aria-pressed="true"] small { color: var(--tape-ink); }
.i-sizer__hint { flex-basis: 100%; font-size: 14px; color: var(--steel); }
.i-mast__actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }

/* раскладка: оглавление + текст */
.i-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-top: clamp(32px, 5vw, 56px); padding-bottom: 96px; }
.i-toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
.i-toc__title { font: 700 12px var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--steel); margin-bottom: 10px; }
.i-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.i-toc a { display: grid; grid-template-columns: 26px 1fr; padding: 5px 10px 5px 12px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--steel); line-height: 1.35; }
.i-toc a span { font: 600 12px var(--mono); padding-top: 1px; }
.i-toc a:hover { color: var(--ink); }
.i-toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--tape); }
.i-toc__check { margin-top: 18px; padding: 14px; background: var(--panel); border-radius: 6px; display: grid; gap: 8px; }
.i-toc__check span { font-weight: 600; }
.i-toc__check b { font: 600 13px var(--mono); color: var(--steel); }
.i-bar { height: 8px; border-radius: 4px; background: var(--floor-2); overflow: hidden; }
.i-bar i { display: block; height: 100%; width: 0; background: var(--tape); border-radius: 4px; transition: width .35s ease; }
.i-bar--big { height: 14px; border-radius: 7px; flex: 1; }
@media (max-width: 1000px) { .i-layout { grid-template-columns: 1fr; } .i-toc { display: none; } }

/* секции */
.i-doc { min-width: 0; }
.i-sec { padding: 0 0 clamp(48px, 6vw, 72px); scroll-margin-top: 84px; }
.i-sec + .i-sec { padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line); }
.i-sec h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.025em; margin-bottom: 18px; }
.i-sec h2 em { font-style: normal; text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 5px; text-underline-offset: 4px; }
.i-num { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; border-radius: 4px; background: var(--tape); color: var(--tape-ink); font: 700 18px var(--f-display); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.i-sec h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: clamp(18px, 1.8vw, 22px); margin: 32px 0 12px; }
.i-sec p { margin: 12px 0; max-width: 52em; }
.i-sec code, .i-formula code { font: 500 .9em var(--mono); background: var(--floor-2); padding: 2px 6px; border-radius: 3px; }

.lv { display: inline-block; vertical-align: middle; font: 600 12px/1 var(--f-text); padding: 6px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em; }
.lv--must { background: var(--ink-bg); color: var(--tape); }
.lv--rec { background: var(--tape); color: var(--tape-ink); }
.lv--opt { background: var(--floor-2); color: var(--ink); border: 1px solid var(--line); }
td .lv { margin: 0 6px 4px 0; }

.i-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
.i-levels div { background: var(--panel); border-radius: 6px; padding: 16px; }
.i-levels p { margin: 10px 0 0; font-size: 15px; color: var(--steel); }
@media (max-width: 700px) { .i-levels { grid-template-columns: 1fr; } }

/* таблицы */
.tscroll { overflow-x: auto; margin: 16px 0; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); }
.t { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.t th { text-align: left; font-size: 13px; font-weight: 600; color: var(--steel); background: var(--floor); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t td:first-child { font-weight: 600; }
.t [data-sz] { text-align: center; white-space: nowrap; transition: background .25s, color .25s; }
.t th[data-sz] { font: 700 14px var(--f-display); color: var(--ink); }
body[data-size="S"] .t [data-sz="S"], body[data-size="M"] .t [data-sz="M"], body[data-size="L"] .t [data-sz="L"] { background: var(--hl); font-weight: 700; }
body[data-size="S"] .t th[data-sz="S"], body[data-size="M"] .t th[data-sz="M"], body[data-size="L"] .t th[data-sz="L"] { background: var(--tape); color: var(--tape-ink); }
body[data-size="S"] tr[data-row="S"] td, body[data-size="M"] tr[data-row="M"] td, body[data-size="L"] tr[data-row="L"] td { background: var(--hl); }
.t--risk td:first-child { color: #B23A2A; }
.t--resp td:nth-child(2), .t--resp td:nth-child(3) { color: var(--steel); }

/* схема */
.i-arch { margin: 20px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: clamp(8px, 2vw, 20px); }
.i-arch svg { display: block; width: 100%; height: auto; }
.a-zone { fill: color-mix(in srgb, var(--tape) 6%, var(--floor)); stroke: var(--tape); stroke-width: 2; stroke-dasharray: 10 8; }
.a-zonelbl { font: 600 13px var(--f-text); fill: var(--steel); }
.a-link use { fill: none; stroke: var(--line); stroke-width: 3; }
.a-tunnel { fill: none; stroke: var(--steel); stroke-width: 3; stroke-dasharray: 2 6; stroke-linecap: round; }
.a-node rect { fill: var(--panel); stroke: var(--ink); stroke-width: 2; }
.a-node--core rect { fill: var(--tape); stroke: var(--tape); }
.a-node--core .a-t, .a-node--core .a-s { fill: #1B2330; }
.a-node--ext rect { fill: var(--floor-2); stroke: var(--steel); stroke-dasharray: 5 4; }
.a-node--dev rect { fill: #1B2330; stroke: #1B2330; }
.a-node--dev .a-t { fill: #F5C400; }
.a-node--dev .a-s { fill: #C9CEC8; }
.a-t { font: 700 15px var(--f-display); fill: var(--ink); }
.a-t--sm { font-size: 13px; }
.a-s { font: 500 12px var(--f-text); fill: var(--steel); }
.a-s--b { font-weight: 600; fill: var(--ink); }
.a-lbl { font: 500 12px var(--f-text); fill: var(--steel); }
.a-wifi path { fill: none; stroke: var(--tape); stroke-width: 4; stroke-linecap: round; }
.a-wifi circle { fill: var(--tape); }
.a-pkt { fill: var(--tape); stroke: #1B2330; stroke-width: 1.5; }
.a-pkt--db { fill: #3BB273; }
.a-pkt--ext { fill: var(--panel); stroke: var(--ink); }
.a-pkt--dep { fill: var(--steel); stroke: var(--ink); }

/* блоки */
.i-facts { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: f; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.i-facts li { counter-increment: f; position: relative; background: var(--panel); border-radius: 6px; padding: 18px 18px 18px 58px; font-size: 15px; color: var(--steel); }
.i-facts li::before { content: counter(f); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-bg); color: var(--tape); font: 700 13px var(--f-display); }
.i-facts b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 16px; }
@media (max-width: 700px) { .i-facts { grid-template-columns: 1fr; } }

.i-nope { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.i-nope li { position: relative; background: var(--panel); border-radius: 6px; padding: 14px 14px 14px 46px; font-size: 15px; color: var(--steel); }
.i-nope li::before { content: ''; position: absolute; left: 14px; top: 16px; width: 20px; height: 20px; border-radius: 50%; background: var(--floor-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 6l8 8M14 6l-8 8' stroke='%235D6B7A' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px; }
.i-nope b { display: block; color: var(--ink); }

.i-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.i-card { background: var(--panel); border-radius: 6px; padding: 18px; border-top: 4px solid var(--line); }
.i-card--hot { border-top-color: var(--tape); }
.i-card--warn { border-top-color: #C0392B; }
.i-card b { font: 700 18px var(--f-display); }
.i-card p { margin: 8px 0 0; font-size: 15px; color: var(--steel); }
@media (max-width: 640px) { .i-cards { grid-template-columns: 1fr; } }

.i-list { margin: 12px 0; padding: 0; list-style: none; max-width: 52em; }
.i-list li { position: relative; padding: 6px 0 6px 24px; }
.i-list li::before { content: ''; position: absolute; left: 0; top: 15px; width: 10px; height: 10px; background: var(--tape); border-radius: 1px; }
.i-list--ok li::before { background: #3BB273; border-radius: 50%; }
.i-warn { padding: 14px 18px; border-left: 4px solid #C0392B; background: color-mix(in srgb, #C0392B 8%, var(--panel)); border-radius: 0 6px 6px 0; }
.i-note { font-size: 14px; color: var(--steel); }

.i-code { position: relative; margin: 16px 0; }
.i-code pre { margin: 0; padding: 18px 20px; overflow-x: auto; background: #10151C; color: #E8EBEE; border-radius: 8px; font: 13px/1.6 var(--mono); }
.i-code .c { color: #8C99A6; }
.i-copy { font: 600 13px var(--f-text); padding: 6px 12px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.i-code .i-copy { position: absolute; top: 10px; right: 10px; background: #2A3340; color: #E8EBEE; border-color: #3A4757; }

.i-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.i-kpis div { background: var(--panel); border-radius: 6px; padding: 16px; display: grid; gap: 4px; border-top: 4px solid var(--tape); }
.i-kpis b { font: 700 clamp(18px, 2vw, 24px) var(--f-display); letter-spacing: -0.02em; }
.i-kpis span { font-size: 14px; color: var(--steel); }
@media (max-width: 800px) { .i-kpis { grid-template-columns: 1fr 1fr; } }

.i-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.i-flow div { background: var(--panel); border-radius: 6px; padding: 16px 18px; }
.i-flow b { font: 700 16px var(--f-display); }
.i-flow p { margin: 6px 0 0; font-size: 15px; color: var(--steel); }
@media (max-width: 640px) { .i-flow { grid-template-columns: 1fr; } }

.i-path { margin: 16px 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 10px; }
.i-path li { counter-increment: p; display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--panel); border-radius: 6px; padding: 16px; color: var(--steel); font-size: 15px; }
.i-path li::before { content: counter(p); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tape); color: var(--tape-ink); font: 700 16px var(--f-display); }
.i-path b { display: block; color: var(--ink); font-size: 16px; }

/* демонстрация работы без связи */
.i-demo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; margin: 18px 0 8px; padding: 18px; background: var(--ink-bg); border-radius: 10px; color: #E8EBEE; }
.i-demo__tsd { display: grid; gap: 12px; }
.d-scr { background: #F4F6F2; color: #1B2330; border-radius: 10px; border: 8px solid #2A3340; min-height: 260px; display: flex; flex-direction: column; overflow: hidden; }
.d-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #1B2330; color: #F5C400; font: 700 14px var(--f-display); }
.d-net { font: 600 12px var(--f-text); color: #3BB273; }
.d-net.is-off { color: #FF6B5B; }
.d-q { padding: 8px 12px; font-size: 13px; font-weight: 600; background: #DDE2DA; }
.d-q.is-wait { background: #F5C400; }
.d-log { list-style: none; margin: 0; padding: 6px 12px; display: grid; gap: 4px; font-size: 13px; align-content: start; }
.d-log li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; background: #fff; border-radius: 4px; animation: d-in .3s ease-out; }
.d-log li span:last-child { font-weight: 600; white-space: nowrap; }
.d-log li.is-wait span:last-child { color: #A56A00; }
.d-log li.is-ok span:last-child { color: #1D7A48; }
@keyframes d-in { from { opacity: 0; transform: translateY(-6px); } }
.d-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d-btns .btn { justify-content: center; padding: 0 10px; font-size: 14px; }
.d-btns .btn--line { border-color: #E8EBEE; color: #E8EBEE; }
.d-btns .btn--line:hover { background: #2A3340; }
.d-btns .btn--line.is-off { background: #C0392B; border-color: #C0392B; }
.i-demo__srv { background: #10151C; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-srv__t { margin: 0 !important; font: 700 13px var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: #8C99A6; }
.d-srv__n { margin: 0 !important; display: flex; align-items: baseline; gap: 10px; }
.d-srv__n b { font: 700 30px var(--f-display); color: #F5C400; min-width: 1.6em; }
.d-srv__n span { color: #A3AFBB; font-size: 14px; }
.d-srv__log { list-style: none; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid #2A3340; display: grid; gap: 3px; font: 12px/1.5 var(--mono); color: #A3AFBB; max-height: 170px; overflow: hidden; }
.d-srv__log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: d-in .3s ease-out; }
.d-srv__log .ok { color: #3BB273; }
.d-srv__log .dup { color: #F5C400; }
@media (max-width: 760px) { .i-demo { grid-template-columns: 1fr; } }

/* калькулятор */
.i-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 1fr); gap: 20px; align-items: center; margin: 18px 0; padding: 20px; background: var(--panel); border-radius: 10px; border: 1px solid var(--line); }
.i-calc label { display: grid; gap: 10px; font-weight: 600; }
.i-calc label span { display: flex; justify-content: space-between; }
.i-calc output { font: 700 20px var(--f-display); }
.i-calc input[type="range"] { width: 100%; accent-color: var(--tape); height: 28px; }
.i-calc__res { background: var(--ink-bg); color: #E8EBEE; border-radius: 8px; padding: 16px 18px; }
.i-calc__res > p:first-child { margin: 0; font-size: 16px; }
.i-calc__res > p:first-child b { font: 700 40px var(--f-display); color: var(--tape); letter-spacing: -0.03em; }
.i-calc__res > span { font-size: 13px; color: #A3AFBB; }
.i-calc__size { margin: 10px 0 0 !important; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.i-calc__size b { font: 700 16px var(--f-display); color: var(--tape); }
.i-calc__apply { font: 600 13px var(--f-text); background: none; border: 0; border-bottom: 1px dashed #A3AFBB; color: #E8EBEE; padding: 2px 0; cursor: pointer; }
@media (max-width: 800px) { .i-calc { grid-template-columns: 1fr; } }
.i-formula code { display: inline-block; white-space: normal; }

/* чек-лист */
.i-check__bar { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.i-check__bar b { font: 700 15px var(--mono); white-space: nowrap; }
.i-check { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.i-check fieldset { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 8px 16px 12px; min-width: 0; }
.i-check legend { font: 700 14px var(--f-display); padding: 0 6px; }
.i-check label { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; cursor: pointer; }
.i-check label:last-child { border-bottom: 0; }
.i-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--tape); cursor: pointer; }
.i-check label:has(input:checked) { color: var(--steel); text-decoration: line-through; text-decoration-color: var(--tape); text-decoration-thickness: 2px; }
.sz-now { font-family: var(--f-display); }
@media (max-width: 800px) { .i-check { grid-template-columns: 1fr; } }
.i-done { margin-top: 16px; padding: 18px 20px; border-radius: 8px; background: var(--tape); color: var(--tape-ink); animation: d-in .4s ease-out; }
.i-done a { font-weight: 600; }
.i-sign { margin-top: 28px !important; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--steel); font-size: 15px; }

@media (prefers-reduced-motion: reduce) { .i-bar i, .d-log li, .d-srv__log li { transition: none; animation: none; } }

/* печать: документ без интерфейса */
@media print {
  .top, .foot, .i-toc, .i-progress, .i-sizer, .i-mast__actions, .i-copy, .d-btns, .skip, .i-calc__apply { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .i-mast { background: none; padding: 0 0 12pt; }
  .i-layout { display: block; padding: 0; }
  .i-sec { break-inside: auto; padding: 12pt 0 !important; }
  .i-sec h2, .i-sec h3 { break-after: avoid; }
  .tscroll { overflow: visible; border-color: #999; }
  .t { min-width: 0; }
  .i-check label:has(input:checked) { text-decoration: none; color: #000; }
  .i-arch, .i-demo { break-inside: avoid; }
}

/* ===== Телефон: плашка текущего раздела внизу, содержание — шторка снизу ===== */
.i-toc__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.i-toc__top .i-toc__title { margin-bottom: 10px; }
.i-toc__close, .i-scrim, .i-tocbar { display: none; }
@media (max-width: 1000px) {
  html.is-locked, html.is-locked body { overflow: hidden; }
  .i-tocbar {
    display: flex; align-items: center; gap: 12px; position: fixed; z-index: 6; left: 0; right: 0; bottom: 0;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); min-height: 64px;
    border: 0; background: var(--ink-bg); color: var(--ink-fg); font: inherit; text-align: left; cursor: pointer;
    box-shadow: 0 -8px 24px rgba(10,14,20,.2); transform: translateY(110%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  }
  .i-tocbar.is-on { transform: none; }
  .i-tocbar:focus-visible { outline: 3px solid var(--tape); outline-offset: -3px; }
  .i-tocbar__n { flex: none; display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 4px; background: var(--tape); color: var(--tape-ink); font: 700 15px var(--f-display); }
  .i-tocbar__t { display: grid; flex: 1; min-width: 0; }
  .i-tocbar__t b { font: 600 15px var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .i-tocbar__t span { font-size: 13px; color: var(--ink-muted); }
  .i-tocbar svg { width: 16px; height: 16px; flex: none; color: var(--tape); }
  .foot { padding-bottom: calc(36px + 64px + env(safe-area-inset-bottom)); }

  .i-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 7; background: rgba(15, 19, 24, .5); animation: i-fade .2s ease-out; }
  @keyframes i-fade { from { opacity: 0; } }
  .i-toc.is-sheet {
    display: grid; align-content: start; position: fixed; z-index: 8; top: auto; left: 0; right: 0; bottom: 0;
    max-height: min(80dvh, 720px); overflow-y: auto; overscroll-behavior: contain; font-size: 16px;
    padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--panel); border-radius: 14px 14px 0 0;
    box-shadow: 0 -16px 40px rgba(10,14,20,.3); animation: i-up .28s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes i-up { from { transform: translateY(100%); } }
  .i-toc.is-sheet::before { content: ''; justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 4px; }
  .i-toc.is-sheet .i-toc__top { position: sticky; top: -8px; background: var(--panel); z-index: 1; }
  .i-toc.is-sheet .i-toc__close { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
  .i-toc.is-sheet a { min-height: 44px; align-items: center; grid-template-columns: 32px 1fr; }
  .i-toc.is-sheet a span { padding-top: 0; }
  .i-toc.is-sheet a.is-active { background: color-mix(in srgb, var(--tape) 16%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .i-tocbar, .i-toc.is-sheet, .i-scrim:not([hidden]) { transition: none; animation: none; } }
