/**
 * Blog post – page-scoped only.
 *
 * The reading experience is the design: the kit's 68ch `.prose` measure, real
 * air before every section head, and a sidebar that supports the article
 * instead of selling against it.
 *
 * THIS PAGE CARRIES NO RED. The kit paints the accordion's "+" marker with
 * `--red`, which is correct everywhere except here, so §4 below repaints it
 * blue. That override is exactly what a per-template stylesheet is for.
 * pages.css is not edited. AGENTS.md §2.
 *
 * One token gap, same as blog.css: the 44px tap target has no token, so the
 * share discs, the contents links and the back link take `--btn-min-height`
 * (48px). Larger, so still clear of the accessibility floor. A `--tap-min`
 * token in tokens.css would close it.
 *
 * NOT BUILT: the mock-up's reading-progress hairline. It is decorative, it
 * needs a scroll listener, and this template ships without a JS file of its
 * own, so it is skipped rather than half-done. Nothing below references it.
 */

/* ---------------------------------------------------------------------------
 * 1. ARTICLE HEAD  – on the blue gradient
 * ------------------------------------------------------------------------- */
.page-hero .blog-post__title { max-inline-size: 26ch; }

.blog-post__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--on-dark-muted);
}
.blog-post__byline b {
  color: var(--white);
  font-weight: 700;
}
.blog-post__byline li {
  display: inline-flex;
  align-items: center;
}
.blog-post__byline li + li::before {
  content: "·";
  margin-inline: 0.7em;
  color: var(--on-dark-faint);
}
.blog-post__byline time { white-space: nowrap; }

/* ---------------------------------------------------------------------------
 * 2. HERO FIGURE  – lifts into the gradient, wider than the prose measure
 * ------------------------------------------------------------------------- */
.blog-post__figure {
  position: relative;
  z-index: 2;
  margin-block-start: calc(var(--s-6) * -1);
  margin-block-end: var(--s-5);
}
.blog-post__figure img {
  inline-size: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lift);
}
.blog-post__figure figcaption {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  margin-block-start: var(--s-2);
}

/* ---------------------------------------------------------------------------
 * 3. LONG-FORM RHYTHM
 *
 * The scroll offset matches the sticky header, so a contents link lands with
 * the heading visible rather than tucked behind the chrome.
 * ------------------------------------------------------------------------- */
.blog-post__article .prose h2 { margin-block-start: var(--s-7); }
.blog-post__article .prose h2[id] { scroll-margin-block-start: var(--sticky-offset); }

/* ---------------------------------------------------------------------------
 * 4. THE NO-RED RULE, APPLIED TO THE SHARED ACCORDION
 * ------------------------------------------------------------------------- */
.blog-post__article .acc summary::after { color: var(--blue); }

/* ---------------------------------------------------------------------------
 * 5. ARTICLE FOOT  – review note, share row, author
 * ------------------------------------------------------------------------- */
.prose .blog-post__reviewed {
  margin-block-start: var(--s-6);
  background: var(--cloud);
  border: var(--border-hairline) solid var(--line);
  border-radius: var(--r-m);
  padding: var(--s-3) var(--s-4);
  font-size: var(--text-s);
  color: var(--ink-faint);
}

.prose .blog-post__share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-1);
  margin-block-start: var(--s-5);
}
.blog-post__share-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-inline-end: var(--s-2);
}
/* Outguns `.prose a:not(.btn):not(.link-cta)`, which would otherwise give each
   share disc a blue underline across its bottom edge. */
.prose .blog-post__share a:not(.btn):not(.link-cta),
.prose .blog-post__share button {
  inline-size: var(--btn-min-height);
  block-size: var(--btn-min-height);
  border-radius: 50%;
  border: var(--border-hairline) solid var(--line);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  transition:
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out-soft);
}
.prose .blog-post__share a:not(.btn):not(.link-cta):hover,
.prose .blog-post__share button:hover {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(-0.12em);
}
.blog-post__share svg {
  inline-size: 1.1em;
  block-size: 1.1em;
}
/* The copy control ships hidden and is unhidden by script. Without this the
   rule above would out-specify the UA's `[hidden]` and show a dead button to
   anyone with JavaScript off, which is the exact failure it exists to avoid. */
