/* NeoLoss blog article template (public/site/blog/*.html).
   Loaded in addition to neoloss-custom.css -- reuses the same design
   tokens (Manrope, #FFC671 accent, 24px card radius, 767px breakpoint)
   documented in site.md, but this layout (article + categories +
   in-page TOC) doesn't exist anywhere in the donor markup, so it gets
   its own bespoke `neoloss-blog-*` classes instead of borrowed nl-N ones. */

.neoloss-blog-page { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.neoloss-blog-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(0, 0, 0, 0.55); font-size: 14px; font-weight: 500;
  text-decoration: none; margin: 32px 0 24px;
}
.neoloss-blog-back:hover { opacity: .65; }

/* Hero: reuses .neoloss-gradient-bg (same warm hero gradient as the homepage). */
.neoloss-blog-hero {
  display: flex; align-items: center; gap: 48px;
  border-radius: 24px; padding: 56px; color: #fff;
  margin-bottom: 56px; overflow: hidden; position: relative;
}
.neoloss-blog-hero-text { flex: 1 1 auto; min-width: 0; position: relative; z-index: 1; }
.neoloss-blog-hero-media { flex: 0 0 auto; width: 300px; position: relative; z-index: 1; }
.neoloss-blog-hero-media img {
  width: 100%; height: auto; object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35));
}

.neoloss-tag {
  display: inline-block; background: #FFC671; color: #453421;
  border-radius: 999px; padding: 6px 16px; font-size: 13px; font-weight: 600;
}
.neoloss-tag--outline {
  background: transparent; color: inherit; border: 1px solid currentColor;
}

.neoloss-blog-title {
  font-size: 44px; line-height: 1.15; font-weight: 430; letter-spacing: -0.02em;
  margin: 18px 0 14px;
}
.neoloss-blog-meta { font-size: 14px; color: rgba(255, 255, 255, 0.7); }

.neoloss-blog-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 220px;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
}

