/* ============================================================
   Обучающие блок-схемы TGToolsBot — тёмная тема
   Автономно, без внешних ресурсов.
   ============================================================ */
:root{
  --bg1:#0a0f1e; --bg2:#0c1122;
  --ink:#e9eefc; --muted:#96a3c6; --muted2:#7a88ad;
  --entry:#6f9dff;   /* синий  - вход / обычное действие */
  --alt:#a98bff;     /* фиолет - альтернативный сценарий */
  --check:#f4b64d;   /* оранж  - выбор / проверка / предупреждение */
  --success:#3ed08a; /* зелёный- успех */
  --danger:#ff6f86;  /* красный- ошибка / стоп */
  --manage:#2dd4bf;  /* бирюза - управление созданным объектом */
  --normal:#7d8cff; --repost:#c07bfb; --np:#39bdf8;
  --card:#0f1626; --card2:#141d31; --bubble:#182238;
  --line:rgba(150,168,214,.16); --line-strong:rgba(150,168,214,.30);
  --added:#2dd4bf;   /* контур нового элемента */
  --radius:18px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth; background:#0a0f1e}
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto} *{transition:none !important; animation:none !important} }

body{
  margin:0; font-family:"Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink); background:
    radial-gradient(1100px 620px at 8% -12%, #16204688 0%, transparent 60%),
    radial-gradient(1000px 620px at 112% -6%, #3a2a6633 0%, transparent 55%),
    linear-gradient(165deg, var(--bg1), var(--bg2));
  background-attachment:fixed;
  min-height:100vh; font-size:15px; line-height:1.5; overflow-x:hidden;
}
a{color:#8ab0ff}
img{max-width:100%}
:focus-visible{outline:3px solid #6f9dff; outline-offset:2px; border-radius:6px}

.wrap{max-width:1240px; margin:0 auto; padding:0 16px}

/* ---------- Top navigation (одна строка + выпадающее меню) ---------- */
.topnav{position:sticky; top:0; z-index:50; background:rgba(10,14,28,.82); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line); box-shadow:0 2px 14px #00000055}
.topnav .bar{max-width:1240px; margin:0 auto; display:flex; align-items:center; gap:12px;
  padding:9px 16px; min-height:56px}
.topnav .brand{display:flex; align-items:center; gap:9px; font-weight:800; font-size:15px;
  color:var(--ink); text-decoration:none; min-width:0; flex:0 1 auto}
.topnav .brand .brandtxt{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0}
.topnav .brand .logo{width:32px; height:32px; display:grid; place-items:center; flex:none}
.topnav .brand .logo svg{display:block; filter:drop-shadow(0 3px 9px #6f9dff55)}
.topnav .current{font-size:13px; color:var(--muted); font-weight:600; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:0 1 auto; max-width:46vw; text-align:right; margin-left:auto}
.topnav .spacer{flex:1 1 auto}
/* десктопные inline-ссылки больше не используем — всегда компактное меню «Разделы» */
.topnav .links{display:none}
.nav-toggle{position:absolute; opacity:0; width:0; height:0}
.topnav .menu-btn{margin-left:auto; display:inline-flex; align-items:center; gap:7px; user-select:none;
  background:rgba(255,255,255,.06); color:#d6def5; border:1px solid var(--line-strong);
  border-radius:11px; padding:9px 14px; font-size:14px; font-weight:700; cursor:pointer; min-height:44px; flex:none}
.topnav .menu-btn:hover{background:rgba(255,255,255,.1)}
.nav-toggle:checked ~ .bar .menu-btn, .topnav:has(.nav-toggle:checked) .menu-btn{background:rgba(111,157,255,.18); color:#bcd0ff}

/* выпадающая панель разделов — как карточка справа; на узких экранах во всю ширину */
.drawer{position:fixed; top:58px; right:12px; left:auto; width:min(320px, calc(100vw - 24px)); z-index:49;
  background:var(--card2); border:1px solid var(--line-strong); border-radius:16px;
  box-shadow:0 18px 44px #000000aa; max-height:0; overflow:hidden; transition:max-height .22s ease}
.nav-toggle:checked ~ .drawer{max-height:82vh; overflow:auto}
.drawer nav{display:flex; flex-direction:column; padding:8px}
.drawer nav a{padding:12px 13px; border-radius:10px; text-decoration:none; color:#c7d0ea;
  font-weight:600; font-size:14.5px; min-height:44px; display:flex; align-items:center}
.drawer nav a:hover{background:rgba(255,255,255,.06)}
.drawer nav a[aria-current="page"]{background:rgba(111,157,255,.18); color:#dbe6ff}
.drawer nav a.home{background:rgba(255,255,255,.05)}
@media (max-width:560px){
  .topnav .current{display:none}
  .drawer{right:0; left:0; top:57px; width:auto; border-radius:0 0 14px 14px; border-left:0; border-right:0}
}

/* ---------- Hero ---------- */
header.hero{text-align:center; margin:26px 0 8px}
.hero .badge{display:inline-block; font-size:12px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:#fff; background:linear-gradient(90deg,#6f9dff,#a98bff);
  padding:7px 15px; border-radius:999px; box-shadow:0 8px 24px #6f9dff33}
.hero h1{font-size:30px; margin:15px 0 6px; font-weight:800; letter-spacing:-.4px; color:var(--ink)}
.hero p{margin:0 auto; max-width:780px; color:var(--muted); font-size:15px; line-height:1.55}
@media (max-width:520px){ .hero h1{font-size:23px} }

/* status pill */
.status{display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:800;
  padding:4px 11px; border-radius:999px; letter-spacing:.01em; border:1px solid transparent}
.status::before{content:""; width:8px; height:8px; border-radius:50%; background:currentColor}
.status.new{color:#5eead4; background:rgba(45,212,191,.14); border-color:rgba(45,212,191,.4)}
.status.updated{color:#f4b64d; background:rgba(244,182,77,.14); border-color:rgba(244,182,77,.4)}
.status.scenario{color:#bda3ff; background:rgba(169,139,255,.16); border-color:rgba(169,139,255,.4)}
.status.fixed{color:#8ab0ff; background:rgba(111,157,255,.16); border-color:rgba(111,157,255,.4)}
.status.removed{color:#ff8ea0; background:rgba(255,111,134,.14); border-color:rgba(255,111,134,.4)}
.status.related{color:#a9b6d6; background:rgba(255,255,255,.06); border-color:var(--line)}

/* ---------- Legend ---------- */
.legend{display:flex; flex-wrap:wrap; gap:9px 16px; justify-content:center; margin:20px 0 30px}
.legend .it{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted); font-weight:600}
.legend .sw{width:14px; height:14px; border-radius:4px; box-shadow:0 1px 2px #0006; flex:none}
.legend .sw.out{background:transparent; border:2px solid var(--added)}
.legend .sw.old{background:repeating-linear-gradient(45deg,#2a3350,#2a3350 4px,#3a4568 4px,#3a4568 8px); border:1px dashed #6b7699}

/* ---------- Connectors ---------- */
.arrow{width:2px; height:28px; margin:0 auto; background:var(--line-strong); position:relative}
.arrow::after{content:""; position:absolute; bottom:-1px; left:50%; transform:translateX(-50%);
  border-left:6px solid transparent; border-right:6px solid transparent; border-top:8px solid var(--line-strong)}
.arrow.tall{height:44px}
.arrow.old{background:repeating-linear-gradient(#6b7699,#6b7699 4px,transparent 4px,transparent 8px); opacity:.6}
.arrow.old::after{border-top-color:#6b7699}
.lbl{display:block; text-align:center; font-size:12px; font-weight:700; color:#e9eefc;
  background:rgba(150,168,214,.22); border:1px solid var(--line); border-radius:999px; padding:3px 12px;
  width:max-content; max-width:100%; margin:6px auto}

/* ---------- Screen card ---------- */
.screen{background:var(--card); border-radius:var(--radius); padding:14px 15px 15px;
  box-shadow:0 12px 30px #00000055, 0 2px 6px #00000033; border:1px solid var(--line);
  width:100%; max-width:340px; min-width:0; margin:0 auto; position:relative; transition:transform .15s, box-shadow .15s}
.screen:hover{transform:translateY(-3px); box-shadow:0 20px 44px #00000077}
.screen.wide{max-width:390px}
.scr-head{display:flex; align-items:center; gap:8px; font-size:11.5px; font-weight:800;
  text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:10px}
.scr-head .dot{width:9px; height:9px; border-radius:50%; background:var(--entry); flex:none;
  box-shadow:0 0 0 3px rgba(111,157,255,.2)}
.bubble{background:var(--bubble); border-radius:4px 14px 14px 14px; padding:11px 13px;
  font-size:13.5px; line-height:1.5; color:#dfe6f7; border-left:3px solid var(--entry); overflow-wrap:anywhere}
.bubble b{font-weight:700; color:#f2f5ff} .bubble i{color:#aab6d6; font-style:italic}
.bubble blockquote{margin:8px 0 0; padding:7px 11px; border-left:3px solid var(--line-strong);
  background:rgba(255,255,255,.05); border-radius:6px; font-size:12.5px}
.bubble code{background:rgba(255,255,255,.09); padding:1px 5px; border-radius:5px; color:#cdd6ef;
  font-family:ui-monospace,Consolas,monospace; font-size:12px; overflow-wrap:anywhere}
.ph{background:rgba(111,157,255,.18); color:#a9c4ff; border-radius:5px; padding:0 5px; font-size:11.5px;
  font-weight:700; font-family:ui-monospace,Consolas,monospace; overflow-wrap:anywhere}
.kb{display:flex; flex-wrap:wrap; gap:6px; margin-top:11px}
.btn{font-size:12px; font-weight:600; padding:8px 11px; border-radius:9px; background:rgba(255,255,255,.06);
  color:#cdd6ef; border:1px solid var(--line); flex:1 1 auto; text-align:center;
  overflow-wrap:anywhere; min-height:34px; display:flex; align-items:center; justify-content:center}
.btn.full{flex-basis:100%}
.btn.success{background:linear-gradient(90deg,#22c55e,#12a866); color:#04140c; border:none; box-shadow:0 4px 14px #16a34a55}
.btn.danger{background:linear-gradient(90deg,#f2607a,#e0435f); color:#1a0509; border:none; box-shadow:0 4px 14px #dc264855}
.btn.primary{background:linear-gradient(90deg,#5b8cff,#3f6fe0); color:#04122e; border:none; box-shadow:0 4px 14px #2563eb55}
.btn.back{background:rgba(255,255,255,.04); color:var(--muted); border:1px solid var(--line)}
.btn.warn{background:rgba(244,182,77,.14); color:#f4c576; border:1px solid rgba(244,182,77,.35)}
.btn.alt{background:rgba(169,139,255,.16); color:#c3adff; border:1px solid rgba(169,139,255,.35)}

/* zone accents */
.z-entry .dot{background:var(--entry); box-shadow:0 0 0 3px rgba(111,157,255,.2)} .z-entry .bubble{border-left-color:var(--entry)}
.z-alt .dot{background:var(--alt); box-shadow:0 0 0 3px rgba(169,139,255,.2)} .z-alt .bubble{border-left-color:var(--alt)}
.z-normal .dot{background:var(--normal); box-shadow:0 0 0 3px rgba(125,140,255,.2)} .z-normal .bubble{border-left-color:var(--normal)}
.z-repost .dot{background:var(--repost); box-shadow:0 0 0 3px rgba(192,123,251,.2)} .z-repost .bubble{border-left-color:var(--repost)}
.z-np .dot{background:var(--np); box-shadow:0 0 0 3px rgba(57,189,248,.2)} .z-np .bubble{border-left-color:var(--np)}
.z-check .dot{background:var(--check); box-shadow:0 0 0 3px rgba(244,182,77,.2)} .z-check .bubble{border-left-color:var(--check)}
.z-success .dot{background:var(--success); box-shadow:0 0 0 3px rgba(62,208,138,.2)} .z-success .bubble{border-left-color:var(--success)}
.z-danger .dot{background:var(--danger); box-shadow:0 0 0 3px rgba(255,111,134,.2)} .z-danger .bubble{border-left-color:var(--danger)}
.z-manage .dot{background:var(--manage); box-shadow:0 0 0 3px rgba(45,212,191,.2)} .z-manage .bubble{border-left-color:var(--manage)}

/* NEW element highlight */
.screen.is-new{border:2px solid var(--added); box-shadow:0 12px 30px rgba(45,212,191,.18)}
.screen.is-new::after{content:"Новое"; position:absolute; top:-11px; right:12px; font-size:10.5px;
  font-weight:800; color:#04160f; background:var(--added); padding:3px 10px; border-radius:999px; letter-spacing:.02em}

/* tags on blocks */
.tag{display:inline-block; font-size:10.5px; font-weight:800; padding:3px 9px; border-radius:999px;
  letter-spacing:.02em; margin-bottom:8px}
.tag.added{color:#04160f; background:var(--added)}
.tag.removed{color:#0b0f1a; background:#8090b3}
.tag.before{color:#aab6d6; background:rgba(255,255,255,.08)}
.tag.after{color:#04160c; background:var(--success)}
.tag.new{color:#04160f; background:var(--added)}

.strike{text-decoration:line-through; text-decoration-color:#ff6f86; text-decoration-thickness:2px; opacity:.78}

/* ---------- Before / After comparison ---------- */
.cmp{display:flex; gap:16px; justify-content:center; align-items:stretch; flex-wrap:wrap; margin:6px 0}
.cmp .side{flex:1 1 320px; max-width:400px; display:flex; flex-direction:column}
.cmp .to{align-self:center; font-weight:800; color:var(--muted); font-size:22px; padding:0 4px}
@media (max-width:760px){ .cmp .to{transform:rotate(90deg); padding:6px 0} }
.screen.is-old{opacity:.72; border:1.5px dashed #6b7699; background:rgba(255,255,255,.02); box-shadow:none}
.screen.is-old .bubble{background:rgba(255,255,255,.04); border-left-color:#6b7699; color:#aab6d6}

/* ---------- Removed block ---------- */
.screen.is-removed{opacity:.7; border:1.5px dashed #6b7699; background:
  repeating-linear-gradient(-38deg, rgba(255,255,255,.02), rgba(255,255,255,.02) 22px, rgba(255,255,255,.05) 22px, rgba(255,255,255,.05) 24px)}
.screen.is-removed .bubble{background:rgba(255,255,255,.04); border-left-color:#6b7699; color:#aab6d6}

/* ---------- Decision / fork ---------- */
.decision{width:max-content; max-width:min(460px,100%); margin:0 auto;
  background:linear-gradient(90deg,#f6ad3c,#e8912a); color:#2a1802; font-weight:800; font-size:13.5px;
  padding:11px 20px; border-radius:14px; box-shadow:0 8px 24px rgba(232,145,42,.35); text-align:center}
.decision .q{font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; opacity:.75; display:block; margin-bottom:2px}
.fork{display:flex; gap:22px; justify-content:center; align-items:flex-start; flex-wrap:wrap; margin-top:8px}
.lane{flex:1 1 340px; max-width:420px; border-radius:20px; padding:15px 15px 18px; position:relative}
.lane.normal{background:rgba(125,140,255,.08); border:1.5px solid rgba(125,140,255,.28)}
.lane.alt{background:rgba(169,139,255,.08); border:1.5px solid rgba(169,139,255,.28)}
.lane.repost{background:rgba(192,123,251,.08); border:1.5px solid rgba(192,123,251,.28)}
.lane.np{background:rgba(57,189,248,.08); border:1.5px dashed rgba(57,189,248,.35)}
.lane.manage{background:rgba(45,212,191,.08); border:1.5px solid rgba(45,212,191,.28)}
.lane.danger{background:rgba(255,111,134,.08); border:1.5px solid rgba(255,111,134,.28)}
.lane-head{display:flex; align-items:center; gap:9px; font-weight:800; font-size:14.5px; margin-bottom:12px; flex-wrap:wrap; color:var(--ink)}
.lane-head .pill{font-size:11px; font-weight:800; color:#08122b; padding:4px 11px; border-radius:999px}
.lane.normal .pill{background:var(--normal)} .lane.alt .pill{background:var(--alt)}
.lane.repost .pill{background:var(--repost)} .lane.np .pill{background:var(--np)}
.lane.manage .pill{background:var(--manage)} .lane.danger .pill{background:var(--danger)}
.lane .screen{width:100%; max-width:100%}

/* shrink-safety */
.lane, .col, .cmp .side, .whatchanged .box, .fork > div, .grid2 > *{min-width:0}
.mini .screen{max-width:300px}

/* ---------- Notes ---------- */
.note{width:max-content; max-width:min(560px,100%); margin:8px auto; font-size:12.5px; color:var(--muted);
  background:rgba(255,255,255,.03); border:1px dashed var(--line-strong); border-radius:12px; padding:9px 13px;
  line-height:1.45; overflow-wrap:anywhere}
.note b{color:#dbe3f5}
.note.alert{border-color:rgba(255,111,134,.4); background:rgba(255,111,134,.08); color:#ff9aa9}
.note.alert b{color:#ffc2cc}
.note.ok{border-color:rgba(62,208,138,.4); background:rgba(62,208,138,.08); color:#7fe3b3}
.note.ok b{color:#aef0d1}

/* ---------- Section ---------- */
.section{margin:40px 0 0}
.section > h2{display:flex; align-items:center; gap:12px; font-size:19px; font-weight:800; margin:0 0 4px; flex-wrap:wrap; color:var(--ink)}
.section > h2 .n{width:32px; height:32px; border-radius:11px; display:grid; place-items:center;
  color:#08122b; font-size:15px; flex:none; background:var(--normal)}
.section .sub{color:var(--muted); font-size:13.5px; margin:0 0 16px; padding-left:44px}
@media (max-width:520px){ .section .sub{padding-left:0} }
.hr{height:1px; background:linear-gradient(90deg,transparent,var(--line-strong),transparent); margin:36px 0}
.grid2{display:flex; gap:22px; justify-content:center; align-items:flex-start; flex-wrap:wrap}
.col{flex:1 1 360px; max-width:430px}
.merge{width:max-content; max-width:100%; margin:2px auto; font-size:12.5px; font-weight:700; color:#c7d0ea;
  background:rgba(255,255,255,.07); border-radius:999px; padding:5px 15px; text-align:center}
.mini{display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin-top:8px}
.deadend{margin:6px auto 0; width:max-content; max-width:100%; font-size:11.5px; font-weight:800; color:#ff8ea0;
  background:rgba(255,111,134,.12); border:1px solid rgba(255,111,134,.35); border-radius:999px; padding:4px 13px; text-align:center}
.okend{margin:6px auto 0; width:max-content; max-width:100%; font-size:11.5px; font-weight:800; color:#7fe3b3;
  background:rgba(62,208,138,.12); border:1px solid rgba(62,208,138,.35); border-radius:999px; padding:4px 13px; text-align:center}

/* ---------- Feature header block ---------- */
.fhead{background:var(--card2); border:1px solid var(--line); border-radius:18px; padding:20px 22px;
  box-shadow:0 12px 30px #00000044; margin:18px 0 8px}
.fhead h1{font-size:26px; margin:8px 0 8px; font-weight:800; letter-spacing:-.3px; color:var(--ink)}
.fhead .who{font-size:13px; color:var(--muted); margin:8px 0 0}
.fhead .who b{color:#cdd6ef}
.fhead .lead{font-size:15px; color:#cdd6ef; margin:10px 0 0; line-height:1.55}
.fhead .oneline{margin:12px 0 0; padding:10px 14px; background:rgba(45,212,191,.1); border:1px solid rgba(45,212,191,.32);
  border-radius:12px; color:#8ceccf; font-weight:600; font-size:14px}
.whatchanged{display:flex; gap:14px; flex-wrap:wrap; margin:16px 0}
.whatchanged .box{flex:1 1 260px; border-radius:14px; padding:13px 15px; font-size:13.5px; line-height:1.5}
.whatchanged .before{background:rgba(255,255,255,.03); border:1.5px dashed var(--line-strong); color:#aab6d6}
.whatchanged .after{background:rgba(62,208,138,.08); border:1.5px solid rgba(62,208,138,.32); color:#a8ecc9}
.whatchanged .why{background:rgba(111,157,255,.08); border:1.5px solid rgba(111,157,255,.32); color:#b3ccff}
.whatchanged h4{margin:0 0 6px; font-size:12px; text-transform:uppercase; letter-spacing:.05em}

/* ---------- Мини-приложение (WebApp) ---------- */
.wa-frame{max-width:372px; margin:0 auto}
.wa-cap{display:flex; align-items:center; gap:7px; justify-content:center; font-size:11.5px; font-weight:700;
  color:#c3adff; background:rgba(169,139,255,.12); border:1px solid rgba(169,139,255,.32); border-radius:999px;
  padding:4px 12px; width:max-content; max-width:100%; margin:0 auto 8px}
.wa-cap::before{content:"🖥️"}
.webapp{background:radial-gradient(120% 80% at 50% -10%, #0b1430 0%, #070c1b 45%, #050814 100%);
  border:1px solid rgba(153,172,215,.24); border-radius:22px; padding:15px 14px 16px; color:#f5f8ff;
  box-shadow:0 18px 44px #000000aa, 0 0 0 1px #ffffff08 inset; overflow:hidden}
.webapp *{box-sizing:border-box}
.webapp .wa-top{display:flex; align-items:center; gap:10px; margin-bottom:4px}
.webapp .wa-logo{width:30px; height:30px; border-radius:9px; flex:none; display:grid; place-items:center;
  background:linear-gradient(135deg,#44d8ff,#8d6fff); color:#050814; font-size:15px; box-shadow:0 0 16px #44d8ff55}
.webapp .wa-ttl{font-size:15px; font-weight:800; letter-spacing:-.2px; line-height:1.2}
.webapp .wa-app{margin-left:auto; font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
  color:#95a5c9; background:rgba(255,255,255,.05); border:1px solid rgba(153,172,215,.14); border-radius:999px; padding:3px 8px}
.webapp .wa-sub{font-size:12px; color:#95a5c9; margin:2px 0 10px; line-height:1.45}
.webapp .wa-sect{font-size:10px; text-transform:uppercase; letter-spacing:.07em; color:#7383aa; margin:13px 2px 5px}
.webapp .wa-card{background:rgba(255,255,255,.05); border:1px solid rgba(153,172,215,.14); border-radius:14px; padding:10px 12px; margin:7px 0}
.webapp .wa-row{display:flex; align-items:center; gap:10px; padding:7px 0}
.webapp .wa-row + .wa-row{border-top:1px solid rgba(153,172,215,.1)}
.webapp .wa-row .wa-txt{min-width:0; flex:1}
.webapp .wa-label{font-size:13px; font-weight:600; color:#f5f8ff; overflow-wrap:anywhere}
.webapp .wa-hint{font-size:11px; color:#95a5c9; margin-top:2px; line-height:1.4; overflow-wrap:anywhere}
.webapp .wa-toggle{flex:none; width:42px; height:24px; border-radius:999px; background:rgba(255,255,255,.09);
  border:1px solid rgba(153,172,215,.18); position:relative; transition:background .15s}
.webapp .wa-toggle::after{content:""; position:absolute; top:2px; left:2px; width:18px; height:18px;
  border-radius:50%; background:#c3cce6; transition:left .15s}
.webapp .wa-toggle.on{background:linear-gradient(90deg,#78a0ff,#8d6fff); border-color:transparent}
.webapp .wa-toggle.on::after{left:21px; background:#fff}
.webapp .wa-toggle.on::before{content:"вкл"; position:absolute; left:7px; top:5px; font-size:9px; font-weight:800; color:#0b1430}
.webapp .wa-toggle.off::before{content:"выкл"; position:absolute; right:5px; top:5px; font-size:9px; font-weight:800; color:#95a5c9}
.webapp .wa-field{background:rgba(255,255,255,.05); border:1px solid rgba(153,172,215,.16); border-radius:10px;
  padding:9px 11px; font-size:12.5px; color:#95a5c9; margin:6px 0; overflow-wrap:anywhere}
.webapp .wa-field.val{color:#f5f8ff; font-weight:600}
.webapp .wa-num{flex:none; min-width:52px; text-align:center; background:rgba(255,255,255,.06);
  border:1px solid rgba(153,172,215,.18); border-radius:9px; padding:6px 8px; font-size:13px; font-weight:700; color:#f5f8ff}
.webapp .wa-chips{display:flex; flex-wrap:wrap; gap:6px; margin-top:2px}
.webapp .wa-chip{font-size:12px; background:rgba(255,255,255,.06); border:1px solid rgba(153,172,215,.16); border-radius:999px; padding:5px 10px; color:#cdd6ef}
.webapp .wa-chip.on{background:linear-gradient(90deg,#78a0ff33,#8d6fff33); border-color:#78a0ff; color:#eaf0ff}
.webapp .wa-seg{display:flex; gap:4px; background:rgba(255,255,255,.05); border:1px solid rgba(153,172,215,.14); border-radius:12px; padding:4px}
.webapp .wa-seg span{flex:1; text-align:center; font-size:12px; font-weight:700; padding:7px 6px; border-radius:9px; color:#95a5c9}
.webapp .wa-seg span.on{background:linear-gradient(90deg,#78a0ff,#8d6fff); color:#08122b}
.webapp .wa-badge{display:inline-block; font-size:10px; font-weight:800; border-radius:999px; padding:2px 8px; margin-left:6px}
.webapp .wa-badge.byok{color:#f7c067; background:#f7c0671a; border:1px solid #f7c06755}
.webapp .wa-badge.svc{color:#34e3ba; background:#34e3ba1a; border:1px solid #34e3ba55}
.webapp .wa-btn{display:block; text-align:center; background:linear-gradient(90deg,#78a0ff,#8d6fff); color:#08122b;
  font-weight:800; border-radius:13px; padding:12px; margin-top:12px; font-size:14px}
.webapp .wa-btn.ghost{background:rgba(255,255,255,.06); color:#cdd6ef; border:1px solid rgba(153,172,215,.18)}
.webapp .wa-note{font-size:11px; color:#f7c067; background:#f7c0670f; border:1px solid #f7c06733; border-radius:10px; padding:8px 10px; margin:8px 0; line-height:1.45}
.webapp .wa-tabs{display:flex; gap:6px; overflow-x:auto; margin:2px 0 8px; padding-bottom:2px}
.webapp .wa-tabs span{flex:none; font-size:12px; font-weight:700; padding:7px 12px; border-radius:999px; color:#95a5c9; background:rgba(255,255,255,.05); border:1px solid rgba(153,172,215,.14)}
.webapp .wa-tabs span.on{color:#eaf0ff; background:linear-gradient(90deg,#78a0ff33,#8d6fff33); border-color:#78a0ff}

/* ---------- FAQ ---------- */
.faq{margin-top:14px}
.faq details{background:var(--card2); border:1px solid var(--line); border-radius:12px; padding:2px 14px; margin:8px 0; box-shadow:0 2px 8px #00000033}
.faq summary{cursor:pointer; font-weight:700; font-size:14px; padding:12px 0; list-style:none; display:flex; align-items:center; gap:9px; min-height:44px; color:var(--ink)}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{content:"?"; width:22px; height:22px; border-radius:50%; background:rgba(111,157,255,.16); color:#8ab0ff; font-weight:800; display:grid; place-items:center; font-size:12px; flex:none}
.faq details[open] summary::before{content:"−"; background:var(--entry); color:#08122b}
.faq .a{padding:0 0 13px 31px; color:var(--muted); font-size:13.5px; line-height:1.55}

/* ---------- Page prev/next ---------- */
.pagenav{display:flex; gap:12px; justify-content:space-between; margin:40px 0 10px; flex-wrap:wrap}
.pagenav a{flex:1 1 240px; display:flex; flex-direction:column; gap:3px; text-decoration:none;
  background:var(--card2); border:1px solid var(--line); border-radius:14px; padding:13px 16px; box-shadow:0 3px 10px #00000033; min-height:44px}
.pagenav a:hover{border-color:rgba(111,157,255,.5); background:#182238}
.pagenav a.next{text-align:right; align-items:flex-end}
.pagenav .dir{font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted2); font-weight:700}
.pagenav .ttl{font-size:14px; font-weight:700; color:#cdd6ef}
.pagenav a[aria-disabled="true"]{opacity:.4; pointer-events:none}

/* ---------- Back to top ---------- */
.totop{position:fixed; right:16px; bottom:16px; z-index:40; width:46px; height:46px; border-radius:50%;
  background:linear-gradient(135deg,#6f9dff,#a98bff); color:#08122b; border:none; font-size:20px; font-weight:800;
  cursor:pointer; box-shadow:0 8px 24px #6f9dff55; opacity:0; visibility:hidden; transition:opacity .2s}
.totop.show{opacity:1; visibility:visible}

/* ---------- Index catalog ---------- */
.toolbar{display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin:8px 0 20px}
.search{flex:1 1 280px; display:flex; align-items:center; gap:8px; background:var(--card2); border:1px solid var(--line);
  border-radius:12px; padding:0 14px; min-height:46px; box-shadow:0 2px 8px #00000033}
.search input{flex:1; border:none; outline:none; font-size:15px; background:transparent; color:var(--ink); min-width:0}
.search input::placeholder{color:var(--muted2)}
.filters{display:flex; gap:8px; flex-wrap:wrap}
.chip{font-size:12.5px; font-weight:700; padding:9px 13px; border-radius:999px; border:1px solid var(--line);
  background:var(--card2); color:var(--muted); cursor:pointer; min-height:40px}
.chip[aria-pressed="true"]{background:var(--entry); color:#08122b; border-color:var(--entry)}
.catalog{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px}
.fcard{display:flex; flex-direction:column; background:var(--card2); border:1px solid var(--line); border-radius:16px;
  padding:16px 17px; box-shadow:0 6px 18px #00000044; text-decoration:none; color:inherit; transition:transform .15s, box-shadow .15s}
.fcard:hover{transform:translateY(-3px); box-shadow:0 18px 38px #00000066; border-color:rgba(111,157,255,.5)}
.fcard .ic{font-size:26px; margin-bottom:8px}
.fcard h3{margin:0 0 8px; font-size:17px; font-weight:800; letter-spacing:-.2px; color:var(--ink)}
.fcard p{margin:0; font-size:13.5px; color:var(--muted); line-height:1.5; flex:1}
.fcard .foot{display:flex; align-items:center; justify-content:space-between; margin-top:14px; gap:8px}
.fcard .go{font-size:13px; font-weight:700; color:#8ab0ff}
.noresult{grid-column:1/-1; text-align:center; color:var(--muted); padding:30px; font-size:15px}
.count{color:var(--muted); font-size:13px; margin:0 0 10px}

footer.foot{margin-top:50px; text-align:center; color:var(--muted2); font-size:12.5px; padding:20px 0 10px; border-top:1px solid var(--line)}

/* ---------- Print (принудительно светлое и читаемое) ---------- */
@media print{
  body{background:#fff !important; color:#111 !important}
  .topnav,.drawer,.totop,.pagenav,.toolbar,.legend .print-hide{display:none !important}
  .screen,.fcard,.fhead,.faq details,.webapp,.lane,.whatchanged .box{background:#fff !important; color:#111 !important; border-color:#ccc !important; box-shadow:none !important; break-inside:avoid; page-break-inside:avoid}
  .bubble{background:#f3f4f7 !important; color:#111 !important}
  .bubble b,.bubble i,.wa-label,.wa-ttl,.wa-hint,.fhead h1,.fhead .lead,.section > h2,.lane-head,.note,.note b{color:#111 !important}
  .webapp,.wa-card,.wa-field,.wa-num,.wa-chip{background:#f3f4f7 !important; color:#111 !important; border-color:#ccc !important}
  .note{background:#fff !important}
  .fork{gap:12px}
  a[href]::after{content:""}
  .section{margin-top:24px}
}
