:root {
  --bg: #070b13;
  --bg-soft: #0a101c;
  --sidebar: #080d17;
  --surface: #0d1422;
  --surface-2: #111a2b;
  --surface-3: #151f32;
  --line: #1f2b40;
  --line-soft: rgba(143, 168, 205, .12);
  --text: #f1f5fb;
  --soft: #c8d1df;
  --muted: #8290a6;
  --cyan: #39dcff;
  --blue: #4376ff;
  --purple: #8f67ff;
  --green: #5ee3ad;
  --danger: #ff7192;
  --shadow: 0 22px 70px rgba(0, 0, 0, .28);
  --sidebar-width: 258px;
  --topbar-height: 70px;
  --radius: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 0%, rgba(111, 70, 255, .10), transparent 30%),
    radial-gradient(circle at 8% 12%, rgba(32, 200, 255, .07), transparent 25%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 72%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(57, 220, 255, .28);
  outline-offset: 2px;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kb-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.kb-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  min-height: 680px;
  padding: 22px 15px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 35% 4%, rgba(57, 220, 255, .08), transparent 23%),
    linear-gradient(180deg, #080e19, #070b13 64%);
}
.sidebar-brand {
  display: grid;
  gap: 5px;
  align-items: center;
  padding: 4px 11px 22px;
}
.sidebar-brand img {
  display: block;
  width: 164px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(57, 220, 255, .15));
}
.sidebar-brand span {
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
  padding-left: 42px;
}
.workspace-card {
  display: grid;
  gap: 2px;
  margin: 0 0 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(24, 37, 58, .88), rgba(13, 20, 34, .9));
}
.workspace-card span {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.workspace-card strong { font-size: .95rem; }
.sidebar-label {
  margin: 14px 10px 7px;
  color: #65738a;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-link {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  color: #96a3b7;
  background: transparent;
  text-align: left;
  font-weight: 750;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(255,255,255,.035);
}
.sidebar-link.is-active {
  color: #f8fbff;
  border-color: rgba(57, 220, 255, .23);
  background: linear-gradient(90deg, rgba(57, 220, 255, .10), rgba(124, 89, 255, .06));
  box-shadow: inset 3px 0 0 var(--cyan);
}
.sidebar-icon {
  width: 24px;
  flex: 0 0 24px;
  color: #6f7d92;
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
}
.sidebar-link.is-active .sidebar-icon { color: var(--cyan); }
.sidebar-nav--categories .sidebar-link { font-size: .88rem; }
.sidebar-count {
  margin-left: auto;
  min-width: 24px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: .7rem;
  text-align: center;
}
.sidebar-footer {
  margin-top: auto;
  padding: 15px 10px 2px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  border-top: 1px solid var(--line-soft);
  color: #9ba8ba;
  font-size: .78rem;
}
.sidebar-footer small {
  grid-column: 2;
  color: #647187;
}
.service-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(94, 227, 173, .5);
}
.sidebar-backdrop { display: none; }

