/* ==========================================================================
   Article (single post)
   Shared pieces (breadcrumb on the photo, prose, drop cap, share, tags) live in
   content-shared.css; photo hero, callout, avatar, section head and arrow link are
   canonical components.
   Index: hero · layout · content blocks · tip · steps · pull quote
          · sidebar cards · related articles
   ========================================================================== */

/* ---- Hero ---------------------------------------------------------------- */
.article-hero { --photo-hero-focus: 50% 36%; }
.article-hero__meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  min-height: 1.5rem;
  padding: .25rem var(--sp-2);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.45;
  color: var(--on-dark-95);
  background: var(--line-on-dark);
  border-radius: var(--r-full);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.hero-pill .icon { font-size: .8125rem; }
.hero-pill--strong {
  color: var(--text-on-dark);
  background: color-mix(in srgb, var(--surface) 20%, transparent);
}
.hero-pill--amber {
  padding-inline: var(--sp-4);
  color: var(--navy);
  background: var(--amber);
  box-shadow: var(--sh-xs);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.article-hero__author {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-block-start: var(--sp-1);
}
.article-hero__avatar { position: relative; flex: none; }
.article-hero__verified {
  position: absolute;
  inset-block-end: -.125rem;
  inset-inline-end: -.125rem;
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  font-size: var(--fs-10);
  color: var(--navy);
  background: var(--amber);
  border-radius: 50%;
}
.article-hero__author-text { display: flex; flex-direction: column; }
.article-hero__author-name { font-size: var(--fs-18); font-weight: 700; line-height: 1.55; }
.article-hero__author-org {
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.45;
  color: var(--amber);
}

/* ---- Layout: content + sidebar ------------------------------------------- */
/* overflow-x: clip keeps the sidebar that slides in from the side inside the page width
   (clip, unlike hidden, does not break the sticky sidebar) */
.article { overflow-x: clip; }
.article__layout { display: grid; gap: var(--sp-6); padding-block: var(--sp-8); }
.article__content, .article__aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  min-width: 0;
}

/* ---- Content blocks (each part of the article is a quiet card) ----------- */
.article-block {
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line-rose);
  border-radius: var(--r-12);
  box-shadow: var(--sh-xs);
}
.article-block--amber { --bar: var(--amber); }

/* ---- Tip callout (canonical .callout--icon) ---------------------------- */
.article-block .callout__icon { margin-block-start: .3125rem; }
.article-tip__body { display: flex; flex-direction: column; gap: var(--sp-1); }

/* ---- Numbered steps -------------------------------------------------------- */
.steps { display: grid; gap: var(--sp-2); padding-block-start: var(--sp-1); }
.step {
  --step: var(--burgundy);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4);
  background: var(--sand-strong);
  border-block-start: 2px solid var(--step);
  border-radius: var(--r-8);
  box-shadow: var(--sh-xs);
}
.step--amber { --step: var(--amber); }
.step--navy { --step: var(--navy-soft); }
.step__num {
  align-self: flex-start;
  font-size: var(--fs-44);
  font-weight: 800;
  line-height: 1.36;
  color: var(--step);
}
.step__title {
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.55;
  color: var(--navy);
}
.step__text { font-size: var(--fs-14); line-height: 1.7; color: var(--text); }

/* ---- Pull quote ------------------------------------------------------------ */
.pull-quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  color: var(--text-on-dark);
  background: linear-gradient(135deg, var(--navy), color-mix(in srgb, var(--navy) 82%, var(--navy-soft)));
  border-inline-start: 4px solid var(--amber);
  border-radius: var(--r-12);
  box-shadow: var(--sh-sm);
}
.pull-quote__mark { font-size: 1.5rem; color: var(--amber); }
.pull-quote__text {
  font-size: clamp(1.25rem, 1rem + 1.1vw, var(--fs-26));
  font-weight: 500;
  line-height: 1.77;
  text-wrap: balance;
}
.pull-quote__text::after {
  content: "";
  display: block;
  width: var(--sp-16);
  height: var(--sp-1);
  margin: var(--sp-2) auto 0;
  border-radius: var(--r-full);
  background: var(--amber);
}
.pull-quote__source {
  font-size: var(--fs-12);
  line-height: 1.5;
  color: color-mix(in srgb, var(--surface) 80%, transparent);
}

/* ---- Sidebar cards --------------------------------------------------------- */
.side-card { display: flex; flex-direction: column; gap: var(--sp-4); }
.side-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.side-card__title {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.55;
  color: var(--navy);
}
.side-card__title .icon { font-size: 1.125rem; color: var(--burgundy); }
.side-card__title--bar::before {
  content: "";
  flex: none;
  width: .375rem;
  height: 1.25rem;
  border-radius: var(--r-full);
  background: var(--amber);
}
.side-card__note { font-size: var(--fs-11); line-height: 1.45; color: var(--text); }
.side-card__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: var(--sp-3);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: var(--navy);
  background: var(--sand-strong);
  border-radius: var(--r-8);
  box-shadow: var(--sh-xs);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
@media (hover: hover) {
  .side-card__link:hover { color: var(--text-on-dark); background: var(--navy); }
}
.share__item { flex: 1; display: flex; }

