/* ─────────────────────────────────────────────────────────────────────────
 * Blog — list, topic pages, and posts. Loaded only on /blog pages; builds on
 * the site's tokens and components (page-hero, .btn, .label, .lm-embed).
 * ───────────────────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── LIST: search + topics ─────────────────────────────────── */
.blog-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  margin-bottom: 44px;
}
.blog-search { position: relative; flex: 1 1 280px; max-width: 380px; }
.blog-search svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text3); pointer-events: none;
}
.blog-search input {
  width: 100%; font: inherit; font-size: .9375rem; color: var(--text);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 16px 13px 44px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.blog-search input::placeholder { color: var(--text3); opacity: 1; }
.blog-search input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,149,106,.18);
}
.blog-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center;
  font-size: .8125rem; font-weight: 500; letter-spacing: .01em; color: var(--text2);
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 15px; line-height: 1.3;
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease);
}
.chip:hover { color: var(--navy); border-color: rgba(184,149,106,.55); }
.chip.is-active { color: var(--white); background: var(--navy); border-color: var(--navy); }

.blog-grid[hidden], .blog-results[hidden] { display: none; }
.blog-status { font-size: .9375rem; color: var(--text2); margin: -20px 0 24px; min-height: 0; }
.blog-status:empty { display: none; }

/* ─── LIST: cards ───────────────────────────────────────────── */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
}
.blog-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out),
              border-color var(--dur-2) var(--ease-out), --glow var(--dur-3) var(--ease-out);
}
/* The same pointer light as the site's cards (the navy featured card keeps its own background) */
.blog-card:not(.featured) {
  background-image: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(184,149,106, calc(var(--glow) * .1)), transparent 70%);
}
@media (hover: hover) {
  .blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(184,149,106,.38); --glow: 1; }
}
.blog-card:focus-within { box-shadow: var(--shadow-hover); border-color: rgba(184,149,106,.38); }
.blog-card-link:focus-visible { outline-offset: -4px; border-radius: var(--radius-lg); }
.blog-card:active { transform: scale(.99); transition-duration: 90ms; }
/* Cards in a row arrive one after another */
.blog-grid > .anim:nth-child(3n+2) { --d: 90ms; }
.blog-grid > .anim:nth-child(3n) { --d: 180ms; }
.blog-card-link { display: flex; flex-direction: column; height: 100%; }
.blog-card-img { aspect-ratio: 16 / 9; background: var(--bg2); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 28px; }
.blog-card h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem); color: var(--navy);
  margin: 10px 0 10px; line-height: 1.22;
}
.blog-card p { font-size: .9375rem; line-height: 1.7; }
.blog-card-more {
  display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 18px;
  font-size: .875rem; font-weight: 600; color: var(--navy);
}
.blog-card-more svg { width: 15px; height: 15px; transition: transform var(--dur-3) var(--ease-out); }
.blog-card:focus-within .blog-card-more svg { transform: translateX(3px); }
.blog-card:hover .blog-card-more { color: var(--gold); }
.blog-card:hover .blog-card-more svg { transform: translateX(3px); }