.kb-stage { min-width: 0; }
.kb-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 19, .90);
  backdrop-filter: blur(18px);
}
.topbar-left, .top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.crumb {
  color: var(--muted);
  font-size: .88rem;
}
.top-action, .language-trigger {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  color: var(--soft);
  background: rgba(255,255,255,.025);
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.top-action:hover, .language-trigger:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: #34445f;
  background: rgba(255,255,255,.045);
}
.top-action--primary {
  color: #06101b;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
}
.top-action--primary:hover { color: #06101b; }
.menu-toggle {
  display: none;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.menu-toggle span {
  width: 17px;
  height: 2px;
  display: block;
  margin: 3px auto;
  border-radius: 99px;
  background: var(--soft);
}

.language-switcher { position: relative; }
.language-trigger { white-space: nowrap; }
.language-flag {
  width: 20px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 3px;
  background: #141d2c;
}
.language-flag img { width: 100%; height: 100%; object-fit: cover; }
.language-current { max-width: 105px; overflow: hidden; text-overflow: ellipsis; }
.language-chevron { color: var(--muted); }
.language-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(720px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid #25344c;
  border-radius: 18px;
  background: #0b1220;
  box-shadow: 0 28px 90px rgba(0,0,0,.52);
}
.language-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.language-panel__head div { display: grid; gap: 3px; }
.language-panel__head span, .language-note { color: var(--muted); }
.language-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--soft);
  background: var(--surface);
  cursor: pointer;
}
.language-panel__meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.language-panel__meta-pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: .72rem;
  font-weight: 800;
}
.language-panel__meta-pill.is-primary { color: #b4f4ff; border-color: rgba(57,220,255,.24); }
.language-carousel { display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; gap: 9px; align-items: center; }
.language-carousel__viewport { overflow: hidden; }
.language-carousel__track { display: flex; transition: transform .22s ease; }
.language-carousel__slide { min-width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.language-carousel__arrow {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--soft);
  background: var(--surface);
  cursor: pointer;
}
.language-carousel__arrow:disabled { opacity: .35; cursor: default; }
.language-card {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px;
  color: var(--soft);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.language-card.is-selected { border-color: rgba(57,220,255,.42); background: rgba(57,220,255,.07); }
.language-card__flag { width: 30px; height: 22px; flex: 0 0 auto; overflow: hidden; border-radius: 4px; }
.language-card__flag img { width: 100%; height: 100%; object-fit: cover; }
.language-card__main { display: grid; min-width: 0; }
.language-card__main strong { overflow: hidden; text-overflow: ellipsis; }
.language-card__main small { color: var(--muted); }
.language-carousel__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.language-carousel__dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #31405a; cursor: pointer; }
.language-carousel__dot.is-active { background: var(--cyan); }
.language-note { margin: 12px 0 0; font-size: .78rem; }

.kb-content {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
  padding: 34px 0 70px;
}
.welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
}
.eyebrow, .panel-kicker {
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.welcome h1 {
  margin: 5px 0 5px;
  font-size: clamp(2.15rem, 4vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: -.045em;
}
.welcome p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.search-box {
  width: min(430px, 100%);
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #29374d;
  border-radius: 13px;
  padding: 6px 7px 6px 13px;
  background: #0b111d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.search-icon { color: #738299; font-size: 1.2rem; }
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 650;
}
.search-box input::placeholder { color: #66758b; }
.search-box button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  padding: 0 13px;
  color: #06101b;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  font-weight: 900;
  cursor: pointer;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric-card, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15,23,38,.96), rgba(10,16,28,.96));
  box-shadow: 0 16px 48px rgba(0,0,0,.16);
}
.metric-card {
  min-height: 120px;
  padding: 17px;
  border-radius: 15px;
  display: grid;
  align-content: start;
}
.metric-card > span { color: var(--muted); font-size: .8rem; }
.metric-card strong { margin-top: 4px; font-size: 1.75rem; line-height: 1; }
.metric-card small { margin-top: 12px; color: #6f7d91; font-size: .76rem; }
.metric-card--status small { color: #86d9b7; }
.metric-card--status i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(94,227,173,.45);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}
.panel { border-radius: 17px; padding: 20px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 15px;
}
.panel-head h2 { margin: 3px 0 0; font-size: 1.35rem; letter-spacing: -.025em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .88rem; }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.category-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto 1fr;
  gap: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 14px;
  color: var(--soft);
  background: rgba(255,255,255,.018);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(57,220,255,.30);
  background: rgba(57,220,255,.035);
}
.category-card__icon {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #8deeff;
  background: rgba(57,220,255,.09);
  font-size: .74rem;
  font-weight: 950;
}
.category-card strong { align-self: end; font-size: .95rem; }
.category-card small { color: var(--muted); line-height: 1.35; }
.activity-list { display: grid; }
.activity-row {
  min-height: 69px;
  display: grid;
  grid-template-columns: 9px minmax(0,1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.activity-row:last-child { border-bottom: 0; }
.activity-dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(94,227,173,.36);
}
.activity-row a { display: grid; gap: 2px; min-width: 0; }
.activity-row strong { font-size: .9rem; line-height: 1.3; }
.activity-row small, .activity-row time { color: var(--muted); font-size: .75rem; }
.activity-row time { white-space: nowrap; margin-top: 2px; }
.articles-panel { scroll-margin-top: 90px; }
.panel-head--articles { align-items: flex-end; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.filter-chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255,255,255,.02);
  font-weight: 850;
  cursor: pointer;
}
.filter-chip:hover, .filter-chip.is-active {
  color: var(--text);
  border-color: rgba(57,220,255,.30);
  background: rgba(57,220,255,.06);
}
.article-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.article-card {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(255,255,255,.014);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(57,220,255,.28);
  background: rgba(57,220,255,.025);
}
.article-card__link {
  min-height: 112px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 22px;
  gap: 12px;
  align-items: center;
  padding: 14px;
}
.article-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #8c9aae;
  background: #141d2c;
  font-size: .76rem;
  font-weight: 950;
}
.article-card__content { min-width: 0; display: grid; gap: 4px; }
.article-card__topline { display: flex; align-items: center; gap: 8px; }
.article-card h3 { margin: 0; font-size: .98rem; line-height: 1.28; }
.article-card p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-card__bottom { display: flex; gap: 8px; color: #6f7d91; font-size: .72rem; }
.article-card__arrow { color: #65738a; font-size: 1.1rem; }
.tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #28364c;
  border-radius: 999px;
  color: #9dabc0;
  background: rgba(255,255,255,.018);
  font-size: .65rem;
  font-weight: 850;
}
.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #2a3950;
  border-radius: 13px;
  color: var(--muted);
  text-align: center;
}

