/* AamoraAI Blog Detail - editorial long-form reading experience
   Reuses tokens from main.css. All colors HSL. */

/* ===== Reading progress bar ===== */
.bd-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: hsl(var(--border-soft) / 0.4); z-index: 60;
  pointer-events: none;
}
.bd-progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, hsl(var(--gold)), hsl(46 65% 62%));
  transition: width 0.08s linear;
  will-change: width;
}
@media (max-width: 640px) {
  .bd-progress { height: 2px; }
}

/* ===== Header CTA (replaces back-link) ===== */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--background));
  background: hsl(153 22% 28%);
  transition: background 0.2s, transform 0.2s;
}
.header-cta:hover {
  background: hsl(153 22% 22%);
  transform: translateY(-1px);
}

/* ===== Hero ===== */
.bd-hero {
  background: var(--gradient-warm);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid hsl(var(--border-soft));
}
.bd-hero-inner { max-width: 880px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Sticky breadcrumb bar ===== */
.bd-breadcrumb-bar {
  z-index: 25;
  background: hsl(33 35% 94% / 0.96);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid hsl(var(--border-soft));
  box-shadow: 0 1px 0 hsl(var(--border-soft) / 0.4);
}
.bd-breadcrumb-bar.is-sticky {
  position: sticky;
  top: var(--pm-nav-h, 4rem);
}
.bd-breadcrumb-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  font-size: 0.78rem;
  color: hsl(var(--foreground) / 0.55);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.bd-breadcrumb-inner::-webkit-scrollbar { display: none; }
.bd-breadcrumb-inner a {
  color: hsl(var(--foreground) / 0.7);
  border-bottom: 1px dotted hsl(var(--foreground) / 0.25);
  padding: 0.25rem 0.1rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.bd-breadcrumb-inner a:hover { color: hsl(var(--foreground)); border-color: hsl(var(--gold) / 0.7); }
.bd-breadcrumb-inner a:focus-visible {
  outline: 2px solid hsl(var(--gold));
  outline-offset: 3px;
  border-radius: 4px;
  border-bottom-color: transparent;
}
.bd-breadcrumb-inner .sep { color: hsl(var(--foreground) / 0.3); }
.bd-breadcrumb-inner .current {
  color: hsl(var(--foreground)); font-weight: 500;
  max-width: 28ch; overflow: hidden; text-overflow: ellipsis;
}
.bd-breadcrumb-inner .bd-current-section {
  color: hsl(var(--gold));
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: 22ch; overflow: hidden; text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}
@media (max-width: 640px) {
  .bd-breadcrumb-inner { padding: 0.5rem 1rem; font-size: 0.74rem; gap: 0.35rem; }
  .bd-breadcrumb-inner a { min-height: 36px; padding: 0.35rem 0.15rem; }
  .bd-breadcrumb-inner .current { max-width: 18ch; }
  .bd-breadcrumb-inner .bd-current-section { max-width: 18ch; }
}

/* ===== Meta action icons (print/save/share/listen) - now in breadcrumb ===== */
.bd-breadcrumb-inner .bd-meta-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid hsl(var(--border-soft));
}
.bd-iconbtn {
  width: 28px; height: 28px;
  border: 1px solid hsl(var(--border-soft));
  border-radius: 4px;
  background: transparent;
  color: hsl(var(--foreground) / 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  padding: 0;
}
.bd-iconbtn:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--gold) / 0.7);
  background: hsl(var(--gold) / 0.06);
}
.bd-iconbtn:focus-visible {
  outline: 2px solid hsl(var(--gold));
  outline-offset: 2px;
}
.bd-iconbtn[aria-pressed="true"] {
  color: hsl(var(--gold));
  border-color: hsl(var(--gold) / 0.7);
  background: hsl(var(--gold) / 0.08);
}
.bd-iconbtn svg { width: 14px; height: 14px; }
.bd-iconbtn .icon-filled { display: none; }
.bd-iconbtn[aria-pressed="true"] .icon-outline { display: none; }
.bd-iconbtn[aria-pressed="true"] .icon-filled { display: inline-block; }
.bd-iconbtn-flash {
  position: absolute;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  transform: translate(-50%, -130%);
  left: 50%;
  top: 0;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 30;
}
.bd-iconbtn-flash.is-on { opacity: 1; }
.bd-iconbtn-wrap { position: relative; display: inline-flex; }

