/* =========================================================================
   FAQ + Glossary redesign (faq2.html → /about/faq/, glossary2.html → /glossary/, glossary2-<slug>.html → /glossary/<slug>/).
   Loaded after gable.css + home2.css, only on these pages. Wrapper: .gbl.gbl-home2.kb (+ .kb-faq / .kb-gl / .kb-termpage).
   Prefix: kb-. Markup: tools/kb2.mjs; behaviour: gable/kb2.js; decisions: docs/faq-glossary-redesign.md.
   ========================================================================= */

.kb { --kb-head: 80px; --kb-bar: 0px; --kb-mark: #fff0b3; --kb-read: var(--ink); } /* --kb-read: long-form reading text, same as headings (Dima) */
/* ship: pages 2758 / 7699 and Themer layout 7712 become one BB row holding the shortcode. BB's cached node CSS can be
   stale (the homepage's was), so row, column and module spacing are pinned here. Nothing matches locally. */
body:is(.page-id-2758, .page-id-7699, .single-glossary-term) .fl-builder-content-primary .fl-col { width: 100%; }
body:is(.page-id-2758, .page-id-7699, .single-glossary-term) .fl-builder-content-primary > .fl-row > .fl-row-content-wrap { padding: 0; }
body:is(.page-id-2758, .page-id-7699, .single-glossary-term) .fl-builder-content-primary .fl-module-html > .fl-module-content { margin: 0; }

.kb [hidden] { display: none !important; }
/* anchors and keyboard focus never land under the sticky header (+ the A–Z bar / topic bar) */
.kb :is([id], summary, a, button, input, select) { scroll-margin-top: calc(var(--kb-head) + var(--kb-bar) + 20px); }
.kb mark { background: var(--kb-mark); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: 0 0 0 1px var(--kb-mark); }
.kb :is(a, button, summary, select, input):focus-visible { outline: 3px solid var(--pb-600); outline-offset: 2px; }

/* ---------- hero (the light feature/solutions hero) ---------- */
.kb-hero .hx-hero-card { color: var(--ink); padding: 0; background: linear-gradient(160deg, #f5f9ff 0%, var(--pb-50) 45%, var(--pb-100) 100%); box-shadow: inset 0 0 0 1px var(--pb-100); }
.kb-hero .hx-hero-glow { background: radial-gradient(42% 60% at 82% 8%, rgba(42, 107, 230, .16), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(255, 255, 255, .9), transparent 70%); }
.kb-hero .hx-hero-glow::after { background-image: radial-gradient(rgba(34, 86, 211, .16) 1px, transparent 1px); }
.kb-hero-grid { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 520px); justify-content: space-between; align-items: center; gap: 48px; padding: 64px 64px 64px 72px; }
.kb-hero-grid.is-single { grid-template-columns: minmax(0, 760px); }
.kb-hero-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.gbl.kb .kb-hero .hx-h1 { color: var(--ink); margin-top: 20px; font-size: clamp(38px, 3.4vw, 50px); }
.kb-hero .hx-h1 span { display: inline; color: var(--pb-600); }
.kb-hero .hx-hero-sub { color: var(--body); margin-top: 16px; max-width: 600px; }

.kb-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 15px; font-weight: 600; color: var(--body); }
.kb-crumbs li { display: inline-flex; align-items: center; }
.kb-crumbs li + li::before { content: ""; width: 14px; height: 14px; margin: 0 6px; background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.gbl .kb-crumbs a { display: inline-block; padding: 11px 0; margin: -11px 0; color: var(--pb-700); }
.gbl .kb-crumbs a:hover { color: var(--pb-900); }
.kb-crumbs [aria-current] { color: var(--body); font-weight: 400; }

.kb-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 5px 16px 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--pb-100); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.2; }
.kb-eyebrow svg { width: 18px; height: 18px; fill: currentColor; color: var(--pb-600); flex: none; }
.gbl .kb-eyebrow a { position: relative; color: var(--pb-700); }
/* the term's related money page (SEO S11, CS-19) */
.kb-article .kb-owner { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.6; color: var(--body); }
.gbl .kb-article .kb-owner a { color: var(--pb-700); font-weight: 600; }
.gbl .kb-eyebrow a::before { content: ""; position: absolute; inset: -4px -8px; } /* hit area ≥ 24 px, invisible (SEO S11, P-13) */

