/**
 * public-content.css — CMS public content styles: article pages, hub pages,
 * content hero, audio player, share sidebar, TOC, reading progress,
 * content body prose, callouts, glossary terms, fan stack cards, content cards.
 *
 * Loaded in: templates/pages/content/article.html.twig (via {% block styles %})
 *            templates/pages/content/hub.html.twig (via {% block styles %})
 *            templates/pages/content/page.html.twig (via {% block styles %})
 * Depends on: design-tokens.css, foundation.css, app.css (shared tokens)
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CMS Content & Glossary
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Content body prose styling */
.kp-content-body {
  max-width: 72ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-1);
  text-align: left;
  word-break: break-word;
  overflow-wrap: break-word;
}

.kp-content-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--primary, #0d6d3a);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--text-1);
}

.kp-content-body h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-1);
}

.kp-content-body h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-1);
}

.kp-content-body p {
  margin-bottom: 1rem;
}

.kp-content-body ul,
.kp-content-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.kp-content-body li {
  margin-bottom: 0.35rem;
  line-height: 1.7;
}

.kp-content-body li::marker {
  color: var(--primary, #0d6d3a);
}

.kp-content-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-style: italic;
}

.kp-content-body blockquote p:last-child {
  margin-bottom: 0;
}

.kp-content-body hr {
  border: none;
  border-top: 1px solid var(--border, #e5e5e5);
  margin: 2rem 0;
}

/* ── Table: responsive scroll wrapper ───────────────────────────── */
.kp-content-body .kp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: var(--radius-2, 0.5rem);
  border: 1px solid var(--border, #e5e5e5);
}

.kp-content-body .kp-table-wrap table {
  margin-bottom: 0;
  border: none;
}

.kp-content-body table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.kp-content-body th,
.kp-content-body td {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

.kp-content-body th {
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}

.kp-content-body caption {
  caption-side: top;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
}

/* ── Figure / figcaption ────────────────────────────────────────── */
.kp-content-body figure {
  margin: 1.5rem 0;
}

.kp-content-body figure img {
  margin: 0;
}

.kp-content-body figcaption {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-3, #999);
  text-align: center;
  line-height: 1.5;
}

/* ── Callout boxes ──────────────────────────────────────────────── */
.kp-callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: var(--radius-2, 0.5rem);
  border-left: 3px solid;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.kp-callout__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
}

.kp-callout__body p:last-child { margin-bottom: 0; }

.kp-callout--info {
  background: rgba(59, 130, 246, 0.06);
  border-color: #3b82f6;
  color: var(--text-1);
}
.kp-callout--info .kp-callout__icon { color: #3b82f6; }

.kp-callout--warning {
  background: rgba(245, 158, 11, 0.06);
  border-color: #f59e0b;
  color: var(--text-1);
}
.kp-callout--warning .kp-callout__icon { color: #f59e0b; }

.kp-callout--tip {
  background: rgba(16, 185, 129, 0.06);
  border-color: #10b981;
  color: var(--text-1);
}
.kp-callout--tip .kp-callout__icon { color: #10b981; }

.kp-callout--note {
  background: var(--surface-2, #f5f5f5);
  border-color: var(--text-3, #999);
  color: var(--text-1);
}
.kp-callout--note .kp-callout__icon { color: var(--text-3, #999); }

/* ── YMYL disclaimer ───────────────────────────────────────────── */
.kp-disclaimer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: var(--radius-2, 0.5rem);
  background: rgba(245, 158, 11, 0.04);
  border: 1px dashed var(--border, #e5e5e5);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-2);
}

.kp-disclaimer__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.125rem;
  color: var(--text-3, #999);
}

/* Glossary term auto-link */
.kp-glossary-term {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
  cursor: help;
  position: relative;
}

.kp-glossary-term:hover {
  text-decoration-style: solid;
  color: var(--primary);
}

/* KaTeX block math — spacing, background, mobile overflow */
.kp-content-body .katex-display {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.kp-content-body .katex-display + .katex-display {
  margin-top: 0.75rem;
}

/* Glossary letter button */
.kp-letter-btn {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
}

/* Hub page child card */
.kp-hub-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kp-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Sticky sidebar */
.kp-sticky-sidebar {
  position: sticky;
  top: 5rem;
}

/* Glossary link in content */
.kp-glossary-link {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    text-decoration-color: var(--primary);
    color: inherit;
}
.kp-glossary-link:hover {
    text-decoration-style: solid;
    color: var(--primary);
}
.kp-glossary-link dfn {
    font-style: normal;
}

/* ═══════════════════════════════════════════════════════════════════
   Article Page — Hero, Audio, Share, TOC, Sticky Player
   ═══════════════════════════════════════════════════════════════════ */

/* ── Unified Content Hero (immersive bg image) ────────────────────
   v0.66.10.15.6 FE-GLOBAL-PUBLIC-HERO-SYSTEM — geometri, padding,
   align, overlay, tipografi ve content-max tek bir token namespace
   altında toplandı (--kp-public-hero-*). Article + hub + glossary
   ailesi base'den miras alır; variant override'ları (eski 400px hub
   floor, 400px article floor + center align + sol→sağ tek-katman
   overlay + custom title-fs) kaldırıldı. Bank detail (kp-bank-hero)
   token floor'u tüketir ama shell adoption yapmaz (ayrı domain). */
.kp-content-hero {
  position: relative;
  min-height: var(--kp-public-hero-min-h);
  display: flex;
  align-items: flex-end;
  padding: var(--kp-public-hero-py);
  background: var(--surface-1) var(--hero-bg) center / cover no-repeat;
  overflow: hidden;
}

.kp-content-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--kp-public-hero-overlay-image);
  z-index: 1;
}

.kp-content-hero .container {
  z-index: 2;
}

.kp-content-hero__title {
  font-size: var(--kp-public-hero-title-fs);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  text-wrap: balance;
  max-width: var(--kp-public-hero-content-max);
}

.kp-content-hero__intro {
  font-size: var(--kp-public-hero-intro-fs);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.75rem;
  max-width: var(--kp-public-hero-content-max);
  line-height: 1.6;
}

/* ── Chip family — canonical non-interactive informational label.
   v0.66.9.1 FE-DESIGN-SYSTEM-CHIPS-A introduced the family; v0.66.9.2
   CHIPS-B rolled it out to content-hero + glossary hero and removed the
   retired .kp-content-hero__badge rule. Semantic contract lives in
   blueprints/rules/design-system-agreement.md §8 and the retouch
   playbook at blueprints/rules/ui-ux-retouch-guide.md.

   - Chip  (.kp-chip)  → non-interactive info label (category, type, status).
   - Pill  (.kp-pill)  → interactive / toggleable control (see app.css).
   - Badge (BS .badge) → count / signal only; not canonical for info labels.

   Variant matrix (only applied variants ship CSS in this slice; --soft /
   --muted / --outline live as contract-only names in the agreement doc
   and land with CHIPS-B when concrete callers exist). */
.kp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375em;
  padding: 0.25em 0.75em;
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--ls-wide, 0.01em);
  border: 1px solid transparent;
  border-radius: var(--radius-pill, 50rem);
  background: var(--surface-2);
  color: var(--text-1);
  white-space: nowrap;
}

.kp-chip--solid {
  background: var(--primary);
  color: var(--primary-contrast, #fff);
  border-color: var(--primary);
}

.kp-chip--sm {
  padding: 0.2em 0.65em;
  font-size: var(--fs-xs, 0.7rem);
}

/* Muted variant — v0.66.9.4 FE-CARD-CONSOLIDATION materialize.
   Token-driven replacement for the Bootstrap
   `badge bg-secondary bg-opacity-10 text-secondary` compound used on
   muted informational labels in cards (e.g. glossary term category). */
.kp-chip--muted {
  background: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border, transparent);
}

/* Surface modifier — use on dark hero backgrounds where the default
   border/contrast would lose against the overlay gradient. */
.kp-chip--on-hero {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.kp-content-hero__meta {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.kp-content-hero__meta .kp-icon {
  color: rgba(255, 255, 255, 0.6);
}

/* Breadcrumb on hero (light on dark) */
.kp-content-hero__breadcrumb {
  --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.4);
}

.kp-content-hero__breadcrumb .breadcrumb-item a,
.kp-content-hero__breadcrumb .breadcrumb-item .kp-icon {
  color: rgba(255, 255, 255, 0.6);
}

.kp-content-hero__breadcrumb .breadcrumb-item a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.kp-content-hero__breadcrumb .breadcrumb-item.active {
  color: rgba(255, 255, 255, 0.8);
}

.kp-content-hero__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.4);
}

/* No-image fallback: brand gradient + soft overlay (token-driven). */
.kp-content-hero--no-image {
  background: var(--kp-public-hero-no-image-bg);
}

.kp-content-hero--no-image .kp-content-hero__overlay {
  background: var(--kp-public-hero-overlay-no-image);
}

/* v0.66.10.15.6 — hub variant özel min-height KALDIRILDI; base token
   yeterli (clamp(460px, 52vh, 520px) zaten eski 400px'i kapsar). */

.kp-content-hero__row {
  min-height: var(--kp-public-hero-row-min-h);
}

/* ── Hero Trending Panel (hub right side) ─────────────────────── */
/* ── Drum Roller — GSAP smooth vertical carousel ─────────────── */
.kp-drum {
  position: relative;
  height: 100%;
  min-height: 260px;
  overflow: hidden;
}

/* Static frame: play icon fill effect + highlight — always centered */
.kp-drum__frame {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-2, 0.5rem);
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
  z-index: 2;
}

/* Indicator: two-layer play icon (dim base + bright fill) */
.kp-drum__indicator {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.kp-drum__play {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
}

.kp-drum__play--base {
  color: rgba(255, 255, 255, 0.15);
}

.kp-drum__play--fill {
  color: rgba(255, 255, 255, 0.9);
  clip-path: inset(100% 0 0 0);
}

/* Scrolling text track */
.kp-drum__track {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* padding-left = frame padding-left (1rem=16px) + icon (44px) + gap (0.75rem=12px) = 72px ≈ 4.5rem */
.kp-drum__item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 4.5rem;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  min-width: 0;
  will-change: transform, opacity;
  transform-origin: left center;
  opacity: 0;
}

.kp-drum__item.is-active {
  color: rgba(255, 255, 255, 0.95);
  z-index: 3;
}

.kp-drum__title {
  font-weight: 400;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

/* ── Mobile hero adjustments ────────────────────────────────────
   v0.66.10.15.6 — hub variant override'ı KALDIRILDI; base mobile
   floor (clamp(440px, 64vh, 520px)) tüm aile için yeterli. */
@media (max-width: 991.98px) {
  .kp-content-hero {
    min-height: var(--kp-public-hero-min-h-mobile);
    padding: var(--kp-public-hero-py-mobile);
  }

  .kp-content-hero__overlay {
    background: var(--kp-public-hero-overlay-image-mobile);
  }

  .kp-content-hero__title {
    font-size: var(--kp-public-hero-title-fs-mobile);
    line-height: 1.35;
  }

  .kp-content-hero__intro {
    font-size: var(--kp-public-hero-intro-fs-mobile);
    line-height: 1.5;
  }
}

/* ══════════════════════════════════════════════════════════════════
   ARTICLE HERO VARIANT — extends kp-content-hero base
   v0.66.10.15.6 FE-GLOBAL-PUBLIC-HERO-SYSTEM:
     - min-height + align-items override KALDIRILDI (base flex-end yeterli)
     - sol→sağ tek-katman overlay override KALDIRILDI (base multi-layer
       overlay her variant için ortak — sol→sağ readability + alt→üst
       shadow stack)
     - title font-size override KALDIRILDI (base token zaten clamp(2rem,
       4.5vw, 3rem))
     - sadece font-weight 400 override + intro line-clamp reset korunur
       (E-E-A-T tonu)
   ══════════════════════════════════════════════════════════════════ */

/* H1 override — regular weight for article (hub stays bold) */
.kp-content-hero--article .kp-content-hero__title {
  font-weight: 400;
}

/* Article intro — no line-clamp, show full (155 char truncated in backend) */
.kp-content-hero--article .kp-content-hero__intro {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* Separator between tagline and byline */
.kp-article-hero__separator {
  border-color: rgba(255, 255, 255, 0.2);
  margin: 1rem 0;
  max-width: var(--kp-public-hero-content-max);
}

/* ── Byline (author + reviewer) — hero context ──────────────────── */
.kp-byline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.kp-byline__author {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.kp-byline__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.kp-byline__avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.kp-byline__name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

.kp-byline__name:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.kp-byline__role {
  display: block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}

.kp-byline__reviewer {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.kp-byline__reviewer .kp-icon {
  color: var(--success, #4ade80);
}

.kp-byline__reviewer .kp-byline__name {
  font-size: 0.8125rem;
  font-weight: 500;
}

.kp-byline__reviewer .kp-byline__role {
  display: inline;
  font-size: 0.75rem;
}

/* v0.66.10.15.6 — Article mobile özel override'ları KALDIRILDI:
   - min-height override (eski 300px) → base mobile token yeterli
   - align-items override (zaten flex-end) → base'den miras
   - alt→üst tek-yön overlay override → base mobile multi-layer overlay
     (sol→sağ + alt→üst, opacity bumps mobile için)
   - title font-size override → base mobile token zaten clamp(1.75rem, 6vw, 2.25rem)
   Mobile audio in-hero block kaldırıldı; yeni .kp-mobile-audio-card
   article-hero.html.twig embed dışında render olur. */

/* ── Mobile Audio Card (v0.66.10.15.6 FE-GLOBAL-PUBLIC-HERO-SYSTEM)
   Article hero ALTINDA, hero embed dışında ayrı section. Hero
   clamp(440px, 64vh, 520px) ile büyüdü; mobile in-hero audio chip+player
   yoğunluk yarattığı için ayrıştırıldı. d-lg-none — desktop'ta sağ
   slot'ta mevcut audio player kalır. Outer guard {% if has_audio %}
   article-hero.html.twig'de — empty wrapper yok. */
.kp-mobile-audio-card {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0 1rem;
}

.kp-mobile-audio-card .kp-hero-player__badge {
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-2);
  backdrop-filter: none;
}

/* ── Meta 2x2 grid (mobile) ─────────────────────────────────────── */
.kp-content-hero__meta--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}

.kp-content-hero__meta--grid span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.kp-content-hero__meta--grid .kp-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.65);
}

@media (min-width: 992px) {
  .kp-content-hero__meta--grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

/* ── Hero Player "Dinle" badge ──────────────────────────────────── */
.kp-hero-player__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35em 0.75em;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-pill, 50rem);
}

/* ── Breadcrumb ellipsis (mobile deep hierarchy) ─────────────────── */
.kp-breadcrumb__ellipsis span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
}

/* ── Article Content (extends kp-content-body) ─────────────────── */
/* v0.66.8.24 FE-READABILITY-BODY-CAP — wide variant (TOC absent,
   glossary definitions, faq body) was previously uncapped and could
   grow past ~900px on desktop, beyond the 50–75ch readability band.
   Capped at 80ch — ~10% wider than the default 72ch, still inside
   the ergonomic line-length band. Narrower viewports still hit this
   cap well below their column width, so mobile is untouched. */
.kp-content-body--wide {
  max-width: 80ch;
}

.kp-article-content {
  line-height: 1.85;
}

.kp-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-2, 0.5rem);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin: 1.5rem 0;
}

/* ── Author / Reviewer Card (article footer) ─────────────────────── */
.kp-author-card {
  padding: 1.25rem;
  border-radius: var(--radius-3, 0.75rem);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.kp-author-card--reviewer {
  background: var(--surface-1);
  border-style: dashed;
}

.kp-author-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.kp-author-card__avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-2);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.kp-author-card__label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success, #16a34a);
  margin-bottom: 0.25rem;
}

