/* ==========================================================================
   Story blocks - stories built in the admin's story builder
   (markup: comments/post-blocks.php). Loaded by the live story page
   (posts/view.php), the admin previews, and the builder itself so what the
   writer sees while building is what visitors get.
   The story page also loads Bootstrap, the theme and Tailwind's reset
   (lists without bullets, headings without sizes, no margins), so every
   block sets what it needs here.
   ========================================================================== */

.nb-story {
  --nb-green: #006834;
  --nb-green-soft: #e7f2eb;
  --nb-ink: #1f1f25;
  --nb-text: #5b646b;
  --nb-muted: #7a848b;
  --nb-line: #dfe5e1;
  --nb-surface: #ffffff;
  --nb-radius: 14px;
  color: var(--nb-text);
  font-family: 'Albert Sans', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  text-align: left;
  overflow-wrap: break-word;
}
.nb-story > * { margin-top: 0; margin-bottom: 26px; }
/* the theme sizes and colours every <p> directly; inside a story, paragraphs follow their block */
.nb-story p { font-size: inherit; line-height: inherit; color: inherit; font-weight: inherit; }
.nb-story > *:last-child { margin-bottom: 0; }
.nb-story a { color: var(--nb-green); text-decoration: underline; text-underline-offset: 2px; }
.nb-story a:hover { text-decoration-thickness: 2px; }
.nb-story b, .nb-story strong { color: var(--nb-ink); font-weight: 700; }
.nb-story mark { background: #fff0a6; color: inherit; padding: 0 .15em; border-radius: 3px; }
.nb-story img { max-width: 100%; height: auto; display: block; }
.nb-story figure { margin-left: 0; margin-right: 0; }
.nb-story figcaption {
  margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--nb-muted); text-align: center;
}