/* search field */
.kb-search { position: relative; display: flex; align-items: center; width: 100%; max-width: 640px; margin-top: 32px; }
.kb-search-ico { position: absolute; left: 20px; width: 22px; height: 22px; fill: var(--pb-600); pointer-events: none; }
.gbl .kb-search input[type="search"] { width: 100%; height: 64px; margin: 0; padding: 0 96px 0 56px; border: 1px solid var(--pb-200); border-radius: 18px; background: #fff;
  font: inherit; font-size: 18px; line-height: 1.3; color: var(--ink); box-shadow: 0 24px 48px -32px rgba(24, 50, 140, .55); -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.gbl .kb-search input[type="search"]::placeholder { color: #5f7090; opacity: 1; }
.gbl .kb-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.gbl .kb-search input[type="search"]:focus { outline: none; border-color: var(--pb-600); box-shadow: 0 0 0 4px rgba(42, 107, 230, .18), 0 24px 48px -32px rgba(24, 50, 140, .55); }
.gbl .kb-clear { position: absolute; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--body); }
.gbl .kb-clear:hover { background: var(--pb-50); color: var(--pb-700); }
.kb-clear svg { width: 18px; height: 18px; fill: currentColor; }
.kb-kbd { position: absolute; right: 18px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: #f7f9fc; font: 600 14px/1 inherit; color: var(--body); pointer-events: none; }
.kb-search:focus-within .kb-kbd, .kb-search.has-q .kb-kbd { display: none; }
.kb-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 15px; color: var(--body); }
.kb-try span { margin-right: 2px; }
.gbl .kb-try button { min-height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px var(--pb-100); color: var(--ink); font-size: 15px; transition: box-shadow .2s, color .2s, background .2s; }
.gbl .kb-try button:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--pb-200); color: var(--pb-700); }

/* compact search (term pages) */
.kb-search.is-sm { max-width: 360px; margin: 0; }
.gbl .kb-search.is-sm input[type="search"] { height: 52px; padding: 0 56px 0 48px; border-radius: 14px; font-size: 16px; box-shadow: none; border-color: var(--line); }
/* the compact box's own border/shadow rule outranked :focus, so the term pages' search showed no focus at all */
.gbl .kb-search.is-sm input[type="search"]:focus { border-color: var(--pb-600); box-shadow: 0 0 0 4px rgba(42, 107, 230, .18); }
.kb-search.is-sm .kb-search-ico { left: 16px; width: 20px; height: 20px; }
.gbl .kb-go { position: absolute; right: 6px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--pb-600); color: #fff; }
.gbl .kb-go:hover { background: var(--pb-800); color: #fff; }
.kb-go svg { width: 18px; height: 18px; fill: currentColor; }

/* FAQ hero: the four groups */
.kb-hero-topics ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gbl a.kb-tile { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px 14px; height: 100%; padding: 20px; border-radius: 20px; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px var(--pb-100), 0 30px 60px -44px rgba(24, 50, 140, .5); transition: transform .3s var(--ease), box-shadow .3s; }
.gbl a.kb-tile:hover { transform: translateY(-2px); color: var(--ink); box-shadow: 0 0 0 1px var(--pb-200), 0 30px 60px -36px rgba(24, 50, 140, .55); }
.kb-tile-ico, .kb-group-ico { display: grid; place-items: center; flex: none; border-radius: 14px; background: var(--pb-50); color: var(--pb-700); }
.kb-tile-ico { width: 48px; height: 48px; }
.kb-tile-ico svg { width: 24px; height: 24px; fill: currentColor; }
.kb-tile-txt { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; }
.kb-tile-txt b { font-size: 18px; line-height: 1.3; font-weight: 600; }
.kb-tile-arr { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; width: 20px; height: 20px; fill: var(--pb-600); transition: transform .3s var(--ease); }
.kb-tile:hover .kb-tile-arr { transform: translateX(3px); }

/* glossary hero: "Start with the basics" */
/* V9 (T56 B): the header sits on its own primary-50 band, larger, so it reads apart from the five rows below it */
.kb-basics { border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px var(--pb-100), 0 40px 80px -44px rgba(24, 50, 140, .5); }
.kb-basics-top { padding: 26px 28px 22px; border-radius: 28px 28px 0 0; background: var(--pb-50); border-bottom: 1px solid var(--pb-100); }
.gbl .kb-basics-h { display: flex; align-items: center; gap: 12px; font-size: 24px; line-height: 1.25; color: var(--ink); }
.kb-basics-h svg { width: 28px; height: 28px; fill: var(--pb-600); flex: none; }
.kb-basics-top p { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--body); }
.kb-basics ul { display: grid; padding: 8px 14px 14px; }
.kb-basics li + li { border-top: 1px solid var(--line); }
.gbl .kb-basics a { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; color: var(--ink); transition: background .2s; }
.gbl .kb-basics a:hover { background: var(--pb-50); color: var(--ink); }
.kb-basics b { display: block; font-size: 17px; line-height: 1.35; font-weight: 600; }
.kb-basics a > svg { width: 18px; height: 18px; fill: var(--pb-600); transition: transform .2s var(--ease); }
.kb-basics a:hover > svg { transform: translateX(3px); }

