/* ==========================================================================
   pages/insights.css — the Insights index and article pages.

   Article bodies are styled by `.hs-prose`, which lives in components.css
   because the legal pages use it too. What is here is the index and the article
   page furniture around it.

   Every value comes from tokens.css.
   ========================================================================== */

/* --- Index --------------------------------------------------------------- */
.hs-insights-head { padding-bottom: 0; }
.hs-insights-empty { color: var(--hs-text-muted); margin: 0; }

.hs-article-kicker {
  margin: 0 0 var(--hs-space-2);
  color: var(--hs-coral-ink);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Lead article — a wide editorial card, image beside the copy on desktop. */
.hs-lead-article {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-lg);
  background-color: var(--hs-surface);
  box-shadow: var(--hs-shadow-md);
  color: inherit;
  transition: transform var(--hs-transition), box-shadow var(--hs-transition);
}
.hs-lead-article:hover {
  transform: translateY(-3px);
  box-shadow: var(--hs-shadow-lg);
  color: inherit;
}
/* position: relative — the date chip over the image is absolute, and this is
   its containing block. */
.hs-lead-article__media { position: relative; background-color: var(--hs-surface-sunken); min-height: 18rem; }
.hs-lead-article__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-lead-article__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 4vw, 3rem);
}
.hs-lead-article__title {
  font-size: clamp(1.75rem, 3vw, 2.375rem);
  margin: 0 0 var(--hs-space-4);
}
.hs-lead-article__summary { margin: 0 0 var(--hs-space-6); color: var(--hs-text); }
.hs-lead-article__more {
  display: inline-flex;
  align-items: center;
  gap: var(--hs-space-2);
  color: var(--hs-primary);
  font-weight: var(--hs-weight-bold);
}
.hs-lead-article__more svg { width: 0.875rem; height: 0.875rem; }

/* Index grid. */
.hs-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hs-space-6);
}
.hs-article-summary { color: inherit; overflow: hidden; }
.hs-article-summary:hover { color: inherit; }
.hs-article-summary__media {
  display: block;
  aspect-ratio: 16 / 9;
  background-color: var(--hs-surface-sunken);
}
.hs-article-summary__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-article-summary__body {
  display: flex;
  flex-direction: column;
  gap: var(--hs-space-2);
  padding: var(--hs-space-6);
}
.hs-article-summary__title {
  font-family: var(--hs-font-display);
  font-size: var(--hs-text-xl);
  font-weight: var(--hs-weight-bold);
  line-height: var(--hs-leading-snug);
  color: var(--hs-text-strong);
}
.hs-article-summary__excerpt { font-size: var(--hs-text-sm); color: var(--hs-text-muted); }

/* --- Article page -------------------------------------------------------- */
.hs-article__header { padding-block: var(--hs-section-y-tight) var(--hs-space-8); }
.hs-article__back {
  display: inline-flex;
  align-items: center;
  gap: var(--hs-space-2);
  margin-bottom: var(--hs-space-6);
  color: var(--hs-text-muted);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-semibold);
}
.hs-article__back:hover { color: var(--hs-primary); }
/* One arrow icon, flipped, rather than a second SVG in the sprite. */
.hs-icon--back { width: 0.875rem; height: 0.875rem; transform: rotate(180deg); }

.hs-article__title { margin-bottom: var(--hs-space-5); }
.hs-article__summary {
  font-family: var(--hs-font-display);
  font-size: var(--hs-text-xl);
  font-weight: var(--hs-weight-medium);
  line-height: 1.55;
  color: var(--hs-navy-soft);
  margin-bottom: var(--hs-space-6);
}
.hs-article__byline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-4);
  margin: 0;
  padding-top: var(--hs-space-5);
  border-top: 1px solid var(--hs-border);
  font-size: var(--hs-text-sm);
  color: var(--hs-text-muted);
}
.hs-article__byline span:first-child { color: var(--hs-text-strong); font-weight: var(--hs-weight-bold); }
/* On the page banner (components.css): the author stays the strongest ink, in white. */
.hs-page-banner .hs-article__byline span:first-child { color: var(--hs-text-on-dark-strong); }
.hs-page-banner .hs-article__byline { border-color: var(--hs-border-on-dark); }
.hs-page-banner .hs-article__back:hover { color: var(--hs-teal); }
/* The index banner needs room under its lead; --tight is right for an untinted strip, not a banner. */
.hs-insights-head.hs-page-banner { padding-block: var(--hs-section-y-tight); }

.hs-article__figure { margin: 0 0 var(--hs-space-10); }
.hs-article__figure img { width: 100%; border-radius: var(--hs-radius-md); display: block; }

