/* ============================================================
   KNOWLEDGE — index + articles. Loaded after style.css on
   /knowledge/ pages only; uses the same tokens.
   ============================================================ */

:root {
  --kb-text: oklch(0.30 0.007 265);   /* body copy: a step darker than --ink-mid for long reads */
  --kb-measure: 700px;
  --kb-nav-offset: 112px;             /* floating nav + breathing room */
}
html { scroll-padding-top: var(--kb-nav-offset); }

/* Active nav item on Knowledge pages */
.nav-links a[aria-current] { color: var(--ink); }
.nav-links a[aria-current]::after { transform: scaleX(1); }

/* --- Reading progress ------------------------------------------------ */
.kb-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--kb-p, 0));
  pointer-events: none;
}

/* --- Hero ------------------------------------------------------------ */
.kb-hero {
  position: relative;
  padding: clamp(140px, 16vw, 190px) 0 clamp(56px, 7vw, 88px);
  background: var(--tinted);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.kb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 70% at 88% 0%, oklch(0.9 0.07 52 / 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 4% 100%, oklch(0.88 0.06 48 / 0.14) 0%, transparent 70%);
}
.kb-hero > .container { position: relative; }

.kb-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-light);
  margin-bottom: 28px;
}
.kb-crumbs a { color: var(--ink-mid); transition: color var(--dur) var(--ease); }
.kb-crumbs a:hover { color: var(--accent); }
.kb-crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--border-strong); }
.kb-crumbs li { display: inline-flex; }

.kb-title {
  font-size: clamp(36px, 5.2vw, 64px);
  color: var(--ink);
  max-width: 17ch;
  margin-bottom: 22px;
  text-wrap: balance;
}
.kb-dek {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.7;
  font-weight: 300;
  color: var(--ink-mid);
  max-width: 60ch;
  margin-bottom: 36px;
  text-wrap: pretty;
}

/* byline + dates */
.kb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-bottom: 36px;
  font-size: 13px;
  color: var(--ink-mid);
}
.kb-author { display: flex; align-items: center; gap: 12px; }
.kb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: oklch(1 0 0);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex: none;
}
.kb-author-name { display: block; color: var(--ink); font-weight: 500; }
.kb-author-role { display: block; font-size: 12px; color: var(--ink-light); }
.kb-dates { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.kb-dates span { display: inline-flex; gap: 6px; }
.kb-dates b { font-weight: 500; color: var(--ink-light); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; align-self: center; }

.kb-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.kb-hero-actions .btn svg { width: 16px; height: 16px; flex: none; }
.kb-textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-mid);
  transition: color var(--dur) var(--ease);
}
.kb-textlink svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.kb-textlink:hover { color: var(--ink); }
.kb-textlink:hover svg { transform: translateY(2px); }

/* CoA button: the download glyph nudges down on hover, like a download */
.kb-coa-btn svg .kb-arrow { transition: transform 260ms var(--ease-out); }
.kb-coa-btn:hover svg .kb-arrow { transform: translateY(2px); }

/* Hero load-in: the site's hero loads without motion; here a soft stagger */
@media (prefers-reduced-motion: no-preference) {
  .kb-hero .kb-crumbs, .kb-hero .kb-title, .kb-hero .kb-dek,
  .kb-hero .kb-meta, .kb-hero .kb-hero-actions, .kb-hero .kb-index-lead {
    animation: kb-rise 0.9s var(--ease-out) both;
  }
  .kb-hero .kb-title { animation-delay: 60ms; }
  .kb-hero .kb-dek, .kb-hero .kb-index-lead { animation-delay: 140ms; }
  .kb-hero .kb-meta { animation-delay: 220ms; }
  .kb-hero .kb-hero-actions { animation-delay: 300ms; }
}
@keyframes kb-rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* --- Article layout -------------------------------------------------- */
.kb-body { padding: clamp(56px, 7vw, 96px) 0 clamp(80px, 10vw, 140px); }
.kb-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

