@import url("https://b1-apicdn.cloudhosted.pp.ua/api/fonts/css/e-Ukraine");

:root {
  --font: "e-Ukraine", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: Consolas, "Cascadia Code", "Fira Code", monospace;
  --blue: #0078d4;
  --blue-dark: #005a9e;
  --blue-bright: #5aaeff;
  --cyan: #00a4ef;
  --teal: #00b7c3;
  --ok: #107c41;
  --warn: #d83b01;
  --danger: #d13438;
  --purple-bar: #2d1b4e;
  --purple-ink: #e8dcff;
  --ease: cubic-bezier(0.07, 0.88, 0.16, 1);

  /* Light theme (Windows 10 UWP crisp palette) */
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --surface-card: #f4f8fc;
  --surface-card-border: #d2e4f5;
  --header-bg: #ffffff;
  --subbar-bg: #f8f8f8;
  --ink: #171717;
  --ink-2: #3b3a39;
  --muted: #605e5c;
  --line: #e1dfdd;
  --line-2: #c8c6c4;
  --field-bg: #ffffff;
  --field-border: #7a7a7a;
  --dropdown-bg: #f2f2f2;
  --dropdown-hover: #e5e5e5;
  --accent: #0067b8;
  --code-bg: #f3f2f1;
  --callout-note-bg: #eef5fc;
  --callout-tip-bg: #e7f6ec;
  --callout-warn-bg: #fff4ce;
  --callout-danger-bg: #fde7e9;
  --callout-note-bg: #f0f6fc;
  --callout-tip-bg: #eff9f2;
  --callout-warn-bg: #fdf6e7;
  --callout-danger-bg: #fdf1f2;
  --callout-imp-bg: #f5f0fa;
  color-scheme: light;
}