/* ---- text ----------------------------------------------------------------- */
.nb-story .nb-p { font-size: inherit; line-height: inherit; color: inherit; text-align: justify; hyphens: auto; }
.nb-story .nb-lead { font-size: 21px; line-height: 1.6; color: #3d454c; }
.nb-story .nb-h {
  font-family: 'Exo', sans-serif; font-weight: 700; color: var(--nb-ink); line-height: 1.25;
  margin-top: 44px; margin-bottom: 16px; letter-spacing: -.01em;
}
.nb-story > .nb-h:first-child { margin-top: 0; }
.nb-story .nb-h2 { font-size: 30px; }
.nb-story .nb-h3 { font-size: 23px; }
.nb-story .nb-h + .nb-h { margin-top: 0; }
.nb-story .nb-align-left { text-align: left; }
.nb-story .nb-align-center { text-align: center; }
.nb-story .nb-align-right { text-align: right; }

.nb-story .nb-list { padding-left: 1.4em; list-style: disc outside; }
.nb-story ol.nb-list { list-style: decimal outside; }
.nb-story .nb-list li { margin: 0 0 8px; padding-left: 4px; display: list-item; }
.nb-story .nb-list li::marker { color: var(--nb-green); font-weight: 700; }

/* ---- quotes --------------------------------------------------------------- */
.nb-story .nb-quote { margin-top: 36px; margin-bottom: 36px; padding: 4px 0 4px 26px; border-left: 4px solid var(--nb-green); }
.nb-story .nb-quote-text { margin: 0; padding: 0; border: 0; font-size: 20px; line-height: 1.6; color: var(--nb-ink); font-style: italic; }
.nb-story .nb-quote-text p { margin: 0 0 12px; }
.nb-story .nb-quote-text p:last-child { margin-bottom: 0; }
.nb-story .nb-quote-cite {
  margin-top: 14px; text-align: left; font-size: 14px; font-weight: 700; font-style: normal;
  color: var(--nb-green); letter-spacing: .02em;
}
.nb-story .nb-quote-cite::before { content: "\2014\00a0"; }
.nb-story .nb-quote--large { border-left: 0; padding: 0 6%; text-align: center; position: relative; }
.nb-story .nb-quote--large::before {
  content: "\201C"; display: block; font: 700 90px/0.8 Georgia, 'Times New Roman', serif; color: var(--nb-green); margin-bottom: 10px;
}
.nb-story .nb-quote--large .nb-quote-text { font-family: 'Exo', sans-serif; font-style: normal; font-weight: 600; font-size: 27px; line-height: 1.4; }
.nb-story .nb-quote--large .nb-quote-cite { text-align: center; }

/* ---- pictures --------------------------------------------------------------- */
.nb-story .nb-figure { margin-top: 34px; margin-bottom: 34px; }
.nb-story .nb-figure img { width: 100%; border-radius: var(--nb-radius); }
.nb-story .nb-figure--medium { max-width: 720px; margin-left: auto; margin-right: auto; }
.nb-story .nb-figure--small { max-width: 440px; margin-left: auto; margin-right: auto; }
.nb-story .nb-zoom { display: block; cursor: zoom-in; border-radius: var(--nb-radius); overflow: hidden; text-decoration: none; }
.nb-story .nb-zoom img { transition: transform .4s ease; }
.nb-story .nb-zoom:hover img { transform: scale(1.02); }

.nb-story .nb-gallery { margin-top: 34px; margin-bottom: 34px; }
.nb-story .nb-gallery-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nb-story .nb-gallery--cols-2 .nb-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nb-story .nb-gallery--cols-4 .nb-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nb-story .nb-gallery-item { display: block; overflow: hidden; border-radius: 10px; cursor: zoom-in; background: #e9eeeb; }
.nb-story .nb-gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .45s ease; }
.nb-story .nb-gallery-item:hover img { transform: scale(1.05); }
/* "keep each photo's shape": a masonry of columns instead of a cropped grid */
.nb-story .nb-gallery--natural .nb-gallery-grid { display: block; column-count: 3; column-gap: 10px; }
.nb-story .nb-gallery--natural.nb-gallery--cols-2 .nb-gallery-grid { column-count: 2; }
.nb-story .nb-gallery--natural.nb-gallery--cols-4 .nb-gallery-grid { column-count: 4; }
.nb-story .nb-gallery--natural .nb-gallery-item { margin-bottom: 10px; break-inside: avoid; }
.nb-story .nb-gallery--natural .nb-gallery-item img { aspect-ratio: auto; }

/* ---- picture beside text ----------------------------------------------------- */
.nb-story .nb-mediatext {
  display: grid; grid-template-columns: 50% minmax(0, 1fr); gap: 34px; align-items: center; margin-top: 36px; margin-bottom: 36px;
}
.nb-story .nb-mediatext--w40 { grid-template-columns: 40% minmax(0, 1fr); }
.nb-story .nb-mediatext--w60 { grid-template-columns: 60% minmax(0, 1fr); }
.nb-story .nb-mediatext--right { grid-template-columns: minmax(0, 1fr) 50%; }
.nb-story .nb-mediatext--right.nb-mediatext--w40 { grid-template-columns: minmax(0, 1fr) 40%; }
.nb-story .nb-mediatext--right.nb-mediatext--w60 { grid-template-columns: minmax(0, 1fr) 60%; }
.nb-story .nb-mediatext--right .nb-mediatext-media { order: 2; }
.nb-story .nb-mediatext-media { margin: 0; }
.nb-story .nb-mediatext-media img { width: 100%; border-radius: var(--nb-radius); }
.nb-story .nb-mediatext-title { font: 700 24px/1.3 'Exo', sans-serif; color: var(--nb-ink); margin: 0 0 12px; }
.nb-story .nb-mediatext-body p { margin: 0 0 14px; }
.nb-story .nb-mediatext-body p:last-child { margin-bottom: 0; }

/* ---- video ------------------------------------------------------------------- */
.nb-story .nb-video { margin-top: 34px; margin-bottom: 34px; }
.nb-story .nb-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--nb-radius); overflow: hidden; background: #0d1410; }
.nb-story .nb-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- buttons ----------------------------------------------------------------- */
.nb-story .nb-buttons { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-start; margin-top: 30px; margin-bottom: 30px; }
.nb-story .nb-buttons.nb-align-center { justify-content: center; }
.nb-story .nb-buttons.nb-align-right { justify-content: flex-end; }
.nb-story .nb-button { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.nb-story .nb-btn { text-decoration: none !important; display: inline-flex; align-items: center; gap: 10px; }
.nb-story .nb-btn.btn-primary { color: #fff; }
.nb-story .nb-btn-outline {
  background: transparent; color: var(--nb-green) !important; border: 1px solid var(--nb-green);
}
.nb-story .nb-btn-outline:hover { background: var(--nb-green); color: #fff !important; }
.nb-story .nb-button-meta { font-size: 12px; color: var(--nb-muted); letter-spacing: .04em; }

/* ---- highlight box ----------------------------------------------------------- */
.nb-story .nb-callout {
  --nb-tone: var(--nb-green); --nb-tone-soft: var(--nb-green-soft);
  background: var(--nb-tone-soft); border-left: 4px solid var(--nb-tone); border-radius: var(--nb-radius);
  padding: 22px 26px; margin-top: 32px; margin-bottom: 32px; color: #3d454c;
}
.nb-story .nb-callout--amber { --nb-tone: #b26b00; --nb-tone-soft: #fff4dc; }
.nb-story .nb-callout--blue { --nb-tone: #0b6b8a; --nb-tone-soft: #e3f3f8; }
.nb-story .nb-callout--grey { --nb-tone: #5b646b; --nb-tone-soft: #eef1f0; }
.nb-story .nb-callout-title { margin: 0 0 8px; font: 700 18px/1.35 'Exo', sans-serif; color: var(--nb-tone); }
.nb-story .nb-callout-body p { margin: 0 0 10px; }
.nb-story .nb-callout-body p:last-child { margin-bottom: 0; }

/* ---- key figures ------------------------------------------------------------- */
.nb-story .nb-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 34px; margin-bottom: 34px;
  background: var(--nb-surface); border: 1px solid var(--nb-line); border-radius: var(--nb-radius); overflow: hidden;
}
.nb-story .nb-stats--1 { grid-template-columns: minmax(0, 1fr); }
.nb-story .nb-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nb-story .nb-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nb-story .nb-stat { padding: 26px 18px; text-align: center; border-left: 1px solid var(--nb-line); }
.nb-story .nb-stat:first-child { border-left: 0; }
.nb-story .nb-stat-value { display: block; font: 700 40px/1.1 'Exo', sans-serif; color: var(--nb-green); font-variant-numeric: tabular-nums; }
.nb-story .nb-stat-label { display: block; margin-top: 8px; font-size: 15px; line-height: 1.4; color: var(--nb-text); }

/* ---- divider ----------------------------------------------------------------- */
.nb-story .nb-divider { border: 0; height: 1px; background: var(--nb-line); margin-top: 44px; margin-bottom: 44px; opacity: 1; }
.nb-story .nb-divider--dots { height: auto; background: none; text-align: center; }
.nb-story .nb-divider--dots::before { content: "\2022\2002\2022\2002\2022"; color: var(--nb-green); font-size: 22px; letter-spacing: .3em; }
.nb-story .nb-divider--space { height: 0; background: none; margin-top: 30px; margin-bottom: 30px; }

/* ---- table ------------------------------------------------------------------- */
.nb-story .nb-table { margin-top: 32px; margin-bottom: 32px; }
.nb-story .nb-table-scroll { overflow-x: auto; border: 1px solid var(--nb-line); border-radius: var(--nb-radius); background: var(--nb-surface); }
.nb-story .nb-table table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
/* the theme upper-cases every th and boxes every td */
.nb-story .nb-table th, .nb-story .nb-table td { border: 0; border-bottom: 1px solid var(--nb-line); text-transform: none; letter-spacing: normal; }
.nb-story .nb-table th {
  background: var(--nb-green-soft); color: var(--nb-ink); font-weight: 700; text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--nb-line); white-space: nowrap;
}
.nb-story .nb-table td { padding: 12px 16px; border-bottom: 1px solid var(--nb-line); vertical-align: top; text-align: left; }
.nb-story .nb-table tbody tr:last-child td { border-bottom: 0; }
.nb-story .nb-table tbody tr:nth-child(even) td { background: #fafbfa; }

/* ---- smaller screens ------------------------------------------------------------ */
@media (max-width: 991px) {
  .nb-story .nb-gallery--cols-4 .nb-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nb-story .nb-gallery--natural.nb-gallery--cols-4 .nb-gallery-grid { column-count: 3; }
  .nb-story .nb-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-story .nb-stats--4 .nb-stat:nth-child(3) { border-left: 0; }
  .nb-story .nb-stats--4 .nb-stat:nth-child(n + 3) { border-top: 1px solid var(--nb-line); }
}
@media (max-width: 767px) {
  .nb-story { font-size: 16px; line-height: 1.7; }
  .nb-story .nb-p { text-align: left; }
  .nb-story .nb-p.nb-align-center { text-align: center; }
  .nb-story .nb-p.nb-align-right { text-align: right; }
  .nb-story .nb-lead { font-size: 18px; }
  .nb-story .nb-h2 { font-size: 24px; }
  .nb-story .nb-h3 { font-size: 20px; }
  .nb-story .nb-quote-text { font-size: 18px; }
  .nb-story .nb-quote--large { padding: 0; }
  .nb-story .nb-quote--large .nb-quote-text { font-size: 21px; }
  .nb-story .nb-gallery-grid,
  .nb-story .nb-gallery--cols-4 .nb-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nb-story .nb-gallery--natural .nb-gallery-grid,
  .nb-story .nb-gallery--natural.nb-gallery--cols-4 .nb-gallery-grid { column-count: 2; column-gap: 8px; }
  .nb-story .nb-mediatext,
  .nb-story .nb-mediatext--right,
  .nb-story .nb-mediatext--w40,
  .nb-story .nb-mediatext--w60,
  .nb-story .nb-mediatext--right.nb-mediatext--w40,
  .nb-story .nb-mediatext--right.nb-mediatext--w60 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .nb-story .nb-mediatext--right .nb-mediatext-media { order: 0; }
  .nb-story .nb-stats,
  .nb-story .nb-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-story .nb-stats--1 { grid-template-columns: minmax(0, 1fr); }
  .nb-story .nb-stats--3 .nb-stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--nb-line); }
  .nb-story .nb-stat-value { font-size: 32px; }
  .nb-story .nb-callout { padding: 18px 18px; }
}

/* ---- dark mode (site switch and the admin's) ----------------------------------- */
html[data-theme="dark"] .nb-story {
  --nb-green: #4cc38a;
  --nb-green-soft: #15291e;
  --nb-ink: #e8eee9;
  --nb-text: #b8c4bd;
  --nb-muted: #8d9a92;
  --nb-line: #2a372f;
  --nb-surface: #161f1a;
}
html[data-theme="dark"] .nb-story .nb-lead,
html[data-theme="dark"] .nb-story .nb-callout { color: #c9d4cd; }
html[data-theme="dark"] .nb-story mark { background: #5a4a0c; color: #fff7d6; }
html[data-theme="dark"] .nb-story .nb-callout--amber { --nb-tone: #f2c46d; --nb-tone-soft: #33280f; }
html[data-theme="dark"] .nb-story .nb-callout--blue { --nb-tone: #6cc7e2; --nb-tone-soft: #102c35; }
html[data-theme="dark"] .nb-story .nb-callout--grey { --nb-tone: #b3c0b8; --nb-tone-soft: #222c26; }
html[data-theme="dark"] .nb-story .nb-table tbody tr:nth-child(even) td { background: #1a241e; }
html[data-theme="dark"] .nb-story .nb-gallery-item { background: #1e2a23; }
html[data-theme="dark"] .nb-story .nb-btn.btn-primary { color: #fff; }

/* ---- photo viewer (assets/js/post-blocks.js) ------------------------------------ */
.nb-lightbox {
  position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(6, 10, 8, .94); padding: 56px 72px 28px; opacity: 0; transition: opacity .2s ease;
  font-family: 'Albert Sans', sans-serif;
}
.nb-lightbox.is-open { opacity: 1; }
.nb-lightbox[hidden] { display: none; }
.nb-lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; min-height: 0; }
.nb-lightbox-img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); filter: none !important; }
.nb-lightbox-caption { color: #e8eee9; font-size: 15px; line-height: 1.5; margin-top: 14px; text-align: center; max-width: 760px; }
.nb-lightbox-count { position: absolute; top: 18px; left: 22px; color: rgba(255, 255, 255, .7); font-size: 14px; font-variant-numeric: tabular-nums; }
.nb-lightbox button {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 20px; transition: background .15s;
}
.nb-lightbox button:hover, .nb-lightbox button:focus-visible { background: rgba(255, 255, 255, .26); outline: none; }
.nb-lightbox-close { top: 12px; right: 14px; }
.nb-lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.nb-lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.nb-lightbox.is-single .nb-lightbox-prev, .nb-lightbox.is-single .nb-lightbox-next, .nb-lightbox.is-single .nb-lightbox-count { display: none; }
@media (max-width: 767px) {
  .nb-lightbox { padding: 56px 10px 20px; }
  .nb-lightbox-prev, .nb-lightbox-next { top: auto; bottom: 16px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nb-story *, .nb-lightbox { transition: none !important; }
}

/* ==========================================================================
   Interactive blocks and effects (assets/js/post-effects.js adds the motion;
   without it every block still reads and works)
   ========================================================================== */

/* ---- gallery as a slideshow: a strip that swipes by itself ------------------- */
.nb-story .nb-gallery--slideshow { position: relative; margin-top: 34px; margin-bottom: 34px; }
.nb-story .nb-slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: var(--nb-radius); background: #0d1410; scrollbar-width: none; outline: none;
}
.nb-story .nb-slides::-webkit-scrollbar { display: none; }
.nb-story .nb-slides:focus-visible { box-shadow: 0 0 0 3px var(--nb-green); }
.nb-story .nb-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.nb-story .nb-slide a { display: block; cursor: zoom-in; }
.nb-story .nb-slide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.nb-story .nb-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 36px 22px 16px; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff; font-size: 15px; pointer-events: none;
}
.nb-story .nb-ss-btn {
  position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1f1f25; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: background .15s, transform .15s;
}
.nb-story .nb-ss-btn:hover { background: #fff; transform: scale(1.06); }
.nb-story .nb-ss-prev { left: 14px; }
.nb-story .nb-ss-next { right: 14px; }
.nb-story .nb-ss-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.nb-story .nb-ss-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: var(--nb-line); cursor: pointer; transition: background .2s, width .2s; }
.nb-story .nb-ss-dots button.is-on { width: 24px; border-radius: 5px; background: var(--nb-green); }

/* ---- before / after -------------------------------------------------------------- */
.nb-story .nb-ba { margin-top: 34px; margin-bottom: 34px; }
/* without the page script: side by side */
.nb-story .nb-ba-frame { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nb-story .nb-ba-side { position: relative; border-radius: var(--nb-radius); overflow: hidden; }
.nb-story .nb-ba-side img { width: 100%; height: 100%; object-fit: cover; }
.nb-story .nb-ba-label {
  position: absolute; top: 14px; left: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(10, 16, 13, .72);
  color: #fff; font: 700 12px/1 'Albert Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; pointer-events: none;
}
.nb-story .nb-ba-handle, .nb-story .nb-ba-range { display: none; }
/* with it: one over the other, and a slider */
.nb-story .nb-ba.is-ready .nb-ba-frame {
  display: block; position: relative; aspect-ratio: var(--nb-ba-ratio, 3 / 2); border-radius: var(--nb-radius); overflow: hidden; user-select: none;
}
.nb-story .nb-ba.is-ready .nb-ba-side { position: absolute; inset: 0; border-radius: 0; }
.nb-story .nb-ba.is-ready .nb-ba-before { clip-path: inset(0 calc(100% - var(--nb-ba, 50%)) 0 0); }
.nb-story .nb-ba.is-ready .nb-ba-after .nb-ba-label { left: auto; right: 14px; }
.nb-story .nb-ba.is-ready .nb-ba-handle {
  display: block; position: absolute; top: 0; bottom: 0; left: var(--nb-ba, 50%); width: 3px; margin-left: -1.5px; background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, .4); pointer-events: none;
}
.nb-story .nb-ba.is-ready .nb-ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%23006834' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center no-repeat;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.nb-story .nb-ba.is-ready .nb-ba-range {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.nb-story .nb-ba.is-ready .nb-ba-range:focus-visible + .nb-ba-handle,
.nb-story .nb-ba.is-ready .nb-ba-frame:focus-within .nb-ba-handle::after { box-shadow: 0 0 0 4px rgba(0, 104, 52, .45), 0 4px 14px rgba(0, 0, 0, .3); }

/* ---- countdown --------------------------------------------------------------------- */
.nb-story .nb-countdown {
  margin-top: 34px; margin-bottom: 34px; padding: 30px 24px 26px; border-radius: var(--nb-radius); text-align: center; color: #fff;
  background: radial-gradient(circle at 20% 0%, #0d8a4b, #00562b 70%);
}
.nb-story .nb-countdown.is-ended { background: linear-gradient(135deg, #4a535b, #2f363b); }
.nb-story .nb-cd-title { margin: 0 0 16px; font: 700 14px/1.3 'Albert Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #bfe8cf; }
.nb-story .nb-cd-clock { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.nb-story .nb-cd-unit { min-width: 92px; padding: 14px 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14); }
.nb-story .nb-cd-unit b { display: block; font: 700 42px/1 'Exo', sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.nb-story .nb-cd-unit small { display: block; margin-top: 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #cfe7da; }
.nb-story .nb-cd-ended { font: 700 26px/1.3 'Exo', sans-serif; }
.nb-story .nb-cd-when { margin: 16px 0 0; font-size: 14px; color: #d6eadd; }
.nb-story .nb-cd-note { margin-top: 14px; color: #fff; }
.nb-story .nb-cd-note p { margin: 0 0 8px; }
.nb-story .nb-cd-note a { color: #fff; }

/* ---- FAQ / accordion ----------------------------------------------------------------- */
.nb-story .nb-accordion { margin-top: 32px; margin-bottom: 32px; border: 1px solid var(--nb-line); border-radius: var(--nb-radius); background: var(--nb-surface); overflow: hidden; }
.nb-story .nb-acc-item + .nb-acc-item { border-top: 1px solid var(--nb-line); }
.nb-story .nb-acc-q {
  position: relative; display: block; list-style: none; padding: 18px 58px 18px 22px; cursor: pointer;
  font: 700 17px/1.45 'Albert Sans', sans-serif; color: var(--nb-ink); transition: background .15s;
}
.nb-story .nb-acc-q::-webkit-details-marker { display: none; }
.nb-story .nb-acc-q::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 10px; height: 10px; margin-top: -8px;
  border-right: 2.5px solid var(--nb-green); border-bottom: 2.5px solid var(--nb-green); transform: rotate(45deg); transition: transform .25s, margin .25s;
}
.nb-story .nb-acc-item[open] > .nb-acc-q::after { transform: rotate(-135deg); margin-top: -3px; }
.nb-story .nb-acc-q:hover { background: var(--nb-green-soft); }
.nb-story .nb-acc-a { padding: 0 22px 20px; }
.nb-story .nb-acc-a p { margin: 0 0 10px; }
.nb-story .nb-acc-a p:last-child { margin-bottom: 0; }

/* ---- timeline --------------------------------------------------------------------------- */
.nb-story .nb-timeline { position: relative; list-style: none; margin-top: 34px; margin-bottom: 34px; padding: 0 0 0 38px; }
.nb-story .nb-timeline::before,
.nb-story .nb-timeline::after { content: ""; position: absolute; left: 10px; top: 8px; width: 3px; border-radius: 2px; }
.nb-story .nb-timeline::before { bottom: 8px; background: var(--nb-line); }
/* the green part draws down as the reader scrolls (full without the page script) */
.nb-story .nb-timeline::after { height: calc((100% - 16px) * var(--nb-tl, 1)); background: var(--nb-green); }
.nb-story .nb-tl-item { position: relative; padding: 0 0 28px; display: block; }
.nb-story .nb-tl-item:last-child { padding-bottom: 0; }
.nb-story .nb-tl-item::before {
  content: ""; position: absolute; left: -35px; top: 3px; z-index: 1; width: 17px; height: 17px; border-radius: 50%;
  background: var(--nb-surface); border: 3px solid var(--nb-green); box-sizing: border-box;
}
.nb-story .nb-tl-date {
  display: inline-block; margin-bottom: 8px; padding: 5px 11px; border-radius: 999px; background: var(--nb-green-soft); color: var(--nb-green);
  font: 700 12px/1 'Albert Sans', sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
.nb-story .nb-tl-title { margin: 0 0 4px; font: 700 19px/1.4 'Exo', sans-serif; color: var(--nb-ink); }
.nb-story .nb-tl-body p { margin: 0 0 8px; }
.nb-story .nb-tl-body p:last-child { margin-bottom: 0; }

/* ---- map ------------------------------------------------------------------------------------ */
.nb-story .nb-map { margin-top: 34px; margin-bottom: 34px; }
.nb-story .nb-map-frame { border-radius: var(--nb-radius); overflow: hidden; background: #e9eeeb; border: 1px solid var(--nb-line); }
.nb-story .nb-map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---- reading progress bar ------------------------------------------------------------------ */
.nb-progress {
  position: fixed; top: 0; left: 0; z-index: 100001; width: 100%; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, #006834, #4cc38a); transform: scaleX(var(--nb-p, 0)); transform-origin: 0 50%;
}

/* ---- share a quote ------------------------------------------------------------------------- */
.nb-story .nb-quote-share { display: flex; align-items: center; gap: 8px; margin-top: 14px; font: 600 13px/1 'Albert Sans', sans-serif; color: var(--nb-muted); }
.nb-story .nb-quote--large .nb-quote-share { justify-content: center; }
.nb-story .nb-quote-share a {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--nb-line);
  color: var(--nb-green) !important; text-decoration: none !important; transition: background .15s, color .15s;
}
.nb-story .nb-quote-share a:hover { background: var(--nb-green); color: #fff !important; }

/* ---- reveal on scroll, highlight sweep, banner zoom (only once the script is running) --------- */
.nb-story .nb-rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.nb-story .nb-rv.is-in { opacity: 1; transform: none; }
.nb-story.nb-sweeping mark {
  background-color: transparent; background-image: linear-gradient(#fff0a6, #fff0a6); background-repeat: no-repeat;
  background-size: 0% 100%; transition: background-size 1.1s ease .15s;
}
.nb-story.nb-sweeping mark.is-in { background-size: 100% 100%; }
.nb-story-banner--zoom { position: relative; overflow: hidden; background-color: #1b2420; }
.nb-story-banner--zoom > .container { position: relative; z-index: 1; }
.nb-banner-bg {
  position: absolute; inset: -2px; background-size: cover; background-repeat: no-repeat;
  animation: nb-kenburns 26s ease-in-out infinite alternate; will-change: transform;
}
@keyframes nb-kenburns { from { transform: scale(1); } to { transform: scale(1.12); } }

html[data-theme="dark"] .nb-story.nb-sweeping mark { background-image: linear-gradient(#5a4a0c, #5a4a0c); }
html[data-theme="dark"] .nb-story .nb-ss-dots button { background: #2a372f; }
html[data-theme="dark"] .nb-story .nb-ss-dots button.is-on { background: var(--nb-green); }
html[data-theme="dark"] .nb-story .nb-map-frame { background: #1e2a23; }

@media (max-width: 767px) {
  .nb-story .nb-ba-frame { grid-template-columns: 1fr; }
  .nb-story .nb-cd-unit { min-width: 68px; padding: 10px 6px; }
  .nb-story .nb-cd-unit b { font-size: 30px; }
  .nb-story .nb-ss-btn { width: 38px; height: 38px; margin-top: -19px; }
  .nb-story .nb-slide img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .nb-banner-bg { animation: none; }
  .nb-story .nb-rv { opacity: 1; transform: none; transition: none; }
  .nb-story.nb-sweeping mark { background-size: 100% 100%; transition: none; }
  .nb-story .nb-slides { scroll-behavior: auto; }
}
.nb-story .nb-ss-stage { position: relative; }
.nb-story .nb-tl-item.is-in::before { background: var(--nb-green); transition: background .3s; }
.nb-story .nb-ba:not(.is-ready) .nb-ba-before { order: -1; }
