:root {
  --bg: oklch(0.975 0.004 250);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.958 0.006 250);
  --surface-3: oklch(0.925 0.008 250);
  --surface-raised: oklch(0.992 0.002 250);
  --ink: oklch(0.18 0.012 250);
  --muted: oklch(0.38 0.018 250);
  --soft: oklch(0.58 0.018 250);
  --line: oklch(0.885 0.01 250);
  --accent: oklch(0.72 0.16 78);
  --accent-ink: oklch(0.31 0.08 78);
  --green: oklch(0.64 0.15 155);
  --red: oklch(0.58 0.18 28);
  --code: oklch(0.16 0.014 260);
  --sidebar: 328px;
  --topbar: 70px;
  --radius: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow-soft: 0 18px 50px oklch(0.18 0.012 260 / 0.075);
  --kb-empty-result: "没有找到匹配的文章";
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

code,
pre {
  font-family: var(--mono);
}

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

.kb-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, oklch(1 0 0) 0%, oklch(0.962 0.005 250) 100%);
  overflow-y: auto;
  z-index: 20;
}

.kb-brand {
  display: grid;
  gap: 10px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--line);
}

.kb-brand__logo {
  width: 156px;
  height: auto;
}

.kb-brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #111;
  font-weight: 900;
}

.kb-brand strong,
.kb-brand small {
  display: inline-flex;
  align-items: center;
}

.kb-brand strong {
  margin-right: 8px;
  font-size: 13px;
  line-height: 1.2;
}

.kb-brand small {
  color: var(--muted);
  font-size: 12px;
}

.kb-search {
  display: grid;
  gap: 8px;
}

.kb-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kb-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.kb-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.88 0.08 75 / 0.35);
}

.search-result-highlight,
.search-term-highlight {
  padding: 0 3px;
  border-radius: 5px;
  background: #fde7b0;
  color: inherit;
  font-weight: 900;
}

.search-hit-highlight {
  border-radius: 8px;
  background: rgb(253 231 176 / 0.24);
  box-shadow: 0 0 0 4px rgb(253 231 176 / 0.24);
}

.kb-nav {
  display: grid;
  gap: 2px;
}

.kb-nav-group {
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.kb-nav-group:first-child {
  border-top: 0;
}

.kb-nav-group[open] {
  border-color: var(--line);
  background: transparent;
}

.kb-nav-group summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 8px 11px 10px;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: background 160ms ease, color 160ms ease;
}

.kb-nav-group summary::-webkit-details-marker {
  display: none;
}

.kb-nav-group summary::after {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
  content: "";
  opacity: 0.72;
}

.kb-nav-group[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.kb-nav-group summary:hover {
  background: var(--surface);
}

.kb-nav-group summary span,
.kb-nav-group summary strong,
.kb-nav-group summary small {
  display: block;
}

.kb-nav-group summary strong {
  font-size: 14px;
  font-weight: 900;
}

.kb-nav-group summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.kb-nav-group summary em {
  min-width: 26px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.kb-nav-list {
  display: grid;
  gap: 2px;
  margin-left: 14px;
  padding: 2px 0 13px 12px;
  border-left: 1px solid var(--line);
}

.kb-nav button {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.28;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.kb-nav button:hover {
  background: var(--surface);
  color: var(--ink);
}

.kb-nav button.is-active {
  border-color: oklch(0.83 0.08 78);
  background: oklch(0.965 0.035 82);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.65) inset;
}

.kb-nav button.is-hidden {
  display: none;
}

.kb-sidebar__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.kb-sidebar__footer a {
  color: var(--accent-ink);
  font-weight: 800;
}

.kb-content {
  min-width: 0;
}

.kb-topbar {
  position: sticky;
  top: 0;
  min-height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: oklch(0.97 0.005 250 / 0.9);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.kb-menu {
  display: none;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
}

.kb-menu span {
  width: 14px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.kb-menu b {
  margin-left: 4px;
  font-size: 13px;
}

.kb-sidebar-close,
.kb-sidebar-backdrop {
  display: none;
}

.kb-path {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}

.kb-path span + span::before {
  content: "/";
  margin-right: 9px;
  color: var(--soft);
}

.kb-path span:last-child {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.kb-actions a,
.kb-copy,
.kb-lang-toggle {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.kb-actions a:hover,
.kb-copy:hover,
.kb-lang-toggle:hover {
  border-color: var(--ink);
}

.kb-lang-toggle--footer {
  color: var(--accent-ink);
}

.kb-hero {
  display: grid;
  grid-template-columns: minmax(0, 980px);
  align-items: start;
  padding: clamp(34px, 5vw, 72px) clamp(18px, 3vw, 42px) 30px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 8% 14%, oklch(0.94 0.045 82 / 0.68), transparent 30%),
    linear-gradient(135deg, oklch(1 0 0) 0%, oklch(0.958 0.01 245) 100%);
}

.kb-hero,
.kb-layout,
.kb-article,
.article-section,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}

.kb-kicker {
  margin: 0 0 12px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.kb-hero h1,
.article-head h1 {
  max-width: 860px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kb-hero p,
.article-head p {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.kb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.kb-primary,
.kb-secondary {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 10px;
  font-weight: 900;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, background 180ms ease;
}

.kb-primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.kb-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.kb-primary:hover,
.kb-secondary:hover {
  transform: translateY(-1px);
}

.kb-primary:active,
.kb-secondary:active {
  transform: translateY(0);
}

.download-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 78px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #2563eb;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 6px 8px rgb(37 99 235 / 0.16);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms ease, border-color 180ms ease;
}

.download-cta:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 8px rgb(37 99 235 / 0.2);
}

.download-cta:active {
  transform: translateY(0);
}

.download-cta__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.download-cta__text strong,
.callout .download-cta__text strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
}

.download-cta__text span {
  color: oklch(0.92 0.035 260);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.download-cta__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.16);
  font-size: 18px;
  font-weight: 900;
}

.geoip-download-panel {
  padding: 22px;
}

.download-options {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 12px;
  margin: 16px 0;
}

.download-cta--secondary {
  border-color: #b9caff;
  background: #fff;
  color: #12347a;
  box-shadow: none;
}

.download-cta--secondary:hover {
  border-color: #2563eb;
  background: #f1f5ff;
  box-shadow: none;
}

.download-cta--secondary .download-cta__text strong,
.callout .download-cta--secondary .download-cta__text strong {
  color: #12347a;
}

.download-cta--secondary .download-cta__text span {
  color: #4f5b70;
}

.download-cta--secondary .download-cta__icon {
  background: #e5edff;
  color: #1f5eff;
}

.download-path-note {
  margin: 14px 0 8px;
}

@media (max-width: 760px) {
  .geoip-download-panel {
    padding: 18px;
  }

  .download-options {
    grid-template-columns: 1fr;
  }
}

.kb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 28px;
  align-items: start;
  padding: 28px clamp(18px, 3vw, 42px) 64px;
}

.kb-articles {
  min-width: 0;
}

.kb-article {
  --article-padding: clamp(26px, 4vw, 50px);
  display: none;
  max-width: 1040px;
  padding: var(--article-padding);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: 0 12px 34px oklch(0.18 0.012 260 / 0.045);
}

.kb-article.is-active {
  display: block;
}

.article-head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.article-head h1 {
  font-size: clamp(34px, 4vw, 54px);
}

.article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.article-tools span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.article-tools span:first-child {
  background: var(--ink);
  color: var(--surface);
}

.article-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.article-template div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    linear-gradient(180deg, oklch(1 0 0) 0%, var(--surface-2) 100%);
}

.article-template span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.article-template strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.article-section {
  padding-top: 38px;
}

.article-section h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.article-section h3 {
  margin: 26px 0 10px;
  font-size: 20px;
}

.article-section p,
.article-section li {
  color: var(--muted);
  line-height: 1.75;
  overflow-wrap: anywhere;
  font-size: 15.5px;
}

.article-section p {
  max-width: 72ch;
}

.article-section code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.92em;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 16px 0;
  padding: 18px;
  border-radius: 10px;
  background: var(--code);
  color: #fff;
  line-height: 1.65;
}

.code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid oklch(1 0 0 / 0.16);
  border-radius: 8px;
  background: oklch(1 0 0 / 0.1);
  color: oklch(1 0 0);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
  transition: background 160ms ease, transform 160ms ease;
}

