/* ════════════════════════════════════════════════════
   NC Single Post — single.css  v2
   Uses correct CSS vars from main.css:
   --font-display, --font-body, --font-mono
   --green-50/100/400/500/600/900
   --ink, --ink-60, --ink-20, --cream
   --radius-md/lg/xl, --shadow-sm/md/lg, --nav-h
   ════════════════════════════════════════════════════ */

/* ── HERO ──────────────────────────────────────────── */
.ns-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--green-900);
}
.ns-hero-img {
  position: absolute;
  inset: 0;
}
.ns-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* Multi-stop overlay: transparent top → dark bottom */
.ns-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,56,40,0.15) 0%,
    rgba(10,56,40,0.55) 40%,
    rgba(10,56,40,0.92) 100%
  );
}
.ns-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3.5rem 5% 3rem;
  max-width: 900px;
}

/* Category pills */
.ns-cats { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ns-cat {
  display: inline-block;
  background: rgba(46,194,126,.18);
  border: 1px solid rgba(46,194,126,.35);
  color: #6ee7b7;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  padding: 4px 13px; border-radius: 50px;
  text-decoration: none;
  transition: background .2s;
}
.ns-cat:hover { background: rgba(46,194,126,.32); }

/* Post title */
.ns-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -1px;
  color: #ffffff;
  margin: 0 0 1.1rem;
  max-width: 800px;
  text-shadow: 0 1px 8px rgba(0,0,0,.3);
}

/* Meta bar */
.ns-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}
.ns-meta-item { display: flex; align-items: center; gap: 5px; }
.ns-meta-item svg { flex-shrink: 0; opacity: .8; }

/* ── PAGE GRID ─────────────────────────────────────── */
.ns-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 5% 4rem;
  align-items: start;
}

/* ── MAIN COLUMN ───────────────────────────────────── */
.ns-main { min-width: 0; }

/* ── TABLE OF CONTENTS (inline, mobile) ── */
.ns-toc {
  background: var(--green-50);
  border: 1.5px solid var(--green-100);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.35rem;
  margin-bottom: 2.25rem;
  display: none; /* hidden on desktop — shown on mobile */
}
.ns-toc-header {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px; color: var(--green-600);
  margin-bottom: .7rem;
}
.ns-toc-toggle {
  background: var(--green-100);
  border: none; border-radius: 50%;
  width: 26px; height: 26px;
  cursor: pointer; font-size: 18px; font-weight: 700;
  color: var(--green-600); line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.ns-toc-toggle:hover { background: var(--green-100); }

/* ── ARTICLE TYPOGRAPHY ── */
.ns-content { font-size: 17px; line-height: 1.85; color: var(--ink); }

.ns-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700; letter-spacing: -.4px;
  color: var(--ink);
  margin: 2.75rem 0 1rem;
  padding-top: .25rem;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.ns-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 .75rem;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.ns-content h4 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--ink); margin: 1.5rem 0 .5rem;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.ns-content p   { margin: 0 0 1.4rem; }
.ns-content ul,
.ns-content ol  { margin: .25rem 0 1.4rem 1.5rem; }
.ns-content li  { margin-bottom: .55rem; }

