:root {
  --pano-brand: #10776E;
  --pano-text: #15212B;
  --pano-text-muted: #5B6B78;
  --pano-bg: #F4F5F6;
  --pano-border: #E3E6E8;
  --pano-link: #15212B;
  --pano-radius: 6px;
  --pano-max: 1240px;
  --pano-pad: 40px;
  --primaryColor: var(--pano-brand);
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-400: #a3a3a3;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-900: #171717;
  --neutral-base: #ffffff;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --slate-400: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  color: var(--pano-text);
  background: var(--pano-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pano-link); }

/* ---------- Header / Navbar ---------- */
.kb-header {
  position: relative;
  z-index: 5;
  padding: 24px var(--pano-pad);
}
.kb-header-inner {
  max-width: var(--pano-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.kb-header-logo img { height: 75px; width: auto; display: block; }
.kb-header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}
.kb-header-link,
.kb-header-nav a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  opacity: 0.95;
}
.kb-header-link:hover { opacity: 1; text-decoration: underline; }

/* ---------- Auth widget (Login button + dropdown) ---------- */
#kb-auth { display: flex; align-items: center; }
.kb-auth-wrapper { position: relative; }
.kb-auth-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--pano-radius);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.15s;
}
.kb-auth-button:hover { background: rgba(255, 255, 255, 0.12); }
.kb-auth-chevron { width: 12px; height: 12px; flex-shrink: 0; }
.kb-auth-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.kb-auth-logout { gap: 8px; }
.kb-auth-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  padding: 4px 0;
  background: #FFFFFF;
  border-radius: var(--pano-radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  z-index: 100;
}
.kb-auth-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--pano-text);
  text-align: left;
  cursor: pointer;
}
.kb-auth-dropdown-item:hover { background: var(--pano-bg); }

/* ---------- Hero ---------- */
.pano-hero {
  background: var(--pano-brand);
  color: #FFFFFF;
  padding-bottom: 64px;
}
.pano-hero-content {
  max-width: var(--pano-max);
  margin: 0 auto;
  padding: 24px var(--pano-pad) 0;
}
.pano-hero-title {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 700;
  margin: 32px 0 24px;
  color: #FFFFFF;
}

/* ---------- Search (Pylon mounts input + svg icon into #kb-search) ---------- */
#kb-search {
  max-width: 720px;
  margin: 0 0 24px;
  position: relative;
}
#kb-search > * {
  width: 100%;
  max-width: 720px;
  position: relative;
}
#kb-search svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pano-text-muted);
  pointer-events: none;
  z-index: 1;
}
#kb-search input,
#kb-search [role="combobox"] input,
#kb-search .kb-search-input {
  width: 100%;
  height: 56px;
  border-radius: var(--pano-radius);
  border: 1px solid transparent;
  background: #FFFFFF;
  padding: 0 16px 0 48px;
  font-size: 16px;
  color: var(--pano-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  outline: none;
}
#kb-search input::placeholder { color: var(--pano-text-muted); }

/* Popular searches row */
.pano-popular {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 720px;
}
.pano-popular .label {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 600;
  margin-right: 6px;
}
.pano-popular a {
  background: rgba(255,255,255,0.18);
  color: #FFFFFF;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  transition: background 120ms ease;
}
.pano-popular a:hover { background: rgba(255,255,255,0.28); }

/* ---------- Tab bar ---------- */
.pano-tabs {
  background: #FFFFFF;
  border-bottom: 1px solid var(--pano-border);
  padding: 0 var(--pano-pad);
  display: flex;
  gap: 32px;
}
.pano-tabs-inner {
  max-width: var(--pano-max);
  margin: 0 auto;
  display: flex;
  gap: 32px;
  width: 100%;
}
.pano-tab {
  display: inline-block;
  padding: 18px 0;
  color: var(--pano-text-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.pano-tab.is-active {
  color: var(--pano-text);
  border-bottom-color: var(--pano-brand);
  font-weight: 600;
}
.pano-tab:hover { color: var(--pano-text); }

/* ---------- Body / topics grid ---------- */
.pano-body {
  max-width: var(--pano-max);
  margin: 0 auto;
  padding: 56px var(--pano-pad) 80px;
}
.pano-section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--pano-text);
}
.kb-collections-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 56px;
}
@media (max-width: 960px) { .kb-collections-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kb-collections-grid { grid-template-columns: 1fr; } }

