/* =====================================================================
   Walkirya OS — Knowledge Base + Forum skin
   /kb, /kb/<slug>                → body.os-site.os-page-kb
   /forum, /forum/topic/<id>      → body.os-site.os-page-forum
   Every selector starts with both body classes: the rules outrank portal-os.css whatever the
   <link> order and cannot leak to other pages. Colours come from the portal-os.css tokens.
   Optional enhancer: assets/js/portal-os-kb.js (status bar, TOC highlight, reading bar, avatars).
   ===================================================================== */

/* ---------- 0. local tokens + icons (inline SVG, no requests) ---------- */
body.os-site.os-page-kb,
body.os-site.os-page-forum {
  --kbx-measure: 680px; /* ≈ 72ch of 17px PT Sans */
  --kbx-read: color-mix(in srgb, var(--os-text) 55%, var(--os-text-2)); /* long-read text, ~13:1 on --os-1 */
  --kbx-glass: linear-gradient(rgba(255, 255, 255, .09), rgba(255, 255, 255, .025) 50%, rgba(0, 0, 0, .12) 51%, rgba(255, 255, 255, .035));
  --kbx-glass-hi: linear-gradient(rgba(255, 255, 255, .17), rgba(255, 255, 255, .06) 50%, rgba(0, 0, 0, .06) 51%, rgba(255, 255, 255, .08));
  --kbx-btn: linear-gradient(#3a3f49, #22262d 50%, #1a1d23 51%, #23272e);
  --kbx-red-glass: linear-gradient(#ff6a60, var(--os-red) 48%, #d81421 52%, var(--os-red-lo));
  --kbx-strip: linear-gradient(#262a32, #15171c 60%, #101216);
  --kbx-ic-search: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='6.6' cy='6.6' r='4.6' fill='none' stroke='%23b9bfca' stroke-width='1.7'/><path d='M10.1 10.1l4.1 4.1' stroke='%23b9bfca' stroke-width='2' stroke-linecap='round'/></svg>");
  --kbx-ic-clock: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6.3' fill='none' stroke='%233ddc6a' stroke-width='1.6'/><path d='M8 4.4V8l2.5 1.7' fill='none' stroke='%233ddc6a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  --kbx-ic-doc: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1.5h6l3 3v10h-9z' fill='%23242932' stroke='%23b9bfca' stroke-linejoin='round'/><path d='M9.5 1.5v3h3' fill='none' stroke='%23b9bfca' stroke-linejoin='round'/><path d='M5.5 7.5h5M5.5 9.5h5M5.5 11.5h3.2' stroke='%23ff2b38' stroke-linecap='round'/></svg>");
  --kbx-ic-folder: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1.5 3h4.6l1.6 1.6h6.8v8.9h-13z' fill='%23d99a1c' stroke='%237a5508' stroke-linejoin='round'/><path d='M1.5 6.2h13v7.3h-13z' fill='%23ffc23d' stroke='%237a5508' stroke-linejoin='round'/></svg>");
  --kbx-ic-list: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><g fill='%23ff2b38'><rect x='1.5' y='2.8' width='2.4' height='2.4' rx='.4'/><rect x='1.5' y='6.8' width='2.4' height='2.4' rx='.4'/><rect x='1.5' y='10.8' width='2.4' height='2.4' rx='.4'/></g><path d='M6 4h8.5M6 8h8.5M6 12h6' stroke='%23b9bfca' stroke-width='1.5' stroke-linecap='round'/></svg>");
  --kbx-ic-star: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 1.4l2 4.1 4.5.6-3.3 3.1.8 4.4L8 11.5l-4 2.1.8-4.4-3.3-3.1 4.5-.6z' fill='%23ffc23d' stroke='%237a5508' stroke-width='.8' stroke-linejoin='round'/></svg>");
  --kbx-ic-info: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='9' fill='%232f9bff' stroke='%23000' stroke-opacity='.4'/><circle cx='10' cy='5.9' r='1.35' fill='%23fff'/><rect x='8.9' y='8.4' width='2.2' height='6.8' rx='.7' fill='%23fff'/></svg>");
  --kbx-ic-warn: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 1.6l8.8 15.8H1.2z' fill='%23ff2b38' stroke='%23000' stroke-opacity='.45' stroke-linejoin='round'/><rect x='8.9' y='6.6' width='2.2' height='6' rx='.7' fill='%23fff'/><circle cx='10' cy='14.9' r='1.25' fill='%23fff'/></svg>");
  --kbx-ic-topic: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 4.5h18v11.5H10l-5 4v-4H3z' fill='%23242932' stroke='%23b9bfca' stroke-width='1.3' stroke-linejoin='round'/><path d='M7 8.7h10M7 11.8h6.5' stroke='%232f9bff' stroke-width='1.6' stroke-linecap='round'/></svg>");
  --kbx-ic-pin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 4.5h18v11.5H10l-5 4v-4H3z' fill='%23b0101b' stroke='%23ff5e55' stroke-width='1.3' stroke-linejoin='round'/><path d='M12 6.4l1.4 2.8 3.1.4-2.2 2.2.5 3.1-2.8-1.5-2.8 1.5.5-3.1-2.2-2.2 3.1-.4z' fill='%23ffc23d'/></svg>");
  --kbx-ic-lock: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 4.5h18v11.5H10l-5 4v-4H3z' fill='%231b1f26' stroke='%237d8595' stroke-width='1.3' stroke-linejoin='round'/><rect x='9' y='9.2' width='6' height='4.6' rx='.8' fill='%23b9bfca'/><path d='M10.2 9.2V8a1.8 1.8 0 013.6 0v1.2' fill='none' stroke='%23b9bfca' stroke-width='1.3'/></svg>");
  --kbx-ic-mark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='%23ff2b38' d='M27 22c-7-7-17-8-25-5 5 2 8 4 10 7-4 0-7 1-9 3 5 0 8 1 10 3-3 1-5 3-6 6 5-2 9-2 12 0-1 2-1 4 0 6 4-3 7-8 8-14zM37 22c7-7 17-8 25-5-3 2-4 4-4 7-2-1-4-1-6 0 1 2 1 4 0 6-2-1-4-1-6 0 1 2 0 4-1 6-1-1-3-2-5-2 1 2 0 4-1 6-1-4-2-9-2-18zM32 11l12 5v13c0 10-6 17-12 22-6-5-12-12-12-22V16z'/></svg>");
  --kbx-ic-mark-dim: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='%23fff' fill-opacity='.2' d='M27 22c-7-7-17-8-25-5 5 2 8 4 10 7-4 0-7 1-9 3 5 0 8 1 10 3-3 1-5 3-6 6 5-2 9-2 12 0-1 2-1 4 0 6 4-3 7-8 8-14zM37 22c7-7 17-8 25-5-3 2-4 4-4 7-2-1-4-1-6 0 1 2 1 4 0 6-2-1-4-1-6 0 1 2 0 4-1 6-1-1-3-2-5-2 1 2 0 4-1 6-1-4-2-9-2-18zM32 11l12 5v13c0 10-6 17-12 22-6-5-12-12-12-22V16z'/></svg>");
}
body.os-site.os-page-kb { --kbx-ic-addr: var(--kbx-ic-folder); }
body.os-site.os-page-forum { --kbx-ic-addr: var(--kbx-ic-topic); }

/* keyboard focus: one red ring everywhere on these pages */
body.os-site.os-page-kb .os-wb :is(a, button, summary, [tabindex]):focus-visible,
body.os-site.os-page-forum .os-wb :is(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--os-red-hi); outline-offset: 2px;
}

/* =====================================================================
   1. SHARED — address bar, page banner, command bar (tabs + search)
   ===================================================================== */

/* breadcrumbs = Explorer address bar */
body.os-site.os-page-kb .breadcrumbs,
body.os-site.os-page-forum .breadcrumbs {
  position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 1px;
  min-height: 36px; margin: 0 0 16px; padding: 3px 8px 3px 38px;
  overflow: hidden; white-space: nowrap;
  background: linear-gradient(var(--os-black), var(--os-0));
  border: 1px solid var(--os-line-2); border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 1px 0 rgba(255, 255, 255, .04);
  color: var(--os-text-2); font-size: 13.5px;
}
body.os-site.os-page-kb .breadcrumbs::before,
body.os-site.os-page-forum .breadcrumbs::before {
  content: ''; position: absolute; left: 11px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: var(--kbx-ic-addr) center / contain no-repeat;
}
body.os-site.os-page-kb .breadcrumbs > *,
body.os-site.os-page-forum .breadcrumbs > * { flex: none; }
body.os-site.os-page-kb .breadcrumbs > a,
body.os-site.os-page-forum .breadcrumbs > a {
  padding: 4px 7px; border: 1px solid transparent; border-radius: 3px;
  color: var(--os-text-2); text-decoration: none; transition: color .15s, background .15s, border-color .15s;
}
body.os-site.os-page-kb .breadcrumbs > a:hover,
body.os-site.os-page-forum .breadcrumbs > a:hover { color: var(--os-text); background: var(--kbx-glass-hi); border-color: rgba(255, 255, 255, .12); }
/* the "/" separators (every even child) become Windows 7 ▸ chevrons */
body.os-site.os-page-kb .breadcrumbs > :nth-child(even),
body.os-site.os-page-forum .breadcrumbs > :nth-child(even) { padding: 0 3px; font-size: 0; color: var(--os-muted); }
body.os-site.os-page-kb .breadcrumbs > :nth-child(even)::before,
body.os-site.os-page-forum .breadcrumbs > :nth-child(even)::before { content: '\25B8'; font-size: 10px; }
body.os-site.os-page-kb .breadcrumbs > :last-child,
body.os-site.os-page-forum .breadcrumbs > :last-child {
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  padding: 4px 7px; color: var(--os-text); font-weight: 700;
}

/* page banner: KB index head, forum head, topic head */
body.os-site.os-page-kb #kb-page-root > .section-head,
body.os-site.os-page-forum #forum-page-root > .section-head,
body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 {
  position: relative; isolation: isolate; overflow: hidden;
  align-items: center; gap: 14px 20px; margin: 0 0 14px; padding: 18px 22px;
  border: 1px solid #000; border-radius: var(--os-r);
  background:
    radial-gradient(560px 190px at 0 0, rgba(255, 43, 56, .2), transparent 70%),
    linear-gradient(160deg, var(--os-3), var(--os-1) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 30px rgba(0, 0, 0, .4);
}
body.os-site.os-page-kb #kb-page-root > .section-head::after,
body.os-site.os-page-forum #forum-page-root > .section-head::after,
body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2::after {
  content: ''; position: absolute; z-index: -1; right: -20px; top: 50%; width: 190px; height: 190px; margin-top: -95px;
  background: var(--kbx-ic-mark) center / contain no-repeat; opacity: .07; transform: rotate(-10deg); pointer-events: none;
}
body.os-site.os-page-kb #kb-page-root > .section-head h1,
body.os-site.os-page-forum #forum-page-root > .section-head h1,
body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 h1 {
  margin: 0; color: var(--os-text); font-size: clamp(26px, 3.1vw, 38px); line-height: 1.12; text-wrap: balance;
  text-shadow: 0 2px 0 #000, 0 0 28px rgba(255, 43, 56, .28);
}
body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 h1 { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.18; }
body.os-site.os-page-kb #kb-page-root > .section-head h1::after,
body.os-site.os-page-forum #forum-page-root > .section-head h1::after,
body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 h1::after {
  content: ''; display: block; width: 56px; height: 3px; margin-top: 10px; border-radius: 2px;
  background: var(--os-red); box-shadow: 0 0 12px var(--os-red-glow);
}
body.os-site.os-page-kb #kb-page-root > .section-head p,
body.os-site.os-page-forum #forum-page-root > .section-head p { max-width: 72ch; margin: 10px 0 0; color: var(--os-text-2); font-size: 15px; }

/* command bar under the banner (category tabs + search box) */
body.os-site.os-page-kb #kb-page-root > .card.mb-2,
body.os-site.os-page-forum #forum-page-root > .card.mb-2 {
  margin-bottom: 16px; padding: 8px;
  border: 1px solid #000; border-radius: var(--os-r);
  background: linear-gradient(var(--os-3), var(--os-2) 55%, var(--os-1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 22px rgba(0, 0, 0, .35);
}
body.os-site.os-page-kb #kb-page-root > .card.mb-2 > .flex-between,
body.os-site.os-page-forum #forum-page-root > .card.mb-2 > .flex-between { align-items: flex-start; gap: 8px 12px; }
body.os-site.os-page-kb #kb-page-root > .card.mb-2 .tabs,
body.os-site.os-page-forum #forum-page-root > .card.mb-2 .tabs { flex: 1 1 560px; min-width: 0; }

/* tab strip (also the encyclopedia scope tabs) */
body.os-site.os-page-kb .tabs,
body.os-site.os-page-forum .tabs { gap: 4px; border-bottom: 0; }
body.os-site.os-page-kb .tabs .tab-btn,
body.os-site.os-page-forum .tabs .tab-btn {
  position: relative; display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px;
  border: 1px solid rgba(0, 0, 0, .85); border-radius: 4px;
  background: var(--kbx-glass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  color: var(--os-text-2); font: 700 13px/1.1 var(--os-ui); letter-spacing: .01em; white-space: nowrap; cursor: pointer;
  transition: color .15s, background .15s, box-shadow .2s, transform .15s var(--os-ease);
}
body.os-site.os-page-kb .tabs .tab-btn:hover,
body.os-site.os-page-forum .tabs .tab-btn:hover { color: var(--os-text); background: var(--kbx-glass-hi); }
body.os-site.os-page-kb .tabs .tab-btn:active,
body.os-site.os-page-forum .tabs .tab-btn:active { transform: translateY(1px); }
body.os-site.os-page-kb .tabs .tab-btn.active,
body.os-site.os-page-forum .tabs .tab-btn.active {
  color: #fff;
  background: linear-gradient(#3b4049, #272b32 50%, #1d2026 51%, #262a31);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -2px 0 var(--os-red), 0 0 0 1px rgba(255, 43, 56, .28), 0 4px 16px rgba(255, 43, 56, .2);
}

/* Explorer search boxes */
body.os-site.os-page-kb #kb-guide-filter,
body.os-site.os-page-kb #kb-db-q,
body.os-site.os-page-forum #forum-search-q {
  height: 36px; padding: 0 36px 0 12px;
  background: var(--os-black) var(--kbx-ic-search) no-repeat right 11px center / 15px 15px;
  border: 1px solid var(--os-line-2); border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
  color: var(--os-text); font: 14px var(--os-ui);
  transition: border-color .15s, box-shadow .2s;
}
body.os-site.os-page-kb #kb-guide-filter::placeholder,
body.os-site.os-page-kb #kb-db-q::placeholder,
body.os-site.os-page-forum #forum-search-q::placeholder { color: var(--os-muted); font-style: italic; opacity: 1; }
body.os-site.os-page-kb #kb-guide-filter:hover,
body.os-site.os-page-kb #kb-db-q:hover,
body.os-site.os-page-forum #forum-search-q:hover { border-color: rgba(255, 255, 255, .22); }
body.os-site.os-page-kb #kb-guide-filter:focus,
body.os-site.os-page-kb #kb-db-q:focus,
body.os-site.os-page-forum #forum-search-q:focus {
  outline: none; border-color: var(--os-red);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7), 0 0 0 3px rgba(255, 43, 56, .2), 0 0 18px rgba(255, 43, 56, .18);
}
body.os-site.os-page-kb #kb-guide-filter { flex: 0 1 280px; margin-left: auto; }
body.os-site.os-page-forum #forum-search-form { flex: 0 1 340px; flex-wrap: nowrap; gap: 6px; margin-left: auto; }
body.os-site.os-page-forum #forum-search-q { flex: 1 1 auto; min-width: 0; }
body.os-site.os-page-forum #forum-search-form .btn { flex: none; min-height: 36px; }

/* =====================================================================
   2. KB INDEX — guides as documents in an Explorer window
   ===================================================================== */
body.os-site.os-page-kb #kb-page-root > .grid-3 { gap: 16px; }
body.os-site.os-page-kb [data-guide-card] {
  position: relative; display: flex; flex-direction: column; padding: 10px 10px 14px;
  border: 1px solid var(--os-line); border-radius: var(--os-r);
  background: linear-gradient(var(--os-2), var(--os-1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 22px rgba(0, 0, 0, .35);
  transition: transform .25s var(--os-ease), border-color .25s, box-shadow .25s;
  animation: kbx-rise .55s var(--os-ease) backwards;
}
/* red edge that sweeps in on hover */
body.os-site.os-page-kb [data-guide-card]::before {
  content: ''; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--os-red) 20%, var(--os-red-hi) 50%, var(--os-red) 80%, transparent);
  box-shadow: 0 0 12px var(--os-red); opacity: 0; transform: scaleX(.2);
  transition: opacity .25s, transform .4s var(--os-ease);
}
body.os-site.os-page-kb [data-guide-card]:hover,
body.os-site.os-page-kb [data-guide-card]:focus-within {
  transform: translateY(-4px); border-color: rgba(255, 43, 56, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 38px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 43, 56, .18), 0 0 28px rgba(255, 43, 56, .16);
}
body.os-site.os-page-kb [data-guide-card]:hover::before,
body.os-site.os-page-kb [data-guide-card]:focus-within::before { opacity: 1; transform: none; }
body.os-site.os-page-kb [data-guide-card]:nth-child(1) { animation-delay: .04s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(2) { animation-delay: .08s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(3) { animation-delay: .12s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(4) { animation-delay: .16s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(5) { animation-delay: .2s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(6) { animation-delay: .24s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(7) { animation-delay: .28s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(8) { animation-delay: .32s; }
body.os-site.os-page-kb [data-guide-card]:nth-child(n+9) { animation-delay: .36s; }

/* thumbnail: thin black frame, glass sheen that sweeps on hover */
body.os-site.os-page-kb [data-guide-card] .guide-card-media {
  position: relative; margin: 0 0 12px; border: 1px solid #000; border-radius: 4px; background: var(--os-black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 6px 16px rgba(0, 0, 0, .45);
}
body.os-site.os-page-kb [data-guide-card] .guide-card-media img {
  filter: saturate(.92) brightness(.9);
  transition: transform .7s var(--os-ease), filter .4s;
}
body.os-site.os-page-kb [data-guide-card] .guide-card-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .16) 50%, transparent 62%) no-repeat 160% 0 / 260% 100%,
    linear-gradient(170deg, rgba(255, 255, 255, .1), transparent 32%),
    linear-gradient(transparent 55%, rgba(5, 5, 6, .55));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: background-position .9s var(--os-ease);
}
body.os-site.os-page-kb [data-guide-card]:hover .guide-card-media img { transform: scale(1.06); filter: saturate(1.08) brightness(1.02); }
body.os-site.os-page-kb [data-guide-card]:hover .guide-card-media::after { background-position: -60% 0, 0 0, 0 0; }

/* category tag + read-time status badge */
body.os-site.os-page-kb [data-guide-card] > .flex-between { gap: 8px; margin-bottom: 6px; }
body.os-site.os-page-kb [data-guide-card] .badge-gold { font-size: 11px; letter-spacing: .03em; }
body.os-site.os-page-kb [data-guide-card] > .flex-between > .muted {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px;
  border: 1px solid var(--os-line-2); border-radius: 3px; background: rgba(0, 0, 0, .35);
  color: var(--os-text-2); font-family: var(--os-mono); white-space: nowrap;
}
body.os-site.os-page-kb [data-guide-card] > .flex-between > .muted::before {
  content: ''; flex: none; width: 12px; height: 12px; background: var(--kbx-ic-clock) center / contain no-repeat;
  filter: drop-shadow(0 0 3px rgba(61, 220, 106, .5));
}

/* file-like caption; the title link covers the whole card */
body.os-site.os-page-kb [data-guide-card] > h3 {
  position: static; padding-left: 22px;
  font: 700 16.5px/1.3 var(--os-ui); letter-spacing: 0;
  background: var(--kbx-ic-doc) 0 .15em / 16px 16px no-repeat;
}
body.os-site.os-page-kb [data-guide-card] > h3 a {
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
body.os-site.os-page-kb [data-guide-card] > h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
body.os-site.os-page-kb [data-guide-card]:hover > h3 a { text-decoration-color: var(--os-red); }
body.os-site.os-page-kb [data-guide-card] > p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  color: var(--os-text-2); line-height: 1.55;
}

/* «Читать гайд →» = the window's Open button */
body.os-site.os-page-kb [data-guide-card] > a:last-child {
  position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center;
  min-height: 32px; margin-top: auto; padding: 0 13px;
  border: 1px solid rgba(0, 0, 0, .85); border-radius: 3px;
  background: var(--kbx-btn); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 2px rgba(0, 0, 0, .6);
  color: var(--os-text); text-decoration: none;
  transition: background .2s, box-shadow .2s, color .2s;
}
body.os-site.os-page-kb [data-guide-card]:hover > a:last-child,
body.os-site.os-page-kb [data-guide-card] > a:last-child:focus-visible {
  border-color: #3a0005; color: #fff; background: var(--kbx-red-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 18px rgba(255, 43, 56, .45);
}

/* the filter found nothing: Explorer's empty-folder message */
body.os-site.os-page-kb #kb-page-root > .grid-3:not(:has([data-guide-card]:not(.hidden)))::after {
  content: 'Нет элементов, удовлетворяющих условиям поиска.';
  grid-column: 1 / -1; padding: 40px 16px; text-align: center;
  border: 1px dashed var(--os-line-2); border-radius: var(--os-r); background: rgba(0, 0, 0, .25);
  color: var(--os-text-2); font-size: 14.5px;
}

/* status bar under the documents (added by portal-os-kb.js) */
body.os-site.os-page-kb .kbx-status {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 7px 12px;
  border: 1px solid #000; border-radius: 4px;
  background: linear-gradient(var(--os-2), var(--os-1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--os-text-2); font-size: 12.5px;
}
body.os-site.os-page-kb .kbx-status > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.os-site.os-page-kb .kbx-status > span:first-child { display: inline-flex; align-items: center; gap: 7px; flex: none; }
body.os-site.os-page-kb .kbx-status > span:first-child::before {
  content: ''; flex: none; width: 14px; height: 14px; background: var(--kbx-ic-doc) center / contain no-repeat;
}

/* =====================================================================
   3. KB INDEX — live XML encyclopedia (a second program window)
   ===================================================================== */
body.os-site.os-page-kb #encyclopedia { padding: 30px 0 0; }
body.os-site.os-page-kb #encyclopedia > .card {
  position: relative; overflow: hidden; padding: 20px 20px 22px;
  border: 1px solid #000; border-radius: var(--os-r);
  background:
    radial-gradient(520px 200px at 100% 0, rgba(47, 155, 255, .08), transparent 70%),
    linear-gradient(var(--os-2), var(--os-1) 240px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 14px 36px rgba(0, 0, 0, .45);
}
body.os-site.os-page-kb #encyclopedia > .card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--os-red), rgba(255, 43, 56, .3) 40%, transparent 75%);
}
body.os-site.os-page-kb #encyclopedia .section-head { margin-bottom: 16px; }
body.os-site.os-page-kb #encyclopedia .section-head h2 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; }
body.os-site.os-page-kb #encyclopedia .section-head p { color: var(--os-text-2); }
body.os-site.os-page-kb #kb-db-form { gap: 8px; }
body.os-site.os-page-kb #kb-db-q { height: 40px; }
body.os-site.os-page-kb #kb-db-form .btn { min-height: 40px; padding: 0 22px; }
body.os-site.os-page-kb #kb-db-results h3,
body.os-site.os-page-kb #kb-ref-dump h4 { font-family: var(--os-logo); font-style: italic; font-weight: 700; font-size: 17px; }
body.os-site.os-page-kb #kb-db-results .table-wrap { margin-bottom: 6px; }
body.os-site.os-page-kb #kb-db-results td a { font-weight: 700; }
body.os-site.os-page-kb #kb-db-results > p.muted { padding: 10px 0; }
body.os-site.os-page-kb #kb-ref-dump .badge { font-weight: 400; }

/* =====================================================================
   4. KB ARTICLE — navigation pane on the left, document on the right
   ===================================================================== */
@media (min-width: 981px) {
  body.os-site.os-page-kb .article-layout { grid-template-columns: 264px minmax(0, 1fr); gap: 22px; }
  body.os-site.os-page-kb .article-layout > article { grid-column: 2; grid-row: 1; }
  body.os-site.os-page-kb .article-layout > .toc-box { grid-column: 1; grid-row: 1; }
}

/* the document */
body.os-site.os-page-kb .article-layout > article {
  min-width: 0; padding: 22px clamp(18px, 3.2vw, 40px) 36px;
  border: 1px solid #000; border-radius: var(--os-r);
  background: linear-gradient(var(--os-2), var(--os-1) 360px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 40px rgba(0, 0, 0, .45);
  animation: kbx-fade .45s var(--os-ease) .05s backwards;
}
body.os-site.os-page-kb .article-layout .article-cover {
  position: relative; margin: 0 0 20px; border: 1px solid #000; border-radius: 5px; background: var(--os-black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 14px 34px rgba(0, 0, 0, .55);
}
body.os-site.os-page-kb .article-layout .article-cover::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(170deg, rgba(255, 255, 255, .1), transparent 30%), linear-gradient(transparent 55%, rgba(8, 9, 11, .6));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
body.os-site.os-page-kb .article-layout .article-cover img { animation: kbx-cover 1.1s var(--os-ease) backwards; }
body.os-site.os-page-kb .article-layout > article > .flex-row.mb-1 { gap: 8px 12px; margin: 0 0 4px; }
body.os-site.os-page-kb .article-layout > article > .flex-row.mb-1 > .muted { color: var(--os-text-2); }
body.os-site.os-page-kb .article-layout > article > h1 {
  max-width: 30em; color: var(--os-text); font-size: clamp(26px, 3vw, 38px); line-height: 1.15; text-wrap: balance;
  text-shadow: 0 2px 0 #000, 0 0 30px rgba(255, 43, 56, .22);
}
body.os-site.os-page-kb .article-layout > article > h1::after {
  content: ''; display: block; width: 64px; height: 3px; margin-top: 14px; border-radius: 2px;
  background: var(--os-red); box-shadow: 0 0 12px var(--os-red-glow);
}

/* voice version = the home page media player: chassis + green LCD + native controls */
body.os-site.os-page-kb .kb-listen {
  display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); align-items: center; gap: 8px 10px;
  max-width: var(--kbx-measure); margin: 0 0 26px; padding: 7px;
  border: 1px solid #000; border-radius: 8px;
  background: linear-gradient(160deg, var(--os-4), var(--os-2) 45%, var(--os-black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 22px rgba(0, 0, 0, .45);
}
body.os-site.os-page-kb .kb-listen-title {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px;
  border: 1px solid #000; border-radius: 5px;
  background: radial-gradient(120% 140% at 30% 0, #0d2418, #03100a 70%);
  box-shadow: inset 0 0 14px rgba(61, 220, 106, .14), 0 1px 0 rgba(255, 255, 255, .08);
  color: var(--os-green); font: 700 12.5px/1.2 var(--os-mono); letter-spacing: .05em; text-transform: uppercase;
  text-shadow: 0 0 6px rgba(61, 220, 106, .55); white-space: nowrap; overflow: hidden;
}
body.os-site.os-page-kb .kb-listen-title .muted { color: #2fbf6e; }
/* equalizer bars (dance while playing) */
body.os-site.os-page-kb .kb-listen-title::before {
  content: ''; flex: none; width: 19px; height: 16px;
  background:
    linear-gradient(var(--os-green), var(--os-green)) 0 100% / 3px 35% no-repeat,
    linear-gradient(var(--os-green), var(--os-green)) 5px 100% / 3px 70% no-repeat,
    linear-gradient(var(--os-green), var(--os-green)) 10px 100% / 3px 45% no-repeat,
    linear-gradient(var(--os-green), var(--os-green)) 15px 100% / 3px 60% no-repeat;
  filter: drop-shadow(0 0 3px rgba(61, 220, 106, .7)); opacity: .75;
}
/* ON AIR lamp */
body.os-site.os-page-kb .kb-listen-title::after {
  content: ''; flex: none; width: 8px; height: 8px; margin-left: auto; border-radius: 50%;
  background: #3a0a0d; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6);
}
body.os-site.os-page-kb .kb-listen.is-playing .kb-listen-title::before { opacity: 1; animation: kbx-eq .9s ease-in-out infinite alternate; }
body.os-site.os-page-kb .kb-listen.is-playing .kb-listen-title::after { background: var(--os-red); box-shadow: 0 0 10px var(--os-red); animation: kbx-pulse 1.2s ease-in-out infinite; }
body.os-site.os-page-kb .kb-listen audio { display: block; width: 100%; height: 40px; border-radius: 6px; }
/* Chrome / Edge / Safari draw light controls: flip them dark. Firefox controls are dark already. */
@supports not (-moz-appearance: none) {
  body.os-site.os-page-kb .kb-listen audio { color-scheme: light; filter: invert(1) hue-rotate(180deg) contrast(.92); }
}

/* ---------- reading typography ---------- */
body.os-site.os-page-kb .article-prose {
  color: var(--kbx-read); font-size: 17px; line-height: 1.72; overflow-wrap: break-word;
}
body.os-site.os-page-kb .article-prose > :is(p, ul, ol, blockquote, pre, hr, h2, h3, h4, .kb-tip, .kb-warn) { max-width: var(--kbx-measure); }
body.os-site.os-page-kb .article-prose p,
body.os-site.os-page-kb .article-prose li { color: var(--kbx-read); font-size: inherit; }
body.os-site.os-page-kb .article-prose p { margin: 0 0 1.05em; }
body.os-site.os-page-kb .article-prose > p:first-child { color: var(--os-text); font-size: 1.06em; }
body.os-site.os-page-kb .article-prose strong,
body.os-site.os-page-kb .article-prose b { color: var(--os-text); font-weight: 700; }
body.os-site.os-page-kb .article-prose em { color: var(--os-text); }
body.os-site.os-page-kb .article-prose a {
  color: var(--os-blue); text-decoration: underline; text-decoration-color: rgba(47, 155, 255, .45);
  text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s;
}
body.os-site.os-page-kb .article-prose a:hover { color: #8fc8ff; text-decoration-color: currentColor; }
body.os-site.os-page-kb .article-prose h2 {
  margin: 2.1em 0 .75em; color: var(--os-text); scroll-margin-top: 78px;
  font: italic 800 clamp(22px, 2.3vw, 28px)/1.2 var(--os-logo); letter-spacing: .005em;
}
body.os-site.os-page-kb .article-prose h2::after {
  content: ''; display: block; width: 44px; height: 3px; margin-top: 10px; border-radius: 2px;
  background: var(--os-red); box-shadow: 0 0 10px var(--os-red-glow);
}
body.os-site.os-page-kb .article-prose > h2:first-child { margin-top: .4em; }
body.os-site.os-page-kb .article-prose h3 {
  position: relative; margin: 1.7em 0 .5em; padding-left: 18px; color: var(--os-text); scroll-margin-top: 78px;
  font: italic 700 19px/1.3 var(--os-logo);
}
body.os-site.os-page-kb .article-prose h3::before {
  content: ''; position: absolute; left: 1px; top: .5em; width: 7px; height: 7px;
  background: var(--os-red); box-shadow: 0 0 8px var(--os-red-glow); transform: rotate(45deg);
}
body.os-site.os-page-kb .article-prose h2 + h3 { margin-top: .6em; }
body.os-site.os-page-kb .article-prose h4 { margin: 1.5em 0 .4em; color: var(--os-text); font: 700 15px/1.35 var(--os-ui); letter-spacing: .04em; text-transform: uppercase; }
body.os-site.os-page-kb .article-prose ul,
body.os-site.os-page-kb .article-prose ol { margin: 0 0 1.15em; padding-left: 1.35em; }
body.os-site.os-page-kb .article-prose li { margin: .38em 0; padding-left: .15em; }
body.os-site.os-page-kb .article-prose ul { list-style: none; }
body.os-site.os-page-kb .article-prose ul > li { position: relative; }
body.os-site.os-page-kb .article-prose ul > li::before {
  content: ''; position: absolute; left: -1.05em; top: .72em; width: 6px; height: 6px;
  background: var(--os-red); box-shadow: 0 0 6px var(--os-red-glow); transform: rotate(45deg);
}
body.os-site.os-page-kb .article-prose ol > li::marker { color: var(--os-red-hi); font: italic 800 .95em var(--os-logo); }
body.os-site.os-page-kb .article-prose code { font-size: .86em; }
body.os-site.os-page-kb .article-prose pre {
  margin: 1.3em 0; padding: 12px 14px; overflow-x: auto;
  border: 1px solid #000; border-radius: 5px; background: var(--os-black); box-shadow: inset 0 0 0 1px var(--os-line);
  color: var(--os-text); font: 13.5px/1.55 var(--os-mono);
}
body.os-site.os-page-kb .article-prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
body.os-site.os-page-kb .article-prose blockquote {
  margin: 1.4em 0; padding: 12px 18px; border-left: 3px solid var(--os-red); border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, .03); color: var(--os-text); font-style: italic;
}
body.os-site.os-page-kb .article-prose hr { height: 1px; margin: 2em 0; border: 0; background: linear-gradient(90deg, var(--os-red), transparent 70%); }

/* tables = Explorer details view */
body.os-site.os-page-kb .article-prose table {
  width: 100%; margin: 1.5em 0 1.8em; border-collapse: separate; border-spacing: 0;
  border: 1px solid #000; border-radius: 5px; background: var(--os-0);
  box-shadow: 0 0 0 1px var(--os-line), 0 10px 26px rgba(0, 0, 0, .35);
  font-size: 14.5px; line-height: 1.5;
}
body.os-site.os-page-kb .article-prose th {
  padding: 9px 12px; text-align: left; vertical-align: bottom;
  background: linear-gradient(#2a2e36, #1a1d22); border-bottom: 1px solid #000; border-right: 1px solid rgba(0, 0, 0, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  color: var(--os-text); font: 700 12.5px/1.3 var(--os-ui); letter-spacing: .02em; text-transform: none;
}
body.os-site.os-page-kb .article-prose th:first-child { border-top-left-radius: 4px; }
body.os-site.os-page-kb .article-prose th:last-child { border-right: 0; border-top-right-radius: 4px; }
body.os-site.os-page-kb .article-prose td {
  padding: 9px 12px; vertical-align: top; background: transparent; color: var(--kbx-read);
  border-bottom: 1px solid rgba(255, 255, 255, .05); border-right: 1px solid rgba(255, 255, 255, .03);
}
body.os-site.os-page-kb .article-prose td:last-child { border-right: 0; }
body.os-site.os-page-kb .article-prose td:first-child { color: var(--os-text); font-weight: 700; }
body.os-site.os-page-kb .article-prose tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .022); }
body.os-site.os-page-kb .article-prose tbody tr:hover td { background: rgba(255, 43, 56, .08); }
body.os-site.os-page-kb .article-prose tbody tr:last-child td { border-bottom: 0; }
body.os-site.os-page-kb .article-prose tbody tr:last-child td:first-child { border-bottom-left-radius: 4px; }
body.os-site.os-page-kb .article-prose tbody tr:last-child td:last-child { border-bottom-right-radius: 4px; }
body.os-site.os-page-kb .article-prose img.db-icon { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }

/* figures = photo viewer frame */
body.os-site.os-page-kb .article-prose figure {
  margin: 1.7em 0; padding: 6px;
  border: 1px solid #000; border-radius: 6px; background: var(--os-black);
  box-shadow: 0 0 0 1px var(--os-line), 0 12px 30px rgba(0, 0, 0, .45);
}
body.os-site.os-page-kb .article-prose figure img {
  width: 100%; height: auto; max-height: 78vh; object-fit: contain; border: 0; border-radius: 3px; background: #000;
}
body.os-site.os-page-kb .article-prose figcaption {
  display: flex; gap: 9px; margin: 0; padding: 8px 6px 3px; color: var(--os-text-2); font-size: 13.5px; line-height: 1.45;
}
body.os-site.os-page-kb .article-prose figcaption::before {
  content: ''; flex: none; width: 6px; height: 6px; margin-top: .5em; background: var(--os-red); transform: rotate(45deg);
}
body.os-site.os-page-kb .article-prose .kb-gallery { gap: 12px; margin: 1.6em 0; }
body.os-site.os-page-kb .article-prose .kb-gallery figure { margin: 0; }
body.os-site.os-page-kb .article-prose > p > img:not(.db-icon) { border: 1px solid #000; border-radius: 4px; box-shadow: 0 0 0 1px var(--os-line); }

/* tips / warnings = Windows notification balloons */
body.os-site.os-page-kb .article-prose .kb-tip,
body.os-site.os-page-kb .article-prose .kb-warn {
  position: relative; margin: 1.5em 0; padding: 14px 16px 14px 50px; border-radius: 6px;
  color: var(--kbx-read); font-size: 15.5px; line-height: 1.62;
}
body.os-site.os-page-kb .article-prose .kb-tip {
  background: linear-gradient(90deg, rgba(47, 155, 255, .13), rgba(47, 155, 255, .04));
  border: 1px solid rgba(47, 155, 255, .32); box-shadow: inset 3px 0 0 var(--os-blue);
}
body.os-site.os-page-kb .article-prose .kb-warn {
  background: linear-gradient(90deg, rgba(255, 43, 56, .13), rgba(255, 43, 56, .04));
  border: 1px solid rgba(255, 43, 56, .38); box-shadow: inset 3px 0 0 var(--os-red);
}
body.os-site.os-page-kb .article-prose .kb-tip::before,
body.os-site.os-page-kb .article-prose .kb-warn::before {
  content: ''; position: absolute; left: 15px; top: 15px; width: 22px; height: 22px;
  background: var(--kbx-ic-info) center / contain no-repeat; filter: drop-shadow(0 0 6px rgba(47, 155, 255, .5));
}
body.os-site.os-page-kb .article-prose .kb-warn::before { background-image: var(--kbx-ic-warn); filter: drop-shadow(0 0 6px rgba(255, 43, 56, .5)); }
body.os-site.os-page-kb .article-prose :is(.kb-tip, .kb-warn) > :last-child { margin-bottom: 0; }

/* FAQ = Windows expanders */
body.os-site.os-page-kb .article-layout > article > section {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--os-line);
}
body.os-site.os-page-kb .article-layout > article > section > h2 {
  margin: 0 0 16px; color: var(--os-text); font: italic 800 clamp(21px, 2.1vw, 26px)/1.2 var(--os-logo);
}
body.os-site.os-page-kb .article-layout > article > section > h2::after {
  content: ''; display: block; width: 44px; height: 3px; margin-top: 10px; border-radius: 2px;
  background: var(--os-red); box-shadow: 0 0 10px var(--os-red-glow);
}
body.os-site.os-page-kb .faq-item {
  margin: 0 0 8px; overflow: hidden; border: 1px solid #000; border-radius: 5px;
  background: var(--os-1); box-shadow: inset 0 0 0 1px var(--os-line);
}
body.os-site.os-page-kb .faq-item summary {
  position: relative; display: block; min-height: 44px; padding: 11px 46px 11px 16px;
  background: linear-gradient(rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  color: var(--os-text); font-size: 15.5px; font-weight: 700; line-height: 1.4; cursor: pointer;
  transition: background .15s, box-shadow .2s;
}
body.os-site.os-page-kb .faq-item summary:hover { background: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); }
body.os-site.os-page-kb .faq-item summary:focus-visible { outline-offset: -3px; }
body.os-site.os-page-kb .faq-item summary::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--os-text-2); border-bottom: 2px solid var(--os-text-2);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--os-ease), border-color .2s;
}
body.os-site.os-page-kb .faq-item[open] summary { color: #fff; border-bottom: 1px solid #000; box-shadow: inset 3px 0 0 var(--os-red); }
body.os-site.os-page-kb .faq-item[open] summary::after { border-color: var(--os-red-hi); transform: translateY(-25%) rotate(-135deg); }
body.os-site.os-page-kb .faq-item .faq-answer { padding: 12px 16px 14px; color: var(--kbx-read); font-size: 15.5px; line-height: 1.65; }
body.os-site.os-page-kb .faq-item[open] .faq-answer { animation: kbx-fade .3s var(--os-ease) backwards; }

/* ---------- navigation pane (TOC, promo, other guides) ---------- */
body.os-site.os-page-kb .article-layout > .toc-box {
  top: 68px; display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 84px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  animation: kbx-slide .45s var(--os-ease) backwards;
}
body.os-site.os-page-kb .toc-box > .card {
  flex: none; margin: 0; padding: 0 12px 12px;
  border: 1px solid #000; border-radius: var(--os-r);
  background: linear-gradient(var(--os-1), var(--os-0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px rgba(255, 255, 255, .03); /* no drop shadow: the pane scrolls and would clip it */
}
/* pane header strip, with an icon per pane */
body.os-site.os-page-kb .toc-box > .card > strong:first-child {
  display: flex; align-items: center; gap: 8px; margin: 0 -12px 8px; padding: 9px 12px;
  border-bottom: 1px solid #000; border-radius: var(--os-r) var(--os-r) 0 0;
  background: var(--kbx-strip); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
  color: var(--os-text); font: 700 13px/1.25 var(--os-ui); letter-spacing: .02em; text-shadow: 0 1px 2px #000;
}
body.os-site.os-page-kb .toc-box > .card > strong:first-child::before {
  content: ''; flex: none; width: 16px; height: 16px; background: var(--kbx-ic-folder) center / contain no-repeat;
}
body.os-site.os-page-kb .toc-box > .card:has(a[href^='#']) > strong:first-child::before { background-image: var(--kbx-ic-list); }
body.os-site.os-page-kb .toc-box > .card:has(.btn) > strong:first-child::before { background-image: var(--kbx-ic-star); }
/* tree items */
body.os-site.os-page-kb .toc-box .toc-list { display: flex; flex-direction: column; gap: 1px; margin: 0 -6px; padding: 0; list-style: none; }
body.os-site.os-page-kb .toc-box .toc-list a {
  position: relative; display: block; padding: 6px 8px 6px 26px;
  border: 1px solid transparent; border-radius: 3px;
  color: var(--os-text-2); font-size: 13.5px; line-height: 1.38; text-decoration: none;
  transition: color .15s, background .15s, border-color .15s, box-shadow .2s;
}
body.os-site.os-page-kb .toc-box .toc-list a::before {
  content: ''; position: absolute; left: 10px; top: .82em; width: 0; height: 0;
  border-left: 5px solid var(--os-muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .15s var(--os-ease), border-left-color .15s;
}
body.os-site.os-page-kb .toc-box .toc-list a[href^='/kb/']::before {
  left: 7px; top: .55em; width: 14px; height: 14px; border: 0; background: var(--kbx-ic-doc) center / contain no-repeat;
}
body.os-site.os-page-kb .toc-box .toc-list a:hover {
  color: var(--os-text); background: linear-gradient(rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); border-color: rgba(255, 255, 255, .1);
}
body.os-site.os-page-kb .toc-box .toc-list a:hover::before { border-left-color: var(--os-red); transform: translateX(2px); }
/* current section (portal-os-kb.js) = selected tree node */
body.os-site.os-page-kb .toc-box .toc-list a.is-on {
  color: #fff; border-color: rgba(255, 43, 56, .45);
  background: linear-gradient(rgba(255, 43, 56, .24), rgba(255, 43, 56, .1));
  box-shadow: inset 2px 0 0 var(--os-red), 0 0 14px rgba(255, 43, 56, .12);
}
body.os-site.os-page-kb .toc-box .toc-list a.is-on::before { border-left-color: var(--os-red-hi); }
/* promo pane */
body.os-site.os-page-kb .toc-box > .card > p { margin: 0 0 10px; color: var(--os-text-2); line-height: 1.5; }
body.os-site.os-page-kb .toc-box > .card > p code {
  padding: 1px 7px; border: 1px dashed rgba(255, 194, 61, .6); border-radius: 3px;
  background: rgba(255, 194, 61, .08); color: var(--os-gold); font: 700 13px var(--os-mono); letter-spacing: .08em;
}
body.os-site.os-page-kb .toc-box > .card > .btn { min-height: 36px; }

/* reading progress line on the taskbar (portal-os-kb.js) */
body.os-site.os-page-kb .kbx-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--os-red-lo), var(--os-red) 60%, var(--os-red-hi));
  box-shadow: 0 0 10px var(--os-red); transform-origin: 0 50%; transform: scaleX(var(--kbx-p, 0));
}

/* =====================================================================
   5. FORUM INDEX — a 2009 phpBB topic list in dark glass
   ===================================================================== */
body.os-site.os-page-forum #forum-page-root > .table-wrap {
  border: 1px solid #000; border-radius: var(--os-r); background: var(--os-1);
  box-shadow: inset 0 0 0 1px var(--os-line), 0 12px 30px rgba(0, 0, 0, .4);
}
body.os-site.os-page-forum #forum-page-root > .table-wrap table { font-size: 14px; }
body.os-site.os-page-forum #forum-page-root > .table-wrap th {
  padding: 10px 14px; border-top: 2px solid var(--os-red);
  background: linear-gradient(#2a2e36, #191c21); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--os-text-2); font: 700 12px/1.2 var(--os-ui); letter-spacing: .07em; text-transform: uppercase;
}
body.os-site.os-page-forum #forum-page-root > .table-wrap th:first-child { padding-left: 60px; }
body.os-site.os-page-forum #forum-page-root > .table-wrap th:nth-child(2),
body.os-site.os-page-forum #forum-page-root > .table-wrap th:nth-child(3) { width: 108px; text-align: center; }
body.os-site.os-page-forum #forum-page-root > .table-wrap th:nth-child(4) { width: 170px; }
body.os-site.os-page-forum #forum-topic-rows tr { animation: kbx-fade .4s var(--os-ease) backwards; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(1) { animation-delay: .03s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(2) { animation-delay: .06s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(3) { animation-delay: .09s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(4) { animation-delay: .12s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(5) { animation-delay: .15s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(6) { animation-delay: .18s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(7) { animation-delay: .21s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(8) { animation-delay: .24s; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(n+9) { animation-delay: .27s; }
body.os-site.os-page-forum #forum-topic-rows td {
  padding: 12px 14px; vertical-align: middle; background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, .05); color: var(--os-text-2);
  transition: background .15s, box-shadow .15s;
}
body.os-site.os-page-forum #forum-topic-rows tr:last-child td { border-bottom: 0; }
body.os-site.os-page-forum #forum-topic-rows tr:nth-child(even) td { background: rgba(255, 255, 255, .016); }
/* title cell: topic icon + stretched link (the whole cell opens the topic) */
body.os-site.os-page-forum #forum-topic-rows td:first-child { position: relative; padding-left: 60px; overflow-wrap: anywhere; }
body.os-site.os-page-forum #forum-topic-rows td:first-child::before {
  content: ''; position: absolute; left: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  background: var(--kbx-ic-topic) center / contain no-repeat;
  transition: transform .2s var(--os-ease), filter .2s;
}
body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) td:first-child::before { background-image: var(--kbx-ic-pin); filter: drop-shadow(0 0 5px rgba(255, 43, 56, .45)); }
body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-red) td:first-child::before { background-image: var(--kbx-ic-lock); }
body.os-site.os-page-forum #forum-topic-rows td:first-child .flex-row { gap: 6px 8px; }
body.os-site.os-page-forum #forum-topic-rows td:first-child .badge { padding: 1px 7px; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; }
body.os-site.os-page-forum #forum-topic-rows td:first-child a {
  font-size: 15px; line-height: 1.35; text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color .15s;
}
body.os-site.os-page-forum #forum-topic-rows td:first-child a::after { content: ''; position: absolute; inset: 0; }
body.os-site.os-page-forum #forum-topic-rows td:first-child > .muted { margin-top: 3px; color: var(--os-text-2); }
body.os-site.os-page-forum #forum-topic-rows td:nth-child(2),
body.os-site.os-page-forum #forum-topic-rows td:nth-child(3) { text-align: center; color: var(--os-text); font: 700 14px var(--os-mono); }
body.os-site.os-page-forum #forum-topic-rows td:nth-child(4) { color: var(--os-text-2); font-size: 12.5px; white-space: nowrap; }
body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) td { background: rgba(255, 43, 56, .035); }
body.os-site.os-page-forum #forum-topic-rows tr:hover td { background: rgba(255, 255, 255, .045); }
body.os-site.os-page-forum #forum-topic-rows tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--os-red); }
body.os-site.os-page-forum #forum-topic-rows tr:hover td:first-child::before { transform: scale(1.1) rotate(-4deg); }
body.os-site.os-page-forum #forum-topic-rows tr:hover td:first-child a { text-decoration-color: var(--os-red); }
/* "no topics yet" row */
body.os-site.os-page-forum #forum-topic-rows td[colspan] { padding: 34px 16px; text-align: center; color: var(--os-text-2); font-style: italic; box-shadow: none; }
body.os-site.os-page-forum #forum-topic-rows td[colspan]::before { content: none; }

