/* Вики PolitWorld — светлая, в одном стиле с politworld.ru */
:root {
  --gold:#F2C14E; --gold2:#FFE39A; --gold-dark:#8a6412; --navy:#1b2433; --navy2:#26324a;
  --muted:#6b7180; --line:rgba(212,164,55,.45); --soft:rgba(212,164,55,.18); --bg:#fbf7ee; --paper:#fff;
  --ease:cubic-bezier(.22,.9,.3,1); --top:72px;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:calc(var(--top) + 18px); scrollbar-gutter:stable;
  scrollbar-width:thin; scrollbar-color:#e0b34a rgba(27,36,51,.07); }
::selection { background:rgba(242,193,78,.45); }
body { margin:0; background:var(--bg); color:var(--navy); font:500 16px/1.7 Montserrat, system-ui, sans-serif;
  -webkit-font-smoothing:antialiased; }
a { color:inherit; }
:focus-visible { outline:3px solid rgba(242,193,78,.75); outline-offset:2px; border-radius:8px; }
svg { fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
kbd { font:700 11px/1 Montserrat, sans-serif; padding:4px 6px; border-radius:6px; border:1px solid var(--line);
  background:var(--bg); color:var(--muted); }

/* ---------- шапка ---------- */
.top { position:sticky; top:0; z-index:50; background:rgba(255,255,255,.92); backdrop-filter:saturate(1.3) blur(14px);
  box-shadow:0 1px 0 rgba(212,164,55,.4); }
.bar { height:var(--top); max-width:1440px; margin:0 auto; padding:0 22px; display:flex; align-items:center; gap:18px; }
.brand { display:flex; align-items:center; gap:10px; text-decoration:none; font-weight:900; font-size:19px; letter-spacing:-.4px; white-space:nowrap; }
.brand img { width:40px; height:40px; filter:drop-shadow(0 4px 12px rgba(242,193,78,.35)); transition:transform .25s var(--ease); }
.brand:hover img { transform:rotate(-8deg) scale(1.06); }
.brand b { color:var(--gold-dark); }
.brand em { font-style:normal; font-size:12px; font-weight:800; letter-spacing:.3px; padding:4px 9px; border-radius:999px;
  background:linear-gradient(180deg,var(--gold2),var(--gold)); color:var(--navy); }
.find { flex:1; max-width:460px; margin-left:18px; display:flex; align-items:center; gap:10px; height:44px; padding:0 10px 0 14px;
  border-radius:13px; border:1px solid var(--line); background:var(--bg); color:var(--muted); font:600 14px Montserrat, sans-serif;
  cursor:pointer; transition:.2s var(--ease); }
.find:hover { border-color:var(--gold); background:#fff; box-shadow:0 0 0 3px rgba(242,193,78,.2); }
.find svg { width:18px; height:18px; flex:none; }
.find span { flex:1; text-align:left; }
.out { display:flex; gap:2px; margin-left:auto; }
.out a { text-decoration:none; font-weight:700; font-size:14px; padding:9px 13px; border-radius:999px; transition:background .2s; }
.out a:hover { background:rgba(242,193,78,.22); }
.btn { display:inline-flex; align-items:center; height:44px; padding:0 20px; border-radius:12px; font-weight:800; font-size:14px;
  text-decoration:none; transition:.2s var(--ease); }
.btn.gold { background:linear-gradient(180deg,var(--gold2),var(--gold)); color:var(--navy); }
.btn:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(4,8,20,.15); }
.menu { display:none; width:44px; height:44px; border-radius:13px; border:1px solid var(--line); background:#fff; cursor:pointer;
  align-items:center; justify-content:center; padding:0; color:var(--navy); flex:none; }
.menu i, .menu i::before, .menu i::after { display:block; width:18px; height:2px; border-radius:2px; background:currentColor; position:relative;
  transition:transform .3s var(--ease), background .2s; }
.menu i::before, .menu i::after { content:''; position:absolute; left:0; }
.menu i::before { top:-6px; } .menu i::after { top:6px; }
.side-open .menu i { background:transparent; }
.side-open .menu i::before { transform:translateY(6px) rotate(45deg); }
.side-open .menu i::after { transform:translateY(-6px) rotate(-45deg); }

/* ---------- раскладка ---------- */
.layout { max-width:1440px; margin:0 auto; display:grid; grid-template-columns:272px minmax(0,1fr); gap:0; }
.side { position:sticky; top:var(--top); height:calc(100vh - var(--top)); overflow:auto; padding:22px 14px 30px 22px;
  border-right:1px solid rgba(212,164,55,.25); scrollbar-width:thin; }
.grp { margin-bottom:6px; }
.grp summary { list-style:none; display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:11px; cursor:pointer;
  font-weight:800; font-size:13px; letter-spacing:.4px; text-transform:uppercase; color:var(--gold-dark); user-select:none; }
.grp summary::-webkit-details-marker { display:none; }
.grp summary::after { content:''; margin-left:auto; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor;
  transform:rotate(-45deg); transition:transform .25s var(--ease); opacity:.6; }
.grp[open] summary::after { transform:rotate(45deg); }
.grp summary:hover { background:rgba(242,193,78,.14); }
.ic { width:18px; height:18px; flex:none; }
.grp ul { list-style:none; margin:2px 0 8px; padding:0 0 0 20px; border-left:1px solid rgba(212,164,55,.28); margin-left:19px; }
.grp li a { display:block; text-decoration:none; font-size:14.5px; font-weight:600; line-height:1.35; padding:7px 12px; border-radius:10px;
  color:#3a4356; transition:background .15s, color .15s; position:relative; }
.grp li a:hover { background:rgba(242,193,78,.14); color:var(--navy); }
.grp li a.on { background:rgba(242,193,78,.2); color:var(--navy); font-weight:800; box-shadow:inset 0 0 0 1px rgba(212,164,55,.3); }
.grp li.sub a { font-size:13.5px; padding:5px 12px 5px 26px; color:var(--muted); }
.grp li.sub a::after { content:''; position:absolute; left:13px; top:50%; width:5px; height:5px; margin-top:-2px; border-radius:50%; background:rgba(212,164,55,.55); }
.grp li.sub a.on { color:var(--navy); }
.grp li a.on::before { content:''; position:absolute; left:-21px; top:8px; bottom:8px; width:3px; border-radius:3px; background:var(--gold); }
.sidefoot { margin-top:18px; padding:14px; border-radius:14px; background:#fff; border:1px dashed var(--line); font-size:13px; font-weight:700; }
.sidefoot a { color:var(--gold-dark); }

/* ---------- статья ---------- */
.doc { display:grid; grid-template-columns:minmax(0,800px) 220px; gap:48px; padding:34px 40px 60px; justify-content:center; }
article { min-width:0; }
.crumbs { display:flex; gap:8px; font-size:13px; font-weight:700; color:var(--muted); margin-bottom:10px; }
.crumbs a { text-decoration:none; } .crumbs a:hover { color:var(--gold-dark); }
h1, h2, h3 { font-weight:900; letter-spacing:-.6px; line-height:1.2; }
article h1 { font-size:44px; letter-spacing:-1.3px; margin:0 0 14px; }
.lead { font-size:18.5px; line-height:1.65; color:#4a5366; margin:0 0 30px; padding-bottom:26px; border-bottom:1px solid rgba(212,164,55,.3); }
.body h2 { font-size:28px; margin:46px 0 14px; padding-top:4px; position:relative; }
.body h2::before { content:''; position:absolute; left:0; top:-14px; width:42px; height:4px; border-radius:4px;
  background:linear-gradient(90deg,var(--gold),var(--gold2)); }
.body h3 { font-size:20px; margin:30px 0 10px; }
.body p, .body li { color:#2c3446; }
.body ul, .body ol { padding-left:22px; }
.body li { margin:5px 0; }
.body li::marker { color:var(--gold-dark); font-weight:800; }
.body a { color:var(--gold-dark); font-weight:700; text-decoration:underline; text-decoration-color:rgba(138,100,18,.35);
  text-underline-offset:3px; transition:text-decoration-color .2s; }
.body a:hover { text-decoration-color:var(--gold-dark); }
.body strong { font-weight:800; color:var(--navy); }
.body hr { border:0; height:1px; background:rgba(212,164,55,.35); margin:36px 0; }
code { font:600 .88em/1.4 ui-monospace, Consolas, monospace; background:rgba(242,193,78,.18); border:1px solid rgba(212,164,55,.3);
  padding:2px 7px; border-radius:7px; color:#5d430b; white-space:nowrap; }
code.cmd { cursor:copy; transition:.15s; }
code.cmd:hover { background:var(--gold2); border-color:var(--gold); }
code.cmd.ok { background:#dff5e7; border-color:#7fd3a0; color:#1d6b3c; }
pre { background:var(--navy); color:#e8ecf4; padding:16px 18px; border-radius:14px; overflow:auto; }
pre code { background:none; border:0; color:inherit; padding:0; white-space:pre; }
.body img { max-width:100%; border-radius:14px; }

/* таблицы */
.tw { overflow-x:auto; margin:18px 0 24px; border-radius:16px; border:1px solid var(--line); background:#fff;
  box-shadow:0 10px 26px rgba(4,8,20,.06); }
table { border-collapse:collapse; width:100%; font-size:14.5px; }
th { text-align:left; font-size:12px; letter-spacing:.5px; text-transform:uppercase; color:var(--gold-dark); font-weight:800;
  background:linear-gradient(180deg,#fffaf0,#fff6e2); padding:11px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:11px 14px; border-bottom:1px solid rgba(27,36,51,.06); vertical-align:top; }
tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:rgba(242,193,78,.06); }

/* плашки-подсказки (!!! tip) */
.admonition { margin:22px 0; padding:16px 18px 16px 54px; border-radius:16px; position:relative; background:#fff;
  border:1px solid var(--line); box-shadow:0 8px 22px rgba(4,8,20,.05); }
.admonition::before { position:absolute; left:16px; top:15px; width:26px; height:26px; border-radius:9px; display:flex;
  align-items:center; justify-content:center; font-weight:900; font-size:15px; content:'i'; background:var(--gold2); color:var(--gold-dark); }
.admonition-title { margin:0 0 4px !important; font-weight:800; color:var(--navy) !important; }
.admonition p:last-child { margin-bottom:0; }
.admonition.tip { background:linear-gradient(180deg,#fffaf0,#fff); }
.admonition.tip::before { content:'★'; }
.admonition.warning { border-color:rgba(214,69,69,.35); background:linear-gradient(180deg,#fff6f5,#fff); }
.admonition.warning::before { content:'!'; background:#ffd9d6; color:#a12a2a; }
.admonition.note::before { content:'i'; background:#d9f0fb; color:#1f6f96; }
.admonition.note { border-color:rgba(79,195,247,.4); }

blockquote { margin:20px 0; padding:4px 18px; border-left:4px solid var(--gold); background:#fff; border-radius:0 14px 14px 0; color:#3a4356; }
.need.big { margin:16px 0 20px; padding:14px; border-radius:16px; background:#fff; border:1px solid var(--line); }
.need.big .res { font-size:14px; padding:5px 12px; margin:4px 6px 4px 0; }

/* привилегии: «+», «++», «+++» — синие, как в игре */
.rk { color:#2f9fd6; font-weight:900; letter-spacing:.5px; font-family:Montserrat, sans-serif; }
code .rk, code.cmd .rk { color:#1f86ba; }
.toc .rk, .crumbs .rk { color:#2f9fd6; }
.cmp th.rkc { text-align:center; font-size:20px; letter-spacing:1px; }
.cmp td.c, .cmp td.num { text-align:center; white-space:nowrap; }
.cmp td.num { font-weight:800; font-variant-numeric:tabular-nums; }
.cmp .yes { color:#1f9d55; font-weight:900; font-size:17px; }
.cmp .no { color:#c4c7cf; font-weight:700; }
.cmp a { text-decoration:none !important; }
.rank { margin:34px 0; padding:22px 22px 8px; border-radius:22px; background:#fff; border:1px solid rgba(79,195,247,.45);
  box-shadow:0 12px 30px rgba(4,8,20,.06); position:relative; }
.rank::before { content:''; position:absolute; left:22px; right:22px; top:0; height:3px; border-radius:0 0 4px 4px;
  background:linear-gradient(90deg,#4FC3F7,#9be3ff); }
.rank.free { border-color:var(--line); }
.rank.free::before { background:linear-gradient(90deg,var(--gold),var(--gold2)); }
.rank header { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.rank h2 { margin:0 !important; padding:0 !important; font-size:26px; }
.rank h2::before { display:none; }
.rank h2 .rk { font-size:30px; margin-left:4px; }
.rank .price { display:grid; grid-template-columns:auto auto; column-gap:8px; align-items:baseline; font-size:13px; color:var(--muted); font-weight:700; }
.rank .price b { color:var(--navy); font-size:18px; font-weight:900; text-align:right; font-variant-numeric:tabular-nums; }
.rank .inh { margin:14px 0 4px; color:var(--muted); font-weight:700; }
.rank .perks { margin:8px 0 6px; }
.rank h3 { margin:20px 0 10px; }

/* набор как инвентарь Minecraft: два ряда по пять */
.inv { display:block; width:max-content; max-width:100%; margin:4px 0 0; padding:10px 12px 12px; border-radius:8px; background:#c6c6c6;
  box-shadow:inset 3px 3px 0 #fff, inset -3px -3px 0 #555, 0 14px 30px rgba(4,8,20,.14); }
.invt { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 1px 9px;
  font:700 13px/1.2 Montserrat, sans-serif; color:#3f3f3f; }
.invt em { font-style:normal; font-weight:800; font-size:12px; color:#fff; background:#2f9fd6; padding:4px 10px; border-radius:999px;
  box-shadow:inset 0 -2px 0 rgba(0,0,0,.18); white-space:nowrap; }
.rank.free .invt em { background:#c9952a; }
.grid { display:grid; grid-template-columns:repeat(5, 56px); }
.slot { position:relative; width:56px; height:56px; background:#8b8b8b; box-shadow:inset 3px 3px 0 #373737, inset -3px -3px 0 #fff;
  display:flex; align-items:center; justify-content:center; outline:none; cursor:default; }
.slot img { width:40px; height:40px; image-rendering:pixelated; position:relative; z-index:1; transition:transform .15s; }
.slot:not(.empty):hover img, .slot:focus img { transform:scale(1.1); }
.slot .n { position:absolute; right:4px; bottom:2px; z-index:2; font:700 16px/1 'Courier New', monospace; color:#fff; text-shadow:2px 2px 0 #3f3f3f; }
.slot.glint img { filter:drop-shadow(0 0 1px rgba(190,120,255,.9)); }
.slot.glint::after { content:''; position:absolute; inset:8px; z-index:2; pointer-events:none; mix-blend-mode:screen; opacity:.55;
  -webkit-mask:var(--m) center/40px 40px no-repeat; mask:var(--m) center/40px 40px no-repeat;
  background:linear-gradient(115deg, transparent 30%, #b46bff 45%, #f0d8ff 50%, #b46bff 55%, transparent 70%) 0 0/300% 100%;
  animation:glint 3s linear infinite; }
@keyframes glint { from { background-position:150% 0; } to { background-position:-150% 0; } }
.slot:not(.empty):hover, .slot:focus { background:#a3a3a3; }
.slot .tip { display:none; position:absolute; left:calc(100% - 8px); top:-8px; z-index:20; min-width:max-content; padding:6px 9px; border-radius:4px;
  background:rgba(16,0,16,.94); border:2px solid #2a0d5e; box-shadow:inset 0 0 0 1px #5000a8; font:600 13px/1.5 Montserrat, sans-serif; color:#fff; text-align:left; }
.slot:nth-child(5n) .tip, .slot:nth-child(5n-1) .tip { left:auto; right:calc(100% - 8px); }   /* у правого края — подсказка влево */
.slot:hover .tip, .slot:focus .tip { display:block; }
.slot .tip b { display:block; font-weight:800; }
.slot .tip b.e { color:#7ff3ff; }
.slot .tip i { display:block; font-style:normal; color:#a8a8a8; }
.kitlist { font-size:13.5px; color:var(--muted); margin:10px 0 14px; max-width:620px; }
@media (max-width:700px) {
  .grid { grid-template-columns:repeat(5, 48px); }
  .slot { width:48px; height:48px; }
  .slot img { width:34px; height:34px; }
  .slot.glint::after { inset:7px; -webkit-mask-size:34px 34px; mask-size:34px 34px; }
  .slot .n { font-size:14px; }
  .slot .tip { left:50% !important; right:auto !important; top:calc(100% - 4px); transform:translateX(-50%); }
  .slot:nth-child(5n+1) .tip { transform:none; left:0 !important; }
  .slot:nth-child(5n) .tip { transform:none; left:auto !important; right:0 !important; }
  .rank { padding:18px 14px 6px; }
}

/* шаги */
.steps { counter-reset:s; list-style:none; padding:0 !important; }
.steps > li { counter-increment:s; position:relative; padding:4px 0 14px 52px; margin:0 !important; }
.steps > li::before { content:counter(s); position:absolute; left:0; top:2px; width:34px; height:34px; border-radius:11px;
  display:flex; align-items:center; justify-content:center; font-weight:900; background:linear-gradient(180deg,var(--gold2),var(--gold)); color:var(--navy); }
.steps > li::after { content:''; position:absolute; left:16px; top:42px; bottom:4px; width:2px; background:rgba(212,164,55,.3); }
.steps > li:last-child::after { display:none; }

/* плитки категорий */
.tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin:22px 0; }
.tile { display:flex; flex-direction:column; gap:6px; padding:18px; border-radius:18px; background:#fff; border:1px solid var(--line);
  text-decoration:none !important; position:relative; overflow:hidden; transition:.22s var(--ease); }
.tile::before { content:''; position:absolute; inset:0 0 auto; height:4px; background:var(--c); }
.tile:hover { transform:translateY(-4px); box-shadow:0 18px 36px rgba(4,8,20,.12); border-color:var(--gold); }
.tile b { font-size:17px; font-weight:900; color:var(--navy); }
.tile span { font-size:13.5px; color:var(--muted); font-weight:600; line-height:1.45; }
.tile em { margin-top:auto; font-style:normal; font-size:12.5px; font-weight:800; color:var(--gold-dark); }

/* карточки построек */
.bgrid { display:grid; gap:18px; }
.bcard { background:#fff; border:1px solid var(--line); border-radius:20px; padding:20px 20px 6px; position:relative;
  box-shadow:0 10px 26px rgba(4,8,20,.05); }
.bcard::before { content:''; position:absolute; left:20px; right:20px; top:0; height:3px; border-radius:0 0 4px 4px; background:var(--c); }
.bcard header { display:flex; align-items:center; gap:14px; }
.bcard .sym, .wcard .sym { width:44px; height:44px; flex:none; border-radius:13px; display:flex; align-items:center; justify-content:center;
  font-size:21px; background:color-mix(in srgb, var(--c, var(--gold)) 16%, #fff); border:1px solid color-mix(in srgb, var(--c, var(--gold)) 40%, #fff); }
.bcard h3, .wcard h3 { margin:0; font-size:20px; }
.bcard small, .wcard small { color:var(--muted); font-weight:700; font-size:12.5px; }
.bcard .anchor { margin-left:auto; text-decoration:none !important; color:rgba(138,100,18,.4); font-weight:900; font-size:18px; }
.bcard .anchor::before { content:'#'; }
.bcard .anchor:hover { color:var(--gold-dark); }
.bcard > p { margin:12px 0 0; }
.bcard .tw { box-shadow:none; margin:14px 0; }
.lvl td.lv { font-weight:900; color:var(--gold-dark); width:52px; }
.lvl td.num { white-space:nowrap; font-weight:800; font-variant-numeric:tabular-nums; }
.res { display:inline-block; margin:2px 6px 2px 0; padding:2px 9px; border-radius:999px; background:var(--bg);
  border:1px solid rgba(212,164,55,.28); font-size:13px; font-weight:600; white-space:nowrap; }
.res b { font-weight:800; font-variant-numeric:tabular-nums; }

/* чудеса */
.wgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:16px; margin-top:24px; }
.wcard { --c:#4FC3F7; background:#fff; border:1px solid var(--line); border-radius:20px; padding:18px; display:flex; flex-direction:column; gap:10px;
  transition:.22s var(--ease); }
.wcard:hover { box-shadow:0 18px 36px rgba(4,8,20,.1); border-color:var(--gold); }
.wtop { display:flex; align-items:center; gap:12px; }
.wcard .price { margin-left:auto; font-weight:900; color:var(--gold-dark); white-space:nowrap; font-variant-numeric:tabular-nums; }
.wcard p { margin:0; font-size:14.5px; }
.wcard .story { color:var(--muted); font-style:italic; }
.wcard .bonus { font-weight:700; }
.wcard .need { margin-top:auto; }

/* содержание справа */
.toc { position:sticky; top:calc(var(--top) + 30px); align-self:start; max-height:calc(100vh - var(--top) - 60px); overflow:auto; font-size:13.5px; }
.toc b { display:block; font-size:12px; letter-spacing:.6px; text-transform:uppercase; color:var(--gold-dark); margin-bottom:10px; }
.toc ul { list-style:none; margin:0; padding:0; border-left:2px solid rgba(212,164,55,.25); }
.toc li a { display:block; padding:5px 0 5px 14px; margin-left:-2px; border-left:2px solid transparent; text-decoration:none; color:var(--muted);
  font-weight:600; line-height:1.4; transition:color .15s, border-color .15s; }
.toc li.l3 a { padding-left:26px; font-size:13px; }
.toc li a:hover { color:var(--navy); }
.toc li a.on { color:var(--navy); border-left-color:var(--gold); font-weight:800; }

/* назад / дальше */
.pn { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:56px; }
.pn a { display:flex; flex-direction:column; gap:2px; padding:16px 18px; border-radius:16px; border:1px solid var(--line); background:#fff;
  text-decoration:none; transition:.2s var(--ease); }
.pn a:hover { border-color:var(--gold); transform:translateY(-2px); box-shadow:0 12px 26px rgba(4,8,20,.08); }
.pn small { color:var(--muted); font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.5px; }
.pn b { font-weight:800; }
.pn .next { text-align:right; grid-column:2; }
.pn .prev small::before { content:'← '; } .pn .next small::after { content:' →'; }

/* ---------- главная вики ---------- */
.home { padding:0 40px 60px; min-width:0; }
.hero { margin:0 -40px; padding:56px 40px 46px; text-align:center; position:relative; overflow:hidden;
  background:linear-gradient(180deg,#fffdf7,var(--bg)); border-bottom:1px solid rgba(212,164,55,.3); }
.hero::before { content:''; position:absolute; left:50%; top:-260px; width:900px; height:520px; margin-left:-450px; border-radius:50%;
  background:radial-gradient(circle, rgba(242,193,78,.25), transparent 62%); }
.hero > * { position:relative; }
.hero h1 { font-size:54px; letter-spacing:-1.6px; margin:0 0 12px; }
.hero h1 em { font-style:normal; background:linear-gradient(90deg,#c9971f,#f2c14e,#c9971f); background-size:200% auto;
  -webkit-background-clip:text; background-clip:text; color:transparent; animation:shine 6s linear infinite; }
@keyframes shine { to { background-position:200% center; } }
.hero p { max-width:640px; margin:0 auto 24px; color:#4a5366; font-size:17.5px; }
.hero .find { margin:0 auto; max-width:560px; height:56px; font-size:15.5px; background:#fff; box-shadow:0 14px 34px rgba(4,8,20,.08); }
.quick { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:16px; }
.quick a { text-decoration:none; font-size:13.5px; font-weight:700; padding:7px 13px; border-radius:999px; background:#fff;
  border:1px solid var(--line); transition:.2s; }
.quick a:hover { border-color:var(--gold); background:var(--gold2); }
.hgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:18px; margin-top:34px; }
.hsec { background:#fff; border:1px solid var(--line); border-radius:22px; padding:20px 18px 12px; box-shadow:0 12px 30px rgba(4,8,20,.05); }
.hsec h2 { display:flex; align-items:center; gap:10px; font-size:19px; margin:0 0 10px; padding:0 4px; }
.hsec h2 .ic { width:34px; height:34px; padding:7px; border-radius:11px; background:linear-gradient(180deg,var(--gold2),var(--gold)); }
.hsec ul { list-style:none; margin:0; padding:0; }
.hsec li a { display:block; padding:10px 10px; border-radius:12px; text-decoration:none; transition:background .15s; }
.hsec li a:hover { background:rgba(242,193,78,.12); }
.hsec li b { display:block; font-size:15px; }
.hsec li span { display:block; font-size:13px; color:var(--muted); font-weight:600; line-height:1.45; }

/* ---------- поиск ---------- */
.sbox { position:fixed; inset:0; z-index:100; background:rgba(27,36,51,.35); backdrop-filter:blur(4px); display:flex;
  justify-content:center; align-items:flex-start; padding:9vh 16px 16px; }
.sbox[hidden] { display:none; }
.spanel { width:100%; max-width:640px; max-height:76vh; display:flex; flex-direction:column; background:#fff; border-radius:20px;
  border:1px solid var(--line); box-shadow:0 30px 80px rgba(4,8,20,.35); overflow:hidden; animation:pop .25s var(--ease); }
@keyframes pop { from { opacity:0; transform:translateY(-10px) scale(.98); } }
.sin { display:flex; align-items:center; gap:12px; padding:0 16px; border-bottom:1px solid rgba(212,164,55,.3); }
.sin svg { width:20px; height:20px; color:var(--gold-dark); flex:none; }
.sin input { flex:1; height:60px; border:0; outline:0; font:600 17px Montserrat, sans-serif; color:var(--navy); background:none; min-width:0; }
.sin input::-webkit-search-cancel-button { display:none; }
.sres { overflow:auto; padding:8px; }
.sres a { display:block; padding:11px 14px; border-radius:13px; text-decoration:none; }
.sres a.cur, .sres a:hover { background:rgba(242,193,78,.16); }
.sres small { display:block; font-size:11.5px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; color:var(--gold-dark); }
.sres b { display:block; font-weight:800; font-size:15.5px; }
.sres span { display:block; font-size:13.5px; color:var(--muted); line-height:1.45; }
.sres mark { background:var(--gold2); color:inherit; border-radius:4px; padding:0 2px; }
.sres a.donhit { border:1px solid rgba(47,159,214,.28); background:linear-gradient(100deg, rgba(47,159,214,.08), rgba(255,250,235,.5)); margin-bottom:4px; }
.sres a.donhit.cur, .sres a.donhit:hover { background:linear-gradient(100deg, rgba(47,159,214,.16), rgba(255,227,154,.45)); border-color:#2f9fd6; }
.sres a.donhit b { font-size:17px; }
.sres .rks { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.sres .rks em { display:inline-flex; align-items:baseline; gap:7px; padding:6px 12px; border-radius:999px; background:#fff; border:1px solid rgba(47,159,214,.35);
  font-style:normal; font-weight:800; font-size:13.5px; color:var(--navy); font-variant-numeric:tabular-nums; cursor:pointer; transition:transform .12s, box-shadow .12s; }
.sres .rks em:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(47,159,214,.25); }
.sres .rks em .rk { font-size:16px; font-style:normal; }
.sres .rks em u { text-decoration:none; font-weight:600; color:var(--muted); font-size:12px; margin-left:-5px; }
.sres i.rk { font-style:normal; }
.sres .none { padding:26px; text-align:center; color:var(--muted); font-weight:600; }

/* ИИ-помощник в поиске */
.sres a.airow { display:grid; grid-template-columns:34px 1fr; column-gap:12px; align-items:center;
  background:linear-gradient(90deg, rgba(255,227,154,.35), rgba(255,255,255,0)); border:1px solid rgba(212,164,55,.35); margin-bottom:6px; }
.sres a.airow.cur, .sres a.airow:hover { background:linear-gradient(90deg, rgba(255,227,154,.7), rgba(255,250,235,.6)); border-color:var(--gold); }
.airow i, .aiq i { grid-row:span 2; width:34px; height:34px; border-radius:11px; display:flex; align-items:center; justify-content:center;
  font-style:normal; font-size:16px; color:var(--navy); background:linear-gradient(180deg,var(--gold2),var(--gold)); box-shadow:0 4px 12px rgba(212,164,55,.35); }
.airow span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.aians { padding:10px 10px 6px; }
.aiq { display:flex; align-items:center; gap:12px; font-weight:800; font-size:16px; margin-bottom:12px; }
.aiq i { flex:none; }
.ait { padding:14px 16px; border-radius:16px; background:var(--bg); border:1px solid rgba(212,164,55,.3); font-size:15px; line-height:1.65; color:#2c3446; min-height:52px; }
.ait p { margin:0 0 10px; } .ait p:last-child { margin-bottom:0; }
.ait ul { margin:6px 0 10px; padding-left:20px; } .ait li { margin:3px 0; }
.sres .ait a, .sres .ait b { display:inline; padding:0; border-radius:0; font-size:inherit; background:none; }
.sres .ait b { font-weight:800; color:var(--navy); }
.sres .ait a { color:var(--gold-dark); font-weight:700; text-decoration:underline; text-decoration-color:rgba(138,100,18,.35); text-underline-offset:3px; }
.ait code { white-space:nowrap; }
.caret { display:inline-block; width:8px; height:16px; margin-left:2px; vertical-align:-2px; border-radius:2px; background:var(--gold); animation:blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity:0; } }
.dots { display:inline-flex; gap:5px; padding:6px 0; }
.dots i { width:8px; height:8px; border-radius:50%; background:var(--gold); animation:dot 1.1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay:.15s; } .dots i:nth-child(3) { animation-delay:.3s; }
@keyframes dot { 0%, 80%, 100% { transform:scale(.6); opacity:.4; } 40% { transform:none; opacity:1; } }
.aisrc { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px; }
.aisrc:empty { display:none; }
.aisrc small { width:100%; font-size:11.5px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; color:var(--gold-dark); }
.sres .aisrc a { display:inline-block; padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:#fff; font-weight:700; font-size:13.5px; }
.sres .aisrc a:hover { background:var(--gold2); }
.aifoot { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; font-size:12px; color:var(--muted); font-weight:600; }
.aiback { border:0; background:none; font:800 13px Montserrat, sans-serif; color:var(--gold-dark); cursor:pointer; padding:6px 0; }
@media (max-width:700px) { .aifoot { flex-direction:column; align-items:flex-start; gap:2px; } }

/* ---------- подвал ---------- */
.foot { border-top:1px solid rgba(212,164,55,.3); background:#fff; padding:26px 22px; text-align:center; font-size:13.5px; font-weight:600; color:var(--muted); }
.foot a { color:var(--navy); font-weight:700; }
.foot span { font-size:12.5px; opacity:.8; }

/* ---------- адаптив ---------- */
@media (max-width:1200px) {
  .doc { grid-template-columns:minmax(0,800px); }
  .toc { display:none; }
}
@media (max-width:980px) {
  .out { display:none; }
  .menu { display:inline-flex; }
  .layout { grid-template-columns:1fr; }
  .side { position:fixed; z-index:60; left:0; top:var(--top); width:min(320px,86vw); background:#fff; border-right:1px solid var(--line);
    box-shadow:20px 0 50px rgba(4,8,20,.15); transform:translateX(-105%); visibility:hidden; }
  .ready .side { transition:transform .35s var(--ease), visibility .35s; }
  .side-open .side { visibility:visible; }
  .side-open .side { transform:none; }
  .side-open::after { content:''; position:fixed; inset:var(--top) 0 0; background:rgba(27,36,51,.3); z-index:55; }
  .play { margin-left:auto; }
  .find { margin-left:0; }
}
@media (max-width:700px) {
  :root { --top:64px; }
  body { font-size:15.5px; }
  .bar { padding:0 14px; gap:10px; }
  .brand span { display:none; }
  .find { height:42px; }
  .find kbd { display:none; }
  .play { display:none; }
  .doc { padding:22px 16px 40px; }
  article h1 { font-size:32px; }
  .lead { font-size:16.5px; }
  .body h2 { font-size:24px; }
  .home { padding:0 16px 40px; }
  .hero { margin:0 -16px; padding:38px 16px 34px; }
  .hero h1 { font-size:36px; }
  .hgrid, .wgrid { grid-template-columns:1fr; }
  .pn { grid-template-columns:1fr; }
  .pn .next { grid-column:1; }
  code { white-space:normal; }
}
@media (prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; } html { scroll-behavior:auto; } }