/* ---------- FAQ body ---------- */
.kb-body { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 72px; }
.kb-side { position: sticky; top: calc(var(--kb-head) + 24px); max-height: calc(100vh - var(--kb-head) - 48px); overflow: auto; overscroll-behavior: contain; padding: 4px 4px 24px; margin: -4px; scrollbar-width: thin; }
.kb-side-g + .kb-side-g { margin-top: 16px; }
.kb-side-h { margin: 0 0 6px; padding: 0 12px; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.gbl .kb-side a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 7px 12px; border-radius: 10px; font-size: 16px; line-height: 1.3; color: var(--ink); transition: background .2s, color .2s; }
.gbl .kb-side a:hover { background: #fff; color: var(--pb-700); }
/* active topic: a raised white chip (the old inset bar curved around the radius). Shadow stays inside .kb-side's 4px padding. */
.gbl .kb-side a[aria-current="true"] { background: #fff; color: var(--pb-700); font-weight: 600; box-shadow: 0 0 0 1px var(--pb-100), 0 1px 3px rgba(24, 50, 140, .14); }
.kb-n { flex: none; min-width: 28px; padding: 2px 8px; border-radius: 999px; background: #edf1f7; font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; color: var(--body); }
.kb-side a[aria-current="true"] .kb-n { background: var(--pb-600); color: #fff; }
.gbl .kb-side a.is-zero { color: var(--muted); }
.kb-side a.is-zero .kb-n { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

.kb-bar { display: none; }
.kb-status { font-size: 16px; color: var(--body); }
.kb-status:empty { display: none; }
.kb-status b { color: var(--ink); }
.kb-empty { padding: 40px; border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; line-height: 1.6; color: var(--body); }
.kb-empty-h { margin-bottom: 8px; font-size: 20px; font-weight: 600; color: var(--ink); }
.gbl .kb-empty a, .gbl .kb-empty button { color: var(--pb-700); font-weight: 600; }
.gbl .kb-empty button:hover, .gbl .kb-empty a:hover { color: var(--pb-900); }
.kb-status:not(:empty) + .kb-empty, .kb-status:not(:empty) ~ .kb-group:first-of-type { margin-top: 20px; }

.kb-group + .kb-group { margin-top: 72px; }
.kb-status:not(:empty) ~ .kb-group:not([hidden]) ~ .kb-group { margin-top: 48px; }
.gbl .kb-group-h { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kb-group-ico { width: 36px; height: 36px; border-radius: 10px; }
.kb-group-ico svg { width: 20px; height: 20px; fill: currentColor; }
.kb-sec { padding-top: 40px; }
.kb-group-h + .kb-sec { padding-top: 16px; }
.kb-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 18px; }
.gbl .kb-sec-h { font-size: 28px; line-height: 1.3; color: var(--ink); }
.kb-sec-n { font-size: 15px; color: var(--body); }
.gbl .kb-all { margin-left: auto; min-height: 36px; padding: 0 4px; font-size: 15px; font-weight: 600; color: var(--pb-700); }
.gbl .kb-all:hover { color: var(--pb-900); }
.kb-list { display: flex; flex-direction: column; gap: 10px; }

.kb-item { border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, background .2s; }
.kb-item:hover { box-shadow: inset 0 0 0 1px var(--pb-200); }
.kb-item[open] { box-shadow: inset 0 0 0 1px var(--pb-200), 0 24px 48px -40px rgba(24, 50, 140, .5); }
.kb-item:target, .kb-item.is-target { box-shadow: inset 0 0 0 2px var(--pb-600), 0 24px 48px -40px rgba(24, 50, 140, .5); }
.kb-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-radius: 16px; cursor: pointer; list-style: none; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.kb-item summary::-webkit-details-marker { display: none; }
.kb-item summary::marker { content: ""; }
.kb-pm { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--pb-50); flex: none; transition: background .3s; }
.kb-pm::before, .kb-pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--pb-600); border-radius: 2px; transform: translate(-50%, -50%); }
.kb-pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s var(--ease); }
.kb-item[open] .kb-pm { background: var(--pb-600); }
.kb-item[open] .kb-pm::before, .kb-item[open] .kb-pm::after { background: #fff; }
.kb-item[open] .kb-pm::after { transform: translate(-50%, -50%) rotate(0deg); }
.kb-a { margin-top: -8px; padding: 0 24px 18px; } /* pulls the answer 8px closer to its question */
.kb-a :is(p, li) { max-width: 760px; font-size: 17px; line-height: 1.65; color: var(--kb-read); }
.kb-item[open] .kb-a { animation: kb-in .3s var(--ease); }
@keyframes kb-in { from { opacity: 0; transform: translateY(-4px); } }
.gbl .kb-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 10px; padding: 0 10px 0 8px; margin-left: -8px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--body); }
.gbl .kb-copy:hover { background: var(--pb-50); color: var(--pb-700); }
.kb-copy svg { width: 16px; height: 16px; fill: currentColor; }
.kb-copy.is-done { color: #0a725a; }
.gbl a.kb-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 8px 0; font-size: 16px; font-weight: 600; color: var(--pb-700); }
.gbl a.kb-more:hover { color: var(--pb-900); }
.kb-more svg { width: 16px; height: 16px; fill: currentColor; transition: transform .2s var(--ease); }
.kb-more:hover svg { transform: translateX(3px); }

