/* stylelint-disable */

/* ============================================================
   ARTICLE — TYPOGRAPHY SYSTEM v1.0
   Reader-first, long-form optimized
   Amir & Mixel — 2025
============================================================ */

/* Import NFB Design Tokens */
@import url('../components/userEditor/css/nfb-tokens.css');

/* Import Shared Content Styles (editor & preview consistency) */
@import url('../components/userEditor/css/nfb-content-shared.css');

/* Tag / highlight / color marks — same rules as editor (ProseMirror) */
@import url('../components/userEditor/css/marks.css');
@import url('../components/userEditor/css/nfb-lists.css');
@import url('../lib/nfb_join_button.css');

/*
 * ─── EDITOR / PREVIEW BODY PARITY — DO NOT BREAK SILENTLY ───
 * Body typography (p, li, font-size, line-height, font-family, text-align)
 * must come from nfb-tokens.css + nfb-content-shared.css only.
 *
 * Do NOT add preview-only overrides such as:
 *   .nfb-article p { font-size: 16px; line-height: 1.65; }
 *   .article-body { font-family: Georgia; }
 * unless it is an explicit, documented product decision — they will desync
 * the editor (ProseMirror) and article preview without failing the build.
 * Prefer editing nfb-content-shared.css so both surfaces stay matched.
 */

/* ============================================================
   MAIN CONTAINER (.nfb-article)
   Editor parity: same tokens as .ProseMirror body text (nfb-content-shared).
   Title/subtitle stay serif via .article-title / .article-subtitle below.
   ============================================================ */
.nfb-article {
  box-sizing: border-box;
  max-width: var(--nfb-max-width-content);
  margin: 4rem auto;
  padding: 0;

  font-family: var(--nfb-font-family);
  font-size: var(--nfb-font-size-base);
  line-height: var(--nfb-line-height-base);
  color: var(--nfb-text);

  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Body column only — matches ProseMirror horizontal padding (header stays full column width like editor) */
.nfb-article .article-body {
  box-sizing: border-box;
  padding-left: var(--nfb-space-3xl);
  padding-right: var(--nfb-space-3xl);
}

/* ============================================================
   SERIES / COLUMN LABEL (optional, top-left of article)
   ============================================================ */
.nfb-article {
  position: relative;
}

.nfb-article .article-series-kicker {
  display: block;
  max-width: 720px;
  margin: 1.25rem auto 0;
  padding: 0 var(--nfb-space-3xl);
  /* color/typography: nfb-content-shared.css .article-series-kicker (0.6875rem) */
}

a.article-series-kicker {
  max-width: 720px;
  margin: 1.25rem auto 0;
  padding: 0 var(--nfb-space-3xl);
}

/* Series prev/next — inline links above author footer (no popups) */
.article-series-nav {
  max-width: 760px;
  margin: 2.25rem auto 0;
  padding: 0 var(--nfb-space-3xl);
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.article-series-nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1rem 0;
  border-top: 1px solid #d8e4ec;
  border-bottom: 1px solid #d8e4ec;
}

.article-series-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: min(100%, 22rem);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

.article-series-nav__link:hover {
  color: #a15c4a;
}

.article-series-nav__link--next {
  margin-left: auto;
  text-align: right;
}

.article-series-nav__dir {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.article-series-nav__title {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #3d3630;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article-series-nav__link:hover .article-series-nav__title {
  color: inherit;
  text-decoration-thickness: 2px;
}

@media (max-width: 540px) {
  .article-series-nav__link--next {
    margin-left: 0;
    text-align: left;
  }
}

/* Public article read — light platform header (article_read.php, preview.php) */
body.nfb-article-read-page {
  margin: 0;
  background: #f7f9fc;
  padding: 0 0 2.5rem;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
}

.nfb-article-read-wrap {
  padding: 1.5rem 1rem 0;
}

/* Minimal legal strip — below article card on read + preview */
.nfb-article-legal {
  max-width: 760px;
  margin: 1.75rem auto 0;
  padding: 0 0 2rem;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nfb-article-legal__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d8e4ec;
}

.nfb-article-legal__logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  opacity: 0.88;
  transition: opacity 0.15s ease;
}

.nfb-article-legal__logo:hover {
  opacity: 1;
}

.nfb-article-legal__logo img {
  display: block;
  height: auto;
  max-width: 100%;
}

.nfb-article-legal__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.nfb-article-legal__link {
  color: #576f76;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nfb-article-legal__link:hover {
  color: #1f2937;
}

.nfb-article-legal__sep {
  color: #c8dae6;
  font-size: 0.8125rem;
  user-select: none;
}

.nfb-article-legal__copy {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 639px) {
  .nfb-article-legal__inner {
    justify-content: center;
    text-align: center;
  }

  .nfb-article-legal__nav {
    justify-content: center;
  }
}

@media (min-width: 640px) {
  .nfb-article-legal__copy {
    flex: 0 1 auto;
    margin-left: auto;
    text-align: right;
  }
}

.nfb-article-read-page .nfb-article {
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  padding: 2.5rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nfb-article-site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.nfb-article-site-header__bar {
  border-bottom: 1px solid #f1f5f9;
}

.nfb-article-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
}

.nfb-article-site-header__logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.nfb-article-site-header__logo img {
  display: block;
  height: 28px;
  width: auto;
}

.nfb-article-site-header__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
}

.nfb-article-site-header__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
}

.nfb-article-site-header__link:hover,
.nfb-article-site-header__link:focus-visible {
  color: #0f766e;
}

.nfb-article-site-header__link--primary {
  color: #0f766e;
}

.nfb-article-site-header__meta {
  background: #fafbfc;
}

.nfb-article-site-header__meta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  max-width: var(--nfb-max-width-content, 720px);
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.nfb-article-site-header__time,
.nfb-article-site-header__read,
.nfb-article-site-header__words {
  color: #64748b;
}

.nfb-article-site-header__words {
  color: #94a3b8;
}

/* Reader toolbar — Save / Print / PDF pills only (meta stays in site header) */
.nfb-article-read-toolbar {
  max-width: var(--nfb-max-width-content, 720px);
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nfb-article-read-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.nfb-article-read-toolbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  margin: 0;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  color: #3d3630;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d5dde5;
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.nfb-article-read-toolbar__btn--link:hover,
.nfb-article-read-toolbar__btn--link:focus-visible,
.nfb-article-read-toolbar__btn:hover,
.nfb-article-read-toolbar__btn:focus-visible {
  border-color: rgba(100, 116, 139, 0.35);
  box-shadow: 0 2px 8px rgba(61, 54, 48, 0.06);
  color: #3d3630;
  text-decoration: none;
}

.nfb-article-read-toolbar__btn.is-saved {
  background: #f4f8fb;
  border-color: #b8cdd9;
  color: #1e3a4a;
}

.nfb-article-read-toolbar__btn:focus-visible {
  outline: 2px solid rgba(100, 116, 139, 0.45);
  outline-offset: 2px;
}

.nfb-article-read-toolbar__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: #5b7280;
}

.nfb-article-read-toolbar__btn.is-saved .nfb-article-read-toolbar__icon {
  color: #0f766e;
}

.nfb-article-read-toolbar__status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}

/* Print-friendly page (PDF flow) */
.nfb-article-print-page {
  margin: 0;
  padding: 1.5rem;
  background: #fff;
  color: #1f2937;
}

.nfb-print-setup {
  max-width: 720px;
  margin: 0 auto 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #d8e4ec;
  border-radius: 8px;
  background: #f7fdff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
}

.nfb-print-setup__title {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
}

.nfb-print-setup__text {
  margin: 0;
}

@page {
  margin: 18mm 14mm 20mm;

  @bottom-center {
    content: counter(page);
    font-size: 9pt;
    color: #64748b;
  }
}

.nfb-article--print {
  max-width: 720px;
  margin: 0 auto;
  box-shadow: none;
}

.nfb-article-print-brand {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.nfb-article-print-byline {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #64748b;
}

.article-header--print .article-title {
  margin-top: 0;
}

.article-header--print .article-subtitle {
  margin-top: 0.35rem;
}

.nfb-article-print-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #94a3b8;
}

