/* ============================================================
   Vibromera Knowledge Base — Design System (modern docs)
   Brand: navy #012169 + red #C8102E accent. Light theme.
   ============================================================ */

:root {
  /* Brand */
  --navy:        #012169;
  --navy-dark:   #001543;
  --navy-700:    #0a2f7a;
  --navy-600:    #1340a0;
  --navy-500:    #2a5bd0;
  --navy-tint:   #eaf0f9;
  --navy-tint-2: #dce7f6;
  --red:         #c8102e;
  --red-600:     #a50d26;
  --red-tint:    #fdecef;

  /* Per-domain accent (overridden per-build via inline <style>):root */
  --domain-primary: var(--navy);

  /* Ink & neutrals */
  --ink:      #1a1a1a;
  --ink-soft: #33445a;
  --muted:    #5a6472;
  --faint:    #5f6e82;
  --line:     #e2e8f0;
  --line-2:   #eef2f7;

  /* Surfaces */
  --bg:        #ffffff;
  --bg-page:   #f7f9fc;
  --bg-soft:   #f6f8fc;
  --bg-sidebar:#fbfcfe;
  --bg-code:   #f3f5f9;

  /* Callout palettes */
  --info-bg:#eef3fb;   --info-bd:#2a5bd0;
  --tip-bg:#eaf6ef;    --tip-bd:#1f9d57;
  --warn-bg:#fff6e6;   --warn-bd:#e0930a;
  --ok-bg:#e9f7ef;     --ok-bd:#1f9d57;
  --case-bg:#eef3fb;   --case-bd:#012169;

  /* Metrics */
  --topbar-h: 64px;
  --sidebar-w: 290px;
  --toc-w: 232px;
  --content-max: 760px;
  --wrap-max: 1440px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,34,64,.06), 0 1px 3px rgba(16,34,64,.05);
  --shadow-md: 0 4px 16px rgba(16,34,64,.08);
  --shadow-lg: 0 12px 40px rgba(16,34,64,.14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red); }

/* ---------- Reading progress ---------- */
#kb-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--navy), var(--red));
  z-index: 1200; transition: width .1s linear;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.kb-topbar {
  position: sticky; top: 0; z-index: 1000;
  height: var(--topbar-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.kb-topbar__inner {
  max-width: var(--wrap-max); width: 100%; margin: 0 auto;
  padding: 0 24px; display: flex; align-items: center; gap: 18px;
}
.kb-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.7rem; color: var(--navy); letter-spacing: -.02em; }
.kb-brand:hover { color: var(--navy); }
.kb-brand__mark {
  width: 6px; height: 26px; border-radius: 3px; flex: none;
  background: var(--domain-primary);
  display: inline-block;
}
.kb-nav { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.kb-nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--muted);
  font-weight: 500; font-size: 1rem;
}
.kb-nav a:hover { background: var(--bg-soft); color: var(--navy); }
.kb-nav a.is-active { color: var(--domain-primary); background: var(--navy-tint); }
.kb-topbar__spacer { flex: 1; }

.kb-search {
  position: relative; width: 230px; max-width: 36vw;
}
.kb-search input {
  width: 100%; height: 38px; padding: 0 12px 0 36px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
  font: inherit; font-size: .9rem; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
.kb-search input:focus { outline: none; border-color: var(--navy-500); background: #fff; box-shadow: 0 0 0 3px var(--navy-tint); }
.kb-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }

.kb-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--domain-primary); color: #fff; font-weight: 700; font-size: .9rem;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.kb-cta:hover { background: var(--domain-primary); filter: brightness(.88); color: #fff; transform: translateY(-1px); }

.kb-burger {
  display: none; width: 40px; height: 40px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}
.kb-burger svg { width: 20px; height: 20px; color: var(--navy); }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.kb-shell {
  max-width: var(--wrap-max); margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  gap: 0;
  align-items: start;
}
/* full-width layout (index/pillar) has no left/right rails handled per-page */

