/* Layout: sticky table of contents on the left, one reading column on the right; product colours of Univerium. */
:root {
  --bg: #F7F7F4; --surface: #FFFFFF; --ink: #1A1A1A; --muted: #5E5E57; --line: #E4E4DD;
  --accent: #F3B21B; --accent-ink: #7A5200; --accent-soft: #FDF3D8;
  --ok: #1F7A4D; --ok-soft: #E2F3EA; --warn: #9A5B00; --warn-soft: #FBEFD9; --bad: #B3261E; --bad-soft: #FBE3DF; --info: #2456A6; --info-soft: #E3ECFA; --grey-soft: #EEEEE8;
  --shadow: 0 1px 2px rgba(26,26,26,.06), 0 8px 24px rgba(26,26,26,.06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #161614; --surface: #20201D; --ink: #F2F2EC; --muted: #B4B4AA; --line: #34342F;
  --accent: #F3B21B; --accent-ink: #F6C452; --accent-soft: #3A2E10;
  --ok: #6FD3A0; --ok-soft: #173326; --warn: #F2B65C; --warn-soft: #3A2A12; --bad: #FF8A80; --bad-soft: #3D1B18; --info: #8AB4F8; --info-soft: #18263D; --grey-soft: #2C2C28;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #161614; --surface: #20201D; --ink: #F2F2EC; --muted: #B4B4AA; --line: #34342F;
  --accent: #F3B21B; --accent-ink: #F6C452; --accent-soft: #3A2E10;
  --ok: #6FD3A0; --ok-soft: #173326; --warn: #F2B65C; --warn-soft: #3A2A12; --bad: #FF8A80; --bad-soft: #3D1B18; --info: #8AB4F8; --info-soft: #18263D; --grey-soft: #2C2C28;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark }

* { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 24px }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--font); }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px }

.top { background: #1A1A1A; color: #F7F7F4; padding-block: 40px 44px; padding-inline: 16px }
.top-in { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px }
.brand { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: #F3B21B }
.top h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; font-weight: 800; text-wrap: balance; color: #F7F7F4 }
.top p { margin: 0; max-width: 62ch; color: #CFCFC8; font-size: 18px }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: #A9A9A0 }
.meta b { color: #F7F7F4; font-weight: 600 }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 16px; padding-block: 32px 80px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px }
@media (max-width: 900px) { .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px } }

nav.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 20px); align-self: start; max-height: calc(100vh - 40px); overflow: auto; font-size: 14px }
nav.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 8px }
nav.toc summary { cursor: pointer; font-weight: 700; padding: 8px 8px; list-style: none }
nav.toc summary::-webkit-details-marker { display: none }
nav.toc ol { list-style: none; margin: 0; padding: 0 0 6px; display: flex; flex-direction: column; gap: 1px }
nav.toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted) }
nav.toc a:hover { background: var(--grey-soft); color: var(--ink) }
nav.toc a.on { background: var(--accent-soft); color: var(--ink); font-weight: 600 }
nav.toc .sub a { padding-left: 22px; font-size: 13px }
@media (max-width: 900px) { nav.toc { position: static; max-height: none } }

main { min-width: 0; display: flex; flex-direction: column; gap: 56px }
section.part { display: flex; flex-direction: column; gap: 18px; min-width: 0 }
.part > .kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink) }
h2 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; font-weight: 800; text-wrap: balance }
h3 { margin: 12px 0 0; font-size: 21px; line-height: 1.3; font-weight: 700; text-wrap: balance }
h4 { margin: 4px 0 0; font-size: 17px; font-weight: 700 }
p { margin: 0; max-width: 68ch }
.lead { font-size: 18px; color: var(--muted) }
ul.plain { margin: 0; padding-left: 20px; max-width: 68ch; display: flex; flex-direction: column; gap: 6px }

ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 72ch }
ol.steps > li { counter-increment: s; position: relative; padding-left: 46px; min-height: 32px }
ol.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #1A1A1A; font-weight: 800; font-size: 15px; display: grid; place-items: center }

.ui { font-weight: 600; background: var(--grey-soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; -webkit-box-decoration-break: clone; box-decoration-break: clone }
.btn { font-weight: 700; background: var(--accent); color: #1A1A1A; border-radius: 6px; padding: 1px 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone }
.path { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; background: var(--grey-soft); border-radius: 6px; padding: 1px 6px }

.note { display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); max-width: 76ch }
.note .ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px }
.note > div { min-width: 0; display: flex; flex-direction: column; gap: 6px }
.note.tip { background: var(--info-soft); border-color: transparent } .note.tip .ic { background: var(--info); color: var(--surface) }
.note.warn { background: var(--warn-soft); border-color: transparent } .note.warn .ic { background: var(--warn); color: var(--surface) }
.note.stop { background: var(--bad-soft); border-color: transparent } .note.stop .ic { background: var(--bad); color: var(--surface) }

.chip { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; background: var(--grey-soft); color: var(--ink) }
.chip.ok { background: var(--ok-soft); color: var(--ok) } .chip.warn { background: var(--warn-soft); color: var(--warn) }
.chip.bad { background: var(--bad-soft); color: var(--bad) } .chip.info { background: var(--info-soft); color: var(--info) } .chip.acc { background: var(--accent-soft); color: var(--accent-ink) }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-width: 100% }
table { border-collapse: collapse; width: 100%; font-size: 15px }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line) }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--grey-soft) }
tr:last-child td { border-bottom: none }
td { font-variant-numeric: tabular-nums }

figure { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0 }
figure img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; background: var(--surface) }
figure.phone img { width: 300px; border-radius: 22px; border: 6px solid #2B2B27 }
figure figcaption { font-size: 14px; color: var(--muted); max-width: 70ch }
.shots { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start }
.shots figure.phone { flex: 0 1 300px }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start }
@media (max-width: 760px) { .pair { grid-template-columns: minmax(0, 1fr) } figure.phone img { width: 100%; max-width: 300px } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.card b { font-size: 16px }
.card span { color: var(--muted); font-size: 14px }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px }
.flow .arr { color: var(--muted) }

details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 76ch }
details.faq summary { cursor: pointer; font-weight: 600 }
details.faq[open] summary { margin-bottom: 8px }

.lb { position: fixed; inset: 0; background: rgba(10,10,10,.86); display: grid; place-items: center; padding: 20px; z-index: 50; cursor: zoom-out }
.lb img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff }
footer.end { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 18px }
/* Длинный скриншот: в тексте видна верхняя часть, целиком — по нажатию. */
figure.phone.tall img { height: 620px; object-fit: cover; object-position: top }
figure.tall figcaption::after { content: " Tam görmək üçün şəklə basın."; }

/* Схемы — готовый SVG (scripts/telimat-diagrams.mjs); светлая подложка и в тёмной теме, цвета схемы фиксированные. */
.diagram { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow-x: auto }
.diagram svg { display: block; margin: 0 auto; height: auto; min-width: 620px }   /* на телефоне не сжимается до нечитаемого — листается внутри рамки */

/* Кнопка возврата к оглавлению — на любой ширине, когда оглавления не видно (на телефоне оно в начале страницы; закрепление сбоку работает не везде, например во встроенном просмотре). */
.to-toc { display: none; position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 20; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: #1A1A1A; color: #F7F7F4; font: 600 15px/1 var(--font); box-shadow: 0 4px 16px rgba(0,0,0,.25); cursor: pointer }
.to-toc:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.to-toc.on { display: inline-flex; align-items: center }
