/* ==========================================================================
   ZeroSpread — خريطة تفاعل السوق  (homepage section 05)
   Scoped: every selector starts with .zs-mrg; keyframes are prefixed.
   Type: Tajawal 400 / 500 / 700 only. Latin digits. RTL.
   ========================================================================== */

.zs-mrg {
  /* surfaces */
  --zs-mrg-page: transparent;
  --zs-mrg-surface: #ffffff;
  --zs-mrg-pearl: #f6f7f9;
  --zs-mrg-line: #e7eaee;
  --zs-mrg-line-strong: #d5dae1;
  --zs-mrg-hair: #eef0f3;
  /* ink */
  --zs-mrg-ink: #101318;
  --zs-mrg-ink-2: #2a313c;
  --zs-mrg-ink-3: #4a5260;
  --zs-mrg-muted: #6b7380;
  --zs-mrg-faint: #8d949f;
  /* event card — midnight slate, never pure black */
  --zs-mrg-slate-1: #243248;
  --zs-mrg-slate-2: #1a2538;
  --zs-mrg-slate-ink: #f5f7fa;
  --zs-mrg-slate-ink-2: rgba(214, 222, 233, 0.74);
  /* semantic (mature) */
  --zs-mrg-up: #178a4a;
  --zs-mrg-down: #c9383a;
  --zs-mrg-flat: #5b6472;
  /* accents */
  --zs-mrg-brand: #a3ff12;
  --zs-mrg-brand-edge: #6fae0b;
  --zs-mrg-accent: #1f2b3e;
  /* connectors */
  --zs-mrg-link: rgba(47, 60, 80, 0.5);
  --zs-mrg-link-strong: rgba(31, 43, 62, 0.9);
  /* motion */
  --zs-mrg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --zs-mrg-ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --zs-mrg-fast: 220ms;

  font-family: var(--font-tajawal, 'Tajawal'), sans-serif;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--zs-mrg-ink);
  background: var(--zs-mrg-page);
  direction: rtl;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(40px, 5vw, 72px) clamp(16px, 2.4vw, 40px);
}

.zs-mrg *,
.zs-mrg *::before,
.zs-mrg *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

/* Zero-specificity resets so component rules always win. */
.zs-mrg :where(h2, h3, p, dl, dd, ol) {
  margin: 0;
  padding: 0;
}

.zs-mrg :where(ol) {
  list-style: none;
}

.zs-mrg-num,
.zs-mrg-card__move,
.zs-mrg-card__ticker,
.zs-mrg-header__index {
  font-variant-numeric: tabular-nums lining-nums;
  unicode-bidi: isolate;
  direction: ltr;
}

.zs-mrg__inner {
  max-width: 1680px;
  margin-inline: auto;
}

/*
 * Homepage mount: section sits inside `.zsph-wrap` (same as News / Market Overview).
 * Drop the package's own horizontal gutter + inner max-width so edges align.
 * Do NOT add a second page gutter.
 */
.zsph-wrap > .zs-mrg,
.zsph-wrap .zs-mrg {
  width: 100%;
  max-width: none;
  padding-inline: 0;
  margin-inline: 0;
}

.zsph-wrap > .zs-mrg > .zs-mrg__inner,
.zsph-wrap .zs-mrg > .zs-mrg__inner {
  max-width: none;
  margin-inline: 0;
  width: 100%;
}

/* ─────────────────────────────── Header ─────────────────────────────── */

.zs-mrg-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(18px, 2vw, 26px);
}

.zs-mrg-header[data-cta='off'] {
  justify-content: flex-start;
}

.zs-mrg-header__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--zs-mrg-muted);
  margin-bottom: 12px;
}

.zs-mrg-header__index {
  font-weight: 700;
  color: var(--zs-mrg-ink-2);
}

.zs-mrg-header__meta-rule {
  width: 18px;
  height: 1px;
  background: #cbd2da;
}

.zs-mrg-header__live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c3c9d2;
}

.zs-mrg-header__live[data-live='true'] {
  background: var(--zs-mrg-brand);
  box-shadow: inset 0 0 0 1px var(--zs-mrg-brand-edge);
}

.zs-mrg-header__title {
  font-size: clamp(30px, 3.1vw, 46px);
  line-height: 1.18;
  font-weight: 700;
  color: var(--zs-mrg-ink);
}