.ns-content a {
  color: var(--green-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ns-content a:hover { color: var(--green-600); }
.ns-content strong  { font-weight: 700; color: var(--ink); }
.ns-content em      { font-style: italic; }

.ns-content blockquote {
  border-left: 4px solid var(--green-400);
  background: var(--green-50);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink-60);
  font-size: 16px;
}
.ns-content blockquote p { margin: 0; }

.ns-content img {
  max-width: 100%; height: auto;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  display: block;
}

/* Tables */
.ns-content table {
  width: 100%; border-collapse: collapse;
  margin: 2rem 0; font-size: 15px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ns-content th {
  background: var(--green-900);
  color: #fff; padding: 11px 15px;
  text-align: left; font-size: 12px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px;
}
.ns-content td {
  padding: 10px 15px;
  border-bottom: 1px solid var(--ink-20);
  vertical-align: top;
}
.ns-content tr:nth-child(even) td { background: var(--green-50); }
.ns-content tr:last-child td { border-bottom: none; }

/* Code */
.ns-content code {
  background: rgba(15,26,18,.07);
  border-radius: 5px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: .88em;
  color: var(--green-600);
}

/* ── TAGS ── */
.ns-tags {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  margin: 2.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--ink-20);
  border-bottom: 1px solid var(--ink-20);
}
.ns-tags-label { font-size: 13px; font-weight: 700; color: var(--ink-60); }
.ns-tag {
  background: rgba(15,26,18,.06);
  color: var(--ink-60); font-size: 12px;
  padding: 4px 13px; border-radius: 50px;
  text-decoration: none;
  border: 1px solid var(--ink-20);
  transition: all .2s;
}
.ns-tag:hover { background: var(--green-50); color: var(--green-600); border-color: var(--green-100); }

/* ── AUTHOR CARD ── */
.ns-author-card {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: #fff;
  border: 1px solid var(--ink-20);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-sm);
}
.ns-author-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--green-100);
}
.ns-author-name {
  font-weight: 700; font-size: 15px;
  color: var(--ink); margin-bottom: .3rem;
}
.ns-author-bio { font-size: 13px; color: var(--ink-60); margin: 0; line-height: 1.65; }

/* ── POST NAV ── */
.ns-post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin: 2.5rem 0;
}
.ns-post-nav-item {
  display: flex; flex-direction: column; gap: 5px;
  background: #fff;
  border: 1px solid var(--ink-20);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.ns-post-nav-item:hover {
  border-color: var(--green-400);
  background: var(--green-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ns-post-nav-next { text-align: right; }
.ns-post-nav-dir {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--green-600);
}
.ns-post-nav-title {
  font-size: 14px; font-weight: 600;
  color: var(--ink); line-height: 1.4;
}

/* ── RELATED POSTS ── */
.ns-related { margin: 3rem 0 0; }
.ns-related-title {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 700;
  color: var(--ink); margin: 0 0 1.25rem;
}
.ns-related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.ns-related-card {
  display: flex; flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--ink-20);
  text-decoration: none;
  background: #fff;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.ns-related-card:hover {
  border-color: var(--green-400);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.ns-related-img { aspect-ratio: 16/9; overflow: hidden; background: var(--green-50); flex-shrink: 0; }
.ns-related-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ns-related-card:hover .ns-related-img img { transform: scale(1.05); }
.ns-related-img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.ns-related-body { padding: .9rem 1rem; flex: 1; display: flex; flex-direction: column; }
.ns-related-cat {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--green-600); margin-bottom: 5px;
}
.ns-related-name {
  font-size: 13px; font-weight: 600;
  color: var(--ink); line-height: 1.45;
  flex: 1; margin-bottom: 6px;
}
.ns-related-meta { font-size: 11px; color: var(--ink-60); }

/* ── SIDEBAR ───────────────────────────────────────── */
.ns-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 1rem;
}
.ns-sidebar::-webkit-scrollbar { display: none; }