.kp-author-card__name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  text-decoration: none;
}

.kp-author-card__name:hover {
  color: var(--primary);
  text-decoration: underline;
}

.kp-author-card__role {
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.kp-author-card__bio {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.kp-author-card__social {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--text-3);
  text-decoration: none;
}

.kp-author-card__social:hover {
  color: var(--primary);
}

/* ── E-E-A-T Trust Bar ─────────────────────────────────────────── */
.kp-trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-2, 0.5rem);
  background: var(--surface-2, #f5f5f5);
  border: 1px solid var(--border, #e5e5e5);
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-2, #666);
}

.kp-trust-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.kp-trust-bar__item .kp-icon {
  color: var(--text-3, #999);
}

/* v0.66.8.20 FE-AUTHOR-AUTHORITY-LIFT — small circular avatar next to the
   author/reviewer name inside the trust bar. Above-fold authority signal. */
.kp-trust-bar__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.kp-trust-bar__link {
  color: var(--text-1);
  font-weight: 500;
  text-decoration: none;
}

.kp-trust-bar__link:hover {
  color: var(--primary, #0d6d3a);
  text-decoration: underline;
}

/* ── Skip Link (a11y) ──────────────────────────────────────────── */
.kp-skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--primary, #0d6d3a);
  color: #fff;
  border-radius: var(--radius-2, 0.5rem);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.kp-skip-link:focus {
  top: 0.5rem;
}

/* ── Audio Player Card ─────────────────────────────────────────── */
/* ── Mobile Audio Card (below hero, on light bg) ─────────────── */
.kp-audio-card--mobile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-2, 0.5rem);
  padding: 0.75rem 1rem;
}

/* ── Shared play button (sticky player) ──────────────────────── */
.kp-audio-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.kp-audio-play-btn:hover {
  background: var(--primary);
  color: #fff;
}

.kp-audio-play-btn--sm {
  width: 28px;
  height: 28px;
}

.kp-audio-play-btn--sm .kp-icon {
  width: 14px;
  height: 14px;
}

/* Speed selector */
.kp-speed-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-2, 0.5rem);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 0.25rem;
  display: flex;
  flex-direction: column;
  z-index: 10;
  margin-bottom: 0.25rem;
}

