/* ═══════════════════════════════════════════════════════════════════════════
   Blog kalkulatorb2b.pl — motyw Ghost
   Tokeny skopiowane z planer/packages/brand/tokens.css (źródło prawdy).
   Kierunek: „nowoczesny księgowy” — papier, atrament, szmaragd. IBM Plex.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Kroje (hostowane lokalnie — nigdy Google Fonts, BRAND.md §4) ───────── */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

/* ─── Tokeny marki ─────────────────────────────────────────────────────── */
:root {
  --background: oklch(0.994 0.002 95);
  --foreground: oklch(0.20 0.006 75);
  --card: oklch(1 0 0);
  --primary: oklch(0.52 0.14 158);
  --primary-foreground: oklch(0.99 0.01 150);
  --primary-bright: oklch(0.68 0.14 158);
  --muted: oklch(0.965 0.004 90);
  --muted-foreground: oklch(0.50 0.01 80);
  --border: oklch(0.915 0.004 85);
  --ring: oklch(0.55 0.14 158);
  --warning: oklch(0.72 0.16 75);
  --destructive: oklch(0.55 0.2 25);
  --chart-vat: oklch(0.55 0.13 240);
  --forecast: oklch(0.5 0.05 255);
  --ink-surface: oklch(0.20 0.006 75);
  --ink-foreground: oklch(0.93 0.004 90);
  --ink-muted: oklch(0.72 0.006 85);

  --radius: 0.5rem;
  --radius-xl: 0.75rem;

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1140px;
  --narrow: 720px;
  --gap: clamp(16px, 4vw, 32px);
}

/* ─── Podstawa ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.kb-site { min-height: 100vh; display: flex; flex-direction: column; }
.kb-main { flex: 1; }
.kb-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gap); }
.kb-container--narrow { max-width: calc(var(--narrow) + 2 * var(--gap)); }

.kb-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.kb-label--accent { color: var(--primary); }
.kb-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.kb-autopilot { letter-spacing: 0.08em; font-weight: 600; }

/* ─── Przyciski — atramentowe na jasnym, szmaragdowe na atramencie ──────── */
.kb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border: 0; border-radius: var(--radius);
  font: 500 15px/1 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
.kb-btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.kb-btn--ink { background: var(--foreground); color: var(--background); }
.kb-btn--ink:hover { opacity: .88; }
.kb-btn--emerald { background: var(--primary-bright); color: var(--ink-surface); font-weight: 600; }
.kb-btn--emerald:hover { background: oklch(0.74 0.14 158); }

/* ─── Nagłówek ─────────────────────────────────────────────────────────── */
.kb-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.kb-header__row { display: flex; align-items: center; gap: 16px; height: 60px; }
.kb-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--foreground); }
.kb-lockup__mark { width: 32px; height: 32px; flex-shrink: 0; }
.kb-lockup__text { display: flex; flex-direction: column; line-height: 1; }
.kb-lockup__name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.kb-lockup__sub { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.kb-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.kb-nav__link {
  font-size: 14px; font-weight: 500; color: var(--muted-foreground);
  text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer;
}
.kb-nav__link:hover, .kb-nav__link--active { color: var(--foreground); }
.kb-nav__search { display: inline-flex; }
@media (max-width: 640px) {
  .kb-nav { gap: 12px; }
  .kb-nav__link:not(.kb-nav__search) { display: none; }
  .kb-lockup__sub { display: none; }
}

/* ─── Strona główna bloga ───────────────────────────────────────────────── */
.kb-hero { padding: clamp(40px, 8vw, 80px) 0 clamp(24px, 4vw, 40px); }
.kb-hero__title {
  margin: 0; font-size: clamp(30px, 4.6vw, 44px); line-height: 1.12;
  font-weight: 600; letter-spacing: -0.02em; text-wrap: balance;
}
.kb-hero__lead { margin: 16px 0 0; font-size: 18px; color: var(--muted-foreground); max-width: 60ch; }

.kb-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.kb-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kb-card:hover { border-color: oklch(0.85 0.006 85); box-shadow: 0 6px 24px -12px oklch(0.2 0.006 75 / .25); transform: translateY(-1px); }
.kb-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.kb-card__image { margin: 0; aspect-ratio: 16 / 9; background: var(--muted); }
.kb-card__image img { width: 100%; height: 100%; object-fit: cover; }
.kb-card__body { padding: 18px 20px 22px; }
.kb-card__title { margin: 10px 0 0; font-size: 19px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.kb-card__excerpt { margin: 8px 0 0; font-size: 14.5px; color: var(--muted-foreground); }
.kb-card.featured { border-color: oklch(0.80 0.06 158); }

.kb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted-foreground); }
.kb-chip {
  display: inline-block; padding: 3px 7px; border-radius: 4px;
  background: var(--muted); color: var(--muted-foreground);
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
}
a.kb-chip:hover { color: var(--foreground); }

