/* ════════════════════════════════════════════════════════════════════════════
   ARTICLE / MATCH REPORT PAGE
   Article layout, sidebar cards, timeline, roster, images, highlights.
   ════════════════════════════════════════════════════════════════════════════ */

h2.wp-block-heading {
  font-size: 1.3rem !important;
  margin-bottom: 0.75em !important;
}

/* ── Article layout ── */
.content {
  max-width: 1200px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow: visible;
  align-items: stretch;
}

/* ── Mobile tab bar ── */
.article-mobile-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.article-mobile-tabs::-webkit-scrollbar {
  display: none;
}

.article-mobile-tab {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 99px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
  white-space: nowrap;
}

.article-mobile-tab:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.article-mobile-tab--desktop-combined {
  display: none;
}

/* ── Left column - article main ── */
.article-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--card);
  border-radius: var(--r);
  overflow-y: auto;
  min-height: 0;
  border: 1.5px solid var(--border);
}

/* Hero image */
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: var(--navy);
  flex-shrink: 0;
  border-radius: var(--r) var(--r) 0 0;
}

.article-hero--no-image {
  background: linear-gradient(140deg, #0c1c38 0%, #1a2e58 50%, #070e20 100%);
}

.article-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  pointer-events: none;
}

.article-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.article-hero__label {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
}

/* Info bar */
.article-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.article-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  line-height: 1;
}

.article-tag--match {
  background: rgba(15, 30, 60, 0.1);
  color: var(--navy);
}

.article-tag--squad {
  background: var(--green-dim);
  color: var(--green);
}

.article-info__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.article-info__item {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-info__item svg {
  width: 12px;
  height: 12px;
  fill: var(--ink-dim);
  flex-shrink: 0;
}

/* Article text body */
.article-body {
  padding: 28px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.article-reader-meta {
  margin: -8px 0 8px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-dim);
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.article-lead {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink-soft);
}

.article-text {
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.78;
  color: var(--ink-soft);
}

.article-text + .article-text {
  margin-top: -8px;
}

.article-subheading {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 4px;
}

.article-quote {
  border-left: 3px solid var(--navy);
  padding: 14px 20px;
  background: var(--ink-faint);
  border-radius: 0 10px 10px 0;
}

.article-quote p {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
}

.article-quote cite {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  font-style: normal;
  color: var(--ink-dim);
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-dim);
  padding: 12px 0;
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
}

.article-breadcrumb a {
  color: var(--ink-dim);
  transition: color 0.15s;
}

.article-breadcrumb a:hover {
  color: var(--ink);
}

