/* Integrated Human Practices — the cycle display.
   One photograph on the left, one scrolling N-A-I-L panel on the right, for
   each of the fourteen documented cycles on the iHP page. Loaded from that
   page's own extra_css block, so it stacks on top of science-content.css and
   student-article.css and leaves the shared stylesheets untouched. */

.student-ihp-page .science-story {
  /* Clearance for the fixed site navigation. The sticky photograph parks here
     while its cycle is being read. */
  --hp-photo-top: 108px;
}

/* ---------------------------------------------------------- cycle columns */
.student-ihp-page .science-story .hp-cycle {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.3rem, 3.2vw, 3.2rem);
  align-items: start;
  margin: 0 0 2.6rem;
  padding: 1.7rem 0 0;
  border-top: 1px solid rgba(26, 51, 82, .16);
}
.student-ihp-page .science-story .hp-cycle:first-of-type { padding-top: 0; border-top: 0; }

/* ------------------------------------------------------------ photograph */
.student-ihp-page .science-story .hp-cycle__media {
  position: sticky;
  top: var(--hp-photo-top);
  align-self: start;
}
.student-ihp-page .science-story .hp-cycle__shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(26, 51, 82, .2);
  border-radius: 18px;
  background: #fffdf6;
}
.student-ihp-page .science-story .hp-cycle__zoom { display: block; line-height: 0; background: #f2eddd; }
.student-ihp-page .science-story .hp-cycle__shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f2eddd;
}
.student-ihp-page .science-story .hp-cycle__shot figcaption {
  padding: .9rem 1.05rem 1rem;
  border-top: 1px solid rgba(26, 51, 82, .14);
  font-size: .82rem;
  line-height: 1.6;
  color: #31516b;
}
.student-ihp-page .science-story .hp-cycle__shot figcaption strong {
  display: block;
  margin-bottom: .3rem;
  font: 600 .67rem/1.6 var(--font-nav);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #74568a;
}

/* Each cycle points at a photograph the team supplies later. Until the file
   exists the frame keeps its shape and says so instead of showing a broken
   image; hp-cycles.js adds .is-missing when the file cannot be loaded. */
.student-ihp-page .science-story .hp-cycle__shot.is-missing img { display: none; }
.student-ihp-page .science-story .hp-cycle__shot.is-missing .hp-cycle__zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  aspect-ratio: 4 / 5;
  cursor: default;
  background: repeating-linear-gradient(135deg, rgba(26, 51, 82, .05) 0 12px, rgba(26, 51, 82, .1) 12px 24px);
}
.student-ihp-page .science-story .hp-cycle__shot.is-missing .hp-cycle__zoom::after {
  content: "Photo pending";
  text-align: center;
  font: 600 .68rem/1.7 var(--font-nav);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #62788c;
}

/* ----------------------------------------------------------- cycle panel */
.student-ihp-page .science-story .hp-cycle__body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .95rem;
  max-height: min(78vh, 840px);
}
.student-ihp-page .science-story .hp-cycle__title {
  margin: 0;
  padding-left: .95rem;
  border-left: 3px solid #b78b17;
  font-size: 1.34rem;
  line-height: 1.3;
}
.student-ihp-page .science-story .hp-cycle__body > .science-grid {
  display: block;
  margin: 0;
  padding: 2px .75rem 2px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
  counter-reset: hp-step;
}
.student-ihp-page .science-story .hp-cycle__body .science-card {
  position: relative;
  margin: 0 0 1rem;
  padding: 1.35rem 1.5rem 1.35rem 3.6rem;
  counter-increment: hp-step;
  scroll-snap-align: start;
  transition: border-color .25s ease, background-color .25s ease;
}
.student-ihp-page .science-story .hp-cycle__body .science-card:last-child { margin-bottom: 0; }
.student-ihp-page .science-story .hp-cycle__body .science-card::before {
  content: counter(hp-step, decimal-leading-zero);
  position: absolute;
  top: 1.5rem;
  left: 1.2rem;
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1;
  color: #b78b17;
}
.student-ihp-page .science-story .hp-cycle__body .science-card > p:first-child {
  margin: 0 0 .55rem;
  font: 600 .7rem/1.7 var(--font-nav);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #365c5f;
}
.student-ihp-page .science-story .hp-cycle__body .science-card.is-current {
  border-color: rgba(183, 139, 23, .5);
  background: rgba(255, 250, 232, .92);
}