/* Active paragraph during TTS narration */
.bd-tts-active {
  background: hsl(var(--gold) / 0.10);
  box-shadow: -3px 0 0 hsl(var(--gold));
  padding-left: 0.6rem;
  border-radius: 2px;
  transition: background .2s ease;
}

@media print {
  .bd-meta-actions, .bd-breadcrumb-bar, .pm-nav-sticky,
  .bd-progress, .bd-read-progress, .bd-sidebar, .bd-share-modal { display: none !important; }
}
@media (max-width: 560px) {
  .bd-breadcrumb-inner .bd-meta-actions [data-action="listen"],
  .bd-breadcrumb-inner .bd-meta-actions [data-action="print"] { display: none; }
}

/* ===== Share modal ===== */
.bd-share-modal[hidden] { display: none; }
.bd-share-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
}
.bd-share-backdrop {
  position: absolute; inset: 0;
  background: hsl(var(--foreground) / 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: bd-fade-in .15s ease;
}
.bd-share-panel {
  position: relative;
  width: min(440px, calc(100vw - 2rem));
  background: hsl(var(--background));
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-elevated);
  animation: bd-pop-in .2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .bd-share-backdrop, .bd-share-panel { animation: none; }
}
@keyframes bd-fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes bd-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.bd-share-x {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: hsl(var(--foreground) / 0.55);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.bd-share-x:hover { color: hsl(var(--foreground)); background: hsl(var(--foreground) / 0.05); }
.bd-share-x svg { width: 16px; height: 16px; }
.bd-share-panel h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.35rem; margin: 0 0 0.25rem; color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}
.bd-share-sub {
  margin: 0 0 1.1rem; font-size: 0.85rem;
  color: hsl(var(--foreground) / 0.6);
}
.bd-share-url {
  display: flex; gap: 0.4rem;
  border: 1px solid hsl(var(--border-soft));
  border-radius: 8px;
  padding: 4px;
  background: hsl(var(--background));
}
.bd-share-url input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font: inherit; font-size: 0.85rem;
  color: hsl(var(--foreground) / 0.75);
  padding: 0 0.5rem;
}
.bd-share-url button {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: hsl(153 22% 28%);
  color: hsl(var(--background));
  border: none; cursor: pointer;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font: inherit; font-size: 0.82rem; font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease;
}
.bd-share-url button:hover { background: hsl(153 22% 22%); }
.bd-share-url button svg { width: 14px; height: 14px; }
.bd-share-toast {
  margin: 0.7rem 0 0; padding: 0.45rem 0.7rem;
  background: hsl(153 22% 28%); color: hsl(var(--background));
  font-size: 0.8rem; border-radius: 6px;
  text-align: center;
  animation: bd-fade-in .15s ease;
}
.bd-share-grid {
  margin-top: 1.25rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
.bd-share-grid > * {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid hsl(var(--border-soft));
  border-radius: 8px;
  background: hsl(var(--background));
  color: hsl(var(--foreground) / 0.85);
  font: inherit; font-size: 0.85rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.bd-share-grid > *:hover {
  border-color: hsl(var(--gold) / 0.7);
  background: hsl(var(--gold) / 0.06);
  color: hsl(var(--foreground));
}
.bd-share-grid svg { width: 16px; height: 16px; flex: 0 0 auto; }
@media (max-width: 360px) {
  .bd-share-grid { grid-template-columns: 1fr; }
}
body.bd-modal-open { overflow: hidden; }


.bd-cat {
  display: inline-block;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: hsl(var(--gold)); font-weight: 600;
  border-bottom: 1px solid hsl(var(--gold) / 0.4);
  padding-bottom: 0.25rem;
}

.bd-title {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 1.1rem 0 1rem; color: hsl(var(--foreground));
}
.bd-title em { font-style: italic; color: hsl(153 22% 32%); }

.bd-summary {
  font-family: "Fraunces", Georgia, serif; font-weight: 300;
  font-size: 1.18rem; line-height: 1.55;
  color: hsl(var(--foreground) / 0.72);
  margin: 0 0 1.75rem;
}

.bd-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem;
  font-size: 0.85rem; color: hsl(var(--foreground) / 0.6);
  padding-top: 1.25rem; border-top: 1px solid hsl(var(--border-soft));
}
.bd-meta .author {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: hsl(var(--foreground)); font-weight: 500;
}
.bd-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: hsl(153 22% 28%); color: hsl(var(--background));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
}
.bd-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: hsl(var(--foreground) / 0.25); }
.bd-meta .updated {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: hsl(153 22% 32%); font-weight: 500;
}

