/**
 * Connected season path and deadline nodes for /dates.
 */

/* Let the first season station enter the first viewport sooner. */
body.sc-public-page .sc-public-document:has(.sc-dates-section) {
  padding-top: clamp(1.25rem, 2vw, 2rem);
}

body.sc-public-page .sc-dates-path {
  --sc-dates-route-gap: clamp(1rem, 2vw, 1.65rem);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(10.5rem, auto);
  gap: var(--sc-dates-route-gap);
  max-width: none;
  margin: 1.65rem 0 0;
  padding: 0;
  list-style: none;
}

/* The generic long-form document keeps ordinary lists narrow. The season
 * route is a diagram, so it intentionally uses the entire editorial rail. */
body.sc-public-page .sc-dates-section > .sc-dates-path {
  max-width: none;
}

body.sc-public-page .sc-dates-path__node {
  --sc-dates-node-accent: var(--sc-peak-green-bright);
  --sc-dates-node-soft: color-mix(in srgb, var(--sc-peak-green-bright) 12%, transparent);
  position: relative;
  z-index: 1;
  min-width: 0;
  margin: 0;
}

body.sc-public-page .sc-dates-path__node--tone-teal {
  --sc-dates-node-accent: var(--sc-peak-green-bright);
  --sc-dates-node-soft: color-mix(in srgb, var(--sc-peak-green-bright) 13%, transparent);
}

body.sc-public-page .sc-dates-path__node--tone-blue {
  --sc-dates-node-accent: #4a96ff;
  --sc-dates-node-soft: rgba(74, 150, 255, 0.12);
}

body.sc-public-page .sc-dates-path__node--tone-yellow {
  --sc-dates-node-accent: var(--sc-brand-yellow);
  --sc-dates-node-soft: color-mix(in srgb, var(--sc-brand-yellow) 13%, transparent);
}

body.sc-public-page .sc-dates-path__node--tone-green {
  --sc-dates-node-accent: var(--sc-editorial-green);
  --sc-dates-node-soft: color-mix(in srgb, var(--sc-editorial-green) 13%, transparent);
}

body.sc-public-page .sc-dates-path__node--tone-red {
  --sc-dates-node-accent: var(--sc-brand-red);
  --sc-dates-node-soft: color-mix(in srgb, var(--sc-brand-red) 11%, transparent);
}