.code-copy:hover {
  background: oklch(1 0 0 / 0.18);
  transform: translateY(-1px);
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.article-section pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
  margin: 20px 0 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

th {
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

td {
  color: var(--muted);
}

.required-cell,
.required-field-name {
  color: #c81e1e;
  font-weight: 900;
}

.required-cell {
  white-space: nowrap;
}

.required-cell::before {
  content: "*";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 13px;
  line-height: 1;
}

.required-field-name::after {
  content: " *";
  color: #dc2626;
  font-weight: 900;
}

.field-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.field-badge.is-recommended {
  background: #ecfdf5;
  color: #047857;
}

.field-badge.is-optional {
  background: #f1f5f9;
  color: #64748b;
}

.field-badge.is-auto {
  background: #eff6ff;
  color: #2563eb;
}

tr:last-child td {
  border-bottom: 0;
}

.doc-image {
  width: calc(100% + (var(--article-padding, 0px) * 2));
  overflow: hidden;
  margin: 18px 0 0;
  margin-left: calc(var(--article-padding, 0px) * -1);
  margin-right: calc(var(--article-padding, 0px) * -1);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.doc-image.is-zoomable {
  cursor: zoom-in;
}

.doc-image.is-zoomable img {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.doc-image.is-zoomable:hover img {
  transform: scale(1.012);
  filter: saturate(1.03) contrast(1.01);
}

.doc-image img {
  width: 100%;
  max-height: min(760px, 72vh);
  object-fit: contain;
  object-position: top left;
}

.doc-image figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: oklch(0.12 0.01 260 / 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 60;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox figure {
  width: min(1880px, 96vw);
  max-height: 90vh;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid oklch(1 0 0 / 0.14);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 80px oklch(0 0 0 / 0.28);
  transform: translateY(12px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.image-lightbox.is-open figure {
  transform: translateY(0) scale(1);
}

.image-lightbox img {
  width: 100%;
  max-height: calc(90vh - 86px);
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-2);
}

.image-lightbox figcaption {
  color: var(--muted);
  font-size: 14px;
}

.image-lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid oklch(1 0 0 / 0.2);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 14px 42px oklch(0 0 0 / 0.18);
}

.shot-frame {
  position: relative;
  overflow: hidden;
}

.annotated-shot .shot-frame {
  isolation: isolate;
}

.annotated-shot img {
  max-height: min(820px, 78vh);
  object-fit: contain;
  background: var(--surface);
}

.shot-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid oklch(1 0 0 / 0.9);
  border-radius: 999px;
  background: var(--accent);
  color: #101010;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  box-shadow:
    0 12px 28px oklch(0.18 0.012 260 / 0.22),
    0 0 0 7px oklch(0.72 0.16 78 / 0.18);
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pin-create-steps { left: 8%; top: 28%; }
.pin-create-basics { left: 45%; top: 47%; }
.pin-create-required { left: 74%; top: 42%; }
.pin-create-save { left: 94%; top: 9%; }

.pin-pricing-currency { left: 16%; top: 24%; }
.pin-pricing-revenue { left: 41%; top: 35%; }
.pin-pricing-payout { left: 62%; top: 35%; }
.pin-pricing-override { left: 80%; top: 62%; }

.pin-list-status { left: 16%; top: 28%; }
.pin-list-advertiser { left: 37%; top: 28%; }
.pin-list-payout { left: 72%; top: 29%; }
.pin-list-health { left: 88%; top: 28%; }

.pin-trouble-symptom { left: 16%; top: 24%; }
.pin-trouble-click { left: 42%; top: 34%; }
.pin-trouble-postback { left: 62%; top: 58%; }
.pin-trouble-finance { left: 82%; top: 72%; }

.step-list,
.module-grid,
.metric-cards,
.guide-grid {
  display: grid;
  gap: 16px;
  margin: 18px 0 24px;
}

.step-list {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.step-list.compact,
.metric-cards {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.module-grid,
.guide-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.step-list div,
.module-grid div,
.metric-cards div,
.guide-grid div,
.callout {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.step-list div,
.module-grid div,
.metric-cards div,
.guide-grid div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.callout {
  margin: 20px 0 26px;
}

.table-wrap + .callout,
pre + .callout,
.callout + .table-wrap,
.callout + pre {
  margin-top: 24px;
}

.step-list span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  font-weight: 900;
}

.step-list strong,
.module-grid strong,
.metric-cards strong,
.guide-grid strong,
.callout strong {
  display: block;
  color: var(--ink);
}

.step-list p,
.module-grid p,
.metric-cards p,
.guide-grid p,
.callout p {
  max-width: 78ch;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.7;
}

.guide-grid div {
  background: var(--surface);
}

.metric-cards div {
  background:
    linear-gradient(180deg, oklch(1 0 0) 0%, var(--surface-2) 100%);
}

.metric-cards span {
  display: block;
  margin-top: 10px;
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 900;
}

.step-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.symptom-table table {
  min-width: 1120px;
}

.check-list,
.number-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.check-list {
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.number-list {
  padding-left: 22px;
}

.flowline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flowline span {
  position: relative;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
}

.flow-demo {
  overflow: hidden;
  margin: 20px 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, oklch(1 0 0) 0%, oklch(0.972 0.007 85) 100%);
  box-shadow: 0 16px 46px oklch(0.18 0.012 255 / 0.06);
}

.flow-demo__track {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.flow-demo__track span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid oklch(0.86 0.04 82);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 26px oklch(0.18 0.012 255 / 0.055);
}

.flow-demo__track i {
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.flow-demo__track span:nth-of-type(2n) {
  animation: flowPulse 3.8s ease-in-out infinite;
}

.flow-demo__track span:nth-of-type(2n + 1) {
  animation: flowPulse 3.8s ease-in-out 0.55s infinite;
}

.flow-demo p {
  max-width: 90ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}

@keyframes flowPulse {
  0%,
  72%,
  100% {
    border-color: oklch(0.86 0.04 82);
    box-shadow: 0 10px 26px oklch(0.18 0.012 255 / 0.055);
    transform: translateY(0);
  }

  18% {
    border-color: var(--accent);
    box-shadow: 0 16px 42px oklch(0.72 0.16 78 / 0.2);
    transform: translateY(-2px);
  }
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.collection-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, oklch(1 0 0) 0%, oklch(0.968 0.006 250) 100%);
  box-shadow: 0 14px 38px oklch(0.18 0.012 260 / 0.045);
}

.collection-card header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.collection-card header span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid oklch(0.84 0.07 78);
  border-radius: 10px;
  background: oklch(0.965 0.04 82);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.collection-card strong {
  color: var(--ink);
  font-size: 17px;
}

.collection-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.collection-links {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.collection-links button,
.task-links button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.28;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.collection-links button:hover,
.task-links button:hover {
  border-color: var(--accent);
  background: oklch(0.965 0.035 82);
  transform: translateY(-1px);
}

.collection-links button:active,
.task-links button:active {
  transform: translateY(0);
}

.collection-article .article-head {
  position: relative;
  overflow: hidden;
  margin: calc(clamp(26px, 4vw, 50px) * -1) calc(clamp(26px, 4vw, 50px) * -1) 0;
  padding: clamp(30px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  background:
    radial-gradient(circle at 12% 18%, oklch(0.92 0.08 82 / 0.42), transparent 30%),
    linear-gradient(135deg, oklch(1 0 0) 0%, oklch(0.96 0.007 250) 58%, oklch(0.98 0.026 82) 100%);
}

.collection-article .article-head::after {
  position: absolute;
  right: clamp(22px, 5vw, 64px);
  bottom: -36px;
  width: 180px;
  height: 180px;
  border: 1px solid oklch(0.84 0.07 78 / 0.45);
  border-radius: 40px;
  background:
    linear-gradient(135deg, oklch(1 0 0 / 0.7), oklch(0.89 0.045 82 / 0.35));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.65);
  transform: rotate(12deg);
  content: "";
}

.collection-article .article-head > * {
  position: relative;
  z-index: 1;
}

.collection-article .article-head p {
  max-width: 72ch;
}

.collection-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.hub-panel,
.hub-article-list button,
.hub-sequence button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 24px oklch(0.18 0.012 260 / 0.035);
}

.hub-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.hub-panel strong {
  color: var(--ink);
  font-size: 17px;
}

.hub-panel p {
  margin: 0;
  font-size: 14px;
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hub-panel button,
.hub-actions button,
.hub-article-list button,
.hub-sequence button,
.article-relations button {
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.hub-panel button,
.hub-actions button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.hub-panel button:hover,
.hub-actions button:hover,
.hub-article-list button:hover,
.hub-sequence button:hover,
.article-relations button:hover {
  border-color: var(--accent);
  background: oklch(0.967 0.03 82);
  transform: translateY(-1px);
}

.hub-article-list {
  display: grid;
  gap: 10px;
}

.hub-article-list button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 15px 16px;
  color: inherit;
  text-align: left;
}

.hub-article-list strong {
  color: var(--ink);
  font-size: 15px;
}

.hub-article-list span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hub-sequence {
  grid-template-columns: 1fr;
  counter-reset: hub-sequence;
}

.hub-sequence button {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px;
  color: inherit;
  text-align: left;
}

.hub-sequence button span {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 950;
}

.hub-sequence button strong {
  color: var(--ink);
}

.hub-sequence button small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.task-map {
  display: grid;
  gap: 10px;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 10px 18px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.task-row strong {
  color: var(--ink);
  font-size: 15px;
}

.task-row p {
  margin: 0;
  max-width: 72ch;
  font-size: 14px;
}

.task-links {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.screenshot-grid .doc-image {
  margin: 0;
}

.screenshot-grid .doc-image img {
  min-height: 190px;
}

.reader-path {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reader-path;
}

.reader-path li {
  position: relative;
  min-height: 68px;
  display: grid;
  gap: 4px;
  padding: 14px 16px 14px 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  counter-increment: reader-path;
}

.reader-path li::before {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 900;
  content: counter(reader-path);
}

.reader-path strong {
  color: var(--ink);
}

.reader-path span {
  color: var(--muted);
  line-height: 1.6;
}

.article-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 44px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, oklch(0.98 0.007 250) 0%, oklch(0.955 0.018 82) 100%);
}

.article-footer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.article-footer p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.article-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.article-footer__actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease;
}

.article-footer__actions button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.article-relations {
  display: grid;
  gap: 16px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.article-relations__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.article-relations__nav button,
.article-relations__nav > span {
  min-height: 82px;
}

.article-relations__nav button {
  display: grid;
  gap: 6px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-align: left;
}

.article-relations__nav button:last-child {
  text-align: right;
}

.article-relations__nav button span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
}

.article-relations__nav button strong {
  color: var(--ink);
  line-height: 1.35;
}

.article-relations__related {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, oklch(1 0 0) 0%, var(--surface-2) 100%);
}

.article-relations__related > strong {
  color: var(--ink);
}

.article-relations__related div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-relations__related button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.article-toc {
  position: sticky;
  top: calc(var(--topbar) + 20px);
}

.article-toc__inner {
  max-height: calc(100vh - var(--topbar) - 44px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.article-toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.article-toc nav {
  display: grid;
  gap: 5px;
}

.article-toc a {
  position: relative;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.article-toc a:hover,
.article-toc a.is-active {
  background: var(--surface-2);
  color: var(--ink);
}

.article-toc a.is-active {
  padding-left: 14px;
  font-weight: 900;
  transform: translateX(2px);
}

.article-toc a.is-active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.faq-list h2 {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.faq-list h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.kb-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 40;
}

.kb-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-search-empty .kb-nav::after {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  content: var(--kb-empty-result);
}

@media (max-width: 1180px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .kb-shell {
    grid-template-columns: 1fr;
  }

  .kb-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(88vw, var(--sidebar));
    max-width: 360px;
    transform: translateX(-102%);
    transition: transform 220ms ease;
    box-shadow: 16px 0 48px oklch(0.18 0.012 260 / 0.18);
    z-index: 60;
  }

  .kb-brand {
    padding-right: 58px;
  }

  body.sidebar-open .kb-sidebar {
    transform: translateX(0);
  }

  .kb-sidebar-close {
    position: absolute;
    top: 18px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid oklch(0.86 0.01 250);
    border-radius: 999px;
    background: oklch(1 0 0 / 0.92);
    color: var(--ink);
    box-shadow: 0 12px 28px oklch(0.18 0.012 250 / 0.14);
    z-index: 2;
  }

  .kb-sidebar-close span {
    font-size: 26px;
    line-height: 1;
    transform: translateY(-1px);
  }

  .kb-sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    background: oklch(0.18 0.012 250 / 0.28);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 50;
  }

  body.sidebar-open .kb-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .kb-menu {
    display: inline-flex;
  }

  .kb-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    display: none;
  }
}

@media (max-width: 760px) {
  .kb-topbar {
    gap: 10px;
    padding-inline: 14px;
  }

  .kb-path span:first-child,
  .kb-actions a,
  .kb-copy {
    display: none;
  }

  .kb-lang-toggle {
    min-height: 36px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .kb-path span + span::before {
    content: "";
    margin: 0;
  }

  .kb-menu span {
    display: none;
  }

  .kb-menu::before {
    width: 14px;
    height: 11px;
    display: inline-block;
    background:
      linear-gradient(currentColor, currentColor) 0 0 / 14px 2px no-repeat,
      linear-gradient(currentColor, currentColor) 0 50% / 14px 2px no-repeat,
      linear-gradient(currentColor, currentColor) 0 100% / 14px 2px no-repeat;
    content: "";
  }

  .kb-hero {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .kb-hero h1,
  .article-head h1 {
    font-size: 28px;
    letter-spacing: -0.018em;
  }

  .kb-hero p,
  .article-head p {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .article-section p,
  .article-section li {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .kb-layout {
    padding-inline: 14px;
  }

  .article-template {
    grid-template-columns: 1fr;
  }

  .article-template div {
    min-height: auto;
  }

  .collection-article .article-head {
    margin: -20px -20px 0;
    padding: 24px 20px;
  }

  .collection-article .article-head::after {
    display: none;
  }

  .collection-hub,
  .hub-sequence {
    grid-template-columns: 1fr;
  }

  .hub-panel,
  .hub-article-list button,
  .hub-sequence button {
    box-shadow: none;
  }

  .hub-actions,
  .article-relations__related div {
    flex-direction: column;
  }

  .hub-panel button,
  .hub-actions button,
  .article-relations__related button {
    width: 100%;
  }

  .article-relations__nav {
    grid-template-columns: 1fr;
  }

  .article-relations__nav button,
  .article-relations__nav button:last-child {
    text-align: left;
  }

  .collection-grid {
    grid-template-columns: 1fr;
  }

  .collection-card {
    min-height: auto;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .task-links {
    grid-column: 1;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .kb-hero__actions,
  .article-footer,
  .article-footer__actions {
    align-items: stretch;
  }

  .kb-hero__actions,
  .article-footer__actions {
    flex-direction: column;
  }

  .kb-primary,
  .kb-secondary,
  .article-footer__actions button {
    width: 100%;
  }

  .article-footer {
    grid-template-columns: 1fr;
  }

  .kb-article {
    padding: 20px;
    border-radius: 12px;
  }

  table {
    min-width: 560px;
  }
}

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

    .flow-demo__track span {
      animation: none !important;
    }
  }

/* Documentation governance and delivery workflow additions. */
.article-scope {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: 16px;
  padding: 9px 12px;
  border: 1px solid oklch(0.86 0.018 88);
  border-radius: 8px;
  background: oklch(0.985 0.008 88 / 0.86);
  color: var(--muted);
}

.article-scope span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: oklch(0.92 0.055 82);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
}

.article-scope p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.article-scope--internal {
  border-color: oklch(0.78 0.12 45 / 0.45);
  background: oklch(0.98 0.026 62 / 0.86);
}

.article-scope--internal span {
  background: oklch(0.88 0.12 48);
  color: oklch(0.27 0.07 48);
}

.article-scope--admin span {
  background: oklch(0.9 0.055 235);
  color: oklch(0.28 0.08 240);
}

.article-scope--developer span {
  background: oklch(0.91 0.06 160);
  color: oklch(0.25 0.07 165);
}

.scope-filter-panel {
  display: grid;
  gap: 10px;
  margin: 0 18px 18px;
  padding: 12px;
  border: 1px solid oklch(0.84 0.035 82);
  border-radius: 12px;
  background: linear-gradient(135deg, oklch(0.99 0.014 88), oklch(1 0 0 / 0.92));
}

.scope-filter-panel > span {
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
}

.scope-filter-buttons,
.scope-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-filter-buttons button,
.scope-guide button {
  min-height: 32px;
  border: 1px solid oklch(0.84 0.025 82);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
  cursor: pointer;
}

.scope-filter-buttons button:hover,
.scope-guide button:hover {
  border-color: var(--accent);
  background: oklch(0.97 0.035 82);
  color: var(--accent-ink);
}

.scope-filter-buttons button.is-active,
.scope-guide button.is-active {
  border-color: oklch(0.17 0.018 250);
  background: oklch(0.14 0.014 250);
  color: #fff;
}

.scope-guide {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid oklch(0.86 0.018 88);
  border-radius: 12px;
  background: oklch(0.985 0.012 88 / 0.76);
}

.role-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.role-entry-card,
.coverage-metric,
.api-endpoint-card,
.wizard-flow div,
.resource-card-grid article,
.publish-mode-card,
.translation-overview div,
.article-next-steps {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 88% 12%, oklch(0.9 0.07 78 / 0.24), transparent 34%),
    linear-gradient(180deg, oklch(1 0 0), oklch(0.978 0.009 88));
  box-shadow: 0 14px 40px oklch(0.18 0.012 250 / 0.045);
}

.role-entry-card {
  min-height: 218px;
}

.role-entry-card--external {
  background:
    radial-gradient(circle at 88% 12%, oklch(0.84 0.08 158 / 0.22), transparent 34%),
    linear-gradient(180deg, oklch(1 0 0), oklch(0.978 0.012 150));
}

.role-entry-card > span,
.coverage-metric > span,
.api-endpoint-card > span,
.wizard-flow span,
.resource-card-grid article > span,
.publish-mode-card span,
.article-next-steps span {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: oklch(0.93 0.052 82);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
}

.role-entry-card strong,
.coverage-metric strong,
.api-endpoint-card strong,
.wizard-flow strong,
.resource-card-grid strong,
.publish-mode-card strong,
.translation-overview strong,
.article-next-steps strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.28;
}

.role-entry-card p,
.coverage-metric p,
.api-endpoint-card p,
.wizard-flow p,
.resource-card-grid p,
.publish-mode-card p,
.translation-overview p,
.article-next-steps p {
  margin: 0;
  color: var(--muted);
}

.role-entry-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.role-entry-card button {
  min-height: 34px;
  border: 1px solid oklch(0.84 0.025 82);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 850;
  padding: 7px 10px;
  cursor: pointer;
}

.role-entry-card button:hover {
  border-color: var(--accent);
  background: oklch(0.96 0.04 82);
}

.coverage-dashboard,
.wizard-flow,
.resource-card-grid,
.translation-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.translation-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.publish-mode-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 16px;
}

.publish-mode-card > div:last-child,
.article-next-steps__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publish-mode-card button,
.article-next-steps__links button {
  min-height: 36px;
  border: 1px solid oklch(0.84 0.025 82);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 850;
  padding: 8px 11px;
  cursor: pointer;
}

.publish-mode-card button:hover,
.article-next-steps__links button:hover {
  border-color: var(--accent);
  background: oklch(0.96 0.04 82);
}

.coverage-metric {
  min-height: 178px;
}

.coverage-metric--good > span {
  background: oklch(0.93 0.07 154);
  color: oklch(0.28 0.08 154);
}

.coverage-metric--warn > span {
  background: oklch(0.93 0.085 84);
  color: oklch(0.35 0.085 72);
}

.coverage-metric--hot > span {
  background: oklch(0.92 0.075 28);
  color: oklch(0.35 0.1 28);
}

.coverage-metric--queue > span {
  background: oklch(0.92 0.065 235);
  color: oklch(0.3 0.08 235);
}

.api-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.api-endpoint-card pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
}

.acceptance-report {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid oklch(0.78 0.11 154 / 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, oklch(0.97 0.036 154 / 0.86), oklch(1 0 0 / 0.94));
}

.acceptance-report[hidden] {
  display: none;
}

.acceptance-report strong {
  color: oklch(0.32 0.095 154);
}

.acceptance-report p {
  margin: 0;
  color: var(--muted);
}

.acceptance-report pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
}

.search-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.search-chip-grid button,
.acceptance-mode__actions button,
.acceptance-entry button,
.feature-showcase-card button {
  min-height: 38px;
  border: 1px solid oklch(0.84 0.025 82);
  border-radius: 999px;
  background: oklch(0.98 0.024 82);
  color: var(--accent-ink);
  font-weight: 850;
}

.search-chip-grid button:hover,
.acceptance-mode__actions button:hover,
.acceptance-entry button:hover,
.feature-showcase-card button:hover {
  border-color: var(--accent);
  background: oklch(0.95 0.06 82);
}

.acceptance-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, oklch(1 0 0), oklch(0.972 0.014 85));
  box-shadow: 0 14px 42px oklch(0.18 0.012 255 / 0.045);
}

.acceptance-entry strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.acceptance-entry p {
  margin: 0;
  color: var(--muted);
}

.feature-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.feature-showcase-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 286px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 88% 12%, oklch(0.9 0.07 78 / 0.38), transparent 34%),
    linear-gradient(180deg, oklch(1 0 0), oklch(0.977 0.008 88));
  box-shadow: 0 16px 46px oklch(0.18 0.012 250 / 0.055);
}

.feature-showcase-card > span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: oklch(0.93 0.052 82);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
}