.kp-speed-option {
  border: none;
  background: transparent;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: var(--radius-1, 0.25rem);
  white-space: nowrap;
  color: var(--text-2);
  transition: background-color 0.1s;
}

.kp-speed-option:hover {
  background: var(--surface-2);
}

.kp-speed-option.is-active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Keyboard shortcuts tooltip */
.kp-shortcuts-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-2, 0.5rem);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0.75rem;
  z-index: 10;
  margin-bottom: 0.25rem;
  white-space: nowrap;
}

.kp-shortcuts-tooltip kbd {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 0.35rem;
  font-size: 0.75rem;
  font-family: inherit;
  margin-right: 0.25rem;
}

/* v0.66.10.15.5.3 — engagement-domain CSS (action rail, share button
   family, engagement counter and login CTA, right rail layout, plus
   the matching print/reduced-motion rules) extracted out of this
   file into public-engagement.css so the footer site-share surface
   can inherit the same palette without duplicating selectors. The
   orphan legacy desktop sidebar column and the pre-15.5.2.2 secondary
   bookmark pill were dropped during the extraction since no template
   still consumed them. */

/* ── Table of Contents (Desktop rail) — v0.66.10.14.6 FE-TOC-HIERARCHICAL-NAV-RAIL
   Navigation-only rail. A single SVG path renders the track from body
   top to body bottom, while the active indicator pill moves against the
   same body-local coordinate space. H2/H3 hierarchy is encoded by the
   rail path inset; no reading-progress overlay, no markers.
   ─────────────────────────────────────────────────────────────── */