/* ---------- Left sidebar ---------- */
.kb-sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: var(--bg-sidebar);
  padding: 22px 14px 60px 22px;
}
.kb-sidebar__title {
  font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); font-weight: 700; margin: 4px 0 12px 6px;
}
.kb-sidefilter { position: relative; margin-bottom: 16px; }
.kb-sidefilter input {
  width: 100%; height: 36px; padding: 0 10px 0 32px; font: inherit; font-size: .86rem;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
.kb-sidefilter input:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px var(--navy-tint); }
.kb-sidefilter svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }

.kb-navgroup { margin-bottom: 18px; }
.kb-navgroup__label {
  display: flex; align-items: center; gap: 8px;
  font-size: .73rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin: 0 0 7px 6px;
}
.kb-navgroup__label .kb-ico { width: 15px; height: 15px; color: var(--navy-500); flex: none; }
.kb-navgroup ul { list-style: none; }
.kb-navgroup li { margin: 1px 0; }
.kb-navgroup a {
  display: block; padding: 6px 10px 6px 12px; border-radius: 8px;
  color: var(--ink-soft); font-size: .885rem; line-height: 1.4;
  border-left: 2px solid transparent;
}
.kb-navgroup a:hover { background: var(--navy-tint); color: var(--navy); }
.kb-navgroup a.is-current {
  background: var(--navy-tint); color: var(--navy); font-weight: 650;
  border-left-color: var(--red);
}
.kb-sidebar__empty { display: none; color: var(--faint); font-size: .85rem; padding: 10px 8px; }

/* ---------- Main content ---------- */
.kb-main { min-width: 0; padding: 30px 56px 90px; }
.kb-article { max-width: var(--content-max); margin: 0 auto; }

.kb-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); margin-bottom: 22px; }
.kb-breadcrumbs a { color: var(--muted); }
.kb-breadcrumbs a:hover { color: var(--navy); }
.kb-breadcrumbs .sep { color: var(--faint); }
.kb-breadcrumbs .current { color: var(--ink-soft); font-weight: 600; }

.kb-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy-600); background: var(--navy-tint); padding: 4px 11px; border-radius: 999px; margin-bottom: 16px;
}
.kb-reviewed { font-size: .8rem; color: var(--faint); margin: -8px 0 22px; }
.kb-glossary { margin: 22px 0 0; }
.kb-glossary dt { font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-top: 22px; scroll-margin-top: 84px; }
.kb-glossary dt:first-of-type { margin-top: 6px; }
.kb-glossary dd { margin: 5px 0 0; color: var(--ink-soft); }

/* At-a-glance + checklist + next-step */
.kb-atglance { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 32px; }
.kb-atglance__sum { font-size: 1.05rem; color: var(--ink); margin: 0 0 16px; line-height: 1.55; }
.kb-atglance__tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: var(--navy-tint); padding: 3px 9px; border-radius: 999px; margin-right: 9px; vertical-align: middle; }
.kb-ag__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.kb-ag__col .kb-ag__h { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; color: #0e6e37; }
.kb-ag__col--no .kb-ag__h { color: #8a5a00; }
.kb-ag__col ul { list-style: none; margin: 0; }
.kb-ag__col li { position: relative; padding-left: 18px; font-size: .9rem; margin-bottom: 6px; color: var(--ink-soft); line-height: 1.45; }
.kb-ag__col li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--tip-bd); }
.kb-ag__col--no li::before { border-radius: 1px; background: var(--warn-bd); }