/* ---------------------------------------------------------- small screens */
@media (max-width: 999px) {
  .student-ihp-page .science-story .hp-cycle {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
    margin-bottom: 2rem;
    padding-top: 1.3rem;
  }
  .student-ihp-page .science-story .hp-cycle__media { position: static; }
  .student-ihp-page .science-story .hp-cycle__shot img { aspect-ratio: 16 / 10; }
  .student-ihp-page .science-story .hp-cycle__shot.is-missing .hp-cycle__zoom { min-height: 0; aspect-ratio: 16 / 10; }
  .student-ihp-page .science-story .hp-cycle__body { max-height: none; }
  .student-ihp-page .science-story .hp-cycle__body > .science-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .student-ihp-page .science-story .hp-cycle__body .science-card { margin: 0; }
  .student-ihp-page .science-story .hp-cycle__body .science-card::before { top: 1.2rem; }
}
@media (max-width: 575px) {
  .student-ihp-page .science-story .hp-cycle__title { font-size: 1.18rem; }
  .student-ihp-page .science-story .hp-cycle__body > .science-grid { grid-template-columns: minmax(0, 1fr); }
  .student-ihp-page .science-story .hp-cycle__body .science-card { padding: 1.2rem 1.15rem 1.2rem 3.2rem; }
  .student-ihp-page .science-story .hp-cycle__body .science-card::before { left: 1rem; font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) {
  .student-ihp-page .science-story .hp-cycle__body .science-card { transition: none; }
}

/* ============================================================
   Five-stage chart
   A ring of original pastel shapes echoing the reference layout.
   Sizes are container-relative so the orbit holds its proportions
   from tablet down to the 40rem card breakpoint.
   ============================================================ */

.student-ihp-page .science-story .hp-stage-chart {
  margin: 1.6rem 0 0;
}

.student-ihp-page .science-story .hp-stage-cycle {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 64;
  container-type: inline-size;
}

/* The yellow note in the middle of the ring. */
.student-ihp-page .science-story .hp-stage-chart-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 34%;
  margin: 0;
  padding: clamp(.7rem, 1.6cqi, 1.15rem) clamp(.65rem, 1.5cqi, 1.1rem);
  transform: translate(-50%, -50%) rotate(-2deg);
  border: 1.5px solid #dfb953;
  border-radius: 16px;
  background: #fff3cf;
  color: #58451e;
  box-shadow: 4px 5px 0 rgba(183, 139, 42, .22);
  font: 600 clamp(.7rem, 1.02cqi, .8rem)/1.55 var(--font-nav);
  letter-spacing: .02em;
  text-align: center;
}
.student-ihp-page .science-story .hp-stage-chart-hint span {
  display: block;
  margin-top: .25rem;
  font-size: .88em;
  font-weight: 500;
  letter-spacing: .04em;
  opacity: .78;
}

