/* Science page refinements requested after visual review — v48 */

/* Hero heading: preserve the strong three-line structure while giving each line
   enough air to read as a deliberate editorial composition. */
body.science-v48 .science-hero h1 {
  display: flex !important;
  flex-direction: column !important;
  row-gap: .105em !important;
  line-height: .92 !important;
}
body.science-v48 .science-hero h1 > span {
  display: block !important;
  line-height: .92 !important;
}
body.science-v48 .science-hero h1 > .science-hero__accent {
  margin-top: .005em;
}

/* Restore the original, wider thymus GIF rather than the later tightly cropped
   version. The surrounding circular system is retained. */
body.science-v48 .science-hero__visual {
  width: min(100%, 550px) !important;
  aspect-ratio: 1 / 1 !important;
  background: radial-gradient(circle at 50% 45%, rgba(166,31,53,.2), rgba(16,16,19,.88) 67%, rgba(8,9,10,.96) 100%) !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  filter: none !important;
}
body.science-v48 .science-hero__visual::before {
  inset: 5.5% !important;
}
body.science-v48 .science-hero__visual::after {
  inset: 11% !important;
  opacity: 1 !important;
  background-image: url('../media/the-science/backgrounds/thymus-background.gif') !important;
  background-size: cover !important;
  background-position: 82% center !important;
  filter: saturate(.9) contrast(1.02) brightness(.94);
}

/* Hero information rail: no numbered circles. Each item is now a compact title
   and one concise explanatory line. */
body.science-v48 .science-proof-rail article {
  min-height: 104px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 21px clamp(20px, 2.35vw, 36px) !important;
}
body.science-v48 .science-proof-rail article:first-child {
  padding-left: 0 !important;
}
body.science-v48 .science-proof-rail article > strong {
  display: block;
  color: rgba(255,255,255,.96) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em !important;
}
body.science-v48 .science-proof-rail article > small {
  display: block;
  max-width: none !important;
  margin: 0 !important;
  color: rgba(255,255,255,.57) !important;
  font-size: 11.25px !important;
  line-height: 1.42 !important;
}

/* Film: copy on the left, animated cell journey on the right. */
body.science-v48 .thymus-film {
  min-height: 570px !important;
  grid-template-columns: minmax(390px, .88fr) minmax(500px, 1.12fr) !important;
  background: #101113 !important;
}
body.science-v48 .thymus-film__copy {
  order: 1;
  padding: clamp(48px, 5.2vw, 76px) !important;
  border-right: 1px solid rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 12% 14%, rgba(164,35,55,.22), transparent 34%),
    linear-gradient(145deg, rgba(42,20,27,.98), rgba(19,17,21,.99)) !important;
}
body.science-v48 .thymus-film__copy h3 {
  max-width: 11.5ch !important;
}
body.science-v48 .thymus-film__visual {
  order: 2;
  min-height: 570px !important;
  position: relative !important;
  display: grid;
  place-items: center;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 80% 47%, rgba(217,156,92,.14), transparent 26%),
    radial-gradient(circle at 42% 52%, rgba(143,35,57,.17), transparent 34%),
    radial-gradient(circle at 14% 48%, rgba(42,111,150,.22), transparent 32%),
    linear-gradient(135deg, #07141b 0%, #10151c 48%, #1c1015 100%) !important;
}
body.science-v48 .thymus-film__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, #000 25%, transparent 78%);
}
body.science-v48 .thymus-film__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,9,12,.28), transparent 24%, transparent 72%, rgba(5,7,10,.42));
}
body.science-v48 .cell-journey__label {
  position: absolute;
  top: 28px;
  left: 30px;
  z-index: 4;
  color: var(--science-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
body.science-v48 .cell-journey__svg {
  position: relative;
  z-index: 2;
  display: block;
  width: min(94%, 760px);
  height: auto;
  overflow: visible;
}
body.science-v48 .cell-journey__gate {
  transform-origin: 428px 277px;
  animation: scienceGatePulse 4.6s ease-in-out infinite;
}
body.science-v48 .cell-journey__mature {
  transform-origin: 665px 290px;
  animation: scienceMaturePulse 3.8s ease-in-out infinite;
}
body.science-v48 .cell-journey__stages {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 27px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
body.science-v48 .cell-journey__stages > div {
  min-height: 54px;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 12px;
  background: rgba(7,11,15,.58);
  backdrop-filter: blur(8px);
}
body.science-v48 .cell-journey__stages span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230,184,111,.26);
  border-radius: 50%;
  color: var(--science-gold);
  font-size: 8px;
  font-weight: 800;
}
body.science-v48 .cell-journey__stages strong {
  color: rgba(255,255,255,.85);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
}

@keyframes scienceGatePulse {
  0%, 100% { transform: scale(1); opacity: .88; }
  50% { transform: scale(1.035); opacity: 1; }
}
@keyframes scienceMaturePulse {
  0%, 100% { transform: scale(1); opacity: .78; }
  50% { transform: scale(1.045); opacity: 1; }
}

@media (max-width: 1100px) {
  body.science-v48 .science-hero__visual {
    width: min(100%, 500px) !important;
  }
  body.science-v48 .science-proof-rail article:first-child,
  body.science-v48 .science-proof-rail article:nth-child(3) {
    padding-left: 0 !important;
  }
  body.science-v48 .thymus-film {
    grid-template-columns: 1fr !important;
  }
  body.science-v48 .thymus-film__copy {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  body.science-v48 .thymus-film__visual {
    min-height: 500px !important;
  }
}

@media (max-width: 760px) {
  body.science-v48 .science-hero h1 {
    row-gap: .09em !important;
    line-height: .94 !important;
  }
  body.science-v48 .science-hero h1 > span {
    width: auto !important;
    white-space: normal !important;
    line-height: .94 !important;
  }
  body.science-v48 .science-hero__visual {
    width: min(92vw, 390px) !important;
    aspect-ratio: 1 / 1 !important;
    background-size: auto !important;
  }
  body.science-v48 .science-hero__visual::after {
    inset: 10.5% !important;
  }
  body.science-v48 .science-proof-rail article {
    min-height: 78px !important;
    gap: 6px !important;
    padding: 16px 0 !important;
  }
  body.science-v48 .science-proof-rail article > strong {
    font-size: 12.5px !important;
  }
  body.science-v48 .science-proof-rail article > small {
    font-size: 11px !important;
  }
  body.science-v48 .thymus-film__copy {
    padding: 34px 24px 40px !important;
  }
  body.science-v48 .thymus-film__visual {
    min-height: 390px !important;
  }
  body.science-v48 .cell-journey__label {
    top: 20px;
    left: 20px;
  }
  body.science-v48 .cell-journey__svg {
    width: 112%;
    margin-top: -14px;
  }
  body.science-v48 .cell-journey__stages {
    left: 16px;
    right: 16px;
    bottom: 16px;
    gap: 6px;
  }
  body.science-v48 .cell-journey__stages > div {
    min-height: 48px;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 7px;
    text-align: center;
  }
  body.science-v48 .cell-journey__stages span {
    display: none;
  }
  body.science-v48 .cell-journey__stages strong {
    font-size: 8.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.science-v48 .cell-journey__gate,
  body.science-v48 .cell-journey__mature {
    animation: none !important;
  }
  body.science-v48 .cell-journey__travellers {
    display: none;
  }
}