/* No featured image: a text card with the site's gold rule */
.blog-card.no-image .blog-card-body { padding: 34px 32px 32px; }
.blog-card.no-image .blog-card-body::before {
  content: ''; width: 36px; height: 2px; background: var(--gold); margin-bottom: 20px;
}
/* …and when it's the newest post: a navy banner, like the page headers */
.blog-card.featured.no-image {
  position: relative; isolation: isolate; border: 0;
  background:
    radial-gradient(120% 85% at 78% 14%, rgba(212,184,150,.22) 0%, transparent 46%),
    linear-gradient(160deg, #1B3054 0%, #243861 60%, #11203a 100%);
}
.blog-card.featured.no-image::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--topo) no-repeat; background-position: 108% 40%; background-size: 52% auto;
  opacity: .16;
}
.blog-card.featured.no-image .blog-card-body { padding: 56px 60px 52px; max-width: 760px; }
.blog-card.featured.no-image h3 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin: 14px 0 16px; }
.blog-card.featured.no-image p { color: rgba(255,255,255,.76); font-size: 1.0625rem; }
.blog-card.featured.no-image .blog-meta { color: rgba(255,255,255,.6); }
.blog-card.featured.no-image .blog-meta-topic,
.blog-card.featured.no-image .blog-card-more { color: var(--gold-lt); }
.blog-card.featured.no-image:hover .blog-card-more { color: #fff; }
.blog-card.featured.no-image .blog-card-body::before { background: var(--gold-lt); }

.blog-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  font-size: .78rem; letter-spacing: .02em; color: var(--text3);
}
.blog-meta-topic {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.blog-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #8a5a00; background: #FFF1D6; border-radius: 4px; padding: 2px 7px;
}

/* Newest post leads, wide, when there's room */
@media (min-width: 900px) {
  .blog-card.featured { grid-column: 1 / -1; }
  .blog-card.featured .blog-card-link { flex-direction: row; }
  .blog-card.featured .blog-card-img { flex: 0 0 52%; aspect-ratio: auto; min-height: 320px; }
  .blog-card.featured .blog-card-body { padding: 44px 48px; justify-content: center; }
  .blog-card.featured h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 14px 0 14px; }
  .blog-card.featured p { font-size: 1.0625rem; }
  .blog-card.featured .blog-card-more { margin-top: 10px; }
}

/* ─── SEARCH RESULTS ────────────────────────────────────────── */
.blog-results { display: grid; gap: 16px; max-width: 820px; }
.blog-result {
  display: block; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.blog-result:hover { border-color: rgba(184,149,106,.45); box-shadow: var(--shadow); }
.blog-result h3 { font-size: 1.3rem; color: var(--navy); margin: 8px 0 8px; }
.blog-result p { font-size: .9375rem; line-height: 1.7; }
.blog-result mark { background: rgba(212,184,150,.38); color: var(--text); border-radius: 2px; padding: 0 1px; }

/* ─── POST: header ──────────────────────────────────────────── */
.post-hero h1 { max-width: 24ch; }
.post-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #EBD8BB; margin-bottom: 20px; text-shadow: 0 1px 16px rgba(0,0,0,.5);
}
.post-crumbs a { transition: color 200ms var(--ease); }
.post-crumbs a:hover { color: #fff; }
.post-crumbs span { opacity: .55; }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  font-size: .9375rem; color: rgba(255,255,255,.82); text-shadow: 0 1px 14px rgba(0,0,0,.32);
}
.post-meta span[aria-hidden] { opacity: .5; }

.draft-banner {
  background: #FFF1D6; border: 1px solid #F0D49A; color: #6b4a00;
  border-radius: var(--radius); padding: 12px 16px; font-size: .875rem; margin-bottom: 32px;
}

/* ─── POST: body ────────────────────────────────────────────── */
.post-main { padding-top: 64px; }
.post-figure { margin: 0 0 40px; }
.post-figure img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

.prose { color: var(--text2); }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose li { font-size: 1.125rem; line-height: 1.8; color: var(--text2); }
.prose h2 {
  font-size: clamp(1.6rem, 2.8vw, 2rem); color: var(--text);
  margin-top: 1.9em; margin-bottom: -.1em; line-height: 1.15;
}
.prose h3 { font-size: clamp(1.25rem, 2vw, 1.45rem); color: var(--text); margin-top: 1.6em; margin-bottom: -.2em; }
.prose h4 { font-size: 1.0625rem; color: var(--navy); margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a {
  color: var(--navy); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px;
  transition: color 200ms var(--ease);
}
.prose a:hover { color: var(--gold); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--gold); }
.prose ol li::marker { font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--gold); padding: 4px 0 4px 24px; margin-left: 0;
}
.prose blockquote p {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.45; color: var(--text); font-style: italic;
}
.prose img { border-radius: var(--radius-lg); margin: 8px auto; }
.prose hr { border: 0; height: 2px; width: 48px; background: var(--gold); margin: 2.4em auto; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
  background: var(--bg2); border-radius: 4px; padding: .1em .35em;
}
.prose .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; color: var(--text); background: var(--bg2); }
.prose tr:last-child td { border-bottom: 0; }