.zs-mrg-header__subtitle {
  margin-top: 10px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  color: #525a67;
}

.zs-mrg-header__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid #e1e5ea;
  border-radius: 14px;
  background: var(--zs-mrg-surface);
  color: var(--zs-mrg-ink-2);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 4px;
  transition:
    background-color var(--zs-mrg-fast) var(--zs-mrg-ease),
    border-color var(--zs-mrg-fast) var(--zs-mrg-ease),
    color var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-header__cta svg {
  transition: translate var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-header__cta:hover {
  background: var(--zs-mrg-pearl);
  border-color: var(--zs-mrg-line-strong);
  color: var(--zs-mrg-ink);
}

.zs-mrg-header__cta:hover svg {
  translate: -3px 0;
}

.zs-mrg-header__cta:focus-visible,
.zs-mrg-card:focus-visible {
  outline: 2px solid var(--zs-mrg-accent);
  outline-offset: 3px;
}

/* ─────────────────────────────── Surface ─────────────────────────────── */

.zs-mrg-surface {
  position: relative;
  display: grid;
  grid-template-columns: clamp(270px, 19vw, 340px) minmax(0, 1fr);
  grid-template-areas: 'panel network';
  background: var(--zs-mrg-surface);
  border: 1px solid #e8ebef;
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 30px 60px -48px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  isolation: isolate;
}

.zs-mrg-surface__network {
  grid-area: network;
  min-width: 0;
  position: relative;
}

.zs-mrg-surface__panel {
  grid-area: panel;
  min-width: 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  border-inline-end: 1px solid var(--zs-mrg-hair);
}

/* ─────────────────────────────── Network ─────────────────────────────── */

.zs-mrg-network {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1.32fr) minmax(0, 1fr);
  grid-template-areas: 'start stage end';
  align-items: stretch;
  min-height: 600px;
  padding: 44px clamp(18px, 1.8vw, 28px);
}

/* A single linked market: shift the event + globe into the free half instead of
   leaving an empty column. */
@media (min-width: 1024px) {
  .zs-mrg-network[data-count='1'] {
    grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.25fr);
    grid-template-areas: 'start stage';
  }
  .zs-mrg-network[data-count='1'] .zs-mrg-col--end {
    display: none;
  }
}

.zs-mrg-network::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.34) 1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 30%, transparent 92%);
  mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 30%, transparent 92%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.zs-mrg-col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-width: 0;
  container-type: inline-size;
}

.zs-mrg-col--start {
  grid-area: start;
}

.zs-mrg-col--end {
  grid-area: end;
}

.zs-mrg-network__stage {
  grid-area: stage;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  container-type: size;
  z-index: auto;
}

/* ─────────────────────────────── Globe ─────────────────────────────── */

.zs-mrg-globe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100cqw + 56px, 80cqh, 500px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.zs-mrg-globe__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.zs-mrg-globe__rings {
  position: absolute;
  inset: -30%;
  width: 160%;
  height: 160%;
  overflow: visible;
}