:root[data-theme="dark"] {
  /* Dark theme matching Microsoft Learn screenshot + AtrID dark */
  --bg: #171717;
  --bg-alt: #1f1f1f;
  --surface: #1b1b1b;
  --surface-2: #242424;
  --surface-card: #0c2235;
  --surface-card-border: #193b59;
  --callout-imp-bg: #231838;
  --header-bg: #171717;
  --subbar-bg: #1b1b1b;
  --ink: #f2f2f2;
  --ink-2: #d6d6d6;
  --muted: #a6a6a6;
  --line: #2e2e2e;
  --line-2: #444444;
  --field-bg: #121212;
  --field-border: #6b6b6b;
  --dropdown-bg: #232323;
  --dropdown-hover: #313131;
  --accent: #6cb8ff;
  --code-bg: #111317;
  --callout-note-bg: #0f2438;
  --callout-tip-bg: #102a1b;
  --callout-warn-bg: #332609;
  --callout-danger-bg: #38161a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.learn-topbar,
.learn-subbar,
.learn-banner,
.learn-footer {
  flex-shrink: 0;
}

.app-root {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.docs-shell {
  flex: 1 0 auto;
  min-height: 0;
}

.learn-footer {
  margin-top: auto;
}
img, video, canvas { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.ic { width: 18px; height: 18px; flex: none; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: miter; stroke-linecap: square; vertical-align: middle; }
.ic.xs { width: 14px; height: 14px; }
.ic.lg { width: 22px; height: 22px; }
.ic.xl { width: 28px; height: 28px; }

/* ───────── Windows 10 5-dot Fluent Linear Loader (AtrID parity) ───────── */
.ms-linear-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  overflow: hidden;
  background: transparent;
  z-index: 4000;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.ms-linear-loader.active {
  opacity: 1;
  visibility: visible;
}
.ms-linear-loader .dot {
  position: absolute;
  top: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--blue);
  left: -12px;
  animation: none;
}
.ms-linear-loader.active .dot {
  animation: fluent-linear 3.5s infinite cubic-bezier(0.15, 0.85, 0.85, 0.15);
}
.ms-linear-loader.active .dot:nth-child(1) { animation-delay: 0s; }
.ms-linear-loader.active .dot:nth-child(2) { animation-delay: 0.12s; }
.ms-linear-loader.active .dot:nth-child(3) { animation-delay: 0.24s; }
.ms-linear-loader.active .dot:nth-child(4) { animation-delay: 0.36s; }
.ms-linear-loader.active .dot:nth-child(5) { animation-delay: 0.48s; }

@keyframes fluent-linear {
  0% {
    left: -12px;
  }
  55% {
    left: calc(100% + 12px);
  }
  100% {
    left: calc(100% + 12px);
  }
}

/* ───────── Brand Logo ───────── */
.brand-logo {
  width: 24px;
  height: 24px;
  display: block;
  flex: none;
  margin-right: 10px;
  object-fit: contain;
  object-position: center;
}

.auth-gate-logo {
  width: 44px;
  height: 44px;
  display: block;
  margin: 0 auto 18px;
  object-fit: contain;
  object-position: center;
}

.mobile-drawer-brand img {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  object-fit: contain;
  object-position: center;
}
.ms-logo {
  display: inline-grid; width: 20px; height: 20px;
  grid-template-columns: 9px 9px; grid-template-rows: 9px 9px; gap: 2px; flex: none;
}
.ms-logo span:nth-child(1) { background: var(--cyan); }
.ms-logo span:nth-child(2) { background: var(--blue); }
.ms-logo span:nth-child(3) { background: var(--teal); }
.ms-logo span:nth-child(4) { background: var(--blue-dark); }

/* ───────── Entrance Animations (AtrID parity) ───────── */
@keyframes card-in {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes mega-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ───────── Top Global Bar & Microsoft Learn Mega-Menu ───────── */
.learn-topbar {
  background: var(--header-bg); border-bottom: 1px solid var(--line);
  height: 52px; position: sticky; top: 0; z-index: 1200;
}
.topbar-inner {
  max-width: 1600px; margin: 0 auto; height: 100%; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; height: 100%; }
.brand-lockup {
  display: inline-flex; align-items: center; gap: 9px; height: 100%;
  color: var(--ink); font-weight: 700; font-size: 16px; padding-right: 12px; white-space: nowrap;
}
.brand-lockup:hover { text-decoration: none; }
.brand-lockup:hover .brand-name,
.brand-lockup:hover .brand-sub {
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.brand-sep { color: var(--line-2); font-weight: 300; font-size: 18; }
.brand-sub { font-weight: 500; font-size: 18; color: var(--ink); }

.top-nav { display: flex; align-items: stretch; gap: 0; margin-left: 4px; height: 100%; }
.nav-dd-wrap { display: flex; align-items: stretch; position: static; }
.top-nav-btn, .top-nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 100%; padding: 0 14px; background: transparent; border: 0;
  color: var(--ink-2); font-size: 13.5px; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.top-nav-btn:hover, .top-nav-link:hover {
  color: var(--ink); background: var(--surface-2); text-decoration: none;
}
.top-nav-btn:hover > span,
.top-nav-link:hover > span {
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.top-nav-link.active { color: var(--ink); border-bottom-color: var(--blue); }
.top-nav-btn.open {
  background: var(--dropdown-bg); color: var(--ink); border-bottom-color: transparent;
}
.top-nav-btn .nav-chevron { transition: transform .2s var(--ease); }
.top-nav-btn.open .nav-chevron { transform: rotate(180deg); }

/* Full-width Mega-Menu Panel */
.mega-menu {
  display: none; position: fixed; top: 52px; left: 0; right: 0;
  background: var(--dropdown-bg); border-bottom: 1px solid var(--line-2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .48); z-index: 1190;
  max-height: calc(100vh - 52px); overflow-y: auto;
}
.mega-menu.open { display: block; animation: mega-in .22s var(--ease) both; }
.mega-menu-inner {
  max-width: 1600px; margin: 0 auto; padding: 28px 24px 34px;
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start;
}
.mega-cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 36px;
}
.mega-col-title {
  grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin: 0 0 8px;
}
.mega-link {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 10px 8px; color: var(--ink); text-decoration: none;
  border-left: 2px solid transparent; transition: background .15s ease, border-color .15s ease;
}
.mega-link:hover {
  background: var(--dropdown-hover); border-left-color: var(--blue); text-decoration: none;
}
.mega-link:hover .mega-link-title {
  text-decoration: underline; text-underline-offset: 3px;
}
.mega-link-title { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.mega-link-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.mega-promo {
  border-left: 1px solid var(--line); padding-left: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.mega-promo-eyebrow {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--muted);
}
.mega-promo-title { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.mega-promo-desc { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.mega-promo-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 13px; font-weight: 600; color: var(--accent);
}
.mega-backdrop {
  display: none; position: fixed; inset: 52px 0 0 0;
  background: rgba(0, 0, 0, .42); z-index: 1180;
}
.mega-backdrop.open { display: block; }

/* Small dropdown (User menu) */
.sharp-menu {
  display: none; position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 240px; max-width: calc(100vw - 24px);
  background: var(--dropdown-bg); border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); z-index: 1250;
}
.user-menu-wrap .sharp-menu { left: auto; right: 0; }
.sharp-menu.open { display: block; animation: mega-in .18s var(--ease) both; }
.sharp-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--line);
}
.sharp-menu-item:last-child { border-bottom: 0; }
.sharp-menu-item:hover { background: var(--dropdown-hover); text-decoration: none; }
.sharp-menu-sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

.icon-btn {
  width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

/* ───────── AtrID Sign-In Gate Card (animated, centered, clean) ───────── */
.auth-gate-card {
  width: min(440px, 100%); margin: 28px auto;
  background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--blue); padding: 36px 34px;
  text-align: center; box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
  animation: card-in .75s var(--ease) both; transform-origin: center bottom;
}
.auth-gate-logo {
  width: 38px; height: 38px; object-fit: contain; display: block; margin: 0 auto 18px;
}
.auth-gate-card h1 { margin: 0 0 10px; font-size: 22px; line-height: 1.25; }
.auth-gate-card p { margin: 0 auto 24px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }


/* Context Subbar */
.learn-subbar {
  background: var(--subbar-bg); border-bottom: 1px solid var(--line);
  min-height: 44px; display: flex; align-items: center;
}
.subbar-inner {
  max-width: 1600px; width: 100%; margin: 0 auto; padding: 6px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.subbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.subbar-title { font-weight: 700; font-size: 14px; color: var(--ink); }
.subbar-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.subbar-link { font-size: 12.5px; color: var(--ink-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.subbar-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.subbar-link.active { color: var(--ink); border-bottom-color: var(--accent); text-decoration: none; }
.subbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Purple Announcement Banner */
.learn-banner {
  background: var(--purple-bar); color: var(--purple-ink);
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 9px 20px; font-size: 12.5px;
}
.banner-inner {
  max-width: 1600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.banner-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; line-height: 1.45; }
.banner-inner a { color: #b7d7ff; font-weight: 600; margin-left: 6px; text-decoration: underline; }
.banner-close { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 4px; flex: none; }

/* ───────── Buttons (Strictly 0px Sharp Windows 10) ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 34px; padding: 6px 14px; font-size: 13px; font-weight: 600; line-height: 1.25;
  border-radius: 0; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
  max-width: 100%;
}
.btn:hover { background: var(--dropdown-hover); text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #ffffff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #ffffff; }
.btn-accent-soft { background: #74b9ff; border-color: #74b9ff; color: #0a1420; }
.btn-accent-soft:hover { background: #98ccff; color: #0a1420; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: rgba(0, 120, 212, .14); }
.btn-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 28px; padding: 4px 10px; font-size: 12px; }

/* Auth Pill */
.user-menu-wrap { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line-2); color: var(--ink); cursor: pointer; font-size: 13px;
  max-width: 100%;
}
.user-trigger:hover { background: var(--surface-2); }
.user-avatar-sq {
  width: 22px; height: 22px; flex: none; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.admin-tag { background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; text-transform: uppercase; letter-spacing: .04em; }

/* ───────── Windows 10 / UWP Fluent 1.0 Form Controls ───────── */
.uwp-field { margin-bottom: 16px; min-width: 0; }
.uwp-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.uwp-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.uwp-textbox-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.uwp-textbox, .uwp-textarea {
  width: 100%; max-width: 100%; background: var(--field-bg); color: var(--ink);
  border: 2px solid var(--field-border); border-radius: 0;
  font-size: 13.5px; padding: 7px 34px 7px 10px; transition: border-color .15s;
}
.uwp-textarea { padding: 9px 11px; min-height: 120px; resize: vertical; line-height: 1.55; }
.uwp-textbox:hover, .uwp-textarea:hover { border-color: var(--ink); }
.uwp-textbox:focus, .uwp-textarea:focus { outline: none; border-color: var(--blue); }
.uwp-clear-btn {
  position: absolute; right: 4px; width: 26px; height: 26px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.uwp-clear-btn:hover { color: var(--ink); background: var(--surface-2); }

/* Sharp Windows 10 ComboBox */
.uwp-select { position: relative; width: 100%; min-width: 0; }
.uwp-select-trigger {
  width: 100%; height: 36px; padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--field-bg); color: var(--ink);
  border: 2px solid var(--field-border); border-radius: 0;
  font-size: 13px; text-align: left; cursor: pointer;
}
.uwp-select-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uwp-select-trigger:hover { border-color: var(--ink); }
.uwp-select.open .uwp-select-trigger, .uwp-select-trigger:focus { border-color: var(--blue); outline: none; }
.uwp-select-list {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  max-height: 240px; overflow-y: auto;
  background: var(--dropdown-bg); border: 1px solid var(--line-2); border-top: 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.3); z-index: 1500;
}
.uwp-select.open .uwp-select-list { display: block; }
.uwp-select-list::-webkit-scrollbar { width: 8px; }
.uwp-select-list::-webkit-scrollbar-thumb { background: var(--line-2); }
.uwp-select-option {
  padding: 9px 11px; font-size: 13px; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.uwp-select-option:hover { background: var(--dropdown-hover); }
.uwp-select-option.selected { background: rgba(0, 120, 212, .22); font-weight: 600; border-left: 3px solid var(--blue); padding-left: 8px; }

/* Sharp Windows 10 CheckBox */
.uwp-check {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13.5px; color: var(--ink); user-select: none;
}
.uwp-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.uwp-check-box {
  width: 19px; height: 19px; border: 2px solid var(--field-border); background: var(--field-bg);
  display: grid; place-items: center; flex: none; transition: background .12s, border-color .12s;
}
.uwp-check-box svg { width: 12px; height: 12px; opacity: 0; color: #fff; stroke-width: 2.4; }
.uwp-check input:checked + .uwp-check-box { background: var(--blue); border-color: var(--blue); }
.uwp-check input:checked + .uwp-check-box svg { opacity: 1; }
.uwp-check:hover .uwp-check-box { border-color: var(--ink); }

/* Windows 10 RadioButton */
.uwp-radio-group { display: flex; flex-wrap: wrap; gap: 14px; }
.uwp-radio {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--ink); user-select: none;
}
.uwp-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.uwp-radio-ring {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--field-border);
  display: grid; place-items: center; flex: none; background: var(--field-bg);
}
.uwp-radio-ring::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); transform: scale(0); transition: transform .12s var(--ease);
}
.uwp-radio input:checked + .uwp-radio-ring { border-color: var(--blue); }
.uwp-radio input:checked + .uwp-radio-ring::after { transform: scale(1); background: var(--blue); }

/* Windows 10 ToggleSwitch */
.uwp-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13.5px; }
.uwp-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.uwp-toggle-track {
  width: 42px; height: 20px; flex: none; border-radius: 999px; border: 2px solid var(--field-border);
  position: relative; background: transparent; transition: background .15s, border-color .15s;
}
.uwp-toggle-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ink); transition: transform .15s var(--ease), background .15s;
}
.uwp-toggle input:checked + .uwp-toggle-track { background: var(--blue); border-color: var(--blue); }
.uwp-toggle input:checked + .uwp-toggle-track::after { transform: translateX(22px); background: #ffffff; }

/* ───────── Docs 3-Column Layout ───────── */
.docs-shell {
  width: 100%; max-width: 1520px; margin: 0 auto; display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 210px;
  min-height: calc(100vh - 150px);
}
.docs-sidebar {
  border-right: 1px solid var(--line); padding: 14px;
  background: var(--bg-alt); position: sticky; top: 52px;
  max-height: calc(100vh - 52px); overflow-y: auto; min-width: 0;
}
.toc-filter-box { margin-bottom: 12px; }
.toc-section { margin-bottom: 6px; }
.toc-section-btn {
  width: 100%; display: flex; align-items: center; gap: 7px;
  padding: 6px 6px; background: transparent; border: 0; color: var(--ink);
  font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left;
}
.toc-section-btn:hover { background: var(--surface-2); }
.toc-section-btn svg { transition: transform .15s; flex: none; }
.toc-section.collapsed .toc-section-btn svg { transform: rotate(-90deg); }
.toc-section.collapsed .toc-list { display: none; }
.toc-list { list-style: none; margin: 2px 0 6px 12px; padding: 0; border-left: 1px solid var(--line); }
.toc-item a {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 10px 6px 12px; font-size: 12.5px; color: var(--ink-2);
  border-left: 3px solid transparent; margin-left: -1px; overflow-wrap: anywhere;
}
.toc-item a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.toc-item a.active {
  background: var(--surface-2); color: var(--ink); font-weight: 700;
  border-left-color: var(--blue);
}

.docs-main {
  padding: clamp(18px, 2.5vw, 28px) clamp(16px, 3vw, 36px) 56px;
  min-width: 0; max-width: 100%;
}
.breadcrumbs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 14px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

.article-header { margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 16px; min-width: 0; }
.article-h1 {
  margin: 0 0 10px;
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.2; font-weight: 700; letter-spacing: -.015em;
  overflow-wrap: break-word;
}
.article-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.article-meta-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.docs-outline {
  padding: 24px 14px; border-left: 1px solid var(--line);
  position: sticky; top: 52px; max-height: calc(100vh - 52px); overflow-y: auto; min-width: 0;
}
.outline-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.outline-list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.outline-list a {
  display: block; padding: 5px 0 5px 10px; font-size: 12px; color: var(--muted);
  border-left: 2px solid transparent; margin-left: -1px; overflow-wrap: break-word;
}
.outline-list a:hover { color: var(--ink); border-left-color: var(--blue); text-decoration: none; }
.outline-list li.lvl-3 a { padding-left: 20px; }

/* ───────── Mobile Drawer & Responsive Helpers ───────── */
body.drawer-open { overflow: hidden; }
.signin-short { display: none; }
.subbar-links:empty, .subbar-actions:empty { display: none; }

.drawer-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, .58); z-index: 1300;
}
.drawer-backdrop.open { display: block; }

