/* The knowledge centre and the blog: pages the engine renders (engine/desk_engine/platform/knowledge_pages.py)
   on top of styles.css. Only what those pages add is here; everything else is the site's own. */

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

/* the search box in the page head */
.kb-search { margin-top: 24px; display: flex; gap: 10px; max-width: 560px; }
.kb-search input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--surface); font: 16px/1.4 var(--font); color: var(--ink); }
.kb-search input:hover { border-color: #cbd5e1; }
.kb-search input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* the hub: sections of cards */
.kb-main { padding: 40px 0 80px; display: grid; gap: 44px; }
.kb-section { padding: 0; }
.kb-section h2 { font-size: 22px; max-width: none; }
.kb-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.kb-section-head a { font-size: 15px; color: var(--blue); text-decoration: none; }
.kb-section-head a:hover { text-decoration: underline; }
.kb-grid { margin-top: 20px; }
.kb-card { display: block; text-decoration: none; color: inherit; padding: 0; overflow: hidden; }
.kb-card:hover { border-color: #cbd5e1; }
.kb-card > * { padding-inline: 22px; }
.kb-card .kb-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; padding: 0; display: block; border-bottom: 1px solid var(--rule); }
.kb-card .kb-kind { display: block; margin-top: 18px; font-size: 13.5px; color: var(--blue); font-weight: 560; }
.kb-card h3 { margin-top: 6px; font-size: 17.5px; font-weight: 600; }
.kb-card p { margin-top: 6px; margin-bottom: 20px; color: var(--ink-2); font-size: 15px; }
.kb-cat { display: block; text-decoration: none; color: inherit; position: relative; }
.kb-cat:hover { border-color: #cbd5e1; }
.kb-cat h3 { font-size: 17.5px; font-weight: 600; }
.kb-cat p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.kb-cat .kb-count { position: absolute; top: 22px; inset-inline-end: 22px; font-family: var(--figures); font-variant-numeric: tabular-nums;
  color: var(--ink-2); font-size: 14px; }
.kb-list { margin-top: 16px; padding: 0; list-style: none; display: grid; gap: 2px; }
.kb-list li { border-top: 1px solid var(--rule); }
.kb-list li:first-child { border-top: 0; }
.kb-list a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; }
.kb-list a:hover { color: var(--blue); }

/* one page */
.kb-crumbs { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.kb-crumbs a { color: inherit; text-decoration: none; }
.kb-crumbs a:hover { color: var(--ink); }
.kb-meta { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.kb-hero-cover { margin-top: 24px; width: 100%; max-width: 820px; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); }
.kb-other { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.doc article figure { margin: 18px 0 0; }
.doc article figure img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.doc article figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.doc article table { display: block; overflow-x: auto; }
.kb-steps { list-style: none; padding: 0; margin-top: 16px; }
.kb-steps .step p { max-width: none; }
.kb-steps .step > div { min-width: 0; }
.kb-steps .step figure { margin-top: 14px; }
.kb-faqs { margin-top: 16px; display: grid; gap: 2px; }
.kb-faqs details { background: var(--surface); border: 1px solid var(--rule); padding: 0 20px; }
.kb-faqs details:first-child { border-start-start-radius: var(--radius); border-start-end-radius: var(--radius); }
.kb-faqs details:last-child { border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.kb-faqs details + details { border-top: 0; }
.kb-faqs summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.kb-faqs summary::-webkit-details-marker { display: none; }
.kb-faqs summary::after { content: "+"; color: var(--ink-2); font-family: var(--figures); }
.kb-faqs details[open] summary::after { content: "−"; }
.kb-faqs details > div { padding-bottom: 18px; }
.kb-faqs details > div > p:first-child { margin-top: 0; }
.kb-related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
.kb-related h2 { font-size: 20px; margin-top: 0; }

/* the blog's category chips and pager */
.kb-chips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.kb-chip { padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  text-decoration: none; font-size: 14.5px; }
.kb-chip:hover { border-color: #cbd5e1; color: var(--ink); }
.kb-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.kb-pager { display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--ink-2); font-size: 14.5px; }

/* search results */
.kb-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.kb-results li { background: var(--surface); border: 1px solid var(--rule); }
.kb-results li + li { border-top: 0; }
.kb-results li:first-child { border-start-start-radius: var(--radius); border-start-end-radius: var(--radius); }
.kb-results li:last-child { border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); }
.kb-results a { display: block; padding: 18px 22px; text-decoration: none; color: inherit; }
.kb-results a:hover { background: var(--paper); }
.kb-results .kb-kind { display: block; font-size: 13px; color: var(--blue); font-weight: 560; }
.kb-results strong { display: block; margin-top: 4px; font-size: 17px; font-weight: 600; }
.kb-results p { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.kb-results mark { background: #FEF3C7; color: inherit; padding: 0 2px; border-radius: 3px; }

/* the owner's preview, in an iframe inside the Owner Control Center */
.kb-preview-banner { background: #FEF3C7; color: #92400E; text-align: center; font-size: 14px; padding: 8px 16px; font-weight: 560; }

@media (prefers-reduced-motion: no-preference) {
  .kb-card, .kb-cat, .kb-chip { transition: border-color .15s ease; }
}