.feature-showcase-card--sensitive > span {
  background: oklch(0.88 0.12 48);
  color: oklch(0.27 0.07 48);
}

.feature-showcase-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.feature-showcase-card p,
.feature-showcase-card dd {
  color: var(--muted);
  line-height: 1.6;
}

.feature-showcase-card p {
  margin: 0;
}

.feature-showcase-card dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.feature-showcase-card dt {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.feature-showcase-card dd {
  margin: 0;
  font-size: 13px;
}

.acceptance-mode {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid oklch(0.84 0.025 82);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 10%, oklch(0.9 0.07 78 / 0.34), transparent 32%),
    linear-gradient(180deg, oklch(1 0 0), oklch(0.976 0.008 88));
  box-shadow: 0 16px 46px oklch(0.18 0.012 250 / 0.055);
}

.acceptance-mode__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.acceptance-mode__head strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.acceptance-mode__head p {
  margin: 0;
  color: var(--muted);
}

.acceptance-mode__head [data-acceptance-progress] {
  flex: 0 0 auto;
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 999px;
  background: oklch(0.14 0.014 250);
  color: #fff;
  text-align: center;
  font-weight: 900;
}

.acceptance-mode.is-complete [data-acceptance-progress] {
  background: oklch(0.53 0.13 154);
}

.acceptance-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.acceptance-check-grid label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 52px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: oklch(1 0 0 / 0.78);
  color: var(--ink);
  line-height: 1.5;
}

.acceptance-check-grid input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.acceptance-check-grid label:has(input:checked) {
  border-color: oklch(0.72 0.13 154);
  background: oklch(0.96 0.04 154 / 0.75);
}