/* YouTube: a thumbnail until clicked, then the player */
.yt { margin: 2em 0; }
.yt-frame {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg); overflow: hidden; background: #0b1426;
  box-shadow: var(--shadow-lg);
}
.yt-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-expo), opacity 300ms; opacity: .92; }
.yt-frame:hover img { transform: scale(1.03); opacity: 1; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-icon {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(27,48,84,.88); box-shadow: 0 8px 30px rgba(0,0,0,.35);
  display: grid; place-items: center;
  transition: background 220ms var(--ease), transform 300ms var(--ease-expo);
}
.yt-icon svg { width: 28px; height: 28px; color: #fff; margin-left: 4px; }
.yt-frame:hover .yt-icon { background: var(--gold); transform: translate(-50%, -50%) scale(1.06); }
.yt figcaption { font-size: .875rem; color: var(--text3); margin-top: 12px; text-align: center; }

.post-disclosure {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: .8125rem; line-height: 1.65; color: var(--text3);
}
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.post-tags-label { font-size: .8125rem; color: var(--text3); margin-right: 4px; }

/* ─── POST: author ──────────────────────────────────────────── */
.post-author {
  display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: start;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px;
}
.post-author-photo {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 22%;
  box-shadow: var(--shadow);
}
.post-author h3 { font-size: 1.45rem; margin: 6px 0 2px; }
.post-author-role { font-size: .875rem; color: var(--text3); margin-bottom: 12px; }
.post-author p { font-size: .9875rem; }
.post-author-link {
  display: inline-flex; margin-top: 14px; font-size: .9375rem; font-weight: 600;
}

/* ─── POST: next steps ──────────────────────────────────────── */
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.next-grid.single { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.next-card { border-radius: var(--radius-lg); padding: 48px 44px; text-align: center; }
.next-card h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 12px 0 12px; }
.next-card p { margin: 0 auto; max-width: 440px; }
.next-talk {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #1B3054 0%, #243861 60%, #11203a 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.next-talk::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--topo) no-repeat 120% 30% / 80% auto; opacity: .14;
}
.next-talk .label { color: var(--gold-lt); }
.next-talk h2 { color: #fff; }
.next-talk p { color: rgba(255,255,255,.75); }
.next-talk .btn { margin-top: 28px; background: var(--white); color: var(--navy); box-shadow: none; }
.next-talk .btn:hover { background: var(--gold-lt); }
.next-guide { background: var(--bg2); border: 1px solid var(--border); }
.next-guide .lm-embed { margin-top: 24px; }

/* ─── POST: related ─────────────────────────────────────────── */
.post-related h2 { margin: 10px 0 36px; }

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-tools { margin-bottom: 32px; }
  .blog-search { max-width: none; }
  .blog-card-body { padding: 22px 22px 24px; }
  .blog-card.no-image .blog-card-body { padding: 28px 24px 26px; }
  .blog-card.featured.no-image .blog-card-body { padding: 36px 26px 34px; }
  .blog-card.featured.no-image::after { background-position: 150% 20%; background-size: 110% auto; }
  .post-main { padding-top: 44px; }
  .prose p, .prose li { font-size: 1.0625rem; }
  .post-author { grid-template-columns: 1fr; padding: 26px 22px; gap: 18px; }
  .post-author-photo { width: 80px; height: 80px; }
  .next-card { padding: 36px 22px; }
}

/* ─── READING PROGRESS (articles) ───────────────────────────── */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt));
  transform: scaleX(0); transform-origin: left center; pointer-events: none;
}