body.sc-public-page .sc-dates-path__card {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.15rem 1.15rem 1.1rem 4rem;
  border: 1px solid color-mix(in srgb, var(--sc-dates-node-accent) 62%, transparent);
  clip-path: var(--sc-chamfer-clip-md);
  background:
    linear-gradient(135deg, var(--sc-dates-node-soft), transparent 58%),
    rgba(6, 16, 28, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

body.sc-public-page .sc-dates-path__marker {
  position: absolute;
  z-index: 3;
  top: 1.15rem;
  left: 1.15rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid currentColor;
  background: rgba(3, 9, 19, 0.92);
  box-shadow: 0 0 0 4px rgba(3, 9, 19, 0.9);
  color: var(--sc-dates-node-accent);
  font-family: var(--sc-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
}

body.sc-public-page .sc-dates-path__when {
  display: block;
  margin: 0 0 0.65rem;
  color: var(--sc-dates-node-accent);
  font-family: var(--sc-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

body.sc-public-page .node__content .sc-dates-path__title {
  margin: 0 0 0.5rem;
  color: #f6f9fc;
  font-size: clamp(1.05rem, 1.65vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

body.sc-public-page .node__content .sc-dates-path__title a {
  color: inherit;
  text-decoration: none;
}

body.sc-public-page .sc-dates-path__title a:hover,
body.sc-public-page .sc-dates-path__title a:focus-visible {
  color: var(--sc-dates-node-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body.sc-public-page .sc-dates-path__desc {
  margin: auto 0 0;
  color: var(--sc-text-muted);
  font-size: 0.875rem;
  line-height: 1.48;
}

/* The route moves across each row, then drops to the next row. */
body.sc-public-page .sc-dates-path__node::after {
  position: absolute;
  z-index: 0;
  top: 2.1rem;
  right: calc(var(--sc-dates-route-gap) * -1);
  width: var(--sc-dates-route-gap);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--sc-dates-node-accent), var(--sc-peak-green-bright), var(--sc-dates-node-accent));
  background-size: 220% 100%;
  box-shadow: 0 0 10px color-mix(in srgb, var(--sc-dates-node-accent) 54%, transparent);
  animation: sc-dates-route-flow 4.8s linear infinite;
}

body.sc-public-page .sc-dates-path__node:nth-child(3n)::after {
  top: calc(100% - 2px);
  right: 1.95rem;
  width: 2px;
  height: var(--sc-dates-route-gap);
  background: linear-gradient(180deg, var(--sc-dates-node-accent), var(--sc-peak-green-bright), var(--sc-dates-node-accent));
  background-size: 100% 220%;
}

body.sc-public-page .sc-dates-path__node:last-child::after {
  display: none;
}

/* Reverse every other desktop row so the route has a continuous zig-zag. */
body.sc-public-page .sc-dates-path__node--step-1,
body.sc-public-page .sc-dates-path__node--step-7 {
  grid-column: 1;
}

body.sc-public-page .sc-dates-path__node--step-2,
body.sc-public-page .sc-dates-path__node--step-8 {
  grid-column: 2;
}

body.sc-public-page .sc-dates-path__node--step-3,
body.sc-public-page .sc-dates-path__node--step-4,
body.sc-public-page .sc-dates-path__node--step-9,
body.sc-public-page .sc-dates-path__node--step-10 {
  grid-column: 3;
}

body.sc-public-page .sc-dates-path__node--step-5 {
  grid-column: 2;
}

body.sc-public-page .sc-dates-path__node--step-6 {
  grid-column: 1;
}

body.sc-public-page .sc-dates-path__node--step-1,
body.sc-public-page .sc-dates-path__node--step-2,
body.sc-public-page .sc-dates-path__node--step-3 {
  grid-row: 1;
}

body.sc-public-page .sc-dates-path__node--step-4,
body.sc-public-page .sc-dates-path__node--step-5,
body.sc-public-page .sc-dates-path__node--step-6 {
  grid-row: 2;
}

body.sc-public-page .sc-dates-path__node--step-7,
body.sc-public-page .sc-dates-path__node--step-8,
body.sc-public-page .sc-dates-path__node--step-9 {
  grid-row: 3;
}

body.sc-public-page .sc-dates-path__node--step-10 {
  grid-row: 4;
}

body.sc-public-page .sc-dates-path__node--step-3::after,
body.sc-public-page .sc-dates-path__node--step-6::after,
body.sc-public-page .sc-dates-path__node--step-9::after {
  right: 1.95rem;
}

body.sc-public-page .sc-dates-path__node--step-4::after,
body.sc-public-page .sc-dates-path__node--step-5::after {
  right: auto;
  left: calc(var(--sc-dates-route-gap) * -1);
  background: linear-gradient(90deg, var(--sc-dates-node-accent), var(--sc-peak-green-bright), var(--sc-dates-node-accent));
  background-size: 220% 100%;
}

body.sc-public-page .sc-dates-path__node.is-past {
  --sc-dates-node-accent: #718091;
  --sc-dates-node-soft: rgba(113, 128, 145, 0.07);
}

body.sc-public-page .sc-dates-path__node.is-past .sc-dates-path__card {
  border-color: rgba(140, 151, 163, 0.34);
  background: rgba(13, 22, 33, 0.7);
  box-shadow: none;
  opacity: 0.52;
}

body.sc-public-page .sc-dates-path__node.is-past .sc-dates-path__marker {
  color: #8894a0;
}

body.sc-public-page .sc-dates-path__node.is-past::after {
  animation: none;
  background: rgba(130, 142, 154, 0.42);
  box-shadow: none;
}

body.sc-public-page .sc-dates-path__node.is-current {
  z-index: 4;
}

body.sc-public-page .sc-dates-path__node.is-current .sc-dates-path__card {
  border-color: var(--sc-brand-yellow);
  background:
    linear-gradient(135deg, rgba(251, 187, 15, 0.18), transparent 60%),
    rgba(14, 27, 34, 0.98);
  box-shadow: 0 0 0 1px rgba(251, 187, 15, 0.24), 0 0 26px rgba(251, 187, 15, 0.18);
  transform: translateY(-0.35rem);
}

body.sc-public-page .sc-dates-path__node.is-current .sc-dates-path__marker {
  border-color: var(--sc-brand-yellow);
  background: var(--sc-brand-yellow);
  box-shadow: 0 0 0 4px rgba(3, 9, 19, 0.9), 0 0 21px rgba(251, 187, 15, 0.52);
  color: var(--sc-bg-deep);
}

body.sc-public-page .sc-dates-path__node.is-current .sc-dates-path__when {
  color: var(--sc-brand-yellow);
}

body.sc-public-page .sc-dates-path__node.is-upcoming .sc-dates-path__card {
  opacity: 0.86;
}

body.sc-public-page .sc-dates-path__node:hover .sc-dates-path__card,
body.sc-public-page .sc-dates-path__node:focus-within .sc-dates-path__card {
  border-color: var(--sc-dates-node-accent);
  transform: translateY(-0.2rem);
}

body.sc-public-page .sc-dates-path--deadlines {
  grid-auto-rows: minmax(8.75rem, auto);
}

body.sc-public-page .sc-dates-path--deadlines .sc-dates-path__card {
  padding-bottom: 1rem;
}

body.sc-public-page .sc-dates-path--deadlines .sc-dates-path__desc {
  display: none;
}

@keyframes sc-dates-route-flow {
  to {
    background-position: -220% 0;
  }
}

@media (max-width: 767px) {
  body.sc-public-page .sc-dates-path {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  body.sc-public-page .sc-dates-path__node,
  body.sc-public-page .sc-dates-path__node--step-1,
  body.sc-public-page .sc-dates-path__node--step-2,
  body.sc-public-page .sc-dates-path__node--step-3,
  body.sc-public-page .sc-dates-path__node--step-4,
  body.sc-public-page .sc-dates-path__node--step-5,
  body.sc-public-page .sc-dates-path__node--step-6,
  body.sc-public-page .sc-dates-path__node--step-7,
  body.sc-public-page .sc-dates-path__node--step-8,
  body.sc-public-page .sc-dates-path__node--step-9,
  body.sc-public-page .sc-dates-path__node--step-10 {
    width: 100%;
  }

  body.sc-public-page .sc-dates-path__node::after,
  body.sc-public-page .sc-dates-path__node:nth-child(3n)::after {
    top: calc(100% - 1px);
    right: auto;
    bottom: auto;
    left: 2.15rem;
    width: 2px;
    height: 1rem;
    background: linear-gradient(180deg, var(--sc-dates-node-accent), var(--sc-peak-green-bright), var(--sc-dates-node-accent));
    background-size: 100% 220%;
  }

  body.sc-public-page .sc-dates-path__card {
    min-height: 0;
  }

  body.sc-public-page .sc-dates-path__node.is-current .sc-dates-path__card {
    transform: none;
  }
}

@media (min-width: 1024px) {
  /* Match the recovered concept: three roomy stations distributed across the
   * entire desktop rail, with a visibly long animated connection between them. */
  body.sc-public-page .sc-dates-path {
    --sc-dates-route-gap: clamp(2.5rem, 5vw, 5.5rem);
    grid-auto-rows: minmax(9.25rem, auto);
  }

  body.sc-public-page .sc-dates-path__card {
    padding: 1.2rem 1.3rem 1.2rem 4.15rem;
  }

  body.sc-public-page .sc-dates-path__marker {
    top: 1.2rem;
    left: 1.3rem;
  }

  body.sc-public-page .sc-dates-path--deadlines {
    grid-auto-rows: minmax(7.9rem, auto);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sc-public-page .sc-dates-path__node::after {
    animation: none;
  }

  body.sc-public-page .sc-dates-path__card {
    transition: none;
  }
}