.kb-collection-card {
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
  color: var(--pano-text);
}
.kb-collection-card-icon {
  font-size: 22px;
  vertical-align: middle;
}
.kb-collection-card-icon:not(:empty) {
  display: inline-block;
  margin-right: 8px;
}
.kb-collection-card-icon img,
.kb-collection-custom-icon { width: 22px; height: 22px; vertical-align: middle; }
.kb-collection-card-body { display: inline-block; vertical-align: middle; }
.kb-collection-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pano-text);
  display: inline;
}
.kb-collection-card-description { display: none; }
.kb-collection-card-count {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--pano-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Article cards (collection list) ---------- */
.kb-article-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pano-border);
  text-decoration: none;
  color: var(--pano-text);
}
.kb-article-card-icon { color: var(--pano-text-muted); width: 18px; height: 18px; }
.kb-article-card-icon svg { width: 18px; height: 18px; }
.kb-article-card-title { flex: 1; font-size: 15px; }
.kb-article-card-chevron { color: var(--pano-text-muted); }
.kb-article-card:hover .kb-article-card-title { color: var(--pano-brand); }

/* ---------- Collection page ---------- */
.kb-collection-page-content,
.kb-article-page-content {
  max-width: var(--pano-max);
  margin: 0 auto;
  padding: 40px var(--pano-pad) 80px;
  background: #FFFFFF;
}
.kb-breadcrumbs {
  font-size: 13px;
  color: var(--pano-text-muted);
  margin-bottom: 16px;
}
.kb-breadcrumb-link { color: var(--pano-text-muted); text-decoration: none; }
.kb-breadcrumb-link:hover { color: var(--pano-brand); }
.kb-collection-page-title { font-size: 32px; margin: 0 0 8px; }
.kb-collection-page-description { color: var(--pano-text-muted); margin-bottom: 24px; }

/* ---------- Article page ---------- */
.kb-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 56px;
}
@media (max-width: 900px) { .kb-article-layout { grid-template-columns: 1fr; } }
.kb-article-title { font-size: 32px; margin: 0 0 8px; }
.kb-article-meta { color: var(--pano-text-muted); font-size: 13px; margin-bottom: 24px; }
.kb-article-body { font-size: 16px; line-height: 1.65; }
.kb-article-body a { color: var(--pano-brand); }
.kb-article-body img,
.kb-article-body video,
.kb-article-body iframe {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
.kb-related-articles-title,
.kb-related-issues-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pano-text-muted);
  margin-bottom: 12px;
}
.kb-related-article-link { display: block; padding: 6px 0; font-size: 14px; color: var(--pano-text); text-decoration: none; }
.kb-related-article-link:hover { color: var(--pano-brand); }