.prose .blog-post__share button[hidden] { display: none; }

.prose .blog-post__author {
  margin-block-start: var(--s-5);
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  background: var(--paper);
  border: var(--border-hairline) solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s-4) var(--s-5);
}
.blog-post__author-badge {
  inline-size: var(--s-6);
  block-size: var(--s-6);
  flex: none;
  border-radius: 50%;
  background: var(--blue-tint-05);
  color: var(--blue);
  display: grid;
  place-items: center;
}
.blog-post__author-badge svg {
  inline-size: var(--s-4);
  block-size: var(--s-4);
}
.blog-post__author b {
  display: block;
  font-family: var(--display);
  font-size: var(--text-base);
  color: var(--navy);
  margin-block-end: 0.25em;
}
.blog-post__author p {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------
 * 6. BACK TO THE ARCHIVE
 * ------------------------------------------------------------------------- */
.blog-post__back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-block-size: var(--btn-min-height);
  font-weight: 700;
  font-size: var(--text-s);
  color: var(--blue);
  transition: color var(--dur-fast) ease;
}
.blog-post__back svg {
  inline-size: var(--s-3);
  block-size: var(--s-3);
  flex: none;
  transition: transform var(--dur-fast) var(--ease-out-soft);
}
.blog-post__back:hover { color: var(--blue-deep); }
.blog-post__back:hover svg { transform: translateX(-0.25em); }
[dir="rtl"] .blog-post__back svg { transform: scaleX(-1); }

/* ---------------------------------------------------------------------------
 * 7. SIDEBAR  – quiet by design. It supports the article, it does not sell.
 * ------------------------------------------------------------------------- */
.blog-post__side-card > h2 {
  font-family: var(--body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.blog-post__toc {
  display: flex;
  flex-direction: column;
}
.blog-post__toc a {
  display: flex;
  align-items: center;
  min-block-size: var(--btn-min-height);
  padding-block: var(--s-1);
  padding-inline-start: var(--s-2);
  border-inline-start: calc(var(--border-hairline) * 2) solid var(--line-soft);
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
  transition:
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}
.blog-post__toc a:hover {
  color: var(--blue);
  border-inline-start-color: var(--blue);
}

.blog-post__rel {
  display: flex;
  flex-direction: column;
}
.blog-post__rel a {
  display: block;
  padding-block: var(--s-2);
}
.blog-post__rel a + a {
  border-block-start: var(--border-hairline) solid var(--line-soft);
}
.blog-post__rel-cat {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.blog-post__rel b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--text-s);
  line-height: 1.4;
  color: var(--navy);
  margin-block: 0.35em 0.4em;
  transition: color var(--dur-fast) ease;
}
.blog-post__rel a:hover b { color: var(--blue); }
.blog-post__rel-meta {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-faint);
}

/* One understated call to action. Blue link, no button, no red. */
.blog-post__cta {
  background: var(--blue-tint-05);
  border-color: var(--blue-tint-20);
}
.blog-post__cta b {
  display: block;
  font-family: var(--display);
  font-size: var(--text-base);
  color: var(--navy);
}
.blog-post__cta p {
  font-size: var(--text-s);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------
 * 8. PRINT
 *
 * The kit already drops the chrome and the closing band. What is left to drop
 * is anything that is an on-screen action: the share row and the sidebar call
 * to action. The contents list stays, because on paper it reads as a summary.
 * ------------------------------------------------------------------------- */
@media print {
  .blog-post__share,
  .blog-post__cta {
    display: none !important;
  }
  .blog-post__figure { margin-block-start: 0; }
  .blog-post__figure img { box-shadow: none; }
}