/* Left: categories */
.neoloss-blog-categories { position: sticky; top: 96px; }
.neoloss-blog-categories h2,
.neoloss-blog-toc summary {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: #8a8a8a; font-weight: 600; margin: 0 0 12px;
  cursor: default; list-style: none;
}
.neoloss-blog-toc summary::-webkit-details-marker { display: none; }
.neoloss-blog-categories ul, .neoloss-blog-toc ul { list-style: none; margin: 0; padding: 0; }
.neoloss-blog-categories li { margin-bottom: 2px; }
.neoloss-blog-categories a {
  display: block; padding: 9px 12px; border-radius: 12px;
  font-size: 15px; color: rgba(0, 0, 0, 0.65); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.neoloss-blog-categories a:hover { background: #faf8f2; }
.neoloss-blog-categories a[aria-current="page"] {
  background: #faf8f2; color: #000; font-weight: 600;
}
.neoloss-blog-categories .neoloss-blog-all {
  display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee;
  font-size: 14px; font-weight: 600; color: #000; text-decoration: underline;
  text-underline-offset: 3px;
}

/* Center: article body */
.neoloss-blog-article h2 {
  font-size: 28px; line-height: 1.25; font-weight: 460;
  margin: 44px 0 16px; scroll-margin-top: 96px;
}
.neoloss-blog-article h2:first-child { margin-top: 0; }
.neoloss-blog-article p {
  font-size: 17px; line-height: 1.7; color: rgba(0, 0, 0, 0.78);
  margin: 0 0 20px;
}
.neoloss-blog-article ul { margin: 0 0 20px; padding-left: 22px; }
.neoloss-blog-article li {
  font-size: 17px; line-height: 1.7; color: rgba(0, 0, 0, 0.78);
  margin-bottom: 8px;
}
.neoloss-blog-article strong { color: rgba(0, 0, 0, 0.92); }

.neoloss-blog-stat {
  display: flex; gap: 20px; align-items: flex-start;
  background: #faf8f2; border-radius: 16px; padding: 22px 26px;
  margin: 8px 0 28px; border-left: 3px solid #FFC671;
}
.neoloss-blog-stat strong { display: block; font-size: 22px; color: #000; margin-bottom: 4px; }
.neoloss-blog-stat span { font-size: 15px; color: rgba(0, 0, 0, 0.65); line-height: 1.5; }

.neoloss-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFC671; color: #453421; border-radius: 48px;
  padding: 14px 28px; font-size: 16px; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
}
.neoloss-btn-primary:hover { opacity: .9; }

.neoloss-blog-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
  background: #faf8f2; border-radius: 24px; padding: 32px 36px; margin: 40px 0;
}
.neoloss-blog-cta p { margin: 0; font-size: 18px; font-weight: 500; color: #000; max-width: 420px; }

.neoloss-blog-disclaimer {
  font-size: 13px; line-height: 1.6; color: rgba(0, 0, 0, 0.55);
  border-top: 1px solid #eee; padding-top: 20px; margin-top: 48px;
}

/* Right: quick anchor links (in-page table of contents) */
.neoloss-blog-toc { position: sticky; top: 96px; }
.neoloss-blog-toc li { margin-bottom: 2px; }
.neoloss-blog-toc a {
  display: block; padding: 7px 0 7px 14px; font-size: 14px;
  color: rgba(0, 0, 0, 0.55); text-decoration: none;
  border-left: 2px solid #eee; transition: color .15s ease, border-color .15s ease;
}
.neoloss-blog-toc a:hover { color: #000; }
.neoloss-blog-toc a.neoloss-active {
  color: #000; font-weight: 600; border-left-color: #FFC671;
}

/* Related articles */
.neoloss-blog-related { margin-bottom: 72px; }
.neoloss-blog-related h2 {
  font-size: 28px; font-weight: 460; margin: 0 0 24px;
}
.neoloss-blog-related-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.neoloss-blog-related-card {
  display: flex; flex-direction: column; justify-content: space-between;
  background: #faf8f2; border-radius: 24px; padding: 22px;
  text-decoration: none; color: inherit; min-height: 180px;
}
.neoloss-blog-related-card:hover { background: #f4f1e6; }
.neoloss-blog-related-card .neoloss-tag { margin-bottom: 14px; align-self: flex-start; }
.neoloss-blog-related-card strong {
  display: block; font-size: 17px; line-height: 1.35; color: #000; margin-bottom: 8px;
}
.neoloss-blog-related-card span {
  font-size: 14px; line-height: 1.4; color: rgba(0, 0, 0, 0.6);
}
.neoloss-blog-related-card .neoloss-card-readmore { color: #453421; padding: 12px 0 0; margin-top: auto; }

/* This template is self-contained (no drag carousels), so smooth in-page
   anchor scrolling is safe here -- unlike the homepage carousels, nothing
   fights it with manual scrollLeft writes. */
html:has(.neoloss-blog-page) { scroll-behavior: smooth; }

@media (max-width: 1023px) {
  .neoloss-blog-layout { grid-template-columns: 160px minmax(0, 1fr) 200px; gap: 32px; }
  .neoloss-blog-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .neoloss-blog-hero { flex-direction: column; padding: 32px 24px; gap: 24px; text-align: left; }
  .neoloss-blog-hero-media { width: 55%; }
  .neoloss-blog-title { font-size: 28px; line-height: 1.25; }

  .neoloss-blog-layout { grid-template-columns: 1fr; gap: 0; }
  .neoloss-blog-categories, .neoloss-blog-toc { position: static; }

  /* Categories collapse into a horizontal chip scroller instead of a column. */
  .neoloss-blog-categories h2 { display: none; }
  .neoloss-blog-categories ul {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 24px;
  }
  .neoloss-blog-categories li { margin-bottom: 0; flex: 0 0 auto; }
  .neoloss-blog-categories a { white-space: nowrap; background: #faf8f2; }
  .neoloss-blog-categories a[aria-current="page"] { background: #FFC671; color: #453421; }
  .neoloss-blog-categories .neoloss-blog-all { display: none; }

  /* TOC becomes a real, tappable <details> disclosure above the article body
     (it's always a <details>; only its look changes at this breakpoint). */
  .neoloss-blog-toc { margin-bottom: 28px; }
  .neoloss-blog-toc summary {
    cursor: pointer; font-size: 15px; text-transform: none; letter-spacing: normal;
    font-weight: 600; color: #000;
    padding: 14px 16px; background: #faf8f2; border-radius: 14px; margin: 0;
  }
  .neoloss-blog-toc[open] summary { border-radius: 14px 14px 0 0; }
  .neoloss-blog-toc ul { padding: 8px 16px 14px; background: #faf8f2; border-radius: 0 0 14px 14px; }

  .neoloss-blog-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
  .neoloss-blog-related-grid { grid-template-columns: 1fr; }
}