/* table of contents */
.kb-toc {
  position: sticky;
  top: var(--kb-nav-offset);
  font-size: 12.5px;
  line-height: 1.45;
}
.kb-toc-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 16px;
}
.kb-toc ol { list-style: none; border-left: 1px solid var(--border); }
.kb-toc a {
  position: relative;
  display: block;
  padding: 7px 0 7px 16px;
  color: var(--ink-light);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.kb-toc a::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 300ms var(--ease-out);
}
.kb-toc a:hover { color: var(--ink); transform: translateX(2px); }
.kb-toc a.is-active { color: var(--ink); }
.kb-toc a.is-active::before { transform: scaleY(1); }
.kb-toc-cta {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.kb-toc-cta .pc-coa { padding-left: 0; }
.kb-toc-cta .pc-coa:hover { background: none; }

/* prose */
.kb-prose { max-width: var(--kb-measure); min-width: 0; }
.kb-prose > section { scroll-margin-top: var(--kb-nav-offset); }
.kb-prose > section + section { margin-top: clamp(56px, 7vw, 80px); }
.kb-prose h2 {
  position: relative;
  font-size: clamp(26px, 3vw, 36px);
  color: var(--ink);
  margin-bottom: 22px;
  text-wrap: balance;
}
.kb-prose h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 10px;
}
.kb-prose p,
.kb-prose li {
  font-size: 16.5px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--kb-text);
  text-wrap: pretty;
}
.kb-prose p + p { margin-top: 18px; }
.kb-prose strong { font-weight: 500; color: var(--ink); }
.kb-prose p a,
.kb-prose li a,
.kb-author-box a,
.kb-sources a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: oklch(0.64 0.16 52 / 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.kb-prose p a:hover,
.kb-prose li a:hover,
.kb-author-box a:hover,
.kb-sources a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.kb-prose sup { font-size: 0.7em; line-height: 0; }

/* heading permalink — appears on hover, copies the link */
.kb-anchor {
  position: absolute;
  left: -1.1em;
  top: 0.12em;
  width: 0.8em;
  height: 1em;
  display: grid;
  place-items: center;
  color: var(--ink-light);
  opacity: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  transition: opacity var(--dur) var(--ease), color var(--dur) var(--ease);
}
.kb-anchor svg { width: 18px; height: 18px; }
.kb-prose h2:hover .kb-anchor,
.kb-anchor:focus-visible { opacity: 1; }
.kb-anchor:hover { color: var(--accent); }
.kb-anchor.is-copied { color: var(--accent); opacity: 1; }
.kb-anchor[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translate(-50%, 4px);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: oklch(1 0 0);
  background: var(--ink);
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.kb-anchor.is-copied::after { opacity: 1; transform: translate(-50%, 0); }

/* Quick answer */
.kb-answer {
  position: relative;
  padding: 28px 30px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: clamp(48px, 6vw, 64px);
  overflow: hidden;
}
.kb-answer::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}
.kb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.kb-answer p { font-size: 16.5px; color: var(--ink); font-weight: 400; }
.kb-lede { font-size: 18px !important; line-height: 1.75 !important; }

/* --- Tables ---------------------------------------------------------- */
.kb-table-wrap {
  margin: 28px 0 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow-x: auto;
}
.kb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}
.kb-table caption {
  caption-side: top;
  text-align: left;
  padding: 16px 20px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.kb-table th,
.kb-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 20px;
}
.kb-table thead th {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.kb-table tbody th { font-weight: 500; color: var(--ink); }
@media (min-width: 641px) { .kb-table tbody th, .kb-table td.kb-num { white-space: nowrap; } }
.kb-table td { color: var(--kb-text); font-weight: 300; }
.kb-table tbody tr + tr > * { border-top: 1px solid var(--border); }
.kb-table tbody tr { transition: background var(--dur) var(--ease); }
.kb-table tbody tr:hover { background: oklch(0.975 0.008 60); }
.kb-num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink) !important; font-weight: 400 !important; }
/* rows the article calls out */
.kb-table tr.is-key > th:first-child { position: relative; }
.kb-table tr.is-key > th:first-child::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 22px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.kb-table tr.is-key td:nth-of-type(1).kb-num { color: var(--accent-hover) !important; font-weight: 500 !important; }