.author-card { display: flex; align-items: center; gap: var(--sp-4); }
.author-card__photo {
  flex: none;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 60%, transparent), var(--sh-xs);
}
.author-card__text {
  display: flex;
  flex-direction: column;
  gap: .125rem;
  min-width: 0;
}
.author-card__name {
  font-size: var(--fs-20);
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}
.author-card__org {
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.45;
  color: var(--burgundy);
}
.author-card__bio {
  --callout-bar: 2px;
  font-size: var(--fs-14);
  line-height: 1.65;
  color: var(--text);
}

/* ---- Related articles ------------------------------------------------------ */
.related {
  padding-block: var(--sp-10);
  background: var(--sand-strong);
  border-block-start: 1px solid var(--line-rose);
}
.related__head { margin-block-end: var(--sp-6); }
.related__badge { padding: .125rem var(--sp-2); font-size: var(--fs-11); color: var(--navy); }
.related__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  font-weight: 700;
  line-height: 1.44;
  letter-spacing: -.025em;
  color: var(--navy);
}
.related__title::before {
  content: "";
  flex: none;
  width: .625rem;
  height: 1em;
  border-radius: var(--r-full);
  background: var(--burgundy);
}
.related__lead { font-size: var(--fs-14); line-height: 1.7; color: var(--text); }
.related__all {
  --btn-bg: var(--surface);
  --btn-fg: var(--navy);
  --btn-bd: var(--line-rose);
  font-size: var(--fs-18);
  font-weight: 400;
  box-shadow: var(--sh-xs);
}
.related__all .icon { font-size: .75rem; }

.related__grid { display: grid; gap: var(--sp-6); }
.related__grid > li { display: flex; }
.related-card { flex: 1; border-radius: var(--r-12); }
.related-card__media { aspect-ratio: 393 / 192; }
.related-card__tag {
  position: absolute;
  inset-block-start: var(--sp-3);
  inset-inline-start: var(--sp-3);
  padding-inline: var(--sp-2);
  font-size: var(--fs-11);
  color: var(--burgundy);
  border: 1px solid var(--line-rose);
}
.related-card__body { --card-pad: var(--sp-6); gap: var(--sp-1); }
.related-card__time {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}
.related-card__time .icon { font-size: .8125rem; color: var(--amber); }
.related-card__title {
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
  text-wrap: pretty;
}
.related-card .card__text { padding-block-end: var(--sp-4); }
.related-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-block-start: auto;
  padding-block-start: var(--sp-3);
  border-block-start: 1px solid var(--line-rose);
}
.related-card__author {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-11);
  line-height: 1.45;
  color: var(--text);
}
.related-card__avatar {
  color: var(--burgundy);
  background: var(--sand-strong);
  box-shadow: 0 0 0 1px var(--line-rose);
}
.related-card .link-arrow .icon { font-size: .5rem; }

/* ---- ≥ 640px ---------------------------------------------------------------- */
@media (min-width: 40rem) {
  .article-block { padding: var(--sp-6); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pull-quote { padding: var(--sp-10) var(--sp-16); }
  .related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* two columns: the odd card fills the last row */
  .related__grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- ≥ 1024px: sticky sidebar beside the text (808 : 384 in the design) --- */
@media (min-width: 64rem) {
  .article__layout {
    grid-template-columns: minmax(0, 808fr) minmax(0, 384fr);
    gap: var(--sp-10);
    align-items: start;
    padding-block: var(--sp-10);
  }
  .article__aside { position: sticky; inset-block-start: calc(var(--header-h) + var(--sp-6)); }
  .related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related__grid > li:last-child:nth-child(odd) { grid-column: auto; }
}

/* ---- Motion ---------------------------------------------------------------------
   Prose blocks rise one after another, the three step cards fall in sequence with
   alternating tilts, the pull quote grows into place, the related cards fall. */
.step:nth-child(odd), .related__grid > li:nth-child(odd) { --drop-tilt: -2.5deg; }
.step:nth-child(even), .related__grid > li:nth-child(even) { --drop-tilt: 2.5deg; }
@media (prefers-reduced-motion: no-preference) {
  /* NEEDS-SHARED: .photo-hero__inner uses .5s / .06s in components.css; slower here until it moves to the tokens */
  .article-hero .photo-hero__inner > * { animation-duration: var(--t-slow); }
  .article-hero .photo-hero__inner > :nth-child(2) { animation-delay: 120ms; }
  .article-hero .photo-hero__inner > :nth-child(3) { animation-delay: 240ms; }
  .article-hero .photo-hero__inner > :nth-child(4) { animation-delay: 360ms; }
}

/* English (LTR): the small forward chevron is drawn for RTL (components.css only flips the arrow). */
[dir="ltr"] .icon:has(> use[href="#i-chevron-left"]) { scale: -1 1; }

/* English (LTR): the drop cap is a single Latin letter, so it sits closer to the rest of the word.
   PROMOTE → content-shared.css (.dropcap) if more English pages use it. */
[dir="ltr"] .dropcap { margin-inline-end: 1px; }