.article-reader {
  display: grid;
  gap: 18px;
  padding-top: 4px;
}
.reader-back {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  color: var(--soft);
  background: rgba(255,255,255,.02);
  font-weight: 850;
}
.reader-header { display: grid; gap: 12px; padding: 6px 0 12px; border-bottom: 1px solid var(--line-soft); }
.article-meta { display: flex; gap: 7px; flex-wrap: wrap; }
.reader-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.reader-lead { max-width: 860px; margin: 0; color: var(--muted); font-size: 1.04rem; }
.reader-cover, .reader-image {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--surface-2);
}
.reader-cover img, .reader-image img { width: 100%; display: block; }
.reader-image figcaption { padding: 10px 13px; color: var(--muted); font-size: .78rem; }
.reader-block { max-width: 900px; }
.reader-block h2 { margin: 8px 0 4px; font-size: 1.45rem; }
.reader-block p { margin: 0; color: var(--soft); line-height: 1.75; }
.steps-list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 13px;
  background: rgba(255,255,255,.018);
}
.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(57,220,255,.08);
  font-size: .75rem;
  font-weight: 950;
}
.callout {
  padding: 15px 16px;
  border: 1px solid rgba(57,220,255,.24);
  border-left: 4px solid var(--cyan);
  border-radius: 12px;
  background: rgba(57,220,255,.045);
}
.callout p { margin: 5px 0 0; }
.callout--warning {
  border-color: rgba(255,171,70,.25);
  border-left-color: #ffab46;
  background: rgba(255,171,70,.05);
}
.reader-code {
  margin: 0;
  padding: 15px;
  overflow: auto;
  border: 1px solid #25344a;
  border-radius: 12px;
  color: #b9f4ff;
  background: #050912;
}
.reader-related { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.reader-related h2 { margin: 4px 0 12px; }
.reader-related > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.reader-related a { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(255,255,255,.015); }
.reader-related span { color: var(--muted); font-size: .8rem; }

.nc-legal-footer { margin-left: 0; border-top-color: var(--line) !important; background: rgba(6,10,18,.88) !important; }
.nc-legal-footer__inner { max-width: 1240px !important; }

@media (max-width: 1120px) {
  .top-action--quiet.top-action--account, .top-action--login { display: none; }
  .language-current { display: none; }
  .language-trigger { width: 42px; padding: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .kb-app { grid-template-columns: 1fr; }
  .kb-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(286px, 86vw);
    transform: translateX(-105%);
    transition: transform .24s ease;
    box-shadow: 24px 0 70px rgba(0,0,0,.42);
  }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .kb-sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    border: 0;
    background: rgba(0,0,0,.56);
    backdrop-filter: blur(3px);
  }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .menu-toggle { display: block; }
  .kb-content { width: min(100% - 36px, 1180px); }
  .welcome { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
}

@media (max-width: 700px) {
  .kb-topbar { padding: 9px 16px; }
  .crumb { display: none; }
  .top-action--quiet { display: none; }
  .top-actions { margin-left: auto; }
  .top-action--primary { min-height: 38px; padding: 0 11px; font-size: .82rem; }
  .kb-content { width: min(100% - 28px, 1180px); padding-top: 24px; }
  .welcome h1 { font-size: 2.1rem; }
  .metrics, .category-grid, .article-results, .reader-related > div { grid-template-columns: 1fr; }
  .metric-card { min-height: 104px; }
  .panel { padding: 16px; }
  .panel-head, .panel-head--articles { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .article-card__link { min-height: 104px; grid-template-columns: 36px minmax(0,1fr) 18px; padding: 12px; }
  .article-card p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .language-panel { position: fixed; left: 14px; right: 14px; top: 74px; width: auto; }
  .language-carousel__slide { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  .search-box button { display: none; }
  .top-action--primary { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .activity-row { grid-template-columns: 9px minmax(0,1fr); }
  .activity-row time { grid-column: 2; }
}

/* Patch 3.56h3 · echtes Sprachmenü, ruhige Buttons und echte Artikel-Unterseiten */
.wiki-language-selector {
  --nc-lang-compact-width: 82px;
  --nc-lang-expanded-width: 248px;
  --nc-lang-line: rgba(70, 111, 152, .46);
  --nc-lang-line-hover: rgba(73, 211, 247, .5);
  --nc-lang-line-open: rgba(129, 228, 255, .88);
  height: 40px;
  border-radius: 12px;
  background: rgba(10, 17, 29, .92);
  box-shadow: none;
}
.wiki-language-selector .nc-language-selector__trigger {
  min-height: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}
.wiki-language-selector .nc-language-selector__leading,
.wiki-language-selector .nc-language-selector__arrow-slot { height: 38px; }
.wiki-language-selector .nc-language-selector__menu { top: calc(100% + 10px); }

.top-actions { gap: 8px; }
.top-action {
  min-height: 40px;
  border-radius: 11px;
  padding: 0 15px;
  border-color: rgba(70, 88, 116, .54);
  color: #c9d4e4;
  background: rgba(12, 19, 31, .82);
  box-shadow: none;
  font-size: .84rem;
  letter-spacing: -.01em;
}
.top-action:hover,
.top-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(71, 208, 244, .5);
  color: #f5f8ff;
  background: rgba(22, 34, 51, .96);
}
.top-action--primary {
  position: relative;
  color: #eef9ff;
  border-color: rgba(91, 191, 255, .58);
  background:
    linear-gradient(#0d1727, #0d1727) padding-box,
    linear-gradient(125deg, #36d9ff, #7b7cff 58%, #b65cff) border-box;
  box-shadow: inset 0 0 22px rgba(76, 142, 255, .07);
}
.top-action--primary:hover,
.top-action--primary:focus-visible {
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(#111d30, #111d30) padding-box,
    linear-gradient(125deg, #55e2ff, #8a83ff 58%, #c470ff) border-box;
  box-shadow: 0 0 0 1px rgba(81, 207, 255, .08), inset 0 0 26px rgba(97, 128, 255, .12);
}

.search-box {
  border-color: rgba(63, 85, 116, .68);
  background: rgba(8, 14, 24, .9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.search-box:focus-within { border-color: rgba(67, 211, 246, .64); box-shadow: 0 0 0 3px rgba(57, 220, 255, .07); }
.search-box button {
  min-height: 40px;
  border: 1px solid rgba(83, 189, 255, .54);
  border-radius: 10px;
  color: #effaff;
  background: linear-gradient(135deg, rgba(35, 151, 214, .28), rgba(111, 91, 225, .3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-weight: 900;
}
.search-box button:hover,
.search-box button:focus-visible { border-color: rgba(100, 226, 255, .8); background: linear-gradient(135deg, rgba(42, 175, 235, .38), rgba(131, 105, 244, .42)); }

.filter-chip {
  min-height: 36px;
  border-radius: 10px;
  border-color: rgba(65, 84, 111, .68);
  color: #9eacc0;
  background: rgba(10, 17, 28, .72);
  font-weight: 850;
}
.filter-chip:hover,
.filter-chip:focus-visible { color: #ecf5ff; border-color: rgba(73, 203, 239, .46); }
.filter-chip.is-active {
  color: #effaff;
  border-color: rgba(65, 218, 255, .6);
  background: rgba(41, 166, 217, .12);
  box-shadow: inset 0 0 18px rgba(57, 220, 255, .055);
}

.category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.category-card { position: relative; min-height: 124px; padding-right: 52px; }
.category-card__count {
  position: absolute;
  right: 14px;
  top: 14px;
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(67, 99, 133, .55);
  border-radius: 999px;
  color: #91a2b8;
  background: rgba(7, 12, 21, .58);
  font-size: .68rem;
  font-weight: 900;
}
.tag--featured { color: #e4cbff; border-color: rgba(178, 103, 255, .34); }

.is-article-route .welcome,
.is-article-route .metrics,
.is-article-route .dashboard-grid,
.is-article-route .panel-head--articles { display: none; }
.is-article-route .kb-content { width: min(1140px, calc(100% - 56px)); padding-top: 34px; }
.is-article-route .articles-panel { border: 0; background: transparent; box-shadow: none; padding: 0; }
.is-article-route .article-reader { padding: 0; }

.reader-back {
  min-height: 40px;
  border-color: rgba(67, 88, 119, .64);
  border-radius: 11px;
  color: #b9c7d9;
  background: rgba(9, 16, 27, .76);
}
.reader-back:hover,
.reader-back:focus-visible { color: #f2f8ff; border-color: rgba(69, 205, 241, .5); background: rgba(16, 27, 43, .92); }
.reader-header {
  gap: 15px;
  padding: 20px 0 26px;
  border-bottom: 0;
}
.reader-header h1 { max-width: 980px; font-size: clamp(2.4rem, 6vw, 5.3rem); line-height: .98; }
.reader-lead { max-width: 820px; font-size: clamp(1rem, 1.8vw, 1.22rem); line-height: 1.65; }
.reader-cover { border-radius: 20px; border-color: rgba(69, 92, 124, .68); }
.reader-cover button,
.reader-image__button {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: zoom-in;
}
.reader-cover button > span,
.reader-image__button > span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(158, 214, 255, .38);
  border-radius: 9px;
  background: rgba(4, 10, 18, .78);
  backdrop-filter: blur(10px);
  font-size: .72rem;
  font-weight: 850;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}
.reader-cover button:hover > span,
.reader-cover button:focus-visible > span,
.reader-image__button:hover > span,
.reader-image__button:focus-visible > span { opacity: 1; transform: translateY(0); }
.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 44px;
  align-items: start;
  margin-top: 8px;
}
.reader-content { min-width: 0; display: grid; gap: 18px; }
.reader-block { max-width: 820px; }
.reader-block--heading { padding-top: 12px; }
.reader-block h2 { scroll-margin-top: 100px; margin: 0; font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -.035em; }
.reader-block p { font-size: 1rem; }
.reader-image { max-width: 900px; border-radius: 17px; border-color: rgba(67, 90, 120, .66); }
.steps-list li { min-height: 62px; align-items: center; border-color: rgba(52, 72, 99, .68); background: rgba(10, 17, 28, .6); }
.callout { max-width: 860px; }
.reader-code { max-width: 860px; white-space: pre-wrap; line-height: 1.7; }
.reader-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(55, 76, 104, .7);
  border-radius: 15px;
  background: rgba(8, 14, 24, .76);
}
.reader-toc > strong { color: #dbe6f5; font-size: .82rem; }
.reader-toc nav { display: grid; gap: 4px; }
.reader-toc a {
  padding: 8px 9px;
  border-left: 2px solid #26374d;
  color: #8fa0b6;
  font-size: .78rem;
  line-height: 1.35;
}
.reader-toc a:hover,
.reader-toc a:focus-visible { color: #e8f8ff; border-left-color: #45d9fa; background: rgba(57, 220, 255, .045); }
.reader-related { max-width: 900px; }
.reader-related a { position: relative; padding-right: 40px; }
.reader-related a i { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #60748e; font-style: normal; }
.article-missing { display: grid; gap: 12px; justify-items: start; padding: 40px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.article-missing strong { font-size: 1.5rem; }
.article-missing p { margin: 0; color: var(--muted); }

.wiki-image-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 16px;
  border: 1px solid rgba(79, 104, 138, .8);
  border-radius: 20px;
  color: #eef6ff;
  background: #070d17;
  box-shadow: 0 34px 120px rgba(0,0,0,.7);
}
.wiki-image-dialog::backdrop { background: rgba(0, 4, 10, .84); backdrop-filter: blur(6px); }
.wiki-image-dialog > button {
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(130, 178, 218, .5);
  border-radius: 11px;
  color: #fff;
  background: rgba(5, 10, 18, .82);
  cursor: pointer;
  font-size: 1.35rem;
}
.wiki-image-dialog img { width: 100%; max-height: calc(100vh - 120px); display: block; object-fit: contain; border-radius: 12px; }
.wiki-image-dialog p { margin: 10px 4px 0; color: #91a2b7; }

@media (max-width: 1120px) {
  .wiki-language-selector { --nc-lang-expanded-width: 230px; }
  .reader-layout { grid-template-columns: 1fr; }
  .reader-toc { position: static; order: -1; }
  .reader-toc nav { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .category-grid { grid-template-columns: 1fr 1fr; }
  .is-article-route .kb-content { width: min(100% - 36px, 1140px); }
}
@media (max-width: 700px) {
  .wiki-language-selector { --nc-lang-compact-width: 78px; --nc-lang-expanded-width: min(248px, calc(100vw - 32px)); }
  .top-action--primary { padding: 0 12px; }
  .category-grid { grid-template-columns: 1fr; }
  .reader-header h1 { font-size: clamp(2.2rem, 12vw, 3.6rem); }
  .reader-layout { gap: 24px; }
  .reader-toc nav { grid-template-columns: 1fr; }
  .is-article-route .kb-content { width: min(100% - 28px, 1140px); }
}
@media (max-width: 520px) {
  .top-action--primary { display: none; }
  .wiki-language-selector { margin-left: auto; }
  .reader-cover button > span,
  .reader-image__button > span { display: none; }
}


/* Patch 3.56h4: echte Ansichten statt wirkungsloser Sprungmarken */
.dashboard-grid--single { grid-template-columns: minmax(0, 1fr); }
.dashboard-grid--single > .panel { width: 100%; }
body.is-article-route #artikel { display: block; }
.article-card__link,
.activity-row a,
.reader-related a { cursor: pointer; }
.reader-image,
.reader-cover { overflow: hidden; }
.reader-image img,
.reader-cover img { width: 100%; height: auto; display: block; }


/* Patch 3.56k1 · Design-Freeze: Off-Canvas-Navigation und Sprachmenü ohne Seitenüberlauf */
html, body {
  max-width: 100%;
  overflow-x: clip;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
@media (max-width: 900px) {
  .kb-app, .kb-main, .kb-content { min-width: 0; }
}