/* Base card */
.ns-sb-card {
  background: #ffffff;
  border: 1px solid var(--ink-20);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ── CTA card ── */
.ns-sb-cta {
  background: linear-gradient(145deg, #0d3d22 0%, var(--green-900) 100%);
  border: none;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(10,56,40,.4);
}
.ns-sb-cta-icon {
  font-size: 42px; margin-bottom: .85rem;
  display: block;
  filter: drop-shadow(0 0 10px rgba(46,194,126,.4));
}
.ns-sb-cta h3 {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  color: #ffffff; margin: 0 0 .65rem;
  line-height: 1.3;
}
.ns-sb-cta h3 strong { color: #6ee7b7; font-style: italic; }
.ns-sb-cta p {
  font-size: 13px; color: rgba(255,255,255,.62);
  margin: 0 0 1.25rem; line-height: 1.65;
}
.ns-sb-cta-btn {
  display: block; width: 100%;
  padding: 13px 16px; border-radius: 50px;
  background: var(--green-500); color: #fff !important;
  font-size: 14px; font-weight: 700;
  font-family: var(--font-body);
  border: none; cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 4px 20px rgba(31,168,104,.45);
  transition: background .2s, transform .15s;
}
.ns-sb-cta-btn:hover { background: var(--green-600); transform: translateY(-1px); }
.ns-sb-cta-trust {
  font-size: 11px; color: rgba(255,255,255,.38);
  margin-top: .75rem; letter-spacing: .2px;
}

/* ── Join / Account card ── */
.ns-sb-join { padding: 1.25rem 1.35rem; }
.ns-sb-join-icon { font-size: 26px; margin-bottom: .5rem; display: block; }
.ns-sb-join-body strong {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--ink); margin-bottom: 4px;
}
.ns-sb-join-body p {
  font-size: 12.5px; color: var(--ink-60);
  line-height: 1.6; margin: 0 0 .9rem;
}
.ns-sb-join-btn {
  display: block; text-align: center;
  padding: 10px 16px; border-radius: 50px;
  background: var(--green-500); color: #fff !important;
  font-size: 13px; font-weight: 700;
  text-decoration: none !important;
  margin-bottom: .55rem;
  transition: background .2s, transform .15s;
}
.ns-sb-join-btn:hover { background: var(--green-600); transform: translateY(-1px); }
.ns-sb-signin-link {
  display: block; text-align: center;
  font-size: 12px; color: var(--ink-60);
  text-decoration: none;
}
.ns-sb-signin-link:hover { color: var(--green-600); }

/* ── Sidebar TOC ── */
.ns-sb-toc-desk { padding: 1.25rem 1.35rem; }
.ns-sb-toc-header {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--ink-60); margin-bottom: .85rem;
}
.ns-sb-toc-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ns-sb-toc-list li a {
  display: block;
  font-size: 12.5px; color: var(--ink-60);
  text-decoration: none;
  padding: 5px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  line-height: 1.45;
  transition: all .15s;
}
.ns-sb-toc-list li a:hover,
.ns-sb-toc-list li a.active {
  color: var(--green-600);
  border-left-color: var(--green-500);
  background: var(--green-50);
}
.ns-sb-toc-list .ns-toc-sub a { padding-left: 22px; font-size: 12px; }
.ns-toc-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.ns-toc-list li a {
  display: block; font-size: 13px; color: var(--ink-60);
  text-decoration: none; padding: 4px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all .15s;
}
.ns-toc-list li a:hover,
.ns-toc-list li a.active {
  color: var(--green-600);
  border-left-color: var(--green-500);
  background: var(--green-50);
}
.ns-toc-list .ns-toc-sub { padding-left: .75rem; }
.ns-toc-list .ns-toc-sub a { font-size: 12px; }

/* ── Stats card ── */
.ns-sb-stats { padding: 1.25rem 1.35rem; }
.ns-sb-stats-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .9px;
  color: var(--ink-60); margin-bottom: .85rem;
}
.ns-sb-stat {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid var(--ink-20);
}
.ns-sb-stat:last-child { border-bottom: none; }
.ns-sb-stat-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

/* ── Product card ── */
.ns-sb-product {
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg,#fffbeb,#fff);
}
.ns-sb-product-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--ink-60); margin-bottom: .55rem;
}
.ns-sb-product-title {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin-bottom: 3px;
}
.ns-sb-product-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; margin-bottom: 6px; }
.ns-sb-product-desc {
  font-size: 12.5px; color: var(--ink-60);
  line-height: 1.6; margin-bottom: .9rem;
}
.ns-sb-product-btn {
  display: block; text-align: center;
  padding: 10px 16px; border-radius: 50px;
  background: #f59e0b; color: #fff !important;
  font-size: 13px; font-weight: 700;
  text-decoration: none !important;
  margin-bottom: .5rem;
  transition: opacity .2s, transform .15s;
}
.ns-sb-product-btn:hover { opacity: .9; transform: translateY(-1px); }
.ns-sb-product-disc { font-size: 10px; color: var(--ink-60); text-align: center; }