.mobile-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(310px, 86vw); background: var(--surface);
  border-right: 1px solid var(--line-2);
  box-shadow: 12px 0 36px rgba(0, 0, 0, .5);
  z-index: 1350; display: flex; flex-direction: column;
  transform: translateX(-105%);
  transition: transform .28s var(--ease);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 52px; padding: 0 12px 0 16px; flex: none;
  border-bottom: 1px solid var(--line); background: var(--header-bg);
}
.mobile-drawer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; color: var(--ink);
}
.mobile-drawer-body { padding: 12px 0 28px; flex: 1; }
.mobile-drawer-group {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted);
  padding: 14px 16px 6px;
}
.mobile-drawer-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 16px; color: var(--ink); font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent; text-decoration: none;
  background: transparent; border-top: 0; border-right: 0; border-bottom: 0;
  width: 100%; text-align: left; cursor: pointer;
}
.mobile-drawer-link:hover, .mobile-drawer-link.active {
  background: var(--surface-2); border-left-color: var(--blue); text-decoration: none;
}
.mobile-drawer-sep { height: 1px; background: var(--line); margin: 10px 0; }

/* Mobile Docs TOC trigger bar & sidebar close header */
.mobile-toc-bar {
  display: none; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.mobile-toc-bar-left { display: inline-flex; align-items: center; gap: 8px; }
.docs-sidebar-head {
  display: none; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 14px; color: var(--ink);
}

/* ───────── Microsoft Learn Markdown Content Styles ───────── */
.md-body {
  font-size: 14px; line-height: 1.65; color: var(--ink-2);
  min-width: 0; overflow-wrap: break-word;
}
.md-body h2 { font-size: clamp(18px, 1.9vw, 22px); font-weight: 700; color: var(--ink); margin: 28px 0 10px; line-height: 1.25; }
.md-body h3 { font-size: clamp(15.5px, 1.4vw, 17.5px); font-weight: 700; color: var(--ink); margin: 22px 0 8px; line-height: 1.3; }
.md-body p { margin: 0 0 14px; }
.md-body ul, .md-body ol { margin: 0 0 14px; padding-left: 22px; }
.md-body li { margin-bottom: 5px; }
.md-body img { max-width: 100%; height: auto; border: 1px solid var(--line); display: block; margin: 14px 0; }
.md-body code {
  font-family: var(--mono); font-size: 12.5px; background: var(--code-bg);
  padding: 2px 5px; border: 1px solid var(--line);
  overflow-wrap: anywhere; word-break: break-word;
}
.md-body .code-wrap { position: relative; margin: 16px 0; border: 1px solid var(--line); background: var(--code-bg); max-width: 100%; overflow: hidden; }
.md-body .code-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 11px; font-family: var(--mono); color: var(--muted); text-transform: uppercase;
}
.md-body .code-copy {
  background: transparent; border: 1px solid var(--line-2); color: var(--ink);
  padding: 2px 8px; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.md-body .code-copy:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.md-body pre {
  margin: 0; padding: 12px 14px; max-width: 100%;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
}
.md-body pre code { border: 0; background: transparent; padding: 0; overflow-wrap: normal; word-break: normal; }

.md-body table {
  width: 100%; max-width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px;
}
.md-body th, .md-body td {
  border: 1px solid var(--line); padding: 8px 11px; text-align: left; vertical-align: top;
  overflow-wrap: break-word;
}
.md-body th { background: var(--surface-2); color: var(--ink); font-weight: 700; }

/* MS Learn Callouts */
.md-callout {
  margin: 16px 0;
  padding: 13px 16px;
  border: 0;
  border-left: 4px solid var(--blue);
  background: var(--callout-note-bg);
  color: var(--ink);
  max-width: 100%;
  overflow-wrap: break-word;
}
.md-callout p:last-child { margin-bottom: 0; }
.md-callout-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.md-callout.tip { border-left-color: var(--ok); background: var(--callout-tip-bg); }
.md-callout.tip .md-callout-head { color: var(--ok); }

.md-callout.warning { border-left-color: var(--warn); background: var(--callout-warn-bg); }
.md-callout.warning .md-callout-head { color: var(--warn); }

.md-callout.caution { border-left-color: var(--danger); background: var(--callout-danger-bg); }
.md-callout.caution .md-callout-head { color: var(--danger); }

.md-callout.important { border-left-color: #744da9; background: var(--callout-imp-bg); }
.md-callout.important .md-callout-head { color: #744da9; }

:root[data-theme="dark"] .md-callout.tip .md-callout-head { color: #5fd38b; }
:root[data-theme="dark"] .md-callout.warning .md-callout-head { color: #ff9c66; }
:root[data-theme="dark"] .md-callout.caution .md-callout-head { color: #ff7b80; }
:root[data-theme="dark"] .md-callout.important { border-left-color: #9b72cf; }
:root[data-theme="dark"] .md-callout.important .md-callout-head { color: #c7a8ff; }
/* MS Learn "Start here" Quicklinks & "Build your skills" Cards */
.learn-quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px; margin: 18px 0 26px;
}
.quicklink-item { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.quicklink-item > :not(.quicklink-ic) { min-width: 0; flex: 1; }
.quicklink-item > .quicklink-ic {
  width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center;
  background: var(--surface-card); border: 1px solid var(--surface-card-border); color: var(--accent);
}
.quicklink-ic {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  background: var(--surface-card); border: 1px solid var(--surface-card-border); color: var(--accent);
}
.quicklink-title { display: block; font-size: 14px; font-weight: 700; color: var(--accent); margin-bottom: 3px; overflow-wrap: break-word; }
.quicklink-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 0; }

.learn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 14px; margin: 18px 0 26px;
}
.learn-card {
  background: var(--surface-card); border: 1px solid var(--surface-card-border);
  padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
  transition: border-color .15s, transform .15s var(--ease);
}
.learn-card:hover { border-color: var(--accent); }
.learn-card-ic { color: var(--accent); }
.learn-card-title { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.3; overflow-wrap: break-word; }
.learn-card-desc { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; flex: 1; }
.learn-card-links { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 5px; }
.learn-card-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent); overflow-wrap: anywhere; }

/* ───────── Home Hero & Product Directory ───────── */
.page-container {
  width: 100%; max-width: 1280px; margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) clamp(14px, 2.5vw, 24px) 56px;
}
.hero-banner {
  background: linear-gradient(135deg, #0b243b 0%, #101822 65%, #172330 100%);
  border: 1px solid var(--surface-card-border); border-left: 5px solid var(--blue);
  padding: clamp(20px, 3.2vw, 34px) clamp(18px, 3.5vw, 38px);
  color: #f2f2f2; margin-bottom: clamp(20px, 2.8vw, 30px);
  overflow-wrap: break-word;
}
.hero-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); font-weight: 700; margin-bottom: 8px; }
.hero-banner h1 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 32px); line-height: 1.18; }
.hero-banner p { margin: 0 0 20px; max-width: 640px; color: #c8d4e3; font-size: clamp(13px, 1.25vw, 14.5px); line-height: 1.58; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: clamp(20px, 2.8vw, 30px);
}
.stat-tile {
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--blue);
  padding: 14px 16px; min-width: 0;
}
.stat-val { font-size: clamp(20px, 2.2vw, 25px); font-weight: 700; color: var(--ink); line-height: 1.2; }
.stat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; overflow-wrap: break-word; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: 14px;
}
.product-tile {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--tile-accent, var(--blue));
  padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  overflow-wrap: break-word;
}
.product-tile:hover { border-color: var(--tile-accent, var(--blue)); }
.product-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.product-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-ic {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--tile-accent, var(--accent)); border: 1px solid var(--line);
}
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2);
  max-width: 100%;
}
.badge.status-open { border-color: var(--blue); color: var(--accent); background: rgba(0,120,212,.14); }
.badge.status-answered, .badge.status-fixed { border-color: var(--ok); color: #5fd38b; background: rgba(16,124,65,.2); }
.badge.status-investigating { border-color: var(--warn); color: #ff9c66; background: rgba(216,59,1,.2); }
.badge.status-planned { border-color: #8764b8; color: #c7a8ff; background: rgba(135,100,184,.2); }
.badge.status-closed { border-color: var(--muted); color: var(--muted); }
.badge.staff { background: var(--blue); border-color: var(--blue); color: #fff; }
.badge.type-bug { border-color: var(--danger); color: #ff7b80; }
.badge.type-feature { border-color: var(--teal); color: var(--teal); }
.badge.type-question { border-color: var(--cyan); color: var(--cyan); }

/* ───────── Feedback & Q&A Hub (/feedback) ───────── */
.fb-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.fb-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 165px) minmax(0, 165px) minmax(0, 1fr);
  gap: 10px; margin-bottom: 18px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line);
}
.fb-list { display: flex; flex-direction: column; gap: 10px; }
.fb-row {
  display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2);
  padding: 14px 16px; transition: border-color .15s, background .15s; min-width: 0;
}
.fb-row > * { min-width: 0; }
.fb-row:hover { border-left-color: var(--blue); background: var(--bg-alt); }
.fb-row.pinned { border-left-color: var(--cyan); }
.fb-vote-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 7px 5px; border: 1px solid var(--line); background: var(--surface-2);
}
.fb-vote-num { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.fb-vote-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.fb-row-title { font-size: clamp(14.5px, 1.35vw, 15.5px); font-weight: 700; color: var(--ink); display: inline-block; margin-bottom: 5px; overflow-wrap: break-word; }
.fb-row-title:hover { color: var(--accent); }
.fb-row-excerpt { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; overflow-wrap: break-word; }
.fb-meta-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }

/* Guided Ask / Feedback Composer */
.fb-composer-card {
  width: 100%; max-width: 840px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--blue);
  padding: clamp(16px, 3vw, 28px);
}
.product-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
  gap: 9px; margin-bottom: 12px;
}
.product-pick-btn {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; min-width: 0;
  background: var(--field-bg); border: 2px solid var(--line-2); color: var(--ink);
  cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; overflow-wrap: anywhere;
}
.product-pick-btn:hover { border-color: var(--ink); }
.product-pick-btn.active { border-color: var(--blue); background: rgba(0, 120, 212, .16); }

/* Thread Detail */
.thread-shell { width: 100%; max-width: 940px; margin: 0 auto; }
.thread-post {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--blue);
  padding: clamp(16px, 2.5vw, 24px); margin-bottom: 16px; overflow-wrap: break-word;
}
.reply-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2);
  padding: clamp(14px, 2vw, 18px); margin-bottom: 12px; overflow-wrap: break-word;
}
.reply-card.accepted { border-left-color: var(--ok); background: var(--callout-tip-bg); }
.reply-card.staff-reply { border-left-color: var(--blue); }
.mod-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line);
  margin-bottom: 16px;
}

/* ───────── Learn Studio Admin (/studio) ───────── */
.studio-shell {
  width: 100%; max-width: 1480px; margin: 0 auto;
  padding: 20px clamp(12px, 2vw, 20px) 56px;
}
.studio-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap;
}
.studio-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; background: transparent; border: 0; border-bottom: 3px solid transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: -2px;
}
.studio-tab:hover { color: var(--ink); background: var(--surface-2); }
.studio-tab.active { color: var(--ink); border-bottom-color: var(--blue); background: var(--surface); }