.kp-toc {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.kp-toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-1);
  margin: 0 0 1rem 0;
  padding-left: 40px;
}

.kp-toc-title__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-2);
}

.kp-toc__body {
  position: relative;
  padding-left: 40px;
}

.kp-toc__rail-svg {
  position: absolute;
  left: 0;
  /* v0.66.10.15.5.3.2 — paired with the +8 viewBox y-buffer in
     article-toc.html.twig so the top progress dot's upper half
     stays inside the SVG canvas. Shifting the SVG element up by
     8 px keeps the path's `M first.x 0` anchor aligned with body
     y=0 (where the first heading link sits) while the negative-y
     buffer absorbs the dot's overflow above the path. */
  top: -8px;
  width: 32px;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.kp-toc__rail-track {
  stroke: var(--border);
  fill: none;
}

.kp-toc__rail-fill {
  stroke: var(--text-1);
  fill: none;
  pointer-events: none;
}

.kp-toc__rail-dot {
  stroke: var(--surface-1);
  stroke-width: 3;
  paint-order: stroke fill;
  pointer-events: none;
}

.kp-toc__rail-dot--finish {
  fill: var(--border);
}

.kp-toc__rail-dot--progress {
  fill: var(--text-1);
}

.kp-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.kp-toc__item {
  position: relative;
  margin: 0;
  border-left: none;
  padding: 0;
  min-height: 2.1rem;
}

.kp-toc__item--h3 {
  padding-left: 1rem;
}

.kp-toc__link {
  display: block;
  padding: 0.4rem 0;
  font-size: 1rem;
  /* v0.66.10.14.9.2 — explicit weight; passive and active share weight
     so toggling .is-active never reflows the text and shifts the rail. */
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.15s ease;
}

.kp-toc__link:hover {
  color: var(--text-1);
}

.kp-toc__item.is-passed > .kp-toc__link {
  color: var(--text-2);
}

.kp-toc__item.is-active > .kp-toc__link {
  color: var(--text-1);
}

/* ── Table of Contents (Mobile compact bar + panel) — v0.66.10.14
   Sticky below the site header; appears after the hero leaves the
   viewport. Tap bar → expand panel (same tocItems source).
   ─────────────────────────────────────────────────────────────── */
.kp-toc-mobile {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  margin: 0 calc(-1 * var(--bs-gutter-x, 0.75rem)) 0.75rem;
}

.kp-toc-mobile__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
}