@media print {
  .nfb-print-setup,
  .nfb-article-no-print,
  .nfb-article-site-header__bar,
  .nfb-article-legal,
  .article-author-panel,
  .nfb-article-share,
  .nfb-article-cta,
  .nfb-article-end-mark {
    display: none !important;
  }

  .nfb-article-read-page {
    background: #fff !important;
  }

  .nfb-article-read-wrap {
    padding: 0 !important;
  }

  .nfb-article-read-page .nfb-article {
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .nfb-article-read-toolbar {
    display: none !important;
  }

  .nfb-article-site-header {
    position: static !important;
    box-shadow: none !important;
    border-bottom: none !important;
  }

  .nfb-article-site-header__meta {
    background: transparent !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .nfb-article-site-header__meta-inner {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .nfb-article-site-header__author {
    color: #1f2937 !important;
    text-decoration: none !important;
  }

  .nfb-article a {
    color: #1f2937 !important;
    text-decoration: underline !important;
  }

  .nfb-article .article-hero__img {
    max-height: 280px;
    object-fit: contain;
  }
}

.nfb-article-site-header__meta-sep {
  color: #94a3b8;
}

.nfb-article-site-header__author {
  color: #0f766e;
  font-weight: 500;
  text-decoration: none;
}

.nfb-article-site-header__author:hover,
.nfb-article-site-header__author:focus-visible {
  color: #115e59;
  text-decoration: underline;
}

.nfb-article-site-header__badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nfb-article-site-header__meta-note {
  color: #64748b;
}

@media (max-width: 520px) {
  .nfb-article-site-header__inner {
    padding: 0.65rem 1rem;
  }

  .nfb-article-site-header__nav {
    gap: 0.35rem 0.65rem;
  }

  .nfb-article-site-header__link {
    font-size: 0.8125rem;
  }

  .nfb-article-site-header__meta-inner {
    padding: 0.45rem 1rem;
  }
}

/* Legacy alias — keep if referenced elsewhere */
.nfb-article-read-top {
  max-width: var(--nfb-max-width-content, 720px);
  margin: 0 auto 1rem;
  padding: 0 1rem;
}

.nfb-article-read-top > a {
  color: inherit;
  text-decoration: none;
}

.nfb-article-read-top .nfb-article-read-logo {
  height: 24px;
  width: auto;
  display: block;
}

.nfb-article-read-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.35rem 0 0;
}

.nfb-article-read-meta a {
  color: #0f766e;
  font-weight: 500;
  text-decoration: none;
}

.nfb-article-read-meta a:hover,
.nfb-article-read-meta a:focus-visible {
  color: #115e59;
  text-decoration: underline;
}

/* ============================================================
   ARTICLE HEADER (Title + Subtitle)
   ============================================================ */
.nfb-article .article-header {
  max-width: 720px;
  margin: 4rem auto 4rem; /* Increased bottom margin for visual separation */
  padding-bottom: 3rem; /* Space for separator line */
  text-align: center;
  position: relative;
}

/* Subtle separator — end of header zone (below title block; when hero exists, sits below hero) */
.nfb-article .article-header::after {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  margin: 2.5rem auto 0;
  background: rgba(0, 0, 0, 0.08); /* Very subtle gray line */
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Hero directly under title/subtitle: tighter header, divider only after image */
.nfb-article .article-header:has(.article-hero) {
  margin: 4rem auto 2rem;
  padding-bottom: 1.5rem;
}

.nfb-article .article-header:has(.article-hero)::after {
  margin-top: 1.5rem;
}

.nfb-article .article-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.03em; /* Slightly tighter for better readability */
  line-height: 1.2;
  color: #111;
  margin: 0 0 1.5rem 0; /* Increased bottom margin for better visual separation from subtitle */
}

/* ============================================================
   SUBTITLE — Klasični knjižni stil (Editorial Polish)
   Sekundaran, daje kontekst, vodi čitaoca u tekst
   ============================================================ */
.nfb-article .article-subtitle {
  margin-top: 0; /* Title already has bottom margin */
  margin-bottom: 0;
  max-width: 640px; /* Slightly narrower than title for better readability */
  margin-left: auto;
  margin-right: auto;
  text-align: center; /* Explicitly center the text */
  
  /* Typography — elegant, readable, secondary */
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem; /* Slightly larger for better readability */
  font-style: italic;
  font-weight: 400; /* Normal weight, not too light */
  line-height: 1.7; /* Slightly increased for better breathing room */
  letter-spacing: 0.02em; /* Slightly increased for more elegant feel */
  color: #4b5563; /* Slightly darker for better readability while staying secondary */
  
  /* Visual breathing room */
  padding: 0 1rem; /* Horizontal padding for mobile responsiveness */
}

/* ============================================================
   ARTICLE HERO (cover_image metadata — not part of ProseMirror body)
   Lives inside .article-header after subtitle (editorial flow).
   ============================================================ */
.nfb-article .article-header .article-hero {
  margin: 1.75rem auto 0;
  max-width: 680px;
  padding: 0 var(--nfb-space-3xl);
  box-sizing: border-box;
}

.nfb-article .article-hero__img,
.nfb-article .nfb-hero-image {
  display: block;
  width: 100%;
  max-width: 680px;
  margin: 24px auto 0;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  max-height: min(70vh, 520px);
  background: #f1f5f9;
}

.nfb-article .article-header .article-hero .article-hero__img,
.nfb-article .article-header .article-hero .nfb-hero-image {
  margin-top: 0;
}

.nfb-article .nfb-hero-caption {
  max-width: 680px;
  margin: 8px auto 24px;
  padding: 0 var(--nfb-space-3xl);
  box-sizing: border-box;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
  text-align: left;
  white-space: pre-line;
}

.nfb-article .article-header .article-hero .nfb-hero-caption {
  padding-left: 0;
  padding-right: 0;
}

/* ============================================================
   DIVIDER — Visual pause in article body
   Creates rhythm, separates thematic sections
   Minimal + knjižna (Opcija A)
   ============================================================ */
.nfb-article .nf-divider {
  width: 56px;
  height: 1px;
  margin: 4rem auto;
  background: rgba(0, 0, 0, 0.10);
  border: none;
  outline: none;
}

/* Connect divider with paragraphs around it for clean rhythm */
.nfb-article .nf-divider + p {
  margin-top: 0;
}

.nfb-article p + .nf-divider {
  margin-top: 4.5rem;
}

/* ============================================================
   REF QUOTE — Citation with source reference
   Editorial / book-like style
   Bridge between narrative and References section
   ============================================================ */
.nfb-article .nf-ref-quote {
  max-width: 640px;
  margin: 3rem auto 3rem;
  padding: 1.75rem 2rem;
  border-left: 4px solid rgba(0, 0, 0, 0.18);
  font-style: italic;
  position: relative;
}

/* Gradient border effect using pseudo-element */
.nfb-article .nf-ref-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.nfb-article .nf-ref-quote p {
  margin: 0;
}

/* Preview: Quotes around quote text (first paragraph) */
.nfb-article blockquote.nf-ref-quote > p:first-of-type::before,
.nfb-article .nf-ref-quote p.ref-quote-field::before,
.nfb-article .nf-ref-quote p:first-child::before {
  content: "\201C" !important;
  display: inline-block;
  margin-right: 0.25em;
}

.nfb-article blockquote.nf-ref-quote > p:first-of-type::after,
.nfb-article .nf-ref-quote p.ref-quote-field::after,
.nfb-article .nf-ref-quote p:first-child::after {
  content: "\201D" !important;
  display: inline-block;
  margin-left: 0.25em;
}

.nfb-article .nf-ref-quote p + p {
  margin-top: 0.5rem;
}

/* Preview: Combine author, source, and year into one line */
.nfb-article .nf-ref-quote p.ref-quote-author-field,
.nfb-article .nf-ref-quote p.ref-quote-source-field,
.nfb-article .nf-ref-quote p.ref-quote-year-field {
  display: inline;
  font-style: normal;
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
  padding: 0;
}

.nfb-article .nf-ref-quote p.ref-quote-author-field {
  margin-top: 0.75rem;
}

.nfb-article .nf-ref-quote p.ref-quote-author-field::before {
  content: "— ";
}

.nfb-article .nf-ref-quote p.ref-quote-source-field::before {
  content: " / ";
}

.nfb-article .nf-ref-quote p.ref-quote-year-field::before {
  content: ", ";
}

/* Fallback for old structure (single source field) */
.nfb-article .nf-ref-quote p:last-child:not(.ref-quote-author-field):not(.ref-quote-source-field):not(.ref-quote-year-field) {
  font-style: normal;
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.75rem;
}

.nfb-article .nf-ref-quote p:last-child:not(.ref-quote-author-field):not(.ref-quote-source-field):not(.ref-quote-year-field)::before {
  content: "— ";
}

.nfb-article .nf-ref-quote::after {
  display: none;
}

/* ============================================================
   FIGURE — Image with caption and optional credit
   Editorial / academic style
   Part of narrative, not decoration
   Publishing house aesthetic, not social feed
   ============================================================ */

/* Figure wrapper — centered, editorial block */
.nfb-article .nf-figure {
  margin: 2.5rem auto 3rem;
  max-width: 520px;
  padding: 0;
  text-align: center;
}

/* Wide figure variant — for reportage, hero images */
.nfb-article .nf-figure--wide {
  max-width: 1040px;
}

/* Full-bleed figure variant — extends to viewport edges (optional, for future use) */
.nfb-article .nf-figure--fullbleed {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
}

/* Image — full width, modern editorial styling */
.nfb-article .nf-figure-image,
.nfb-article .nf-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
  margin: 0;
}

/* Note: No hover effects in reader mode — images are static, editorial content */

/* Figure content wrapper (contains caption and credit paragraphs) */
.nfb-article .nf-figure-content {
  margin: 0;
  padding: 0;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Caption — match Image block meta line scale (sans, italic, smaller) */
.nfb-article .nf-figure > .nf-figure-content > p:first-of-type,
.nfb-article .nf-figure > p:first-of-type,
.nfb-article .nf-figure .figure-caption-field {
  display: block;
  margin-top: 1.1rem;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  color: #64748b;
  padding: 0;
  text-align: center;
}

/* Figcaption element styling (if used directly) */
.nfb-article .nf-figure figcaption {
  display: block;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.nfb-article .nf-figure figcaption > p:first-of-type {
  margin-top: 0;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  color: #64748b;
}

/* Credit line — same size as Image block caption; links use .nfb-image-block__caption-link-a */
.nfb-article .nf-figure > p.nf-figure-credit,
.nfb-article .nf-figure > .nf-figure-content > p:last-of-type:not(:first-of-type),
.nfb-article .nf-figure > p:last-of-type:not(:first-of-type),
.nfb-article .nf-figure .figure-credit-field {
  display: block;
  margin-top: 0.4rem;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
  font-family: inherit;
  font-size: 0.75rem;
  line-height: 1.4;
  font-style: normal;
  font-weight: 400;
  color: #64748b;
  padding: 0;
  text-align: center;
}

.nfb-article .nf-figure-credit .nfb-image-block__caption-link-a,
.nf-figure-credit .nfb-image-block__caption-link-a {
  color: #047857;
  text-decoration: none;
  border-bottom: 1px solid rgba(4, 120, 87, 0.35);
  transition: color 0.15s, border-color 0.15s;
}

.nfb-article .nf-figure-credit .nfb-image-block__caption-link-a:hover,
.nf-figure-credit .nfb-image-block__caption-link-a:hover {
  color: #065f46;
  border-bottom-color: #065f46;
}

/* Spacing for paragraph after figure (prevents "gulping" text) */
.nfb-article .nf-figure + p {
  margin-top: 1.5rem;
}

/* ============================================================
   INFOBOX — Informational block
   Summary, explanation, or clarification
   Editorial / book-like style
   Quieter than Ref Quote, but stronger than paragraph
   ============================================================ */
.nfb-article .nf-infobox {
  max-width: 720px;
  margin: 4rem auto;
  padding: 1.75rem 2rem;
  border-left: 3px solid rgba(0, 0, 0, 0.12);
  background: #f9fafb;
  border-radius: 0;
}

.nfb-article .nf-infobox h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2937;
  display: block;
  visibility: visible;
  opacity: 1;
}

/* Ensure heading is visible even with class */
.nfb-article .nf-infobox h4.infobox-title-field {
  display: block;
  visibility: visible;
  opacity: 1;
}

.nfb-article .nf-infobox p {
  margin: 0.5rem 0 0;
  color: #374151;
  line-height: 1.6;
}

/* Spacing for paragraph after infobox */
.nfb-article .nf-infobox + p {
  margin-top: 1.5rem;
}

/* ============================================================
   EDITORIAL SIDEBAR LAYOUT (Float-based, like Medium/NYT)
   Text flows around sidebars naturally
============================================================ */

/* LEFT SIDEBAR */
.nfb-article .nf-sidebar--left {
  float: left !important;
  width: clamp(240px, 28%, 300px) !important;
  max-width: 300px !important;
  margin: 0.25rem 1.25rem 1rem 0 !important;
  margin-left: 0 !important; /* Stay within text column */
  contain: none !important; /* Allow float */
  box-sizing: border-box;
  clear: none !important;
}

/* RIGHT SIDEBAR */
.nfb-article .nf-sidebar--right {
  float: right !important;
  width: clamp(240px, 28%, 300px) !important; /* Same width as left sidebar */
  max-width: 300px !important;
  margin: 0.25rem 0 1rem 2rem !important;
  contain: none !important; /* Allow float */
  box-sizing: border-box;
  clear: none !important;
}

/* Ensure paragraphs and text flow around sidebars (don't clear floats) */
.nfb-article p:not(.nf-sidebar p) {
  clear: none !important;
}

/* Clear floats - add clear to article container or use clearfix */
.nfb-article::after {
  content: "";
  display: table;
  clear: both;
}

/* ============================================================
   SIDEBAR LEFT / RIGHT — Floating contextual block (OLD APPROACH)
   Text flows around it on desktop
   Becomes normal block on mobile (no wrap)
   NOTE: This is OLD float-based approach. Grid layout (above) is preferred.
   ============================================================ */

/* Sidebar base styles (ONLY when NOT inside Grid layout) */
.nfb-article .nf-sidebar:not(.nfb-layout .nf-sidebar) {
  max-width: 300px;
  width: 300px;
  margin: 1.5rem 0;
  padding: 1.5rem 1.75rem;
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  /* Define shape for text flow - prevents text from entering sidebar */
  shape-outside: inset(0);
  shape-margin: 0;
}

/* Sidebar inside Grid layout — NO width restrictions, NO shape-outside */
.nfb-article .nfb-layout .nf-sidebar {
  float: none !important;
  clear: none !important;
  shape-outside: none !important;
  shape-margin: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box; /* Include padding/border in width calculation */
}

.nfb-article .nf-sidebar-content {
  margin: 0;
  padding: 0;
  text-align: center;
}

.nfb-article .nf-sidebar p {
  margin: 0.75rem 0 0;
  color: #374151;
  line-height: 1.65;
  font-size: 0.95rem;
  text-align: center;
}

.nfb-article .nf-sidebar p:first-child {
  margin-top: 0;
}

.nfb-article .nf-sidebar img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 10px;
}

/* Figure inside sidebar */
.nfb-article .nf-sidebar .nf-figure {
  margin: 1rem 0;
  max-width: 100%;
  padding: 0;
}

.nfb-article .nf-sidebar .nf-figure img {
  margin: 0.5rem auto 0.75rem;
  border-radius: 10px;
}

.nfb-article .nf-sidebar .nf-figure-content,
.nfb-article .nf-sidebar .nf-figure figcaption {
  text-align: center;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.nfb-article .nf-sidebar .nf-figure > p:first-of-type,
.nfb-article .nf-sidebar .nf-figure .figure-caption-field {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  font-style: italic;
  margin: 0.5rem 0 0.25rem;
  color: #64748b;
}

.nfb-article .nf-sidebar .nf-figure > p:last-of-type:not(:first-of-type),
.nfb-article .nf-sidebar .nf-figure .figure-credit-field,
.nfb-article .nf-sidebar .nf-figure > p.nf-figure-credit {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.25rem 0 0;
  font-style: normal;
  font-weight: 400;
}

/* Old sidebar rules removed - replaced by float-based layout above */

/* Text flows around sidebar - no clear needed */

/* Mobile fallback — NO float, becomes normal block */
@media (max-width: 768px) {
  .nfb-article .nf-sidebar--left,
  .nfb-article .nf-sidebar--right {
    float: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 2rem auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    clear: both;
  }
  
  .nfb-article .nf-sidebar + p {
    clear: none;
  }
}

/* ============================================================
   FIGURE — MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  /* Reduce margins on mobile to prevent "choking" the flow */
  .nfb-article .nf-figure {
    margin: 2rem 1rem;
    max-width: calc(100% - 2rem);
  }
  
  /* Slightly reduce caption max-width on mobile */
  .nfb-article .nf-figure > .nf-figure-content > p:first-of-type,
  .nfb-article .nf-figure > p:first-of-type,
  .nfb-article .nf-figure figcaption,
  .nfb-article .nf-figure .figure-caption-field {
    max-width: 100%;
    padding: 0 0.5rem; /* Small horizontal padding for readability */
  }
}

/* ============================================================
   PARAGRAPHS & HEADINGS — Now handled by nfb-content-shared.css
   Keeping only preview-specific overrides
============================================================ */

/* ============================================================
   LEAD PARAGRAPH (first body paragraph after epigraph)
   Preview-specific styling
============================================================ */
/* Lead paragraph AFTER epigraph (when epigraph exists) */
.nfb-article .nf-epigraph + p:not(.nfb-headline):not(.nfb-badge) {
  margin-top: 0;           /* Removes top margin (epigraph already provides spacing) */
  font-style: italic;      /* Italic text for visual distinction (common in editorial design) */
  color: var(--nfb-text-strong);
  font-size: calc(1em + 1px); /* match editor .ProseMirror > p:first-child */
  line-height: 1.72;
  margin-bottom: 1.4em;    /* Slightly longer pause before the next paragraph */
}

/* Lead paragraph za prvi body <p>: definisan u nfb-content-shared.css (uključuje i slučaj nakon Key Points). */

/* Note: All typography, spacing, and heading styles (h1-h4) are now in nfb-content-shared.css
   to ensure editor and preview consistency. Only preview-specific overrides remain here. */

/* ============================================================
   LINKS (very subtle styling)
   ============================================================ */
.nfb-article a {
  color: inherit;          /* Inherits text color (no blue link color, keeps design clean) */
  text-decoration: underline;  /* Underline for link identification */
  text-decoration-thickness: 1px;  /* Thin underline (subtle, not aggressive) */
  text-underline-offset: 3px;  /* Space between text and underline (prevents underline cutting through descenders) */
}

.nfb-article a:hover {
  text-decoration-thickness: 2px;  /* Thicker underline on hover (visual feedback for interactivity) */
}

/* ============================================================
   SMALL TEXT (footnotes, captions, etc.)
   ============================================================ */
.nfb-article small {
  font-size: 0.85em;       /* 85% of parent font size (smaller but still readable) */
  color: #444;             /* Lighter gray color (less emphasis, secondary information) */
}

/* ============================================================
   EPIGRAPH — READER VIEW (v1.1)
   Polished spacing & hierarchy
   Amir & Mixel — 2025
============================================================ */

.nfb-article blockquote.nf-epigraph {
  max-width: 520px;
  margin: 3rem auto 4rem;
  text-align: center;
  opacity: 0.95;
}

.nfb-article .nf-epigraph .epigraph-quote-field {
  margin: 0;

  font-style: italic;
  font-size: 1.10em;
  line-height: 1.7;
  color: #222;
}

/* Opening quote - inline flow */
.nfb-article .nf-epigraph .epigraph-quote-field::before {
  content: "\201C"; /* Unicode left double quotation mark */
  margin-right: 0.15em; /* Inline spacing - follows text flow */
  font-size: 1.6em;
  font-weight: 600;
  color: #222;
  /* No position: absolute - navodnici su dio inline flow-a teksta */
}

/* Closing quote - inline flow (follows text, works for any number of lines) */
.nfb-article .nf-epigraph .epigraph-quote-field::after {
  content: "\201D"; /* Unicode right double quotation mark */
  margin-left: 0.15em; /* Inline spacing - follows text flow, works for any number of lines */
  font-size: 1.6em;
  font-weight: 600;
  color: #222;
  /* No position: absolute - navodnici su dio inline flow-a teksta */
}

.nfb-article .nf-epigraph .epigraph-author-field {
  margin-top: 1.25rem;

  font-size: 0.9em;
  color: #444;
  text-align: right;
}

.nfb-article .nf-epigraph .epigraph-author-field::before {
  content: "— ";
}


/* ============================================================
   DEDICATION — READER VIEW (v1.3)
   No reader-facing “Dedication” title (literary norm). Identity =
   extra air + muted italic + micro-ornament — not a UI label.
   Ornament: --nfb-ornament-dedication (neutral muted, no brand coral).
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nf-dedication {
  max-width: 560px;
  margin: 5rem auto 3.75rem; /* ~80px / 60px — stronger pause before epigraph/body */
  text-align: center;
  box-sizing: border-box;
  opacity: 0.92;
}