.studio-split { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.studio-panel { background: var(--surface); border: 1px solid var(--line); padding: 16px; min-width: 0; }
.studio-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 12.5px;
  overflow-wrap: anywhere;
}
.studio-list-item:hover { background: var(--surface-2); }
.studio-list-item.active { background: rgba(0, 120, 212, .18); border-left: 3px solid var(--blue); padding-left: 7px; }

.md-toolbar {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-bottom: 0;
}
.md-tool-btn {
  height: 28px; padding: 0 9px; background: transparent; border: 1px solid transparent;
  color: var(--ink); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.md-tool-btn:hover { background: var(--dropdown-hover); border-color: var(--line-2); }

.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.editor-grid.single { grid-template-columns: minmax(0, 1fr); }
.editor-preview {
  border: 1px solid var(--line); padding: 14px; background: var(--bg);
  min-height: 380px; max-height: 640px; overflow-y: auto; min-width: 0;
}
.studio-code-area {
  width: 100%; max-width: 100%; min-height: 380px; font-family: var(--mono); font-size: 13px; line-height: 1.5;
  background: var(--field-bg); color: var(--ink); border: 2px solid var(--field-border); padding: 12px; resize: vertical;
}
.studio-code-area:focus { outline: none; border-color: var(--blue); }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr));
  gap: 12px;
}
.media-card { background: var(--surface); border: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.media-thumb { height: 115px; background: var(--bg-alt); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ───────── Modals, Pagination, Footer, Toasts ───────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .68);
  z-index: 3000; display: grid; place-items: start center;
  padding: clamp(16px, 6vh, 60px) 12px; overflow-y: auto;
}
.sharp-modal {
  width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line-2);
  border-top: 4px solid var(--blue); box-shadow: 0 18px 48px rgba(0,0,0,.5);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px;
}
.search-input-bar { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px 14px 16px; }
.search-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 10px 0 6px; }
.search-hit { display: block; padding: 9px 10px; border: 1px solid transparent; border-bottom-color: var(--line); color: var(--ink); overflow-wrap: break-word; }
.search-hit:hover { background: var(--surface-2); border-color: var(--blue); text-decoration: none; }
.search-hint { padding: 20px 8px; text-align: center; color: var(--muted); font-size: 13px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; }