.article-breadcrumb svg {
  width: 10px;
  height: 10px;
  margin-top: 2px;
  stroke: var(--ink-dim);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Right column - sidebar ── */
.article-side {
  position: static;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
  overflow-y: auto;
}

/* Player-of-the-signing sidebar: keep it in view while the (often much
   longer) article text scrolls past, instead of scrolling away with it.
   Desktop-only — on mobile the sidebar is its own full-width tab pane.
   align-self: start overrides the grid's align-items: stretch — without
   it this box is stretched to match .article-main's full height, leaving
   zero slack for sticky to actually reposition it within. overflow-y is
   reset to visible here because align-self: start shrinks this box down
   to its own content height, and the carousel's slides are positioned
   outside normal flow (for the cross-fade effect) — with overflow: auto
   still set, that shrunk box would clip them instead of just sizing to
   nothing. */
@media (min-width: 901px) {
  .article-side:has(.player-card-carousel),
  .article-side:has(.player-card) {
    position: sticky;
    top: var(--nav-h);
    align-self: start;
    overflow-y: visible;
  }
}

.article-main::-webkit-scrollbar,
.article-side::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.article-main,
.article-side {
  scrollbar-width: none;
  overscroll-behavior-y: auto;
}

/* ── Score card ── */
.score-card {
  background: var(--navy);
  border-radius: var(--r);
  overflow: hidden;
  color: var(--card);
  flex-shrink: 0;
}

.score-card__header {
  padding: 14px 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-card__eyebrow {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f0b429;
}

.score-card__divider {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.score-card__date {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}

.score-card__main {
  padding: 18px 20px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.score-card__team {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.score-card__team--home {
  align-items: flex-start;
}

.score-card__team--away {
  align-items: flex-end;
  text-align: right;
}

.score-card__badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.6);
}

.score-card__badge--home {
  background: rgba(240, 180, 41, 0.15);
  color: #f0b429;
}

.score-card__team-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.score-card__team-sub {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
}

.score-card__score {
  text-align: center;
}

.score-card__numbers {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-white);
}

.score-card__numbers span {
  color: #f0b429;
}

.score-card__result {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
}

.score-card__footer {
  padding: 10px 20px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.score-card__footer svg {
  width: 11px;
  height: 11px;
  stroke: rgba(255, 255, 255, 0.3);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.score-card__venue {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
}

/* ── Player card carousel ── */
.player-card-carousel {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.pcc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  padding-inline: 14px;
  border-bottom: 1.5px solid var(--border);
}

.pcc-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.pcc-pill {
  height: 3px;
  border-radius: 99px;
  width: 18px;
  background: var(--ink-dim);
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  padding: 0;
  appearance: none;
  transition:
    width 0.25s,
    background 0.25s;
}

.pcc-pill.is-active {
  width: 36px;
  background: var(--ink);
}

.pcc-pill:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.pcc-arrow {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}

.pcc-arrow:hover {
  color: var(--ink);
  background: var(--ink-faint);
}

.pcc-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.pcc-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stack all slides in the same grid cell */
.pcc-slides {
  display: grid;
}

.pcc-slide {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
}

.pcc-slide.is-active,
.pcc-slide.is-leaving {
  opacity: 1;
}

.pcc-slide.is-active {
  pointer-events: auto;
}

/* Animations are driven by the Web Animations API in JS — no CSS keyframes needed */

/* ── Player card ── */
.player-card {
  background: var(--card);
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  overflow: hidden;
  color: var(--card);
  flex-shrink: 0;
}

/* Hero section — mirrors the player page hero at sidebar scale */
.player-card__hero {
  position: relative;
  height: 300px;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.player-card__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../../img/img-static/bg-noise.webp');
  background-size: 160px;
  mix-blend-mode: screen;
  z-index: 12;
  pointer-events: none;
  opacity: 0.5;
}

/* Arena background image — loaded via JS, matches player page */
.player-card__hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  background-image: url('../../img/img-static/bg-player.webp');
  opacity: 0.4;
}

/* Gold/navy color overlay matching player page mix-blend-mode treatment */
.player-card__hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    #f0b429 0%,
    #f0b429 30%,
    var(--navy) 30%,
    var(--navy) 70%,
    #f0b429 70%,
    #f0b429 100%
  );
  mix-blend-mode: color;
}

.player-card img {
  width: 100%;
  top: 0px;
}

/* Player photo — positioned right, overflows upward like the full hero */
.player-card__photo {
  position: absolute;
  right: 0px;
  bottom: 0px;
  height: 125%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: drop-shadow(-6px 0 16px var(--navy));
  z-index: 2;
}

/* Bottom gradient — fade navy over the photo */
.player-card__hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--navy) 0%,
    rgba(15, 30, 60, 0.75) 40%,
    transparent 70%
  );
  z-index: 3;
}

/* Text content overlaid at bottom-left */
.player-card__hero-content {
  position: relative;
  z-index: 4;
  padding: 14px 16px 16px;
}

.player-card__hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.player-card__pos-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-white);
  background: var(--navy);
  padding: 3px 9px;
  border-radius: 5px;
}

.player-card__nat-badge {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255);
  background: var(--navy);
  padding: 3px 9px;
  border-radius: 5px;
}

.player-card__nat-badge.foreigner {
  color: var(--gold);
  background: rgba(240, 180, 41, 0.2);
  border: 1px solid rgba(240, 180, 41, 0.35);
}

