/*
 * Agreed prototype migration:
 * - silver official spine, diamond official junctions and silver card starts
 * - equal official-date typography across scheduled and recorded items
 * - a slightly bluer prediction axis and connectors
 * - borderless prediction cards whose background dissolves into the scene
 */

html[data-crossroad-phase="prelaunch"] {
  --agreed-official-silver: #dce8ee;
  --agreed-official-date: rgba(169, 183, 191, .9);
  --agreed-official-rest-opacity: .44;
  --agreed-prediction-ice: #74caf5;
  --agreed-prediction-ice-bright: #a9e2ff;
}

/* Official is a narrow, hard silver spine rather than another blue light. */
html[data-crossroad-phase="prelaunch"] .actual-spine::before {
  width: 2px;
  opacity: .94;
  background: linear-gradient(
    rgba(238, 246, 249, .84),
    var(--agreed-official-silver) 22%,
    rgba(220, 232, 238, .88) 74%,
    rgba(220, 232, 238, .52) 96%,
    transparent
  );
  box-shadow:
    0 0 7px rgba(220, 232, 238, .16),
    0 0 24px rgba(220, 232, 238, .07);
}

/* Shared official grammar: silver tether, diamond junction, silver leading edge. */
html[data-crossroad-phase="prelaunch"] .latest-official,
html[data-crossroad-phase="prelaunch"] .official-event,
html[data-crossroad-phase="prelaunch"] .future-official-card {
  border-left: 2px solid var(--agreed-official-silver) !important;
}

/*
 * Official frame geometry belongs to crossroad-official-frames.css.
 * This file owns the resting surface and its attachment to the agreed axis.
 * Reading/selection reactions remain in crossroad-world-physics.css.
 */
html[data-crossroad-phase="prelaunch"] .latest-official,
html[data-crossroad-phase="prelaunch"] .official-event {
  isolation: isolate;
  border-top: 1px solid rgba(185, 220, 237, .14);
  border-right-color: transparent;
  border-bottom-color: transparent;
  background:
    linear-gradient(90deg, rgba(8, 22, 31, .88), rgba(3, 9, 14, .64) 70%, transparent),
    radial-gradient(ellipse 66% 120% at 0 24%, rgba(130, 205, 252, .075), transparent 64%);
  box-shadow:
    inset 1px 0 0 rgba(220, 242, 253, .09),
    -8px 0 26px rgba(130, 205, 252, .025);
  opacity: var(--agreed-official-rest-opacity);
  translate: 0 0;
  transition:
    opacity .42s ease,
    translate .52s cubic-bezier(.2, .72, .22, 1),
    border-color .42s ease,
    box-shadow .42s ease,
    filter .42s ease;
}

/* The travelling light may animate the card face, but its timeline tether is
   fixed geometry. Keep the connector anchored and solid during the hit too. */
html[data-crossroad-phase="prelaunch"] .latest-official::before,
html[data-crossroad-phase="prelaunch"] .official-event::before {
  top: 35px !important;
  width: 48px !important;
  height: 1px !important;
  background: linear-gradient(
    90deg,
    rgba(220, 232, 238, .82),
    rgba(220, 232, 238, .22)
  ) !important;
  clip-path: none !important;
  transform: none !important;
  box-shadow: none !important;
  animation: none !important;
  opacity: .4;
  transition: opacity .38s ease, box-shadow .38s ease;
}

html[data-crossroad-phase="prelaunch"] .future-official-card::before {
  top: 24px !important;
  width: 48px !important;
  height: 1px !important;
  background: linear-gradient(
    90deg,
    rgba(220, 232, 238, .82),
    rgba(220, 232, 238, .22)
  ) !important;
  clip-path: none !important;
  transform: none !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Recorded official items use a filled diamond. */
html[data-crossroad-phase="prelaunch"] .latest-official::after,
html[data-crossroad-phase="prelaunch"] .official-event::after {
  display: block !important;
  width: 8px;
  height: 8px;
  top: 31px;
  right: calc(100% + 50px);
  border: 1px solid rgba(245, 249, 251, .88);
  border-radius: 0;
  background: var(--agreed-official-silver);
  box-shadow: 0 0 11px rgba(220, 232, 238, .18);
  transform: rotate(45deg);
  animation: none !important;
  transition: background .32s ease, box-shadow .32s ease;
}

/* Scheduled official items use the same diamond, left hollow until the date arrives. */
html[data-crossroad-phase="prelaunch"] .future-official-card::after {
  display: block !important;
  width: 8px;
  height: 8px;
  top: 19px;
  right: calc(100% + 50px);
  border: 1px solid var(--agreed-official-silver);
  border-radius: 0;
  background: #07131f;
  box-shadow: 0 0 10px rgba(220, 232, 238, .12) !important;
  transform: rotate(45deg);
  animation: none !important;
}

/* Scheduled and recorded official dates are intentionally equal in size and tone. */
html[data-crossroad-phase="prelaunch"] .latest-head .official-date,
html[data-crossroad-phase="prelaunch"] .official-event > .official-date,
html[data-crossroad-phase="prelaunch"] .future-official-card > .official-date {
  color: var(--agreed-official-date);
  font: 650 25px/.9 "Bahnschrift Condensed", "Arial Narrow", var(--mono);
  font-stretch: condensed;
  letter-spacing: .1em;
  text-shadow: none;
  transform: scaleX(.8);
  transform-origin: right center;
}

html[data-crossroad-phase="prelaunch"] .official-date-main {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

/* Prediction is one continuous ice-blue horizontal direction. */
html[data-crossroad-phase="prelaunch"] .prediction-line {
  height: 1px;
  opacity: 1;
  background: linear-gradient(
    90deg,
    transparent 0,
    rgba(80, 178, 230, .34) 3%,
    var(--agreed-prediction-ice) var(--axis-x),
    rgba(91, 188, 237, .76) 100%
  ) !important;
  box-shadow:
    0 0 8px rgba(116, 202, 245, .2),
    0 0 22px rgba(116, 202, 245, .07) !important;
  -webkit-mask-image: none;
  mask-image: none;
}

html[data-crossroad-phase="prelaunch"] .prediction-line::before {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(76, 177, 230, .025) 30%,
    rgba(116, 202, 245, .085) 54%,
    rgba(76, 177, 230, .025) 70%,
    transparent
  );
}

/* The connector shares the axis colour; the information surface itself has no frame. */
html[data-crossroad-phase="prelaunch"] .rail .prediction-card:not(.add-card)::before {
  background:
    radial-gradient(
      circle at 50% 8px,
      var(--agreed-prediction-ice-bright) 0 1.5px,
      var(--agreed-prediction-ice) 2px 3.1px,
      transparent 4.1px
    ),
    linear-gradient(
      rgba(116, 202, 245, .82),
      rgba(116, 202, 245, .18)
    ) 50% 12px / 1px calc(100% - 12px) no-repeat !important;
}

html[data-crossroad-phase="prelaunch"] .prediction-card:not(.add-card),
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform:not(.add-card),
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform.is-light-near:not(.add-card),
html[data-crossroad-phase="prelaunch"] .prediction-card.is-featured:not(.add-card),
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform.is-light-primary:not(.add-card),
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform:not(.add-card):hover,
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform:not(.add-card):focus-visible {
  border: 0 !important;
  background: radial-gradient(
    ellipse 98% 128% at 46% 48%,
    rgba(3, 11, 18, .96) 0,
    rgba(3, 11, 18, .86) 56%,
    rgba(3, 11, 18, .42) 78%,
    transparent 100%
  ) !important;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, .22),
    0 0 24px rgba(55, 135, 177, .025) !important;
}