.learn-footer {
  border-top: 1px solid var(--line); background: var(--bg-alt);
  padding: 20px clamp(14px, 2.5vw, 20px); font-size: 12px; color: var(--muted);
}
.footer-inner {
  max-width: 1600px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

.toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 4500; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast {
  min-width: 240px; max-width: 380px; padding: 11px 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  border-left: 4px solid var(--blue); box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 13px;
  overflow-wrap: break-word;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }

.mobile-only { display: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* ───────── Responsive Breakpoints ───────── */
@media (max-width: 1240px) {
  .docs-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-outline { display: none; }
}

@media (max-width: 1040px) {
  .fb-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-split { grid-template-columns: minmax(0, 1fr); }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1040px) {
  .mega-menu-inner { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .mega-promo { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 18px; }
}

@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 820px) {
  .mobile-only { display: inline-grid; }
  .top-nav { display: none; }

  /* Header: жодного злипання і переносів */
  .topbar-inner { padding: 0 10px; gap: 6px; flex-wrap: nowrap; }
  .topbar-left, .topbar-right { gap: 4px; flex-shrink: 0; }
  .topbar-left { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .brand-lockup { padding-right: 6px; margin-right: 0; }
  .brand-logo { width: 22px; height: 22px; margin-right: 8px; }
  .brand-name { font-size: 16px; }
  .icon-btn { width: 34px; height: 34px; }
  #auth-slot .btn { white-space: nowrap; padding: 0 10px; min-height: 32px; }

  /* Subbar: компактний, посилання гортаються горизонтально */
  .subbar-inner {
    padding: 8px 12px; gap: 8px;
    flex-direction: column; align-items: stretch;
  }
  .subbar-left {
    flex-direction: column; align-items: flex-start; gap: 6px; width: 100%;
  }
  .subbar-links {
    flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 14px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .subbar-links::-webkit-scrollbar { display: none; }
  .subbar-link { white-space: nowrap; flex: none; }
  .subbar-actions { width: 100%; gap: 6px; }

  /* Banner */
  .learn-banner { padding: 8px 12px; font-size: 12px; }
  .banner-inner { align-items: flex-start; }

  /* Docs TOC drawer on mobile */
  .docs-shell { grid-template-columns: minmax(0, 1fr); }
  .mobile-toc-bar { display: flex; }
  .docs-sidebar-head { display: flex; }
  .docs-sidebar {
    display: block; position: fixed; top: 0; left: 0; bottom: 0;
    width: min(310px, 86vw); max-height: 100dvh; z-index: 1350;
    box-shadow: 12px 0 36px rgba(0, 0, 0, .5);
    transform: translateX(-105%);
    transition: transform .28s var(--ease);
  }
  .docs-sidebar.mobile-open { transform: translateX(0); }
  .docs-main { padding: 16px 14px 44px; }
  .article-meta-actions { margin-left: 0; width: 100%; }

  /* Studio tabs: горизонтальний скрол замість купи рядків */
  .studio-tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .studio-tabs::-webkit-scrollbar { display: none; }
  .studio-tab { white-space: nowrap; flex: none; }

  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  /* У хедері лишаємо коротку кнопку "Sign in" або компактний аватар */
  .signin-full { display: none; }
  .signin-short { display: inline; }
  .user-trigger { padding: 0 7px; gap: 5px; height: 34px; }
  .user-name-text, .user-trigger .admin-tag { display: none; }
}

@media (max-width: 600px) {
  .brand-sep, .brand-sub { display: none; }
  .fb-header h1, .thread-post h1 { font-size: 22px !important; }
  .fb-filter-bar { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .fb-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; }
  .fb-vote-box {
    flex-direction: row; gap: 6px; width: fit-content; padding: 4px 10px;
  }
  .hero-actions .btn { flex: 1 1 auto; }
  .toast-host { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .toast { min-width: 0; max-width: 100%; width: 100%; }
}

@media (max-width: 360px) {
  .stats-strip { grid-template-columns: minmax(0, 1fr); }
}

/* ───────── Fix: одиниці виміру для логотипа ───────── */
.brand-sep,
.brand-sub {
  font-size: 18px;
}

/* ───────── Тільки великі монітори (1920px+ на 100% масштабі) ───────── */
/* Ноутбуки (до 1679px) залишаються 100% на твоїх оригінальних стилях */
@media (min-width: 1680px) {
  .learn-topbar {
    height: 56px;
  }
  .mega-menu {
    top: 56px;
    max-height: calc(100vh - 56px);
  }
  .mega-backdrop {
    inset: 56px 0 0 0;
  }
  .learn-subbar {
    min-height: 48px;
  }

  .topbar-inner,
  .subbar-inner,
  .banner-inner,
  .mega-menu-inner,
  .footer-inner {
    max-width: none;
    padding-left: clamp(24px, 2.2vw, 36px);
    padding-right: clamp(24px, 2.2vw, 36px);
  }

  body {
    font-size: 16px;
    line-height: 1.6;
  }
  .brand-lockup {
    font-size: 17px;
  }
  .top-nav-btn,
  .top-nav-link {
    font-size: 14.5px;
    padding: 0 16px;
  }
  .subbar-title {
    font-size: 15px;
  }
  .subbar-link {
    font-size: 13.5px;
  }
  .learn-banner {
    font-size: 13.5px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .docs-shell {
    max-width: none;
    width: 100%;
    grid-template-columns: 320px minmax(0, 1fr) 280px;
  }
  .docs-sidebar,
  .docs-outline {
    top: 56px;
    max-height: calc(100vh - 56px);
  }
  .docs-sidebar {
    padding: 18px 16px;
  }
  .docs-outline {
    padding: 28px 20px;
  }
  .docs-main {
    width: 100%;
    max-width: 980px;
    justify-self: center;
    padding: 32px clamp(28px, 4vw, 56px) 64px;
  }

  .breadcrumbs,
  .article-meta {
    font-size: 13px;
  }
  .article-h1 {
    font-size: 40px;
  }
  .md-body {
    font-size: 16.5px;
    line-height: 1.7;
  }
  .md-body h2 {
    font-size: 26px;
    margin-top: 34px;
  }
  .md-body h3 {
    font-size: 20px;
    margin-top: 26px;
  }
  .md-body code,
  .md-body pre {
    font-size: 14px;
  }

  .toc-section-btn,
  .toc-item a {
    font-size: 14px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .outline-title {
    font-size: 12px;
  }
  .outline-list a {
    font-size: 13.5px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .btn {
    font-size: 14px;
    min-height: 36px;
    padding: 7px 16px;
  }
  .btn-sm {
    font-size: 13px;
    min-height: 32px;
    padding: 5px 12px;
  }
  .uwp-textbox {
    font-size: 14.5px;
    padding: 8px 34px 8px 12px;
  }

  .page-container {
    max-width: min(1480px, 94vw);
  }
  .studio-shell {
    max-width: none;
    padding-left: clamp(24px, 2.2vw, 36px);
    padding-right: clamp(24px, 2.2vw, 36px);
  }
}

/* ───────── 2K / 4K / Ultrawide (2200px+) ───────── */
@media (min-width: 2200px) {
  body {
    font-size: 17px;
  }
  .docs-shell {
    grid-template-columns: 360px minmax(0, 1fr) 310px;
  }
  .docs-main {
    max-width: 1060px;
  }
  .md-body {
    font-size: 17.5px;
  }
  .page-container {
    max-width:
  }
}

/* ───────── Docs Previous / Next Pager ───────── */
.doc-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.doc-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.doc-pager-link:hover {
  background: var(--bg-alt);
  border-color: var(--blue);
  border-top-color: var(--blue);
  text-decoration: none;
}
.doc-pager-link.next {
  text-align: right;
  align-items: flex-end;
}
.doc-pager-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.doc-pager-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
}
.doc-pager-sec {
  font-size: 12px;
  color: var(--muted);
}
.ic.flip-x {
  transform: scaleX(-1);
}

@media (max-width: 640px) {
  .doc-pager {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────── Atrcore Downloads & PCDN Components ───────── */
.dl-release-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  padding: clamp(16px, 2.5vw, 24px);
  margin-bottom: 20px;
}
.dl-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}
.dl-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}
.dl-file-row:hover { border-color: var(--blue); }
.dl-file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.dl-sha-code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--code-bg);
  border: 1px solid var(--line);
  padding: 2px 6px;
  word-break: break-all;
}
.pcdn-telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.uwp-progress {
  width: 100%;
  height: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 10px;
}
.uwp-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  transition: width .18s var(--ease);
}
@media (max-width: 720px) {
  .dl-file-row { grid-template-columns: minmax(0, 1fr); }
  .pcdn-telemetry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}