/* Micro-ornament: intentional glyph — not a full-width hairline separator */
.nfb-article .nf-dedication::before {
  content: "\2013"; /* en dash — shorter than em dash */
  display: block;
  font-family: var(--nfb-font-family);
  font-size: 1.05rem;
  font-weight: 500;
  font-style: normal;
  line-height: 1;
  color: var(--nfb-ornament-dedication, #4b5563);
  opacity: var(--nfb-ornament-dedication-opacity, 0.9);
  margin-bottom: 0.5rem;
  letter-spacing: 0;
}

.nfb-article .nf-dedication p {
  margin: 0.5rem 0;
  max-width: 100%;

  font-family: var(--nfb-font-family);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--nfb-text-muted);
  /* Override article body justify — dedication stays centered, intimate */
  text-align: center;
  text-justify: auto;
  hyphens: none;
}

.nfb-article .nf-dedication p:first-child {
  margin-top: 0;
}

.nfb-article .nf-dedication p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   CLOSING NOTE — READER VIEW (reflection / prayer / final thought)
   data-label = preset from editor (Dova, Reflection, …)
============================================================ */

.nfb-article .nf-closing-note {
  clear: both;
  max-width: 560px;
  margin: 3rem auto 2.75rem;
  padding: 1.25rem 1.35rem 1.35rem;
  text-align: center;
  box-sizing: border-box;
  border-top: 1px solid rgba(180, 170, 155, 0.45);
  border-bottom: 1px solid rgba(180, 170, 155, 0.45);
  background: linear-gradient(
    180deg,
    rgba(250, 249, 247, 0.65) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.nfb-article .nf-closing-note[data-label]::before {
  content: attr(data-label);
  display: block;
  font-family: var(--nfb-font-family);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nfb-text-muted, #64748b);
  margin-bottom: 0.85rem;
  opacity: 0.92;
}

.nfb-article .nf-closing-note p {
  margin: 0.5rem 0;
  max-width: 100%;
  font-family: var(--nfb-font-family);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--nfb-text-muted);
  text-align: center;
  text-justify: auto;
  hyphens: none;
}

.nfb-article .nf-closing-note p:first-of-type {
  margin-top: 0;
}

.nfb-article .nf-closing-note p:last-of-type {
  margin-bottom: 0;
}

/* Break between article body (closing note) and author / share end cards */
.nfb-article-end-mark {
  clear: both;
  max-width: var(--nfb-end-card-max, 760px);
  margin: 2rem auto 0;
  padding: 1.35rem 1rem 0;
  border-top: 1px dotted #c8dae6;
  text-align: center;
  color: #aebfcb;
  font-family: var(--nfb-font-family);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.55em;
  user-select: none;
}

.nfb-article-end-mark::before {
  content: "· · ·";
}

.nfb-article .nf-closing-note + .nfb-article-end-mark {
  margin-top: 1.75rem;
}

/* ============================================================
   ARTICLE END CARDS — shared shell (author, share, what's next)
============================================================ */

.article-author-panel,
.nfb-article-share,
.nfb-article-cta__inner {
  --nfb-end-card-bg: #f7fdff;
  --nfb-end-card-border: #d8e4ec;
  --nfb-end-card-rule: #c8dae6;
  --nfb-end-card-label: #6b7280;
  --nfb-end-card-shadow: 0 1px 4px rgba(62, 131, 158, 0.12);
  --nfb-end-card-radius: 10px;
  --nfb-end-card-max: 760px;
}

/* ============================================================
   ARTICLE AUTHOR PANEL — preview (Author profile + Related posts)
   Editorial rhythm: small caps-style labels, calm bio, no footer stripe.
============================================================ */

.article-author-panel {
  --author-panel-media: 136px;
  --author-panel-heading: #5c534a;
  --author-panel-name: #3d3630;
  --author-panel-body: #000;
  --author-panel-link: #a15c4a;
  --author-panel-muted: #8a8580;
  --author-panel-accent: #a15c4a;
  --author-panel-accent-dark: #8f4a3b;
  --author-panel-accent-soft: rgba(161, 92, 74, 0.14);

  max-width: var(--nfb-end-card-max);
  margin: 72px auto 0;
  padding: 30px 32px 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--nfb-end-card-bg);
  border: 1px solid var(--nfb-end-card-border);
  border-radius: var(--nfb-end-card-radius);
  box-shadow: var(--nfb-end-card-shadow);
}

.article-author-panel--after-closing {
  margin-top: 1.5rem;
}

/* Section kickers — editorial uppercase, not body heading scale */
.article-author-panel__header {
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px dotted var(--nfb-end-card-rule);
  background: transparent;
}

/* Must beat .nfb-article h2 / h3 from nfb-content-shared.css */
.article-author-panel h2.article-author-panel__title,
.article-author-panel h3.article-author-panel__section-title {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--nfb-end-card-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Row: square image left; name + bio stacked on the right (bio below name). */
.article-author-panel__body {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 26px 0 8px;
  background: transparent;
}

.article-author-panel__media {
  flex: 0 0 var(--author-panel-media);
}

.article-author-panel__image,
.article-author-panel__placeholder {
  display: block;
  width: var(--author-panel-media);
  height: var(--author-panel-media);
  border-radius: 12px;
  box-sizing: border-box;
}

.article-author-panel__image {
  object-fit: cover;
  background: #e8e4df;
  border: 1px solid rgba(107, 93, 80, 0.25);
  box-shadow: 0 2px 8px rgba(61, 54, 48, 0.08);
}

.article-author-panel__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ded8d0, #cbc4bb);
  color: var(--author-panel-name);
  font-size: 1.35rem;
  font-weight: 700;
  border: 1px solid rgba(107, 93, 80, 0.2);
}

/* Author name — secondary to article title: smaller, calmer weight */
.article-author-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.article-author-panel__content .article-author-panel__name {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 600;
  color: var(--author-panel-name);
  letter-spacing: -0.01em;
}

.article-author-panel__badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--author-panel-accent-soft);
  color: var(--author-panel-accent-dark);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  white-space: nowrap;
}

.article-author-panel__content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Bio — narrow measure; length capped in preview PHP (2–3 sentences) */
.nfb-article .article-author-panel .article-author-panel__bio,
.article-author-panel__bio {
  margin: 0;
  max-width: 480px;
  font-family: var(--nfb-font-family);
  font-size: 0.9375rem; /* 15px — between end-card labels and body 17px */
  line-height: 1.68;
  letter-spacing: 0.01em;
  font-weight: 400;
  color: #1f2937;
  text-align: left;
  text-align-last: left;
  hyphens: none;
  text-justify: auto;
}

.article-author-panel__bio a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-author-panel__bio a:hover,
.article-author-panel__bio a:focus-visible {
  color: var(--author-panel-name);
  text-decoration: underline;
}

.article-author-panel__bio--empty {
  color: #000;
}

.article-author-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  max-width: 100%;
}

.article-author-panel__btn,
.article-author-panel__btn:hover,
.article-author-panel__btn:focus,
.article-author-panel__btn:focus-visible,
.article-author-panel__btn:active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
  border: 1px solid #c4c4c4;
  background: linear-gradient(180deg, #fafafa 0%, #e8e8e8 100%);
  color: #1c1917;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.article-author-panel__btn-icon {
  flex-shrink: 0;
  color: #44403c;
}

.article-author-panel__btn:hover,
.article-author-panel__btn:focus-visible {
  background: linear-gradient(180deg, #f5f5f4 0%, #dededc 100%);
  border-color: #a8a29e;
  color: #1c1917;
}

.article-author-panel__btn--follow.is-following {
  background: linear-gradient(180deg, #f0eeec 0%, #d6d3d1 100%);
  border-color: #a8a29e;
  color: #292524;
}

.article-author-panel__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.article-author-follow {
  margin-top: 1.15rem;
  max-width: 480px;
}

.article-author-follow__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--author-panel-accent);
  background: var(--author-panel-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.article-author-follow__btn:hover,
.article-author-follow__btn:focus-visible {
  background: var(--author-panel-accent-dark);
  border-color: var(--author-panel-accent-dark);
  color: #fff;
}

.article-author-follow__btn.is-following {
  background: #fff;
  color: var(--author-panel-accent);
}

.article-author-follow__btn.is-following:hover,
.article-author-follow__btn.is-following:focus-visible {
  background: var(--author-panel-accent-soft);
  color: var(--author-panel-accent-dark);
}

.article-author-follow__hint {
  margin: 0.55rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--author-panel-muted);
}

/* Related — strong separation before list (magazine rhythm) */
.article-author-panel__related {
  margin-top: 64px;
  margin-bottom: 0;
  padding: 0 0 28px;
  border-top: none;
  background: transparent;
}

.article-author-panel__section-title {
  padding: 0 0 12px;
  border-bottom: 1px dotted var(--nfb-end-card-rule);
}

.article-author-panel__related-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.article-author-panel__related-item + .article-author-panel__related-item {
  margin-top: 14px;
}

.article-author-panel__related-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  margin: 0;
  border-radius: 0;
  font-size: 1rem; /* 16px — mockup ~15–16px */
  line-height: 1.45;
  font-weight: 500;
  color: var(--author-panel-body);
  text-decoration: none;
  transition: color 0.15s ease;
}

.article-author-panel__related-icon {
  flex-shrink: 0;
  width: 1.25em;
  margin-top: 0.2em;
  font-size: 0.95em;
  color: #7a6554;
  text-align: center;
}

.article-author-panel__related-icon .fa-file-lines {
  font-size: 1em;
}

.article-author-panel__related-text {
  flex: 1;
  min-width: 0;
  border-bottom: 1px solid transparent;
}

.article-author-panel__related-link:hover .article-author-panel__related-text,
.article-author-panel__related-link:focus-visible .article-author-panel__related-text {
  border-bottom-color: rgba(107, 93, 80, 0.45);
}

.article-author-panel__related-link:hover,
.article-author-panel__related-link:focus-visible {
  color: var(--author-panel-name);
  outline: none;
}

/* Beat .nfb-article p { font-size: var(--nfb-font-size-base) } — parity with author bio */
.nfb-article .article-author-panel .article-author-panel__related-empty-note,
.article-author-panel__related-empty-note {
  margin: 14px 0 0;
  font-family: var(--nfb-font-family);
  font-size: 0.9375rem;
  line-height: 1.68;
  letter-spacing: 0.01em;
  font-style: normal;
  font-weight: 400;
  color: #576f76;
  text-align: left;
  text-align-last: left;
  hyphens: none;
  text-justify: auto;
}

@media (max-width: 768px) {
  .article-author-panel {
    --author-panel-media: 124px;

    margin-top: 56px;
    padding: 24px 22px 0;
    border-radius: 8px;
  }

  .article-author-panel--after-closing {
    margin-top: 1.25rem;
  }

  .article-author-panel h2.article-author-panel__title,
  .article-author-panel h3.article-author-panel__section-title {
    font-size: 0.75rem;
    letter-spacing: 0.11em;
  }

  .article-author-panel__content .article-author-panel__name {
    margin-bottom: 10px;
    font-size: 1.05rem;
  }

  .article-author-panel__body {
    gap: 32px;
    padding: 22px 0 6px;
  }

  .article-author-panel__bio {
    font-size: 0.9375rem;
    max-width: 100%;
  }

  .article-author-panel__related {
    margin-top: 48px;
    padding: 0 0 24px;
  }

  .article-author-panel__related-link {
    font-size: 0.9375rem; /* 15px */
  }

  .article-author-panel__placeholder {
    font-size: 1.15rem;
  }
}

@media (max-width: 560px) {
  .article-author-panel {
    --author-panel-media: 108px;

    margin-top: 48px;
    padding: 20px 18px 0;
  }

  .article-author-panel--after-closing {
    margin-top: 1.25rem;
  }

  .nfb-article-end-mark {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
  }

  .article-author-panel__body {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .article-author-panel__media {
    flex-basis: auto;
  }

  .article-author-panel h2.article-author-panel__title,
  .article-author-panel h3.article-author-panel__section-title {
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
  }

  .article-author-panel__content .article-author-panel__name {
    font-size: 1.05rem;
  }

  .article-author-panel__related {
    margin-top: 40px;
    padding: 0 0 22px;
  }

  .article-author-panel__related-link {
    font-size: 0.875rem;
  }
}

/* ============================================================
   NFB ARTICLE SHARE — same end-card shell as author panel
============================================================ */

.nfb-article-share {
  --nfb-share-ink: #3d3630;
  --nfb-share-muted: #6b7280;
  --nfb-share-icon: #5b7280;
  --nfb-share-icon-hover: #475569;
  --nfb-share-btn-border: rgba(100, 116, 139, 0.2);

  max-width: var(--nfb-end-card-max);
  margin: 48px auto 0;
  padding: 28px 32px 26px;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--nfb-end-card-bg);
  border: 1px solid var(--nfb-end-card-border);
  border-radius: var(--nfb-end-card-radius);
  box-shadow: var(--nfb-end-card-shadow);
  position: relative;
}

.nfb-article-share__header {
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px dotted var(--nfb-end-card-rule);
}