.kp-toc-mobile__bar:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.kp-toc-mobile__bar-prev,
.kp-toc-mobile__bar-next {
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kp-toc-mobile__bar-next {
  text-align: right;
}

.kp-toc-mobile__bar-prev.is-empty,
.kp-toc-mobile__bar-next.is-empty {
  visibility: hidden;
}

.kp-toc-mobile__bar-current {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
  text-align: center;
}

.kp-toc-mobile__bar-caret {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.kp-toc-mobile__bar.is-expanded .kp-toc-mobile__bar-caret {
  transform: rotate(180deg);
}

.kp-toc-mobile__panel {
  max-height: 50vh;
  overflow-y: auto;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0.875rem 0.75rem;
}

.kp-toc-mobile__panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kp-toc-mobile__panel-item {
  margin: 0;
}

.kp-toc-mobile__panel-item--h3 {
  padding-left: 1rem;
}

.kp-toc-mobile__panel-link {
  display: block;
  padding: 0.45rem 0;
  font-size: 1rem;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.45;
}

.kp-toc-mobile__panel-link:hover {
  color: var(--text-1);
}

.kp-toc-mobile__panel-item.is-active > .kp-toc-mobile__panel-link {
  color: var(--text-1);
  font-weight: 600;
}

/* ── Sticky Mini Player — styles now in article-player.css ─────── */

/* ── Mini Progress Bar ─────────────────────────────────────────── */
.kp-mini-progress {
  height: 4px;
  background: var(--surface-3, var(--border));
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.kp-mini-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ── Mobile Sticky Player (bottom) ─────────────────────────────── */
.kp-mobile-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

/* ── Alpine Transitions ────────────────────────────────────────── */
.transition-transform {
  transition: transform 0.2s ease;
}
.translate-y-neg {
  transform: translateY(-100%);
}
.translate-y-0 {
  transform: translateY(0);
}
.transition-transform-up {
  transition: transform 0.2s ease;
}
.translate-y-full {
  transform: translateY(100%);
}

/* ═══════════════════════════════════════════════════════════════════
   Hub Page — Fan Stack Category Cards + Mobile Accordion
   ═══════════════════════════════════════════════════════════════════ */

/* ── Desktop: Fan Stack Cards ──────────────────────────────────── */
.kp-fan-stack {
  position: relative;
  width: 100%;
  height: 280px;
  display: block;
}

.kp-fan-stack__card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-3, 0.75rem);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

/* Background cards — stacked behind, not clickable by default */
.kp-fan-stack__card--bg2 {
  z-index: 1;
  transform: scale(0.9);
  background: var(--surface-2);
  opacity: 0.7;
  pointer-events: none;
}

.kp-fan-stack__card--bg1 {
  z-index: 2;
  transform: scale(0.95);
  background: var(--surface-2);
  opacity: 0.85;
  pointer-events: none;
}

/* Main card */
.kp-fan-stack__card--main {
  z-index: 3;
  background: var(--surface-1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Fan-out on hover — bg cards slide right+up, become interactive */
.kp-fan-stack:hover .kp-fan-stack__card--bg2 {
  transform: translateX(40px) translateY(-24px) rotate(4deg) scale(0.92);
  opacity: 1;
  pointer-events: auto;
}

.kp-fan-stack:hover .kp-fan-stack__card--bg1 {
  transform: translateX(20px) translateY(-12px) rotate(2deg) scale(0.96);
  opacity: 1;
  pointer-events: auto;
}

.kp-fan-stack:hover .kp-fan-stack__card--main {
  transform: translateX(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Bg card hover highlight */
.kp-fan-stack__card--bg1:hover,
.kp-fan-stack__card--bg2:hover {
  border-color: var(--primary);
  background: var(--surface-1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Article list inside bg cards */
.kp-fan-stack__article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  justify-content: center;
}

.kp-fan-stack__article-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-2);
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-2, 0.375rem);
  transition: all 0.2s ease;
  line-height: 1.3;
}

.kp-fan-stack__article-link span {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kp-fan-stack__article-link .kp-icon {
  flex-shrink: 0;
  opacity: 0.5;
}

.kp-fan-stack__article-link:hover {
  background: var(--primary-subtle, rgba(4, 120, 87, 0.06));
  color: var(--primary);
}

.kp-fan-stack__article-link:hover .kp-icon {
  opacity: 1;
  color: var(--primary);
}

/* Article count badge */
.kp-fan-stack__count {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--text-1);
  color: var(--surface-1);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-2, 0.5rem);
  z-index: 4;
}

/* Main card body */
.kp-fan-stack__body {
  text-align: center;
}

.kp-fan-stack__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-subtle, rgba(4, 120, 87, 0.08));
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.kp-fan-stack__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}

.kp-fan-stack__desc {
  font-size: 0.8125rem;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

/* ========================================================================
   Hub Card — sub-hub level (icon + title + desc + count)
   ======================================================================== */
.kp-hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 2rem 1.5rem 1.5rem;
  border-radius: var(--radius-3, 0.75rem);
  background: var(--surface-1);
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  color: var(--text-1);
}

.kp-hub-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  color: var(--text-1);
}