.zs-mrg-globe__ring {
  fill: none;
  stroke: rgba(148, 163, 184, 0.26);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.zs-mrg-globe__ring--2 {
  stroke: rgba(100, 116, 139, 0.32);
  stroke-dasharray: 1 6;
  stroke-linecap: round;
}

.zs-mrg-globe__ring--3 {
  stroke: rgba(148, 163, 184, 0.18);
}

.zs-mrg-globe__ring--4 {
  stroke: rgba(148, 163, 184, 0.11);
}

/* ─────────────────────────────── Connectors ─────────────────────────────── */

.zs-mrg-links {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.zs-mrg-links__mask {
  fill: none;
  stroke: #fff;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

.zs-mrg-links__path {
  fill: none;
  stroke: var(--zs-mrg-link);
  stroke-width: 1.15;
  stroke-dasharray: 2.4 4.2;
  stroke-linecap: round;
  transition:
    stroke var(--zs-mrg-fast) var(--zs-mrg-ease),
    opacity var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-links[data-linked='false'] .zs-mrg-links__path {
  stroke: rgba(47, 60, 80, 0.36);
  stroke-dasharray: 2 4.6;
}

.zs-mrg-links__anchor {
  fill: var(--zs-mrg-surface);
  stroke: rgba(47, 60, 80, 0.55);
  stroke-width: 1.2;
  transition:
    fill var(--zs-mrg-fast) var(--zs-mrg-ease),
    stroke var(--zs-mrg-fast) var(--zs-mrg-ease),
    opacity var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-links__anchor--start {
  fill: var(--zs-mrg-slate-2);
  stroke: rgba(226, 232, 240, 0.7);
}

.zs-mrg-links__pulse {
  fill: var(--zs-mrg-accent);
  opacity: 0;
}

.zs-mrg-links[data-has-active='true'] .zs-mrg-links__item[data-active='false'] {
  opacity: 0.4;
}

.zs-mrg-links__item {
  transition: opacity var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-links__item[data-active='true'] .zs-mrg-links__path {
  stroke: var(--zs-mrg-link-strong);
}

.zs-mrg-links__item[data-active='true'] .zs-mrg-links__anchor--end {
  fill: var(--zs-mrg-accent);
  stroke: var(--zs-mrg-accent);
}

/* ─────────────────────────────── Event card ─────────────────────────────── */

.zs-mrg-center {
  position: relative;
  z-index: 3;
  width: clamp(236px, 17.5vw, 296px);
  padding: 24px 22px 20px;
  border-radius: 18px;
  text-align: center;
  color: var(--zs-mrg-slate-ink);
  background: linear-gradient(180deg, var(--zs-mrg-slate-1) 0%, var(--zs-mrg-slate-2) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.1),
    0 26px 50px -26px rgba(15, 23, 42, 0.55);
}

.zs-mrg-center__icon {
  display: inline-flex;
  color: rgba(241, 245, 249, 0.9);
  margin-bottom: 10px;
}

.zs-mrg-center__phase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.82);
  margin-bottom: 6px;
}

.zs-mrg-center__phase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(203, 213, 225, 0.6);
}

.zs-mrg-center__phase-dot[data-phase='pre_release'] {
  background: var(--zs-mrg-brand);
}

.zs-mrg-center__title {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.5;
  font-weight: 700;
  color: var(--zs-mrg-slate-ink);
}

.zs-mrg-center__context {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--zs-mrg-slate-ink-2);
}

.zs-mrg-center__sep {
  margin-inline: 6px;
  opacity: 0.7;
}

.zs-mrg-center__rule {
  display: block;
  height: 1px;
  margin: 14px 4px 12px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.28) 18%, rgba(148, 163, 184, 0.28) 82%, transparent);
}

.zs-mrg-center__count {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.8);
}

/* ─────────────────────────────── Market cards ─────────────────────────────── */

.zs-mrg-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 420px;
  padding: 16px 20px 15px;
  border-radius: 16px;
  background: var(--zs-mrg-surface);
  border: 1px solid var(--zs-mrg-line);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.035),
    0 12px 28px -22px rgba(15, 23, 42, 0.18);
  color: inherit;
  text-decoration: none;
  outline: none;
  transition:
    border-color var(--zs-mrg-fast) var(--zs-mrg-ease),
    box-shadow var(--zs-mrg-fast) var(--zs-mrg-ease),
    translate var(--zs-mrg-fast) var(--zs-mrg-ease);
}

/* Cards hug the outer edges so connectors keep a generous, even run. */
.zs-mrg-col--start .zs-mrg-card {
  margin-inline-end: auto;
}

.zs-mrg-col--end .zs-mrg-card {
  margin-inline-start: auto;
}

.zs-mrg-card > * {
  transition: opacity var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-card[data-active='true'] {
  border-color: var(--zs-mrg-line-strong);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 18px 34px -22px rgba(15, 23, 42, 0.26);
  translate: 0 -1px;
}

.zs-mrg-card[data-dimmed='true'] > * {
  opacity: 0.58;
}

.zs-mrg-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.zs-mrg-card__icon {
  display: inline-flex;
  flex: none;
}

.zs-mrg-card__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 18.5px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--zs-mrg-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zs-mrg-card__ticker {
  flex: none;
  font-size: 12.5px;
  font-weight: 500;
  color: #7a8290;
  align-self: flex-start;
  padding-top: 2px;
}

.zs-mrg-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 12px;
}

