/* Public blog (netigo.in/blog) — rendered by lib/blog-render.js.
   Mobile-first; everything is namespaced `nb-` so it can't collide with
   styles.css. Post bodies come from the admin's CKEditor 5 editor, so the
   .nb-prose rules below style exactly the markup that editor produces. */

.nb-body {
  --nb-ink: #0f172a;
  --nb-text: #334155;
  --nb-muted: #64748b;
  --nb-line: #e2e8f0;
  --nb-soft: #f1f5fb;
  --nb-brand: var(--primary, #1f64d4);
  --nb-brand-dark: var(--primary-600, #174aa1);
  --nb-brand-soft: #e8f0ff;
  --nb-radius: 16px;
  --nb-prose: 720px;
  background: #fff;
}

.nb-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.nb-page { padding-bottom: 8px; }
.nb-page a:focus-visible, .nb-page button:focus-visible, .nb-page input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nb-brand) 45%, transparent);
  outline-offset: 2px;
}

/* ── Shared bits ─────────────────────────────────────────────────────────── */
.nb-eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nb-brand); margin-bottom: 10px;
}
.nb-eyebrow a { color: inherit; text-decoration: none; }
.nb-eyebrow a:hover { text-decoration: underline; }

.nb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 0.84rem; color: var(--nb-muted); margin: 0; }
.nb-meta__author { color: var(--nb-ink); font-weight: 600; }
.nb-dot { color: #cbd5e1; }

.nb-pill {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  background: var(--nb-brand-soft); color: var(--nb-brand-dark);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; text-decoration: none;
}
.nb-pill:hover { background: #d8e5ff; }

.nb-avatar {
  --s: 40px;
  width: var(--s); height: var(--s); flex: 0 0 var(--s);
  border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2b63d9, #0fa3b1); color: #fff;
  font-weight: 700; font-size: calc(var(--s) * 0.38);
}
.nb-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 12px; background: var(--nb-brand); color: #fff;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 0; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nb-btn:hover { background: var(--nb-brand-dark); color: #fff; }
.nb-btn--light { background: #fff; color: var(--nb-brand-dark); }
.nb-btn--light:hover { background: #eef4ff; color: var(--nb-brand-dark); }

.nb-section-title {
  font-family: "Syne", "Inter", sans-serif; font-size: 1.35rem; font-weight: 700; color: var(--nb-ink);
  margin: 40px 0 18px;
}

.nb-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.84rem; color: var(--nb-muted); margin-bottom: 14px; }
.nb-crumbs a { color: var(--nb-muted); text-decoration: none; }
.nb-crumbs a:hover { color: var(--nb-brand); text-decoration: underline; }
.nb-crumbs span { color: #cbd5e1; }

/* ── Hero / listing ──────────────────────────────────────────────────────── */
.nb-hero {
  background:
    radial-gradient(900px 320px at 10% -10%, rgba(31, 100, 212, 0.14), transparent 70%),
    radial-gradient(700px 300px at 100% 0%, rgba(15, 163, 177, 0.12), transparent 70%),
    linear-gradient(180deg, #f5f8ff 0%, #fff 100%);
  border-bottom: 1px solid var(--nb-line);
  padding: 44px 0 30px;
}
.nb-hero__inner { max-width: 820px; }
.nb-hero__title {
  font-family: "Syne", "Inter", sans-serif; font-weight: 700; color: var(--nb-ink);
  font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 12px;
}
.nb-hero__intro { font-size: 1.05rem; color: var(--nb-text); line-height: 1.6; max-width: 640px; margin: 0; }
.nb-hero__author { display: flex; align-items: center; gap: 14px; margin-top: 18px; }

.nb-search {
  position: relative; display: flex; align-items: center; gap: 8px; margin-top: 22px; max-width: 520px;
  background: #fff; border: 1px solid var(--nb-line); border-radius: 14px; padding: 6px 6px 6px 42px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.nb-search:focus-within { border-color: var(--nb-brand); box-shadow: 0 0 0 4px rgba(31, 100, 212, 0.12); }
.nb-search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--nb-muted); }
.nb-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit;
  font-size: 16px; color: var(--nb-ink); padding: 8px 0;
}
.nb-search button {
  border: 0; border-radius: 10px; background: var(--nb-brand); color: #fff; font: inherit; font-weight: 600;
  font-size: 0.9rem; padding: 9px 16px; cursor: pointer;
}
.nb-search button:hover { background: var(--nb-brand-dark); }

.nb-chips { margin: 22px -16px 4px; }
.nb-chips__track {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.nb-chips__track::-webkit-scrollbar { display: none; }
.nb-chip {
  flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--nb-line); background: #fff;
  color: var(--nb-text); font-size: 0.88rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.nb-chip:hover { border-color: var(--nb-brand); color: var(--nb-brand); }
.nb-chip.is-active { background: var(--nb-ink); border-color: var(--nb-ink); color: #fff; }
.nb-chip__count { font-size: 0.72rem; font-weight: 700; opacity: 0.6; }

/* Featured */
.nb-featured {
  display: grid; gap: 0; margin-top: 18px; border: 1px solid var(--nb-line); border-radius: 20px; overflow: hidden;
  background: #fff; box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}
.nb-featured__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--nb-soft); }
.nb-featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.nb-featured:hover .nb-featured__media img { transform: scale(1.03); }
.nb-featured__body { padding: 22px 20px 24px; display: flex; flex-direction: column; justify-content: center; }
.nb-featured__title {
  font-family: "Syne", "Inter", sans-serif; font-size: clamp(1.45rem, 4.4vw, 2.1rem); line-height: 1.15;
  letter-spacing: -0.015em; margin: 0 0 12px;
}
.nb-featured__title a { color: var(--nb-ink); text-decoration: none; }
.nb-featured__title a:hover { color: var(--nb-brand); }
.nb-featured__excerpt { color: var(--nb-text); font-size: 1rem; line-height: 1.6; margin: 0 0 18px; }

/* Cards */
.nb-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 8px; }
.nb-card {
  display: flex; flex-direction: column; border: 1px solid var(--nb-line); border-radius: var(--nb-radius);
  overflow: hidden; background: #fff; transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.nb-card:hover { box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09); transform: translateY(-2px); border-color: #d5e0f3; }
.nb-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--nb-soft); }
.nb-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.nb-card:hover .nb-card__media img { transform: scale(1.04); }
.nb-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.nb-card__title { font-size: 1.14rem; line-height: 1.35; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.nb-card__title a { color: var(--nb-ink); text-decoration: none; }
.nb-card__title a:hover { color: var(--nb-brand); }
.nb-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.nb-card { position: relative; }
.nb-card .nb-pill { position: relative; z-index: 1; }
.nb-card__excerpt {
  color: var(--nb-text); font-size: 0.94rem; line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nb-card__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }

.nb-cover-fallback {
  width: 100%; height: 100%; display: flex; align-items: flex-end; padding: 16px;
  background: linear-gradient(135deg, #1f64d4 0%, #0fa3b1 100%); color: rgba(255, 255, 255, 0.92);
  font-family: "Syne", "Inter", sans-serif; font-weight: 700; font-size: 1.1rem;
}

.nb-empty {
  text-align: center; padding: 56px 20px; border: 1px dashed #cbd5e1; border-radius: 20px; margin: 18px 0;
  color: var(--nb-text); background: #fbfcff;
}
.nb-empty__title { font-size: 1.2rem; font-weight: 700; color: var(--nb-ink); margin-bottom: 6px; }
.nb-empty .nb-btn { margin-top: 16px; }

.nb-pages { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 36px 0 8px; }
.nb-pages__nums { display: none; gap: 6px; align-items: center; }
.nb-pages__num, .nb-pages__step {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--nb-line); color: var(--nb-ink); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; background: #fff;
}
.nb-pages__num:hover, .nb-pages__step:hover { border-color: var(--nb-brand); color: var(--nb-brand); }
.nb-pages__num.is-current { background: var(--nb-ink); border-color: var(--nb-ink); color: #fff; }
.nb-pages__step.is-disabled { opacity: 0.4; pointer-events: none; }
.nb-pages__gap { color: var(--nb-muted); padding: 0 4px; }

/* CTA */
.nb-cta { padding: 48px 0 56px; }
.nb-cta__card {
  display: flex; flex-direction: column; gap: 18px; align-items: flex-start; padding: 28px 22px;
  border-radius: 22px; color: #fff;
  background: radial-gradient(600px 240px at 90% 0%, rgba(15, 163, 177, 0.55), transparent 70%),
    linear-gradient(135deg, #123a86 0%, #1f64d4 60%, #2b7de9 100%);
  box-shadow: 0 24px 60px rgba(31, 100, 212, 0.28);
}
.nb-cta__title { font-family: "Syne", "Inter", sans-serif; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.15; margin: 0 0 8px; color: #fff; }
.nb-cta__text { margin: 0; color: rgba(255, 255, 255, 0.86); line-height: 1.6; max-width: 560px; }

.nb-message { padding: 64px 0; max-width: 640px; }
.nb-message .nb-btn { margin-top: 22px; }

/* ── Post ────────────────────────────────────────────────────────────────── */
.nb-preview-bar {
  position: sticky; top: 0; z-index: 60; background: #fef3c7; color: #92400e; text-align: center;
  font-size: 0.88rem; padding: 10px 16px; border-bottom: 1px solid #fcd34d;
}
.nb-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; }
.nb-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #1f64d4, #0fa3b1); }

.nb-post-head { padding: 28px 0 0; }
.nb-post-head__inner { width: min(var(--nb-prose), calc(100% - 32px)); margin: 0 auto; }
.nb-post-title {
  font-family: "Syne", "Inter", sans-serif; font-size: clamp(1.9rem, 6.2vw, 3rem); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--nb-ink); margin: 0 0 14px; overflow-wrap: anywhere;
}
.nb-post-dek { font-size: clamp(1.05rem, 2.6vw, 1.25rem); line-height: 1.55; color: var(--nb-text); margin: 0 0 22px; }
.nb-byline { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--nb-line); border-bottom: 1px solid var(--nb-line); }
.nb-byline__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nb-byline__name { font-weight: 700; color: var(--nb-ink); text-decoration: none; }
a.nb-byline__name:hover { color: var(--nb-brand); }

.nb-post-cover { margin: 26px auto 0; width: min(1140px, 100%); }
.nb-post-cover img { width: 100%; height: auto; max-height: 640px; object-fit: cover; display: block; background: var(--nb-soft); }
.nb-post-cover figcaption { width: min(var(--nb-prose), calc(100% - 32px)); margin: 10px auto 0; font-size: 0.84rem; color: var(--nb-muted); text-align: center; }

.nb-post-layout { width: min(1140px, calc(100% - 32px)); margin: 28px auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.nb-post-main { min-width: 0; width: 100%; max-width: var(--nb-prose); margin: 0 auto; }
.nb-post-rail { display: none; }

/* TOC — collapsible card on mobile, sticky sidebar on desktop */
.nb-toc { max-width: var(--nb-prose); width: 100%; margin: 0 auto 26px; }
.nb-toc__box { border: 1px solid var(--nb-line); border-radius: 14px; background: #fbfcff; padding: 4px 16px; }
.nb-toc__title {
  cursor: pointer; list-style: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nb-ink); padding: 12px 0; display: flex; justify-content: space-between; align-items: center;
}
.nb-toc__title::-webkit-details-marker { display: none; }
.nb-toc__title::after { content: "+"; font-size: 1.2rem; color: var(--nb-muted); font-weight: 400; }
.nb-toc__box[open] .nb-toc__title::after { content: "−"; }
.nb-toc__list { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: toc; }
.nb-toc__item a {
  display: block; padding: 7px 0 7px 12px; border-left: 2px solid var(--nb-line); color: var(--nb-text);
  text-decoration: none; font-size: 0.9rem; line-height: 1.4; transition: color 0.15s, border-color 0.15s;
}
.nb-toc__item--h3 a { padding-left: 26px; font-size: 0.86rem; color: var(--nb-muted); }
.nb-toc__item a:hover { color: var(--nb-brand); }
.nb-toc__item a.is-active { color: var(--nb-brand); border-left-color: var(--nb-brand); font-weight: 600; }

/* ── Prose (the article body) ────────────────────────────────────────────── */
.nb-prose { color: var(--nb-text); font-size: 1.075rem; line-height: 1.78; overflow-wrap: break-word; }
.nb-prose > * + * { margin-top: 1.15em; }
.nb-prose > :first-child { margin-top: 0; }
.nb-prose p { margin-bottom: 0; }
.nb-prose h2, .nb-prose h3, .nb-prose h4, .nb-prose h5 {
  color: var(--nb-ink); font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; scroll-margin-top: 90px;
}
.nb-prose h2 { font-family: "Syne", "Inter", sans-serif; font-size: 1.6rem; margin-top: 2em; }
.nb-prose h3 { font-size: 1.28rem; margin-top: 1.7em; }
.nb-prose h4 { font-size: 1.1rem; margin-top: 1.5em; }
.nb-prose h5 { font-size: 1rem; margin-top: 1.4em; text-transform: uppercase; letter-spacing: 0.04em; }
.nb-prose a { color: var(--nb-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.nb-prose a:hover { color: var(--nb-brand-dark); text-decoration-thickness: 2px; }
.nb-prose strong, .nb-prose b { color: var(--nb-ink); font-weight: 700; }
.nb-prose mark, .nb-prose .marker-yellow { background: #fef08a; color: inherit; padding: 0 3px; border-radius: 3px; }
.nb-prose .marker-green { background: #bbf7d0; padding: 0 3px; border-radius: 3px; }
.nb-prose .marker-pink { background: #fbcfe8; padding: 0 3px; border-radius: 3px; }
.nb-prose .marker-blue { background: #bfdbfe; padding: 0 3px; border-radius: 3px; }
.nb-prose .pen-red { color: #dc2626; background: none; }
.nb-prose .pen-green { color: #16a34a; background: none; }
.nb-prose .text-tiny { font-size: 0.7em; }
.nb-prose .text-small { font-size: 0.85em; }
.nb-prose .text-big { font-size: 1.4em; }
.nb-prose .text-huge { font-size: 1.8em; }

.nb-prose ul, .nb-prose ol { padding-left: 1.4em; }
.nb-prose li { margin-top: 0.4em; padding-left: 0.2em; }
.nb-prose li::marker { color: var(--nb-brand); font-weight: 600; }
.nb-prose ul.todo-list { list-style: none; padding-left: 0.2em; }
.nb-prose ul.todo-list li::marker { content: none; }
.nb-prose .todo-list__label { display: inline-flex; align-items: baseline; gap: 10px; }
.nb-prose .todo-list input[type="checkbox"] { width: 1.05em; height: 1.05em; accent-color: var(--nb-brand); transform: translateY(2px); }

.nb-prose blockquote {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--nb-brand);
  color: var(--nb-ink); font-size: 1.15rem; font-style: italic; line-height: 1.6;
}
.nb-prose hr { border: 0; height: 1px; background: var(--nb-line); margin: 2.4em 0; }

.nb-prose code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
  background: #eef2f9; color: #be185d; padding: 2px 6px; border-radius: 6px;
}
.nb-prose pre {
  position: relative; background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: 18px 18px;
  overflow-x: auto; font-size: 0.9rem; line-height: 1.65; -webkit-overflow-scrolling: touch;
}
.nb-prose pre[data-language] { padding-top: 40px; }
.nb-prose pre[data-language]::before {
  content: attr(data-language); position: absolute; top: 10px; left: 16px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; font-family: "Inter", sans-serif;
}
.nb-prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; white-space: pre; }
.nb-copy-code {
  position: absolute; top: 8px; right: 8px; border: 1px solid rgba(148, 163, 184, 0.3); background: rgba(30, 41, 59, 0.9);
  color: #cbd5e1; font: 600 0.72rem "Inter", sans-serif; border-radius: 8px; padding: 5px 10px; cursor: pointer;
}
.nb-copy-code:hover { color: #fff; border-color: rgba(148, 163, 184, 0.6); }

.nb-prose img { max-width: 100%; height: auto; border-radius: 12px; display: block; }
.nb-prose figure { margin-left: 0; margin-right: 0; }
.nb-prose figure.image { display: table; margin-left: auto; margin-right: auto; max-width: 100%; }
.nb-prose figure.image img { cursor: zoom-in; margin: 0 auto; }
.nb-prose figure.image_resized { max-width: 100%; }
.nb-prose figure.image_resized img { width: 100%; }
.nb-prose figcaption, .nb-prose figure.table > figcaption, .nb-prose .table-scroll + figcaption {
  display: table-caption; caption-side: bottom; text-align: center; font-size: 0.86rem; color: var(--nb-muted);
  margin-top: 10px; line-height: 1.5;
}
.nb-prose .image-style-align-left, .nb-prose .image-style-block-align-left { margin-left: 0; margin-right: auto; }
.nb-prose .image-style-align-right, .nb-prose .image-style-block-align-right { margin-left: auto; margin-right: 0; }

.nb-prose figure.table { display: block; }
.nb-prose .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--nb-line); border-radius: 12px; }
.nb-prose table { width: 100%; border-collapse: collapse; font-size: 0.94rem; line-height: 1.5; min-width: 480px; }
.nb-prose th, .nb-prose td { padding: 11px 14px; border-bottom: 1px solid var(--nb-line); text-align: left; vertical-align: top; }
.nb-prose th, .nb-prose thead td { background: #f8fafc; color: var(--nb-ink); font-weight: 700; }
.nb-prose tr:last-child td { border-bottom: 0; }
.nb-prose td + td, .nb-prose th + th { border-left: 1px solid var(--nb-line); }
.nb-prose table caption { caption-side: bottom; padding: 10px; font-size: 0.86rem; color: var(--nb-muted); }

.nb-prose .embed, .nb-prose figure.media { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0f172a; }
.nb-prose .embed iframe, .nb-prose figure.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.nb-prose .callout {
  position: relative; padding: 16px 18px 16px 50px; border-radius: 14px; border: 1px solid; font-size: 1rem; line-height: 1.65;
}
.nb-prose .callout::before { content: ""; position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; background: center / contain no-repeat; }
.nb-prose .callout-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.nb-prose .callout-info::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%232563eb'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'/%3E%3Cpath%20d='M12%2016v-4M12%208h.01'/%3E%3C/svg%3E"); }
.nb-prose .callout-tip { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.nb-prose .callout-tip::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%2316a34a'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%2018h6M10%2022h4M12%202a7%207%200%200%200-4%2012.7V17h8v-2.3A7%207%200%200%200%2012%202z'/%3E%3C/svg%3E"); }
.nb-prose .callout-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.nb-prose .callout-warning::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23d97706'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10.3%203.9%201.8%2018a2%202%200%200%200%201.7%203h17a2%202%200%200%200%201.7-3L13.7%203.9a2%202%200%200%200-3.4%200zM12%209v4M12%2017h.01'/%3E%3C/svg%3E"); }
.nb-prose .callout-note { background: #f8fafc; border-color: #e2e8f0; color: #334155; }
.nb-prose .callout-note::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23475569'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%203H6a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V9z'/%3E%3Cpath%20d='M14%203v6h6M8%2013h8M8%2017h5'/%3E%3C/svg%3E"); }
.nb-prose .callout strong { color: inherit; }
.nb-prose a.cta-button, .nb-prose .cta-button a {
  display: inline-flex; padding: 12px 22px; border-radius: 12px; background: var(--nb-brand); color: #fff !important;
  font-weight: 600; text-decoration: none;
}
.nb-prose a.cta-button:hover, .nb-prose .cta-button a:hover { background: var(--nb-brand-dark); }
.nb-prose details { border: 1px solid var(--nb-line); border-radius: 12px; padding: 10px 16px; }
.nb-prose summary { cursor: pointer; font-weight: 600; color: var(--nb-ink); }

/* ── Post footer ─────────────────────────────────────────────────────────── */
.nb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.nb-tag {
  padding: 6px 12px; border-radius: 999px; background: var(--nb-soft); color: var(--nb-text);
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
}
.nb-tag:hover { background: var(--nb-brand-soft); color: var(--nb-brand-dark); }

.nb-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nb-share--footer { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--nb-line); }
.nb-share__label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nb-muted); margin-right: 4px; }
.nb-share__btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px;
  border: 1px solid var(--nb-line); background: #fff; color: var(--nb-ink); cursor: pointer; text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nb-share__btn svg { width: 18px; height: 18px; }
.nb-share__btn[hidden] { display: none; }
.nb-share__btn:hover { color: var(--nb-brand); border-color: var(--nb-brand); background: var(--nb-brand-soft); }
.nb-share__btn.is-copied { color: #16a34a; border-color: #16a34a; background: #f0fdf4; }

.nb-author-box {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 30px; padding: 22px; border-radius: 18px;
  background: linear-gradient(135deg, #f5f8ff, #f8fdff); border: 1px solid var(--nb-line);
}
.nb-author-box__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nb-muted); margin: 0 0 2px; }
.nb-author-box__name { font-size: 1.1rem; font-weight: 700; color: var(--nb-ink); margin: 0 0 6px; }
.nb-author-box__name a { color: inherit; text-decoration: none; }
.nb-author-box__name a:hover { color: var(--nb-brand); }
.nb-author-box__name span { font-weight: 500; color: var(--nb-muted); font-size: 0.92rem; }
.nb-author-box__bio { margin: 0; color: var(--nb-text); font-size: 0.95rem; line-height: 1.6; }
.nb-author-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; font-size: 0.88rem; }
.nb-author-links a { color: var(--nb-brand); font-weight: 600; text-decoration: none; }
.nb-author-links a:hover { text-decoration: underline; }

.nb-prevnext { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 30px; }
.nb-prevnext__link {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--nb-line); border-radius: 14px;
  text-decoration: none; background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.nb-prevnext__link:hover { border-color: var(--nb-brand); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06); }
.nb-prevnext__link span { font-size: 0.78rem; font-weight: 700; color: var(--nb-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.nb-prevnext__link strong { color: var(--nb-ink); font-size: 0.98rem; line-height: 1.4; }
.nb-prevnext__link--next { text-align: right; }

.nb-related { margin-top: 48px; padding: 8px 0 12px; background: linear-gradient(180deg, #fff, #f7f9fe); border-top: 1px solid var(--nb-line); }

/* Lightbox */
.nb-lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, 0.92); display: flex; align-items: center;
  justify-content: center; padding: 20px; cursor: zoom-out;
}
.nb-lightbox[hidden] { display: none; }
.nb-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.nb-lightbox__close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}

/* ── Breakpoints ─────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .nb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .nb-pages__nums { display: flex; }
  .nb-prevnext { grid-template-columns: 1fr 1fr; }
  .nb-cta__card { padding: 36px 36px; }
  .nb-hero { padding: 60px 0 40px; }
  .nb-chips { margin-left: 0; margin-right: 0; }
  .nb-chips__track { padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
}

@media (min-width: 900px) {
  .nb-featured { grid-template-columns: 1.15fr 1fr; }
  .nb-featured__media { aspect-ratio: auto; min-height: 360px; }
  .nb-featured__body { padding: 36px 40px; }
  .nb-cta__card { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px 48px; }
  .nb-post-head { padding-top: 44px; }
  .nb-post-cover img { border-radius: 20px; }
  .nb-prose { font-size: 1.125rem; }
}

@media (min-width: 1024px) {
  .nb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .nb-post-layout { grid-template-columns: 220px minmax(0, var(--nb-prose)) 56px; justify-content: space-between; gap: 48px; margin-top: 44px; }
  .nb-post-layout--no-toc { grid-template-columns: minmax(0, var(--nb-prose)) 56px; justify-content: center; }
  .nb-post-main { margin: 0; }
  .nb-toc { margin: 0; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
  .nb-toc__box { border: 0; background: none; padding: 0; }
  .nb-toc__title { cursor: default; pointer-events: none; padding-top: 0; }
  .nb-toc__title::after { display: none; }
  .nb-post-rail { display: block; position: sticky; top: 110px; align-self: start; }
  .nb-share--rail { flex-direction: column; }
  .nb-share--rail .nb-share__label { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 0 6px; font-size: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nb-card, .nb-card__media img, .nb-featured__media img { transition: none !important; }
  .nb-card:hover { transform: none; }
}

@media print {
  .nb-progress, .nb-share, .nb-post-rail, .nb-toc, .nb-cta, .nb-related, .nb-prevnext, .site-header, footer { display: none !important; }
  .nb-post-layout { display: block; }
}