.kp-hub-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-subtle, rgba(13, 109, 58, 0.08));
  color: var(--primary, #0d6d3a);
  margin-bottom: 1rem;
}

.kp-hub-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.5rem;
}

.kp-hub-card__desc {
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
  flex: 1;
}

.kp-hub-card__count {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary, #0d6d3a);
}

.kp-hub-card:hover .kp-hub-card__count .kp-icon {
  transform: translateX(3px);
  transition: transform 0.2s;
}

[data-theme="dark"] .kp-hub-card {
  background: var(--surface-1, #1a1a1a);
  border-color: var(--border, #333);
}

[data-theme="dark"] .kp-hub-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ========================================================================
   Content Card — full-bleed image card with bottom gradient
   ======================================================================== */
.kp-content-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 360px;
  border-radius: var(--radius-3, 0.75rem);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-3, #ddd);
  transition: box-shadow 0.3s, transform 0.3s;
  color: #fff;
}

/* Fallback when no featured image */
.kp-content-card:not([style*="background-image"]) {
  background: linear-gradient(135deg, var(--primary-dark, #2a4a3a) 0%, var(--surface-inverse, #1a2e24) 100%);
}

.kp-content-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
  color: #fff;
}

/* ── Bottom gradient overlay ─────────────────────────────────── */
.kp-content-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.5) 45%,
    rgba(0, 0, 0, 0.1) 70%,
    transparent 100%
  );
  border-radius: inherit;
  transition: opacity 0.3s;
}