.player-card__name-block {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.player-card__firstname {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.2;
}

.player-card__jersey {
  color: #f0b429;
  font-weight: 700;
}

.player-card__lastname {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-white);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* Facts section */
.player-card__facts {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.player-card__fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.player-card__fact-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
}

.player-card__fact-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* Career table */
.player-card__career {
  padding: 12px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.player-card__career-title {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.player-card__career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.player-card__career-table th,
.player-card__career-table td {
  padding: 3px 4px;
  text-align: right;
}

.player-card__career-table th:first-child,
.player-card__career-table td:first-child,
.player-card__career-table th:nth-child(2),
.player-card__career-table td:nth-child(2) {
  text-align: left;
}

.player-card__career-table th {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 5px;
}

.player-card__career-table td {
  color: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.player-card__career-table tbody tr:last-child td {
  border-bottom: none;
}

.player-card__career-team {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Profile link button */
.player-card__footer {
  padding: 12px 16px;
}

.player-card__profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 14px;
  background: var(--ink);
  border-radius: calc(var(--r) - 4px);
  color: var(--card);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.player-card__profile-btn:hover {
  background: var(--ink-faint);
  color: var(--ink);
}

/* ── Side card (shared) ── */
.side-card {
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

.side-card__header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.side-card__title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.side-card__header-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Timeline ── */
.timeline {
  padding: 8px 0;
}

.timeline__period {
  padding: 6px 18px 4px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.timeline__period-wrap {
  display: flex;
  align-items: center;
  margin-inline: 50px;
}

.timeline__event {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 18px;
  transition: background 0.15s;
}

.timeline__event-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline__event-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline__min {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.timeline__dot--home {
  background: var(--navy);
}

.timeline__dot--away {
  background: #aab0bc;
}

.timeline__dot--penalty {
  background: var(--gold);
}

.timeline__info {
  flex: 1;
  min-width: 0;
}

.timeline__player {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline__detail {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--ink-dim);
  flex: 1;
  min-width: 0;
}

.timeline__type {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.timeline__type--goal {
  background: rgba(15, 30, 60, 0.08);
  color: var(--navy);
}

.timeline__type--penalty {
  background: rgba(240, 180, 41, 0.15);
  color: var(--gold);
}

/* Away-team events: reverse both rows so badge sits right, time sits right */
.timeline__event--away .timeline__event-head {
  flex-direction: row-reverse;
}

.timeline__event--away .timeline__event-meta {
  flex-direction: row-reverse;
}

.timeline__event--away {
  align-items: end;
}

/* ── Roster ── */
.roster {
  padding: 12px 18px 16px;
}

.roster__teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.roster__team-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.roster__team-label--home {
  color: var(--navy);
}

.roster__player {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 0;
}

.roster__number {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-dim);
  width: 16px;
  flex-shrink: 0;
  text-align: right;
}

.roster__name {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
}

.roster__name--bold {
  font-weight: 700;
}

.roster__badge {
  display: inline-block;
  font-size: 0.54rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 2px;
  line-height: 1.6;
}

.roster__badge--start {
  background: rgba(15, 30, 60, 0.08);
  color: var(--navy);
}

.roster__badge--c {
  background: rgba(21, 21, 21, 0.09);
  color: var(--ink-soft);
}

.roster__badge--a {
  background: rgba(21, 21, 21, 0.09);
  color: var(--ink-soft);
}

.roster__goalie-sep {
  height: 6px;
}

/* Roster staff */
.roster__staff-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.roster__staff {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roster__staff-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 0;
}

.roster__staff-role {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  width: 22px;
  flex-shrink: 0;
  text-align: right;
}

.roster__staff-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink);
}

/* Roster refs */
.roster__refs {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.roster__refs-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.roster__refs-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roster__ref-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 0;
}

.roster__ref-role {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  width: 22px;
  flex-shrink: 0;
  text-align: right;
}

.roster__ref-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink);
}

/* ── Images panel ── */
.article-images,
.article-highlights {
  display: none;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.article-images::-webkit-scrollbar,
.article-highlights::-webkit-scrollbar {
  display: none;
}

/* Panel visibility via data-mobile-tab */
.article-layout[data-mobile-tab="images"] .article-main,
.article-layout[data-mobile-tab="images"] .article-side,
.article-layout[data-mobile-tab="highlights"] .article-main,
.article-layout[data-mobile-tab="highlights"] .article-side {
  display: none;
}

.article-layout[data-mobile-tab="images"] .article-images,
.article-layout[data-mobile-tab="highlights"] .article-highlights {
  display: block;
  grid-column: 1 / -1;
  align-self: stretch;
  overflow-y: auto;
  min-height: 0;
  height: -webkit-fit-content;
}

/* Image carousel */
.article-images {
  background: var(--card);
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  overflow: hidden;
  padding: 16px;
}

.article-layout[data-mobile-tab="images"] .article-images {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Standalone (e.g. embedded in .article-richtext content) sizing */
.image-carousel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-carousel__stage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-carousel__frame {
  position: relative;
  flex: 1;
  min-width: 0;
  max-height: 70vh;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.image-carousel__frame:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

/* Images panel: let the carousel fill the tab's available vertical space
   (the frame still only grows to the image's own size within it). */
.article-layout[data-mobile-tab="images"] .article-images .image-carousel {
  flex: 1;
  min-height: 0;
  margin: 0;
}

.article-layout[data-mobile-tab="images"] .article-images .image-carousel__stage {
  flex: 1;
  min-height: 0;
}

/* Extra-specific selector: outranks the generic
   `.article-richtext img { height: auto }` rule when the carousel replaces
   a wp-block-gallery inside the article body. Images keep their own
   aspect ratio — only capped so an unusually tall/wide photo doesn't blow
   out the layout. */
.image-carousel .image-carousel__frame .image-carousel__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 0;
}

.image-carousel__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 44px 8px 14px;
  background: linear-gradient(
    to top,
    rgba(15, 30, 60, 0.55) 0%,
    rgba(15, 30, 60, 0) 100%
  );
  pointer-events: none;
}

.image-carousel__caption {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-carousel__credit {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-carousel__caption[hidden],
.image-carousel__credit[hidden] {
  display: none;
}

.image-carousel__counter {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 30, 60, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.image-carousel__download {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 30, 60, 0.55);
  color: #fff;
  cursor: pointer;
}

.image-carousel__download[hidden] {
  display: none;
}

.image-carousel__download:hover {
  background: rgba(15, 30, 60, 0.8);
}

.image-carousel__nav {
  appearance: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.image-carousel__nav:hover:not(:disabled) {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.image-carousel__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.image-carousel__nav:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.image-carousel[data-count="1"] .image-carousel__nav,
.image-carousel[data-count="1"] .image-carousel__strip {
  display: none;
}

.image-carousel__strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.image-carousel__strip::-webkit-scrollbar {
  display: none;
}

.image-carousel__thumb {
  appearance: none;
  border: 2px solid transparent;
  padding: 0;
  flex-shrink: 0;
  width: 64px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, border-color 0.15s;
}

.image-carousel__thumb:hover {
  opacity: 0.85;
}

.image-carousel__thumb.is-active {
  opacity: 1;
  border-color: var(--navy);
}

.image-carousel__thumb:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.image-carousel .image-carousel__strip .image-carousel__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: 0;
}

/* ── Highlights panel ── */
.article-highlights {
  background: var(--card);
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.highlight-item:last-child {
  border-bottom: none;
}

.highlight-item:hover {
  background: var(--ink-faint);
}

.highlight-thumb {
  width: 88px;
  height: 50px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f1e3c 0%, #1a3060 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* YouTube thumbnail variant */
.highlight-thumb--yt {
  background: #000;
}

.highlight-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.highlight-thumb__play {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.highlight-thumb__play svg {
  width: 8px;
  height: 8px;
  fill: var(--navy);
  margin-left: 2px;
  stroke: none;
}

.highlight-info,
.related-card__info {
  flex: 1;
  min-width: 0;
}

.highlight-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.highlight-meta {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--ink-dim);
  margin-top: 3px;
}

/* ── Reactions ── */
.article-reactions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  color: var(--ink-dim);
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.reaction-btn__emoji {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
}

.reaction-btn__emoji svg {
  width: 14px;
  height: 14px;
  display: block;
  color: inherit;
}

.reaction-btn:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.reaction-btn.is-active {
  border-color: var(--ink-soft);
  background: var(--ink-faint);
  color: var(--ink);
}

.reaction-btn__count {
  font-size: 0.68rem;
  font-weight: 700;
  color: inherit;
}

.reaction-share {
  margin-left: auto;
}

/* ══════════════════════════════════════
   RESPONSIVE - ARTICLE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .content {
    height: auto;
  }

  .article-mobile-tab--desktop-combined {
    display: none;
  }

  .article-breadcrumb {
    padding: 12px 0 0 0;
    width: unset;
    margin-inline: 10px;
  }

  .article-layout {
    display: block;
    height: auto;
    flex: none;
    min-height: 0;
    overflow: visible;
    padding: 0;
  }

  .article-layout[data-mobile-tab="article"] .article-main {
    display: flex;
  }

  .article-layout[data-mobile-tab="article"] .article-side {
    display: none;
  }

  .article-layout[data-mobile-tab="data"] .article-main {
    display: none;
  }

  .article-layout[data-mobile-tab="data"] .article-side {
    display: flex;
    overflow: visible;
  }

  .article-main,
  .article-side {
    overflow: visible;
  }
}

@media (min-width: 901px) {
  .article-mobile-tabs--has-combined
    .article-mobile-tab[data-tab="article"]:not(
      .article-mobile-tab--desktop-combined
    ),
  .article-mobile-tabs--has-combined .article-mobile-tab[data-tab="data"] {
    display: none;
  }

  .article-mobile-tabs--has-combined .article-mobile-tab--desktop-combined {
    display: inline-flex;
  }
}

@media (max-width: 580px) {
  .article-body {
    padding: 20px 20px 28px;
  }

  .article-info {
    padding: 12px 20px;
    gap: 6px;
  }

  .score-card__numbers {
    font-size: 2rem;
  }
}

/* ── Article V1 (single-column, no sidebar) ── */
.article-layout--v1 {
  grid-template-columns: 1fr;
}

.article-layout--v1 .article-mobile-tabs {
  display: none !important;
}

.article-layout--v1 .article-main {
  overflow-y: auto;
}

.article-layout .article-richtext,
.editor-styles-wrapper {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.78;
  color: var(--ink-soft);
}

.article-layout .article-richtext > *,
.editor-styles-wrapper .block-editor-block-list__layout > * {
  margin: 0 0 1em;
}

.article-layout .article-richtext > *:first-child,
.editor-styles-wrapper .block-editor-block-list__layout > *:first-child {
  margin-top: 0;
}

.article-layout .article-richtext h1,
.article-layout .article-richtext h2,
.article-layout .article-richtext h3,
.article-layout .article-richtext h4,
.article-layout .article-richtext h5,
.article-layout .article-richtext h6,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}

.article-layout .article-richtext h1,
.editor-styles-wrapper h1 {
  font-size: 1.6rem;
}

.article-layout .article-richtext h2,
.editor-styles-wrapper h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75em;
}

.article-layout .article-richtext h3,
.editor-styles-wrapper h3 {
  font-size: 1.1rem;
}

.article-layout .article-richtext h4,
.editor-styles-wrapper h4 {
  font-size: 0.95rem;
}

.article-layout .article-richtext h5,
.editor-styles-wrapper h5 {
  font-size: 0.85rem;
  font-weight: 700;
}

.article-layout .article-richtext h6,
.editor-styles-wrapper h6 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}

.article-layout .article-richtext ul,
.article-layout .article-richtext ol,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
  margin: 0 0 1em 1.2em;
  list-style: disc;
}

.article-layout .article-richtext ol,
.editor-styles-wrapper ol {
  list-style: decimal;
}

.article-layout .article-richtext li + li,
.editor-styles-wrapper li + li {
  margin-top: 0.35em;
}

.article-layout .article-richtext blockquote,
.article-layout .article-richtext .wp-block-quote {
  border-left: 3px solid var(--navy);
  padding-left: 18px;
  margin: 1.1em 0;
}

.article-layout .article-richtext blockquote p,
.article-layout .article-richtext .wp-block-quote p {
  font-size: 0.85rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 0.6em;
}

.article-layout .article-richtext blockquote p:last-child,
.article-layout .article-richtext .wp-block-quote p:last-child {
  margin-bottom: 0;
}

.article-layout .article-richtext blockquote cite,
.article-layout .article-richtext .wp-block-quote cite,
.article-layout .article-richtext blockquote em,
.article-layout .article-richtext .wp-block-quote em {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  font-style: normal;
  color: var(--ink-dim);
}

.article-layout .article-richtext a,
.editor-styles-wrapper a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-layout .article-richtext img,
.editor-styles-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.article-layout .article-richtext figcaption,
.editor-styles-wrapper figcaption {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-dim);
  text-align: center;
  margin-top: 8px;
}

/* Images are zoomable by default (matches the gameday media lightbox);
 * editors can opt a specific image out via the block's "Im Lightbox
 * vergrößerbar" toggle, which stamps data-zoomable="false" on save. */
.article-layout .article-richtext .wp-block-image:not([data-zoomable="false"]) img,
.editor-styles-wrapper .wp-block-image:not([data-zoomable="false"]) img {
  cursor: zoom-in;
}

/* Keyboard-focusable wrapper button inserted around zoomable in-article
   images by article-ui.js — must disappear visually, leaving the image
   as the only thing rendered, while still taking focus. */
.article-img-zoom {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

.article-img-zoom:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Buttons ──
 * Reuses the site's established primary-CTA look (.nav-cta / .promo-strip__cta):
 * gold fill + ink text, ~10px radius — NOT a navy fill, which goes near-invisible
 * against the dark-mode card background (see darkmode.css). */
.article-layout .article-richtext .wp-block-buttons,
.editor-styles-wrapper .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 1em;
}

.article-layout .article-richtext .wp-block-button__link,
.editor-styles-wrapper .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink) !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: none !important;
  border: none;
  transition: background 0.15s ease;
}

.article-layout .article-richtext .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button__link:hover {
  background: #e0a820;
}

.article-layout .article-richtext .wp-block-button.is-style-outline .wp-block-button__link,
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--ink) !important;
  border: 1.5px solid var(--border);
}

.article-layout .article-richtext .wp-block-button.is-style-outline .wp-block-button__link:hover,
.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--ink-faint);
  border-color: var(--ink-dim);
}