/* ------------------------------------------------------ stage buttons */
.student-ihp-page .science-story .hp-stage-chart-btn {
  position: absolute;
  left: var(--hp-stage-x);
  top: var(--hp-stage-y);
  z-index: 1;
  width: var(--hp-stage-w);
  aspect-ratio: var(--hp-stage-ratio);
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.student-ihp-page .science-story .hp-stage-chart-btn:focus { outline: none; }

.student-ihp-page .science-story .hp-stage-chart-btn--1 {
  --hp-stage-x: 46%;
  --hp-stage-y: 21.49%;
  --hp-stage-w: 41.96%;
  --hp-stage-ratio: 951 / 472;
  --hp-stage-bg: #f7c9d3;
  --hp-stage-radius: 58% 42% 55% 45% / 47% 56% 44% 53%;
}
.student-ihp-page .science-story .hp-stage-chart-btn--2 {
  --hp-stage-x: 82.23%;
  --hp-stage-y: 41.28%;
  --hp-stage-w: 35.53%;
  --hp-stage-ratio: 880 / 900;
  --hp-stage-bg: #cbefe2;
  --hp-stage-radius: 52% 48% 45% 55% / 58% 47% 53% 42%;
}
.student-ihp-page .science-story .hp-stage-chart-btn--3 {
  --hp-stage-x: 75.16%;
  --hp-stage-y: 79.47%;
  --hp-stage-w: 37.84%;
  --hp-stage-ratio: 937 / 600;
  --hp-stage-bg: #f8e3a3;
  --hp-stage-radius: 45% 55% 58% 42% / 53% 44% 56% 47%;
}
.student-ihp-page .science-story .hp-stage-chart-btn--4 {
  --hp-stage-x: 35.59%;
  --hp-stage-y: 80.65%;
  --hp-stage-w: 37.96%;
  --hp-stage-ratio: 940 / 530;
  --hp-stage-bg: #dcd3ef;
  --hp-stage-radius: 57% 43% 48% 52% / 45% 55% 45% 55%;
}
.student-ihp-page .science-story .hp-stage-chart-btn--5 {
  --hp-stage-x: 14.13%;
  --hp-stage-y: 41.68%;
  --hp-stage-w: 28.27%;
  --hp-stage-ratio: 700 / 756;
  --hp-stage-bg: #f6d3b3;
  --hp-stage-radius: 50% 50% 54% 46% / 57% 45% 55% 43%;
}

/* ------------------------------------------------------ blob surfaces */
.student-ihp-page .science-story .hp-stage-blob {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.12rem, .35cqi, .25rem);
  padding: 11% 12%;
  overflow: hidden;
  border: 1.5px solid rgba(26, 51, 82, .2);
  border-radius: var(--hp-stage-radius);
  background-color: var(--hp-stage-bg);
  background-image:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .5), transparent 38%),
    radial-gradient(rgba(26, 51, 82, .07) 1px, transparent 1px);
  background-size: auto, 11px 11px;
  box-shadow: 0 10px 22px rgba(26, 51, 82, .13);
  text-align: center;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.student-ihp-page .science-story .hp-stage-blob::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(26, 51, 82, .28);
  border-radius: inherit;
  opacity: .55;
  pointer-events: none;
}

.student-ihp-page .science-story .hp-stage-chart-num,
.student-ihp-page .science-story .hp-stage-chart-name,
.student-ihp-page .science-story .hp-stage-chart-cn {
  position: relative;
  z-index: 1;
}
.student-ihp-page .science-story .hp-stage-chart-num {
  font: 600 clamp(.58rem, .86cqi, .7rem)/1.2 var(--font-nav);
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .72;
}
.student-ihp-page .science-story .hp-stage-chart-name {
  max-width: 92%;
  font: 600 clamp(.82rem, 1.42cqi, 1.1rem)/1.12 var(--font-heading);
  letter-spacing: .01em;
  text-wrap: balance;
}
.student-ihp-page .science-story .hp-stage-chart-cn {
  font: 500 clamp(.64rem, .95cqi, .75rem)/1.35 var(--font-body);
  letter-spacing: .08em;
  opacity: .7;
}

.student-ihp-page .science-story .hp-stage-chart-btn:hover .hp-stage-blob,
.student-ihp-page .science-story .hp-stage-chart-btn:focus-visible .hp-stage-blob {
  transform: translateY(-4px);
  border-color: rgba(26, 51, 82, .38);
  box-shadow: 0 16px 26px rgba(26, 51, 82, .17);
}
.student-ihp-page .science-story .hp-stage-chart-btn:focus-visible .hp-stage-blob {
  outline: 3px solid var(--navy);
  outline-offset: 5px;
}
.student-ihp-page .science-story .hp-stage-chart-btn.is-active .hp-stage-blob {
  transform: translateY(-4px);
  border-color: var(--navy);
  box-shadow:
    0 0 0 3px rgba(31, 66, 107, .15),
    0 16px 26px rgba(26, 51, 82, .18);
}