.kp-content-card:hover .kp-content-card__overlay {
  opacity: 0.9;
}

/* ── Body — positioned over gradient ─────────────────────────── */
.kp-content-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.kp-content-card__meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  padding: 0.125rem 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.85);
}

.kp-content-card__meta-pill .kp-icon {
  opacity: 0.7;
}

.kp-content-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.kp-content-card__desc {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

.kp-content-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  width: fit-content;
  margin-top: 0.75rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-1, #1a1a1a);
  transition: background 0.2s, transform 0.2s;
}

.kp-content-card:hover .kp-content-card__cta {
  background: #fff;
  transform: translateX(2px);
}

@media (max-width: 575.98px) {
  .kp-content-card {
    height: 300px;
  }
}

/* ── Mobile: Accordion + Horizontal Scroll ─────────────────────── */
.kp-hub-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-1);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-3, 0.75rem);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
}

.kp-hub-category-header:hover,
.kp-hub-category-header.is-active {
  background: var(--surface-2);
  border-color: var(--primary);
}

.kp-hub-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-subtle, rgba(4, 120, 87, 0.08));
  color: var(--primary);
  flex-shrink: 0;
}

.kp-hub-category-chevron {
  transition: transform 0.3s ease;
}

.kp-hub-category-header.is-active .kp-hub-category-chevron {
  transform: rotate(180deg);
}