/* Hero image */
.bd-hero-image {
  max-width: 1080px; margin: 0 auto; padding: 0 1.5rem;
  margin-top: -1.5rem; position: relative;
}
.bd-hero-image figure {
  margin: 0; border-radius: 1rem; overflow: hidden;
  box-shadow: var(--shadow-elevated);
  background: hsl(var(--muted));
}
.bd-hero-image img {
  display: block; width: 100%; height: auto; max-height: 540px; object-fit: cover;
}

/* ===== Layout ===== */
.bd-layout {
  max-width: 1180px; margin: 3rem auto 0; padding: 0 1.5rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 4rem; align-items: start;
}
.bd-article { max-width: 720px; min-width: 0; }
.bd-sidebar { position: sticky; top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }

/* Mobile jump-to dropdown - hidden on desktop */
.bd-jump {
  display: none;
  margin: 1.5rem auto 0; max-width: 720px;
  padding: 0 1.5rem;
}
.bd-jump select {
  width: 100%; appearance: none; -webkit-appearance: none;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.6rem; padding: 0.75rem 2.5rem 0.75rem 1rem;
  font: inherit; font-size: 0.9rem; color: hsl(var(--foreground));
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371796e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 1rem center;
}

/* ===== Article body ===== */
.bd-article {
  font-size: 1.0625rem; line-height: 1.78;
  color: hsl(var(--foreground) / 0.85);
}
.bd-article > * + * { margin-top: 1.4rem; }
.bd-article p { margin: 0; }
.bd-article p.lead {
  font-size: 1.15rem; line-height: 1.7;
  color: hsl(var(--foreground) / 0.9);
}
.bd-article p.lead::first-letter {
  font-family: "Fraunces", Georgia, serif;
  font-size: 3.4rem; line-height: 0.9; font-weight: 400;
  float: left; padding: 0.4rem 0.6rem 0 0;
  color: hsl(153 22% 28%);
}

.bd-article h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.7rem; line-height: 1.25; letter-spacing: -0.015em;
  color: hsl(var(--foreground));
  margin-top: 3rem !important; margin-bottom: 0.85rem;
  scroll-margin-top: 8.5rem;
}
.bd-article h2::after {
  content: ""; display: block;
  width: 40px; height: 2px; margin-top: 0.65rem;
  background: hsl(var(--gold) / 0.6);
}
.bd-article h3 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.01em;
  color: hsl(153 22% 28%);
  margin-top: 2.25rem !important; margin-bottom: 0.5rem;
  scroll-margin-top: 8.5rem;
}
.bd-article a {
  color: hsl(153 22% 28%);
  border-bottom: 1px solid hsl(var(--gold) / 0.55);
  padding-bottom: 1px;
  transition: color 0.18s, border-color 0.18s;
}
.bd-article a:hover {
  color: hsl(16 56% 42%); border-bottom-color: hsl(16 56% 51%);
}
.bd-article strong { color: hsl(var(--foreground)); font-weight: 600; }
.bd-article ul, .bd-article ol {
  margin: 0; padding-left: 1.4rem;
  color: hsl(var(--foreground) / 0.85);
}
.bd-article li + li { margin-top: 0.55rem; }
.bd-article ul li::marker { color: hsl(var(--gold)); }