/* ── Share card ── */
.ns-sb-share { padding: 1.25rem 1.35rem; }
.ns-sb-share-title {
  font-size: 12px; font-weight: 700;
  color: var(--ink); margin-bottom: .85rem;
  text-transform: uppercase; letter-spacing: .7px;
}
.ns-sb-share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ns-share-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  text-decoration: none !important;
  cursor: pointer; border: none;
  font-family: var(--font-body);
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}
.ns-share-btn:hover { opacity: .88; transform: translateY(-1px); }
.ns-share-btn svg { flex-shrink: 0; }
.ns-share-fb { background: #1877f2; color: #fff !important; }
.ns-share-tw { background: #111;    color: #fff !important; }
.ns-share-li { background: #0a66c2; color: #fff !important; }
.ns-share-copy {
  background: var(--green-50);
  color: var(--green-600) !important;
  border: 1px solid var(--green-100);
}

/* ── More links card ── */
.ns-sb-more { padding: 1.1rem 1.35rem; }
.ns-sb-more-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .9px;
  color: var(--ink-60); margin-bottom: .75rem;
}
.ns-sb-more-link {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--ink-60);
  text-decoration: none;
  padding: 7px 0;
  border-bottom: 1px solid var(--ink-20);
  transition: color .15s;
}
.ns-sb-more-link:last-child { border-bottom: none; padding-bottom: 0; }
.ns-sb-more-link:hover { color: var(--green-600); }
.ns-sb-more-link--green { color: var(--green-500); font-weight: 600; }

/* ── BOTTOM CTA BAR ──────────────────────────────── */
.ns-bottom-cta {
  background: var(--green-900);
  padding: 3rem 5%;
}
.ns-bottom-cta-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.ns-bottom-cta-text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem,3vw,1.7rem);
  font-weight: 700; color: #fff;
  margin: 0 0 .4rem;
}
.ns-bottom-cta-text p {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin: 0;
}
.ns-bottom-cta-btns { display: flex; gap: .9rem; flex-wrap: wrap; }
.ns-bottom-cta-primary {
  padding: 13px 26px; border-radius: 50px;
  background: var(--green-500); color: #fff !important;
  font-size: 15px; font-weight: 700;
  border: none; cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 4px 20px rgba(31,168,104,.4);
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.ns-bottom-cta-primary:hover { background: var(--green-600); transform: translateY(-1px); }
.ns-bottom-cta-secondary {
  padding: 13px 26px; border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85) !important;
  font-size: 15px; font-weight: 600;
  text-decoration: none !important;
  transition: border-color .2s;
  white-space: nowrap;
}
.ns-bottom-cta-secondary:hover { border-color: rgba(255,255,255,.5); color: #fff !important; }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1080px) {
  .ns-grid { grid-template-columns: 1fr 290px; gap: 2.25rem; }
}

@media (max-width: 860px) {
  .ns-grid { grid-template-columns: 1fr 260px; gap: 1.75rem; padding: 2rem 5%; }
  .ns-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .ns-hero { min-height: 320px; }
  .ns-title { font-size: 1.65rem; }
  .ns-hero-content { padding: 2.5rem 5% 2rem; }

  .ns-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem 5%;
    gap: 1.5rem;
  }

  /* Sidebar shows above article on mobile, compacted */
  .ns-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    order: -1;
  }

  /* Hide low-priority sidebar cards on mobile */
  .ns-sb-toc-desk,
  .ns-sb-stats,
  .ns-sb-more,
  .ns-sb-share  { display: none; }

  /* Show inline TOC instead */
  .ns-toc { display: block; }

  .ns-related-grid { grid-template-columns: 1fr; }
  .ns-post-nav     { grid-template-columns: 1fr; }

  .ns-bottom-cta-inner { flex-direction: column; text-align: center; }
  .ns-bottom-cta-btns  { justify-content: center; }
}

@media (max-width: 480px) {
  .ns-sb-share-btns { grid-template-columns: 1fr; }
}