/* ---------- Footer ---------- */
.kb-footer {
  background: #15212B;
  color: rgba(255,255,255,0.85);
  padding: 56px var(--pano-pad);
  margin-top: 64px;
}
.kb-footer-inner { max-width: var(--pano-max); margin: 0 auto; }
.kb-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.kb-footer-section-title { color: #FFFFFF; font-weight: 700; margin-bottom: 12px; }
.kb-footer-section-link { display: block; color: rgba(255,255,255,0.7); text-decoration: none; padding: 4px 0; font-size: 14px; }
.kb-footer-section-link:hover { color: #FFFFFF; }
.kb-powered-by { color: rgba(255,255,255,0.6); font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Article body content (Pylon RTE) ---------- */
.kb-article-body .ProseMirror { outline: none; }
.kb-article-body .ProseMirror > * { max-width: 100%; margin-block: 0.75rem; }
.kb-article-body .ProseMirror p { margin-block: 0.4rem; line-height: 24px; font-size: 16px; color: var(--neutral-900); }
.kb-article-body .ProseMirror p:first-child { margin-top: 0; }
.kb-article-body .ProseMirror h1 { font-size: 20px; font-weight: 600; line-height: 28px; margin-top: 2rem; margin-bottom: 1rem; color: var(--neutral-900); }
.kb-article-body .ProseMirror h2 { font-size: 18px; font-weight: 600; line-height: 25px; margin-top: 1.75rem; margin-bottom: 1rem; color: var(--neutral-900); }
.kb-article-body .ProseMirror h3 { font-size: 16px; font-weight: 600; line-height: 22px; margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--neutral-900); }
.kb-article-body .ProseMirror a { color: var(--primaryColor); cursor: pointer; text-decoration: none; }
.kb-article-body .ProseMirror a:hover { text-decoration: underline; }
.kb-article-body .ProseMirror img { display: block; height: auto; width: 100%; max-width: 100%; border-radius: 4px; }
.kb-article-body .ProseMirror ol { list-style-type: decimal; margin: 0.75rem 0; padding: 0 2rem; }
.kb-article-body .ProseMirror ul { list-style-type: disc; margin: 0.75rem 0; padding: 0 2rem; }
.kb-article-body .ProseMirror ul li,
.kb-article-body .ProseMirror ol li { margin-top: 0; margin-bottom: 0.5rem; }
.kb-article-body .ProseMirror code { border-radius: 4px; border: 1px solid var(--neutral-200); font-size: 14px; background-color: var(--neutral-100); color: #dc2626; padding: 1px 3px; }
.kb-article-body .ProseMirror pre { overflow-x: auto; white-space: pre; border-radius: 4px; background-color: var(--neutral-100); border: 1px solid var(--neutral-200); font-size: 12px; line-height: 1.5; margin-block: 0.75rem; padding: 0.5rem; }
.kb-article-body .ProseMirror pre code { border: none; background: inherit; padding: 0; font-size: 12px; color: inherit; box-shadow: none; }
.kb-article-body .ProseMirror blockquote[data-type="blockquote"] { border-left: 4px solid var(--neutral-200); padding: 8px 16px; margin-block: 0.75rem; }
.kb-article-body .ProseMirror [data-type="horizontalRule"] { margin: 0.5rem 0; padding: 0.5rem 0; }
.kb-article-body .ProseMirror [data-type="horizontalRule"] hr { border: none; border-top: 1px solid var(--neutral-200); }
.kb-article-body .ProseMirror table { width: 100%; border-collapse: collapse; border-radius: 4px; word-break: break-word; }
.kb-article-body .ProseMirror table td,
.kb-article-body .ProseMirror table th { min-width: 100px; padding: 8px; text-align: left; vertical-align: top; border: 1px solid var(--neutral-200); }
.kb-article-body .ProseMirror table th { font-weight: 600; }

/* Video / iframe embeds — fill the column at 16:9 */
.kb-article-body .ProseMirror iframe,
.kb-article-body .ProseMirror video,
.kb-article-body .kb-video,
.kb-article-body iframe.kb-video,
.kb-article-body-placeholder iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-block: 1.5rem;
}

/* Callout */
.kb-article-body .EditorCallout {
  display: flex;
  gap: 12px;
  border-radius: 8px;
  border: 1px solid var(--neutral-200);
  padding: 16px;
  background-color: var(--neutral-100);
  color: var(--neutral-700);
}
.kb-article-body .EditorCallout[data-color="blue"] { border-color: #bfdbfe; background-color: rgba(219, 234, 254, 0.7); color: #1e3a5f; }
.kb-article-body .EditorCallout[data-color="red"] { border-color: #fecaca; background-color: rgba(254, 226, 226, 0.7); color: #7f1d1d; }
.kb-article-body .EditorCallout[data-color="orange"] { border-color: #fed7aa; background-color: rgba(255, 237, 213, 0.7); color: #7c2d12; }
.kb-article-body .EditorCallout[data-color="yellow"] { border-color: #fde68a; background-color: rgba(254, 249, 195, 0.3); color: #713f12; }
.kb-article-body .EditorCallout[data-color="green"] { border-color: #bbf7d0; background-color: rgba(220, 252, 231, 0.5); color: #14532d; }
.kb-article-body .EditorCallout[data-color="indigo"] { border-color: #c7d2fe; background-color: rgba(224, 231, 255, 0.7); color: #312e81; }
.kb-article-body .EditorCallout[data-color="purple"] { border-color: #e9d5ff; background-color: rgba(243, 232, 255, 0.7); color: #581c87; }
.kb-article-body .EditorCallout[data-color] .EditorCallout-content p,
.kb-article-body .EditorCallout[data-color] .EditorCallout-content blockquote,
.kb-article-body .EditorCallout[data-color] .EditorCallout-content li { color: inherit; }
.kb-article-body .EditorCallout-icon {
  flex-shrink: 0;
  margin-top: 3px;
  display: flex;
  align-items: flex-start;
  width: 18px;
  height: 18px;
}
.kb-article-body .EditorCallout-icon svg { width: 18px; height: 18px; }
.kb-article-body .EditorCallout-content { min-width: 0; flex: 1; }

/* Callout SSR placeholder */
.kb-article-body-placeholder div[data-type="callout"] {
  border-radius: 8px;
  border: 1px solid var(--neutral-200);
  padding: 16px;
  background-color: var(--neutral-100);
  color: var(--neutral-700);
}
.kb-article-body-placeholder div[data-type="callout"][data-color="blue"] { border-color: #bfdbfe; background-color: rgba(219, 234, 254, 0.7); color: #1e3a5f; }
.kb-article-body-placeholder div[data-type="callout"][data-color="red"] { border-color: #fecaca; background-color: rgba(254, 226, 226, 0.7); color: #7f1d1d; }
.kb-article-body-placeholder div[data-type="callout"][data-color="orange"] { border-color: #fed7aa; background-color: rgba(255, 237, 213, 0.7); color: #7c2d12; }
.kb-article-body-placeholder div[data-type="callout"][data-color="yellow"] { border-color: #fde68a; background-color: rgba(254, 249, 195, 0.3); color: #713f12; }
.kb-article-body-placeholder div[data-type="callout"][data-color="green"] { border-color: #bbf7d0; background-color: rgba(220, 252, 231, 0.5); color: #14532d; }
.kb-article-body-placeholder div[data-type="callout"][data-color="indigo"] { border-color: #c7d2fe; background-color: rgba(224, 231, 255, 0.7); color: #312e81; }
.kb-article-body-placeholder div[data-type="callout"][data-color="purple"] { border-color: #e9d5ff; background-color: rgba(243, 232, 255, 0.7); color: #581c87; }

/* Internal Note */
.kb-article-body .ProseMirror div[data-type="internalBlock"],
.kb-article-body-placeholder div[data-type="internalBlock"] {
  padding: 1rem;
  padding-top: 3rem;
  border-radius: 4px;
  position: relative;
  background-color: var(--blue-50);
}
.kb-article-body .ProseMirror div[data-type="internalBlock"]::before,
.kb-article-body-placeholder div[data-type="internalBlock"]::before {
  content: "Internal Note";
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.875rem;
  color: var(--slate-400);
}

/* Accordion */
.kb-article-body .ProseMirror .node-accordion_list > [data-node-view-wrapper] {
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  overflow: hidden;
}
.kb-article-body .ProseMirror .pylon-rte-accordion {
  display: grid;
  grid-template-columns: min-content 1fr;
  align-items: center;
  border-top: 1px solid var(--neutral-200);
  padding: 12px;
}
.kb-article-body .ProseMirror .pylon-rte-accordion:first-child { border-top: none; }
.kb-article-body .ProseMirror .pylon-rte-accordion [data-type="accordion_details"] { display: none; grid-column: 2; }
.kb-article-body .ProseMirror .pylon-rte-accordion[data-open="true"] [data-type="accordion_details"] { display: block; }
.kb-article-body .ProseMirror .pylon-rte-accordion .node-accordion_summary { display: contents; font-weight: 500; }
.kb-article-body .ProseMirror .pylon-rte-accordion .node-accordion_summary > div { display: contents; }
.kb-article-body .ProseMirror .pylon-rte-accordion .node-accordion_summary button {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-right: 4px;
  border-radius: 4px; border: none; background: none; cursor: pointer; flex-shrink: 0;
}
.kb-article-body .ProseMirror .pylon-rte-accordion .node-accordion_summary button:hover { background-color: var(--neutral-100); }
.kb-article-body .ProseMirror .pylon-rte-accordion .node-accordion_summary button > div { transition: 0.2s ease transform; display: flex; align-items: center; justify-content: center; }
.kb-article-body .ProseMirror .pylon-rte-accordion .node-accordion_summary button svg { width: 16px; height: 16px; }
.kb-article-body .ProseMirror .pylon-rte-accordion[data-open="true"] .node-accordion_summary button > div { transform: rotate(90deg); }
.kb-article-body-placeholder div[data-type="accordion_list"] { border: 1px solid var(--neutral-200); border-radius: 8px; margin-block: 0.75rem; }
.kb-article-body-placeholder div[data-type="accordion"] { border-top: 1px solid var(--neutral-200); }
.kb-article-body-placeholder div[data-type="accordion"]:first-child { border-top: none; }
.kb-article-body-placeholder div[data-type="accordion_summary"] { padding: 12px 16px; font-weight: 500; }
.kb-article-body-placeholder div[data-type="accordion_details"] { display: none; }

/* Emoji */
.kb-article-body .ProseMirror span[data-type="emoji"] { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }
.kb-article-body .ProseMirror span[data-type="emoji"] > img { display: inline; width: 1em; vertical-align: text-top; }

/* Resized images */
.kb-article-body .kb-image-wrapper,
.kb-article-body .kb-image,
.kb-article-body .node-imageBlock,
.kb-article-body .node-imageBlock > [data-node-view-wrapper],
.kb-article-body .node-imageBlock button {
  display: block;
  width: fit-content;
  max-width: 100%;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.kb-article-body .kb-image-wrapper[data-align="center"] { margin-left: auto; margin-right: auto; }
.kb-article-body .kb-image-wrapper[data-align="right"] { margin-left: auto; margin-right: 0; }
.kb-article-body .kb-image-wrapper[data-align="left"] { margin-left: 0; margin-right: auto; }

/* ---------- Search results (Pylon island) ---------- */
.kb-search-results-list { display: flex; flex-direction: column; gap: 24px; }
.kb-search-result-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  margin-inline: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pano-border);
}
.kb-search-result-item:hover .kb-search-result-title { color: var(--pano-text); }
.kb-search-result-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  margin-bottom: 4px;
  line-height: calc(1 / 0.75);
}
.kb-search-result-breadcrumbs svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--pano-text-muted); }
.kb-search-result-breadcrumb-segment { display: flex; align-items: center; gap: 4px; }
.kb-search-result-breadcrumb-segment svg { width: 14px; height: 14px; }
.kb-search-result-breadcrumb-link { color: var(--pano-text); text-decoration: none; }
.kb-search-result-breadcrumb-link:hover { text-decoration: underline; }
.kb-search-result-breadcrumb-favicon { width: 14px; height: 14px; flex-shrink: 0; border-radius: 2px; }
.kb-search-result-badge {
  border-radius: 2px;
  background-color: var(--pano-border);
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pano-text);
  line-height: calc(1 / 0.75);
}
.kb-search-result-title { font-size: 18px; font-weight: 500; color: var(--pano-text); transition: color 0.2s ease-in-out; line-height: 1.5; }
.kb-search-result-highlight {
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.kb-search-result-highlight em,
.kb-search-result-highlight mark,
.kb-search-result-highlight .highlight-result { font-style: normal; font-weight: 400; background-color: var(--blue-100); }
.kb-search-no-results { padding: 24px 0; text-align: center; color: var(--pano-text-muted); }

/* ---------- Article feedback (emoji) ---------- */
.kb-feedback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 24px;
  background: var(--neutral-100);
  border-radius: 8px;
}
.kb-feedback-title { font-size: 14px; color: var(--neutral-900); text-align: center; }
.kb-feedback-scores { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.kb-feedback-score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 28px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  padding-top: 2px;
}
.kb-feedback-score:hover,
.kb-feedback-score.selected { background: var(--neutral-200); }
.kb-feedback-form { width: 100%; max-width: 400px; margin-top: 8px; }
.kb-feedback-label { font-size: 13px; color: var(--neutral-600); margin-bottom: 4px; }
.kb-feedback-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 56px;
  outline: none;
}
.kb-feedback-textarea:focus { border-color: var(--neutral-400); }
.kb-feedback-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.kb-feedback-submit {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: var(--primaryColor);
  cursor: pointer;
}
.kb-feedback-submit:hover { opacity: 0.9; }
.kb-feedback-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.kb-feedback-thanks { font-size: 14px; color: var(--neutral-900); text-align: center; }

/* Ask AI synthesized response */

.kb-ask-ai {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-inline: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-200);
}

.kb-ask-ai-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-600);
}

.kb-ask-ai-header svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.kb-ask-ai-body {
  overflow: hidden;
  transition: max-height 0.2s ease-in-out;
}

.kb-ask-ai-body--clamped {
  max-height: 124px;
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.kb-ask-ai-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--neutral-900);
  line-height: 1.5;
  margin-bottom: 4px;
}

.kb-ask-ai-response {
  line-height: 1.5;
  white-space: pre-line;
}

/* Sources chip + popover */

.kb-sources-chip-wrapper {
  display: inline-flex;
  margin-top: -2px;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding-inline: 2px;
}

.kb-sources-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  background: var(--neutral-100);
  color: var(--neutral-600);
  transition: background-color 0.1s ease-in-out;
}

.kb-sources-chip:hover {
  background: var(--neutral-200);
}

.kb-sources-popover {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 50;
  min-width: 400px;
  max-width: 535px;
  background: var(--neutral-0, #fff);
  border: 1px solid var(--neutral-200);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kb-sources-popover-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.1s ease-in-out;
}

.kb-sources-popover-row:hover {
  background: var(--neutral-100);
}

.kb-sources-popover-index {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--neutral-500, #6b7280);
}

.kb-sources-popover-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--neutral-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-sources-popover-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral-500, #6b7280);
}

.kb-sources-popover-domain {
  white-space: nowrap;
}

.kb-sources-popover-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.kb-sources-popover-icon svg {
  width: 16px;
  height: 16px;
}

.kb-sources-popover-favicon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: contain;
}

.kb-ask-ai-feedback {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.kb-ask-ai-feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: none;
  outline: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border-radius: 4px;
  color: var(--neutral-400);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.kb-ask-ai-feedback-btn:hover {
  color: var(--neutral-600);
  background-color: var(--neutral-100);
}

.kb-ask-ai-feedback-btn svg {
  width: 14px;
  height: 14px;
}

.kb-ask-ai-feedback-result {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-900);
}

.kb-ask-ai-feedback-result svg {
  width: 14px;
  height: 14px;
}

.kb-ask-ai-toggle {
  font-size: 14px;
  font-weight: 500;
  color: var(--primaryColor);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.kb-ask-ai-toggle:hover {
  text-decoration: underline;
}