/* Beat .nfb-article h2 from nfb-content-shared */
.nfb-article .nfb-article-share h2.nfb-article-share__title {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--nfb-end-card-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nfb-article-share__rail {
  display: none;
}

.nfb-article-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.nfb-article-share__item {
  margin: 0;
  padding: 0;
}

.nfb-article-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  margin: 0;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--nfb-share-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--nfb-share-btn-border);
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}

/* Beat .nfb-article a { text-decoration: underline } from nfb-content-shared.css */
.nfb-article .nfb-article-share a.nfb-article-share__btn,
.nfb-article .nfb-article-share a.nfb-article-share__btn:hover,
.nfb-article .nfb-article-share a.nfb-article-share__btn:focus-visible,
.nfb-article .nfb-article-share a.nfb-article-share__btn:visited {
  color: var(--nfb-share-ink);
  text-decoration: none;
}

.nfb-article-share__btn:hover,
.nfb-article .nfb-article-share a.nfb-article-share__btn:hover {
  border-color: rgba(100, 116, 139, 0.35);
  box-shadow: 0 2px 8px rgba(61, 54, 48, 0.06);
  color: var(--nfb-share-ink);
  text-decoration: none;
}

.nfb-article-share__btn:focus-visible {
  outline: 2px solid rgba(100, 116, 139, 0.45);
  outline-offset: 2px;
}

.nfb-article-share__btn--copy {
  background: #f4f8fb;
  border-color: var(--nfb-end-card-border);
}

.nfb-article-share__btn--copy:hover {
  background: #eef4f8;
  border-color: rgba(100, 116, 139, 0.35);
}

.nfb-article-share__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--nfb-share-icon);
}

.nfb-article-share__btn:hover .nfb-article-share__icon {
  color: var(--nfb-share-icon-hover);
}

.nfb-article-share__label {
  white-space: nowrap;
}

.nfb-article-share__status {
  margin: 14px 0 0;
  min-height: 1.25em;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--nfb-share-muted);
}

.nfb-article-share__status:empty {
  margin-top: 0;
  min-height: 0;
}

@media (max-width: 560px) {
  .nfb-article-share {
    margin-top: 40px;
    padding: 24px 22px 22px;
  }

  .nfb-article-share__btn {
    padding: 8px 14px 8px 12px;
    font-size: 0.78125rem;
  }

  .nfb-article .nfb-article-share h2.nfb-article-share__title {
    font-size: 0.75rem;
  }
}

/* ============================================================
   NFB ARTICLE CTA — what's next (shared shell; Join btn = lib/nfb_join_button.css)
============================================================ */

.nfb-article-cta {
  --nfb-cta-ink: #3d3630;
  --nfb-cta-muted: #000;

  max-width: var(--nfb-end-card-max);
  margin: 48px auto 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nfb-article-cta__inner {
  padding: 28px 32px 30px;
  border-radius: var(--nfb-end-card-radius);
  background: var(--nfb-end-card-bg);
  border: 1px solid var(--nfb-end-card-border);
  box-shadow: var(--nfb-end-card-shadow);
  position: relative;
}

.nfb-article .nfb-article-cta p.nfb-article-cta__eyebrow,
.nfb-article-cta__eyebrow {
  margin: 0;
  padding: 0 0 12px;
  border-bottom: 1px dotted var(--nfb-end-card-rule);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nfb-end-card-label);
  text-align: left;
  text-align-last: left;
  hyphens: none;
  text-justify: auto;
}

/* Beat article body h2 scale */
.nfb-article .nfb-article-cta h2.nfb-article-cta__title {
  margin: 20px 0 12px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--nfb-cta-ink);
}

.nfb-article .nfb-article-cta p.nfb-article-cta__text,
.nfb-article-cta__text {
  margin: 0 0 22px;
  max-width: 38em;
  font-size: 0.875rem;
  line-height: 1.58;
  color: #000;
  text-align: left;
  text-align-last: left;
  hyphens: none;
  text-justify: auto;
}

@media (max-width: 560px) {
  .nfb-article-cta {
    margin-top: 36px;
  }

  .nfb-article-cta__inner {
    padding: 24px 22px 24px;
    border-radius: var(--nfb-end-card-radius);
  }

  .nfb-article .nfb-article-cta h2.nfb-article-cta__title {
    font-size: 1.1875rem;
  }

  .nfb-article-cta__text {
    font-size: 0.875rem;
    margin-bottom: 18px;
  }

  .nfb-article-cta__btn {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ============================================================
   KEY POINTS — READER VIEW (v1.4)
   Compact list + subtle sky surface (parity with userEditor)
============================================================ */

.nfb-article .nf-key-points {
  max-width: 640px;
  width: 100%;
  /* Extra bottom margin: editorial pause before body / next block */
  margin: 2.5rem auto 3rem;
  padding: 0.85rem 1rem 0.75rem;
  box-sizing: border-box;

  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Match userEditor Key Points — subtle sky (not stat-card blue) */
  --nf-kp-surface: #f3f8fb;
  --nf-kp-surface-mid: #f0f5fa;
  --nf-kp-border: #c4d4e5;
  --nf-kp-rule: #d5e4f1;
  --nf-kp-bullet: #6d8eb0;
  --nf-kp-title: #3a4d60;
  --nf-kp-shadow: 0 1px 2px rgba(55, 95, 130, 0.07);

  background: linear-gradient(
    180deg,
    var(--nf-kp-surface) 0%,
    var(--nf-kp-surface-mid) 100%
  );
  border: 1px solid var(--nf-kp-border);
  border-radius: 8px;
  box-shadow: var(--nf-kp-shadow);
}

.nfb-article .nf-key-points__header {
  margin: 0 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--nf-kp-rule);
}

.nfb-article .nf-key-points__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nf-kp-title);
  margin: 0;
  padding: 0;
}