.bd-article hr {
  border: none; height: 1px;
  background: var(--divider-gold);
  margin: 3rem 0 !important;
}

/* ===== Editorial components ===== */

/* Key takeaway */
.bd-takeaway {
  background: hsl(33 35% 94%);
  border-left: 3px solid hsl(var(--gold));
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.5rem 1.65rem;
  margin: 2rem 0 !important;
}
.bd-takeaway .label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: hsl(var(--gold)); font-weight: 600; margin-bottom: 0.6rem;
}
.bd-takeaway .label svg { width: 14px; height: 14px; }
.bd-takeaway p {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.1rem; line-height: 1.55;
  color: hsl(var(--foreground)); margin: 0;
}

/* Quick checklist */
.bd-checklist {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 0.85rem;
  padding: 1.5rem 1.65rem;
  margin: 2rem 0 !important;
  box-shadow: var(--shadow-soft);
}
.bd-checklist h4 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.15rem; margin: 0 0 1rem; color: hsl(var(--foreground));
}
.bd-checklist ul { list-style: none; padding: 0; margin: 0; }
.bd-checklist li {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.55rem 0;
  font-size: 0.95rem; line-height: 1.55;
  color: hsl(var(--foreground) / 0.85);
  border-bottom: 1px solid hsl(var(--border-soft));
}
.bd-checklist li:last-child { border-bottom: none; }
.bd-checklist li::before {
  content: ""; flex: 0 0 auto; width: 18px; height: 18px;
  border-radius: 4px; margin-top: 0.15rem;
  background-color: hsl(153 22% 28%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23faf8f4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat; background-position: center;
}

/* Quote / insight */
.bd-quote {
  position: relative;
  margin: 2.5rem 0 !important;
  padding: 0.5rem 0 0.5rem 2.5rem;
}
.bd-quote::before {
  content: "\201C";
  position: absolute; left: -0.25rem; top: -0.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 4.5rem; line-height: 1;
  color: hsl(var(--gold) / 0.7);
}
.bd-quote blockquote {
  margin: 0;
  font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 300;
  font-size: 1.32rem; line-height: 1.5;
  color: hsl(var(--foreground));
}
.bd-quote cite {
  display: block; margin-top: 0.85rem;
  font-style: normal; font-size: 0.85rem;
  color: hsl(var(--foreground) / 0.6);
}
.bd-quote cite strong { color: hsl(var(--foreground)); font-weight: 600; }

/* Numbered process */
.bd-process {
  margin: 2rem 0 !important;
  display: flex; flex-direction: column; gap: 0.85rem;
}
.bd-process-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 1.1rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
}
.bd-process-item .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: hsl(153 22% 28%); color: hsl(var(--background));
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Fraunces", Georgia, serif; font-size: 1.05rem; font-weight: 500;
}
.bd-process-item h4 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.1rem; margin: 0 0 0.35rem; color: hsl(var(--foreground));
}
.bd-process-item p {
  margin: 0; font-size: 0.94rem; line-height: 1.6;
  color: hsl(var(--foreground) / 0.72);
}

/* Soft inline CTA */
.bd-cta {
  margin: 2.5rem 0 !important;
  background: linear-gradient(140deg, hsl(153 22% 22%) 0%, hsl(153 18% 16%) 100%);
  color: hsl(var(--background));
  border-radius: 1rem;
  padding: 1.85rem 1.85rem;
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem;
  align-items: center;
  position: relative; overflow: hidden;
}
.bd-cta::after {
  content: ""; position: absolute; right: -50px; bottom: -50px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, hsl(var(--gold) / 0.22), transparent 70%);
}
.bd-cta .eyebrow {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: hsl(var(--gold)); font-weight: 600;
}
.bd-cta h4 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.35rem; line-height: 1.25;
  margin: 0.5rem 0 0.4rem;
}
.bd-cta p { margin: 0; font-size: 0.92rem; color: hsl(var(--background) / 0.78); line-height: 1.6; }
.bd-cta .btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: hsl(var(--gold)); color: hsl(153 22% 18%);
  padding: 0.75rem 1.4rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600;
  border: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  position: relative; z-index: 1;
}
.bd-cta .btn:hover { background: hsl(46 70% 58%); transform: translateY(-1px); }