.hs-article__tags { margin-top: var(--hs-space-12); padding-top: var(--hs-space-6); border-top: 1px solid var(--hs-border); }
.hs-article__tags-heading {
  font-size: var(--hs-text-xs);
  font-weight: var(--hs-weight-bold);
  letter-spacing: var(--hs-tracking-wide);
  text-transform: uppercase;
  color: var(--hs-text-muted);
  margin-bottom: var(--hs-space-3);
}
.hs-tag-list { display: flex; flex-wrap: wrap; gap: var(--hs-space-2); list-style: none; margin: 0; padding: 0; }
.hs-tag {
  padding: var(--hs-space-1) var(--hs-space-4);
  border-radius: var(--hs-radius-pill);
  background-color: var(--hs-surface-muted);
  font-size: var(--hs-text-sm);
  color: var(--hs-text);
}
.hs-article__foot { margin-block: var(--hs-space-10) var(--hs-section-y); }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hs-article-grid { grid-template-columns: repeat(2, 1fr); }
  .hs-lead-article { grid-template-columns: 1fr; }
  .hs-lead-article__media { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 767.98px) {
  .hs-article-grid { grid-template-columns: 1fr; }
  .hs-article__byline { gap: var(--hs-space-3); }
}

/* --- Filters -------------------------------------------------------------
   Chips that print their own counts. These tags are topical labels rather than
   a taxonomy — the largest covers more than half the archive — so the count is
   not decoration: it is the chip telling the reader what it will do.
   ------------------------------------------------------------------------- */
.hs-insights-filters {
  padding-block: var(--hs-space-6);
  background-color: var(--hs-surface-muted);
  border-bottom: 1px solid var(--hs-border-subtle);
}

.hs-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hs-space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.hs-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--hs-space-2);
  /* Comfortably past the 24px minimum target at every text size. */
  min-height: 2.25rem;
  padding: var(--hs-space-2) var(--hs-space-4);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-pill);
  background-color: var(--hs-surface);
  color: var(--hs-text-strong);
  font-size: var(--hs-text-sm);
  font-weight: var(--hs-weight-semibold);
  transition: border-color var(--hs-transition), background-color var(--hs-transition),
              color var(--hs-transition);
}
.hs-filter:hover { border-color: var(--hs-primary); color: var(--hs-primary); }

/* The active filter is marked by fill *and* by aria-current, never by colour
   alone — the state has to survive greyscale and a screen reader. */
.hs-filter--active {
  background-color: var(--hs-primary);
  border-color: var(--hs-primary);
  color: var(--hs-text-on-dark-strong);
}
.hs-filter--active:hover { background-color: var(--hs-primary-hover); color: var(--hs-text-on-dark-strong); }

.hs-filter__count {
  font-variant-numeric: tabular-nums;
  font-weight: var(--hs-weight-normal);
  color: var(--hs-text-muted);
}
.hs-filter--active .hs-filter__count { color: rgba(255, 255, 255, 0.75); }

/* --- Pagination ----------------------------------------------------------
   Previous / position / next, not a strip of page numbers: six pages of numbers
   is a row of near-identical small targets on a phone, and "page 2 of 6"
   answers the question the numbers exist to answer.
   ------------------------------------------------------------------------- */
.hs-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--hs-space-4);
  margin-top: var(--hs-space-12);
  padding-top: var(--hs-space-8);
  border-top: 1px solid var(--hs-border);
}
.hs-pagination__link {
  display: inline-flex;
  align-items: center;
  gap: var(--hs-space-2);
  min-height: 2.75rem;
  padding: var(--hs-space-2) var(--hs-space-5);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-pill);
  color: var(--hs-text-strong);
  font-weight: var(--hs-weight-semibold);
}
.hs-pagination__link:hover { border-color: var(--hs-primary); color: var(--hs-primary); }

/* Rendered as a <span>, never a disabled-looking link: there is no destination,
   so there is no anchor. Same rule the platform cards follow. */
.hs-pagination__link--disabled {
  color: var(--hs-text-muted);
  border-color: var(--hs-border-subtle);
  cursor: default;
}
.hs-pagination__status {
  margin: 0;
  font-size: var(--hs-text-sm);
  color: var(--hs-text-muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
  /* Prev and next either side, position beneath — at 320px all three on one
     row squeezes the controls below a comfortable target. */
  .hs-pagination { justify-content: center; }
  .hs-pagination__status { order: 3; width: 100%; text-align: center; }
  .hs-pagination__link { flex: 1 1 auto; justify-content: center; }
}