.zs-mrg-card__relation {
  min-width: 0;
}

.zs-mrg-card__rel-primary {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--zs-mrg-ink-3);
}

.zs-mrg-card__rel-secondary {
  font-size: 13px;
  line-height: 1.65;
  color: var(--zs-mrg-muted);
}

.zs-mrg-card__rel-secondary[data-alignment='same'],
.zs-mrg-card__rel-secondary[data-alignment='inverse'] {
  color: var(--zs-mrg-ink-3);
}

.zs-mrg-card__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 112px;
}

.zs-mrg-card__move {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
}

.zs-mrg-tone--up {
  color: var(--zs-mrg-up);
}

.zs-mrg-tone--down {
  color: var(--zs-mrg-down);
}

.zs-mrg-tone--flat,
.zs-mrg-tone--none {
  color: var(--zs-mrg-flat);
}

.zs-mrg-card__metric[data-freshness='last_session'] .zs-mrg-card__move {
  opacity: 0.72;
}

.zs-mrg-card__metric[data-freshness='unavailable'] .zs-mrg-card__move {
  color: #aab0b9;
  font-weight: 500;
}

.zs-mrg-card__metric-foot {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  direction: rtl;
}

.zs-mrg-card__window {
  font-size: 12px;
  font-weight: 500;
  color: var(--zs-mrg-faint);
  white-space: nowrap;
  padding-bottom: 1px;
}

.zs-mrg-card__chevron {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  margin-top: -7px;
  color: #b3b9c2;
  transition:
    color var(--zs-mrg-fast) var(--zs-mrg-ease),
    translate var(--zs-mrg-fast) var(--zs-mrg-ease);
}

.zs-mrg-card[data-active='true'] .zs-mrg-card__chevron {
  color: var(--zs-mrg-ink-2);
  translate: -2px 0;
}

.zs-mrg-card:has(.zs-mrg-card__chevron) {
  padding-inline-end: 30px;
}

/* sparkline */
.zs-mrg-spark {
  display: block;
  width: 100px;
  height: 32px;
  overflow: visible;
}

.zs-mrg-spark--up {
  color: var(--zs-mrg-up);
}

.zs-mrg-spark--down {
  color: var(--zs-mrg-down);
}

.zs-mrg-spark--flat,
.zs-mrg-spark--none {
  color: #7b8491;
}

.zs-mrg-spark__line {
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}

/* Compact card (narrow columns): relation spans the width, metrics become one row. */
@container (max-width: 359.98px) {
  .zs-mrg-card__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 10px;
  }
  .zs-mrg-card__metric {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    order: -1;
  }
  .zs-mrg-card__move {
    font-size: 19px;
  }
  .zs-mrg-card__rel-primary {
    font-size: 13.5px;
  }
  .zs-mrg-card__rel-secondary {
    font-size: 12.5px;
  }
}

/* glyph tokens (fallback icons) */
.zs-mrg-glyph {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.zs-mrg-glyph--amber {
  background: #fdf3e6;
  color: #b8660d;
}

.zs-mrg-glyph--indigo {
  background: #eef0f8;
  color: #46558f;
}

.zs-mrg-glyph--navy {
  background: #edf1f7;
  color: #22406e;
}

.zs-mrg-glyph--gold {
  background: #fbf5e7;
  color: #9a7224;
}

.zs-mrg-glyph--graphite {
  background: #eef0f3;
  color: #2b313a;
}

.zs-mrg-glyph--slate {
  background: #f0f2f5;
  color: #3d4757;
}

/* ─────────────────────────────── Info panel ─────────────────────────────── */

.zs-mrg-panel {
  flex: 1 1 auto;
  padding: 34px 28px 30px;
  display: flex;
  flex-direction: column;
}

.zs-mrg-panel__kicker {
  font-size: 15px;
  font-weight: 500;
  color: var(--zs-mrg-muted);
}

.zs-mrg-panel__chip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--zs-mrg-line);
  border-radius: 14px;
  background: var(--zs-mrg-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.zs-mrg-panel__chip-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c3c9d2;
}

.zs-mrg-panel__chip[data-status='upcoming'] .zs-mrg-panel__chip-dot {
  background: var(--zs-mrg-brand);
  box-shadow: inset 0 0 0 1px var(--zs-mrg-brand-edge);
}