.kb-checklist { margin: 50px 0 0; padding: 24px 26px; background: var(--navy-tint); border-radius: var(--radius); }
.kb-checklist h2 { margin: 0 0 14px; font-size: 1.25rem; color: var(--navy); padding: 0; }
.kb-checklist h2::before { display: none; }
.kb-checklist ul { list-style: none; margin: 0; }
.kb-checklist li { position: relative; padding: 7px 0 7px 30px; border-top: 1px solid var(--navy-tint-2); font-size: .96rem; }
.kb-checklist li:first-child { border-top: none; }
.kb-checklist li::before { content: ""; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; border: 2px solid var(--navy-500); border-radius: 4px; }
.kb-next { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 0; padding: 14px 18px; border-left: 4px solid var(--red); background: var(--red-tint); border-radius: 8px; font-weight: 500; color: var(--ink); }
.kb-next__label { flex: none; font-weight: 800; color: var(--red-600); text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; }
@media (max-width: 560px) { .kb-ag__cols { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- Typography (article) ---------- */
.kb-article h1 {
  font-size: 2.35rem; line-height: 1.15; letter-spacing: -.025em;
  color: var(--navy-dark); font-weight: 800; margin-bottom: 14px;
}
.kb-article > .kb-lead, .kb-article .intro > p:first-child {
  font-size: 1.16rem; line-height: 1.6; color: var(--ink-soft); margin-bottom: 26px;
}
.kb-article h2 {
  font-size: 1.62rem; line-height: 1.25; letter-spacing: -.015em; color: var(--navy);
  font-weight: 750; margin: 52px 0 16px; padding-top: 8px; scroll-margin-top: 84px;
}
.kb-article h2::before {
  content: ""; display: block; width: 42px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--navy), var(--red)); margin-bottom: 14px;
}
.kb-article h3 { font-size: 1.26rem; color: var(--navy-700); font-weight: 700; margin: 34px 0 12px; scroll-margin-top: 84px; }
.kb-article h4 { font-size: 1.06rem; color: var(--ink); font-weight: 700; margin: 24px 0 10px; }
.kb-article p { margin: 0 0 1.15em; }
.kb-article strong { font-weight: 700; color: var(--ink); }
.kb-article a { font-weight: 550; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--navy-600) 30%, transparent); text-underline-offset: 2px; }
.kb-article a:hover { text-decoration-color: var(--red); }

.kb-article ul, .kb-article ol { margin: 0 0 1.2em 1.3em; }
.kb-article li { margin-bottom: .5em; padding-left: 4px; }
.kb-article ul > li::marker { color: var(--red); }
.kb-article ol > li::marker { color: var(--navy-600); font-weight: 700; }