/* pager = OS push buttons + small LCD page counter */
body.os-site.os-page-forum #forum-pager { justify-content: center; gap: 8px; margin-top: 14px; }
body.os-site.os-page-forum #forum-pager:empty { display: none; }
body.os-site.os-page-forum #forum-pager .btn {
  min-height: 34px; padding: 0 14px; border-color: rgba(0, 0, 0, .85);
  background: var(--kbx-btn); color: var(--os-text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .6);
}
body.os-site.os-page-forum #forum-pager .btn:disabled { opacity: .42; filter: grayscale(1); transform: none; }
body.os-site.os-page-forum #forum-pager > .muted {
  padding: 6px 12px; border: 1px solid #000; border-radius: 4px; background: #03100a;
  box-shadow: inset 0 0 10px rgba(61, 220, 106, .12);
  color: var(--os-green); font: 700 12.5px var(--os-mono); text-shadow: 0 0 6px rgba(61, 220, 106, .5);
}

/* =====================================================================
   6. FORUM TOPIC — posts with an author column, quick reply
   ===================================================================== */
body.os-site.os-page-forum #forum-page-root { counter-reset: kbx-post; }
body.os-site.os-page-forum #forum-mod-bar { gap: 6px; }
body.os-site.os-page-forum .forum-post {
  counter-increment: kbx-post;
  display: grid; grid-template-columns: 184px minmax(0, 1fr); grid-template-rows: auto 1fr auto;
  margin: 0 0 12px; padding: 0; overflow: hidden;
  border: 1px solid #000; border-radius: var(--os-r); background: var(--os-1);
  box-shadow: inset 0 0 0 1px var(--os-line), 0 10px 26px rgba(0, 0, 0, .38);
  animation: kbx-rise .45s var(--os-ease) backwards;
}
body.os-site.os-page-forum .forum-post:nth-of-type(2) { animation-delay: .06s; }
body.os-site.os-page-forum .forum-post:nth-of-type(3) { animation-delay: .12s; }
body.os-site.os-page-forum .forum-post:nth-of-type(4) { animation-delay: .18s; }
body.os-site.os-page-forum .forum-post:nth-of-type(n+5) { animation-delay: .22s; }
body.os-site.os-page-forum .forum-post.is-staff {
  border-color: #000; background: var(--os-1);
  box-shadow: inset 0 0 0 1px rgba(255, 43, 56, .2), 0 10px 26px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 43, 56, .1);
}
/* the head's two parts become grid cells: author column + date bar */
body.os-site.os-page-forum .forum-post-head { display: contents; }
body.os-site.os-page-forum .forum-post-head > .flex-row {
  grid-column: 1; grid-row: 1 / -1;
  flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 6px;
  padding: 18px 12px 16px; text-align: center;
  background: linear-gradient(var(--os-2), var(--os-0));
  border-right: 1px solid #000; box-shadow: inset -1px 0 0 var(--os-line);
}
body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row {
  background: linear-gradient(rgba(255, 43, 56, .13), transparent 55%), linear-gradient(var(--os-2), var(--os-0));
  box-shadow: inset 0 2px 0 var(--os-red), inset -1px 0 0 var(--os-line);
}
/* avatar box: emblem by default, the author's initial when portal-os-kb.js ran */
body.os-site.os-page-forum .forum-post-head > .flex-row::before {
  content: ''; display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 6px; border-radius: 6px;
  background: var(--kbx-ic-mark-dim) center / 58% no-repeat, radial-gradient(circle at 50% 28%, var(--os-4), var(--os-black) 78%);
  border: 1px solid #000;
  box-shadow: 0 0 0 2px var(--os-3), 0 0 0 3px #000, 0 8px 18px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .1);
  color: var(--os-text); font: italic 800 40px/1 var(--os-logo); text-shadow: 0 2px 0 #000, 0 0 18px rgba(255, 255, 255, .18);
}
body.os-site.os-page-forum .forum-post-head > .flex-row[data-kbx-ini]::before {
  content: attr(data-kbx-ini); background: radial-gradient(circle at 50% 28%, var(--os-4), var(--os-black) 78%);
}
body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row::before {
  box-shadow: 0 0 0 2px var(--os-red-lo), 0 0 0 3px #000, 0 0 22px var(--os-red-glow), inset 0 1px 0 rgba(255, 255, 255, .12);
  text-shadow: 0 2px 0 #000, 0 0 18px var(--os-red-glow);
}
body.os-site.os-page-forum .forum-post-head > .flex-row > strong {
  max-width: 100%; color: var(--os-blue); font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere;
}
body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row > strong { color: var(--os-red-hi); text-shadow: 0 0 12px rgba(255, 43, 56, .35); }
body.os-site.os-page-forum .forum-post-head > .flex-row > .badge { font-size: 10.5px; letter-spacing: .06em; }
body.os-site.os-page-forum .forum-post:not(.is-staff) .forum-post-head > .flex-row::after { content: 'Игрок'; color: var(--os-text-2); font-size: 12px; }
/* date bar + post number */
body.os-site.os-page-forum .forum-post-head > .muted {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; padding: 9px 18px;
  border-bottom: 1px solid var(--os-line); background: linear-gradient(rgba(255, 255, 255, .035), transparent);
  color: var(--os-text-2);
}
body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .muted { box-shadow: inset 0 2px 0 var(--os-red); }
body.os-site.os-page-forum .forum-post-head > .muted::before {
  content: ''; flex: none; width: 14px; height: 14px; background: var(--kbx-ic-doc) center / contain no-repeat;
}
body.os-site.os-page-forum .forum-post-head > .muted::after {
  content: '#' counter(kbx-post); margin-left: auto; color: var(--os-text-2); font: 700 12px var(--os-mono);
}
/* post body */
body.os-site.os-page-forum .forum-post > .forum-post-head + div {
  grid-column: 2; grid-row: 2; min-width: 0; padding: 16px 18px 18px;
  color: var(--kbx-read); font-size: 15.5px; line-height: 1.7; overflow-wrap: anywhere;
}
body.os-site.os-page-forum .forum-post > .forum-post-head + div strong { color: var(--os-text); }
body.os-site.os-page-forum .forum-post > .forum-post-head + div a { text-decoration: underline; text-decoration-color: rgba(47, 155, 255, .45); text-underline-offset: 3px; }
body.os-site.os-page-forum .forum-post .fx-quote {
  position: relative; display: block; margin: 10px 0; padding: 30px 14px 10px;
  border: 1px solid #000; border-left: 3px solid var(--os-red); border-radius: 0 5px 5px 0;
  background: var(--os-black); box-shadow: inset 0 0 0 1px var(--os-line);
  color: var(--os-text-2); font-size: 14.5px; line-height: 1.6;
}
body.os-site.os-page-forum .forum-post .fx-quote::before {
  content: 'Цитата'; position: absolute; left: 12px; top: 8px;
  color: var(--os-red-hi); font: 700 11px/1 var(--os-ui); letter-spacing: .09em; text-transform: uppercase;
}
body.os-site.os-page-forum .forum-post .fx-code { display: inline-block; max-width: 100%; padding: 2px 8px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
/* actions under a signature-style separator */
body.os-site.os-page-forum .forum-post > .flex-row {
  position: relative; grid-column: 2; grid-row: 3; gap: 6px; margin: 0; padding: 10px 18px 12px;
  border-top: 1px dashed var(--os-line-2);
}
body.os-site.os-page-forum .forum-post > .flex-row::before {
  content: ''; position: absolute; left: 18px; top: -1px; width: 64px; height: 1px; background: var(--os-red); box-shadow: 0 0 6px var(--os-red);
}
body.os-site.os-page-forum .forum-post > .flex-row .btn { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
/* liked = gold star (rewards colour) */
body.os-site.os-page-forum .forum-post [data-like-post].btn-gold {
  border-color: rgba(255, 194, 61, .55); background: rgba(255, 194, 61, .1); color: var(--os-gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 12px rgba(255, 194, 61, .2);
}

/* quick reply panel */
body.os-site.os-page-forum #forum-page-root > .card.mt-3 {
  margin-top: 22px; padding: 0 16px 16px;
  border: 1px solid #000; border-radius: var(--os-r);
  background: linear-gradient(var(--os-2), var(--os-1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 30px rgba(0, 0, 0, .4);
}
body.os-site.os-page-forum #forum-page-root > .card.mt-3 > h3 {
  display: flex; align-items: center; gap: 9px; margin: 0 -16px 14px; padding: 10px 16px;
  border-bottom: 1px solid #000; border-radius: var(--os-r) var(--os-r) 0 0;
  background: var(--kbx-strip); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
  font: italic 700 16px/1.25 var(--os-logo); text-shadow: 0 1px 2px #000;
}
body.os-site.os-page-forum #forum-page-root > .card.mt-3 > h3::before {
  content: ''; flex: none; width: 18px; height: 18px; background: var(--kbx-ic-topic) center / contain no-repeat;
}
/* BBCode toolbar docked to the text area (reply form + "new topic" dialog) */
body.os-site.os-page-forum .bb-toolbar {
  gap: 3px; margin: 0; padding: 4px;
  border: 1px solid #000; border-bottom: 0; border-radius: 4px 4px 0 0;
  background: linear-gradient(var(--os-3), var(--os-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
body.os-site.os-page-forum .bb-toolbar .bb-btn {
  min-width: 46px; min-height: 30px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 3px; background: none;
  color: var(--os-text-2); font: 700 12.5px var(--os-mono); cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
body.os-site.os-page-forum .bb-toolbar .bb-btn:hover { color: #fff; background: var(--kbx-glass-hi); border-color: rgba(255, 255, 255, .14); }
body.os-site.os-page-forum .bb-toolbar .bb-btn:active { background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
body.os-site.os-page-forum .bb-toolbar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
body.os-site.os-page-forum #forum-reply-body {
  display: block; min-height: 170px; padding: 12px 14px; resize: vertical;
  background: var(--os-black); color: var(--os-text); font: 15px/1.6 var(--os-ui);
}
body.os-site.os-page-forum #forum-reply-body::placeholder { color: var(--os-muted); opacity: 1; }
body.os-site.os-page-forum #forum-reply-form > .flex-between .muted { color: var(--os-text-2); }
body.os-site.os-page-forum #forum-reply-form [type='submit'] { min-height: 40px; padding: 0 22px; }

/* =====================================================================
   7. MOTION
   ===================================================================== */
@keyframes kbx-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes kbx-fade { from { opacity: 0; transform: translateY(6px); } }
@keyframes kbx-slide { from { opacity: 0; transform: translateX(-12px); } }
@keyframes kbx-cover { from { opacity: 0; transform: scale(1.05); } }
@keyframes kbx-pulse { 50% { opacity: .45; } }
@keyframes kbx-eq {
  0% { background-size: 3px 30%, 3px 80%, 3px 50%, 3px 65%; }
  50% { background-size: 3px 95%, 3px 35%, 3px 85%, 3px 40%; }
  100% { background-size: 3px 50%, 3px 100%, 3px 25%, 3px 90%; }
}

/* =====================================================================
   8. TABLET (≤980px): one column, the TOC goes above the article
   ===================================================================== */
@media (max-width: 980px) {
  body.os-site.os-page-kb .article-layout { gap: 14px; }
  /* split the pane so each card can be ordered on its own */
  body.os-site.os-page-kb .article-layout > .toc-box { display: contents; }
  body.os-site.os-page-kb .toc-box > .card { order: 2; }
  body.os-site.os-page-kb .toc-box > .card:has(a[href^='#']) { order: -1; }
  /* collapsible TOC (portal-os-kb.js adds .kbx-toc / .kbx-closed) */
  body.os-site.os-page-kb .toc-box > .card.kbx-toc > strong:first-child { min-height: 44px; cursor: pointer; }
  body.os-site.os-page-kb .toc-box > .card.kbx-toc > strong:first-child::after {
    content: ''; width: 7px; height: 7px; margin: 0 4px 0 auto;
    border-right: 2px solid var(--os-text-2); border-bottom: 2px solid var(--os-text-2);
    transform: translateY(2px) rotate(-135deg); transition: transform .2s var(--os-ease);
  }
  body.os-site.os-page-kb .toc-box > .card.kbx-toc.kbx-closed { padding-bottom: 0; }
  body.os-site.os-page-kb .toc-box > .card.kbx-toc.kbx-closed > strong:first-child { margin-bottom: 0; border-bottom: 0; border-radius: var(--os-r); }
  body.os-site.os-page-kb .toc-box > .card.kbx-toc.kbx-closed > strong:first-child::after { transform: translateY(-2px) rotate(45deg); }
  body.os-site.os-page-kb .toc-box > .card.kbx-toc.kbx-closed .toc-list { display: none; }
  body.os-site.os-page-forum .forum-post { grid-template-columns: 150px minmax(0, 1fr); }
  body.os-site.os-page-forum .forum-post-head > .flex-row::before { width: 68px; height: 68px; font-size: 32px; }
}

/* =====================================================================
   9. PHONE (≤760px): single column, 40px tap targets, no sideways scroll
   ===================================================================== */
@media (max-width: 760px) {
  body.os-site.os-page-kb .os-wb > .container,
  body.os-site.os-page-forum .os-wb > .container { padding-left: 12px; padding-right: 12px; }

  /* address bar + banner */
  body.os-site.os-page-kb .breadcrumbs,
  body.os-site.os-page-forum .breadcrumbs { min-height: 42px; margin-bottom: 12px; padding-left: 34px; font-size: 13px; }
  body.os-site.os-page-kb .breadcrumbs::before,
  body.os-site.os-page-forum .breadcrumbs::before { left: 9px; }
  body.os-site.os-page-kb .breadcrumbs > a,
  body.os-site.os-page-forum .breadcrumbs > a { padding: 9px 6px; }
  body.os-site.os-page-kb #kb-page-root > .section-head,
  body.os-site.os-page-forum #forum-page-root > .section-head,
  body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 { padding: 16px 14px; }
  body.os-site.os-page-kb #kb-page-root > .section-head > .btn,
  body.os-site.os-page-forum #forum-page-root > .section-head > .btn { width: 100%; min-height: 42px; }

  /* command bar: search on top, tabs in one swipeable row */
  body.os-site.os-page-kb #kb-page-root > .card.mb-2 > .flex-between,
  body.os-site.os-page-forum #forum-page-root > .card.mb-2 > .flex-between { flex-direction: column; align-items: stretch; }
  body.os-site.os-page-kb #kb-page-root > .card.mb-2 .tabs,
  body.os-site.os-page-forum #forum-page-root > .card.mb-2 .tabs { flex: none; }
  body.os-site.os-page-kb #kb-guide-filter,
  body.os-site.os-page-forum #forum-search-form { order: -1; flex: none; width: 100%; max-width: none !important; margin-left: 0; }
  body.os-site.os-page-forum #forum-search-q { max-width: none !important; }
  body.os-site.os-page-kb #kb-guide-filter,
  body.os-site.os-page-kb #kb-db-q,
  body.os-site.os-page-forum #forum-search-q { height: 42px; font-size: 16px; }
  body.os-site.os-page-forum #forum-search-form .btn { min-height: 42px; }
  body.os-site.os-page-kb .tabs,
  body.os-site.os-page-forum .tabs {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    padding: 4px 3px; scroll-padding-left: 3px; /* room for the focus ring inside the scroller */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
  body.os-site.os-page-kb .tabs::-webkit-scrollbar,
  body.os-site.os-page-forum .tabs::-webkit-scrollbar { display: none; }
  body.os-site.os-page-kb .tabs .tab-btn,
  body.os-site.os-page-forum .tabs .tab-btn { flex: none; min-height: 40px; scroll-snap-align: start; }
  body.os-site.os-page-kb .tabs .tab-btn:last-child,
  body.os-site.os-page-forum .tabs .tab-btn:last-child { margin-right: 22px; }

  /* KB index */
  body.os-site.os-page-kb #kb-page-root > .grid-3 { gap: 12px; }
  body.os-site.os-page-kb [data-guide-card] > a:last-child { min-height: 40px; }
  body.os-site.os-page-kb .kbx-status { flex-wrap: wrap; }
  body.os-site.os-page-kb #encyclopedia > .card { padding: 16px 12px 18px; }
  body.os-site.os-page-kb #kb-db-form .btn,
  body.os-site.os-page-kb #kb-load-primeshop { width: 100%; min-height: 42px; }
  body.os-site.os-page-kb #kb-db-form .input { min-width: 0; }

  /* KB article */
  body.os-site.os-page-kb .article-layout > article { padding: 14px 14px 24px; }
  body.os-site.os-page-kb .article-layout .article-cover { margin: -2px -4px 16px; }
  body.os-site.os-page-kb .article-prose { font-size: 16.5px; line-height: 1.68; }
  body.os-site.os-page-kb .kb-listen { grid-template-columns: minmax(0, 1fr); }
  body.os-site.os-page-kb .article-prose table { display: block; overflow-x: auto; overscroll-behavior-x: contain; font-size: 14px; }
  body.os-site.os-page-kb .article-prose td,
  body.os-site.os-page-kb .article-prose th { min-width: 8.5em; }
  body.os-site.os-page-kb .article-prose td:first-child,
  body.os-site.os-page-kb .article-prose th:first-child { min-width: 5.5em; }
  body.os-site.os-page-kb .article-prose :is(.kb-tip, .kb-warn) { padding: 12px 12px 12px 44px; font-size: 15px; }
  body.os-site.os-page-kb .article-prose :is(.kb-tip, .kb-warn)::before { left: 12px; top: 13px; width: 20px; height: 20px; }
  body.os-site.os-page-kb .article-prose figure { margin-left: -4px; margin-right: -4px; padding: 4px; }
  body.os-site.os-page-kb .toc-box .toc-list a { padding-top: 10px; padding-bottom: 10px; }
  body.os-site.os-page-kb .toc-box > .card > .btn { min-height: 42px; }

  /* forum index: rows become stacked list items */
  body.os-site.os-page-forum #forum-page-root > .table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  body.os-site.os-page-forum #forum-page-root > .table-wrap :is(table, tbody) { display: block; }
  body.os-site.os-page-forum #forum-page-root > .table-wrap thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  body.os-site.os-page-forum #forum-topic-rows tr {
    position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 4px 14px;
    margin-bottom: 8px; padding: 12px 12px 12px 54px;
    border: 1px solid #000; border-radius: var(--os-r);
    background: linear-gradient(var(--os-2), var(--os-1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: border-color .15s;
  }
  body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) { background: linear-gradient(rgba(255, 43, 56, .1), var(--os-1) 70%); }
  body.os-site.os-page-forum #forum-topic-rows tr:hover { border-color: rgba(255, 43, 56, .45); }
  body.os-site.os-page-forum #forum-topic-rows td { display: block; padding: 0; border: 0; }
  body.os-site.os-page-forum #forum-topic-rows tr:nth-child(even) td,
  body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) td,
  body.os-site.os-page-forum #forum-topic-rows tr:hover td { background: transparent; }
  body.os-site.os-page-forum #forum-topic-rows tr:hover td:first-child { box-shadow: none; }
  body.os-site.os-page-forum #forum-topic-rows td:first-child { position: static; grid-column: 1 / -1; padding: 0 0 6px; }
  body.os-site.os-page-forum #forum-topic-rows td:first-child::before { left: 14px; top: 14px; margin-top: 0; }
  body.os-site.os-page-forum #forum-topic-rows td:first-child a::after { border-radius: var(--os-r); }
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(2),
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(3) { text-align: left; font-size: 13px; }
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(2)::before,
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(3)::before { margin-right: 5px; color: var(--os-text-2); font: 400 11.5px var(--os-ui); letter-spacing: .04em; text-transform: uppercase; }
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(2)::before { content: 'Ответов'; }
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(3)::before { content: 'Просмотров'; }
  body.os-site.os-page-forum #forum-topic-rows td:nth-child(4) { justify-self: end; font-size: 12px; }
  body.os-site.os-page-forum #forum-topic-rows td[colspan] { grid-column: 1 / -1; padding: 18px 0; }
  body.os-site.os-page-forum #forum-topic-rows tr:has(td[colspan]) { padding-left: 12px; }
  body.os-site.os-page-forum #forum-pager .btn { min-height: 42px; }

  /* forum topic: author strip on top of each post */
  body.os-site.os-page-forum .forum-post { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  body.os-site.os-page-forum .forum-post-head > .flex-row,
  body.os-site.os-page-forum .forum-post-head > .muted,
  body.os-site.os-page-forum .forum-post > .forum-post-head + div,
  body.os-site.os-page-forum .forum-post > .flex-row { grid-column: 1; grid-row: auto; }
  body.os-site.os-page-forum .forum-post-head > .flex-row {
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px 8px;
    padding: 10px 12px; text-align: left; border-right: 0; border-bottom: 1px solid #000; box-shadow: none;
  }
  body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row { box-shadow: inset 0 2px 0 var(--os-red); }
  body.os-site.os-page-forum .forum-post-head > .flex-row::before { width: 40px; height: 40px; margin: 0 4px 0 0; border-radius: 5px; font-size: 20px; }
  body.os-site.os-page-forum .forum-post-head > .muted { padding: 7px 12px; }
  body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .muted { box-shadow: none; }
  body.os-site.os-page-forum .forum-post > .forum-post-head + div { padding: 12px; font-size: 15.5px; }
  body.os-site.os-page-forum .forum-post > .flex-row { padding: 8px 12px 10px; }
  body.os-site.os-page-forum .forum-post > .flex-row::before { left: 12px; }
  body.os-site.os-page-forum .forum-post > .flex-row .btn { min-height: 40px; padding: 0 14px; }
  body.os-site.os-page-forum #forum-mod-bar .btn { min-height: 40px; }
  body.os-site.os-page-forum #forum-page-root > .card.mt-3 { padding: 0 12px 12px; }
  body.os-site.os-page-forum #forum-page-root > .card.mt-3 > h3 { margin: 0 -12px 12px; padding: 10px 12px; }
  body.os-site.os-page-forum .bb-toolbar .bb-btn { min-height: 40px; }
  body.os-site.os-page-forum #forum-reply-body { min-height: 150px; font-size: 16px; }
  body.os-site.os-page-forum #forum-reply-form > .flex-between [type='submit'] { width: 100%; min-height: 44px; }
}

/* =====================================================================
   10. REDUCED MOTION — same selectors as above, so these win by order
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  body.os-site.os-page-kb [data-guide-card],
  body.os-site.os-page-kb .article-layout > article,
  body.os-site.os-page-kb .article-layout > .toc-box,
  body.os-site.os-page-kb .article-layout .article-cover img,
  body.os-site.os-page-kb .faq-item[open] .faq-answer,
  body.os-site.os-page-kb .kb-listen.is-playing .kb-listen-title::before,
  body.os-site.os-page-kb .kb-listen.is-playing .kb-listen-title::after,
  body.os-site.os-page-forum #forum-topic-rows tr,
  body.os-site.os-page-forum .forum-post { animation: none; }
  body.os-site.os-page-kb [data-guide-card],
  body.os-site.os-page-kb [data-guide-card]::before,
  body.os-site.os-page-kb [data-guide-card] .guide-card-media img,
  body.os-site.os-page-kb [data-guide-card] .guide-card-media::after,
  body.os-site.os-page-kb .tabs .tab-btn,
  body.os-site.os-page-forum .tabs .tab-btn,
  body.os-site.os-page-forum #forum-topic-rows td:first-child::before { transition: none; }
  body.os-site.os-page-kb [data-guide-card]:hover,
  body.os-site.os-page-kb [data-guide-card]:focus-within,
  body.os-site.os-page-kb [data-guide-card]:hover .guide-card-media img,
  body.os-site.os-page-forum #forum-topic-rows tr:hover td:first-child::before { transform: none; }
}

/* =====================================================================
   11. THEME «Синяя» (default, portal-os-blue.css): Windows 7 light apps
   Everything above is the theme «Тёмная» and stays as it is. Every selector below starts with
   html[data-theme="blue"], so it outranks the dark rules at any load order. Only colours,
   borders, shadows and icons change here; sizes, motion and breakpoints stay above. Borders are
   re-coloured with border-*-color only, so the "border: 0" resets of the phone layout still win.
   ===================================================================== */

/* ---------- tokens + icons redrawn for a white window ---------- */
html[data-theme="blue"] body.os-site.os-page-kb,
html[data-theme="blue"] body.os-site.os-page-forum {
  --kbx-glass: linear-gradient(#fdfdfd, #eef1f5 49%, #e3e8ef 50%, #edf0f4);     /* Win7 push button */
  --kbx-glass-hi: linear-gradient(#f5faff, #e3f0fd 49%, #cfe5fb 50%, #e0effd);  /* Win7 hot item */
  --kbx-btn: linear-gradient(#fdfdfd, #ebeef2 49%, #dbe0e7 50%, #e8ebf0);
  --kbx-red-glass: linear-gradient(#8cc6ff, #3b8fe8 49%, #2a6fd6 50%, #3d84e0);
  --kbx-strip: linear-gradient(#fdfeff, #edf2f8 55%, #e3eaf3);
  --kbx-sel: linear-gradient(#ecf5fe, #cfe4fb);                                 /* Explorer selection */
  --kbx-ic-search: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='6.6' cy='6.6' r='4.6' fill='%23fff' fill-opacity='.7' stroke='%234a5a6e' stroke-width='1.7'/><path d='M10.1 10.1l4.1 4.1' stroke='%234a5a6e' stroke-width='2' stroke-linecap='round'/></svg>");
  --kbx-ic-clock: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6.3' fill='%23fff' stroke='%231f8f45' stroke-width='1.6'/><path d='M8 4.4V8l2.5 1.7' fill='none' stroke='%231f8f45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  --kbx-ic-doc: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 1.5h6l3 3v10h-9z' fill='%23fff' stroke='%236f7c8c' stroke-linejoin='round'/><path d='M9.5 1.5v3h3' fill='%23e3e8ee' stroke='%236f7c8c' stroke-linejoin='round'/><path d='M5.5 7.5h5M5.5 9.5h5M5.5 11.5h3.2' stroke='%232a6fd6' stroke-linecap='round'/></svg>");
  --kbx-ic-list: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><g fill='%232a6fd6'><rect x='1.5' y='2.8' width='2.4' height='2.4' rx='.4'/><rect x='1.5' y='6.8' width='2.4' height='2.4' rx='.4'/><rect x='1.5' y='10.8' width='2.4' height='2.4' rx='.4'/></g><path d='M6 4h8.5M6 8h8.5M6 12h6' stroke='%235d6b7c' stroke-width='1.5' stroke-linecap='round'/></svg>");
  --kbx-ic-warn: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M10 1.6l8.8 15.8H1.2z' fill='%23ffd33d' stroke='%23a67400' stroke-linejoin='round'/><rect x='8.9' y='6.6' width='2.2' height='6' rx='.7' fill='%231d1d1d'/><circle cx='10' cy='14.9' r='1.25' fill='%231d1d1d'/></svg>");
  --kbx-ic-topic: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 4.5h18v11.5H10l-5 4v-4H3z' fill='%23f4f9ff' stroke='%235a7fae' stroke-width='1.3' stroke-linejoin='round'/><path d='M7 8.7h10M7 11.8h6.5' stroke='%232a6fd6' stroke-width='1.6' stroke-linecap='round'/></svg>");
  --kbx-ic-pin: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 4.5h18v11.5H10l-5 4v-4H3z' fill='%232a6fd6' stroke='%230f4aa8' stroke-width='1.3' stroke-linejoin='round'/><path d='M12 6.4l1.4 2.8 3.1.4-2.2 2.2.5 3.1-2.8-1.5-2.8 1.5.5-3.1-2.2-2.2 3.1-.4z' fill='%23ffd34d' stroke='%238a5a08' stroke-width='.5' stroke-linejoin='round'/></svg>");
  --kbx-ic-lock: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 4.5h18v11.5H10l-5 4v-4H3z' fill='%23eef1f5' stroke='%238a96a5' stroke-width='1.3' stroke-linejoin='round'/><rect x='9' y='9.2' width='6' height='4.6' rx='.8' fill='%235d6b7c'/><path d='M10.2 9.2V8a1.8 1.8 0 013.6 0v1.2' fill='none' stroke='%235d6b7c' stroke-width='1.3'/></svg>");
  --kbx-ic-mark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='%232a6fd6' d='M27 22c-7-7-17-8-25-5 5 2 8 4 10 7-4 0-7 1-9 3 5 0 8 1 10 3-3 1-5 3-6 6 5-2 9-2 12 0-1 2-1 4 0 6 4-3 7-8 8-14zM37 22c7-7 17-8 25-5-3 2-4 4-4 7-2-1-4-1-6 0 1 2 1 4 0 6-2-1-4-1-6 0 1 2 0 4-1 6-1-1-3-2-5-2 1 2 0 4-1 6-1-4-2-9-2-18zM32 11l12 5v13c0 10-6 17-12 22-6-5-12-12-12-22V16z'/></svg>");
}

/* keyboard focus: the Windows blue ring (≥3:1 on white) */
html[data-theme="blue"] body.os-site.os-page-kb .os-wb :is(a, button, summary, [tabindex]):focus-visible,
html[data-theme="blue"] body.os-site.os-page-forum .os-wb :is(a, button, summary, [tabindex]):focus-visible { outline-color: #2a6fd6; }

/* ---------- address bar: white Explorer field, blue when focused ---------- */
html[data-theme="blue"] body.os-site.os-page-kb .breadcrumbs,
html[data-theme="blue"] body.os-site.os-page-forum .breadcrumbs {
  background: linear-gradient(#fff, #f3f6fa);
  border-color: #a9b7c9;
  box-shadow: inset 0 1px 2px rgba(16, 40, 80, .1), 0 1px 0 #fff;
  color: #3a495c;
}
html[data-theme="blue"] body.os-site.os-page-kb .breadcrumbs:hover,
html[data-theme="blue"] body.os-site.os-page-forum .breadcrumbs:hover { border-color: #7da2ce; }
html[data-theme="blue"] body.os-site.os-page-kb .breadcrumbs:focus-within,
html[data-theme="blue"] body.os-site.os-page-forum .breadcrumbs:focus-within {
  border-color: #3c7fb1; box-shadow: inset 0 1px 2px rgba(16, 40, 80, .1), 0 0 0 3px rgba(60, 127, 177, .2);
}
html[data-theme="blue"] body.os-site.os-page-kb .breadcrumbs > a:hover,
html[data-theme="blue"] body.os-site.os-page-forum .breadcrumbs > a:hover { color: #0b1b2b; border-color: #a9c6e8; }
html[data-theme="blue"] body.os-site.os-page-kb .breadcrumbs > :last-child,
html[data-theme="blue"] body.os-site.os-page-forum .breadcrumbs > :last-child { color: #10263f; }

/* ---------- page banner: light-blue header, dark title, short blue underline ---------- */
html[data-theme="blue"] body.os-site.os-page-kb #kb-page-root > .section-head,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .section-head,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 {
  border-color: #b9cbe0;
  background:
    radial-gradient(560px 190px at 0 0, rgba(70, 150, 255, .16), transparent 70%),
    linear-gradient(160deg, #e9f2fc, #fff 70%);
  box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-kb #kb-page-root > .section-head::after,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .section-head::after,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2::after { opacity: .08; }
html[data-theme="blue"] body.os-site.os-page-kb #kb-page-root > .section-head h1,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .section-head h1,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 h1 { color: #10263f; text-shadow: 0 1px 0 #fff; }
html[data-theme="blue"] body.os-site.os-page-kb #kb-page-root > .section-head h1::after,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .section-head h1::after,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .flex-between.mb-2 h1::after { background: #3b8fe8; box-shadow: 0 0 8px rgba(70, 150, 255, .45); }

/* ---------- command bar = Explorer toolbar ---------- */
html[data-theme="blue"] body.os-site.os-page-kb #kb-page-root > .card.mb-2,
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .card.mb-2 {
  border-color: #b9c6d6;
  background: linear-gradient(#f9fbfd, #e8eef5);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(16, 40, 80, .08);
}

/* tab strip: silver toggle buttons, the selected one = Explorer selection + blue bar */
html[data-theme="blue"] body.os-site.os-page-kb .tabs .tab-btn,
html[data-theme="blue"] body.os-site.os-page-forum .tabs .tab-btn {
  border-color: #b9c6d6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75); color: #2b3a4a;
}
html[data-theme="blue"] body.os-site.os-page-kb .tabs .tab-btn:hover,
html[data-theme="blue"] body.os-site.os-page-forum .tabs .tab-btn:hover { border-color: #7da2ce; color: #0b1b2b; }
html[data-theme="blue"] body.os-site.os-page-kb .tabs .tab-btn.active,
html[data-theme="blue"] body.os-site.os-page-forum .tabs .tab-btn.active {
  border-color: #84acdd; color: #0f3b86; background: var(--kbx-sel);
  box-shadow: inset 0 1px 2px rgba(15, 74, 168, .14), inset 0 -2px 0 #2a6fd6;
}

/* search boxes: white field, grey magnifier, blue focus */
html[data-theme="blue"] body.os-site.os-page-kb #kb-guide-filter,
html[data-theme="blue"] body.os-site.os-page-kb #kb-db-q,
html[data-theme="blue"] body.os-site.os-page-forum #forum-search-q {
  background-color: #fff; border-color: #7f8c9c; box-shadow: inset 0 1px 2px rgba(16, 40, 80, .1); color: #142030;
}
html[data-theme="blue"] body.os-site.os-page-kb #kb-guide-filter:hover,
html[data-theme="blue"] body.os-site.os-page-kb #kb-db-q:hover,
html[data-theme="blue"] body.os-site.os-page-forum #forum-search-q:hover { border-color: #5a8fc4; }
html[data-theme="blue"] body.os-site.os-page-kb #kb-guide-filter:focus,
html[data-theme="blue"] body.os-site.os-page-kb #kb-db-q:focus,
html[data-theme="blue"] body.os-site.os-page-forum #forum-search-q:focus {
  border-color: #3c7fb1; box-shadow: inset 0 1px 2px rgba(16, 40, 80, .08), 0 0 0 3px rgba(60, 127, 177, .22);
}

/* ---------- KB index: guides = white tiles, light-blue hot state ---------- */
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] {
  border-color: #d3dce7; background: #fff; box-shadow: 0 1px 3px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card]::before { content: none; }
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card]:hover,
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card]:focus-within {
  border-color: #9fc7ea;
  background: linear-gradient(#f3f9fe, #e5f1fb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 8px 20px rgba(16, 40, 80, .12);
}
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] .guide-card-media {
  border-color: #b9c4d1; background: #e6ebf1; box-shadow: 0 1px 3px rgba(16, 40, 80, .14);
}
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] .guide-card-media img { filter: none; }
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card]:hover .guide-card-media img { filter: saturate(1.06); }
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] .guide-card-media::after {
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%) no-repeat 160% 0 / 260% 100%,
    linear-gradient(170deg, rgba(255, 255, 255, .16), transparent 32%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card]:hover .guide-card-media::after { background-position: -60% 0, 0 0; }
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] > .flex-between > .muted { border-color: #c9d3df; background: #f2f6fa; color: #3a495c; }
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] > .flex-between > .muted::before { filter: none; }
/* «Читать гайд →»: silver button, hot blue on the card's hover */
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] > a:last-child {
  border-color: #707a87; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); color: #15202c;
}
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card]:hover > a:last-child,
html[data-theme="blue"] body.os-site.os-page-kb [data-guide-card] > a:last-child:focus-visible {
  border-color: #3c7fb1; color: #0b1b2b;
  background: linear-gradient(#f2faff, #dcefff 49%, #bfe0fb 50%, #d9eeff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 1px 3px rgba(60, 127, 177, .25);
}
html[data-theme="blue"] body.os-site.os-page-kb #kb-page-root > .grid-3:not(:has([data-guide-card]:not(.hidden)))::after {
  border-color: #b9c6d6; background: #f6f8fb; color: #3a495c;
}
/* status bar = Explorer status bar */
html[data-theme="blue"] body.os-site.os-page-kb .kbx-status {
  border-color: #c9d3df; background: linear-gradient(#f6f8fb, #eaeef3); box-shadow: inset 0 1px 0 #fff; color: #445263;
}

/* ---------- KB index: XML encyclopedia window ---------- */
html[data-theme="blue"] body.os-site.os-page-kb #encyclopedia > .card {
  border-color: #c3d2e4;
  background:
    radial-gradient(520px 200px at 100% 0, rgba(70, 150, 255, .1), transparent 70%),
    linear-gradient(#f4f8fd, #fff 240px);
  box-shadow: 0 2px 10px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-kb #encyclopedia > .card::before {
  background: linear-gradient(90deg, #2a6fd6, rgba(42, 111, 214, .3) 40%, transparent 75%);
}

/* ---------- KB article: the document ---------- */
html[data-theme="blue"] body.os-site.os-page-kb .article-layout > article {
  border-color: #cfd8e3; background: #fff; box-shadow: 0 2px 10px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-kb .article-layout .article-cover {
  border-color: #b9c4d1; background: #e6ebf1; box-shadow: 0 6px 18px rgba(16, 40, 80, .16);
}
html[data-theme="blue"] body.os-site.os-page-kb .article-layout .article-cover::after {
  background: linear-gradient(170deg, rgba(255, 255, 255, .16), transparent 30%), linear-gradient(transparent 72%, rgba(11, 42, 102, .16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
html[data-theme="blue"] body.os-site.os-page-kb .article-layout > article > h1 { color: #10263f; text-shadow: none; }
html[data-theme="blue"] body.os-site.os-page-kb .article-layout > article > h1::after { background: #3b8fe8; box-shadow: 0 0 8px rgba(70, 150, 255, .45); }

/* voice version: stays a dark Media Player body (normal in Win7) inside a light-blue Aero rim */
html[data-theme="blue"] body.os-site.os-page-kb .kb-listen {
  --os-green: #3ddc6a; /* lit LCD green, as in the dark theme */
  --os-red: #ff3b30;   /* the ON AIR lamp stays red */
  border-color: #0b1220;
  background: linear-gradient(160deg, #3b4252, #161a23 58%, #0b0d12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 0 0 3px #c9def5, 0 0 0 4px rgba(30, 70, 130, .3), 0 6px 18px rgba(16, 40, 80, .2);
}

/* reading typography: dark text on white, blue accents without glow */
html[data-theme="blue"] body.os-site.os-page-kb .article-prose a { text-decoration-color: rgba(29, 95, 191, .4); }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose a:hover { color: #0b3f8f; text-decoration-color: currentColor; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose :is(h2, h3, h4),
html[data-theme="blue"] body.os-site.os-page-kb .article-layout > article > section > h2 { color: #10263f; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose h2::after,
html[data-theme="blue"] body.os-site.os-page-kb .article-layout > article > section > h2::after { background: #3b8fe8; box-shadow: 0 0 8px rgba(70, 150, 255, .4); }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose h3::before,
html[data-theme="blue"] body.os-site.os-page-kb .article-prose ul > li::before { box-shadow: none; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose ol > li::marker { color: #1d5fbf; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose pre {
  border-color: #c9d3df; background: #f8fafc; box-shadow: inset 0 1px 2px rgba(16, 40, 80, .06); color: #142030;
}
html[data-theme="blue"] body.os-site.os-page-kb .article-prose blockquote { background: #f6f8fb; color: #243244; }

/* tables = Explorer details view, light */
html[data-theme="blue"] body.os-site.os-page-kb .article-prose table {
  border-color: #cfd8e3; background: #fff; box-shadow: 0 1px 3px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-kb .article-prose th {
  background: linear-gradient(#fff, #eef1f5); border-bottom-color: #d6dde6; border-right-color: #e3e8ee; box-shadow: none; color: #2b3a4a;
}
html[data-theme="blue"] body.os-site.os-page-kb .article-prose td { border-bottom-color: #edf0f4; border-right-color: #f1f3f6; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose tbody tr:nth-child(even) td { background: #f7f9fc; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose tbody tr:hover td { background: #e8f2fd; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose img.db-icon { box-shadow: 0 0 0 1px rgba(16, 40, 80, .12); }

/* figures = Windows Photo Viewer: light stage */
html[data-theme="blue"] body.os-site.os-page-kb .article-prose figure {
  border-color: #b9c6d6; background: linear-gradient(#f7fafd, #e4ecf5); box-shadow: 0 2px 8px rgba(16, 40, 80, .1);
}
html[data-theme="blue"] body.os-site.os-page-kb .article-prose figure img { background: #fff; }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose > p > img:not(.db-icon) { border-color: #b9c4d1; box-shadow: 0 1px 3px rgba(16, 40, 80, .12); }

/* tips = blue info bar, warnings = yellow Windows warning */
html[data-theme="blue"] body.os-site.os-page-kb .article-prose .kb-tip {
  background: linear-gradient(90deg, #eaf4fe, #f5f9fe); border-color: #a9cbee; box-shadow: inset 3px 0 0 #2a6fd6;
}
html[data-theme="blue"] body.os-site.os-page-kb .article-prose .kb-warn {
  background: linear-gradient(90deg, #fff4d1, #fffaea); border-color: #e3c463; box-shadow: inset 3px 0 0 #d99a00;
}
html[data-theme="blue"] body.os-site.os-page-kb .article-prose .kb-tip::before { filter: drop-shadow(0 1px 1px rgba(16, 40, 80, .25)); }
html[data-theme="blue"] body.os-site.os-page-kb .article-prose .kb-warn::before { filter: drop-shadow(0 1px 1px rgba(80, 55, 0, .3)); }

/* FAQ = light expanders */
html[data-theme="blue"] body.os-site.os-page-kb .faq-item { border-color: #cfd8e3; box-shadow: none; }
html[data-theme="blue"] body.os-site.os-page-kb .faq-item summary { background: linear-gradient(#fdfdfd, #f0f3f7); }
html[data-theme="blue"] body.os-site.os-page-kb .faq-item summary:hover { background: linear-gradient(#f5faff, #e3effb); }
html[data-theme="blue"] body.os-site.os-page-kb .faq-item[open] summary {
  color: #0f3b86; border-bottom-color: #d6dde6; background: linear-gradient(#f3f9fe, #e5f1fb);
}
html[data-theme="blue"] body.os-site.os-page-kb .faq-item[open] summary::after { border-color: #2a6fd6; }

/* ---------- KB article: navigation pane = Explorer navigation pane ---------- */
html[data-theme="blue"] body.os-site.os-page-kb .toc-box > .card {
  border-color: #cfd8e3; background: #f1f5fb; box-shadow: inset 0 1px 0 #fff;
}
html[data-theme="blue"] body.os-site.os-page-kb .toc-box > .card > strong:first-child {
  border-bottom-color: #cfd8e3; box-shadow: inset 0 1px 0 #fff; color: #1e3350; text-shadow: none;
}
html[data-theme="blue"] body.os-site.os-page-kb .toc-box .toc-list a:hover { color: #0b1b2b; background: #e3effb; border-color: #a9c6e8; }
html[data-theme="blue"] body.os-site.os-page-kb .toc-box .toc-list a.is-on {
  color: #0b1b2b; border-color: #84acdd; background: var(--kbx-sel); box-shadow: inset 2px 0 0 #2a6fd6;
}
html[data-theme="blue"] body.os-site.os-page-kb .toc-box .toc-list a.is-on::before { border-left-color: #2a6fd6; }
html[data-theme="blue"] body.os-site.os-page-kb .toc-box > .card > p code { border-color: #d9a43a; background: #fff8e6; color: #7a4f00; }

/* reading line on the dark-blue taskbar: bright enough to see from the first pixel */
html[data-theme="blue"] body.os-site.os-page-kb .kbx-progress {
  background: linear-gradient(90deg, #2a6fd6, #5aa2f2 60%, #a6d4ff); box-shadow: 0 0 8px rgba(90, 162, 242, .8);
}

/* ---------- FORUM INDEX: phpBB light skin in Windows colours ---------- */
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .table-wrap {
  border-color: #a6b6cc; background: #fff; box-shadow: 0 1px 4px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .table-wrap th {
  background: linear-gradient(#fdfeff, #e4ebf4); border-bottom-color: #b9c6d6; box-shadow: inset 0 1px 0 #fff; color: #2b3a4a;
}
html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows td { border-bottom-color: #e1e7ee; }
html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:nth-child(even) td { background: #f7f9fc; }
html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) td { background: #f3f8fe; }
html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:hover td { background: #e8f2fd; }
html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) td:first-child::before { filter: drop-shadow(0 1px 1px rgba(16, 40, 80, .25)); }

/* pager: silver buttons, the page counter in a status-bar box */
html[data-theme="blue"] body.os-site.os-page-forum #forum-pager .btn {
  border-color: #707a87; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); color: #15202c;
}
html[data-theme="blue"] body.os-site.os-page-forum #forum-pager .btn:not(:disabled):hover {
  border-color: #3c7fb1; background: linear-gradient(#f2faff, #dcefff 49%, #bfe0fb 50%, #d9eeff); color: #0b1b2b;
}
html[data-theme="blue"] body.os-site.os-page-forum #forum-pager .btn:disabled {
  opacity: 1; filter: none; border-color: #b5bcc5; background: #f2f3f5; box-shadow: none; color: #8a939e;
}
html[data-theme="blue"] body.os-site.os-page-forum #forum-pager > .muted {
  border-color: #c9d3df; background: linear-gradient(#f6f8fb, #eaeef3); box-shadow: inset 0 1px 0 #fff; color: #2b3a4a; text-shadow: none;
}

/* ---------- FORUM TOPIC: posts with a light author column ---------- */
html[data-theme="blue"] body.os-site.os-page-forum .forum-post {
  border-color: #a6b6cc; box-shadow: 0 1px 4px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-forum .forum-post.is-staff {
  border-color: #7da2ce; box-shadow: 0 0 0 1px rgba(125, 162, 206, .3), 0 2px 8px rgba(16, 40, 80, .1);
}
html[data-theme="blue"] body.os-site.os-page-forum .forum-post-head > .flex-row {
  background: #f4f7fb; border-right-color: #c6d2e1; box-shadow: none;
}
html[data-theme="blue"] body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row {
  background: linear-gradient(rgba(42, 111, 214, .1), transparent 55%), #f4f7fb; box-shadow: inset 0 2px 0 #2a6fd6;
}
/* avatar = the home page's blue user tile, white letter */
html[data-theme="blue"] body.os-site.os-page-forum .forum-post-head > .flex-row::before {
  background: var(--kbx-ic-mark-dim) center / 58% no-repeat, linear-gradient(135deg, #5b9cf5, #173d8c);
  border-color: rgba(0, 0, 0, .45);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #a6b6cc, 0 2px 6px rgba(16, 40, 80, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
html[data-theme="blue"] body.os-site.os-page-forum .forum-post-head > .flex-row[data-kbx-ini]::before { background: linear-gradient(135deg, #5b9cf5, #173d8c); }
html[data-theme="blue"] body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row::before {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #2a6fd6, 0 0 12px rgba(70, 150, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
/* staff names in phpBB admin red, as in the home page forum window */
html[data-theme="blue"] body.os-site.os-page-forum .forum-post.is-staff .forum-post-head > .flex-row > strong { color: #c0392b; text-shadow: none; }
html[data-theme="blue"] body.os-site.os-page-forum .forum-post-head > .muted { border-bottom-color: #dde4ec; background: linear-gradient(#fbfcfe, #f1f5f9); }
html[data-theme="blue"] body.os-site.os-page-forum .forum-post > .forum-post-head + div a { text-decoration-color: rgba(29, 95, 191, .4); }
html[data-theme="blue"] body.os-site.os-page-forum .forum-post .fx-quote {
  border-color: #c6d2e1; border-left-color: #2a6fd6; background: #f6f8fb; box-shadow: none; color: #3a495c;
}
html[data-theme="blue"] body.os-site.os-page-forum .forum-post .fx-quote::before { color: #1d5fbf; }
html[data-theme="blue"] body.os-site.os-page-forum .forum-post > .flex-row::before { box-shadow: none; }
/* liked = pressed gold toggle */
html[data-theme="blue"] body.os-site.os-page-forum .forum-post [data-like-post].btn-gold {
  border-color: #d9a43a; background: linear-gradient(#fffbea, #ffefc0); box-shadow: inset 0 1px 0 #fff; color: #7a4f00; text-shadow: none;
}
html[data-theme="blue"] body.os-site.os-page-forum .forum-post [data-like-post].btn-gold:hover {
  border-color: #c48a1a; background: linear-gradient(#fffdf2, #ffe7a3); color: #6a4400;
}

/* quick reply + BBCode toolbar (also in the "new topic" dialog) */
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .card.mt-3 {
  border-color: #a6b6cc; background: #fff; box-shadow: 0 1px 4px rgba(16, 40, 80, .08);
}
html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .card.mt-3 > h3 {
  border-bottom-color: #c3ccd7; box-shadow: inset 0 1px 0 #fff; color: #10263f; text-shadow: none;
}
html[data-theme="blue"] body.os-site.os-page-forum .bb-toolbar {
  border-color: #8c99a8; background: linear-gradient(#f3f6fa, #dfe7f0); box-shadow: inset 0 1px 0 #fff;
}
html[data-theme="blue"] body.os-site.os-page-forum .bb-toolbar .bb-btn { color: #2b3a4a; }
html[data-theme="blue"] body.os-site.os-page-forum .bb-toolbar .bb-btn:hover { color: #0b1b2b; border-color: #7da2ce; }
html[data-theme="blue"] body.os-site.os-page-forum .bb-toolbar .bb-btn:active { background: #cfe4fb; box-shadow: inset 0 1px 2px rgba(16, 40, 80, .2); }
html[data-theme="blue"] body.os-site.os-page-forum #forum-reply-body { background: #fff; color: #142030; }

/* ---------- phone (≤760px): restore the resets the colour rules above outrank ---------- */
@media (max-width: 760px) {
  html[data-theme="blue"] body.os-site.os-page-forum #forum-page-root > .table-wrap { background: transparent; box-shadow: none; }
  html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr {
    border-color: #a6b6cc; background: linear-gradient(#fff, #f6f8fb); box-shadow: 0 1px 3px rgba(16, 40, 80, .08);
  }
  html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) { background: linear-gradient(#eaf3fd, #fff 70%); }
  html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:hover { border-color: #9fc7ea; background: linear-gradient(#f3f9fe, #e5f1fb); }
  html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:nth-child(even) td,
  html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:has(.badge-gold) td,
  html[data-theme="blue"] body.os-site.os-page-forum #forum-topic-rows tr:hover td { background: transparent; }
  html[data-theme="blue"] body.os-site.os-page-forum .forum-post-head > .flex-row { border-bottom-color: #c6d2e1; }
}