.pagination { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 0; font-size: 14px; color: var(--muted-foreground); }
.pagination a { color: var(--foreground); text-decoration: none; font-weight: 500; }

/* ─── Wpis ─────────────────────────────────────────────────────────────── */
.kb-article__head { padding-top: clamp(28px, 6vw, 56px); }
.kb-back { display: inline-block; margin-bottom: 20px; font-size: 13px; color: var(--muted-foreground); text-decoration: none; }
.kb-back:hover { color: var(--foreground); }
.kb-article__title {
  margin: 12px 0 0; font-size: clamp(30px, 4.8vw, 42px); line-height: 1.15;
  font-weight: 600; letter-spacing: -0.02em; text-wrap: balance;
}
.kb-article__lead { margin: 14px 0 0; font-size: 19px; line-height: 1.5; color: var(--muted-foreground); }
.kb-author { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.kb-author__img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.kb-author__name { font-weight: 600; font-size: 15px; text-decoration: none; }
.kb-author__bio { margin: 2px 0 0; font-size: 13.5px; color: var(--muted-foreground); line-height: 1.45; }
.kb-author--big { border-top: 0; padding-top: 0; align-items: flex-start; }
.kb-author--big .kb-author__img { width: 88px; height: 88px; }
.kb-article__image { margin: 32px auto 0; }
.kb-article__image img { width: 100%; border-radius: var(--radius-xl); }
.kb-article__image figcaption { margin-top: 8px; font-size: 13px; color: var(--muted-foreground); text-align: center; }

/* Treść: wąska kolumna z miejscem na karty szerokie i pełne (Koenig) */
.kb-content {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gap), 1fr)
    [wide-start] minmax(0, 210px)
    [main-start] min(var(--narrow), calc(100% - 2 * var(--gap))) [main-end]
    minmax(0, 210px) [wide-end]
    minmax(var(--gap), 1fr) [full-end];
  margin-top: 36px;
  font-size: 18px; line-height: 1.7;
}
.kb-content > * { grid-column: main-start / main-end; margin: 0 0 1.15em; }
.kb-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.kb-content > .kg-width-full { grid-column: full-start / full-end; }
.kb-content > .kg-width-full img { width: 100%; }