.kb-article hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ---------- Tables ---------- */
.kb-article .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.kb-article table { width: 100%; border-collapse: collapse; font-size: .94rem; background: #fff; }
.kb-article .table-responsive table { margin: 0; }
.kb-article th { background: var(--navy-tint); color: var(--navy); text-align: left; font-weight: 700; padding: 12px 15px; border-bottom: 2px solid var(--navy-tint-2); white-space: nowrap; }
.kb-article td { padding: 11px 15px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.kb-article tbody tr:last-child td { border-bottom: none; }
.kb-article tbody tr:hover { background: var(--bg-soft); }

/* ---------- Images ---------- */
.kb-article .image-container, .kb-article figure { margin: 28px 0; text-align: center; }
.kb-article .image-container img, .kb-article figure img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.kb-article .image-caption, .kb-article figcaption, .kb-article .chart-caption {
  margin-top: 10px; font-size: .85rem; color: var(--muted); font-style: italic; text-align: center;
}

/* ---------- Callout boxes ---------- */
.kb-article .info-box, .kb-article .tip-box, .kb-article .warning-box,
.kb-article .success-box, .kb-article .case-study, .kb-article .analogy-box {
  position: relative; margin: 26px 0; padding: 18px 20px 18px 52px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--info-bd);
  background: var(--info-bg); font-size: .97rem;
}
.kb-article .info-box > :last-child, .kb-article .tip-box > :last-child, .kb-article .warning-box > :last-child,
.kb-article .success-box > :last-child, .kb-article .case-study > :last-child, .kb-article .analogy-box > :last-child { margin-bottom: 0; }
.kb-article .info-box::before, .kb-article .tip-box::before, .kb-article .warning-box::before,
.kb-article .success-box::before, .kb-article .case-study::before, .kb-article .analogy-box::before {
  content: ""; position: absolute; left: 16px; top: 18px; width: 22px; height: 22px;
  background-repeat: no-repeat; background-position: center; background-size: contain;
}
/* info (blue i) */
.kb-article .info-box { background: var(--info-bg); border-left-color: var(--info-bd); }
.kb-article .info-box::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a5bd0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E"); }
/* tip (lightbulb) */
.kb-article .tip-box, .kb-article .analogy-box { background: var(--tip-bg); border-left-color: var(--tip-bd); }
.kb-article .tip-box::before, .kb-article .analogy-box::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f9d57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.3h6c0-1 .4-1.8 1-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
/* warning (triangle) */
.kb-article .warning-box { background: var(--warn-bg); border-left-color: var(--warn-bd); }
.kb-article .warning-box::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0930a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
/* success / case (check) */
.kb-article .success-box, .kb-article .case-study { background: var(--ok-bg); border-left-color: var(--ok-bd); }
.kb-article .success-box::before, .kb-article .case-study::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f9d57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.1V12a10 10 0 1 1-5.9-9.1'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E"); }
.kb-article .case-study h4 { margin-top: 0; color: var(--navy); }

/* internal-link pill */
.kb-article .internal-link {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin: 24px 0;
  background: var(--navy-tint); border: 1px solid var(--navy-tint-2); border-radius: var(--radius-sm);
  font-weight: 600;
}
.kb-article .internal-link::before {
  content: ""; flex: none; width: 20px; height: 20px; background-repeat: no-repeat; background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23012169' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}
.kb-article .internal-link a { text-decoration: none; }

/* ---------- CTA blocks ---------- */
.kb-article .cta-inline, .kb-article .cta-main {
  margin: 36px 0; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%);
  color: #fff; box-shadow: var(--shadow-md); text-align: center;
}
.kb-article .cta-main { padding: 36px 32px; }
.kb-article .cta-inline h3, .kb-article .cta-main h2, .kb-article .cta-main h3 { color: #fff; margin: 0 0 8px; }
.kb-article .cta-main h2::before { display: none; }
.kb-article .cta-inline p, .kb-article .cta-main p { color: rgba(255,255,255,.9); }
.kb-article .cta-inline a, .kb-article .cta-main a { text-decoration: none; }
.kb-article .cta-main > div[style] { text-align: left; }
.kb-article .cta-main .btn-primary, .kb-article .cta-inline .btn-primary { color: var(--navy) !important; }

.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; margin: 10px 6px 0; font: inherit; font-weight: 700; font-size: .95rem;
  border-radius: 999px; border: none; cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s; text-decoration: none;
}
.btn-primary { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--navy); }
.btn-secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-secondary:hover { background: #fff; color: var(--navy); }

/* nested white cards inside CTA */
.kb-article .cta-main div[style*="f8f9fa"], .kb-article .cta-inline div[style*="f8f9fa"] {
  background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.18) !important; border-radius: 10px !important;
}
.kb-article .cta-main div[style*="f8f9fa"] h3, .kb-article .cta-main div[style*="f8f9fa"] p { color: #fff !important; }

/* interactive demo (charts) */
.kb-article .interactive-demo {
  background: var(--bg-soft) !important; border: 1px solid var(--navy-tint-2) !important;
  border-radius: var(--radius) !important; padding: 24px !important; margin: 32px 0 !important;
}
.kb-article .interactive-demo h4 { color: var(--navy) !important; }
.kb-article .interactive-demo select { font: inherit; }
.kb-article .chart-container { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }

/* ---------- Related articles ---------- */
.kb-article .related-articles { margin: 48px 0 0; padding: 0; background: none; }
.kb-article .related-articles > h3 {
  font-size: 1.05rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; margin: 0 0 16px;
}
.kb-article .article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.kb-article .article-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.kb-article .article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--navy-tint-2); }
.kb-article .article-card h4 { margin: 0 0 6px; font-size: 1rem; }
.kb-article .article-card h4 a { text-decoration: none; color: var(--navy); }
.kb-article .article-card p { font-size: .86rem; color: var(--muted); margin: 0; }