/* Inner list only — outer card is .nf-key-points */
.nfb-article .nf-key-points__content {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.nfb-article .nf-key-points__content .nf-key-point-item {
  position: relative;
  margin: 0;
  padding: 0.4rem 0 0.4rem 1.05rem;
  border-bottom: 1px solid var(--nf-kp-rule);

  background: none;
  border-left: none;
  border-right: none;
  border-top: none;

  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  color: #334155;
  text-align: left;
}

.nfb-article .nf-key-points__content .nf-key-point-item:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

/* Hide empty slots if present in stored HTML */
.nfb-article .nf-key-points__content .nf-key-point-item:empty,
.nfb-article .nf-key-points__content .nf-key-point-item:has(br:only-child) {
  display: none;
}

.nfb-article .nf-key-points__content .nf-key-point-item::before {
  content: "•";
  position: absolute;
  left: 0.05rem;
  top: 0.55rem;
  color: var(--nf-kp-bullet);
  font-weight: 700;
  font-size: 0.65rem;
  line-height: 1;
}

.nfb-article .nf-key-point-item strong,
.nfb-article .nf-key-point-item b {
  font-weight: 600;
  color: #1e293b;
}

/* ============================================================
   HEADLINE — READER VIEW (editorial attention line, not section heading)
============================================================ */

.nfb-article p.nfb-headline {
  max-width: 38rem;
  margin: 2.95rem auto 1.55rem;
  padding: 0;

  font-size: clamp(1.2rem, 2.1vw, 1.45rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--nfb-text);
  text-align: center;
  text-wrap: balance;
  hyphens: none;
  text-justify: auto;
}

/* ============================================================
   BADGE — READER (context label, not callout)
============================================================ */

.nfb-article p.nfb-badge {
  display: table;
  margin: 1.5rem auto 0.5rem;
  padding: 0.28rem 0.75rem;
  max-width: 100%;
  box-sizing: border-box;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 999px;
  border: 1px solid transparent;

  --nfb-badge-bg: #f1f5f9;
  --nfb-badge-fg: #475569;
  --nfb-badge-border: #e2e8f0;
  background: var(--nfb-badge-bg);
  color: var(--nfb-badge-fg);
  border-color: var(--nfb-badge-border);
}

.nfb-article p.nfb-badge.nfb-badge--align-left {
  margin-left: 0;
  margin-right: auto;
}

.nfb-article p.nfb-badge--tip {
  --nfb-badge-bg: #eff6ff;
  --nfb-badge-fg: #1d4ed8;
  --nfb-badge-border: #bfdbfe;
}
.nfb-article p.nfb-badge--important {
  --nfb-badge-bg: #fffbeb;
  --nfb-badge-fg: #b45309;
  --nfb-badge-border: #fde68a;
}
.nfb-article p.nfb-badge--warning {
  --nfb-badge-bg: #fff7ed;
  --nfb-badge-fg: #c2410c;
  --nfb-badge-border: #fed7aa;
}
.nfb-article p.nfb-badge--mistake {
  --nfb-badge-bg: #fef2f2;
  --nfb-badge-fg: #b91c1c;
  --nfb-badge-border: #fecaca;
}
.nfb-article p.nfb-badge--truth {
  --nfb-badge-bg: #f0fdfa;
  --nfb-badge-fg: #0f766e;
  --nfb-badge-border: #99f6e4;
}
.nfb-article p.nfb-badge--note {
  --nfb-badge-bg: #f8fafc;
  --nfb-badge-fg: #64748b;
  --nfb-badge-border: #e2e8f0;
}
.nfb-article p.nfb-badge--example {
  --nfb-badge-bg: #f5f3ff;
  --nfb-badge-fg: #5b21b6;
  --nfb-badge-border: #ddd6fe;
}
.nfb-article p.nfb-badge--key {
  --nfb-badge-bg: #eef2ff;
  --nfb-badge-fg: #3730a3;
  --nfb-badge-border: #c7d2fe;
}
.nfb-article p.nfb-badge--bonus {
  --nfb-badge-bg: #f0fdf4;
  --nfb-badge-fg: #15803d;
  --nfb-badge-border: #bbf7d0;
}
.nfb-article p.nfb-badge--myth {
  --nfb-badge-bg: #faf5ff;
  --nfb-badge-fg: #7e22ce;
  --nfb-badge-border: #e9d5ff;
}

/* ============================================================
   QUOTE (CLASSIC) — READER VIEW (v1.0)
   Traditional, book-style quote for citations and references
   Amir & Mixel — 2025
============================================================ */

.nfb-article blockquote.nfb-quote-classic {
  margin: 2.5rem auto;
  max-width: 580px;
  padding: 0;
  border: none;
  background: none;
}

.nfb-article .classic-quote-field {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #374151;
  font-weight: 400;
  text-align: left;
  margin: 0 0 0.75rem 0;
}

/* Classic quote quotation marks */
.nfb-article .classic-quote-field::before {
  content: "\201C";
  margin-right: 0.15em;
  font-size: 1.4em;
  font-weight: 600;
  color: #374151;
}

.nfb-article .classic-quote-field::after {
  content: "\201D";
  margin-left: 0.15em;
  font-size: 1.4em;
  font-weight: 600;
  color: #374151;
}

.nfb-article .classic-author-field {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
  font-weight: 500;
  text-align: right;
  margin: 0;
}

.nfb-article .classic-author-field::before {
  content: "— ";
  color: #94a3b8;
  opacity: 0.8;
}

/* ============================================================
   QUOTE (MODERN) — READER VIEW (v1.0)
   Muted coral (same family as stat #e87a61); quieter than data blocks
   Amir & Mixel — 2025
============================================================ */

.nfb-article blockquote.nfb-quote-modern {
  --nfb-quote-modern-accent: #c4897a;
  --nfb-quote-modern-surface: #faf6f4;

  margin: 3.5rem auto;
  max-width: 600px;
  position: relative;
  padding: 2rem 2.5rem 2rem 3.5rem;
  border-left: 3px solid var(--nfb-quote-modern-accent);
  background: var(--nfb-quote-modern-surface);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nfb-article blockquote.nfb-quote-modern::before {
  content: "\201C";
  position: absolute;
  top: 1rem;
  left: 1.25rem;
  font-size: 2.5rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 600;
  color: var(--nfb-quote-modern-accent, var(--nfb-ornament-quote, #a87362));
  opacity: var(--nfb-ornament-quote-opacity, 0.28);
  pointer-events: none;
  z-index: 0;
}

/* System serif — literary quote vs stat sans (no webfont) */
.nfb-article blockquote.nfb-quote-modern p {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 400;
  line-height: 1.75;
}

.nfb-article blockquote.nfb-quote-modern p.modern-author-field {
  font-style: normal;
}

.nfb-article .modern-quote-field {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  color: #1e293b;
  text-align: left;
  margin: 0 0 1rem 0;
}

.nfb-article .modern-author-field {
  position: relative;
  z-index: 1;
  font-size: 0.875rem;
  color: #94a3b8;
  text-align: right;
  letter-spacing: 0.01em;
  opacity: 0.72;
  margin: 0;
  padding: 0.5rem 0 0 0;
}

.nfb-article .modern-author-field::before {
  content: "— ";
  color: #cbd5e1;
}

/* ============================================================
   PULLQUOTE (SIMPLE) — READER VIEW
   Quiet aside: italic serif only — no hairline, no side bar
   Amir & Mixel — 2025
============================================================ */

.nfb-article .pullquote.pullquote-simple,
.nfb-article .article-body .pullquote.pullquote-simple {
  margin: 2.5rem auto;
  max-width: 500px;
  padding: 0;
}

/* > p: wins over nfb-content-shared .nfb-article p (justify / base size) */
.nfb-article .pullquote.pullquote-simple > p,
.nfb-article .article-body .pullquote.pullquote-simple > p,
.nfb-article .pullquote-simple .pullquote-text-field {
  padding: 0 0.25rem 0 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: Georgia, "Times New Roman", Times, serif !important;
  font-style: italic !important;
  font-size: 1.1rem !important;
  line-height: 1.68 !important;
  font-weight: 400 !important;
  color: #64748b !important;
  letter-spacing: 0.01em !important;
  text-align: left !important;
  text-justify: auto !important;
  hyphens: none !important;
}

/* ============================================================
   PULLQUOTE (MODERN) — READER VIEW
   Statement block: bold sans, topli ornament (accent @ 0.3) — bez lijevog bordera
   Amir & Mixel — 2025
============================================================ */

.nfb-article .pullquote.pullquote-modern,
.nfb-article .article-body .pullquote.pullquote-modern {
  --nfb-quote-modern-accent: #c4897a;
  margin: 3rem auto;
  max-width: 620px;
  padding: 0;
}

.nfb-article .pullquote.pullquote-modern::before,
.nfb-article .article-body .pullquote.pullquote-modern::before {
  content: "\201C";
  display: block;
  text-align: center;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 2rem;
  line-height: 1;
  font-weight: 400;
  color: var(--nfb-quote-modern-accent, var(--nfb-ornament-pullquote, #a87362));
  opacity: var(--nfb-ornament-pullquote-opacity, 0.34);
  margin: 0 0 0.65rem;
  pointer-events: none;
}

.nfb-article .pullquote.pullquote-modern > p,
.nfb-article .article-body .pullquote.pullquote-modern > p,
.nfb-article .pullquote-modern .pullquote-text-field {
  padding: 0.35rem 1rem 0.5rem;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-style: normal !important;
  font-size: 1.38rem !important;
  line-height: 1.42 !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  text-align: center !important;
  text-align-last: center !important;
  text-wrap: balance;
  text-justify: auto !important;
  hyphens: none !important;
}

/* ============================================================
   VERSE — READER VIEW (v1.0)
   Poetry / structured text - form carries meaning
   Verse stands out by absence, not addition
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-verse {
  margin: 3rem auto;
  max-width: 500px;
  padding: 0;
  
  /* No background, no border, no box - just space and rhythm */
}

.nfb-article .nfb-verse .verse-line {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  margin: 0.65rem 0;
  
  /* No background, no border - pure text form */
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  
  /* Typography - quiet, literary */
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 2; /* Increased line-height for poetic rhythm */
  color: #1f2937;
  font-weight: 300; /* Light weight for quiet presence */
  
  /* Indent - subtle, book-like */
  text-align: left;
  hyphens: none;
  text-justify: auto;
  padding-left: 2rem; /* Gentle indent for verse */
  margin-left: 1rem; /* Additional left margin for visual separation */
}

/* Blank verse line in saved HTML (empty <p> or single <br>) = visible stanza gap */
.nfb-article .nfb-verse .verse-line:is(:empty, :has(> br:only-child)) {
  min-height: 2.25em;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* ============================================================
   CALLOUTS — READER VIEW (v1.5 — ARCHITECTURAL FIX)
   All callout types with labels and colors
   Amir & Mixel — 2025
   
   NOTE: Callouts are content blocks, not editor UI.
   All preview/public styles belong here, not in editor CSS.
============================================================ */

/* ============================================================
   FINAL CALLOUT LAYOUT — LABEL ABOVE, TEXT BELOW
   Editorial, calm, readable
============================================================ */

.nfb-article .nfb-callout {
  display: flex;
  flex-direction: column;
  margin: 0.75rem 0;
  padding: 1em 1.25em;
  border-radius: 6px;
  border-left: 3px solid;
}

/* LABEL (icon + title) — Title Case from saved HTML; match editor (no all-caps) */
.nfb-article .nfb-callout .callout-label {
  font-size: 0.75rem; /* Manje od paragrafa */
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: none;
  margin-bottom: 0.35rem;
  line-height: 1.4;
  font-family: Georgia, "Times New Roman", serif;
  color: #111;
  opacity: 0.9;
  user-select: none;
  pointer-events: none;
}

/* CONTENT — 15px = Key Points row size (nf-key-point-item); sans stack */
.nfb-article .nfb-callout .callout-content {
  padding-left: 1.35rem; /* 👈 INDENT (ključna stavka) */
  font-size: 15px;
  line-height: 1.45;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  color: #334155;
}

.nfb-article .nfb-callout .callout-content p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
  color: inherit;
}

.nfb-article .nfb-callout .callout-content strong,
.nfb-article .nfb-callout .callout-content b {
  font-weight: 600;
  color: #1e293b;
}

/* Type-specific colors - distinct colors, label matches border */
.nfb-article .nfb-callout.tip {
  border-left-color: #22c55e; /* Green */
  background: #f0fdf4;
}

.nfb-article .nfb-callout.tip .callout-label {
  color: #22c55e; /* Same as border */
}

.nfb-article .nfb-callout.note {
  border-left: 3px solid #3b82f6; /* Blue */
  background: #eff6ff;
}

.nfb-article .nfb-callout.note .callout-label {
  color: #3b82f6; /* Same as border */
}

.nfb-article .nfb-callout.warning {
  border-left-color: #f59e0b; /* Orange */
  background: #fffbeb;
}

.nfb-article .nfb-callout.warning .callout-label {
  color: #f59e0b; /* Same as border */
}

.nfb-article .nfb-callout.important {
  border-left-color: #ef4444; /* Red */
  background: #fef2f2;
}

.nfb-article .nfb-callout.important .callout-label {
  color: #ef4444; /* Same as border */
}

.nfb-article .nfb-callout.question {
  border-left-color: #9333ea; /* Purple (changed from #8b5cf6) */
  background: #faf5ff;
}

.nfb-article .nfb-callout.question .callout-label {
  color: #9333ea; /* Same as border */
}

.nfb-article .nfb-callout.highlight {
  border-left-color: #eab308; /* Yellow (changed from #fbbf24) */
  background: #fffbeb;
}

.nfb-article .nfb-callout.highlight .callout-label {
  color: #eab308; /* Same as border */
}

.nfb-article .nfb-callout.update {
  border-left-color: #0891b2; /* Cyan (changed from #06b6d4) */
  background: #ecfeff;
}

.nfb-article .nfb-callout.update .callout-label {
  color: #0891b2; /* Same as border */
}

.nfb-article .nfb-callout.example {
  border-left-color: #059669; /* Emerald (changed from #10b981) */
  background: #f0fdf4;
}

.nfb-article .nfb-callout.example .callout-label {
  color: #059669; /* Same as border */
}

.nfb-article .nfb-callout.data {
  border-left-color: #6366f1; /* Indigo */
  background: #eef2ff;
}

.nfb-article .nfb-callout.data .callout-label {
  color: #6366f1; /* Same as border */
}

.nfb-article .nfb-callout.reflection {
  border-left-color: #c026d3; /* Fuchsia (changed from #a855f7) */
  background: #faf5ff;
}

.nfb-article .nfb-callout.reflection .callout-label {
  color: #c026d3; /* Same as border */
}

/* ============================================================
   EXPLAINER — READER VIEW (FINAL v1.0)
   Context & Understanding Block
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-explainer {
  max-width: 720px;
  margin: 3rem auto;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
  background: #f8fafc;
  border-left: 2px solid #cbd5e1;
  border-radius: 10px;
}

/* LABEL — isti rem kao naslovi Footnotes / Glossary */
.nfb-article .nfb-explainer .explainer-label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.75rem;
  user-select: none;
}

/* CONTENT — isto kao footnotes/glossary; p eksplicitno zbog .nfb-article p / article-body */
.nfb-article .nfb-explainer .explainer-content {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
}

.nfb-article .nfb-explainer .explainer-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
}

.nfb-article .nfb-explainer .explainer-content p + p {
  margin-top: 0.75rem;
}

/* ============================================================
   FOOTNOTES — READER VIEW (FINAL v1.0)
   Quiet, book-like styling
   Amir & Mixel — 2025
============================================================ */

/* Superscript marker in text */
.nfb-article .nfb-footnote-ref {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: super;
  color: #64748b;
  font-weight: 400;
  text-decoration: none;
  cursor: default;
  user-select: none;
}

/* Footnotes section — same scale as Glossary (pairs at end of article) */
.nfb-article .nfb-footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.nfb-article .nfb-footnotes h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.nfb-article .nfb-footnotes-list {
  padding-left: 1.25rem;
  margin: 0;
}

.nfb-article .nfb-footnotes-list li {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
}

.nfb-article .nfb-footnotes-list li p {
  font-size: 0.875rem;
  line-height: 1.65;
}

/* Inline Reference (preview) - Editorial style */
.nfb-article .nfb-inline-ref {
  font-size: 0.9em;
  color: #475569; /* slate-600 - more visible, still editorial */
  font-weight: 500; /* subtle weight for better visibility */
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0 0.25em;
  background: rgba(0, 0, 0, 0.04); /* micro background - editorial style */
  border-radius: 4px;
  position: relative; /* mint tooltip ::after (unified s definicijom / appendix) */
  display: inline;
}

.nfb-article .nfb-inline-ref[href] {
  cursor: pointer;
}

.nfb-article .nfb-inline-ref[href]:hover {
  color: #047857; /* emerald-700 - source-like, not link-blue */
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-color: rgba(4, 120, 87, 0.4);
  background: rgba(4, 120, 87, 0.08);
  border-radius: 4px;
}

/* References section (preview) */
.nfb-article .nfb-references {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.nfb-article .nfb-references h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #16a34a; /* Zelenkasta boja */
  margin: 0 0 0.75rem 0;
}

.nfb-article .nfb-references-list {
  padding-left: 1.25rem;
  margin: 0;
}

.nfb-article .nfb-references-list li {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #475569;
}

.nfb-article .nfb-references-list li .reference-url {
  color: #3b82f6;
  text-decoration: underline;
  margin-left: 0.5rem;
}

.nfb-article .nfb-references-list li .reference-url:hover {
  color: #2563eb;
}

/* Further Reading + Sources — same end-matter rhythm as Footnotes / Glossary */
.nfb-article .nfb-references[data-title="Further Reading"],
.nfb-article .nfb-references[data-title="Sources"] {
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.nfb-article .nfb-references[data-title="Further Reading"] h2,
.nfb-article .nfb-references[data-title="Sources"] h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.nfb-article .nfb-references[data-title="Further Reading"] .nfb-references-list li,
.nfb-article .nfb-references[data-title="Sources"] .nfb-references-list li {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.65;
}

.nfb-article .nfb-references[data-title="Further Reading"] .nfb-references-list li p,
.nfb-article .nfb-references[data-title="Sources"] .nfb-references-list li p {
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ============================================================
   INLINE DEFINITION + RELATED CHIPS — READER / editor-shared
   Jedinstveni mint tooltip u previewu (ne kao tamni editor tooltip)
   Amir & Mixel — 2025
============================================================ */

/* Base definition style */
.nfb-article .nfb-inline-def {
  font-size: 0.9em;
  color: #475569; /* slate-600 - editorial */
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: help; /* Indicates there's additional info on hover */
  transition: all 0.2s ease;
  padding: 0 0.25em;
  background: rgba(0, 0, 0, 0.04); /* micro background */
  border-radius: 4px;
  position: relative;
  display: inline;
}

/* Hover state */
.nfb-article .nfb-inline-def:hover {
  color: #047857; /* emerald-700 */
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-color: rgba(4, 120, 87, 0.4);
  background: rgba(4, 120, 87, 0.08);
  border-radius: 4px;
}

/* Reader / editor-shared: jedinstveni mint tooltip (definicija, appendix note, ref s data-tooltip) */
.nfb-article .nfb-appendix-note[data-tooltip]:hover::after,
.editor-shared .nfb-appendix-note[data-tooltip]:hover::after,
.nfb-article .nfb-inline-ref[data-tooltip]:hover::after,
.editor-shared .nfb-inline-ref[data-tooltip]:hover::after,
.nfb-article .nfb-inline-def[data-tooltip]:not([data-definition]):hover::after,
.editor-shared .nfb-inline-def[data-tooltip]:not([data-definition]):hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(165deg, #f8faf8 0%, #ecfdf5 100%);
  color: #14532d;
  border: 1px solid rgba(21, 128, 61, 0.28);
  font-size: 0.875rem;
  line-height: 1.55;
  border-radius: 10px;
  white-space: pre-wrap;
  max-width: min(320px, 88vw);
  width: max-content;
  min-width: 120px;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(22, 101, 52, 0.06);
  z-index: var(--nfb-z-tooltip, 3000);
  pointer-events: none;
  font-weight: 400;
  letter-spacing: 0.01em;
  display: block;
  word-wrap: break-word;
  text-align: left;
}

.nfb-article .nfb-inline-def[data-definition]:not([data-tooltip]):hover::after,
.editor-shared .nfb-inline-def[data-definition]:not([data-tooltip]):hover::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(165deg, #f8faf8 0%, #ecfdf5 100%);
  color: #14532d;
  border: 1px solid rgba(21, 128, 61, 0.28);
  font-size: 0.875rem;
  line-height: 1.55;
  border-radius: 10px;
  white-space: pre-wrap;
  max-width: min(320px, 88vw);
  width: max-content;
  min-width: 120px;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(22, 101, 52, 0.06);
  z-index: var(--nfb-z-tooltip, 3000);
  pointer-events: none;
  font-weight: 400;
  letter-spacing: 0.01em;
  display: block;
  word-wrap: break-word;
  text-align: left;
}

.nfb-article .nfb-inline-def[data-definition][data-tooltip]:hover::after,
.editor-shared .nfb-inline-def[data-definition][data-tooltip]:hover::after {
  content: attr(data-definition) "\A\A" attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(165deg, #f8faf8 0%, #ecfdf5 100%);
  color: #14532d;
  border: 1px solid rgba(21, 128, 61, 0.28);
  font-size: 0.875rem;
  line-height: 1.55;
  border-radius: 10px;
  white-space: pre-wrap;
  max-width: min(320px, 88vw);
  width: max-content;
  min-width: 120px;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(22, 101, 52, 0.06);
  z-index: var(--nfb-z-tooltip, 3000);
  pointer-events: none;
  font-weight: 400;
  letter-spacing: 0.01em;
  display: block;
  word-wrap: break-word;
  text-align: left;
}

.nfb-article .nfb-appendix-note[data-tooltip]:hover::before,
.editor-shared .nfb-appendix-note[data-tooltip]:hover::before,
.nfb-article .nfb-inline-ref[data-tooltip]:hover::before,
.editor-shared .nfb-inline-ref[data-tooltip]:hover::before,
.nfb-article .nfb-inline-def[data-tooltip]:not([data-definition]):hover::before,
.editor-shared .nfb-inline-def[data-tooltip]:not([data-definition]):hover::before,
.nfb-article .nfb-inline-def[data-definition]:hover::before,
.editor-shared .nfb-inline-def[data-definition]:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  margin-bottom: 0.35rem;
  border: 7px solid transparent;
  border-top-color: #ecfdf5;
  z-index: calc(var(--nfb-z-tooltip, 3000) + 1);
  pointer-events: none;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(21, 128, 61, 0.18));
}

/* ============================================================
   GLOSSARY SECTION — READER VIEW (v1.0)
   Glossary list styling
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-glossary {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.nfb-article .nfb-glossary h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.nfb-article .nfb-glossary-list {
  padding-left: 1.25rem; /* Indent kao footnotes i references lista */
  margin: 0;
  list-style: none;
}

.nfb-article .nfb-glossary-item {
  margin-bottom: 0.75rem;
}

.nfb-article .nfb-glossary-item dt {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a;
  margin-bottom: 0;
}

.nfb-article .nfb-glossary-item dd {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #64748b;
  margin-left: 1.5rem;
  margin-bottom: 0;
}

/* ============================================================
   APPENDIX SECTION — READER VIEW (v1.0)
   Appendix list styling - same pattern as Footnotes/Glossary
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-appendix {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.nfb-article .nfb-appendix h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a; /* Ista skala kao Footnotes / Glossary */
  margin: 0 0 0.75rem 0;
}

.nfb-article .nfb-appendix-list {
  padding-left: 1.25rem; /* Indent kao footnotes i references lista */
  margin: 0;
}

.nfb-article .nfb-appendix-list li {
  margin-bottom: 0.75rem; /* Match footnotes spacing */
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
}

/* All appendix body lines:beat nfb-content-shared `.nfb-article p { font-size: var(--nfb-font-size-base) }` */
.nfb-article .nfb-appendix-list li p,
.nfb-article .nfb-appendix-list li.nfb-appendix-item p,
.nfb-article .nfb-appendix-item p {
  font-size: 0.875rem;
  line-height: 1.65;
}

/* Appendix item fields - style the 5 structured paragraphs */
.nfb-article .nfb-appendix-list li p.appendix-title-field,
.nfb-article .nfb-appendix-item p.appendix-title-field {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.nfb-article .nfb-appendix-list li p.appendix-author-field,
.nfb-article .nfb-appendix-list li p.appendix-publication-field,
.nfb-article .nfb-appendix-list li p.appendix-url-field,
.nfb-article .nfb-appendix-item p.appendix-author-field,
.nfb-article .nfb-appendix-item p.appendix-publication-field,
.nfb-article .nfb-appendix-item p.appendix-url-field {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #64748b;
  margin-bottom: 0.25rem;
  margin-left: 1.25rem; /* Indent kao glossary definitions */
}

.nfb-article .nfb-appendix-list li p.appendix-notes-field,
.nfb-article .nfb-appendix-item p.appendix-notes-field {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #475569;
  margin-top: 0.5rem;
  margin-bottom: 0;
  margin-left: 1.25rem; /* Indent kao glossary definitions */
  font-style: italic; /* Slight emphasis for notes */
}

/* Appendix Note (preview) — same interaction pattern as editor (tooltip + scroll target) */
.nfb-article .nfb-appendix-note,
.editor-shared .nfb-appendix-note {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #16a34a; /* Green accent — appendix marker in body text */
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 0.25em;
  background: rgba(22, 163, 74, 0.08); /* Light green background */
  border-radius: 4px;
  user-select: none;
  position: relative; /* tooltip ::after */
  display: inline;
  scroll-margin-top: 2rem; /* offset when scrolling to inline marker */
}

.nfb-article .nfb-appendix-note:hover,
.editor-shared .nfb-appendix-note:hover {
  color: #15803d; /* Darker green on hover */
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-color: rgba(22, 163, 74, 0.4);
  background: rgba(22, 163, 74, 0.12);
  border-radius: 4px;
}

.nfb-article .nfb-appendix-note:focus-visible,
.editor-shared .nfb-appendix-note:focus-visible {
  outline: 2px solid rgba(22, 163, 74, 0.45);
  outline-offset: 2px;
}

/* ============================================================
   TABLE — ARTICLE PREVIEW (v1.0)
   Editorial / book-like style with variants
============================================================ */

/* Base table wrapper */
.nfb-article .nf-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

/* Base table styles */
.nfb-article table.nf-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.nfb-article table.nf-table th,
.nfb-article table.nf-table td {
  padding: 0.75rem 0.875rem;
  vertical-align: top;
  word-break: break-word;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
}

/* Make header row visually obvious with modern, soft gradient */
.nfb-article table.nf-table th {
  font-weight: 600;
  color: #6b21a8 !important;
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.95), rgba(221, 214, 254, 0.95));
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.6px;
  vertical-align: middle;
  padding: 0.625rem 0.875rem;
  line-height: 1.4;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(90, 44, 160, 0.15);
}

/* Body row hover - subtle interactivity */
.nfb-article table.nf-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
  transition: background 0.15s ease;
}