/* growth promotion: the number plus a bar against the 85% pass line */
.kb-gp td.kb-gp-cell { width: 55%; }
.kb-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kb-bar-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: var(--tinted);
}
.kb-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--v) / 130 * 100%);
  border-radius: 8px;
  background: linear-gradient(90deg, oklch(0.78 0.11 56), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease-out);
}
.kb-gp.is-in .kb-bar-fill { transform: scaleX(1); }
.kb-gp tr:nth-child(2) .kb-bar-fill { transition-delay: 90ms; }
.kb-gp tr:nth-child(3) .kb-bar-fill { transition-delay: 180ms; }
.kb-gp tr:nth-child(4) .kb-bar-fill { transition-delay: 270ms; }
.kb-bar-pass,
.kb-bar-ref {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 1px;
  background: var(--ink);
}
.kb-bar-pass { left: calc(85 / 130 * 100%); }
.kb-bar-ref { left: calc(100 / 130 * 100%); background: var(--border-strong); }
.kb-bar .kb-num { min-width: 3.4em; text-align: right; }
.kb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0 20px 16px;
  font-size: 12px;
  color: var(--ink-light);
}
.kb-legend span { display: inline-flex; align-items: center; gap: 8px; }
.kb-legend i { display: inline-block; width: 1px; height: 12px; background: var(--ink); }
.kb-legend i.ref { background: var(--border-strong); }

/* --- Safety checklist ------------------------------------------------ */
.kb-checks { list-style: none; margin: 26px 0; display: grid; gap: 2px; }
.kb-checks li {
  position: relative;
  padding: 16px 18px 16px 52px;
  border-radius: 12px;
  transition: background var(--dur) var(--ease);
}
.kb-checks li:hover { background: var(--surface); }
.kb-checks li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 21px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: oklch(0.95 0.05 150) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23257a4a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
  transition: transform 300ms var(--ease-out);
}
.kb-checks li:hover::before { transform: scale(1.12); }

/* callout note (the serum neutralisation explainer etc.) */
.kb-note {
  margin: 26px 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: oklch(0.975 0.012 70);
  border: 1px solid oklch(0.92 0.03 60);
}
.kb-note p { font-size: 15.5px; }