.zs-mrg-panel__chip[data-status='released'] .zs-mrg-panel__chip-dot {
  background: var(--zs-mrg-accent);
}

.zs-mrg-panel__chip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zs-mrg-panel__chip-title {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--zs-mrg-ink);
}

.zs-mrg-panel__chip-sub {
  font-size: 12.5px;
  color: var(--zs-mrg-faint);
}

.zs-mrg-panel__chip-sub:empty {
  display: none;
}

.zs-mrg-panel__chip-icon {
  margin-inline-start: auto;
  flex: none;
  display: inline-flex;
  color: #56606e;
}

@container (max-width: 299.98px) {
  .zs-mrg-panel__chip-icon {
    display: none;
  }
}

.zs-mrg-panel__body {
  margin-top: 22px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--zs-mrg-ink-3);
}

.zs-mrg-panel__figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  border-block: 1px solid var(--zs-mrg-hair);
}

.zs-mrg-panel__figure {
  padding: 12px 0;
}

.zs-mrg-panel__figure + .zs-mrg-panel__figure {
  border-inline-start: 1px solid var(--zs-mrg-hair);
  padding-inline-start: 14px;
}

.zs-mrg-panel__figure dt {
  font-size: 12px;
  color: var(--zs-mrg-faint);
}

.zs-mrg-panel__figure dd {
  margin-top: 2px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--zs-mrg-ink);
}

.zs-mrg-panel__figure[data-empty='true'] dd {
  color: #b3b9c2;
  font-weight: 500;
}

.zs-mrg-strength {
  margin-top: 30px;
}

.zs-mrg-strength__head {
  display: block;
}

.zs-mrg-strength__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--zs-mrg-ink-2);
}

.zs-mrg-strength__note {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--zs-mrg-faint);
}

.zs-mrg-strength__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.zs-mrg-strength__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.zs-mrg-strength__seg {
  position: relative;
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: #e9ecf1;
  overflow: hidden;
}

.zs-mrg-strength__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--zs-mrg-accent);
  transform: scaleX(0);
  transform-origin: right center;
}

.zs-mrg-strength__step[data-active='true'] .zs-mrg-strength__fill {
  transform: scaleX(1);
}

.zs-mrg-strength__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--zs-mrg-faint);
}

.zs-mrg-strength__step[data-active='true'] .zs-mrg-strength__text {
  color: var(--zs-mrg-ink);
  font-weight: 700;
}

.zs-mrg-panel__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding-top: 28px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--zs-mrg-muted);
}

.zs-mrg-panel__note svg {
  flex: none;
  margin-top: 4px;
  color: var(--zs-mrg-faint);
}

/* ==========================================================================
   Motion — entrance is keyframe-driven (fill: both) once the section is seen.
   Hover states use individual transform properties so they never fight it.
   ========================================================================== */