.acceptance-mode__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 980px) {
  .feature-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-entry-grid,
  .coverage-dashboard,
  .api-product-grid,
  .wizard-flow,
  .resource-card-grid,
  .translation-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publish-mode-card {
    grid-template-columns: 1fr;
  }

  .acceptance-entry {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .article-scope {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-showcase-grid,
  .acceptance-check-grid,
  .role-entry-grid,
  .coverage-dashboard,
  .api-product-grid,
  .wizard-flow,
  .resource-card-grid,
  .translation-overview {
    grid-template-columns: 1fr;
  }
}

/* Final reference-detail pass: restore the icon language after legacy overrides. */
:root {
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m21 21-4.35-4.35M10.8 18a7.2 7.2 0 1 1 0-14.4 7.2 7.2 0 0 1 0 14.4Z' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E");
  --i-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h10l6 6-9 9-7-7V5Z M8 8.5h.01' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-copylink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1.2 1.2M14 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1.2-1.2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.kb-topbar .kb-search {
  position: relative !important;
}

.kb-topbar .kb-search::before {
  position: absolute;
  left: 19px;
  top: 50%;
  z-index: 2;
  width: 18px;
  height: 18px;
  background: #77818c;
  content: "";
  pointer-events: none;
  transform: translateY(-50%);
  -webkit-mask: var(--i-search) center / contain no-repeat;
  mask: var(--i-search) center / contain no-repeat;
}

.kb-topbar .kb-search input {
  padding-left: 50px !important;
}

.kb-nav-group summary::before,
.kb-nav button::before,
.kb-path::before,
.kb-copy::before,
.kb-lang-toggle::before,
.article-tools span::before,
.article-toc a::before {
  display: inline-block !important;
  flex: 0 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: currentColor !important;
  box-shadow: none !important;
  content: "" !important;
  -webkit-mask: var(--icon-url, var(--i-file)) center / contain no-repeat !important;
  mask: var(--icon-url, var(--i-file)) center / contain no-repeat !important;
}

.kb-nav-group summary::before {
  --icon-url: var(--group-icon, var(--i-grid));
  width: 18px !important;
  height: 18px !important;
  margin: 0 10px 0 0 !important;
  color: #3d4650 !important;
}

.kb-nav-group:nth-of-type(1) summary::before { --group-icon: var(--i-server); }
.kb-nav-group:nth-of-type(2) summary::before { --group-icon: var(--i-file); }
.kb-nav-group:nth-of-type(3) summary::before { --group-icon: var(--i-grid); }
.kb-nav-group:nth-of-type(4) summary::before { --group-icon: var(--i-briefcase); }
.kb-nav-group:nth-of-type(5) summary::before { --group-icon: var(--i-user); }
.kb-nav-group:nth-of-type(6) summary::before { --group-icon: var(--i-users); }
.kb-nav-group:nth-of-type(7) summary::before { --group-icon: var(--i-link); }
.kb-nav-group:nth-of-type(8) summary::before { --group-icon: var(--i-chart); }
.kb-nav-group:nth-of-type(9) summary::before { --group-icon: var(--i-bell); }

.kb-nav button {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
}

.kb-nav button::before {
  --icon-url: var(--nav-icon, var(--i-file));
  width: 15.5px !important;
  height: 15.5px !important;
  min-width: 15.5px !important;
  color: #687482 !important;
}

.kb-nav button.is-active::before,
.kb-nav button:hover::before {
  color: #d99500 !important;
}

.kb-nav [data-article-target="docs-home"]::before { --nav-icon: var(--i-home); }
.kb-nav [data-article-target^="collection-"]::before { --nav-icon: var(--i-book); }
.kb-nav [data-article-target="quick-start"]::before { --nav-icon: var(--i-play); }
.kb-nav [data-article-target="launch-playbook"]::before,
.kb-nav [data-article-target*="workflow"]::before,
.kb-nav [data-article-target*="walkthrough"]::before,
.kb-nav [data-article-target*="playbook"]::before { --nav-icon: var(--i-route); }
.kb-nav [data-article-target*="deployment"]::before,
.kb-nav [data-article-target*="install"]::before { --nav-icon: var(--i-server); }
.kb-nav [data-article-target*="checklist"]::before,
.kb-nav [data-article-target*="acceptance"]::before { --nav-icon: var(--i-checklist); }
.kb-nav [data-article-target*="backup"]::before { --nav-icon: var(--i-database); }
.kb-nav [data-article-target*="action-center"]::before,
.kb-nav [data-article-target*="support"]::before,
.kb-nav [data-article-target*="faq"]::before,
.kb-nav [data-article-target*="troubleshooting"]::before { --nav-icon: var(--i-bell); }
.kb-nav [data-article-target*="connector"]::before { --nav-icon: var(--i-plug); }
.kb-nav [data-article-target*="risk"]::before,
.kb-nav [data-article-target*="security"]::before { --nav-icon: var(--i-shield); }
.kb-nav [data-article-target*="creative"]::before,
.kb-nav [data-article-target*="public-offer"]::before { --nav-icon: var(--i-image); }
.kb-nav [data-article-target*="flow"]::before { --nav-icon: var(--i-nodes); }
.kb-nav [data-article-target*="scenario"]::before,
.kb-nav [data-article-target*="offer"]::before { --nav-icon: var(--i-briefcase); }
.kb-nav [data-article-target*="admin"]::before,
.kb-nav [data-article-target*="affiliate"]::before,
.kb-nav [data-article-target*="advertiser"]::before { --nav-icon: var(--i-user); }
.kb-nav [data-article-target*="settings"]::before { --nav-icon: var(--i-gear); }
.kb-nav [data-article-target*="users"]::before,
.kb-nav [data-article-target*="account-team"]::before { --nav-icon: var(--i-users); }
.kb-nav [data-article-target*="tracking"]::before,
.kb-nav [data-article-target*="postback"]::before,
.kb-nav [data-article-target*="pixel"]::before,
.kb-nav [data-article-target*="api"]::before { --nav-icon: var(--i-link); }
.kb-nav [data-article-target*="report"]::before,
.kb-nav [data-article-target*="finance"]::before,
.kb-nav [data-article-target*="payment"]::before { --nav-icon: var(--i-chart); }
.kb-nav [data-article-target*="field"]::before,
.kb-nav [data-article-target*="glossary"]::before { --nav-icon: var(--i-file); }

.kb-path::before {
  --icon-url: var(--i-home);
  width: 17px !important;
  height: 17px !important;
  margin-right: 9px !important;
  color: #4c5662 !important;
}

.kb-copy::before {
  --icon-url: var(--i-copylink);
  width: 18px !important;
  height: 18px !important;
  margin-right: 8px !important;
  color: #0d1218 !important;
}

.kb-lang-toggle::before {
  --icon-url: var(--i-globe);
  width: 19px !important;
  height: 19px !important;
  margin-right: 8px !important;
  color: #0d1218 !important;
}

.kb-actions::after {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #0d1218 !important;
  content: "" !important;
  -webkit-mask: var(--i-gear) center / 18px 18px no-repeat !important;
  mask: var(--i-gear) center / 18px 18px no-repeat !important;
}

.article-tools span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.article-tools span::before {
  --icon-url: var(--i-tag);
  width: 16px !important;
  height: 16px !important;
  color: currentColor !important;
}

.article-tools span:nth-child(2)::before { --icon-url: var(--i-file); }
.article-tools span:nth-child(3)::before { --icon-url: var(--i-calendar); }

.article-toc a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.article-toc a::before {
  --icon-url: var(--toc-icon, var(--i-file));
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  color: #7f8a95 !important;
}

.article-toc a.is-active::before {
  color: #efa60b !important;
}

.article-toc a:nth-child(1)::before { --toc-icon: var(--i-home); }
.article-toc a:nth-child(2)::before { --toc-icon: var(--i-book); }
.article-toc a:nth-child(3)::before { --toc-icon: var(--i-grid); }
.article-toc a:nth-child(4)::before { --toc-icon: var(--i-users); }
.article-toc a:nth-child(5)::before { --toc-icon: var(--i-calendar); }
.article-toc a:nth-child(6)::before { --toc-icon: var(--i-route); }
.article-toc a:nth-child(7)::before { --toc-icon: var(--i-file); }
.article-toc a:nth-child(8)::before { --toc-icon: var(--i-database); }
.article-toc a:nth-child(9)::before { --toc-icon: var(--i-chart); }

.collection-card {
  position: relative !important;
  padding: 24px 58px 24px 92px !important;
}

.collection-card::before {
  --icon-url: var(--card-icon, var(--i-book));
  position: absolute;
  left: 26px;
  top: 50%;
  width: 38px;
  height: 38px;
  background: #eca10b;
  content: "";
  transform: translateY(-50%);
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.collection-card:nth-child(1)::before { --card-icon: var(--i-server); }
.collection-card:nth-child(2)::before { --card-icon: var(--i-gear); }
.collection-card:nth-child(3)::before { --card-icon: var(--i-briefcase); }
.collection-card:nth-child(4)::before { --card-icon: var(--i-link); }
.collection-card:nth-child(5)::before { --card-icon: var(--i-plug); }
.collection-card:nth-child(6)::before { --card-icon: var(--i-user); }
.collection-card:nth-child(7)::before { --card-icon: var(--i-chart); }
.collection-card:nth-child(8)::before { --card-icon: var(--i-shield); }
.collection-card:nth-child(9)::before { --card-icon: var(--i-bell); }

.collection-card header {
  gap: 14px !important;
}

.collection-card header span {
  width: 34px !important;
  height: 34px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  background: #ffe6b8 !important;
  color: #b87300 !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

.collection-card::after {
  right: 24px !important;
  color: #7f8a95 !important;
}

.portal-quick-grid button {
  position: relative !important;
  padding: 22px 52px 22px 90px !important;
}

.portal-quick-grid button::before {
  --icon-url: var(--portal-icon, var(--i-book));
  position: absolute;
  left: 24px;
  top: 50%;
  width: 40px;
  height: 40px;
  background: #eca10b;
  content: "" !important;
  transform: translateY(-50%);
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.portal-quick-grid [data-article-target="install-deployment"]::before { --portal-icon: var(--i-server); }
.portal-quick-grid [data-article-target="platform-settings"]::before { --portal-icon: var(--i-gear); }
.portal-quick-grid [data-article-target="offer-walkthrough"]::before { --portal-icon: var(--i-briefcase); }
.portal-quick-grid [data-article-target="tracking"]::before { --portal-icon: var(--i-link); }
.portal-quick-grid [data-article-target="action-center-operations"]::before { --portal-icon: var(--i-bell); }
.portal-quick-grid [data-article-target="connector"]::before { --portal-icon: var(--i-plug); }
.portal-quick-grid [data-article-target="troubleshooting-matrix"]::before { --portal-icon: var(--i-shield); }

.portal-quick-grid small {
  position: absolute !important;
  left: 90px;
  top: 22px;
}

.portal-quick-grid strong {
  padding-left: 50px;
}

@media (max-width: 760px) {
  .kb-copy {
    display: none !important;
  }

  .kb-actions::after {
    display: grid !important;
  }

  .collection-card {
    padding: 20px 44px 20px 74px !important;
  }

  .collection-card::before {
    left: 20px;
    width: 30px;
    height: 30px;
  }

  .portal-quick-grid button {
    padding: 20px 44px 20px 76px !important;
  }

  .portal-quick-grid button::before {
    left: 22px;
    width: 32px;
    height: 32px;
  }

  .portal-quick-grid small {
    left: 76px;
    top: 20px;
  }

  .portal-quick-grid strong {
    padding-left: 48px;
  }
}

/* Final stabilizer: keep the reference layout after legacy overrides above. */
.kb-sidebar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-right: 1px solid #e8dfcf !important;
  color: #0b1117 !important;
}

.kb-brand {
  grid-template-columns: minmax(0, 1fr) !important;
}

.kb-brand::before {
  content: none !important;
}

.kb-brand__logo {
  display: block !important;
  width: 205px !important;
}

.kb-nav button,
.kb-nav button * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: keep-all !important;
}

.kb-nav button {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 38px !important;
  gap: 10px !important;
  white-space: normal !important;
  text-align: left !important;
}

.kb-nav button.is-active {
  min-height: 48px !important;
  background: #fff1cd !important;
  border-color: #f5d28b !important;
  color: #0b1117 !important;
}

.kb-article[data-article="docs-home"] .article-head::before {
  background: url("brand/docs-hero-illustration.png") center / contain no-repeat !important;
  border: 0 !important;
  box-shadow: none !important;
}

.kb-article[data-article="docs-home"] .article-head::after {
  display: none !important;
}

.kb-doc-portal {
  padding: 28px 26px 26px !important;
}

.portal-screenshot-grid {
  display: none !important;
}

@media (max-width: 760px) {
  .kb-topbar .kb-search input {
    padding-left: 46px !important;
    padding-right: 16px !important;
  }

  .kb-copy {
    display: none !important;
  }
}

/* Icon fidelity pass: route-specific line icons matching the reference docs UI. */
:root {
  --i-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11.5 12 4l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1v-8.5Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h7l4 4v14H7V3Z M14 3v5h4 M9 12h6 M9 16h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5.5A2.5 2.5 0 0 1 7.5 3H20v15H8a3 3 0 0 0-3 3V5.5Z M5 5.5V21 M8 18h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7L8 5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-route: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 5a3 3 0 1 0 0 6h12a3 3 0 1 1 0 6H8 M6 5h.01 M18 17h.01 M8 21l-4-4 4-4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-server: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v5H4V5Z M4 14h16v5H4v-5Z M7 7.5h.01 M7 16.5h.01 M11 7.5h6 M11 16.5h6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-checklist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5h11 M9 12h11 M9 19h11 M4 5l1 1 2-2 M4 12l1 1 2-2 M4 19l1 1 2-2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-database: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 6c0-1.7 3.1-3 7-3s7 1.3 7 3-3.1 3-7 3-7-1.3-7-3Z M5 6v6c0 1.7 3.1 3 7 3s7-1.3 7-3V6 M5 12v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9Z M10 21h4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-plug: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3v5 M16 3v5 M6 8h12v4a6 6 0 0 1-12 0V8Z M12 18v3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z M9 12l2 2 4-5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v14H4V5Z M8 9h.01 M4 16l4-4 4 4 3-3 5 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-nodes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 7a3 3 0 1 0 0 .01 M18 7a3 3 0 1 0 0 .01 M12 17a3 3 0 1 0 0 .01 M8.5 8.5 11 15 M15.5 8.5 13 15' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-briefcase: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 6V4h4v2 M4 7h16v12H4V7Z M4 12h16 M10 12v2h4v-2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h7v7H4V4Z M13 4h7v7h-7V4Z M4 13h7v7H4v-7Z M13 13h7v7h-7v-7Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M4 21a8 8 0 0 1 16 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M2 21a7 7 0 0 1 14 0 M17 11a3 3 0 1 0 0-6 M16 14a6 6 0 0 1 6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2 3.4-.2-.1a1.7 1.7 0 0 0-2 .3l-.4.2-.5 2.2H9.3l-.5-2.2-.4-.2a1.7 1.7 0 0 0-2-.3l-.2.1-2-3.4.1-.1a1.7 1.7 0 0 0 .3-1.9l-.1-.4-2.1-1.6V10l2.1-1.6.1-.4a1.7 1.7 0 0 0-.3-1.9l-.1-.1 2-3.4.2.1a1.7 1.7 0 0 0 2-.3l.4-.2L9.3 0h5.4l.5 2.2.4.2a1.7 1.7 0 0 0 2 .3l.2-.1 2 3.4-.1.1a1.7 1.7 0 0 0-.3 1.9l.1.4 2.1 1.6v4l-2.1 1.6-.1.4Z' fill='black'/%3E%3C/svg%3E");
  --i-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1 1 M14 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1-1' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Z M2 12h20 M12 2a15 15 0 0 1 0 20 M12 2a15 15 0 0 0 0 20' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --i-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3v4 M17 3v4 M4 8h16 M5 5h14v16H5V5Z M8 12h3 M13 12h3 M8 16h3 M13 16h3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20V4 M4 20h16 M8 17V9 M12 17V6 M16 17v-4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.kb-nav-group summary::before,
.kb-nav button::before,
.kb-path::before,
.kb-copy::before,
.kb-lang-toggle::before,
.article-tools span::before,
.article-toc a::before {
  -webkit-mask: var(--icon-url, var(--i-file)) center / contain no-repeat !important;
  mask: var(--icon-url, var(--i-file)) center / contain no-repeat !important;
  background: currentColor !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.kb-nav-group summary::before {
  --icon-url: var(--group-icon, var(--i-book));
  color: #4a5562 !important;
}

.kb-nav-group:nth-of-type(1) summary::before { --group-icon: var(--i-server); }
.kb-nav-group:nth-of-type(2) summary::before { --group-icon: var(--i-file); }
.kb-nav-group:nth-of-type(3) summary::before { --group-icon: var(--i-grid); }
.kb-nav-group:nth-of-type(4) summary::before { --group-icon: var(--i-briefcase); }
.kb-nav-group:nth-of-type(5) summary::before { --group-icon: var(--i-user); }
.kb-nav-group:nth-of-type(6) summary::before { --group-icon: var(--i-briefcase); }
.kb-nav-group:nth-of-type(7) summary::before { --group-icon: var(--i-link); }
.kb-nav-group:nth-of-type(8) summary::before { --group-icon: var(--i-chart); }
.kb-nav-group:nth-of-type(9) summary::before { --group-icon: var(--i-bell); }

.kb-nav button::before {
  --icon-url: var(--nav-icon, var(--i-file));
  color: #6b7480 !important;
}

.kb-nav button.is-active::before {
  color: var(--accent) !important;
}

.kb-nav [data-article-target="docs-home"]::before { --nav-icon: var(--i-home); }
.kb-nav [data-article-target="collection-install"]::before,
.kb-nav [data-article-target="collection-platform"]::before,
.kb-nav [data-article-target="collection-offers"]::before,
.kb-nav [data-article-target="collection-affiliate"]::before,
.kb-nav [data-article-target="collection-advertiser"]::before,
.kb-nav [data-article-target="collection-tracking"]::before,
.kb-nav [data-article-target="collection-finance"]::before,
.kb-nav [data-article-target="collection-support"]::before { --nav-icon: var(--i-book); }
.kb-nav [data-article-target="quick-start"]::before { --nav-icon: var(--i-play); }
.kb-nav [data-article-target="launch-playbook"]::before { --nav-icon: var(--i-route); }
.kb-nav [data-article-target="install-deployment"]::before { --nav-icon: var(--i-server); }
.kb-nav [data-article-target="commercial-acceptance"]::before,
.kb-nav [data-article-target="offer-launch-checklist"]::before { --nav-icon: var(--i-checklist); }
.kb-nav [data-article-target="backup-operations"]::before { --nav-icon: var(--i-database); }
.kb-nav [data-article-target="feature-overview"]::before { --nav-icon: var(--i-grid); }
.kb-nav [data-article-target="action-center-operations"]::before { --nav-icon: var(--i-bell); }
.kb-nav [data-article-target="connector"]::before { --nav-icon: var(--i-plug); }
.kb-nav [data-article-target="risk-automation"]::before,
.kb-nav [data-article-target="security-governance"]::before { --nav-icon: var(--i-shield); }
.kb-nav [data-article-target="public-offer-creatives-workflow"]::before,
.kb-nav [data-article-target="creatives-public-offers"]::before { --nav-icon: var(--i-image); }
.kb-nav [data-article-target="visual-flow-guide"]::before { --nav-icon: var(--i-nodes); }
.kb-nav [data-article-target="business-scenario-playbook"]::before { --nav-icon: var(--i-briefcase); }
.kb-nav [data-article-target="admin"]::before,
.kb-nav [data-article-target="affiliate"]::before,
.kb-nav [data-article-target="advertiser"]::before { --nav-icon: var(--i-user); }
.kb-nav [data-article-target="admin-daily-sop"]::before { --nav-icon: var(--i-calendar); }
.kb-nav [data-article-target="backend-menu-reference"]::before,
.kb-nav [data-article-target="backend-page-playbook"]::before { --nav-icon: var(--i-file); }
.kb-nav [data-article-target="platform-settings"]::before { --nav-icon: var(--i-gear); }
.kb-nav [data-article-target="users-permissions"]::before,
.kb-nav [data-article-target="account-team-workflow"]::before { --nav-icon: var(--i-users); }
.kb-nav [data-article-target*="offer"]::before { --nav-icon: var(--i-briefcase); }
.kb-nav [data-article-target*="tracking"]::before,
.kb-nav [data-article-target*="postback"]::before,
.kb-nav [data-article-target="pixel-testing"]::before { --nav-icon: var(--i-link); }
.kb-nav [data-article-target="api"]::before,
.kb-nav [data-article-target="api-quick-integration"]::before,
.kb-nav [data-article-target="api-postback-examples"]::before { --nav-icon: var(--i-file); }
.kb-nav [data-article-target="reports-logs"]::before,
.kb-nav [data-article-target="finance-settlement-workflow"]::before { --nav-icon: var(--i-chart); }
.kb-nav [data-article-target="payments"]::before { --nav-icon: var(--i-checklist); }
.kb-nav [data-article-target="glossary"]::before,
.kb-nav [data-article-target="field-reference"]::before { --nav-icon: var(--i-book); }
.kb-nav [data-article-target*="troubleshooting"]::before,
.kb-nav [data-article-target="faq"]::before,
.kb-nav [data-article-target="support-ticket-template"]::before { --nav-icon: var(--i-bell); }

.kb-path::before {
  --icon-url: var(--i-home);
  width: 17px !important;
  height: 17px !important;
  color: #4b5563 !important;
}

.kb-copy::before {
  --icon-url: var(--i-link);
  width: 18px !important;
  height: 18px !important;
  color: #0b1117 !important;
}

.kb-lang-toggle::before {
  --icon-url: var(--i-globe);
  width: 19px !important;
  height: 19px !important;
  color: #0b1117 !important;
}

.kb-actions::after {
  -webkit-mask: var(--i-gear) center / 19px 19px no-repeat !important;
  mask: var(--i-gear) center / 19px 19px no-repeat !important;
  background: #0b1117 !important;
  color: transparent !important;
  content: "" !important;
}

.article-tools span:nth-child(1)::before { --icon-url: var(--i-checklist); }
.article-tools span:nth-child(2)::before { --icon-url: var(--i-file); }
.article-tools span:nth-child(3)::before { --icon-url: var(--i-calendar); }

.article-toc a::before {
  --icon-url: var(--toc-icon, var(--i-file));
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  color: #9aa3ad !important;
  opacity: 1 !important;
}

.article-toc a.is-active::before {
  color: var(--accent) !important;
}

.article-toc a:nth-child(1)::before { --toc-icon: var(--i-home); }
.article-toc a:nth-child(2)::before { --toc-icon: var(--i-book); }
.article-toc a:nth-child(3)::before { --toc-icon: var(--i-grid); }
.article-toc a:nth-child(4)::before { --toc-icon: var(--i-users); }
.article-toc a:nth-child(5)::before { --toc-icon: var(--i-calendar); }
.article-toc a:nth-child(6)::before { --toc-icon: var(--i-route); }
.article-toc a:nth-child(7)::before { --toc-icon: var(--i-file); }
.article-toc a:nth-child(8)::before { --toc-icon: var(--i-database); }
.article-toc a:nth-child(9)::before { --toc-icon: var(--i-chart); }

@media (max-width: 760px) {
  .kb-copy {
    display: none !important;
  }
}

/* Afftrix docs home refresh: light operational documentation shell. */
:root {
  --bg: oklch(0.984 0.006 86);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.972 0.008 86);
  --surface-3: oklch(0.94 0.014 86);
  --surface-raised: oklch(0.996 0.003 86);
  --ink: oklch(0.145 0.018 255);
  --muted: oklch(0.43 0.021 255);
  --soft: oklch(0.63 0.019 255);
  --line: oklch(0.895 0.014 86);
  --accent: oklch(0.755 0.16 78);
  --accent-ink: oklch(0.47 0.13 70);
  --green: oklch(0.66 0.16 150);
  --sidebar: 320px;
  --topbar: 78px;
  --radius: 8px;
  --shadow-soft: 0 22px 62px oklch(0.18 0.018 255 / 0.075);
  --shadow-card: 0 16px 44px oklch(0.18 0.018 255 / 0.052);
}

body {
  background:
    linear-gradient(90deg, oklch(0.82 0.012 86 / 0.16) 1px, transparent 1px),
    linear-gradient(180deg, oklch(0.82 0.012 86 / 0.16) 1px, transparent 1px),
    radial-gradient(circle at 22% 5%, oklch(0.93 0.055 80 / 0.42), transparent 28%),
    radial-gradient(circle at 78% 8%, oklch(0.95 0.028 95 / 0.42), transparent 24%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid oklch(0.78 0.13 78 / 0.34);
  outline-offset: 2px;
}

.kb-shell {
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.kb-sidebar {
  gap: 14px;
  padding: 22px 20px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.96), oklch(0.978 0.006 86 / 0.96));
  color: var(--ink);
  box-shadow: inset -1px 0 0 oklch(1 0 0 / 0.74), 14px 0 42px oklch(0.18 0.018 255 / 0.035);
}

.kb-brand {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 0 6px 24px;
  border-bottom-color: var(--line);
}

.kb-brand::before {
  content: none !important;
}

.kb-brand__logo {
  display: block !important;
  width: min(212px, 100%);
}

.kb-brand strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kb-brand small {
  color: var(--soft);
  font-size: 11px;
}

.kb-nav {
  gap: 10px;
}

.kb-nav-group,
.kb-nav-group[open] {
  border: 0;
  background: transparent;
}

.kb-nav-group + .kb-nav-group {
  padding-top: 9px;
  border-top: 1px solid oklch(0.91 0.012 86);
}

.kb-nav-group summary {
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  min-height: 42px;
  padding: 6px 4px 7px 5px;
  border-radius: 8px;
  color: var(--ink);
}

.kb-nav-group summary::before {
  width: 20px;
  height: 20px;
  border: 1.5px solid oklch(0.42 0.02 255);
  border-radius: 5px;
  background:
    linear-gradient(90deg, currentColor 0 1.5px, transparent 1.5px 100%) 6px 5px / 8px 10px no-repeat,
    linear-gradient(currentColor 0 0) 5px 8px / 10px 1.5px no-repeat;
  color: oklch(0.42 0.02 255);
  content: "";
  opacity: 0.86;
}

.kb-nav-group summary:hover {
  background: oklch(1 0 0 / 0.68);
}

.kb-nav-group summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.kb-nav-group summary small {
  display: none;
}

.kb-nav-group summary em {
  min-width: 23px;
  height: 23px;
  border-color: oklch(0.86 0.014 86);
  background: oklch(0.993 0.003 86);
  color: var(--soft);
  font-size: 11px;
}

.kb-nav-list {
  gap: 5px;
  margin: 3px 0 5px;
  padding: 0;
  border-left: 0;
}

.kb-nav button {
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.kb-nav button::before {
  width: 17px;
  height: 17px;
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  background:
    linear-gradient(currentColor 0 0) 4px 5px / 7px 1.5px no-repeat,
    linear-gradient(currentColor 0 0) 4px 9px / 9px 1.5px no-repeat;
  content: "";
  opacity: 0.72;
}

.kb-nav button:hover {
  border-color: oklch(0.9 0.014 86);
  background: oklch(1 0 0 / 0.82);
  color: var(--ink);
}

.kb-nav button.is-active {
  border-color: oklch(0.91 0.055 82);
  background: linear-gradient(90deg, oklch(0.97 0.044 82), oklch(0.992 0.018 88));
  color: oklch(0.25 0.026 255);
  box-shadow: none;
}

.kb-nav button.is-active::before {
  border-color: var(--accent);
  background:
    radial-gradient(circle at 50% 50%, var(--accent) 0 4px, transparent 4.5px),
    linear-gradient(currentColor 0 0) center / 100% 100% no-repeat;
  color: oklch(0.98 0.04 82);
  opacity: 1;
}

.kb-sidebar__footer {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid oklch(0.89 0.022 84);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 20%, oklch(0.93 0.055 80 / 0.45), transparent 34%),
    linear-gradient(180deg, oklch(1 0 0 / 0.9), oklch(0.984 0.014 86));
  color: var(--muted);
}

.kb-sidebar__footer span {
  color: var(--ink);
  font-weight: 900;
}

.kb-lang-toggle--footer {
  width: fit-content;
  min-height: 34px;
  border-radius: 8px;
  background: oklch(0.94 0.04 82);
  color: var(--accent-ink);
}

.kb-content {
  min-width: 0;
}

.kb-topbar {
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(320px, 760px) auto;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--topbar);
  padding: 0 clamp(24px, 3.2vw, 54px);
  border-bottom: 1px solid oklch(0.89 0.014 86);
  background: oklch(0.995 0.003 86 / 0.86);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.kb-path {
  width: fit-content;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.kb-path::before {
  width: 17px;
  height: 17px;
  display: inline-block;
  margin-right: -1px;
  background:
    linear-gradient(135deg, transparent 44%, currentColor 45% 56%, transparent 57%) 2px 0 / 13px 8px no-repeat,
    linear-gradient(currentColor 0 0) 4px 7px / 9px 8px no-repeat;
  color: var(--muted);
  content: "";
}

.kb-topbar .kb-search {
  justify-self: center;
  width: min(100%, 760px);
  max-width: 760px;
}

.kb-topbar .kb-search::before {
  position: absolute;
  left: 17px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-54%);
  content: "";
  opacity: 0.78;
  pointer-events: none;
}

.kb-topbar .kb-search::after {
  position: absolute;
  left: 30px;
  top: 50%;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: translateY(5px) rotate(45deg);
  content: "";
  pointer-events: none;
}

.kb-topbar .kb-search input {
  min-height: 46px;
  padding: 0 58px 0 46px;
  border-color: oklch(0.88 0.014 86) !important;
  border-radius: 14px;
  background: oklch(1 0 0 / 0.96) !important;
  box-shadow: 0 14px 34px oklch(0.18 0.018 255 / 0.055);
}

.kb-topbar .kb-search input:focus {
  border-color: oklch(0.79 0.13 78) !important;
  box-shadow:
    0 0 0 4px oklch(0.84 0.08 78 / 0.24),
    0 16px 38px oklch(0.18 0.018 255 / 0.07);
}

.kb-topbar .kb-search label,
.kb-topbar .kb-search span {
  display: none;
}

.kb-actions {
  gap: 16px;
  margin-left: 0;
}

.kb-actions::after {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  content: "☼";
}

.kb-copy,
.kb-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.kb-copy::before,
.kb-lang-toggle::before {
  width: 18px;
  height: 18px;
  display: inline-block;
  content: "";
}

.kb-copy::before {
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 7px -7px 0 -5px currentColor;
}

.kb-lang-toggle::before {
  border: 1.7px solid currentColor;
  border-radius: 50%;
  background:
    linear-gradient(currentColor 0 0) 50% 0 / 1.5px 100% no-repeat,
    linear-gradient(currentColor 0 0) 0 50% / 100% 1.5px no-repeat;
}

.kb-copy:hover,
.kb-lang-toggle:hover {
  background: oklch(0.96 0.022 82);
  color: var(--ink);
}

.kb-layout {
  grid-template-columns: minmax(0, 1160px) 292px;
  gap: 34px;
  max-width: 1530px;
  margin: 0 auto;
  padding: 40px clamp(24px, 4vw, 64px) 80px;
}

.kb-article {
  max-width: 1160px;
  border-color: oklch(0.88 0.014 86);
  border-radius: 8px;
  background: oklch(1 0 0 / 0.94);
  box-shadow: var(--shadow-soft);
}

.kb-article[data-article="docs-home"] {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.article-head {
  border-bottom-color: var(--line);
}

.kb-article[data-article="docs-home"] .article-head {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 318px;
  padding: 28px min(44%, 520px) 26px 34px;
  border-bottom: 0;
  overflow: hidden;
}

.kb-article[data-article="docs-home"] .article-head::before {
  position: absolute;
  right: min(7vw, 96px);
  top: 33px;
  width: 178px;
  height: 230px;
  border: 1px solid oklch(0.86 0.055 78);
  border-radius: 15px;
  background:
    url("brand/afftrix-icon.svg") center 46% / 78px 78px no-repeat,
    linear-gradient(90deg, oklch(1 0 0 / 0.92) 0 31%, transparent 31%),
    linear-gradient(180deg, oklch(0.99 0.025 82 / 0.92), oklch(0.955 0.035 76 / 0.84));
  box-shadow:
    0 28px 70px oklch(0.55 0.12 78 / 0.2),
    inset 0 0 0 9px oklch(1 0 0 / 0.46);
  content: "";
  transform: rotate(8deg);
}

.kb-article[data-article="docs-home"] .article-head::after {
  position: absolute;
  right: min(3vw, 54px);
  top: 158px;
  width: 92px;
  height: 92px;
  border: 13px solid oklch(0.78 0.16 78);
  border-radius: 50%;
  box-shadow:
    0 24px 46px oklch(0.54 0.14 78 / 0.24),
    -200px -104px 0 -43px oklch(0.78 0.16 78),
    -274px 0 0 -46px oklch(0.78 0.16 78),
    36px -88px 0 -47px oklch(0.78 0.16 78);
  content: "";
}

.kb-article[data-article="docs-home"] .article-head .kb-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-bottom: 22px;
  padding: 0 14px;
  border: 1px solid oklch(0.82 0.085 150);
  border-radius: 8px;
  background: oklch(1 0 0 / 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
}

.kb-article[data-article="docs-home"] .article-head .kb-kicker::before {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  content: "";
}

.kb-article[data-article="docs-home"] .article-head h1 {
  max-width: 720px;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.kb-article[data-article="docs-home"] .article-head > p:not(.kb-kicker) {
  max-width: 740px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.article-tools {
  gap: 10px;
  margin-top: 24px;
}

.article-tools span {
  min-height: 34px;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.76);
  color: var(--ink);
  box-shadow: 0 8px 20px oklch(0.18 0.018 255 / 0.035);
}

.article-tools span::before {
  width: 15px;
  height: 15px;
  display: inline-block;
  border: 1.6px solid currentColor;
  border-radius: 4px;
  content: "";
  opacity: 0.68;
}

.article-tools span:first-child {
  border-color: oklch(0.16 0.016 255);
  background: oklch(0.16 0.016 255);
  color: oklch(1 0 0);
}

.kb-doc-portal {
  margin-top: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(1 0 0 / 0.82);
  box-shadow: var(--shadow-card);
}

.kb-doc-portal .portal-head {
  max-width: none;
}

.kb-doc-portal .portal-head span {
  margin-bottom: 7px;
  color: var(--accent-ink);
  font-size: 14px;
  text-transform: none;
}

.kb-doc-portal .portal-head h2 {
  display: none;
}

.kb-doc-portal .portal-head p {
  display: none;
}

.portal-quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.portal-quick-grid button,
.collection-card,
.guide-grid div,
.module-grid div,
.metric-cards div,
.step-list div,
.hub-panel,
.hub-article-list button,
.hub-sequence button,
.article-relations,
.article-footer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.96), oklch(0.982 0.006 86 / 0.94));
  box-shadow: 0 14px 36px oklch(0.18 0.018 255 / 0.042);
}

.portal-quick-grid button {
  min-height: 96px;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  align-content: center;
  gap: 12px 16px;
  padding: 18px;
}

.portal-quick-grid button::after,
.collection-card::after {
  color: var(--soft);
  content: "→";
  font-size: 19px;
  line-height: 1;
}

.portal-quick-grid small {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 68% 26%, oklch(0.9 0.12 82) 0 5px, transparent 5.5px),
    oklch(0.96 0.055 82);
  color: var(--accent-ink);
}

.portal-quick-grid strong {
  align-self: end;
  font-size: 16px;
}

.portal-quick-grid span {
  grid-column: 2 / 3;
  align-self: start;
  font-size: 13px;
}

.portal-screenshot-grid {
  display: none;
}

.kb-article[data-article="docs-home"] > .article-section:not(.kb-doc-portal) {
  margin-top: 30px;
  padding-top: 0;
}

.kb-article[data-article="docs-home"] > .article-section:not(.kb-doc-portal) > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: clamp(22px, 2.2vw, 30px);
}

.kb-article[data-article="docs-home"] > .article-section:not(.kb-doc-portal) > h2::before {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 5px;
  content: "";
  opacity: 0.82;
}

.guide-grid,
.module-grid {
  gap: 16px;
}

.guide-grid div,
.module-grid div {
  min-height: 128px;
}

.collection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.collection-card {
  position: relative;
  min-height: 170px;
  padding: 22px 56px 20px 22px;
}

.collection-card::after {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.collection-card header span {
  border-radius: 8px;
  background: oklch(0.94 0.05 82);
  color: var(--accent-ink);
}

.collection-links button,
.task-links button,
.hub-actions button,
.hub-panel button,
.hub-article-list button,
.hub-sequence button,
.article-relations button,
.article-footer__actions button {
  border-radius: 8px;
}

.task-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.task-row {
  grid-template-columns: 1fr;
  min-height: 130px;
  padding: 20px;
  border-radius: 8px;
  background: oklch(1 0 0 / 0.9);
  box-shadow: 0 12px 32px oklch(0.18 0.018 255 / 0.038);
}

.task-row strong {
  font-size: 15.5px;
}

.task-links {
  margin-top: auto;
}

.article-template div {
  border-radius: 8px;
  background: oklch(0.986 0.006 86);
}

.article-section h2,
.article-section h3 {
  letter-spacing: 0;
}

.article-section p,
.article-section li {
  color: var(--muted);
}

.table-wrap,
.doc-image,
pre {
  border-radius: 8px;
}

.article-toc {
  top: calc(var(--topbar) + 28px);
}

.article-toc__inner {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(1 0 0 / 0.9);
  box-shadow: var(--shadow-card);
}

.article-toc strong {
  color: var(--ink);
  font-size: 16px;
}

.article-toc a {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 760;
}

.article-toc a::before {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.58;
}

.article-toc a:hover,
.article-toc a.is-active {
  background: linear-gradient(90deg, oklch(0.97 0.042 82), oklch(0.995 0.018 88));
  color: var(--ink);
}

.article-toc a.is-active {
  padding-left: 10px;
  transform: none;
}

.article-toc a.is-active::before {
  position: static;
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.article-toc__inner::after {
  display: block;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid oklch(0.87 0.055 82);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 22%, oklch(0.92 0.058 82 / 0.54), transparent 30%),
    oklch(0.992 0.012 86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.65;
  white-space: pre-line;
  content: var(--kb-toc-help, "Not sure where to start?\A Read by workflow first, then jump into the matching role guide.");
}

:root[lang="en"] .article-toc__inner::after {
  content: var(--kb-toc-help, "Not sure where to start?\A Read by workflow first, then jump into the matching role guide.");
}

.kb-toast {
  border-radius: 8px;
  background: oklch(0.16 0.016 255);
  box-shadow: 0 18px 48px oklch(0.18 0.018 255 / 0.18);
}

@media (min-width: 1680px) {
  .kb-layout {
    grid-template-columns: minmax(0, 1220px) 300px;
    max-width: 1620px;
  }

  .kb-article,
  .kb-article[data-article="docs-home"] {
    max-width: 1220px;
  }
}

@media (max-width: 1380px) {
  :root {
    --sidebar: 292px;
  }

  .kb-topbar {
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 18px;
  }

  .kb-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 26px;
  }

  .kb-article[data-article="docs-home"] .article-head {
    padding-right: min(40%, 430px);
  }
}

@media (max-width: 1180px) {
  .kb-shell {
    grid-template-columns: 1fr;
  }

  .kb-sidebar {
    background: oklch(0.995 0.004 86);
  }

  .kb-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .kb-menu {
    min-height: 42px;
    border-radius: 8px;
  }

  .kb-path {
    display: none;
  }

  .kb-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 980px;
  }

  .article-toc {
    display: none;
  }

  .kb-article[data-article="docs-home"] .article-head {
    padding-right: 34px;
  }

  .kb-article[data-article="docs-home"] .article-head::before,
  .kb-article[data-article="docs-home"] .article-head::after {
    opacity: 0.18;
  }

  .portal-quick-grid,
  .collection-grid,
  .task-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --sidebar: min(88vw, 330px);
  }

  body {
    background-size: 24px 24px, 24px 24px, auto, auto, auto;
  }

  .kb-topbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "menu actions"
      "search search";
    gap: 10px 12px;
    padding: 12px 14px;
  }

  .kb-menu {
    grid-area: menu;
  }

  .kb-actions {
    grid-area: actions;
    gap: 6px;
    justify-self: end;
  }

  .kb-actions::after {
    display: none;
  }

  .kb-copy {
    width: 40px;
    overflow: hidden;
    padding: 0 11px;
    color: transparent;
  }

  .kb-copy::before {
    color: var(--ink);
  }

  .kb-lang-toggle {
    padding-inline: 9px;
  }

  .kb-topbar .kb-search {
    grid-area: search;
  }

  .kb-layout {
    padding: 24px 16px 56px;
  }

  .kb-article {
    --article-padding: 20px;
    border-radius: 8px;
  }

  .kb-article[data-article="docs-home"] .article-head {
    min-height: auto;
    padding: 14px 0 18px;
  }

  .kb-article[data-article="docs-home"] .article-head::before,
  .kb-article[data-article="docs-home"] .article-head::after {
    display: none;
  }

  .kb-article[data-article="docs-home"] .article-head h1 {
    font-size: clamp(38px, 12vw, 50px);
  }

  .kb-article[data-article="docs-home"] .article-head > p:not(.kb-kicker) {
    font-size: 15.5px;
  }

  .kb-doc-portal {
    padding: 16px;
  }

  .portal-quick-grid,
  .collection-grid,
  .task-map,
  .guide-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .portal-quick-grid button {
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    min-height: 88px;
    padding: 15px;
  }

  .collection-card,
  .task-row {
    min-height: auto;
  }
}