/* ---------- Prev / next pager ---------- */
.kb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 0; }
.kb-pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; text-decoration: none;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.kb-pager a:hover { border-color: var(--navy-tint-2); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.kb-pager .dir { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; }
.kb-pager .ttl { font-weight: 650; color: var(--navy); }
.kb-pager .next { text-align: right; }
.kb-pager .next .ttl { justify-self: end; }

/* ============================================================
   RIGHT TOC
   ============================================================ */
.kb-toc {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 30px 22px 60px 12px;
}
.kb-toc__title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 12px; }
.kb-toc ul { list-style: none; }
.kb-toc li { margin: 0; }
.kb-toc a {
  display: block; padding: 5px 12px; font-size: .83rem; line-height: 1.4; color: var(--muted);
  border-left: 2px solid var(--line); transition: color .12s, border-color .12s;
}
.kb-toc a:hover { color: var(--navy); }
.kb-toc a.is-active { color: var(--navy); border-left-color: var(--red); font-weight: 650; }
.kb-toc li.lvl-3 a { padding-left: 24px; font-size: .8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.kb-footer { background: var(--navy-dark); color: #c7d2e6; margin-top: 0; padding: 52px 24px 26px; }
.kb-footer__inner { max-width: var(--wrap-max); margin: 0 auto; }
.kb-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; }
.kb-footer h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; padding: 0; font-weight: 700; }
.kb-footer h2::before { display: none; }
.kb-footer p { font-size: .9rem; margin-bottom: 8px; }
.kb-footer ul { list-style: none; }
.kb-footer li { margin-bottom: 7px; }
.kb-footer a { color: #a9c0e8; font-size: .9rem; }
.kb-footer a:hover { color: #fff; }
.kb-footer__legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 20px; font-size: .82rem; color: rgba(255,255,255,.62); text-align: center; }
.kb-footer__legal a { color: rgba(255,255,255,.82); }
.kb-footer__bottom { text-align: center; font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 12px; }
.external-icon { font-size: .8em; opacity: .8; }

/* ============================================================
   LANDING (index / pillar)
   ============================================================ */
.kb-page { max-width: 1080px; margin: 0 auto; padding: 0 24px 90px; }
.kb-hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--navy-tint) 100%);
  color: var(--ink); padding: 60px 40px 56px; margin-bottom: 8px; text-align: center;
}
.kb-hero > * { position: relative; z-index: 1; }
.kb-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--navy); font-weight: 700; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.kb-hero .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.kb-hero h1 { color: var(--navy-dark); font-size: 2.9rem; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; margin-bottom: 18px; }
.kb-hero p { font-size: 1.18rem; color: var(--muted); max-width: 720px; margin: 0 auto 26px; }
.kb-herosearch { max-width: 540px; margin: 0 auto; position: relative; }
.kb-herosearch input {
  width: 100%; height: 52px; padding: 0 18px 0 48px; border-radius: 14px; border: none;
  font: inherit; font-size: 1rem; box-shadow: var(--shadow-lg);
}
.kb-herosearch input:focus { outline: none; box-shadow: 0 0 0 4px rgba(255,255,255,.3), var(--shadow-lg); }
.kb-herosearch svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--faint); }

.kb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 16px; margin: 30px 0 10px; }
.kb-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); }
.kb-stat b { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.kb-stat span { font-size: .85rem; color: var(--muted); }

.kb-section-title { font-size: 1.7rem; color: var(--navy); font-weight: 750; letter-spacing: -.02em; margin: 56px 0 6px; }
.kb-section-sub { color: var(--muted); margin-bottom: 26px; }

.kb-featured {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-600) 100%); color: #fff;
  border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow-md); margin-top: 14px;
}
.kb-featured__icon { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; }
.kb-featured__icon svg { width: 28px; height: 28px; color: #fff; }
.kb-featured h3 { color: #fff; margin: 0 0 4px; font-size: 1.3rem; }
.kb-featured p { color: rgba(255,255,255,.88); margin: 0; font-size: .95rem; }
.kb-featured .btn-primary { margin: 0; white-space: nowrap; }

.kb-catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 26px; }
.kb-catcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s, border-color .15s; }
.kb-catcard:hover { box-shadow: var(--shadow-md); }
.kb-catcard__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kb-catcard__icon { width: 42px; height: 42px; border-radius: 11px; background: var(--navy-tint); display: grid; place-items: center; flex: none; }
.kb-catcard__icon svg { width: 22px; height: 22px; color: var(--navy-600); }
.kb-catcard__head h3 { margin: 0; font-size: 1.12rem; color: var(--navy); }
.kb-catcard__head span { font-size: .78rem; color: var(--faint); font-weight: 600; }
.kb-catcard ul { list-style: none; margin: 0; }
.kb-catcard li { margin: 0; border-top: 1px solid var(--line-2); }
.kb-catcard li:first-child { border-top: none; }
.kb-catcard li a { display: block; padding: 9px 4px; color: var(--ink-soft); font-size: .92rem; text-decoration: none; transition: color .12s, padding .12s; }
.kb-catcard li a:hover { color: var(--navy); padding-left: 8px; }
.kb-catcard li a b { color: var(--navy); font-weight: 650; }

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; width: 56px; height: 56px; z-index: 900;
  background: #25d366; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45); transition: transform .15s;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Back to top ---------- */
