/* Knowledge Base page */
.kb-hero { padding: clamp(36px, 5vw, 72px) 0 0; }
.kb-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.kb-head h1 { font-size: clamp(2.6rem, 5.2vw, 4.9rem); max-width: 13ch; }
.kb-head-side .lede { margin-bottom: 26px; font-size: clamp(1.02rem, 1.4vw, 1.2rem); }
.kb-track { height: 380vh; margin-top: clamp(20px, 3vw, 36px); }
.kb-sticky { position: sticky; top: calc(var(--nav-h) + 12px); height: calc(100dvh - var(--nav-h) - 24px); max-height: 680px; }
.kb-sticky-in { height: 100%; display: flex; flex-direction: column; gap: 14px; }
.kb-stage { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; border-radius: var(--r-lg); overflow: hidden; }
.kb-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kb-chip { font: inherit; font-weight: 600; font-size: .95rem; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.kb-chip:hover { border-color: var(--ink); color: var(--ink); }
.kb-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.kb-hint { margin-left: auto; font-size: .9rem; color: var(--muted); }

.stage3d.wide.kb-wide { aspect-ratio: 4 / 3; max-height: min(640px, calc(100dvh - var(--nav-h) - 64px)); border-radius: var(--r-lg); overflow: hidden; }
.kb-sec-flow .row { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); padding: 0; }

/* filterable library card */
.kb-find { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.kb-find-copy p { margin-top: 18px; color: var(--ink-2); font-size: 1.12rem; max-width: 42ch; }
.kb-lib { perspective: 1600px; }
.kb-lib-tilt { transform: rotateY(7deg) rotateX(3deg); transform-style: preserve-3d; will-change: transform; }
.kb-lib .ui { box-shadow: 0 50px 80px -40px rgba(14, 16, 32, .35); }
.kb-lib-filters { display: grid; gap: 10px; padding: 16px 18px 6px; }
.kb-lib-filters > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-lib-filters span { width: 64px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.kb-f { font: inherit; font-size: .84rem; font-weight: 600; min-height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.kb-f:hover { border-color: var(--brand); }
.kb-f[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.kb-lib-scroll { overflow-x: auto; }
.kb-tbl { min-width: 540px; }
.kb-tbl td { white-space: nowrap; }
.kb-tbl tr { transition: opacity .3s; }
.kb-sort { font: inherit; font-weight: 500; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.kb-sort:hover, .kb-sort[aria-pressed="true"] { color: var(--ink); }
.kb-sort[data-dir="1"]::after { content: " \2191"; } .kb-sort[data-dir="-1"]::after { content: " \2193"; }
.kb-star { color: var(--accent); margin-right: 8px; }
.kb-lib-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); min-height: 52px; }
.kb-clear { font: inherit; font-size: .86rem; font-weight: 600; color: var(--brand); background: none; border: 0; cursor: pointer; padding: 4px 8px; }

.kb-with { padding: clamp(56px, 7vw, 96px) 0 0; }
.kb-with .wrap { border-top: 1px solid var(--line); padding-top: 28px; }
.kb-with p { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: baseline; color: var(--ink-2); }
.kb-with strong { font-weight: 500; max-width: 38ch; }
.kb-with-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.kb-with-links a { font-weight: 600; color: var(--brand); text-decoration: none; border-bottom: 1.5px solid transparent; }
.kb-with-links a:hover { border-color: currentColor; }

@media (max-width: 980px) {
  .kb-head { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .kb-head h1 { max-width: 14ch; }
  .kb-sec-flow .row, .kb-find { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .kb-lib { min-width: 0; }
  .stage3d.wide.kb-wide { aspect-ratio: 1 / 1; }
  .kb-track { height: 340vh; }
  .kb-hint { display: none; }
  .kb-lib-tilt { transform: none; }
}
@media (max-width: 560px) {
  .kb-chip { font-size: .86rem; padding: 0 14px; min-height: 40px; }
  .kb-chips { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .kb-track { height: auto; }
  .kb-sticky { position: static; height: 640px; }
  .kb-hint { display: none; }
}

/* no tinted bands behind the 3D scenes */
.section.soft.kb-sec-find { background: #fff; }