html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform.is-light-primary:not(.add-card),
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform:not(.add-card):hover,
html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform:not(.add-card):focus-visible {
  background: radial-gradient(
    ellipse 98% 128% at 46% 48%,
    rgba(5, 17, 27, .98) 0,
    rgba(5, 17, 27, .9) 56%,
    rgba(5, 17, 27, .45) 78%,
    transparent 100%
  ) !important;
  box-shadow:
    0 20px 38px rgba(0, 0, 0, .28),
    0 0 28px rgba(116, 202, 245, .055) !important;
}

html[data-crossroad-phase="prelaunch"] .prediction-card.lod-uniform:not(.add-card):focus-visible {
  outline: 1px solid rgba(116, 202, 245, .7);
  outline-offset: 4px;
}

/* Keep every date on the vertical axis at one shared size. TODAY remains the
   primary anchor through brightness, not a larger type scale. */
@media (min-width: 761px) and (max-width: 1100px) {
  html[data-crossroad-phase="prelaunch"] .latest-head .official-date,
  html[data-crossroad-phase="prelaunch"] .official-event > .official-date,
  html[data-crossroad-phase="prelaunch"] .future-official-card > .official-date,
  html[data-crossroad-phase="prelaunch"] .present-marker .origin-today {
    font-size: 20px;
    letter-spacing: .075em;
  }

  html[data-crossroad-phase="prelaunch"] .official-date-offset {
    font-size: 10px;
    letter-spacing: .11em;
  }

  html[data-crossroad-phase="prelaunch"] .surface-launch > span {
    font-size: 12px;
    letter-spacing: .13em;
  }

  html[data-crossroad-phase="prelaunch"] .surface-launch strong {
    font-size: 20px;
    letter-spacing: .075em;
  }
}

@media (max-width: 760px) {
  html[data-crossroad-phase="prelaunch"] .latest-official:not(.is-light-hit)::before,
  html[data-crossroad-phase="prelaunch"] .official-event:not(.is-light-hit)::before,
  html[data-crossroad-phase="prelaunch"] .future-official-card:not(.is-light-hit)::before {
    width: 26px !important;
  }

  html[data-crossroad-phase="prelaunch"] .latest-official::after,
  html[data-crossroad-phase="prelaunch"] .official-event::after {
    right: calc(100% + 28px);
  }

  html[data-crossroad-phase="prelaunch"] .latest-head .official-date,
  html[data-crossroad-phase="prelaunch"] .official-event > .official-date,
  html[data-crossroad-phase="prelaunch"] .future-official-card > .official-date {
    font-size: clamp(18px, 2.65vw, 20px);
    letter-spacing: .075em;
  }

  html[data-crossroad-phase="prelaunch"] .official-date-offset {
    font-size: 10px;
    letter-spacing: .1em;
  }

  html[data-crossroad-phase="prelaunch"] .surface-launch > span {
    font-size: clamp(10px, 1.6vw, 12px);
    letter-spacing: .12em;
  }

  html[data-crossroad-phase="prelaunch"] .surface-launch strong {
    font-size: clamp(18px, 2.65vw, 20px);
    letter-spacing: .075em;
  }

  html[data-crossroad-phase="prelaunch"] .present-marker .origin-today {
    font-size: clamp(18px, 2.65vw, 20px);
    letter-spacing: .075em;
  }
}

@media (max-width: 500px) {
  html[data-crossroad-phase="prelaunch"] .present-marker .origin-today {
    right: calc(50% + 4px);
  }
}
html[data-crossroad-phase="prelaunch"] .latest-official .official-card-copy > p,
html[data-crossroad-phase="prelaunch"] .official-event .official-card-copy > p {
  font-size: 12px;
}