/* Zebra rows - subtle depth for data tables */
.nfb-article table.nf-table tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.015);
}

/* Rounded corners on first row header */
.nfb-article table.nf-table tr:first-child th:first-child {
  border-top-left-radius: 10px;
}

.nfb-article table.nf-table tr:first-child th:last-child {
  border-top-right-radius: 10px;
}

/* Default variant — Standard table with subtle borders */
.nfb-article table.nf-table[data-variant="default"] th,
.nfb-article table.nf-table[data-variant="default"] td {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
}

.nfb-article table.nf-table[data-variant="default"] tbody tr:last-child td {
  border-bottom: none !important;
}

/* Remove borders from all variants last row */
.nfb-article table.nf-table tbody tr:last-child td {
  border-bottom: none !important;
}

/* Default variant header - ljubičasta (purple) gradient background */
.nfb-article table.nf-table[data-variant="default"] th {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.95), rgba(221, 214, 254, 0.95));
  color: #6b21a8 !important;
  text-align: center;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(90, 44, 160, 0.15);
}

.nfb-article table.nf-table[data-variant="default"] tbody tr:nth-child(even) td {
  background: rgba(237, 233, 254, 0.25);
}

.nfb-article table.nf-table[data-variant="default"] tbody tr:hover td {
  background: rgba(237, 233, 254, 0.35);
}

/* Borderless variant — Clean table without borders */
.nfb-article table.nf-table[data-variant="borderless"] th,
.nfb-article table.nf-table[data-variant="borderless"] td {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.4);
}

/* Borderless variant header - narandžasta (orange) gradient background */
.nfb-article table.nf-table[data-variant="borderless"] th {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(254, 215, 170, 0.95));
  color: #c2410c !important;
  text-align: left;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(194, 65, 12, 0.15);
}

.nfb-article table.nf-table[data-variant="borderless"] tbody tr:nth-child(even) td {
  background: rgba(255, 237, 213, 0.25);
}

.nfb-article table.nf-table[data-variant="borderless"] tbody tr:hover td {
  background: rgba(255, 237, 213, 0.35);
}

/* Aqua variant — Aqua-styled table */
.nfb-article table.nf-table[data-variant="aqua"] th,
.nfb-article table.nf-table[data-variant="aqua"] td {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
}

/* Aqua variant header - plava (blue) gradient background */
.nfb-article table.nf-table[data-variant="aqua"] th {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.95));
  color: #0c4a6e !important;
  text-align: left;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(12, 74, 110, 0.15);
}

.nfb-article table.nf-table[data-variant="aqua"] tbody tr:nth-child(even) td {
  background: rgba(224, 242, 254, 0.4);
}

.nfb-article table.nf-table[data-variant="aqua"] tbody tr:hover td {
  background: rgba(224, 242, 254, 0.5);
}

/* Green variant — Green-styled table */
.nfb-article table.nf-table[data-variant="green"] th,
.nfb-article table.nf-table[data-variant="green"] td {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
}

/* Green variant header - zelena (green) gradient background */
.nfb-article table.nf-table[data-variant="green"] th {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.95), rgba(187, 247, 208, 0.95));
  color: #14532d !important;
  text-align: center;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(20, 83, 45, 0.15);
}

.nfb-article table.nf-table[data-variant="green"] tbody tr:nth-child(even) td {
  background: rgba(220, 252, 231, 0.4);
}

.nfb-article table.nf-table[data-variant="green"] tbody tr:hover td {
  background: rgba(220, 252, 231, 0.5);
}

/* Red variant — Red-styled table */
.nfb-article table.nf-table[data-variant="red"] th,
.nfb-article table.nf-table[data-variant="red"] td {
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.5);
}

/* Red variant header - crvena (red) gradient background */
.nfb-article table.nf-table[data-variant="red"] th {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.95), rgba(254, 202, 202, 0.95));
  color: #7f1d1d !important;
  text-align: center;
  border-bottom: none;
  box-shadow: inset 0 -1px 0 rgba(127, 29, 29, 0.15);
}

.nfb-article table.nf-table[data-variant="red"] tbody tr:nth-child(even) td {
  background: rgba(254, 226, 226, 0.4);
}

.nfb-article table.nf-table[data-variant="red"] tbody tr:hover td {
  background: rgba(254, 226, 226, 0.5);
}

/* ============================================================
   NFB TABLE STYLES — Publishing-focused variants (NEW)
   Same styles as editor, for article preview
============================================================ */

/* Base NFB table class (always present) */
.nfb-article table.nfb-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.nfb-article table.nfb-table th,
.nfb-article table.nfb-table td {
  padding: 0.75rem 0.875rem;
  vertical-align: top;
  word-break: break-word;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  border: 1px solid #e2e8f0;
}

.nfb-article table.nfb-table th > p,
.nfb-article table.nfb-table td > p {
  margin: 0;
}

.nfb-article table.nfb-table th > p + p,
.nfb-article table.nfb-table td > p + p {
  margin-top: 0.5rem;
}

/* ============================================================
   STYLE VARIANTS
============================================================ */

/* Editorial (default) — Rich, magazine-style */
.nfb-article table.nfb-table--editorial th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.6px;
  vertical-align: middle;
  padding: 0.625rem 0.875rem;
  line-height: 1.4;
  text-align: center;
}

.nfb-article table.nfb-table--editorial tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.015);
}

.nfb-article table.nfb-table--editorial tbody tr:hover td {
  background: rgba(0, 0, 0, 0.025);
}

/* Compact — Dense, spec/comparison style */
.nfb-article table.nfb-table--compact th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  vertical-align: middle;
  padding: 0.5rem 0.75rem;
  line-height: 1.3;
  text-align: left;
}

.nfb-article table.nfb-table--compact td {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.nfb-article table.nfb-table--compact tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.01);
}

/* Plain — Minimal, print-friendly */
.nfb-article table.nfb-table--plain th {
  font-weight: 500;
  text-transform: none;
  font-size: 0.95rem;
  letter-spacing: normal;
  vertical-align: middle;
  padding: 0.625rem 0.875rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important; /* Override accent colors */
}

.nfb-article table.nfb-table--plain th,
.nfb-article table.nfb-table--plain td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.nfb-article table.nfb-table--plain tbody tr:nth-child(even) td {
  background: transparent;
}

/* Plain style overrides all accent colors - accent has no effect on plain */
.nfb-article table.nfb-table--plain.nfb-accent-default th,
.nfb-article table.nfb-table--plain.nfb-accent-mint th,
.nfb-article table.nfb-table--plain.nfb-accent-lavender th,
.nfb-article table.nfb-table--plain.nfb-accent-sand th,
.nfb-article table.nfb-table--plain.nfb-accent-sky th,
.nfb-article table.nfb-table--plain.nfb-accent-slate th,
.nfb-article table.nfb-table--plain.nfb-accent-forest th,
.nfb-article table.nfb-table--plain.nfb-accent-olive th,
.nfb-article table.nfb-table--plain.nfb-accent-amber th,
.nfb-article table.nfb-table--plain.nfb-accent-clay th {
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

/* Comparison — For comparisons, X vs Y, plans, options */
.nfb-article table.nfb-table--comparison th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.7px;
  vertical-align: middle;
  padding: 0.75rem 0.875rem;
  line-height: 1.3;
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  text-align: center;
}

.nfb-article table.nfb-table--comparison td {
  padding: 0.75rem 0.875rem;
}

/* Bold first column for easier scanning */
.nfb-article table.nfb-table--comparison td:first-child {
  font-weight: 600;
  color: #1f2937;
}

.nfb-article table.nfb-table--comparison tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02);
}

.nfb-article table.nfb-table--comparison tbody tr:hover td {
  background: rgba(0, 0, 0, 0.035);
}

/* Callout — For info boxes, rules, summaries, warnings */
.nfb-article table.nfb-table--callout {
  background: rgba(249, 250, 251, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
}

.nfb-article table.nfb-table--callout th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.6px;
  vertical-align: middle;
  padding: 0.75rem 0.875rem;
  line-height: 1.4;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px 6px 0 0;
}

/* Note: Accent classes automatically override callout header background via higher specificity */
/* Accent affects only header background, not the callout table background (which stays gray) */

.nfb-article table.nfb-table--callout td {
  padding: 0.75rem 0.875rem;
  background: rgba(255, 255, 255, 0.4);
}

.nfb-article table.nfb-table--callout tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.5);
}

.nfb-article table.nfb-table--callout tbody tr:hover td {
  background: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   ACCENT PALETTE (affects header background + shadow only)
============================================================ */

/* Default accent — Purple (NFB brand) */
.nfb-article table.nfb-accent-default th {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.95), rgba(221, 214, 254, 0.95));
  color: #6b21a8 !important;
  box-shadow: inset 0 -1px 0 rgba(90, 44, 160, 0.15);
}

/* Mint accent — Fresh, light green */
.nfb-article table.nfb-accent-mint th {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.95), rgba(187, 247, 208, 0.95));
  color: #14532d !important;
  box-shadow: inset 0 -1px 0 rgba(20, 83, 45, 0.15);
}

/* Lavender accent — Soft purple */
.nfb-article table.nfb-accent-lavender th {
  background: linear-gradient(135deg, rgba(243, 232, 255, 0.95), rgba(233, 213, 255, 0.95));
  color: #6b21a8 !important;
  box-shadow: inset 0 -1px 0 rgba(107, 33, 168, 0.15);
}