/* numbered red flags */
.kb-flags { list-style: none; counter-reset: flag; margin: 26px 0; border-top: 1px solid var(--border); }
.kb-flags li {
  counter-increment: flag;
  position: relative;
  padding: 16px 0 16px 52px;
  border-bottom: 1px solid var(--border);
  transition: padding-left 300ms var(--ease-out), color var(--dur) var(--ease);
}
.kb-flags li::before {
  content: counter(flag, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 17px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  transition: transform 300ms var(--ease-out);
}
.kb-flags li:hover { padding-left: 58px; color: var(--ink); }

/* --- Annotated CoA figure ------------------------------------------- */
.kb-figure { margin: 0 0 clamp(48px, 6vw, 64px); }
.kb-figure-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: oklch(1 0 0);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.04), 0 18px 48px -24px oklch(0.3 0.02 60 / 0.25);
}
.kb-figure-frame img { display: block; width: 100%; height: auto; }
.kb-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: oklch(1 0 0);
  font: 500 11.5px/24px var(--sans);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 0 3px oklch(1 0 0), 0 4px 12px oklch(0.5 0.16 52 / 0.4);
  transition: transform 250ms var(--ease-out), background var(--dur) var(--ease);
  z-index: 1;
}
.kb-pin::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: kb-ping 2.6s var(--ease-out) infinite;
  animation-delay: calc(var(--i, 0) * 0.35s);
}
@keyframes kb-ping {
  0%   { transform: scale(1); opacity: 0.6; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { opacity: 0; }
}
.kb-pin:hover,
.kb-pin.is-on { transform: scale(1.18); background: var(--ink); }
/* row highlight band that slides under the pinned line */
.kb-band {
  position: absolute;
  left: 7%;
  right: 7%;
  height: 3.6%;
  top: var(--y);
  transform: translateY(-50%) scaleX(0.96);
  border-radius: 6px;
  background: oklch(0.85 0.12 70 / 0.28);
  outline: 1.5px solid oklch(0.64 0.16 52 / 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms var(--ease), transform 350ms var(--ease-out), top 350ms var(--ease-out);
}
.kb-figure-frame.has-band .kb-band { opacity: 1; transform: translateY(-50%) scaleX(1); }

.kb-figure figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.6;
}
.kb-keys {
  list-style: none;
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 20px;
  counter-reset: key;
}
.kb-keys li {
  counter-increment: key;
  position: relative;
  padding: 10px 12px 10px 44px;
  border-radius: 10px;
  font-size: 14px !important;
  line-height: 1.55 !important;
  cursor: default;
  transition: background var(--dur) var(--ease);
}
.kb-keys li::before {
  content: counter(key);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  line-height: 20px;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.kb-keys li strong { display: block; }
.kb-keys li:hover,
.kb-keys li.is-on { background: var(--surface); }
.kb-keys li:hover::before,
.kb-keys li.is-on::before { background: var(--accent); color: oklch(1 0 0); }

/* --- CoA call-to-action cards --------------------------------------- */
.kb-cta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  flex-wrap: wrap;
  margin: 36px 0 0;
  padding: 20px 22px;
  border: 1px dashed oklch(0.64 0.16 52 / 0.45);
  border-radius: 14px;
  background: oklch(0.985 0.008 60);
}
.kb-cta-inline p { font-size: 15px !important; color: var(--ink) !important; font-weight: 400 !important; margin: 0 !important; }
.kb-cta-inline .pc-coa { border: 1px solid oklch(0.64 0.16 52 / 0.4); padding: 10px 16px; }

.kb-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 28px 40px;
  margin-top: clamp(56px, 7vw, 80px);
  padding: clamp(28px, 4vw, 44px);
  border-radius: 20px;
  background: var(--ink);
  color: oklch(1 0 0);
  overflow: hidden;
  isolation: isolate;
}
.kb-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, oklch(0.64 0.16 52 / 0.38) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 0% 100%, oklch(0.55 0.12 40 / 0.22) 0%, transparent 70%);
  transition: transform 1.2s var(--ease-out);
}
.kb-cta:hover::before { transform: scale(1.08) translate(-2%, 2%); }
.kb-cta .kb-kicker { color: oklch(0.82 0.16 48); }
.kb-cta h2 {
  font-size: clamp(24px, 2.8vw, 32px) !important;
  color: oklch(1 0 0) !important;
  margin-bottom: 12px !important;
}
.kb-cta p { color: oklch(1 0 0 / 0.68) !important; font-size: 15px !important; margin-bottom: 24px; }
.kb-cta p a { color: oklch(1 0 0) !important; text-decoration-color: oklch(1 0 0 / 0.4) !important; }
.kb-cta .btn-primary:hover { box-shadow: 0 8px 26px oklch(0.6 0.18 52 / 0.5); }
.kb-cta-doc {
  position: relative;
  aspect-ratio: 480 / 425;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid oklch(1 0 0 / 0.14);
  transform: rotate(3deg);
  transition: transform 500ms var(--ease-out);
  cursor: pointer;
  padding: 0;
  background: none;
}
.kb-cta-doc img { display: block; width: 100%; height: 100%; object-fit: cover; filter: blur(3px) saturate(0.6); transform: scale(1.05); transition: filter 500ms var(--ease-out); }
.kb-cta-doc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, oklch(0.15 0.008 265 / 0.55));
}
.kb-cta:hover .kb-cta-doc { transform: rotate(0deg) translateY(-4px); }
.kb-cta:hover .kb-cta-doc img { filter: blur(1.5px) saturate(0.8); }