/* ── Details / accordion ── */
.article-layout .article-richtext details,
.editor-styles-wrapper .wp-block-details {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 16px;
  margin: 0 0 1em;
}

.article-layout .article-richtext summary,
.editor-styles-wrapper .wp-block-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
}

.article-layout .article-richtext summary::-webkit-details-marker,
.editor-styles-wrapper .wp-block-details summary::-webkit-details-marker {
  display: none;
}

.article-layout .article-richtext summary::before,
.editor-styles-wrapper .wp-block-details summary::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.article-layout .article-richtext details[open] summary::before,
.editor-styles-wrapper .wp-block-details[open] summary::before {
  transform: rotate(45deg);
}

.article-layout .article-richtext details[open] summary,
.editor-styles-wrapper .wp-block-details[open] summary {
  margin-bottom: 8px;
}

.article-layout .article-richtext details > *:not(summary),
.editor-styles-wrapper .wp-block-details > *:not(summary) {
  margin: 0;
}

.article-layout .article-richtext details > *:not(summary) + *:not(summary),
.editor-styles-wrapper .wp-block-details > *:not(summary) + *:not(summary) {
  margin-top: 0.6em;
}

/* ── File / download block ── */
.article-layout .article-richtext .wp-block-file,
.editor-styles-wrapper .wp-block-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  margin: 0 0 1em;
}