/* Article image */
.bd-figure {
  margin: 2.5rem 0 !important;
}
.bd-figure img {
  display: block; width: 100%; height: auto;
  border-radius: 0.75rem; overflow: hidden;
}
.bd-figure figcaption {
  margin-top: 0.7rem; font-size: 0.82rem;
  color: hsl(var(--foreground) / 0.55);
  text-align: center; font-style: italic;
}

/* ===== Sidebar cards ===== */
.bd-card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 0.85rem;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
}
.bd-card .eyebrow {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: hsl(var(--gold)); font-weight: 600; margin-bottom: 0.85rem;
}

/* TOC */
.bd-toc ol {
  list-style: none; padding: 0; margin: 0;
  font-size: 0.88rem;
  counter-reset: toc;
}
.bd-toc li { counter-increment: toc; }
.bd-toc a {
  display: flex; gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  color: hsl(var(--foreground) / 0.65);
  line-height: 1.45;
  border-left: 2px solid transparent;
  transition: all 0.18s;
}
.bd-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: ui-monospace, monospace; font-size: 0.7rem;
  color: hsl(var(--foreground) / 0.35);
  flex: 0 0 auto; padding-top: 0.1rem;
}
.bd-toc a:hover {
  color: hsl(var(--foreground));
  background: hsl(33 30% 95%);
}
.bd-toc a.is-active {
  color: hsl(153 22% 28%);
  background: hsl(33 35% 94%);
  border-left-color: hsl(var(--gold));
  font-weight: 500;
}
.bd-toc a.is-active::before { color: hsl(var(--gold)); }

/* Reading progress (sidebar) */
.bd-read-progress {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.76rem; color: hsl(var(--foreground) / 0.6);
  margin-top: 0.85rem; padding-top: 0.85rem;
  border-top: 1px solid hsl(var(--border-soft));
}
.bd-read-progress__track {
  flex: 1; height: 4px; border-radius: 4px;
  background: hsl(var(--border-soft));
  overflow: hidden;
}
.bd-read-progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, hsl(var(--gold)), hsl(153 22% 38%));
  transition: width 0.15s linear;
}

/* Sidebar resource cards */
.bd-resource {
  background: linear-gradient(160deg, hsl(33 35% 94%) 0%, hsl(33 30% 91%) 100%);
  border: 1px solid hsl(var(--border-soft));
  border-radius: 0.85rem;
  padding: 1.25rem 1.35rem;
}
.bd-resource.is-dark {
  background: linear-gradient(155deg, hsl(153 22% 22%) 0%, hsl(153 18% 16%) 100%);
  color: hsl(var(--background));
  border-color: transparent;
}
.bd-resource .eyebrow { color: hsl(var(--gold)); }
.bd-resource h4 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.05rem; line-height: 1.3;
  margin: 0 0 0.5rem; color: inherit;
}
.bd-resource p {
  font-size: 0.85rem; line-height: 1.55;
  margin: 0 0 1rem;
  color: hsl(var(--foreground) / 0.7);
}
.bd-resource.is-dark p { color: hsl(var(--background) / 0.75); }
.bd-resource .link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600;
  color: hsl(153 22% 28%);
  border-bottom: 1px solid hsl(var(--gold) / 0.5);
  padding-bottom: 1px;
}
.bd-resource.is-dark .link {
  color: hsl(var(--gold));
  border-bottom-color: hsl(var(--gold) / 0.45);
}
.bd-resource .link:hover { color: hsl(16 56% 42%); }
.bd-resource.is-dark .link:hover { color: hsl(46 70% 65%); }