/* ------------------------------------------------------ detail textbox */
.student-ihp-page .science-story .hp-stage-chart-textbox {
  max-width: 54rem;
  margin: 1.35rem auto 0;
  padding: clamp(1rem, 2.4vw, 1.45rem) clamp(1.1rem, 2.8vw, 1.7rem);
  border: 1px solid rgba(26, 51, 82, .2);
  border-left: 4px solid #ddb655;
  border-radius: 18px;
  background: rgba(255, 253, 246, .86);
  box-shadow: 0 8px 20px rgba(26, 51, 82, .08);
}
.student-ihp-page .science-story .hp-stage-chart-textbox:focus { outline: none; }
.student-ihp-page .science-story .hp-stage-chart-textbox h3 {
  margin: 0 0 .45em;
  color: var(--navy);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.25;
}
.student-ihp-page .science-story .hp-stage-chart-textbox p {
  margin: 0 0 .55em;
  font-size: clamp(.9rem, 1.2vw, .98rem);
  line-height: 1.75;
}
.student-ihp-page .science-story .hp-stage-chart-textbox p:last-child { margin-bottom: 0; }
.student-ihp-page .science-story .hp-stage-chart-placeholder-text { opacity: .66; }
.student-ihp-page .science-story .hp-stage-chart-placeholder-text span {
  display: block;
  margin-top: .2rem;
  font-size: .9em;
}
.student-ihp-page .science-story .hp-stage-chart-link {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  margin-top: .35rem;
  padding-bottom: .12rem;
  border-bottom: 1px solid currentColor;
  color: var(--link);
  font: 600 .72rem/1.5 var(--font-nav);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.student-ihp-page .science-story .hp-stage-chart-link:hover,
.student-ihp-page .science-story .hp-stage-chart-link:focus-visible {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* ------------------------------------------------------ small screens */
@media (max-width: 40rem) {
  .student-ihp-page .science-story .hp-stage-chart { margin-top: 1.15rem; }

  .student-ihp-page .science-story .hp-stage-cycle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    aspect-ratio: auto;
  }
  .student-ihp-page .science-story .hp-stage-chart-hint {
    position: static;
    grid-column: 1 / -1;
    width: auto;
    margin: 0 0 .15rem;
    padding: .8rem .95rem;
    transform: none;
    border-radius: 14px;
    box-shadow: 3px 4px 0 rgba(183, 139, 42, .18);
    font-size: .76rem;
  }
  .student-ihp-page .science-story .hp-stage-chart-btn {
    position: relative;
    left: auto;
    top: auto;
    display: flex;
    width: auto;
    min-width: 0;
    aspect-ratio: auto;
    transform: none;
  }
  .student-ihp-page .science-story .hp-stage-chart-btn--5 { grid-column: 1 / -1; }
  .student-ihp-page .science-story .hp-stage-chart-btn .hp-stage-blob {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: clamp(112px, 28vw, 148px);
    padding: 1rem .85rem;
    gap: .18rem;
    border-radius: 17px;
    box-shadow: 4px 4px 0 rgba(26, 51, 82, .14);
  }
  .student-ihp-page .science-story .hp-stage-chart-btn--5 .hp-stage-blob { min-height: 104px; }
  .student-ihp-page .science-story .hp-stage-blob::before { inset: 6%; opacity: .38; }
  .student-ihp-page .science-story .hp-stage-chart-num { font-size: .62rem; }
  .student-ihp-page .science-story .hp-stage-chart-name { max-width: 100%; font-size: 1.02rem; }
  .student-ihp-page .science-story .hp-stage-chart-cn { font-size: .69rem; }

  .student-ihp-page .science-story .hp-stage-chart-btn:hover .hp-stage-blob,
  .student-ihp-page .science-story .hp-stage-chart-btn:focus-visible .hp-stage-blob {
    transform: translateY(-2px);
    box-shadow: 5px 6px 0 rgba(26, 51, 82, .16);
  }
  .student-ihp-page .science-story .hp-stage-chart-btn.is-active .hp-stage-blob {
    transform: translateY(-2px);
    box-shadow:
      0 0 0 2px rgba(31, 66, 107, .15),
      5px 6px 0 rgba(26, 51, 82, .18);
  }

  .student-ihp-page .science-story .hp-stage-chart-textbox {
    margin-top: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 14px;
  }
  .student-ihp-page .science-story .hp-stage-chart-textbox h3 { font-size: 1.08rem; }
  .student-ihp-page .science-story .hp-stage-chart-textbox p { font-size: .93rem; }
}

@media (prefers-reduced-motion: reduce) {
  .student-ihp-page .science-story .hp-stage-blob { transition: none; }
}

/* ============================================================ NAIL framework
   The four-letter ring at the top of the iHP page. It reuses the stage-chart
   button, blob and textbox parts and only changes the composition: four letter
   tiles around a central note, joined by a dashed loop.
   ============================================================ */

.student-ihp-page .science-story .hp-nail-chart .hp-stage-cycle {
  aspect-ratio: 100 / 72;
}

/* Ring drawn behind the tiles. The tiles cover most of the circle, so only the
   four diagonal arcs and their arrowheads remain visible. */
.student-ihp-page .science-story .hp-nail-ring {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* Letter tiles: N top, A right, I bottom, L left. */
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-btn--n {
  --hp-stage-x: 50%;
  --hp-stage-y: 14%;
  --hp-stage-w: 29%;
  --hp-stage-ratio: 1.18;
  --hp-stage-bg: #f7c9d3;
  --hp-stage-radius: 54% 46% 52% 48% / 48% 54% 46% 52%;
}
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-btn--a {
  --hp-stage-x: 84%;
  --hp-stage-y: 50%;
  --hp-stage-w: 29%;
  --hp-stage-ratio: 1.18;
  --hp-stage-bg: #cbefe2;
  --hp-stage-radius: 46% 54% 48% 52% / 52% 48% 52% 48%;
}
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-btn--i {
  --hp-stage-x: 50%;
  --hp-stage-y: 86%;
  --hp-stage-w: 29%;
  --hp-stage-ratio: 1.18;
  --hp-stage-bg: #f8e3a3;
  --hp-stage-radius: 52% 48% 46% 54% / 47% 53% 47% 53%;
}
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-btn--l {
  --hp-stage-x: 16%;
  --hp-stage-y: 50%;
  --hp-stage-w: 29%;
  --hp-stage-ratio: 1.18;
  --hp-stage-bg: #dcd3ef;
  --hp-stage-radius: 48% 52% 54% 46% / 53% 47% 53% 47%;
}

/* A larger letter, smaller supporting lines, and a tighter inner padding keep
   the four labels legible inside the ring tiles. */
.student-ihp-page .science-story .hp-nail-chart .hp-stage-blob {
  padding: 9% 8%;
  gap: .1rem;
}
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-num {
  font: 700 clamp(1.35rem, 4.4cqi, 2.1rem)/1 var(--font-heading);
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  color: var(--navy);
}
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-name {
  max-width: 100%;
  font-size: clamp(.76rem, 1.55cqi, 1rem);
  line-height: 1.15;
}
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-cn {
  font-size: clamp(.64rem, 1cqi, .75rem);
  letter-spacing: .04em;
}

/* The central note is narrower than the stage chart's so it sits inside the
   ring without touching the four tiles. */
.student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-hint {
  width: 27%;
  font-size: clamp(.72rem, 1.25cqi, .88rem);
}

/* The hand-off line closes each panel by naming what the next letter receives. */
.student-ihp-page .science-story .hp-stage-chart-textbox .hp-nail-handoff {
  margin-top: .8rem;
  padding-top: .7rem;
  border-top: 1px dashed rgba(26, 51, 82, .22);
  color: #31516b;
}

@media (max-width: 40rem) {
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-cycle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    aspect-ratio: auto;
  }
  .student-ihp-page .science-story .hp-nail-ring { display: none; }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-hint {
    position: static;
    grid-column: 1 / -1;
    width: auto;
    margin: 0 0 .15rem;
    padding: .8rem .95rem;
    transform: none;
    border-radius: 14px;
    box-shadow: 3px 4px 0 rgba(183, 139, 42, .18);
    font-size: .76rem;
  }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-btn {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    min-width: 0;
    aspect-ratio: auto;
    transform: none;
  }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-btn .hp-stage-blob {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: clamp(112px, 28vw, 148px);
    padding: 1rem .85rem;
    gap: .18rem;
    border-radius: 17px;
    box-shadow: 4px 4px 0 rgba(26, 51, 82, .14);
  }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-num { font-size: 1.5rem; }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-name { font-size: 1rem; }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-cn { font-size: .7rem; }
}


/* The original student composition, adapted to the shared light/dark themes.
   All colours below are scoped to iHP; photographs retain their actual colours. */
.student-ihp-page .science-story .hp-cycle {
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  margin-top: 2.5rem;
  border-color: var(--ui-border);
}
.student-ihp-page .science-story .hp-cycle__media { min-width: 0; }
.student-ihp-page .science-story .hp-cycle__body {
  min-width: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: .85rem;
}
.student-ihp-page .science-story .hp-cycle__title {
  border-color: var(--ui-accent);
  font-size: clamp(1.25rem, 1.65vw, 1.55rem);
  line-height: 1.45;
}
.student-ihp-page .science-story .hp-cycle__scroll-hint {
  margin: 0;
  color: var(--ui-muted);
  font: 500 .86rem/1.6 var(--font-nav);
}
.student-ihp-page .science-story .hp-cycle__body > .science-grid {
  min-height: 0;
  padding: 3px .8rem 3px 3px;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
  scrollbar-gutter: stable;
  scrollbar-color: var(--ui-border) var(--ui-bg);
  scroll-snap-type: none;
  border-radius: 12px;
}
.student-ihp-page .science-story .hp-cycle__body > .science-grid:focus-visible {
  outline: 3px solid var(--ui-accent);
  outline-offset: 4px;
}
.student-ihp-page .science-story .hp-cycle__body .science-card {
  font-size: 1rem;
  line-height: 1.8;
}
.student-ihp-page .science-story .hp-cycle__body .science-card::before {
  color: var(--ui-accent);
}
html[data-theme] body[data-theme].student-ihp-page .science-story .hp-cycle__body .science-card.is-current {
  background: var(--ui-soft);
  border-color: var(--ui-accent);
}
.student-ihp-page .science-story .hp-cycle__shot {
  margin: 0;
  border-color: var(--ui-border);
  background: var(--ui-surface);
}
.student-ihp-page .science-story .hp-cycle__shot > a {
  display: block;
  line-height: 0;
  background: var(--ui-soft);
}
.student-ihp-page .science-story .hp-cycle__shot img {
  height: auto;
  max-height: 32rem;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--ui-soft);
}
.student-ihp-page .science-story .hp-cycle__shot figcaption {
  font-size: .9rem;
  color: var(--ui-muted);
  border-color: var(--ui-border);
}
.student-ihp-page .science-story .hp-cycle__shot figcaption strong {
  font-size: .78rem;
  color: var(--ui-accent);
}
/* A real cycle topic replaces the archive's one-pixel photo placeholders. */
.student-ihp-page .science-story .hp-cycle__topic {
  padding: clamp(1.35rem, 2.7vw, 2.3rem);
  border: 1px solid var(--ui-border);
  border-top: 4px solid var(--ui-accent);
  border-radius: 18px;
  background: var(--ui-surface);
  color: var(--ui-ink);
}
.student-ihp-page .science-story .hp-cycle__label {
  margin: 0 0 1.1rem;
  color: var(--ui-muted);
  font: 600 .8rem/1.6 var(--font-nav);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.student-ihp-page .science-story .hp-cycle__number {
  display: block;
  margin: 0 0 1.15rem;
  color: var(--ui-accent);
  font: 500 clamp(3.5rem, 7vw, 5.6rem)/1 var(--font-display);
}
.student-ihp-page .science-story .hp-cycle__topic h4 {
  margin: 0;
  color: var(--ui-ink);
  font: 600 clamp(1.2rem, 1.85vw, 1.7rem)/1.4 var(--font-heading);
  text-wrap: balance;
}
.student-ihp-page .science-story .hp-cycle__sequence {
  margin: 1.8rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ui-border);
  color: var(--ui-muted);
  font: 600 .85rem/1.7 var(--font-nav);
  letter-spacing: .12em;
}
/* Pastel chart surfaces always carry dark ink, including in dark mode. */
html[data-theme] body[data-theme].student-ihp-page .hp-stage-chart-btn,
html[data-theme] body[data-theme].student-ihp-page .hp-stage-blob,
html[data-theme] body[data-theme].student-ihp-page .hp-stage-chart-num,
html[data-theme] body[data-theme].student-ihp-page .hp-stage-chart-name,
html[data-theme] body[data-theme].student-ihp-page .hp-stage-chart-cn {
  color: #19344a;
  opacity: 1;
}
.student-ihp-page .science-story .hp-stage-chart-num { font-size: clamp(.76rem, 1.05cqi, .88rem); }
.student-ihp-page .science-story .hp-stage-chart-name { font-size: clamp(.94rem, 1.55cqi, 1.15rem); }
.student-ihp-page .science-story .hp-stage-chart-cn { font-size: clamp(.76rem, 1.05cqi, .88rem); letter-spacing: .02em; }
.student-ihp-page .science-story .hp-stage-chart-hint { font-size: clamp(.81rem, 1.15cqi, .95rem); }
.student-ihp-page .science-story .hp-stage-chart-hint span { opacity: 1; }
html[data-theme] body[data-theme].student-ihp-page .hp-stage-chart-btn:focus-visible {
  outline: 0;
}
html[data-theme] body[data-theme].student-ihp-page .hp-stage-chart-btn:focus-visible .hp-stage-blob {
  outline: 3px solid var(--ui-accent);
  outline-offset: 5px;
}
.student-ihp-page .science-story .hp-stage-chart-btn.is-active .hp-stage-blob {
  border-color: #19344a;
  box-shadow: 0 0 0 3px var(--ui-accent), 0 12px 24px #0002;
}
.student-ihp-page .science-story .hp-stage-chart-textbox {
  max-width: none;
  color: var(--ui-ink);
  background: var(--ui-surface);
  border-color: var(--ui-border);
  border-left-color: var(--ui-accent);
  box-shadow: none;
}
.student-ihp-page .science-story .hp-stage-chart-textbox h3 { color: var(--ui-ink); font-size: 1.25rem; }
.student-ihp-page .science-story .hp-stage-chart-textbox p { font-size: 1rem; line-height: 1.8; }
.student-ihp-page .science-story .hp-stage-chart-textbox .hp-nail-handoff {
  color: var(--ui-muted);
  border-color: var(--ui-border);
}
.student-ihp-page .science-story .hp-chart-panel:not([hidden]) ~ .hp-chart-panel:not([hidden]) {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ui-border);
}
.student-ihp-page .science-story .hp-chart-panel[hidden] { display: none; }
.student-ihp-page .science-story .hp-chart-show-all {
  display: block;
  min-height: 44px;
  margin: 1rem 0 0 auto;
  padding: .55rem 1rem;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: 500 .88rem/1.6 var(--font-nav);
  text-decoration: none;
  cursor: pointer;
}
.student-ihp-page .science-story .hp-chart-show-all:hover {
  border-color: var(--ui-accent);
  color: var(--ui-accent);
}
.student-ihp-page .science-story .hp-chart-show-all[hidden] { display: none; }
.student-ihp-page .science-story .hp-stage-chart-link {
  min-height: 44px;
  margin-top: .6rem;
  font-size: .86rem;
  color: var(--ui-accent);
}
/* Read the full document naturally on tablets, phones and short viewports. */
@media (max-width: 999px), (max-height: 600px) {
  .student-ihp-page .science-story .hp-cycle { grid-template-columns: minmax(0, 1fr); }
  .student-ihp-page .science-story .hp-cycle__media { position: static; }
  .student-ihp-page .science-story .hp-cycle__body { max-height: none; grid-template-rows: auto auto auto; }
  .student-ihp-page .science-story .hp-cycle__body > .science-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 3px;
    overflow: visible;
    scrollbar-gutter: auto;
  }
  .student-ihp-page .science-story .hp-cycle__body .science-card { margin: 0; }
  .student-ihp-page .science-story .hp-cycle__scroll-hint { display: none; }
  .student-ihp-page .science-story .hp-cycle__topic { padding: 1.35rem; }
  .student-ihp-page .science-story .hp-cycle__number { font-size: 3rem; margin-bottom: .8rem; }
  .student-ihp-page .science-story .hp-cycle__sequence { margin-top: 1.2rem; }
  .student-ihp-page .science-story .hp-cycle__shot { max-width: 44rem; margin-inline: auto; }
}
@media (max-width: 40rem) {
  .student-ihp-page .science-story .hp-stage-chart-num { font-size: .76rem; }
  .student-ihp-page .science-story .hp-stage-chart-name { font-size: 1rem; }
  .student-ihp-page .science-story .hp-stage-chart-cn { font-size: .78rem; }
  .student-ihp-page .science-story .hp-stage-chart-hint,
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-hint { font-size: .86rem; }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-num { font-size: 1.65rem; }
  .student-ihp-page .science-story .hp-nail-chart .hp-stage-chart-name { font-size: .96rem; }
  .student-ihp-page .science-story .hp-stage-chart-textbox { padding: 1.2rem; }
  .student-ihp-page .science-story .hp-stage-chart-textbox h3 { font-size: 1.15rem; }
  .student-ihp-page .science-story .hp-stage-chart-textbox p { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .student-ihp-page .science-story .hp-stage-blob,
  .student-ihp-page .science-story .hp-cycle__body .science-card { transition: none; }
  .student-ihp-page .science-story .hp-stage-chart-btn:is(:hover, :focus-visible, .is-active) .hp-stage-blob { transform: none; }
}
@media print {
  .student-ihp-page .science-story .hp-stage-cycle,
  .student-ihp-page .science-story .hp-chart-show-all,
  .student-ihp-page .science-story .hp-cycle__scroll-hint { display: none !important; }
  .student-ihp-page .science-story .hp-chart-panel[hidden] { display: block !important; }
  .student-ihp-page .science-story .hp-chart-panel { margin-bottom: 1.5rem; }
  .student-ihp-page .science-story .hp-cycle { display: block; }
  .student-ihp-page .science-story .hp-cycle__media { position: static; margin-bottom: 1.2rem; }
  .student-ihp-page .science-story .hp-cycle__body { display: block; max-height: none; }
  .student-ihp-page .science-story .hp-cycle__body > .science-grid {
    display: block;
    max-height: none;
    height: auto;
    overflow: visible;
    padding: 0;
  }
  .student-ihp-page .science-story .hp-cycle__body .science-card { margin-block: 1rem; }
  .student-ihp-page .science-story .hp-cycle__shot { max-width: 28rem; }
}