@keyframes zs-mrg-rise {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes zs-mrg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zs-mrg-globe-in {
  from { opacity: 0; scale: 0.955; }
  to { opacity: 1; scale: 1; }
}

@keyframes zs-mrg-center-in {
  from { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes zs-mrg-card-in {
  from { opacity: 0; transform: translate3d(var(--zs-mrg-from, 0), 6px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes zs-mrg-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes zs-mrg-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes zs-mrg-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.zs-mrg-col--start { --zs-mrg-from: -10px; }
.zs-mrg-col--end { --zs-mrg-from: 10px; }

/* pending (before the section enters the viewport) */
.zs-mrg[data-reveal='pending'] .zs-mrg-reveal,
.zs-mrg[data-reveal='pending'] .zs-mrg-card,
.zs-mrg[data-reveal='pending'] .zs-mrg-center,
.zs-mrg[data-reveal='pending'] .zs-mrg-globe,
.zs-mrg[data-reveal='pending'] .zs-mrg-links__anchor,
.zs-mrg[data-reveal='pending'] .zs-mrg-spark__area {
  opacity: 0;
}

.zs-mrg[data-reveal='pending'] .zs-mrg-links__mask,
.zs-mrg[data-reveal='pending'] .zs-mrg-spark__line {
  stroke-dashoffset: 1;
}

.zs-mrg[data-reveal='pending'] .zs-mrg-strength__fill {
  transform: scaleX(0);
}

/* done */
.zs-mrg[data-reveal='done'] .zs-mrg-reveal {
  animation: zs-mrg-rise 640ms var(--zs-mrg-ease) var(--zs-mrg-d, 0ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-globe {
  animation: zs-mrg-globe-in 1300ms var(--zs-mrg-ease) 220ms both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-center {
  animation: zs-mrg-center-in 720ms var(--zs-mrg-ease) 360ms both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-links__mask {
  animation: zs-mrg-draw 900ms var(--zs-mrg-ease-io) calc(560ms + var(--zs-mrg-i, 0) * 80ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-links__mask--spine {
  animation-delay: 480ms;
  animation-duration: 800ms;
}

.zs-mrg[data-reveal='done'] .zs-mrg-links__anchor--start {
  animation: zs-mrg-fade 360ms var(--zs-mrg-ease) calc(520ms + var(--zs-mrg-i, 0) * 80ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-links__anchor--end {
  animation: zs-mrg-fade 360ms var(--zs-mrg-ease) calc(1260ms + var(--zs-mrg-i, 0) * 80ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-card {
  animation: zs-mrg-card-in 620ms var(--zs-mrg-ease) calc(700ms + var(--zs-mrg-i, 0) * 70ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-spark__line {
  animation: zs-mrg-draw 1000ms var(--zs-mrg-ease-io) calc(1000ms + var(--zs-mrg-i, 0) * 70ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-card .zs-mrg-spark__line {
  animation-delay: calc(1000ms + var(--zs-mrg-i, 0) * 70ms);
}

.zs-mrg[data-reveal='done'] .zs-mrg-spark__area {
  animation: zs-mrg-fade 700ms var(--zs-mrg-ease) calc(1500ms + var(--zs-mrg-i, 0) * 70ms) both;
}

.zs-mrg[data-reveal='done'] .zs-mrg-strength__step[data-active='true'] .zs-mrg-strength__fill {
  animation: zs-mrg-fill 760ms var(--zs-mrg-ease) 900ms both;
}

.zs-mrg[data-tier='full'][data-reveal='done'] .zs-mrg-globe__ring--3,
.zs-mrg[data-tier='full'][data-reveal='done'] .zs-mrg-globe__ring--4 {
  animation: zs-mrg-breathe 11s var(--zs-mrg-ease-io) 2s infinite;
}

.zs-mrg[data-tier='full'][data-reveal='done'] .zs-mrg-globe__ring--4 {
  animation-delay: 5.5s;
}

/* Reduced motion / static tier: everything visible, nothing moves. */
.zs-mrg[data-tier='static'] *,
.zs-mrg[data-tier='static'] *::before,
.zs-mrg[data-tier='static'] *::after {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .zs-mrg *,
  .zs-mrg *::before,
  .zs-mrg *::after {
    animation: none !important;
    transition: none !important;
  }
  .zs-mrg .zs-mrg-reveal,
  .zs-mrg .zs-mrg-card,
  .zs-mrg .zs-mrg-center,
  .zs-mrg .zs-mrg-globe,
  .zs-mrg .zs-mrg-links__anchor,
  .zs-mrg .zs-mrg-spark__area {
    opacity: 1 !important;
  }
  .zs-mrg .zs-mrg-links__mask,
  .zs-mrg .zs-mrg-spark__line {
    stroke-dashoffset: 0 !important;
  }
  .zs-mrg .zs-mrg-strength__step[data-active='true'] .zs-mrg-strength__fill {
    transform: scaleX(1) !important;
  }
  .zs-mrg .zs-mrg-links__pulse {
    display: none;
  }
}

/* No JavaScript: never leave the section hidden. */
@media (scripting: none) {
  .zs-mrg .zs-mrg-reveal,
  .zs-mrg .zs-mrg-card,
  .zs-mrg .zs-mrg-center,
  .zs-mrg .zs-mrg-globe {
    opacity: 1 !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ≤1279: panel moves under the network and lays out horizontally. */
@media (max-width: 1279.98px) {
  .zs-mrg-surface {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'network' 'panel';
  }
  .zs-mrg-surface__panel {
    border-inline-end: 0;
    border-top: 1px solid var(--zs-mrg-hair);
  }
  .zs-mrg-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas:
      'kicker strength'
      'chip strength'
      'body note'
      'figures note';
    column-gap: 48px;
    align-items: start;
    padding: 28px 32px;
  }
  .zs-mrg-panel > :nth-child(1) { grid-area: kicker; }
  .zs-mrg-panel > :nth-child(2) { grid-area: chip; }
  .zs-mrg-panel > .zs-mrg-panel__body { grid-area: body; }
  .zs-mrg-panel > .zs-mrg-panel__figures { grid-area: figures; }
  .zs-mrg-panel > div:has(> .zs-mrg-strength) { grid-area: strength; }
  .zs-mrg-panel > .zs-mrg-panel__note { grid-area: note; margin-top: 0; padding-top: 22px; }
  .zs-mrg-strength { margin-top: 0; }
  .zs-mrg-network {
    min-height: 560px;
  }
  .zs-mrg-center {
    width: clamp(220px, 24vw, 280px);
  }
}

/* ≤1023: tablet — event card on top, two columns with a central spine. */
@media (max-width: 1023.98px) {
  .zs-mrg-header__title {
    font-size: 34px;
  }
  .zs-mrg-network {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      'stage stage'
      'start end';
    column-gap: 56px;
    row-gap: 8px;
    min-height: 0;
    padding: 28px 24px 32px;
  }
  .zs-mrg-network__stage {
    min-height: 0;
    height: 420px;
  }
  .zs-mrg-globe {
    width: min(94cqh, 100cqw, 396px);
  }
  .zs-mrg-col {
    justify-content: flex-start;
    gap: 16px;
    padding-top: 26px;
  }
  .zs-mrg-card {
    max-width: none;
  }
  .zs-mrg-center {
    width: 264px;
  }
}

/* ≤767: mobile — a single reading column with a side spine. */
@media (max-width: 767.98px) {
  .zs-mrg {
    padding-inline: 16px;
  }
  .zs-mrg-header {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .zs-mrg-header__title {
    font-size: 30px;
  }
  .zs-mrg-header__subtitle {
    font-size: 15px;
  }
  .zs-mrg-header__cta {
    align-self: flex-start;
    height: 44px;
    font-size: 15px;
  }
  .zs-mrg-surface {
    border-radius: 16px;
  }
  .zs-mrg-network {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'stage' 'start' 'end';
    row-gap: 12px;
    padding: 18px 14px 22px;
  }
  .zs-mrg-network::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 40% at 50% 18%, #000 20%, transparent 90%);
    mask-image: radial-gradient(ellipse 90% 40% at 50% 18%, #000 20%, transparent 90%);
  }
  .zs-mrg-network__stage {
    height: 330px;
  }
  .zs-mrg-globe {
    width: min(94cqh, 100cqw - 8px, 312px);
  }
  .zs-mrg-center {
    width: min(100% - 48px, 244px);
    padding: 18px 16px 14px;
  }
  .zs-mrg-center__title {
    font-size: 17px;
  }
  .zs-mrg-center__context {
    font-size: 12.5px;
  }
  .zs-mrg-col {
    gap: 12px;
    padding-top: 22px;
    padding-inline-start: 30px;
  }
  .zs-mrg-col--end {
    padding-top: 0;
  }
  .zs-mrg-card {
    padding: 14px 16px 13px;
    border-radius: 14px;
  }
  .zs-mrg-card__name {
    font-size: 17px;
  }
  .zs-mrg-card__move {
    font-size: 19px;
  }
  .zs-mrg-card__metric {
    min-width: 96px;
  }
  .zs-mrg-spark {
    width: 84px;
    height: 28px;
  }
  .zs-mrg-card:has(.zs-mrg-card__chevron) {
    padding-inline-end: 26px;
  }
  .zs-mrg-panel {
    display: flex;
    align-items: stretch;
    padding: 24px 18px 22px;
  }
  .zs-mrg-strength {
    margin-top: 28px;
  }
  .zs-mrg-panel__note {
    padding-top: 22px;
  }
}

@media (max-width: 379.98px) {
  .zs-mrg-card__body {
    grid-template-columns: minmax(0, 1fr);
  }
  .zs-mrg-card__metric {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