/* Share */
.bd-share {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin-top: 0.5rem;
}
.bd-share button {
  flex: 1; min-width: 0;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 0.45rem 0.6rem;
  font: inherit; font-size: 0.78rem;
  color: hsl(var(--foreground) / 0.75);
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.bd-share button:hover {
  border-color: hsl(var(--gold) / 0.55);
  color: hsl(var(--foreground));
}
.bd-share svg { width: 14px; height: 14px; }

/* ===== After-article sections ===== */
.bd-after { max-width: 880px; margin: 4rem auto 0; padding: 0 1.5rem; }

/* FAQ */
.bd-faq h2,
.bd-related h2,
.bd-author-wrap h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.7rem; letter-spacing: -0.015em;
  color: hsl(var(--foreground)); margin: 0 0 1.25rem;
}
.bd-faq details {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
  transition: box-shadow 0.2s;
}
.bd-faq details[open] { box-shadow: var(--shadow-soft); border-color: hsl(var(--gold) / 0.35); }
.bd-faq summary {
  list-style: none; cursor: pointer;
  font-family: "Fraunces", Georgia, serif; font-size: 1.05rem;
  color: hsl(var(--foreground));
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.bd-faq summary::-webkit-details-marker { display: none; }
.bd-faq summary::after {
  content: "+"; flex: 0 0 auto;
  font-family: ui-monospace, monospace;
  font-size: 1.3rem; line-height: 1;
  color: hsl(var(--gold)); font-weight: 400;
  transition: transform 0.2s;
}
.bd-faq details[open] summary::after { content: "\2013"; transform: rotate(0); }
.bd-faq details > p {
  margin: 0.85rem 0 0;
  font-size: 0.95rem; line-height: 1.7;
  color: hsl(var(--foreground) / 0.72);
}

/* Author bio */
.bd-author {
  background: hsl(33 35% 94%);
  border: 1px solid hsl(var(--border-soft));
  border-radius: 1rem;
  padding: 1.85rem 1.85rem;
  display: grid; grid-template-columns: 72px 1fr; gap: 1.5rem; align-items: flex-start;
}
.bd-author-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: hsl(153 22% 28%); color: hsl(var(--background));
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 500;
}
.bd-author h3 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.2rem; margin: 0 0 0.15rem; color: hsl(var(--foreground));
}
.bd-author .role {
  font-size: 0.82rem; color: hsl(var(--gold)); font-weight: 600;
  letter-spacing: 0.04em;
}
.bd-author p {
  margin: 0.7rem 0 0; font-size: 0.92rem; line-height: 1.65;
  color: hsl(var(--foreground) / 0.72);
}
.bd-author .links {
  display: flex; gap: 0.75rem; margin-top: 0.85rem;
  font-size: 0.82rem;
}
.bd-author .links a { color: hsl(153 22% 28%); border-bottom: 1px dotted hsl(var(--foreground) / 0.3); padding-bottom: 1px; }
.bd-author .links a:hover { color: hsl(16 56% 42%); }

/* Related articles */
.bd-related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.bd-related-card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 0.85rem;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s var(--ease-organic), box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}
.bd-related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
  border-color: hsl(var(--gold) / 0.35);
}
.bd-related-card .media { aspect-ratio: 16/10; background: hsl(var(--muted)); overflow: hidden; }
.bd-related-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-organic); }
.bd-related-card:hover .media img { transform: scale(1.04); }
.bd-related-card .body { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.bd-related-card h4 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.02rem; line-height: 1.3;
  margin: 0.65rem 0 0.55rem; color: hsl(var(--foreground));
}
.bd-related-card .meta {
  margin-top: auto; padding-top: 0.5rem;
  font-size: 0.74rem; color: hsl(var(--foreground) / 0.55);
  display: flex; gap: 0.5rem; align-items: center;
}
.bd-related-card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: hsl(var(--foreground) / 0.25); }