/* Final reference-match pass: fix sidebar readability and use generated hero art. */
:root {
  --bg: #fbf8f1;
  --surface: #ffffff;
  --surface-2: #fbf7ed;
  --surface-3: #f5efe2;
  --surface-raised: rgba(255, 255, 255, 0.92);
  --ink: #0b1117;
  --muted: #54606d;
  --soft: #8a94a1;
  --line: #e8dfcf;
  --accent: #f3aa15;
  --accent-ink: #9b6100;
  --green: #2fc16c;
  --sidebar: 314px;
  --topbar: 74px;
  --shadow-soft: 0 22px 62px rgba(31, 42, 55, 0.08);
  --shadow-card: 0 16px 42px rgba(31, 42, 55, 0.06);
}

body {
  background:
    linear-gradient(90deg, rgba(167, 139, 91, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(167, 139, 91, 0.12) 1px, transparent 1px),
    radial-gradient(circle at 38% 14%, rgba(245, 184, 57, 0.14), transparent 30%),
    #fbf8f1;
  background-size: 26px 26px, 26px 26px, auto, auto;
}

.kb-sidebar {
  padding: 24px 22px 20px;
  background: rgba(255, 255, 255, 0.94) !important;
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
}

.kb-brand {
  gap: 7px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.kb-brand__logo {
  width: 205px;
}

.kb-brand span {
  display: grid;
  gap: 4px;
}

.kb-brand strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kb-brand small {
  color: var(--muted);
  font-size: 13px;
}

.kb-nav {
  gap: 11px;
}

.kb-nav-group + .kb-nav-group {
  margin-top: 8px;
  padding-top: 12px;
}

.kb-nav-group summary {
  display: flex;
  min-height: 34px;
  gap: 10px;
  align-items: center;
  padding: 0 2px;
  background: transparent !important;
}

.kb-nav-group summary::before {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.kb-nav-group summary span {
  min-width: 0;
  flex: 1 1 auto;
}

.kb-nav-group summary strong {
  white-space: nowrap;
}

.kb-nav-group summary em {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 12px;
}

.kb-nav-group summary::after {
  flex: 0 0 8px;
}

.kb-nav-list {
  gap: 3px;
  margin-top: 8px;
}

.kb-nav button,
.kb-nav button * {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  word-break: keep-all !important;
}

.kb-nav button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.kb-nav button::before {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.kb-nav button.is-active {
  min-height: 48px;
  background: #fff1cd;
  border-color: #f5d28b;
  color: var(--ink);
}

.kb-sidebar__footer {
  padding: 17px;
  background: #fffaf0;
}

.kb-sidebar__footer::before {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.6;
  content: "需要帮助或建议？\A前往帮助中心提交工单或获取支持";
  white-space: pre-line;
}

.kb-sidebar__footer span,
.kb-sidebar__footer .kb-lang-toggle--footer {
  display: none;
}

.kb-topbar {
  grid-template-columns: minmax(170px, 260px) minmax(360px, 760px) minmax(280px, auto);
  min-height: 74px;
  padding: 0 34px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
}

.kb-path {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(31, 42, 55, 0.04);
}

.kb-topbar .kb-search input {
  min-height: 44px;
  border-radius: 999px;
}

.kb-actions {
  justify-content: flex-end;
  gap: 13px;
}

.kb-copy,
.kb-lang-toggle {
  min-height: 42px;
  padding-inline: 12px;
  border-radius: 999px;
}

.kb-layout {
  grid-template-columns: minmax(0, 1130px) 286px;
  max-width: 1510px;
  gap: 34px;
  padding: 36px 42px 76px;
}

.kb-article[data-article="docs-home"] .article-head {
  min-height: 318px;
  padding: 26px 420px 24px 34px;
}

.kb-article[data-article="docs-home"] .article-head::before {
  right: 38px;
  top: 12px;
  width: 360px;
  height: 285px;
  border: 0;
  border-radius: 0;
  background: url("brand/docs-hero-illustration.png") center / contain no-repeat;
  box-shadow: none;
  transform: none;
}

.kb-article[data-article="docs-home"] .article-head::after {
  display: none;
}

.kb-article[data-article="docs-home"] .article-head .kb-kicker {
  border-color: #98ddb3;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.kb-article[data-article="docs-home"] .article-head h1 {
  max-width: 620px;
  font-size: clamp(56px, 4.6vw, 76px);
  line-height: 1.02;
  font-weight: 950;
}

.kb-article[data-article="docs-home"] .article-head > p:not(.kb-kicker) {
  max-width: 700px;
  font-size: 17px;
}

.kb-article[data-article="docs-home"] .article-template {
  max-width: 650px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.kb-article[data-article="docs-home"] .article-template div {
  min-height: 96px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(31, 42, 55, 0.06);
}

.kb-doc-portal {
  margin-top: 22px;
  padding: 28px 26px 26px !important;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.portal-screenshot-grid {
  display: none !important;
}

.kb-doc-portal .portal-head span {
  margin-bottom: 22px;
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 900;
}

.portal-quick-grid {
  gap: 14px;
}

.portal-quick-grid button {
  min-height: 150px;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: start;
  padding: 24px 22px;
  background: linear-gradient(135deg, #fff, #fff8e9);
}

.portal-quick-grid small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.portal-quick-grid strong {
  align-self: start;
  font-size: 20px;
  line-height: 1.25;
}

.portal-quick-grid span {
  grid-column: 2 / 3;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.article-toc__inner {
  padding: 20px;
  border-radius: 8px;
}

.article-toc strong {
  margin-bottom: 14px;
  font-size: 18px;
}

.article-toc a {
  min-height: 44px;
  border-radius: 8px;
}

.article-toc a.is-active {
  background: #fff1cd;
}

.article-toc__inner::after {
  margin-top: 26px;
  padding: 20px;
  background: #fffaf0;
}

@media (max-width: 1680px) {
  .kb-layout {
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 28px;
    padding-inline: 28px;
  }

  .kb-article[data-article="docs-home"] .article-head {
    min-height: 300px;
    padding-right: 315px;
  }

  .kb-article[data-article="docs-home"] .article-head::before {
    right: 4px;
    width: 305px;
    height: 260px;
  }

  .kb-article[data-article="docs-home"] .article-head h1 {
    font-size: clamp(48px, 4vw, 66px);
  }

  .kb-article[data-article="docs-home"] .article-template {
    max-width: 600px;
  }
}

@media (max-width: 1380px) {
  .kb-layout {
    grid-template-columns: minmax(0, 1fr) 272px;
    padding-inline: 30px;
  }

  .kb-article[data-article="docs-home"] .article-head {
    padding-right: 350px;
  }

  .kb-article[data-article="docs-home"] .article-head::before {
    width: 315px;
  }
}

@media (max-width: 1180px) {
  .kb-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .kb-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 980px;
  }

  .kb-article[data-article="docs-home"] .article-head {
    padding-right: 260px;
  }

  .kb-article[data-article="docs-home"] .article-head::before {
    right: 0;
    width: 260px;
    opacity: 0.55;
  }
}

@media (max-width: 760px) {
  .kb-topbar {
    padding: 12px 14px;
  }

  .kb-sidebar {
    padding: 22px 18px 18px;
  }

  .kb-layout {
    padding: 22px 16px 56px;
  }

  .kb-article[data-article="docs-home"] .article-head {
    padding: 6px 0 18px;
  }

  .kb-article[data-article="docs-home"] .article-head::before {
    position: relative;
    right: auto;
    top: auto;
    width: min(100%, 300px);
    height: 220px;
    margin: 8px auto 0;
    order: 5;
    opacity: 1;
  }

  .kb-article[data-article="docs-home"] .article-head h1 {
    font-size: clamp(42px, 13vw, 54px);
  }

  .kb-article[data-article="docs-home"] .article-template,
  .portal-quick-grid {
    grid-template-columns: 1fr;
  }

  .portal-quick-grid button {
    min-height: 128px;
  }
}

/* Final Product Design override. Keep this block last so the real logo and light docs shell win. */
.kb-sidebar {
  border-right: 1px solid var(--line) !important;
  background: oklch(0.996 0.002 92 / 0.96) !important;
  color: var(--ink) !important;
  box-shadow: 18px 0 48px oklch(0.18 0.012 250 / 0.04) !important;
}

.kb-brand {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 4px 4px 20px !important;
  border-bottom-color: var(--line) !important;
}

.kb-brand::before {
  content: none !important;
  display: none !important;
}

.kb-brand__logo {
  display: block !important;
  width: min(218px, 100%) !important;
  height: auto !important;
}

.kb-brand strong {
  color: var(--ink) !important;
}

.kb-brand small,
.kb-search span,
.kb-nav-group summary small,
.kb-nav button,
.kb-sidebar__footer {
  color: var(--muted) !important;
}

.kb-search {
  background: linear-gradient(180deg, oklch(0.996 0.002 92) 72%, oklch(0.996 0.002 92 / 0)) !important;
}

.kb-search input {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

.kb-search input::placeholder {
  color: var(--soft) !important;
}

.kb-nav-group[open] {
  border-color: oklch(0.9 0.011 92) !important;
  background: oklch(1 0 0 / 0.72) !important;
}

.kb-nav-group summary {
  color: var(--ink) !important;
}

.kb-nav-group summary:hover,
.kb-nav button:hover {
  background: oklch(0.972 0.007 92) !important;
  color: var(--ink) !important;
}

.kb-nav-group summary strong {
  color: var(--ink) !important;
}

.kb-nav-group summary em {
  border-color: var(--line) !important;
  background: var(--surface-2) !important;
  color: var(--soft) !important;
}

.kb-nav-list {
  border-left-color: var(--line) !important;
}

.kb-nav button.is-active {
  border-color: oklch(0.81 0.12 76 / 0.46) !important;
  background: linear-gradient(135deg, oklch(0.98 0.03 82), oklch(0.935 0.065 76)) !important;
  color: var(--ink) !important;
  box-shadow: 0 12px 30px oklch(0.5 0.1 76 / 0.16) !important;
}

.kb-sidebar__footer {
  border-top-color: var(--line) !important;
}

.kb-sidebar__footer a {
  color: var(--accent-ink) !important;
}

.hero-logo-lockup img {
  display: block !important;
}

/* Product Design pass: lighter commercial documentation shell with real Afftrix branding. */
:root {
  --bg: oklch(0.982 0.006 92);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.972 0.006 92);
  --surface-3: oklch(0.94 0.008 92);
  --surface-raised: oklch(0.998 0.002 92);
  --ink: oklch(0.16 0.014 250);
  --muted: oklch(0.43 0.018 250);
  --soft: oklch(0.62 0.016 250);
  --line: oklch(0.88 0.011 92);
  --accent: oklch(0.73 0.16 76);
  --accent-ink: oklch(0.47 0.13 70);
  --sidebar: 330px;
  --radius: 12px;
  --shadow-soft: 0 24px 70px oklch(0.18 0.012 250 / 0.08);
}

body {
  background:
    linear-gradient(90deg, oklch(0.79 0.012 92 / 0.16) 1px, transparent 1px),
    linear-gradient(180deg, oklch(0.79 0.012 92 / 0.16) 1px, transparent 1px),
    radial-gradient(circle at 18% 4%, oklch(0.92 0.055 78 / 0.42), transparent 25%),
    radial-gradient(circle at 82% 12%, oklch(0.91 0.028 250 / 0.34), transparent 22%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
}

.kb-sidebar {
  padding: 20px 18px;
  border-right: 1px solid var(--line);
  background: oklch(0.995 0.002 92 / 0.94);
  color: var(--ink);
  box-shadow: 18px 0 48px oklch(0.18 0.012 250 / 0.035);
  backdrop-filter: blur(18px);
}

.kb-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 4px 4px 20px;
  border-bottom-color: var(--line);
}

.kb-brand::before {
  content: none;
}

.kb-brand__logo {
  display: block;
  width: min(210px, 100%);
  height: auto;
}

.kb-brand strong {
  color: var(--ink);
  font-size: 13px;
}

.kb-brand small {
  color: var(--muted);
  font-size: 12px;
}

.kb-search {
  top: 0;
  padding: 9px 0 12px;
  background: linear-gradient(180deg, oklch(0.995 0.002 92) 72%, oklch(0.995 0.002 92 / 0));
}

.kb-search span {
  color: var(--muted);
}

.kb-search input {
  min-height: 48px;
  border-color: var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 30px oklch(0.18 0.012 250 / 0.04);
}

.kb-search input::placeholder {
  color: var(--soft);
}

.kb-search input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px oklch(0.84 0.08 78 / 0.26);
}

.kb-nav {
  gap: 7px;
}

.kb-nav-group {
  border: 1px solid transparent;
  border-radius: 14px;
}

.kb-nav-group[open] {
  border-color: oklch(0.9 0.011 92);
  background: oklch(1 0 0 / 0.72);
}

.kb-nav-group summary {
  min-height: 56px;
  padding: 10px 11px 10px 12px;
  color: var(--ink);
}

.kb-nav-group summary:hover {
  background: oklch(0.97 0.007 92);
}

.kb-nav-group summary strong {
  color: var(--ink);
}

.kb-nav-group summary small {
  color: var(--muted);
}

.kb-nav-group summary em {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--soft);
}

.kb-nav-list {
  margin: 0 10px 10px 16px;
  padding: 2px 0 5px 12px;
  border-left-color: var(--line);
}

.kb-nav button {
  color: var(--muted);
}

.kb-nav button:hover {
  border-color: var(--line);
  background: oklch(0.975 0.007 92);
  color: var(--ink);
}

.kb-nav button.is-active {
  border-color: oklch(0.81 0.12 76 / 0.46);
  background:
    linear-gradient(135deg, oklch(0.98 0.03 82), oklch(0.935 0.065 76));
  color: var(--ink);
  box-shadow: 0 12px 30px oklch(0.5 0.1 76 / 0.16);
}

.kb-sidebar__footer {
  border-top-color: var(--line);
  color: var(--muted);
}

.kb-sidebar__footer a {
  color: var(--accent-ink);
}

.kb-topbar {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: oklch(0.998 0.002 92 / 0.86);
  box-shadow: 0 12px 36px oklch(0.18 0.012 250 / 0.045);
}

.kb-hero {
  min-height: 420px;
  align-items: center;
  padding: clamp(42px, 5vw, 86px) clamp(22px, 4vw, 70px) 42px;
  background:
    radial-gradient(circle at 12% 18%, oklch(0.93 0.062 78 / 0.42), transparent 30%),
    radial-gradient(circle at 82% 16%, oklch(0.91 0.025 250 / 0.38), transparent 26%),
    linear-gradient(135deg, oklch(1 0 0 / 0.97), oklch(0.965 0.009 92 / 0.94));
}

.hero-logo-lockup {
  width: fit-content;
  max-width: 100%;
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-logo-lockup img {
  width: min(250px, 76vw);
  height: auto;
}

.hero-logo-lockup span {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid oklch(0.84 0.07 76 / 0.45);
  border-radius: 999px;
  background: oklch(0.98 0.035 82 / 0.84);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kb-hero > div > .kb-kicker {
  display: none;
}

.kb-hero h1 {
  max-width: 720px;
  font-size: clamp(44px, 5.2vw, 76px);
}

.kb-hero p {
  max-width: 740px;
  font-size: 18px;
}

.kb-article,
.article-toc__inner {
  border: 1px solid oklch(0.87 0.012 92);
  background: oklch(1 0 0 / 0.88);
  box-shadow: var(--shadow-soft);
}

.kb-primary {
  background: oklch(0.14 0.014 250);
}

.kb-secondary {
  background: oklch(1 0 0 / 0.9);
}

.kb-layout {
  padding: 34px clamp(22px, 4vw, 70px) 78px;
}

.kb-article {
  border-radius: 20px;
}

.article-head {
  padding-bottom: 34px;
}

.article-head h1 {
  font-size: clamp(38px, 4.2vw, 60px);
}

.article-template div,
.portal-quick-grid button,
.portal-screenshot-grid button,
.collection-card,
.hub-panel,
.hub-article-list button,
.hub-sequence button,
.article-footer,
.article-relations {
  border-color: oklch(0.87 0.012 92);
  background: linear-gradient(180deg, oklch(1 0 0), oklch(0.975 0.006 92));
  box-shadow: 0 16px 46px oklch(0.18 0.012 250 / 0.055);
}

.portal-quick-grid button {
  min-height: 184px;
}

.portal-screenshot-grid img,
.doc-image img {
  filter: saturate(1.02) contrast(1.01);
}

.doc-image {
  border-color: oklch(0.84 0.012 92);
  box-shadow: 0 20px 58px oklch(0.18 0.012 250 / 0.075);
}

.doc-image figcaption,
.portal-screenshot-grid span {
  background: oklch(1 0 0 / 0.86);
}

@media (max-width: 760px) {
  :root {
    --sidebar: min(88vw, 330px);
  }

  .kb-sidebar {
    background: oklch(0.995 0.002 92);
  }

  .doc-image {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .kb-brand__logo {
    width: 180px;
  }

  .kb-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 30px 16px 24px;
  }

  .hero-logo-lockup {
    margin-bottom: 18px;
  }

  .hero-logo-lockup img {
    width: min(220px, 78vw);
  }

  .kb-hero h1 {
    font-size: clamp(36px, 11vw, 48px);
    line-height: 1.05;
    word-break: normal;
    overflow-wrap: normal;
  }

  .kb-hero p {
    font-size: 15.5px;
    word-break: normal;
    overflow-wrap: break-word;
  }
}

/* Commercial knowledge-base polish inspired by mature product docs layouts. */
:root {
  --bg: oklch(0.982 0.006 85);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.967 0.007 85);
  --surface-3: oklch(0.93 0.01 85);
  --surface-raised: oklch(0.997 0.002 85);
  --ink: oklch(0.17 0.014 255);
  --muted: oklch(0.43 0.018 255);
  --soft: oklch(0.62 0.016 255);
  --line: oklch(0.88 0.011 85);
  --accent: oklch(0.74 0.16 78);
  --accent-ink: oklch(0.48 0.13 70);
  --sidebar: 314px;
  --radius: 10px;
  --shadow-soft: 0 24px 70px oklch(0.18 0.012 255 / 0.075);
}

body {
  background:
    linear-gradient(90deg, oklch(0.82 0.01 85 / 0.18) 1px, transparent 1px),
    linear-gradient(180deg, oklch(0.82 0.01 85 / 0.18) 1px, transparent 1px),
    radial-gradient(circle at 18% 6%, oklch(0.91 0.055 82 / 0.46), transparent 24%),
    var(--bg);
  background-size: 26px 26px, 26px 26px, auto, auto;
}

.kb-sidebar {
  padding: 22px 18px;
  border-right: 0;
  background:
    linear-gradient(180deg, oklch(0.145 0.014 255) 0%, oklch(0.105 0.012 255) 100%);
  color: oklch(0.98 0.004 85);
  box-shadow: inset -1px 0 0 oklch(1 0 0 / 0.08);
}

.kb-brand {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 0 2px 22px;
  border-bottom-color: oklch(1 0 0 / 0.12);
}

.kb-brand::before {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: oklch(0.12 0.01 255);
  font-size: 21px;
  font-weight: 950;
  content: "A";
}

.kb-brand__logo {
  display: none;
}

.kb-brand strong {
  color: oklch(1 0 0);
  font-size: 17px;
}

.kb-brand small {
  color: oklch(0.82 0.012 85);
  font-size: 12px;
}

.kb-search {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 8px 0 10px;
  background: linear-gradient(180deg, oklch(0.145 0.014 255) 65%, oklch(0.145 0.014 255 / 0));
}

.kb-search span {
  color: oklch(0.74 0.012 85);
}

.kb-search input {
  min-height: 46px;
  border-color: oklch(1 0 0 / 0.1);
  background: oklch(1 0 0 / 0.075);
  color: oklch(1 0 0);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08);
}

.kb-search input::placeholder {
  color: oklch(0.77 0.012 85);
}

.kb-search input:focus {
  border-color: var(--accent);
  background: oklch(1 0 0 / 0.12);
  box-shadow: 0 0 0 3px oklch(0.74 0.16 78 / 0.22);
}

.kb-nav {
  gap: 8px;
}

.kb-nav-group,
.kb-nav-group[open] {
  border: 0;
}

.kb-nav-group summary {
  min-height: 54px;
  padding: 10px 10px 10px 12px;
  color: oklch(0.97 0.005 85);
}

.kb-nav-group summary:hover {
  background: oklch(1 0 0 / 0.07);
}

.kb-nav-group summary strong {
  color: oklch(1 0 0);
  font-size: 13.5px;
}

.kb-nav-group summary small {
  color: oklch(0.72 0.012 85);
}

.kb-nav-group summary em {
  border-color: oklch(1 0 0 / 0.12);
  background: oklch(1 0 0 / 0.08);
  color: oklch(0.88 0.01 85);
}

.kb-nav-list {
  gap: 4px;
  margin: 2px 0 8px 11px;
  padding: 4px 0 6px 13px;
  border-left-color: oklch(1 0 0 / 0.12);
}

.kb-nav button {
  min-height: 36px;
  padding: 7px 10px 7px 12px;
  border-radius: 9px;
  color: oklch(0.79 0.012 85);
}

.kb-nav button::before {
  content: none;
}

.kb-nav button:hover {
  border-color: oklch(1 0 0 / 0.09);
  background: oklch(1 0 0 / 0.075);
  color: oklch(1 0 0);
}

.kb-nav button.is-active {
  border-color: oklch(0.78 0.14 78 / 0.35);
  background: linear-gradient(135deg, oklch(0.97 0.025 82), oklch(0.91 0.06 78));
  color: oklch(0.17 0.014 255);
  box-shadow: 0 10px 28px oklch(0 0 0 / 0.18);
}

.kb-sidebar__footer {
  border-top-color: oklch(1 0 0 / 0.12);
  color: oklch(0.72 0.012 85);
}

.kb-sidebar__footer a {
  color: oklch(0.91 0.08 78);
}

.kb-content {
  min-height: 100vh;
}

.kb-topbar {
  min-height: 76px;
  margin: 0;
  border-bottom: 1px solid oklch(0.87 0.01 85 / 0.75);
  background: oklch(0.99 0.003 85 / 0.82);
  box-shadow: 0 10px 28px oklch(0.18 0.012 255 / 0.045);
}

.kb-topbar .kb-search {
  position: relative;
  top: auto;
  z-index: 1;
  flex: 1 1 min(54vw, 760px);
  max-width: 820px;
  min-width: 280px;
  margin-inline: auto;
  padding: 0;
  gap: 0;
  background: transparent !important;
}

.kb-topbar .kb-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.kb-topbar .kb-search input {
  min-height: 44px;
  padding-inline: 18px;
  border-color: oklch(0.87 0.012 85) !important;
  border-radius: 999px;
  background: linear-gradient(180deg, oklch(1 0 0 / 0.98), oklch(0.986 0.004 90 / 0.96)) !important;
  color: var(--ink) !important;
  box-shadow: 0 12px 32px oklch(0.18 0.012 255 / 0.055);
}

.kb-topbar .kb-search input::placeholder {
  color: var(--soft) !important;
}

.kb-topbar .kb-search input:focus {
  border-color: var(--accent) !important;
  background: var(--surface) !important;
  box-shadow:
    0 0 0 4px oklch(0.84 0.08 78 / 0.24),
    0 14px 34px oklch(0.18 0.012 255 / 0.07);
}

.kb-path {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 32px oklch(0.18 0.012 255 / 0.045);
}

.kb-actions a,
.kb-copy,
.kb-menu {
  min-height: 42px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 8px 24px oklch(0.18 0.012 255 / 0.045);
}

.kb-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  grid-template-columns: minmax(0, 980px);
  padding: clamp(38px, 5.2vw, 78px) clamp(20px, 4vw, 64px) 34px;
  border-bottom: 0;
  background:
    radial-gradient(circle at 78% 18%, oklch(0.88 0.07 78 / 0.4), transparent 24%),
    linear-gradient(135deg, oklch(1 0 0 / 0.96), oklch(0.965 0.012 85 / 0.94));
}

.kb-hero > * {
  position: relative;
  z-index: 1;
}

.kb-kicker {
  color: var(--accent-ink);
  text-transform: uppercase;
}

.kb-hero h1,
.article-head h1 {
  letter-spacing: 0;
}

.kb-hero p,
.article-head p {
  max-width: 76ch;
  color: var(--muted);
}

.kb-primary,
.kb-secondary,
.portal-quick-grid button,
.portal-screenshot-grid button,
.collection-links button,
.task-links button,
.hub-actions button,
.hub-article-list button,
.hub-sequence button,
.article-relations button {
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.kb-layout {
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 28px;
  padding: 32px clamp(20px, 4vw, 64px) 72px;
}

.kb-article {
  max-width: 1100px;
  border-radius: 18px;
  background: oklch(1 0 0 / 0.94);
  box-shadow: 0 22px 70px oklch(0.18 0.012 255 / 0.075);
}

.article-head {
  position: relative;
}

.article-tools span {
  border: 1px solid var(--line);
  background: oklch(0.975 0.005 85);
}

.article-tools span:first-child {
  background: oklch(0.16 0.014 255);
}

.article-template div,
.hub-panel,
.hub-article-list button,
.hub-sequence button,
.collection-card,
.article-footer,
.article-relations,
.table-wrap,
.doc-image {
  border-radius: 14px;
}

.article-section {
  padding-top: 42px;
}

.article-section h2 {
  letter-spacing: 0;
}

.article-section p,
.article-section li {
  font-size: 16px;
}

.doc-image {
  position: relative;
  margin-top: 20px;
  border-color: oklch(0.84 0.012 85);
  background: oklch(0.98 0.004 85);
  box-shadow: 0 16px 46px oklch(0.18 0.012 255 / 0.065);
}

.doc-image::before {
  display: block;
  height: 30px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16px 15px, oklch(0.7 0.18 30) 0 4px, transparent 4.5px),
    radial-gradient(circle at 32px 15px, oklch(0.78 0.15 85) 0 4px, transparent 4.5px),
    radial-gradient(circle at 48px 15px, oklch(0.68 0.15 150) 0 4px, transparent 4.5px),
    linear-gradient(180deg, oklch(0.988 0.003 85), oklch(0.96 0.006 85));
  content: "";
}

.doc-image img {
  max-height: min(1040px, 82vh);
  object-fit: contain;
}

@media (min-width: 1600px) {
  .kb-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 34px;
  }

  .kb-article {
    max-width: 1480px;
  }

  .article-section > p,
  .article-section > ul,
  .article-section > ol,
  .article-section > .check-list,
  .article-section > .number-list {
    max-width: 940px;
  }

  .doc-image {
    margin-top: 24px;
  }
}

.portal-head {
  max-width: 780px;
}

.portal-head span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.portal-head h2 {
  margin-bottom: 10px;
}

.portal-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.portal-quick-grid button {
  min-height: 176px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 12%, oklch(0.9 0.07 78 / 0.42), transparent 36%),
    linear-gradient(180deg, oklch(1 0 0), oklch(0.975 0.006 85));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 42px oklch(0.18 0.012 255 / 0.045);
}

.portal-quick-grid button:hover,
.portal-screenshot-grid button:hover {
  border-color: oklch(0.78 0.14 78);
  transform: translateY(-2px);
  box-shadow: 0 18px 54px oklch(0.18 0.012 255 / 0.09);
}

.portal-quick-grid small {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: oklch(0.93 0.055 82);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 950;
}

.portal-quick-grid strong {
  font-size: 18px;
}

.portal-quick-grid span {
  color: var(--muted);
  line-height: 1.58;
}

.portal-screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.portal-screenshot-grid button {
  overflow: hidden;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 42px oklch(0.18 0.012 255 / 0.045);
}

.portal-screenshot-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
  background: var(--surface-2);
}

.portal-screenshot-grid span {
  padding: 13px 14px 15px;
  font-weight: 900;
}

.article-toc__inner {
  border-radius: 16px;
  background: oklch(1 0 0 / 0.82);
  box-shadow: 0 14px 44px oklch(0.18 0.012 255 / 0.055);
  backdrop-filter: blur(18px);
}

#article-toc a {
  border-radius: 9px;
}