.kp-hub-article-slider {
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-3, 0.75rem) var(--radius-3, 0.75rem);
  margin-top: -0.5rem;
  padding-top: 0.5rem;
}

.kp-hub-article-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.kp-hub-article-track::-webkit-scrollbar {
  display: none;
}

.kp-hub-article-card {
  min-width: 130px;
  max-width: 150px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-2, 0.5rem);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-1);
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kp-hub-article-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kp-hub-article-card .kp-icon {
  color: var(--text-3);
}

.kp-hub-article-card--all {
  background: var(--primary-subtle, rgba(4, 120, 87, 0.08));
  border-color: transparent;
  color: var(--primary);
}

.kp-hub-article-card--all .kp-icon {
  color: var(--primary);
}

/* ========================================================================
   Dark Mode — Article Body, Callouts, Disclaimer
   ======================================================================== */
[data-theme="dark"] .kp-callout--info {
  background: rgba(59, 130, 246, 0.1);
}
[data-theme="dark"] .kp-callout--warning {
  background: rgba(245, 158, 11, 0.1);
}
[data-theme="dark"] .kp-callout--tip {
  background: rgba(16, 185, 129, 0.1);
}
[data-theme="dark"] .kp-callout--note {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .kp-disclaimer {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border, #333);
}
[data-theme="dark"] .kp-trust-bar {
  background: var(--surface-2, #1a1a1a);
  border-color: var(--border, #333);
}
[data-theme="dark"] .kp-content-body .kp-table-wrap {
  border-color: var(--border, #333);
}

/* ========================================================================
   Print Styles — Articles
   ======================================================================== */
@media print {
  /* v0.66.10.15.5.3 — kp-share-sidebar (legacy desktop column) and
     kp-share-row print-hide rules now live in public-engagement.css
     alongside the rules they govern. The content print block keeps
     only the content-body-scoped surfaces. */
  .kp-toc, .kp-related,
  .kp-hero-player, .kp-sticky-player,
  .kp-content-hero__meta--grid,
  .kp-hero-player__badge,
  nav[aria-label="breadcrumb"],
  footer, header, .kp-footer,
  .kp-topbar, .kp-fab { display: none !important; }

  .kp-article-content,
  .kp-content-body { max-width: 100%; }

  .kp-content-body a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
    color: #666;
  }
  .kp-content-body a[href^="#"]::after,
  .kp-content-body a[href^="javascript"]::after { content: ""; }

  .kp-content-body h2 { page-break-after: avoid; }
  .kp-content-body img { page-break-inside: avoid; }

  .kp-author-card { border: 1px solid #ccc; }
  .kp-disclaimer { border-style: solid; }
}