/* ===== Newsletter footer ===== */
.bd-newsletter {
  margin: 4.5rem auto 4rem; max-width: 880px; padding: 0 1.5rem;
}
.bd-newsletter-inner {
  background: hsl(33 35% 94%);
  border: 1px solid hsl(var(--border-soft));
  border-radius: 1.25rem;
  padding: 2.5rem 2.25rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.bd-newsletter-inner::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--divider-gold);
}
.bd-newsletter .eyebrow {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: hsl(var(--gold)); font-weight: 600;
}
.bd-newsletter h2 {
  font-family: "Fraunces", Georgia, serif; font-weight: 400;
  font-size: 1.7rem; line-height: 1.2; letter-spacing: -0.015em;
  margin: 0.65rem 0 0.65rem;
}
.bd-newsletter p {
  color: hsl(var(--foreground) / 0.7); font-size: 0.95rem; line-height: 1.6;
  max-width: 540px; margin: 0 auto 1.5rem;
}
.bd-newsletter-form {
  display: flex; gap: 0.5rem; align-items: stretch;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 999px; padding: 0.4rem 0.4rem 0.4rem 1.15rem;
  max-width: 460px; margin: 0 auto;
}
.bd-newsletter-form:focus-within {
  border-color: hsl(var(--gold) / 0.6);
  box-shadow: 0 0 0 4px hsl(var(--gold) / 0.12);
}
.bd-newsletter-form input {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; font-size: 0.95rem; padding: 0.65rem 0; min-width: 0;
  color: hsl(var(--foreground));
}
.bd-newsletter-form button {
  border: none; cursor: pointer; font: inherit;
  background: hsl(var(--foreground)); color: hsl(var(--background));
  border-radius: 999px; padding: 0.65rem 1.4rem;
  font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s;
}
.bd-newsletter-form button:hover { background: hsl(var(--foreground) / 0.85); }
.bd-newsletter-status { margin-top: 0.85rem; font-size: 0.82rem; min-height: 1.2em; color: hsl(153 22% 28%); }
.bd-newsletter-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: hsl(153 22% 28%);
  color: hsl(var(--background));
  font-weight: 500; font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
  min-height: 44px;
}
.bd-newsletter-cta:hover { background: hsl(153 22% 22%); transform: translateY(-1px); }
.bd-newsletter-cta:focus-visible { outline: 2px solid hsl(var(--gold)); outline-offset: 3px; }

/* ===== Responsive ===== */
@media (max-width: 1020px) {
  .bd-layout { grid-template-columns: 1fr; gap: 2rem; }
  .bd-sidebar { position: static; order: 2; flex-direction: column; }
  .bd-toc { display: none; }
  .bd-jump { display: block; }
  .bd-article { max-width: 100%; }
  .bd-hero-image img { max-height: 380px; }
}

@media (max-width: 640px) {
  .bd-hero { padding: 2.25rem 0 2rem; }
  .bd-hero-image { margin-top: -1rem; }
  .bd-hero-image img { max-height: 280px; border-radius: 0.75rem; }
  .bd-article { font-size: 1.0625rem; line-height: 1.72; } /* ~17px body */
  .bd-article p.lead { font-size: 1.05rem; }
  .bd-article p.lead::first-letter { font-size: 2.8rem; padding-right: 0.4rem; }
  .bd-article h2 { font-size: 1.4rem; margin-top: 2.25rem !important; scroll-margin-top: 6.5rem; }
  .bd-article h3 { font-size: 1.15rem; scroll-margin-top: 6.5rem; }
  .bd-cta { grid-template-columns: 1fr; padding: 1.5rem; }
  .bd-cta .btn { width: 100%; justify-content: center; }
  .bd-author { grid-template-columns: 1fr; text-align: left; padding: 1.5rem; }
  .bd-author-avatar { width: 56px; height: 56px; font-size: 1.3rem; }
  .bd-related-grid { grid-template-columns: 1fr; }
  .bd-newsletter-inner { padding: 2rem 1.5rem; }
  .bd-newsletter-form { flex-direction: column; border-radius: 1rem; padding: 0.5rem; }
  .bd-newsletter-form input { padding: 0.75rem 0.85rem; }
  .bd-newsletter-form button { border-radius: 0.75rem; padding: 0.8rem 1.2rem; }
  .bd-title { font-size: 1.7rem; }
  .bd-process-item { grid-template-columns: 36px 1fr; gap: 0.85rem; padding: 1rem; }
  .bd-process-item .num { width: 30px; height: 30px; font-size: 0.95rem; }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
