/* ==========================================================================
   Content family — shared by: articles · article · article-editor · news
                               · author (story detail) · success-stories
   Index: listing hero · search bar · tags & pills · byline · empty state
          · family track · photo hero on phones · prose · share
   Breadcrumb, pager, filter chips, segmented control, callout, avatar, arrow link
   and the photo hero itself are canonical components (components.css).
   ========================================================================== */

/* ---- Listing hero (centred title + lead + controls on a warm ground) ---- */
.listing-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2.5rem, 1.75rem + 3vw, 4rem);
  text-align: center;
  background: var(--tint-warm);
  border-block-end: 1px solid var(--line);
}
/* two soft ambient glows */
.listing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle 16rem at 72% 28%, color-mix(in srgb, var(--amber) 12%, transparent), transparent),
    radial-gradient(circle 14rem at 36% 78%, color-mix(in srgb, var(--navy) 5%, transparent), transparent);
}
.listing-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.listing-hero__title {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.03em;
  color: var(--navy);
  text-wrap: balance;
}
.listing-hero__lead {
  max-width: 42rem;
  padding-block-end: var(--sp-4);
  font-size: var(--fs-18);
  line-height: 1.55;
  color: var(--text);
  text-wrap: balance;
}
.listing-hero__filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  max-width: 56rem;
  padding-block-start: var(--sp-4);
}
.listing-hero__count {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: var(--fs-12);
  line-height: 1.35;
  color: var(--text-muted);
}
.listing-hero__count .icon { font-size: .8125rem; color: var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  .listing-hero__inner > * { animation: rise-in var(--t-slow) var(--ease) both; }
  .listing-hero__inner > :nth-child(2) { animation-delay: 120ms; }
  .listing-hero__inner > :nth-child(3) { animation-delay: 240ms; }
  .listing-hero__inner > :nth-child(4) { animation-delay: 360ms; }
  .listing-hero__inner > :nth-child(n + 5) { animation-delay: 480ms; }
}

/* ---- Search bar (input + submit in one white field) ---------------------- */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  max-width: 42rem;
  padding: .375rem;
  padding-inline-start: 2.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-16);
  box-shadow: var(--sh-float);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-bar:focus-within {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px var(--burgundy-soft), var(--sh-float);
}
.search-bar__icon {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 1.125rem;
  translate: 0 -50%;
  font-size: 1.125rem;
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar__input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0;
  font-size: var(--fs-16);
  color: var(--ink);
  background: none;
  border: 0;
  appearance: none;
}
.search-bar__input::placeholder { color: var(--text-muted); opacity: 1; }
.search-bar__input:focus-visible { box-shadow: none; }
.search-bar__input::-webkit-search-cancel-button { appearance: none; }
.search-bar__submit { box-shadow: var(--sh-xs); }
.search-bar__submit .icon { font-size: .6875rem; }

/* ---- Tags over photos, small pills -------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  min-height: 1.5rem;
  padding: .25rem var(--sp-3);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-on-dark);
  white-space: nowrap;
  background: var(--navy);
  border-radius: var(--r-full);
  box-shadow: var(--sh-xs);
}
.tag .icon { font-size: .75rem; }
.tag--blog { background: var(--burgundy); }
.tag--forum { background: var(--navy); }
.tag--glass {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.tag--sm { min-height: 1.25rem; padding: .125rem .625rem; box-shadow: none; }
.tag--xs {
  min-height: 1.3125rem;
  padding: .125rem .625rem;
  font-size: var(--fs-11);
  box-shadow: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: .125rem var(--sp-2);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.35;
  border-radius: var(--r-full);
}
.pill .icon { font-size: .8125rem; }
.pill--cool { color: var(--navy); background: color-mix(in srgb, var(--sky) 30%, transparent); }

/* ---- Byline (avatar + name; the avatar is the canonical .avatar) --------- */
.byline {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.byline__text { display: flex; flex-direction: column; min-width: 0; }
.byline__name {
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}
.byline__role { font-size: var(--fs-12); line-height: 1.35; color: var(--text-muted); }
.byline--sm { gap: .625rem; }
.byline--sm .avatar { --avatar-size: 2rem; font-size: var(--fs-12); }
.byline--sm .byline__name { font-size: var(--fs-12); }

/* ---- Empty state of a filtered list -------------------------------------- */
.listing-empty {
  padding: var(--sp-8) var(--sp-4);
  font-size: var(--fs-14);
  font-weight: 600;
  text-align: center;
  color: var(--text);
  background: var(--surface);
  border: 1px dashed var(--line-rose-strong);
  border-radius: var(--r-16);
}

/* ---- Family track: the design's 1232px content column -------------------- */
.content-track { --container: var(--container-77); }

/* ---- Photo hero on phones (article, author) -------------------------------
   The trail loses its first level and its last item is cut with an ellipsis, and the
   scrim stays dark high enough that every text row sits on the dark area. */
@media (max-width: 39.9375rem) {
  .photo-hero {
    --photo-hero-scrim: linear-gradient(
      to top,
      color-mix(in srgb, var(--navy) 96%, transparent),
      color-mix(in srgb, var(--navy) 82%, transparent) 45%,
      color-mix(in srgb, var(--navy) 62%, transparent) 80%,
      color-mix(in srgb, var(--navy) 40%, transparent)
    );
  }
  .photo-hero .crumbs__item:first-child:not(:last-child) { display: none; }
  .photo-hero .crumbs__item:nth-child(2)::before { display: none; }
  .photo-hero .crumbs__item { min-width: 0; max-width: 100%; }
  .photo-hero .crumbs__current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---- Prose (long-form text) ---------------------------------------------- */
.prose {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  font-size: var(--fs-16);
  line-height: var(--prose-lh, 1.625);
  color: var(--ink);
}
.prose p { text-wrap: pretty; }
.prose__heading {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.025em;
  color: var(--navy);
  text-wrap: balance;
}
/* heading with a short coloured bar at its start */
.prose__heading--bar { display: flex; align-items: baseline; gap: var(--sp-2); }
.prose__heading--bar::before {
  content: "";
  flex: none;
  align-self: center;
  width: var(--sp-2);
  height: 1em;
  border-radius: var(--r-full);
  background: var(--bar, var(--burgundy));
}
.prose__lead { line-height: 2; }
.prose__lead::after { content: ""; display: block; clear: both; }
/* drop cap: a span, because ::first-letter breaks Arabic letter joining */
.dropcap {
  float: right;
  float: inline-start;
  margin-inline-end: var(--sp-2);
  font-size: var(--fs-44);
  font-weight: 700;
  line-height: 1.25;
  color: var(--burgundy);
}

/* ---- Share buttons -------------------------------------------------------- */
.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
}
.share__btn {
  flex: 1;
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--navy);
  background: var(--share-bg, var(--sand-strong));
  border-radius: var(--r-8);
  transition:
    background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    scale .12s var(--ease);
}
.share__btn .icon { font-size: 1.0625rem; }
.share__btn:active { scale: .96; }
@media (hover: hover) {
  .share__btn:hover { color: var(--text-on-dark); background: var(--navy); }
}
.share__btn.is-copied { color: var(--text-on-dark); background: var(--green); }
.share__btn--round { flex: none; border-radius: 50%; }
.share__status {
  flex-basis: 100%;
  min-height: 1.125rem;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text);
}
.share__status:empty { display: none; }