/* --- FAQ ------------------------------------------------------------- */
.kb-faq { border-top: 1px solid var(--border); margin-top: 8px; }
.kb-faq details { border-bottom: 1px solid var(--border); }
.kb-faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.kb-faq summary::-webkit-details-marker { display: none; }
.kb-faq summary h3 { margin: 0; font-size: 16.5px; font-weight: 400; color: inherit; transition: transform 300ms var(--ease-out); }
.kb-faq summary:hover h3 { transform: translateX(3px); }
.kb-faq summary:hover { color: var(--accent-hover); }
.kb-plus {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 350ms var(--ease-out);
}
.kb-plus::before,
.kb-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.5px;
  margin: -0.75px 0 0 -5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 350ms var(--ease-out), background var(--dur) var(--ease);
}
.kb-plus::after { transform: rotate(90deg); }
.kb-faq details[open] .kb-plus { background: var(--ink); border-color: var(--ink); transform: rotate(180deg); }
.kb-faq details[open] .kb-plus::before,
.kb-faq details[open] .kb-plus::after { background: oklch(1 0 0); }
.kb-faq details[open] .kb-plus::after { transform: rotate(0deg); }
.kb-faq-a { padding: 0 48px 22px 4px; }
.kb-faq details[open] .kb-faq-a { animation: kb-open 420ms var(--ease-out); }
@keyframes kb-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* --- Author + sources ------------------------------------------------ */
.kb-author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 26px 0 0;
  margin-top: clamp(56px, 7vw, 80px);
  border-top: 1px solid var(--border);
}
.kb-author-box .kb-avatar { width: 52px; height: 52px; font-size: 17px; }
.kb-author-box p { font-size: 14.5px !important; line-height: 1.7 !important; }
.kb-sources { margin-top: 18px; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.kb-sources li { font-size: 14.5px !important; line-height: 1.65 !important; padding-left: 18px; position: relative; }
.kb-sources li::before { content: '↗'; position: absolute; left: 0; color: var(--ink-light); font-size: 12px; top: 2px; }

/* --- Knowledge index ------------------------------------------------- */
.kb-index-lead { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.7; font-weight: 300; color: var(--ink-mid); max-width: 58ch; }
.kb-list { padding: clamp(56px, 7vw, 96px) 0 clamp(96px, 12vw, 160px); }
.kb-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  font-size: 12px;
  color: var(--ink-light);
}
.kb-list-head h2 { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-light); }
.kb-cards { list-style: none; display: grid; gap: 24px; }
.kb-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.kb-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 22px 50px -28px oklch(0.3 0.02 60 / 0.35);
}
.kb-card-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; }
.kb-card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.kb-tag {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 100px;
}
.kb-tag.is-accent { color: var(--accent-hover); border-color: oklch(0.64 0.16 52 / 0.35); background: oklch(0.97 0.02 60); }
.kb-card h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
  text-wrap: balance;
}
/* the whole card is the link */
.kb-card h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.kb-card h3 a:focus-visible { outline: none; }
.kb-card:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.kb-card-desc { font-size: 15px; line-height: 1.75; font-weight: 300; color: var(--ink-mid); margin-bottom: 28px; max-width: 52ch; }
.kb-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-light);
}
.kb-card-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.kb-card-go span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.kb-card-go svg { width: 15px; height: 15px; transition: transform 300ms var(--ease-out); }
.kb-card:hover .kb-card-go span { background: var(--accent); border-color: var(--accent); color: oklch(1 0 0); }
.kb-card:hover .kb-card-go svg { transform: translateX(2px); }
.kb-card-media {
  position: relative;
  background: var(--tinted);
  overflow: hidden;
  min-height: 260px;
}
.kb-card-media img {
  position: absolute;
  top: 12%;
  left: 12%;
  width: 92%;
  height: auto;
  border-radius: 10px 0 0 0;
  box-shadow: 0 20px 50px -20px oklch(0.3 0.02 60 / 0.35);
  transform: rotate(-2deg);
  transition: transform 600ms var(--ease-out);
}
.kb-card:hover .kb-card-media img { transform: rotate(0deg) translate(-8px, -8px); }
.kb-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 100% 0%, oklch(0.9 0.07 52 / 0.35), transparent 70%);
  pointer-events: none;
}
.kb-soon {
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-light);
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 960px) {
  .kb-layout { grid-template-columns: minmax(0, 1fr); }
  .kb-toc { display: none; }
  .kb-anchor { display: none; }
}
@media (max-width: 760px) {
  .kb-card { grid-template-columns: 1fr; }
  .kb-card-media { min-height: 200px; order: -1; }
  .kb-cta { grid-template-columns: 1fr; }
  .kb-cta-doc { display: none; }
  .kb-keys { grid-template-columns: 1fr; }
}
/* Tables become label/value stacks on phones — still real table markup */
@media (max-width: 640px) {
  .kb-table-wrap { overflow: visible; }
  .kb-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kb-stack, .kb-stack tbody, .kb-stack tr, .kb-stack th, .kb-stack td { display: block; }
  .kb-stack tbody tr { padding: 14px 18px; }
  .kb-stack tbody tr + tr > * { border-top: none; }
  .kb-stack tbody tr + tr { border-top: 1px solid var(--border); }
  .kb-stack th, .kb-stack td { padding: 3px 0; }
  .kb-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-top: 8px;
  }
  .kb-table tr.is-key > th:first-child::before { left: -10px; top: 12px; }
  .kb-gp td.kb-gp-cell { width: auto; }
  .kb-answer { padding: 24px 22px 24px 24px; }
  .kb-pin { width: 22px; height: 22px; margin: -11px 0 0 -11px; line-height: 22px; font-size: 11px; }
  .kb-faq-a { padding-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .kb-pin::after { animation: none; }
  .kb-bar-fill { transform: none; transition: none; }
  .kb-card, .kb-card-media img, .kb-cta-doc, .kb-flags li { transition: none; }
}