/* Sand accent — Warm beige */
.nfb-article table.nfb-accent-sand th {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(254, 215, 170, 0.95));
  color: #c2410c !important;
  box-shadow: inset 0 -1px 0 rgba(194, 65, 12, 0.15);
}

/* Sky accent — Light blue */
.nfb-article table.nfb-accent-sky th {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(191, 219, 254, 0.95));
  color: #0c4a6e !important;
  box-shadow: inset 0 -1px 0 rgba(12, 74, 110, 0.15);
}

/* Slate accent — Neutral gray */
.nfb-article table.nfb-accent-slate th {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.95));
  color: #475569 !important;
  box-shadow: inset 0 -1px 0 rgba(71, 85, 105, 0.15);
}

/* Forest accent — Deep green (natural, positive) */
.nfb-article table.nfb-accent-forest th {
  background: linear-gradient(135deg, rgba(187, 247, 208, 0.95), rgba(134, 239, 172, 0.95));
  color: #166534 !important;
  box-shadow: inset 0 -1px 0 rgba(22, 101, 52, 0.15);
}

/* Olive accent — Earthy green-yellow (natural, warm) */
.nfb-article table.nfb-accent-olive th {
  background: linear-gradient(135deg, rgba(254, 252, 232, 0.95), rgba(250, 245, 200, 0.95));
  color: #713f12 !important;
  box-shadow: inset 0 -1px 0 rgba(113, 63, 18, 0.15);
}

/* Amber accent — Warm yellow-orange (editorial, warm) */
.nfb-article table.nfb-accent-amber th {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.95));
  color: #92400e !important;
  box-shadow: inset 0 -1px 0 rgba(146, 64, 14, 0.15);
}

/* Clay accent — Earthy red-brown (warm, editorial) */
.nfb-article table.nfb-accent-clay th {
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(254, 226, 226, 0.95));
  color: #991b1b !important;
  box-shadow: inset 0 -1px 0 rgba(153, 27, 27, 0.15);
}

/* ============================================================
   EMBED BLOCK — External content embed (Preview)
============================================================ */

/* Embed container */
.nfb-article .nf-embed {
  margin: var(--nfb-space-xl) 0;
  position: relative;
}

/* Responsive wrapper for iframe embeds */
.nfb-article .nf-embed .embed-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 default */
  height: 0;
  overflow: hidden;
  border-radius: var(--nfb-radius-md);
  background: #000;
}

.nfb-article .nf-embed .embed-responsive[style*="aspect-ratio: 4:3"] {
  padding-bottom: 75%; /* 4:3 */
}

.nfb-article .nf-embed .embed-responsive[style*="aspect-ratio: auto"] {
  padding-bottom: 0;
  height: auto;
}

/* Iframe */
.nfb-article .nf-embed .embed-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Link preview card */
.nfb-article .nf-embed .embed-link-card {
  padding: var(--nfb-space-lg);
  border: var(--nfb-border-width-thin) var(--nfb-border-style-solid) var(--nfb-border);
  border-radius: var(--nfb-radius-lg);
  background: var(--nfb-bg);
  transition: all var(--nfb-transition-fast);
}

.nfb-article .nf-embed .embed-link-card:hover {
  border-color: var(--nfb-border-dark);
  box-shadow: var(--nfb-shadow-sm);
}

.nfb-article .nf-embed .embed-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.nfb-article .nf-embed .embed-link-content {
  display: flex;
  flex-direction: column;
  gap: var(--nfb-space-xs);
}

.nfb-article .nf-embed .embed-link-domain {
  font-weight: var(--nfb-font-weight-semibold);
  color: var(--nfb-text);
  font-size: var(--nfb-font-size-base);
}

.nfb-article .nf-embed .embed-link-url {
  font-size: var(--nfb-font-size-sm);
  color: var(--nfb-text-muted);
  word-break: break-all;
}

/* Alignment */
.nfb-article .nf-embed[data-align="left"] {
  margin-left: 0;
  margin-right: auto;
  max-width: 50%;
}

.nfb-article .nf-embed[data-align="right"] {
  margin-left: auto;
  margin-right: 0;
  max-width: 50%;
}