.kb-content h2 { margin-top: 1.8em; margin-bottom: .55em; font-size: 27px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
.kb-content h3 { margin-top: 1.6em; margin-bottom: .45em; font-size: 21px; line-height: 1.3; font-weight: 600; }
.kb-content h4 { margin-top: 1.4em; margin-bottom: .4em; font-size: 18px; font-weight: 600; }
.kb-content a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.kb-content a:hover { text-decoration-thickness: 2px; }
.kb-content strong { font-weight: 700; }
.kb-content ul, .kb-content ol { padding-left: 1.3em; }
.kb-content li { margin: .35em 0; }
.kb-content li::marker { color: var(--muted-foreground); }
.kb-content hr { border: 0; height: 1px; background: var(--border); margin: 2.4em 0; }
.kb-content blockquote:not([class]) {
  border-left: 3px solid var(--primary); padding: 2px 0 2px 18px; color: oklch(0.32 0.008 75); font-style: italic;
}
.kb-content figcaption { margin-top: 8px; font-size: 14px; color: var(--muted-foreground); text-align: center; }
.kb-content img { border-radius: var(--radius); }

/* Kwoty i kod: IBM Plex Mono, cyfry tabelaryczne, przekreślone zero (BRAND.md §4) */
.kb-content code, .kb-content pre, .kb-num {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero;
}
.kb-content :not(pre) > code {
  padding: 2px 6px; border-radius: 4px; background: var(--muted); font-size: .86em;
}
.kb-content pre {
  overflow-x: auto; padding: 18px 20px; border-radius: var(--radius-xl);
  background: var(--ink-surface); color: var(--ink-foreground); font-size: 14.5px; line-height: 1.6;
}

/* Tabele — wygląd jak wynik w kalkulatorze */
.kb-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); }
.kb-content table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.kb-content th {
  text-align: left; padding: 11px 14px; background: var(--muted);
  font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground);
}
.kb-content td { padding: 11px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.kb-content td.kb-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero; font-size: 14px; white-space: nowrap; text-align: right; }
.kb-content th.kb-num { text-align: right; }
.kb-content tr:last-child td { font-weight: 500; }

/* Karty Koenig w barwach marki */
.kb-content .kg-callout-card { border-radius: var(--radius-xl); padding: 18px 20px; }
.kb-content .kg-callout-card-grey, .kb-content .kg-callout-card-white { background: var(--muted); }
.kb-content .kg-callout-card-green { background: oklch(0.96 0.03 158); }
.kb-content .kg-callout-card-yellow { background: oklch(0.97 0.04 85); }
.kb-content .kg-callout-card-blue { background: oklch(0.96 0.02 240); }
.kb-content .kg-callout-card-red { background: oklch(0.96 0.03 25); }
.kb-content .kg-callout-text { font-size: 16.5px; line-height: 1.6; }
.kb-content .kg-toggle-card { border-radius: var(--radius-xl); border-color: var(--border); }
.kb-content .kg-bookmark-card a.kg-bookmark-container { border-radius: var(--radius-xl); border-color: var(--border); color: var(--foreground); text-decoration: none; }
.kb-content .kg-button-card a.kg-btn-accent { background: var(--foreground) !important; color: var(--background) !important; border-radius: var(--radius); text-decoration: none; }
.kb-content .kg-header-card, .kb-content .kg-cta-card { border-radius: var(--radius-xl); }
.kb-content .kg-image-card img, .kb-content .kg-gallery-image img { border-radius: var(--radius); }

/* ─── Zaproszenie do AUTOPILOTA (powierzchnia atramentowa) ──────────────── */
.kb-cta {
  margin: 56px 0 0; padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-xl); background: var(--ink-surface); color: var(--ink-foreground);
}
.kb-cta__brand { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.kb-cta__mark { width: 26px; height: 26px; color: var(--ink-foreground); }
.kb-cta__title { margin: 16px 0 0; font-size: clamp(21px, 2.6vw, 26px); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; color: oklch(0.99 0 0); text-wrap: balance; }
.kb-cta__text { margin: 10px 0 22px; font-size: 16px; color: var(--ink-muted); }

/* ─── Newsletter ───────────────────────────────────────────────────────── */
.kb-subscribe {
  margin: 28px 0 64px; padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card);
}
.kb-subscribe__title { margin: 6px 0 0; font-size: 21px; line-height: 1.3; font-weight: 600; }
.kb-subscribe__text { margin: 8px 0 18px; font-size: 15px; color: var(--muted-foreground); }
.kb-subscribe__form { display: flex; flex-wrap: wrap; gap: 10px; }
.kb-subscribe__form input {
  flex: 1 1 240px; height: 44px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--background);
  font: 400 15px var(--font-sans); color: var(--foreground);
}
.kb-subscribe__form input:focus { outline: 2px solid var(--ring); outline-offset: 0; border-color: transparent; }
.kb-subscribe__msg { display: none; flex-basis: 100%; margin: 4px 0 0; font-size: 14px; }
.kb-subscribe__form.success .kb-subscribe__msg--ok { display: block; color: var(--primary); }
.kb-subscribe__form.error .kb-subscribe__msg--err { display: block; color: var(--destructive); }
.kb-subscribe__form.loading button { opacity: .6; pointer-events: none; }