#article-toc a:hover {
  background: oklch(0.96 0.026 82);
  color: var(--ink);
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 292px;
  }

  .kb-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-toc {
    display: none;
  }

  .portal-quick-grid,
  .portal-screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .kb-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "menu actions"
      "search search";
    align-items: center;
    gap: 10px 12px;
    min-height: auto;
    padding: 10px 14px 12px;
  }

  .kb-menu {
    grid-area: menu;
  }

  .kb-actions {
    grid-area: actions;
    justify-self: end;
  }

  .kb-topbar .kb-search {
    grid-area: search;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .kb-topbar .kb-search input {
    min-height: 40px;
    padding-inline: 15px;
  }

  .kb-sidebar {
    border-right: 1px solid oklch(1 0 0 / 0.08);
  }

  .kb-brand {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .kb-brand::before {
    width: 44px;
    height: 44px;
  }

  .kb-path {
    display: none;
  }

  .kb-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 16px 22px;
  }

  .kb-hero h1,
  .article-head h1 {
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1.06;
    overflow-wrap: normal;
    word-break: normal;
  }

  .kb-hero p,
  .article-head p {
    font-size: 15.5px;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .portal-quick-grid,
  .portal-screenshot-grid {
    grid-template-columns: 1fr;
  }

  .portal-quick-grid button {
    min-height: 144px;
  }

  .doc-image::before {
    height: 24px;
  }
}

.kb-hero h1,
.article-head h1,
.article-section h2,
.article-section h3,
.collection-card strong,
.portal-quick-grid strong {
  letter-spacing: 0;
}

.kb-article[data-article="docs-home"] .article-template {
  width: min(100%, 780px) !important;
  max-width: 780px !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 14px !important;
}

.kb-article[data-article="docs-home"] .article-template div {
  min-height: 112px !important;
}

.kb-article[data-article="docs-home"] .article-template strong {
  font-size: 15px !important;
  line-height: 1.55 !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 760px) {
  .kb-article[data-article="docs-home"] .article-template {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .flow-demo__track span {
    animation: none !important;
  }
}

/* Multilingual language selector */
.kb-actions::after {
  display: none !important;
  content: none !important;
}

.kb-language-menu {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

.kb-language-trigger {
  min-width: 132px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid oklch(0.86 0.036 258);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.92);
  box-shadow: 0 12px 28px oklch(0.18 0.02 255 / 0.07);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.kb-language-trigger::after {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  opacity: 0.68;
}

.kb-language-trigger__icon {
  width: 22px;
  height: 16px;
  flex: 0 0 auto;
}

.kb-language-trigger:hover,
.kb-language-menu.is-open .kb-language-trigger {
  border-color: var(--accent);
  background: oklch(0.985 0.012 255);
  color: var(--accent-ink);
}

.kb-language-trigger:focus-visible,
.kb-language-list button:focus-visible,
.kb-language-select:focus-visible {
  outline: 3px solid oklch(0.70 0.19 258 / 0.28);
  outline-offset: 3px;
}

.kb-language-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: 214px;
  padding: 8px;
  border: 1px solid oklch(0.86 0.036 258);
  border-radius: 16px;
  background: oklch(1 0 0 / 0.98);
  box-shadow: 0 24px 70px oklch(0.18 0.03 255 / 0.16);
  backdrop-filter: blur(16px);
}

.kb-language-list[hidden] {
  display: none !important;
}

.kb-language-list button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.kb-language-list button::before,
.kb-language-flag {
  width: 22px;
  height: 16px;
  flex: 0 0 22px;
  border: 1px solid oklch(0.88 0.018 255);
  border-radius: 5px;
  background: oklch(0.96 0.01 255);
  box-shadow:
    inset 0 0 0 1px oklch(1 0 0 / 0.24),
    0 2px 5px oklch(0.18 0.02 255 / 0.08);
  content: "";
  overflow: hidden;
}

.kb-language-list button::before {
  display: inline-block;
}

.kb-language-list button[data-language-flag="cn"]::before,
.kb-language-flag[data-language-flag="cn"] {
  border-color: oklch(0.70 0.18 28);
  background:
    radial-gradient(circle at 31% 34%, #ffd34d 0 12%, transparent 13%),
    linear-gradient(#de2910 0 100%);
}

.kb-language-list button[data-language-flag="us"]::before,
.kb-language-flag[data-language-flag="us"] {
  background:
    linear-gradient(90deg, #3c3b6e 0 42%, transparent 42%),
    repeating-linear-gradient(to bottom, #b22234 0 7.7%, #fff 7.7% 15.4%);
}

.kb-language-list button[data-language-flag="es"]::before,
.kb-language-flag[data-language-flag="es"] {
  background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.kb-language-list button[data-language-flag="br"]::before,
.kb-language-flag[data-language-flag="br"] {
  background:
    radial-gradient(circle at 50% 50%, #1f4aa8 0 15%, transparent 16%),
    linear-gradient(35deg, transparent 27%, #ffdf00 28% 50%, transparent 51%),
    linear-gradient(145deg, transparent 27%, #ffdf00 28% 50%, transparent 51%),
    linear-gradient(#229e45 0 100%);
}

.kb-language-list button[data-language-flag="ru"]::before,
.kb-language-flag[data-language-flag="ru"] {
  background: linear-gradient(to bottom, #fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66% 100%);
}

.kb-language-list button[data-language-flag="vn"]::before,
.kb-language-flag[data-language-flag="vn"] {
  border-color: oklch(0.66 0.19 28);
  background:
    radial-gradient(circle at 50% 50%, #ffdd00 0 13%, transparent 14%),
    linear-gradient(#da251d 0 100%);
}

.kb-language-list button[data-language-flag="id"]::before,
.kb-language-flag[data-language-flag="id"] {
  background: linear-gradient(to bottom, #ce1126 0 50%, #fff 50% 100%);
}

.kb-language-list button:hover,
.kb-language-list button.is-active {
  background: oklch(0.95 0.035 258);
  color: var(--accent-ink);
}

.kb-language-list button.is-active::after {
  width: 7px;
  height: 12px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.kb-language-select-wrap {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.kb-language-select {
  width: 100%;
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid oklch(0.86 0.036 258);
  border-radius: 12px;
  background: oklch(1 0 0);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.kb-sidebar__footer .kb-language-select-wrap--footer {
  display: grid;
}

.kb-sidebar__footer::before {
  display: none !important;
  content: none !important;
}

:root .article-toc__inner::after {
  content: var(--kb-toc-help, "Not sure where to start?\A Read by workflow first, then jump into the matching role guide.") !important;
}

@media (max-width: 760px) {
  .kb-language-trigger {
    min-width: 0;
    max-width: 156px;
    padding-inline: 12px;
  }

  .kb-language-trigger [data-language-current] {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kb-language-list {
    right: 0;
    width: min(220px, calc(100vw - 28px));
  }
}

.kb-website-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid oklch(0.84 0.04 258);
  border-radius: 999px;
  background: oklch(1 0 0 / 0.92);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 26px oklch(0.18 0.012 255 / 0.055);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.kb-website-home::before {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: currentColor;
  content: "";
  -webkit-mask: var(--i-home) center / contain no-repeat;
  mask: var(--i-home) center / contain no-repeat;
}

.kb-website-home:hover,
.kb-website-home:focus-visible {
  border-color: oklch(0.64 0.18 258);
  background: oklch(0.97 0.025 258);
  color: var(--accent);
  box-shadow: 0 14px 30px oklch(0.18 0.012 255 / 0.08);
  transform: translateY(-1px);
}

.kb-website-home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .kb-website-home {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .kb-website-home span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