.nfb-article .nf-embed[data-align="center"] {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   INFOBOX — READER STYLES (Article Preview)
   v2.0 — Basic / Quick Facts, Position, Image, Theme
============================================================ */

/* Base Infobox (class from editor OR data-infobox from preview renderer) */
.nfb-article .nfb-infobox,
.nfb-article [data-infobox],
.nfb-infobox {
  max-width: 720px;
  margin: 3.5rem auto;
  padding: 1.5rem 1.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fafafa;
  transition: all 0.2s ease;
}

/* Note: offsetY is applied via inline style in renderHTML (transform: translateY) */

/* Position: Inline (default) */
.nfb-article .nfb-infobox--pos-inline,
.nfb-article [data-infobox][data-position="inline"] {
  max-width: 720px;
  margin: 3.5rem auto;
}

/* Infobox alignment (class from editor) */
.nfb-article .nfb-infobox.align-left {
  margin-left: 0;
  margin-right: auto;
}

.nfb-article .nfb-infobox.align-center {
  margin-left: auto;
  margin-right: auto;
}

.nfb-article .nfb-infobox.align-right {
  margin-left: auto;
  margin-right: 0;
}

/* INFOBOX alignment for preview renderer (data attributes, no class) */
.nfb-article [data-infobox][data-position="sidebar-left"] {
  float: left !important;
  width: 260px !important;
  max-width: 260px !important;
  margin: 0 2rem 1.25rem 0 !important;
  box-sizing: border-box;
  shape-outside: inset(0) !important;
  shape-margin: 1rem !important;
}

.nfb-article [data-infobox][data-position="sidebar-right"] {
  float: right !important;
  width: 260px !important;
  max-width: 260px !important;
  margin: 0 0 1.25rem 2rem !important;
  box-sizing: border-box;
  shape-outside: inset(0) !important;
  shape-margin: 1rem !important;
}

.nfb-article [data-infobox][data-position="inline"][data-align="left"],
.nfb-article [data-infobox][data-align="left"] {
  margin-left: 0;
  margin-right: auto;
}

.nfb-article [data-infobox][data-position="inline"][data-align="right"],
.nfb-article [data-infobox][data-align="right"] {
  margin-left: auto;
  margin-right: 0;
}

.nfb-article [data-infobox][data-position="inline"][data-align="center"],
.nfb-article [data-infobox][data-align="center"] {
  margin-left: auto;
  margin-right: auto;
}

/* Position: Sidebar Left */
.nfb-article .nfb-infobox--pos-sidebar-left {
  float: left !important;
  width: 260px !important;
  max-width: 260px !important;
  margin: 0 2rem 1.25rem 0 !important;
  box-sizing: border-box;
  shape-outside: inset(0) !important;
  shape-margin: 1rem !important;
}

/* Position: Sidebar Right */
.nfb-article .nfb-infobox--pos-sidebar-right {
  float: right !important;
  width: 260px !important;
  max-width: 260px !important;
  margin: 0 0 1.25rem 2rem !important;
  box-sizing: border-box;
  shape-outside: inset(0) !important;
  shape-margin: 1rem !important;
}

/* Mobile: Sidebar infoboxes become inline (float off)
   Breakpoint 720px: article is 680px wide, sidebar 260px would make text too narrow */
@media (max-width: 720px) {
  .nfb-article .nfb-infobox--pos-sidebar-left,
  .nfb-article .nfb-infobox--pos-sidebar-right,
  .nfb-article [data-infobox][data-position="sidebar-left"],
  .nfb-article [data-infobox][data-position="sidebar-right"] {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem 0 !important;
  }
}

/* Paragraph after sidebar infobox: top margin so first line doesn't overlap infobox top (float wrap) */
.nfb-article .nfb-infobox--pos-sidebar-left + p,
.nfb-article .nfb-infobox--pos-sidebar-right + p,
.nfb-article [data-infobox][data-position="sidebar-left"] + p,
.nfb-article [data-infobox][data-position="sidebar-right"] + p {
  margin-top: 1.25rem !important;
}

/* Image wrapper */
.nfb-article .nfb-infobox .nf-infobox-image,
.nfb-article [data-infobox] .nf-infobox-image {
  margin-bottom: 0.75rem;
}

.nfb-article .nfb-infobox .nf-infobox-image img,
.nfb-article [data-infobox] .nf-infobox-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Image caption */
.nfb-article .nfb-infobox .nf-infobox-caption,
.nfb-article [data-infobox] .nf-infobox-caption {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Header (icon + title) */
.nfb-article .nfb-infobox .nf-infobox-header,
.nfb-article [data-infobox] .nf-infobox-header {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: #1f2937 !important;
}

.nfb-article .nfb-infobox .nf-infobox-header span:first-child,
.nfb-article .nfb-infobox .nf-infobox-header-icon,
.nfb-article [data-infobox] .nf-infobox-header span:first-child,
.nfb-article [data-infobox] .nf-infobox-header-icon {
  font-size: 1.25rem !important;
  display: inline-block !important;
}

/* Quick Facts list */
.nfb-article .nfb-infobox .nf-infobox-facts,
.nfb-article [data-infobox] .nf-infobox-facts,
.nfb-article ul.nf-infobox-facts,
html body .nfb-article .nfb-infobox ul.nf-infobox-facts,
html body .nfb-article [data-infobox] ul.nf-infobox-facts,
html body .nfb-article ul.nf-infobox-facts {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.1rem !important;
}

.nfb-article .nfb-infobox .nf-infobox-fact,
.nfb-article [data-infobox] .nf-infobox-fact,
.nfb-article li.nf-infobox-fact,
html body .nfb-article .nfb-infobox li.nf-infobox-fact,
html body .nfb-article [data-infobox] li.nf-infobox-fact,
html body .nfb-article li.nf-infobox-fact {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.5rem !important;
  padding: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  line-height: 1.5 !important;
}

/* Quick Facts fact icon and text styling */
.nfb-article .nfb-infobox .nf-infobox-fact-icon,
.nfb-article [data-infobox] .nf-infobox-fact-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.nfb-article .nfb-infobox .nf-infobox-fact-text,
.nfb-article [data-infobox] .nf-infobox-fact-text {
  flex: 1;
  color: #374151;
  line-height: 1.5;
  font-size: 1rem;
  margin: 0;
  padding: 0;
}

/* Quick Facts fact text styling (backward compatibility) */
.nfb-article .nfb-infobox .nf-infobox-fact span:last-child,
.nfb-article [data-infobox] .nf-infobox-fact span:last-child {
  color: #374151;
  line-height: 1.5;
  font-size: 1rem;
  margin: 0;
  padding: 0;
}

/* Content wrapper (for Basic type) */
.nfb-article .nfb-infobox .nf-infobox-content,
.nfb-article [data-infobox] .nf-infobox-content {
  margin: 0;
  padding: 0;
}

/* Paragraphs inside infobox content (for Basic type) */
.nfb-article .nfb-infobox .nf-infobox-content p,
.nfb-article [data-infobox] .nf-infobox-content p {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: #374151;
  font-size: 1rem;
}

.nfb-article .nfb-infobox .nf-infobox-content p:first-child,
.nfb-article [data-infobox] .nf-infobox-content p:first-child {
  margin-top: 0;
}

.nfb-article .nfb-infobox .nf-infobox-content p:last-child,
.nfb-article [data-infobox] .nf-infobox-content p:last-child {
  margin-bottom: 0;
}

/* Hide section label (Infobox header) in article preview */
.nfb-article .nfb-infobox .nfb-section-label,
body .nfb-infobox .nfb-section-label {
  display: none !important;
}

/* ============================================================
   INFOBOX THEME CLASSES (Optional - for visual presets)
   These classes change colors/styling but NOT structure
============================================================ */

/* Theme: Info (Blue) */
.nfb-article .nfb-infobox--theme-info,
.nfb-article [data-infobox][data-theme="info"] {
  background: #e0f2fe !important;
  border-color: #38bdf8 !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-info .nf-infobox-header,
.nfb-article [data-infobox][data-theme="info"] .nf-infobox-header {
  color: #0c4a6e !important;
}

/* Theme: Tip (Green) */
.nfb-article .nfb-infobox--theme-tip,
.nfb-article [data-infobox][data-theme="tip"] {
  background: #f0fdf4 !important;
  border-color: #4ade80 !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-tip .nf-infobox-header,
.nfb-article [data-infobox][data-theme="tip"] .nf-infobox-header {
  color: #14532d !important;
}

/* Theme: Warning (Orange) */
.nfb-article .nfb-infobox--theme-warning,
.nfb-article [data-infobox][data-theme="warning"] {
  background: #fff7ed !important;
  border-color: #fb923c !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-warning .nf-infobox-header,
.nfb-article [data-infobox][data-theme="warning"] .nf-infobox-header {
  color: #78350f !important;
}

/* Theme: Important (Red) */
.nfb-article .nfb-infobox--theme-important,
.nfb-article [data-infobox][data-theme="important"] {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-important .nf-infobox-header,
.nfb-article [data-infobox][data-theme="important"] .nf-infobox-header {
  color: #7f1d1d !important;
}

/* Theme: Did You Know (Yellow) */
.nfb-article .nfb-infobox--theme-didyouknow,
.nfb-article [data-infobox][data-theme="didyouknow"] {
  background: #fefce8 !important;
  border-color: #eab308 !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-didyouknow .nf-infobox-header,
.nfb-article [data-infobox][data-theme="didyouknow"] .nf-infobox-header {
  color: #713f12 !important;
}

/* Theme: Data (Purple) */
.nfb-article .nfb-infobox--theme-data,
.nfb-article [data-infobox][data-theme="data"] {
  background: #faf5ff !important;
  border-color: #a78bfa !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-data .nf-infobox-header,
.nfb-article [data-infobox][data-theme="data"] .nf-infobox-header {
  color: #581c87 !important;
}

/* Theme: Update (Teal) */
.nfb-article .nfb-infobox--theme-update,
.nfb-article [data-infobox][data-theme="update"] {
  background: #f0fdfa !important;
  border-color: #2dd4bf !important;
  border-style: solid !important;
}

.nfb-article .nfb-infobox--theme-update .nf-infobox-header,
.nfb-article [data-infobox][data-theme="update"] .nf-infobox-header {
  color: #134e4a !important;
}

/* ============================================================
   IMAGE BLOCK — READER STYLES (Article Preview)
   v1.0 — Single image, alignment via data-align
============================================================ */

/* Base Image Block container */
.nfb-article .nfb-image-block,
.nfb-image-block {
  position: relative;
}

/* Body — slika + caption u jednoj koloni, caption centriran ispod slike */
.nfb-article .nfb-image-block__body,
.nfb-image-block__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.nfb-article .nfb-image-block__body > a,
.nfb-image-block__body > a {
  display: block;
  align-self: stretch;
  max-width: 100%;
}

/* ============================================================
   FLOAT-BASED TEXT WRAP (magazine style) — Preview
============================================================ */

/* Left: float left, text wraps on the right */
.nfb-article .nfb-image-block[data-align="left"],
.nfb-image-block[data-align="left"],
.nfb-article .nfb-image-block.align-left,
.nfb-image-block.align-left {
  float: left;
  margin: 0.3rem 2rem 0.5rem 0;
  max-width: min(320px, 100%);
  shape-outside: margin-box;
  shape-margin: 12px;
}

/* Right: float right, text wraps on the left */
.nfb-article .nfb-image-block[data-align="right"],
.nfb-image-block[data-align="right"],
.nfb-article .nfb-image-block.align-right,
.nfb-image-block.align-right {
  float: right;
  margin: 0.3rem 0 0.5rem 2rem;
  max-width: min(320px, 100%);
  shape-outside: margin-box;
  shape-margin: 12px;
}

/* Center: no float, block in middle */
.nfb-article .nfb-image-block[data-align="center"],
.nfb-image-block[data-align="center"],
.nfb-article .nfb-image-block.align-center,
.nfb-image-block.align-center,
.nfb-article .nfb-image-block:not([data-align]),
.nfb-image-block:not([data-align]) {
  float: none;
  margin: 2rem auto;
  max-width: 100%;
}

/* Body alignment for center */
.nfb-article .nfb-image-block.align-center .nfb-image-block__body,
.nfb-image-block.align-center .nfb-image-block__body,
.nfb-article .nfb-image-block[data-align="center"] .nfb-image-block__body,
.nfb-image-block[data-align="center"] .nfb-image-block__body,
.nfb-article .nfb-image-block:not([data-align]) .nfb-image-block__body,
.nfb-image-block:not([data-align]) .nfb-image-block__body {
  margin-left: auto;
  margin-right: auto;
}

/* Magazine trick: small gap so text doesn't stick to floated image */
.nfb-article .nfb-image-block.align-left + p,
.nfb-image-block.align-left + p,
.nfb-article .nfb-image-block[data-align="left"] + p,
.nfb-image-block[data-align="left"] + p,
.nfb-article .nfb-image-block.align-right + p,
.nfb-image-block.align-right + p,
.nfb-article .nfb-image-block[data-align="right"] + p,
.nfb-image-block[data-align="right"] + p {
  margin-top: 0.25rem;
}

/* Image */
.nfb-article .nfb-image-block__img,
.nfb-image-block__img,
.nfb-article .nfb-image-block img,
.nfb-image-block img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Image link */
.nfb-article .nfb-image-block a,
.nfb-image-block a {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nfb-article .nfb-image-block a:hover,
.nfb-image-block a:hover {
  opacity: 0.9;
}

/* Caption (alt + link) — editorial style */
.nfb-article .nfb-image-block__caption,
.nfb-image-block__caption {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.4rem;
  line-height: 1.4;
  max-width: 100%;
  font-style: italic;
}

.nfb-article .nfb-image-block__caption-sep,
.nfb-image-block__caption-sep {
  opacity: 0.6;
  margin: 0 0.25em;
}

.nfb-article .nfb-image-block__caption-link-a,
.nfb-image-block__caption-link-a {
  color: #047857;
  text-decoration: none;
  border-bottom: 1px solid rgba(4, 120, 87, 0.35);
  transition: color 0.15s, border-color 0.15s;
}

.nfb-article .nfb-image-block__caption-link-a:hover,
.nfb-image-block__caption-link-a:hover {
  color: #065f46;
  border-bottom-color: #065f46;
}

/* Caption — uvijek ispod centra slike */
.nfb-article .nfb-image-block .nfb-image-block__caption,
.nfb-image-block .nfb-image-block__caption {
  text-align: center;
  align-self: stretch;
}

/* Širina: postotak na blok (kolona), slika puni slot */
.nfb-article .nfb-image-block[data-width="25%"],
.nfb-image-block[data-width="25%"] {
  width: 25%;
  max-width: 100%;
}

.nfb-article .nfb-image-block[data-width="33%"],
.nfb-image-block[data-width="33%"] {
  width: 33.333%;
  max-width: 100%;
}

.nfb-article .nfb-image-block[data-width="50%"],
.nfb-image-block[data-width="50%"] {
  width: 50%;
  max-width: 100%;
}

.nfb-article .nfb-image-block[data-width="66%"],
.nfb-image-block[data-width="66%"] {
  width: 66.666%;
  max-width: 100%;
}

.nfb-article .nfb-image-block[data-width="75%"],
.nfb-image-block[data-width="75%"] {
  width: 75%;
  max-width: 100%;
}

.nfb-article .nfb-image-block[data-width="100%"],
.nfb-image-block[data-width="100%"] {
  width: 100%;
  max-width: 100%;
}

.nfb-article .nfb-image-block[data-width] .nfb-image-block__img,
.nfb-image-block[data-width] .nfb-image-block__img,
.nfb-article .nfb-image-block[data-width] .nfb-image-block__body img,
.nfb-image-block[data-width] .nfb-image-block__body img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Note: offsetY is applied via inline style in renderHTML (transform: translateY) */

/* Mobile: clear float, center and full width */
@media (max-width: 768px) {
  .nfb-article .nfb-image-block.align-left,
  .nfb-image-block.align-left,
  .nfb-article .nfb-image-block.align-right,
  .nfb-image-block.align-right,
  .nfb-article .nfb-image-block[data-align="left"],
  .nfb-image-block[data-align="left"],
  .nfb-article .nfb-image-block[data-align="right"],
  .nfb-image-block[data-align="right"] {
    float: none;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .nfb-article .nfb-image-block__body,
  .nfb-image-block__body {
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .nfb-article .nfb-image-block[data-width] .nfb-image-block__img,
  .nfb-image-block[data-width] .nfb-image-block__img,
  .nfb-article .nfb-image-block[data-width] img,
  .nfb-image-block[data-width] img {
    max-width: 100% !important;
  }
}

/* ============================================================
   IMAGE LIGHTBOX — Click to enlarge (Medium/Substack style)
   Works for Image block, Figure, Gallery, Masonry, Infobox
   Amir & Mixel — 2025
============================================================ */

/* Clickable cursor for article images (Image, Figure, Gallery, Masonry, Infobox) */
.nfb-article .article-body img {
  cursor: pointer;
}

/* Lightbox overlay */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}

.image-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 6px;
  object-fit: contain;
  cursor: default;
  pointer-events: none;
}

/* ============================================================
   GALLERY — Article Preview (Gallery 2, 3, Masonry)
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-gallery,
.nfb-gallery {
  margin: 2.5rem auto 3rem;
  max-width: 720px;
}

.nfb-article .nfb-gallery__inner,
.nfb-gallery__inner {
  display: grid;
  align-items: start;
  gap: 12px;
  border-radius: 8px;
  overflow: hidden;
}

/* Gallery 2: two columns */
.nfb-article .nfb-gallery--two .nfb-gallery__inner,
.nfb-gallery--two .nfb-gallery__inner {
  grid-template-columns: 1fr 1fr;
}

/* Gallery 3: three columns */
.nfb-article .nfb-gallery--three .nfb-gallery__inner,
.nfb-gallery--three .nfb-gallery__inner {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Masonry: CSS columns (Pinterest-style) */
.nfb-article .nfb-gallery--masonry .nfb-gallery__inner,
.nfb-gallery--masonry .nfb-gallery__inner {
  display: block;
  column-count: 3;
  column-gap: 1rem;
}

.nfb-article .nfb-gallery--masonry .nfb-gallery__item,
.nfb-gallery--masonry .nfb-gallery__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  page-break-inside: avoid;
}

.nfb-article .nfb-gallery--masonry .nfb-gallery__item .nfb-gallery__img,
.nfb-gallery--masonry .nfb-gallery__item .nfb-gallery__img {
  height: auto;
  width: 100%;
}

.nfb-article .nfb-gallery__item,
.nfb-gallery__item {
  position: relative;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nfb-article .nfb-gallery__item .nfb-gallery__img,
.nfb-gallery__item .nfb-gallery__img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.nfb-article .nfb-gallery__item .nfb-gallery__img:hover,
.nfb-gallery__item .nfb-gallery__img:hover {
  transform: scale(1.02);
}

.nfb-article .nfb-gallery__img,
.nfb-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nfb-article .nfb-gallery__caption,
.nfb-gallery__caption {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.4rem;
  line-height: 1.4;
  font-style: italic;
  text-align: center;
  text-align-last: center;
  hyphens: none;
  text-justify: auto;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

@media (max-width: 640px) {
  .nfb-article .nfb-gallery--two .nfb-gallery__inner,
  .nfb-gallery--two .nfb-gallery__inner,
  .nfb-article .nfb-gallery--three .nfb-gallery__inner,
  .nfb-gallery--three .nfb-gallery__inner {
    grid-template-columns: 1fr;
  }

  .nfb-article .nfb-gallery--masonry .nfb-gallery__inner,
  .nfb-gallery--masonry .nfb-gallery__inner {
    column-count: 1;
  }

  .nfb-article .nfb-gallery__item .nfb-gallery__img,
  .nfb-gallery__item .nfb-gallery__img {
    height: 220px;
  }

  .nfb-article .nfb-gallery--masonry .nfb-gallery__item .nfb-gallery__img,
  .nfb-gallery--masonry .nfb-gallery__item .nfb-gallery__img {
    height: auto;
  }
}

/* ============================================================
   CODE BLOCK — Preview (match editor appearance)
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-code-block,
.nfb-code-block {
  margin: 2rem 0;
  position: relative;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-radius: 8px;
  border: none;
}

.nfb-article .nfb-code-block__header,
.nfb-code-block__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #64748b;
}

.nfb-article .nfb-code-block__pre,
.nfb-code-block__pre {
  margin: 0;
  padding: 0.75rem 1rem;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border: none;
}

.nfb-article .nfb-code-block__pre code,
.nfb-code-block__pre code {
  font-family: inherit;
  font-size: inherit;
  background: none;
  padding: 0;
  color: inherit;
  border: none;
}

/* ============================================================
   STAT BLOCK — Preview (magazine metric card)
   Amir & Mixel — 2025
============================================================ */

.nfb-article .nfb-stat-block,
.nfb-stat-block {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  max-width: 420px;
}

.nfb-article .nfb-stat-block__value,
.nfb-stat-block__value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: #111;
  letter-spacing: -0.02em;
}

.nfb-article .nfb-stat-block__label,
.nfb-stat-block__label {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-top: 0.15em;
}

.nfb-article .nfb-stat-block__sublabel,
.nfb-stat-block__sublabel {
  font-size: 0.9375rem;
  color: #6b7280;
  font-weight: 400;
  margin-top: 0.2em;
}

.nfb-article .nfb-stat-block__icon,
.nfb-stat-block__icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  color: #c45a42;
}

.nfb-article .nfb-stat-block__icon .fa-solid,
.nfb-stat-block__icon .fa-solid {
  color: inherit;
}

.nfb-article .nfb-stat-block--left,
.nfb-stat-block--left { text-align: left; margin-right: auto; margin-left: 0; }
.nfb-article .nfb-stat-block--center,
.nfb-stat-block--center { text-align: center; margin-left: auto; margin-right: auto; }
.nfb-article .nfb-stat-block--right,
.nfb-stat-block--right { text-align: right; margin-left: auto; margin-right: 0; }

/* Neutral: light card, thin border */
.nfb-article .nfb-stat-block--neutral,
.nfb-stat-block--neutral {
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Accent: blue accent with left border */
.nfb-article .nfb-stat-block--accent,
.nfb-stat-block--accent {
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 4px solid #3b82f6;
}

/* Subtle: no box, just typography */
.nfb-article .nfb-stat-block--subtle,
.nfb-stat-block--subtle {
  background: transparent;
  border: none;
  padding-left: 0;
  padding-right: 0;
}

/* ============================================================
   OPINION SPLIT — Preview (editorial, credible, premium)
============================================================ */

.nfb-article .nfb-opinion-split,
.nfb-opinion-split {
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #faf9f7;
  max-width: 480px;
}

.nfb-opinion-split__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.9rem 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.nfb-opinion-split__bars {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.nfb-opinion-split__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px 1.2fr;
  align-items: center;
  gap: 0.85rem;
}

.nfb-opinion-split__label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #4a5568;
}

.nfb-opinion-split__pct {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.nfb-opinion-split__row--max .nfb-opinion-split__label {
  font-weight: 600;
  color: #2d3748;
}

.nfb-opinion-split__row--max .nfb-opinion-split__pct {
  font-weight: 700;
}

.nfb-opinion-split__bar-wrap {
  height: 10px;
  background: #ece7df;
  border-radius: 5px;
  overflow: hidden;
}

.nfb-opinion-split__bar {
  height: 100%;
  background: #8b6f47;
  border-radius: 5px;
  min-width: 2px;
}

.nfb-opinion-split__row--max .nfb-opinion-split__bar {
  background: #7a5f3a;
  border-radius: 6px;
}

.nfb-opinion-split__footer {
  margin-top: 1.125rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e6dfd6;
  font-size: 0.85rem;
  color: #4b5563;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0;
}

.nfb-opinion-split__footer .nfb-opinion-split__meta {
  display: inline;
}

.nfb-opinion-split__meta:not(:last-child)::after {
  content: " · ";
  color: #9ca3af;
  margin-left: 0.35rem;
  margin-right: 0.2rem;
}