.kb-related { margin: 8px auto 72px; }
.kb-related .kb-label { margin-bottom: 16px; }
.kb-comments { margin-bottom: 48px; }

/* ─── Stopka (atrament, jak na kalkulatorb2b.pl) ───────────────────────── */
.kb-footer { margin-top: auto; background: var(--ink-surface); color: var(--ink-muted); font-size: 14px; }
.kb-footer__grid {
  display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px;
  grid-template-columns: 2fr repeat(3, 1fr);
}
@media (max-width: 760px) { .kb-footer__grid { grid-template-columns: 1fr 1fr; } .kb-footer__grid > :first-child { grid-column: 1 / -1; } }
.kb-lockup--invert { color: var(--ink-foreground); }
.kb-lockup--invert .kb-lockup__sub { color: var(--ink-muted); }
.kb-footer__note { max-width: 42ch; margin: 16px 0 0; font-size: 13px; line-height: 1.55; }
.kb-footer__head { color: var(--ink-foreground); }
.kb-footer ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.kb-footer a { text-decoration: none; }
.kb-footer ul a:hover { color: var(--ink-foreground); }
.kb-footer__bottom { padding-top: 18px; padding-bottom: 28px; border-top: 1px solid oklch(0.30 0.006 75); font-size: 12.5px; }

/* ─── Karty przeniesione z MDX: kluczowe liczby i wykres ───────────────── */
.kb-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 1.6em 0 !important; }
.kb-stats__item { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); }
.kb-stats__value { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; white-space: nowrap; }
.kb-stats__label { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted-foreground); }
.kb-chart { margin: 1.8em 0; }
.kb-chart > figcaption { margin: 0 0 4px; text-align: left; font-size: 16px; font-weight: 600; color: var(--foreground); }
.kb-chart > p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
.kb-chart > div:first-of-type { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); }
.kb-chart > div:first-of-type > svg { width: 100%; min-width: 560px; height: auto; font-family: var(--font-mono); }
.kb-chart > div + div { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.kb-chart > div + div > span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.kb-chart > div + div svg { display: inline-block; }

/* ─── Pasek postępu czytania ───────────────────────────────────────────── */
.kb-progress { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 100%; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ─── Spis treści „W tym wpisie” ───────────────────────────────────────── */
.kb-toc { padding: 18px 22px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); margin-bottom: 2em !important; }
.kb-toc ol { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: toc; display: grid; gap: 6px; }
.kb-toc li { counter-increment: toc; display: flex; gap: 12px; margin: 0; font-size: 15.5px; line-height: 1.45; }
.kb-toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 13px; color: var(--muted-foreground); padding-top: 2px; }
.kb-content .kb-toc a { color: var(--foreground); text-decoration: none; }
.kb-content .kb-toc a:hover { color: var(--primary); }
.kb-content h2 { scroll-margin-top: 80px; }

/* ─── Wpis: obrazek hero i nagłówki sekcji ─────────────────────────────── */
.kb-article__image img { border: 1px solid var(--border); aspect-ratio: 1600 / 840; object-fit: cover; }
.kb-content h2 { padding-top: 1.1em; border-top: 1px solid var(--border); }
.kb-content > h2:first-child, .kb-content > .kb-toc + h2 { border-top: 0; padding-top: 0; }
.kb-content .kg-callout-card { margin: 1.6em 0 !important; }
.kb-content .kg-callout-text p { margin: 0 0 .5em; }
.kb-content .kg-callout-text p:last-child { margin-bottom: 0; }
.kb-card__image { aspect-ratio: 1600 / 840; }