.article-layout .article-richtext .wp-block-file__embed,
.editor-styles-wrapper .wp-block-file__embed {
  flex-basis: 100%;
  width: 100% !important;
  height: min(420px, 60vh) !important;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.article-layout .article-richtext .wp-block-file > a:not(.wp-block-file__button),
.editor-styles-wrapper .wp-block-file > a:not(.wp-block-file__button) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  flex-grow: 1;
  min-width: 0;
}

.article-layout .article-richtext .wp-block-file > a:not(.wp-block-file__button)::before,
.editor-styles-wrapper .wp-block-file > a:not(.wp-block-file__button)::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: var(--ink-dim);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm0 2.5L18.5 9H14V4.5zM6 20V4h6v6h6v10H6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm0 2.5L18.5 9H14V4.5zM6 20V4h6v6h6v10H6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.article-layout .article-richtext .wp-block-file > a:not(.wp-block-file__button):hover,
.editor-styles-wrapper .wp-block-file > a:not(.wp-block-file__button):hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-layout .article-richtext .wp-block-file__button,
.editor-styles-wrapper .wp-block-file__button {
  margin-left: 0 !important;
  flex-shrink: 0;
  background: var(--gold);
  color: var(--ink) !important;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 8px 18px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.article-layout .article-richtext .wp-block-file__button:hover,
.editor-styles-wrapper .wp-block-file__button:hover {
  background: #e0a820;
}

/* ─────────────────────────────────────────────────────────────
 * Game Report — dynamic sidebar panels
 * Rendered by article-ui.js using the existing .side-card /
 * .timeline / .roster system. Only the period-stat table needs
 * extra CSS here.
 * ───────────────────────────────────────────────────────────── */

.article-side[data-loading="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* Outer wrapper appended below the static score card */
.rpt-report {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ── Period stats table ───────────────────────────────────── */
.period-table-wrap {
  overflow-x: auto;
}

.period-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.period-table thead th {
  padding: 8px 18px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.period-table thead th:first-child {
  text-align: left;
}

.period-table tbody tr + tr {
  border-top: 1px solid var(--border);
}

.period-table tbody tr:hover {
  background: var(--ink-faint);
}

.period-table td {
  padding: 7px 18px;
  color: var(--ink-soft);
}

.period-table td:first-child {
  font-weight: 600;
  color: var(--ink);
}

.period-table__score {
  text-align: center;
  font-weight: 700;
  color: var(--ink) !important;
}

.period-table__sog {
  text-align: center;
}

.period-table tfoot {
  border-top: 1px solid var(--border);
}

.period-table tfoot td {
  padding: 7px 18px;
  background: var(--ink-faint);
  font-weight: 700;
  color: var(--ink) !important;
}

/* ── Gallery lightbox ── */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(7, 14, 32, 0.92);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 80px);
}

.gallery-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 12px;
  transition: opacity 0.2s;
  user-select: none;
}

.gallery-lightbox__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
  position: absolute;
}