.kb-totop {
  position: fixed; right: 22px; bottom: 88px; width: 44px; height: 44px; z-index: 900;
  background: #fff; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center;
  box-shadow: var(--shadow-md); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.kb-totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.kb-totop svg { width: 20px; height: 20px; color: var(--navy); }

/* ---------- Mobile drawer scrim ---------- */
.kb-scrim { position: fixed; inset: 0; background: rgba(16,34,64,.45); z-index: 1050; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.kb-scrim.show { opacity: 1; visibility: visible; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  .kb-shell { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  .kb-toc { display: none; }
  .kb-main { padding: 30px 40px 80px; }
}
@media (max-width: 920px) {
  :root { --sidebar-w: 280px; }
  .kb-nav { display: none; }
  .kb-burger { display: flex; }
  .kb-shell { grid-template-columns: minmax(0,1fr); }
  .kb-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-w); max-width: 86vw;
    z-index: 1060; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
    padding-top: 18px;
  }
  .kb-sidebar.open { transform: translateX(0); }
  .kb-main { padding: 26px 22px 70px; }
  .kb-search { display: none; }
  .kb-hero h1 { font-size: 2.2rem; }
  .kb-hero { padding: 48px 24px 40px; }
  .kb-featured { grid-template-columns: 1fr; text-align: center; }
  .kb-featured__icon { margin: 0 auto; }
  .kb-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .kb-article h1 { font-size: 1.85rem; }
  .kb-article h2 { font-size: 1.4rem; }
  .kb-pager { grid-template-columns: 1fr; }
  .kb-main { padding: 22px 16px 60px; }
  .kb-article .info-box, .kb-article .tip-box, .kb-article .warning-box,
  .kb-article .success-box, .kb-article .case-study, .kb-article .analogy-box { padding-left: 48px; }
  .btn-primary, .btn-secondary { display: flex; width: 100%; margin: 8px 0 0; }
}

/* ---------- Print ---------- */
@media print {
  .kb-topbar, .kb-sidebar, .kb-toc, .whatsapp-float, .kb-totop, .kb-pager, .cta-inline, .cta-main, #kb-progress { display: none !important; }
  .kb-shell { display: block; }
  .kb-main { padding: 0; }
  body { font-size: 12pt; color: #000; }
  .kb-article a { color: #000; }
}

/* Privacy-friendly map link (replaces third-party Google Maps iframe) */
.kb-map-link{margin:1rem 0}
.kb-map-link a{display:inline-flex;align-items:center;gap:.4rem;padding:.6rem 1rem;
  background:var(--navy,#0f2747);color:#fff;border-radius:8px;font-weight:600;
  text-decoration:none;transition:background .15s}
.kb-map-link a:hover{background:var(--red,#c8102e)}

/* Shop external-link notice ("vibromera.eu — online shop") */
.kb-cta-wrap{display:flex;flex-direction:column;align-items:center;gap:2px}
.kb-cta-note{display:block;font-size:.68rem;opacity:.75;text-align:center;
  white-space:nowrap;color:var(--navy,#0f2747)}

.kb-featured__cta{display:inline-flex;flex-direction:column;align-items:center;gap:4px}
.kb-featured__cta .kb-cta-note{color:var(--faint,#5f6e82);font-size:.75rem}