/* ---------- glossary: A–Z bar ---------- */
.kb-az:not(.is-mini) { position: sticky; top: var(--kb-head); z-index: 40; margin-top: 24px; padding: 10px 0; background: rgba(245, 247, 250, .94); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 1px 0 var(--line); }
.kb-az:not(.is-mini) .gbl-wrap { max-width: 1545px; }
.kb-az-list { display: flex; justify-content: space-between; gap: 2px; }
.kb-az-list > li { flex: 1 1 0; display: flex; justify-content: center; }
.gbl .kb-az-list a, .kb-az-list span { display: grid; place-items: center; width: 100%; max-width: 44px; height: 40px; border-radius: 10px; font-size: 16px; font-weight: 600; line-height: 1; color: var(--ink); transition: background .2s, color .2s; }
.gbl .kb-az-list a:hover { background: #fff; color: var(--pb-700); box-shadow: inset 0 0 0 1px var(--pb-100); }
.gbl .kb-az-list a[aria-current="true"] { background: var(--pb-600); color: #fff; box-shadow: none; }
.kb-az-list span { color: #aab5c5; font-weight: 400; cursor: default; }
.kb-az-list a.is-zero { color: #aab5c5; font-weight: 400; pointer-events: none; }

.kb-gl-body { padding-top: 48px; }
.kb-gl-body > .kb-status, .kb-gl-body > .kb-empty { margin-bottom: 32px; }
.kb-letter { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 32px; padding: 40px 0; border-top: 1px solid var(--line); }
.kb-letter:first-of-type, .kb-empty + .kb-letter { border-top: 0; }
.gbl .kb-letter-h { position: sticky; top: calc(var(--kb-head) + var(--kb-bar) + 24px); align-self: start; display: flex; flex-direction: column; gap: 4px; }
.kb-letter-l { font-size: 64px; font-weight: 600; line-height: 1; color: var(--pb-600); }
.kb-letter-h small { font-size: 15px; font-weight: 400; color: var(--body); }
.kb-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gbl a.kb-term { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 52px 20px 22px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .3s var(--ease); }
.gbl a.kb-term:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--pb-200), 0 24px 48px -40px rgba(24, 50, 140, .55); transform: translateY(-2px); }
.kb-term b { font-size: 18px; font-weight: 600; line-height: 1.35; }
.kb-term span { font-size: 15px; line-height: 1.5; color: var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-term-arr { position: absolute; top: 22px; right: 20px; width: 20px; height: 20px; fill: var(--pb-600); transition: transform .2s var(--ease); }
.kb-term:hover .kb-term-arr { transform: translateX(3px); }
.kb-also { grid-column: 2; margin-top: -16px; font-size: 15px; line-height: 1.5; color: var(--body); }
.gbl .kb-also a { color: var(--pb-700); font-weight: 600; }
.gbl .kb-also a:hover { color: var(--pb-900); }

/* ---------- glossary term page ---------- */
.kb-term-head { padding: 40px 0 44px; background: linear-gradient(180deg, #fff 0%, var(--pb-50) 100%); box-shadow: inset 0 -1px 0 var(--pb-100); }
.kb-term-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.kb-term-title > div { min-width: 0; }
.gbl .kb-term-h1 { margin-top: 16px; font-size: clamp(36px, 3.4vw, 52px); line-height: 1.12; color: var(--ink); overflow-wrap: anywhere; }
.kb-term-body { display: grid; grid-template-columns: minmax(0, 780px) 300px; justify-content: space-between; gap: 64px; align-items: start; padding-top: 56px; }
.kb-article { min-width: 0; }
.kb-article > * + * { margin-top: 20px; }
.gbl .kb-article :is(h2, h3) { font-size: 28px; line-height: 1.3; color: var(--ink); }
/* the site's blog CCJ styles every h2.wp-block-heading (28px, padding-top 25px); the term body keeps those classes */
.gbl .kb-article :is(h2, h3).wp-block-heading { padding-top: 0; }
.kb-article p, .kb-article li { font-size: 18px; line-height: 1.7; color: var(--kb-read); }
.kb-article p + p, .kb-article :is(h2, h3) + *, .kb-article * + :is(ul, ol), .kb-article :is(ul, ol) + * { margin-top: 14px; }
.kb-article strong { color: var(--ink); font-weight: 600; }
.kb-article ul { display: grid; gap: 8px; }
.kb-article ul > li { position: relative; padding-left: 26px; }
.kb-article ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--pb-600); }
.kb-part { position: relative; }
.kb-part + .kb-part { margin-top: 40px; }
.kb-article .kb-part .kb-part-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--pb-700); }
.kb-article .kb-part-tag svg { width: 16px; height: 16px; fill: currentColor; }
.kb-part.is-def { padding: 32px 36px 34px; border-radius: 24px; background: var(--pb-50); box-shadow: inset 0 0 0 1px var(--pb-100); }
.kb-part.is-def p { font-size: 20px; line-height: 1.65; color: var(--ink); }
.kb-part.is-ex { padding: 26px 30px 28px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), inset 4px 0 0 var(--pb-200); }
.kb-part.is-ex p { font-size: 19px; }
.kb-term-side { position: sticky; top: calc(var(--kb-head) + 24px); display: flex; flex-direction: column; gap: 28px; }
.kb-toc ol { display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.gbl .kb-toc a { display: block; margin-left: -2px; padding: 8px 0 8px 16px; border-left: 2px solid transparent; font-size: 16px; line-height: 1.45; color: var(--body); transition: color .2s, border-color .2s; }
.gbl .kb-toc a:hover { color: var(--pb-700); }
.gbl .kb-toc a[aria-current="true"] { border-left-color: var(--pb-600); color: var(--ink); font-weight: 600; }
.kb-toc .kb-side-h, .kb-az.is-mini .kb-side-h { padding: 0; margin-bottom: 10px; }
.kb-az.is-mini .kb-az-list { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.gbl .kb-az.is-mini .kb-az-list a, .kb-az.is-mini .kb-az-list span { max-width: none; height: 36px; font-size: 15px; }
.gbl .kb-az.is-mini .kb-az-list a { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.gbl .kb-az.is-mini .kb-az-list a:hover { box-shadow: inset 0 0 0 1px var(--pb-200); }

.kb-next { padding: 88px 0 0; }
.kb-next .gbl-h3 { margin-bottom: 20px; }
.kb-terms.is-rel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kb-pn { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 12px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.gbl .kb-pn a { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 20px; border-radius: 18px; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); background: #fff; transition: box-shadow .2s; }
.gbl .kb-pn a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--pb-200); }
.kb-pn a > svg { width: 20px; height: 20px; fill: var(--pb-600); flex: none; }
.kb-pn a span { display: flex; flex-direction: column; min-width: 0; }
.kb-pn small { font-size: 14px; color: var(--body); }
.kb-pn b { font-size: 16px; line-height: 1.35; font-weight: 600; }
.gbl .kb-pn-next { justify-content: flex-end; text-align: right; }
.gbl .kb-pn a.kb-pn-all { justify-content: center; font-weight: 600; color: var(--pb-700); }

/* ---------- ≤1280 ---------- */
@media (max-width: 1280px) {
  .kb-hero-grid { padding: 56px 48px 56px 56px; gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
  .kb-hero-grid.is-single { grid-template-columns: minmax(0, 760px); }
  .kb-body { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .kb-terms.is-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-term-body { grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; }
}

/* ---------- ≤1100: one column; the topic list becomes a sticky picker ---------- */
@media (max-width: 1100px) {
  .kb-hero-grid, .kb-hero-grid.is-single { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 56px 40px 48px; }
  .kb-hero-copy { align-items: center; text-align: center; max-width: 720px; margin: 0 auto; width: 100%; }
  .kb-search { margin-left: auto; margin-right: auto; }
  .kb-try { justify-content: center; }
  .kb-crumbs ol { justify-content: center; }
  .kb-hero-topics, .kb-basics { max-width: 720px; margin: 0 auto; width: 100%; }
  .kb-hero-topics ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .gbl a.kb-tile { grid-template-columns: 1fr; padding: 16px; gap: 10px; }
  .kb-tile .kb-tile-arr { display: none; }
  .kb-tile-txt b { font-size: 16px; }
  .kb-basics { border-radius: 22px; }
  .kb-basics-top { padding: 20px 20px 18px; border-radius: 22px 22px 0 0; }
  .gbl .kb-basics-h { font-size: 21px; }
  .kb-basics ul { padding: 4px 8px 8px; }
  .gbl .kb-basics a { padding: 12px; }

  .kb-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 40px; }
  .kb-side { display: none; }
  .kb-bar { position: sticky; top: var(--kb-head); z-index: 40; display: flex; gap: 10px; margin: 0 -8px 8px; padding: 12px 8px; background: rgba(245, 247, 250, .94); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
  .kb-jump { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
  .gbl .kb-jump select { width: 100%; height: 44px; margin: 0; padding: 0 40px 0 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); -webkit-appearance: none; appearance: none; text-overflow: ellipsis; }
  .kb-jump-ico { position: absolute; left: 14px; width: 20px; height: 20px; fill: var(--pb-600); pointer-events: none; }
  .kb-jump-car { position: absolute; right: 14px; width: 16px; height: 16px; fill: var(--body); pointer-events: none; }
  .gbl .kb-bar-search { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; font-weight: 600; color: var(--ink); }
  .kb-bar-search svg { width: 18px; height: 18px; fill: var(--pb-600); }
  .kb-group + .kb-group { margin-top: 56px; }

  .kb-letter { grid-template-columns: 72px minmax(0, 1fr); gap: 20px; }
  .kb-letter-l { font-size: 48px; }
  .kb-term-body { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; }
  .kb-term-side { position: static; order: -1; }
  .kb-term-side .kb-az.is-mini { display: none; }
  .kb-toc { padding: 20px 24px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
}

/* ---------- ≤768 ---------- */
@media (max-width: 768px) {
  .kb-hero .hx-hero-card { border-radius: 28px; }
  .kb-hero-grid, .kb-hero-grid.is-single { padding: 36px 16px 20px; gap: 28px; }
  .gbl.kb .kb-hero .hx-h1 { font-size: 34px; }
  .kb-hero .hx-hero-sub { font-size: 17px; }
  .kb-crumbs ol { font-size: 14px; }
  .kb-eyebrow { font-size: 14px; }
  .kb-search { margin-top: 24px; }
  .gbl .kb-search input[type="search"] { height: 56px; font-size: 16px; padding-left: 50px; padding-right: 56px; border-radius: 16px; }
  .kb-search-ico { left: 17px; width: 20px; height: 20px; }
  .kb-kbd { display: none; }
  .kb-try { font-size: 14px; gap: 6px; }
  .gbl .kb-try button { min-height: 36px; font-size: 14px; padding: 0 12px; }
  .kb-hero-topics ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gbl a.kb-tile { padding: 14px; gap: 8px; border-radius: 16px; text-align: left; }
  .kb-tile-ico { width: 36px; height: 36px; border-radius: 10px; }
  .kb-tile-ico svg { width: 20px; height: 20px; }
  .kb-tile-txt b { font-size: 16px; }

  .kb-body { padding-top: 24px; }
  .kb-bar { margin: 0 -20px 4px; padding: 12px 20px; }
  .gbl .kb-bar-search span { display: none; }
  .gbl .kb-bar-search { padding: 0 13px; }
  .kb-group + .kb-group { margin-top: 48px; }
  .kb-sec { padding-top: 24px; }
  .gbl .kb-sec-h { font-size: 24px; }
  .kb-item summary { padding: 16px 16px 16px 18px; gap: 14px; font-size: 16px; line-height: 1.45; }
  .kb-pm { width: 28px; height: 28px; }
  .kb-a { padding: 0 18px 14px; }
  .kb-a p { font-size: 16px; line-height: 1.6; }


  .kb-az:not(.is-mini) { padding: 8px 0; }
  .kb-az:not(.is-mini) .gbl-wrap { padding: 0; }
  .kb-az:not(.is-mini) .kb-az-list { overflow-x: auto; justify-content: flex-start; gap: 4px; padding: 0 16px; scrollbar-width: none; scroll-padding: 0 16px; }
  .kb-az:not(.is-mini) .kb-az-list::-webkit-scrollbar { display: none; }
  .kb-az:not(.is-mini) .kb-az-list > li { flex: none; }
  .gbl .kb-az:not(.is-mini) .kb-az-list a, .kb-az:not(.is-mini) .kb-az-list span { width: 40px; height: 40px; }
  .kb-gl-body { padding-top: 32px; }
  .kb-letter { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 32px 0; }
  .gbl .kb-letter-h { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
  .kb-letter-l { font-size: 40px; }
  .kb-terms, .kb-terms.is-rel { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gbl a.kb-term { padding: 16px 48px 16px 18px; border-radius: 16px; }
  .kb-term b { font-size: 17px; }
  .kb-term-arr { top: 18px; right: 16px; }
  .kb-also { grid-column: 1; margin-top: 0; }

  .kb-term-head { padding: 24px 0 32px; }
  .kb-term-title { gap: 20px; }
  .gbl .kb-term-h1 { font-size: 34px; }
  .kb-search.is-sm { max-width: none; }
  .kb-term-body { padding-top: 28px; gap: 28px; }
  .gbl .kb-article :is(h2, h3) { font-size: 24px; }
  .kb-article p, .kb-article li { font-size: 17px; }
  .kb-part.is-def { padding: 22px 20px 24px; border-radius: 20px; }
  .kb-part.is-def p { font-size: 18px; }
  .kb-part.is-ex { padding: 20px 20px 22px; }
  .kb-part.is-ex p { font-size: 17px; }
  .kb-next { padding-top: 64px; }
  .kb-pn { grid-template-columns: 1fr 1fr; }
  .gbl .kb-pn a.kb-pn-all { grid-column: 1 / -1; grid-row: 2; min-height: 56px; }
  .gbl .kb-pn a { padding: 12px 14px; gap: 10px; }
  .kb-pn b { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .kb *, .kb *::before, .kb *::after { transition: none !important; animation: none !important; }
}