@keyframes lb-spin {
  to {
    transform: rotate(360deg);
  }
}

.gallery-lightbox__caption {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(7, 14, 32, 0.55);
  backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: calc(100vw - 160px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.gallery-lightbox__credit {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  max-width: calc(100vw - 160px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.gallery-lightbox__counter {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.gallery-lightbox__btn {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    opacity 0.15s;
}

.gallery-lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--card);
}

.gallery-lightbox__btn:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.gallery-lightbox__btn--close {
  top: 16px;
  right: 16px;
}

.gallery-lightbox__btn--download {
  top: 16px;
  right: 68px;
  text-decoration: none;
}

.gallery-lightbox__btn--download[hidden] {
  display: none;
}

.gallery-lightbox__btn--prev {
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
}

.gallery-lightbox__btn--next {
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

@media (max-width: 900px) {
  .gallery-lightbox__btn--prev,
  .gallery-lightbox__btn--next {
    background: rgba(7, 14, 32, 0.52);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.18);
  }

  .gallery-lightbox__btn--prev:hover,
  .gallery-lightbox__btn--next:hover {
    background: rgba(7, 14, 32, 0.72);
  }
}

@media (max-width: 580px) {
  .gallery-lightbox__inner {
    max-width: 100vw;
    max-height: calc(100vh - 100px);
  }

  .gallery-lightbox__img {
    max-height: calc(100vh - 100px);
    border-radius: 8px;
  }

  .gallery-lightbox__btn--prev {
    left: 8px;
  }

  .gallery-lightbox__btn--next {
    right: 8px;
  }
}

/* ── Article reactions bar ── */
.article-reactions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 18px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

.article-reactions__emojis {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Altcha widget theming ── (see contact.css for the full rationale:
   the widget themes itself via --altcha-* custom properties, which are
   immune to its own `all: revert-layer` reset — the update-proof way to
   style it, unlike the old per-element !important overrides.) */
altcha-widget {
  display: block;
  margin-bottom: 14px;
}

.altcha {
  --altcha-color-base: var(--bg);
  --altcha-color-base-content: var(--ink);
  --altcha-border-color: var(--border);
  --altcha-border-width: 1px;
  --altcha-border-radius: 10px;
  --altcha-padding: 10px 12px;
  --altcha-color-primary: var(--navy);
  --altcha-color-primary-content: var(--text-white);
  --altcha-color-neutral: var(--border);
  --altcha-color-neutral-content: var(--ink-soft);
  --altcha-checkbox-border-color: var(--border);
  --altcha-checkbox-border-radius: 5px;
  --altcha-checkbox-size: 18px;
  --altcha-spinner-color: var(--navy);
  --altcha-input-border-radius: 8px;
  font-family: "Plus Jakarta Sans", sans-serif !important;
}

.altcha-checkbox-wrap label {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: var(--ink-soft) !important;
  cursor: pointer;
}

.altcha-footer {
  font-size: 0.68rem !important;
  color: var(--ink-dim) !important;
  opacity: 1 !important;
}

.altcha-footer a {
  color: inherit !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.altcha-logo {
  color: var(--ink-dim) !important;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.reaction-btn:hover {
  background: var(--ink-faint);
  border-color: var(--ink-dim);
  color: var(--ink);
}

.reaction-btn.is-active {
  background: var(--ink-faint);
  border-color: var(--ink-dim);
  color: var(--ink);
}

.reaction-btn:active {
  transform: scale(0.93);
}

.reaction-btn__emoji {
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
}

.reaction-btn__emoji svg {
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
}

.reaction-btn__count {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 14px;
  pointer-events: none;
}

.reaction-share {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.reaction-share svg {
  flex-shrink: 0;
}

.article-reactions.is-locked .reaction-btn {
  opacity: 0.45;
}

.article-reactions.is-locked .reaction-btn:hover {
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: not-allowed;
}

.reaction-activate {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.reaction-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 16, 29, 0.56);
}

.reaction-consent-modal[hidden] {
  display: none;
}

.reaction-consent-modal__panel {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  background: var(--card);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.reaction-consent-modal__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.reaction-consent-modal__text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.reaction-consent-modal__feedback {
  min-height: 1.2em;
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.82rem;
  font-weight: 600;
}

.reaction-consent-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.reaction-consent-cancel,
.reaction-consent-confirm {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 580px) {
  .article-reactions {
    padding: 12px 16px 16px;
    gap: 6px;
  }

  .reaction-btn {
    padding: 0 8px;
  }

  .reaction-share__label {
    display: none;
  }

  .reaction-share {
    padding: 0 10px;
  }

  .reaction-activate {
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .reaction-consent-modal__panel {
    padding: 16px;
    gap: 10px;
  }

  .reaction-consent-modal__actions {
    justify-content: stretch;
  }

  .reaction-consent-cancel,
  .reaction-consent-confirm {
    flex: 1;
  }

  .article-reactions.is-locked .reaction-btn {
    display: none;
  }
}

/* ══════════════════════════════════════
   RELATED ARTICLES
   ══════════════════════════════════════ */

.article-related {
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  padding: 28px 0 0;
}

.article-related__heading {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 16px;
}

.article-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}

/* Related card — desktop overrides for highlight-item's row layout.
   display, text-decoration, color, cursor, transition, border-bottom
   come from .highlight-item (shared class added in PHP). */
.related-card {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--card);
  border-radius: var(--r);
  border: 1.5px solid var(--border);
  overflow: hidden;
  position: relative;
}

/* Subtle desktop hover via pseudo-element overlay */
.related-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.15s;
  pointer-events: none;
}

.related-card:hover::after {
  background: rgba(21, 21, 21, 0.02);
}

/* Prevent highlight-item:hover background on desktop */
@media (min-width: 901px) {
  .related-card:hover {
    background: var(--card);
  }
}

.related-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(140deg, #0c1c38 0%, #1a2e58 50%, #070e20 100%);
  flex-shrink: 0;
}

.related-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-card:hover .related-card__img {
  transform: scale(1.04);
}

/* flex:1 + min-width:0 from .highlight-info (shared class added in PHP) */
.related-card__info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card__tag {
  align-self: flex-start;
}

.related-card__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card__date {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ink-dim);
  margin-top: auto;
  padding-top: 4px;
}

/* Mobile: list layout — highlight-item handles gap, padding, border-bottom,
   transition, :hover background, and :last-child for free. */
@media (max-width: 900px) {
  .article-related__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--card);
    border-radius: var(--r);
    border: 1.5px solid var(--border);
    overflow: hidden;
  }

  /* Reset desktop overrides only */
  .related-card {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border-radius: 0;
    gap: var(--gap);
    border: none;
    border-bottom: 1px solid var(--border);
  }

  /* Disable pseudo overlay — highlight-item:hover handles hover */
  .related-card::after {
    display: none;
  }

  .related-card__thumb {
    width: 88px;
    height: 50px;
    aspect-ratio: unset;
    border-radius: 8px;
  }

  .related-card__info {
    padding: 0;
    gap: 4px;
  }

  .related-card__title {
    -webkit-line-clamp: 2;
  }

  .related-card__date {
    margin-top: 0;
    padding-top: 0;
  }
}

/* Dark-Theme Adjustments */

html[data-theme="dark"] .timeline__type--goal {
  color: var(--text-white);
  background: rgba(47, 86, 164, 0.13);
}
