/* ==========================================================================
   Dusk, page group 2: Academics, Facilities, Gallery
   Reads the ground tokens of theme-c.css; every rule is scoped by a page class.
   ========================================================================== */

/* ---------- Shared: photo title bands of this group ---------- */
.pg-academics .acad-band .page-band-media img,
.pg-facilities .fac-band .page-band-media img { object-position: 50% 42%; }
.pg-gallery .gal-band .page-band-media img { object-position: 50% 62%; }
.pg-gallery .gal-band { min-height: clamp(360px, 40vw, 600px); }

/* ==========================================================================
   ACADEMICS
   ========================================================================== */

/* ---------- The journey: five stages climb to the lamp ---------- */
.acad-journey .section-header-center { max-width: 860px; margin-inline: auto; }
.journey-row {
  --rise: clamp(28px, 3.4vw, 52px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  margin-top: clamp(12px, 2vw, 24px);
}
.stage-card {
  --tint: 6%;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 26px clamp(16px, 1.6vw, 26px) 30px;
  background: color-mix(in srgb, var(--slate-soft) var(--tint), var(--paper));
  border-top: 2px solid var(--brass);
  color: var(--fg-soft);
}
/* the step riser: a hairline that drops from each tread to the one before it */
.stage-card + .stage-card { border-left: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); }
.stage-card:nth-child(1) { --tint: 6%;  margin-top: calc(4 * var(--rise)); }
.stage-card:nth-child(2) { --tint: 12%; margin-top: calc(3 * var(--rise)); }
.stage-card:nth-child(3) { --tint: 19%; margin-top: calc(2 * var(--rise)); }
.stage-card:nth-child(4) { --tint: 27%; margin-top: calc(1 * var(--rise)); }
.stage-card--summit {
  margin-top: 0;
  overflow: visible;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255, 199, 44, 0.22), rgba(255, 199, 44, 0) 70%),
    linear-gradient(180deg, var(--dusk) 0%, var(--night) 100%);
  border-top-color: var(--bus);
  border-left-color: transparent !important;
}
/* the summit keeps the view: the ridge seen from the top, drawn in brass */
.stage-card--summit::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(46%, 150px);
  background: linear-gradient(180deg, rgba(210, 162, 76, 0.34), rgba(210, 162, 76, 0.08));
  -webkit-mask: var(--ridge-back) center bottom / 100% 100% no-repeat;
  mask: var(--ridge-back) center bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.stage-card--summit > :not(.stage-lamp) { position: relative; z-index: 1; }
/* the tread node: a brass point where each stage begins, the summit carries the lamp */
.stage-card::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -6px;
  width: 10px;
  height: 10px;
  background: var(--brass);
  transform: rotate(45deg);
}
.stage-card:first-child::before { left: 0; }
/* the summit lamp: a small arched window (the shape of the 404 and careers lamps) standing on
   the last tread. The element is the frame and the dark glass; ::before is the lit glass with
   its halo (the part that switches on); ::after is the glazing bars and the sill. */
.stage-lamp {
  --lf: var(--brass-deep);
  position: absolute;
  right: clamp(16px, 1.6vw, 26px);
  top: -33px;
  width: 20px;
  height: 30px;
  border-radius: 10px 10px 1px 1px;
  background: linear-gradient(170deg, #252c5a, #171c3e);
  box-shadow: 0 0 0 1.5px var(--lf);
}
.stage-lamp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 95% at 50% 105%, #fff4d6 0%, var(--bus) 52%, #f0b21e 100%);
  box-shadow: 0 0 22px 6px rgba(255, 199, 44, 0.42), 0 0 70px 24px rgba(255, 199, 44, 0.16);
}
.stage-lamp::after {
  content: "";
  position: absolute;
  inset: 0 -4px -3px;
  background:
    linear-gradient(var(--brass-deep), var(--brass-deep)) 50% 0 / 1.5px calc(100% - 3px) no-repeat,
    linear-gradient(var(--brass-deep), var(--brass-deep)) 50% 56% / calc(100% - 8px) 1.5px no-repeat,
    linear-gradient(var(--lf), var(--lf)) 50% 100% / 100% 2.5px no-repeat;
}
.stage-card-range {
  display: block;
  font-family: var(--f-latin);
  font-weight: 500;
  font-size: clamp(1.45rem, 1.9vw, 1.9rem);
  line-height: 1.12;
  color: var(--fg-strong);
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 28;
}
.stage-card-head { display: flex; align-items: flex-start; gap: 10px; }
.stage-card-icon { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--accent); }
.stage-card-icon svg { width: 22px; height: 22px; }
.stage-card h3 { font-size: 1.12rem; line-height: 1.3; font-weight: 600; color: var(--accent); }
.stage-card p { margin: 0; font-size: 0.98rem; line-height: 1.55; }
.stage-card--summit .stage-card-range { color: var(--paper); }
.stage-card--summit h3 { color: var(--brass-light); }

@media (prefers-reduced-motion: no-preference) {
  .c-js .journey-row > .stage-card[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
  .c-js .journey-row > .stage-card[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
  .c-js .journey-row > .stage-card[data-reveal]:nth-child(4) { transition-delay: 0.24s; }
  .c-js .journey-row > .stage-card[data-reveal]:nth-child(5) { transition-delay: 0.32s; }
}

/* below 1100px: a rail that thickens stage by stage */
@media (max-width: 1099px) {
  .journey-row { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 760px; margin-inline: auto; }
  .stage-card,
  .stage-card:nth-child(n) {
    margin-top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 22px 24px 30px;
    border-top: 0;
    border-left: 0 !important;
    box-shadow: inset calc(2px + var(--w, 0px)) 0 0 var(--brass);
  }
  .stage-card + .stage-card { margin-top: 4px; }
  .stage-card:nth-child(2) { --w: 1px; }
  .stage-card:nth-child(3) { --w: 2px; }
  .stage-card:nth-child(4) { --w: 3px; }
  .stage-card--summit { box-shadow: inset 6px 0 0 var(--bus); }
  .stage-card::before { left: -4px; top: 26px; }
  .stage-card:first-child::before { left: -4px; }
  .stage-lamp { --lf: rgba(235, 203, 138, 0.72); top: 20px; right: 24px; width: 16px; height: 23px; border-radius: 8px 8px 1px 1px; }
  .stage-card--summit, .stage-card.stage-card--summit { padding-right: 52px; }
  .stage-card--summit::after { height: 56px; }
}
@media (min-width: 720px) and (max-width: 1099px) {
  .stage-card, .stage-card:nth-child(n) { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .stage-card-range, .stage-card-head { grid-column: 1; }
  .stage-card > p { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- Streams ---------- */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 0 clamp(18px, 2.2vw, 30px);
}
.stream-card {
  --stream: var(--brass);
  grid-row: span 2;
  display: grid;
  grid-template-rows: subgrid;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-top: 3px solid var(--stream);
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--fg-soft);
}
.stream-pcb { --stream: var(--slate); }
.stream-arts { --stream: var(--maroon); }
.stream-card-head { padding: clamp(24px, 2.6vw, 34px) clamp(22px, 2.4vw, 32px) 18px; }
.stream-card-badge {
  display: block;
  margin-bottom: 18px;
  font-family: var(--f-latin);
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.05;
  color: var(--fg-strong);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 36;
}
.stream-card-head h3 { font-size: 1.3rem; line-height: 1.3; color: var(--fg-strong); margin-bottom: 10px; }
.stream-card-head p { margin: 0; }
.stream-card-body {
  display: flex;
  flex-direction: column;
  padding: 0 clamp(22px, 2.4vw, 32px) clamp(22px, 2.4vw, 30px);
}
.stream-card-body h4 {
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  margin-bottom: 12px;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--accent);
}
.stream-subject-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stream-subject-list li {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 14px;
  border: 1px solid color-mix(in srgb, var(--stream) 50%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--stream) 7%, #fff);
  color: var(--fg-strong);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
}
.stream-career-note {
  margin-top: auto;
  padding: 16px 18px;
  border-left: 2px solid var(--stream);
  background: var(--mist);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--fg);
}
.stream-career-note strong { color: var(--fg-strong); }
:lang(hi) .stream-card-head h3:not(.is-latin), :lang(hi) .stream-card-body h4:not(.is-latin) { line-height: 1.45; font-style: normal; }
@media (max-width: 959px) {
  .stream-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 22px; max-width: 680px; margin-inline: auto; }
  .stream-card { grid-row: auto; grid-template-rows: auto auto; }
}

/* ---------- How we teach ---------- */
.teach-grid { gap: 0; }
.teach-card { padding: 28px clamp(20px, 2.6vw, 40px) 8px; border-top: 1px solid var(--hair); }
.teach-card + .teach-card { border-left: 1px solid var(--hair); }
.teach-card::before { left: clamp(20px, 2.6vw, 40px); }
.teach-grid > .teach-card:first-child { padding-left: 0; }
.teach-grid > .teach-card:first-child::before { left: 0; }
.teach-icon { position: absolute; top: 30px; right: clamp(20px, 2.6vw, 40px); width: 30px; height: 30px; color: var(--accent); }
.teach-icon svg { width: 30px; height: 30px; }
.teach-card h3 { padding-right: 40px; }
.teach-card strong { color: var(--fg-strong); }
.teach-actions { justify-content: center; margin-top: clamp(36px, 4vw, 56px); }
@media (max-width: 959px) {
  .teach-grid { grid-template-columns: minmax(0, 1fr); }
  .teach-card, .teach-grid > .teach-card:first-child { padding: 26px 0 26px; border-left: 0 !important; }
  .teach-card::before, .teach-grid > .teach-card:first-child::before { left: 0; }
  .teach-icon { right: 0; top: 28px; }
}

/* ---------- Results band over the Class 12 science classroom ---------- */
.acad-trust { min-height: clamp(560px, 52vw, 760px); padding-block: clamp(72px, 9vw, 120px) clamp(80px, 9vw, 128px); }
.acad-trust > img , .acad-trust > :where(.kb-pic) > img { object-position: 60% 40%; }
.acad-trust::before {
  background:
    linear-gradient(90deg, rgba(27, 31, 64, 0.95) 0%, rgba(27, 31, 64, 0.86) 40%, rgba(27, 31, 64, 0.35) 72%, rgba(27, 31, 64, 0.12) 100%),
    linear-gradient(0deg, rgba(27, 31, 64, 0.7) 0%, rgba(27, 31, 64, 0) 40%);
}
.acad-trust-inner { max-width: 680px; }
.acad-trust .kicker { color: var(--brass-light); }
.acad-trust h2 { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 3.9rem); line-height: 1.06; text-wrap: balance; }
.acad-trust-inner > p:not(.kicker) { font-size: var(--t-lede); line-height: 1.55; margin-top: 20px; }
.acad-trust-facts { margin: clamp(28px, 3vw, 40px) 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acad-trust-facts .fact:first-child { border-left: 0; padding-left: 0; }
.acad-trust-facts .fact strong { color: var(--bus); font-weight: 600; font-size: clamp(1.9rem, 2.6vw, 2.4rem); text-shadow: 0 0 26px rgba(255, 199, 44, 0.35); }
.acad-trust-facts .fact span { color: var(--on-dark-2); }
:lang(hi) .acad-trust h2:not(.is-latin) { line-height: 1.3; }
@media (max-width: 720px) {
  .acad-trust { padding-top: 300px; }
  .acad-trust > img , .acad-trust > :where(.kb-pic) > img { object-position: 62% 0%; height: 360px; }
  .acad-trust::before { background: linear-gradient(0deg, var(--night) 0%, var(--night) calc(100% - 340px), rgba(27, 31, 64, 0.5) calc(100% - 220px), rgba(27, 31, 64, 0) 100%); }
  .acad-trust-facts .fact,
  .acad-trust-facts .fact:nth-child(n) { grid-column: auto; padding: 18px 10px 20px; border-top: 0; border-left: 1px solid var(--hair-dark); }
  .acad-trust-facts .fact:first-child { padding-left: 0; border-left: 0; }
  .acad-trust-facts .fact strong { min-height: 0; }
}

/* ==========================================================================
   FACILITIES
   ========================================================================== */

/* ---------- 3D tour ---------- */
@media (min-width: 960px) { .fac-tour-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.fac-tour-media { margin: 0; }
.fac-tour-text h2 { color: var(--fg-strong); font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.08; }
.fac-tour-text p:not(.button-row) { margin-top: 18px; font-size: var(--t-lede); line-height: 1.55; color: var(--fg-soft); max-width: calc(44 * 0.575em); }
.fac-tour-text .button-row { margin-top: 28px; }
:lang(hi) .fac-tour-text h2:not(.is-latin) { line-height: 1.3; }

/* ---------- Numbers ---------- */
.fac-stats .stat-card { padding-top: 6px; }
.fac-stats .stat-value { font-size: clamp(2.6rem, 4.6vw, 4.2rem); }
.fac-stats .stat-label { font-size: 1.02rem; color: var(--fg); }
:lang(hi) .fac-stats .stat-label { line-height: 1.5; }

/* ---------- Inside the campus: a bento of seven rooms ---------- */
.fac-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}
.fac-card {
  grid-column: span 4;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  color: var(--fg-soft);
}
.fac-card--wide { grid-column: span 7; }
.fac-card--solar, .fac-card--care { grid-column: span 5; }
.fac-card-media, .fac-card-plate {
  position: relative;
  margin: 0;
  height: clamp(200px, 21vw, 290px);
  overflow: hidden;
  background: var(--surface-2);
}
.fac-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.fac-card:hover .fac-card-media img { transform: scale(1.03); }
.fac-card--wide:first-child .fac-card-media img { object-position: 50% 38%; }
/* plates for the rooms without a photograph: the line icon over the ridge */
.fac-card-plate { display: grid; place-items: center; background: linear-gradient(180deg, var(--mist) 0%, color-mix(in srgb, var(--slate-soft) 26%, var(--paper)) 100%); }
.fac-card-plate::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: color-mix(in srgb, var(--slate) 22%, transparent);
  -webkit-mask: var(--ridge-back) center bottom / 100% 100% no-repeat;
  mask: var(--ridge-back) center bottom / 100% 100% no-repeat;
}
.fac-card-plate--icon svg { position: relative; z-index: 1; width: clamp(84px, 9vw, 120px); height: auto; color: var(--brass-deep); }
/* solar: the sun held just above the ridge */
.fac-card--solar {
  background: linear-gradient(180deg, var(--dusk) 0%, var(--night) 100%);
  border-color: var(--hair-dark);
}
.fac-card--solar .fac-card-plate {
  background:
    radial-gradient(60% 70% at 50% 78%, rgba(255, 199, 44, 0.32), rgba(255, 199, 44, 0) 70%),
    linear-gradient(180deg, var(--night) 0%, var(--dusk-2) 100%);
}
.fac-card--solar .fac-card-plate::after { background: var(--night); height: 30%; }
.fac-sun {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: clamp(70px, 7vw, 96px);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #ffe9a8 0%, var(--bus) 55%, #f2a81c 100%);
  box-shadow: 0 0 40px 10px rgba(255, 199, 44, 0.4), 0 0 140px 50px rgba(255, 199, 44, 0.16);
}
.fac-card--early { border-top: 3px solid var(--bus); }
.fac-card-body { display: flex; flex-direction: column; flex: 1; padding: clamp(22px, 2.4vw, 30px); }
.fac-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.fac-card-icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--hair); border-radius: 50%; color: var(--accent); }
.fac-card-icon svg { width: 20px; height: 20px; }
.fac-card-head h3 { flex: 1 1 12rem; min-width: 0; font-size: clamp(1.3rem, 1.7vw, 1.55rem); line-height: 1.2; color: var(--fg-strong); }
.fac-card-head .pill { flex: none; }
.fac-card-lead { margin: 0 0 14px; color: var(--fg); font-size: 1.04rem; }
.fac-card-lead strong { color: var(--fg-strong); }
.fac-card-list { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hair); }
.fac-card-list li { font-size: 0.98rem; line-height: 1.5; padding-block: 5px; }
.fac-card-list strong { color: var(--fg-strong); }
:lang(hi) .fac-card-head h3:not(.is-latin) { line-height: 1.4; }
@media (max-width: 1099px) {
  .fac-card, .fac-card--wide, .fac-card--solar, .fac-card--care { grid-column: span 6; }
  .fac-card--care { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .fac-card--care .fac-card-plate { height: auto; min-height: 100%; }
}
@media (max-width: 720px) {
  .fac-bento { grid-template-columns: minmax(0, 1fr); }
  .fac-card, .fac-card:nth-child(n) { grid-column: 1 / -1; }
  .fac-card--care { display: flex; }
  .fac-card--care .fac-card-plate { height: 190px; min-height: 0; }
  .fac-card-media, .fac-card-plate { height: 220px; }
}

/* ---------- The safety ledger ---------- */
.fac-safety {
  background:
    radial-gradient(ellipse 50% 40% at 18% 8%, rgba(255, 199, 44, 0.12), rgba(255, 199, 44, 0) 70%),
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(210, 162, 76, 0.1), rgba(210, 162, 76, 0) 70%),
    var(--night);
}
.safety-spotlight { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.safety-spotlight-head { position: sticky; top: 120px; }
.safety-lamp {
  display: block;
  width: 26px;
  height: 40px;
  margin-bottom: 28px;
  border-radius: 13px 13px 2px 2px;
  background: linear-gradient(180deg, #ffe08a, var(--bus));
  box-shadow: 0 0 20px 5px rgba(255, 199, 44, 0.42), 0 0 110px 40px rgba(255, 199, 44, 0.14);
}
.safety-spotlight-head h2 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.2rem); line-height: 1.04; color: var(--paper); }
.safety-spotlight-head p { margin-top: 24px; font-size: var(--t-lede); line-height: 1.6; color: var(--on-dark-2); max-width: calc(40 * 0.575em); }
.safety-grid { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-dark); }
.safety-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--hair-dark);
}
.safety-item-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(235, 203, 138, 0.42); border-radius: 50%; color: var(--brass-light); }
.safety-item-icon svg { width: 22px; height: 22px; }
.safety-item strong { display: block; font-family: var(--f-latin); font-weight: 600; font-size: clamp(1.25rem, 1.6vw, 1.45rem); line-height: 1.25; color: var(--paper); font-optical-sizing: none; font-variation-settings: "opsz" 22; }
.safety-item span:not(.safety-item-icon) { display: block; margin-top: 6px; color: var(--on-dark-2); line-height: 1.55; }
.safety-item:first-child .safety-item-icon { border-color: var(--bus); color: var(--bus); box-shadow: 0 0 22px rgba(255, 199, 44, 0.28); }
:lang(hi) .safety-spotlight-head h2:not(.is-latin) { line-height: 1.3; font-weight: 400; }
@media (min-width: 1280px) {
  .safety-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 0; }
  .safety-item:nth-child(-n+2) { border-top: 1px solid var(--hair-dark); }
}
@media (max-width: 959px) {
  .safety-spotlight { grid-template-columns: minmax(0, 1fr); }
  .safety-spotlight-head { position: static; }
}
@media (max-width: 720px) {
  .safety-item { grid-template-columns: 40px minmax(0, 1fr); gap: 16px; padding: 18px 0; }
  .safety-item-icon { width: 40px; height: 40px; }
}

/* ---------- Transport ---------- */
.transport-block {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  grid-template-rows: auto 1fr;
  gap: clamp(28px, 3vw, 44px) clamp(32px, 5vw, 72px);
  align-items: start;
}
.transport-media { grid-row: 1 / span 2; margin: 0; aspect-ratio: 4 / 3; }
.transport-media img { object-position: 50% 60%; }
.transport-body h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; color: var(--fg-strong); margin-bottom: 16px; }
.transport-body p { color: var(--fg-soft); }
.transport-body strong { color: var(--fg-strong); }
.transport-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(255, 199, 44, 0.16), rgba(255, 199, 44, 0) 70%),
    var(--dusk);
  border-radius: var(--radius);
  overflow: hidden;
}
.transport-chip { padding: 20px 22px 22px; min-width: 0; }
.transport-chip:nth-child(even) { border-left: 1px dashed rgba(255, 199, 44, 0.42); }
.transport-chip:nth-child(n+3) { border-top: 1px dashed rgba(255, 199, 44, 0.42); }
.transport-chip strong {
  display: block;
  font-family: var(--f-latin);
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--bus);
  text-shadow: 0 0 24px rgba(255, 199, 44, 0.35);
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 30;
}
.transport-chip span { display: block; margin-top: 8px; font-size: 0.98rem; line-height: 1.4; color: var(--on-dark-2); }
@media (max-width: 959px) {
  .transport-block { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .transport-media { grid-row: auto; aspect-ratio: 3 / 2; }
}
@media (max-width: 720px) {
  .fac-tour-split { gap: 28px; }
  .transport-chip { padding: 16px 16px 18px; }
}

/* ==========================================================================
   GALLERY
   ========================================================================== */

/* the dusk panorama over the Shivalik foothills is the title band */
.gal-band .page-band-media::after {
  background:
    linear-gradient(90deg, rgba(27, 31, 64, 0.9) 0%, rgba(27, 31, 64, 0.62) 34%, rgba(27, 31, 64, 0.12) 66%, rgba(27, 31, 64, 0) 100%),
    linear-gradient(0deg, rgba(27, 31, 64, 0.66) 0%, rgba(27, 31, 64, 0) 44%);
}
body.inner .gal-switch-band.section { padding-bottom: clamp(20px, 2.4vw, 32px); }
.gal-switch-band .gallery-mode-tabs { margin-bottom: 0; padding-bottom: 6px; border-bottom: 1px solid var(--hair); gap: 0 clamp(24px, 3vw, 40px); }
.gal-switch-band .gallery-mode-tab svg { width: 22px; height: 22px; color: var(--accent); }
.gal-switch-band .gallery-mode-tab:not(.active) { color: var(--fg-soft); }
.gal-switch-band .gallery-mode-tab:focus-visible { outline-offset: 4px; }
:lang(hi) .gallery-mode-tab { line-height: 1.5; }

/* photos */
body.inner main > .gal-photos.section { padding-top: 0; }
/* while the photo list is on its way the grid's place is kept one screen tall, so the films
   and the footer below it are not on the first screen and do not jump when the grid arrives */
.c-js .pg-gallery #gallery-root:has(> .gallery-loading) { min-height: 100vh; min-height: 100svh; }
.gal-photos .gallery-tabs { position: sticky; top: calc(var(--header-h) - 1px); z-index: 5; background: var(--paper); padding-top: 4px; }
@media (min-width: 1100px) {
  .gal-photos .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gal-photos .gallery-grid > .gallery-photo:first-child { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
  .gal-photos .gallery-grid > .gallery-photo:first-child .gallery-photo-btn { position: relative; flex: 1; aspect-ratio: auto; min-height: 0; }
  .gal-photos .gallery-grid > .gallery-photo:first-child .gallery-photo-btn img { position: absolute; inset: 0; }
  .gal-photos .gallery-grid > .gallery-photo:first-child figcaption { font-family: var(--f-latin); font-style: italic; font-size: 1.15rem; color: var(--fg); }
}

/* videos: the screening room */
.gal-videos { padding-block: clamp(56px, 7vw, 96px) clamp(64px, 8vw, 112px); }
.gal-videos-head { max-width: 760px; margin-bottom: clamp(12px, 2vw, 24px); }
.gal-videos-head h2 { color: var(--paper); font-size: var(--t-h2); }
.gal-videos-head .lede { margin-top: 16px; color: var(--on-dark-2); }
:lang(hi) .gal-videos-head h2:not(.is-latin) { line-height: 1.3; }
.video-group-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: clamp(40px, 5vw, 64px) 0 22px;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--brass-light);
}
.video-group-title::after { content: ""; flex: 1; height: 1px; background: var(--hair-dark); }
:lang(hi) .video-group-title:not(.is-latin) { line-height: 1.45; }
.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.4vw, 32px) clamp(16px, 2vw, 26px);
  align-items: start;
}
.video-card { min-width: 0; color: var(--on-dark-2); }
.video-card--wide { grid-column: span 2; }
.video-thumb-wrap {
  position: relative;
  height: clamp(340px, 32vw, 460px);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 100%, rgba(255, 199, 44, 0.1), rgba(255, 199, 44, 0) 70%),
    #12152f;
  box-shadow: inset 0 0 0 1px var(--hair-dark);
}
.video-thumb-wrap video { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.video-thumb-wrap video:focus-visible { outline: 3px solid var(--bus); outline-offset: -3px; }
.video-card-body { padding-top: 16px; }
.video-card-body .tag { background: rgba(238, 240, 246, 0.08); color: var(--brass-light); }
.video-card-body h4 { margin: 12px 0 8px; font-size: 1.3rem; font-weight: 600; line-height: 1.25; color: var(--paper); }
.video-card-body p { margin: 0; font-size: 0.98rem; line-height: 1.55; }
@media (min-width: 1100px) {
  .video-gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .video-thumb-wrap { height: clamp(380px, 30vw, 440px); }
}
/* a group with one film: the film beside its notes */
.video-gallery-grid:has(> .video-card:only-child) { grid-template-columns: minmax(0, 1fr); }
.video-card:only-child { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, calc(46 * 0.575em)); gap: 0 clamp(24px, 3vw, 44px); align-items: end; }
.video-card:only-child .video-card-body { padding: 0 0 8px; }
.video-card:only-child .video-card-body h4 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.video-card:only-child .video-card-body p { font-size: 1.04rem; }
@media (max-width: 1099px) {
  .video-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .video-gallery-grid { grid-template-columns: minmax(0, 1fr); }
  .video-card--wide { grid-column: auto; }
  .video-card:only-child { display: block; }
  .video-card:only-child .video-card-body { padding: 16px 0 0; }
  .video-thumb-wrap { height: auto; aspect-ratio: 9 / 13; }
  .video-card--wide .video-thumb-wrap { aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  /* navy stands under the words only; the sky and the hills above them keep their own colours */
  .gal-band .page-band-media::after { background: linear-gradient(0deg, rgba(27, 31, 64, 0.96) 0%, rgba(27, 31, 64, 0.86) 46%, rgba(27, 31, 64, 0.46) 68%, rgba(27, 31, 64, 0.1) 88%, rgba(27, 31, 64, 0) 100%); }
}

/* ---------- First screen: the title band keeps its height while the page starts ----------
   The HTML carries a long headline and lede; main.js replaces them with its own short ones
   ("Academics", "Facilities"). The shared sheet (theme-c.css) keeps those lines out of sight
   until then, but their boxes were still the long ones, so the band shrank by 130 to 190px
   when the wording arrived. Here, while they are out of sight, their boxes are held at the
   size the final wording takes: the headline on one line, the lede on --pl lines.
   If the script is very late, the hold and the shared sheet's "show anyway" let go together
   after 5 s (2.4 s there; on these two pages a slow-4G load without compression needs 2.7 to 3.9 s),
   and the long wording shows in full. With scripts off nothing is held or hidden.
   The whole block is skipped by browsers that cannot do the hold (it needs @starting-style and
   discrete transitions; the two @supports tests stand in for them): there the band behaves as
   the shared sheet alone makes it. To switch the hold off, delete this one @supports block. */
@supports (transition-behavior: allow-discrete) and (color: light-dark(#000, #fff)) {
  .pg-academics .page-band { --pl: 3; }
  .pg-facilities .page-band { --pl: 2; }
  @media (max-width: 560px) {
    .pg-academics .page-band { --pl: 4; }
    .pg-facilities .page-band { --pl: 3; }
  }
  @media (max-width: 365px) { .pg-academics .page-band { --pl: 5; } }
  html.c-js:not(.c-live) :is(.pg-academics, .pg-facilities) .page-band :is(h1, h1 + p) { animation-delay: 5s; }
  html.c-js:not(.c-live) :is(.pg-academics, .pg-facilities) .page-band h1 {
    overflow: clip;
    transition: white-space 0s linear 5s;
    transition-behavior: allow-discrete;
  }
  /* once the page is live the pending change is dropped at once (kept at low weight on purpose) */
  :where(html.c-live) :where(.pg-academics, .pg-facilities) .page-band h1 { transition-property: none; }
  html.c-js:not(.c-live) :is(.pg-academics, .pg-facilities) .page-band h1 + p {
    max-height: 60lh;
    overflow: clip;
    transition: max-height 0s linear 5s;
  }
  @starting-style {
    html.c-js:not(.c-live) :is(.pg-academics, .pg-facilities) .page-band h1 { white-space: nowrap; }
    html.c-js:not(.c-live) :is(.pg-academics, .pg-facilities) .page-band h1 + p { max-height: calc(var(--pl) * 1lh); }
  }
}

/* ==========================================================================
   DUSK LIGHT LAYER for this group (works with theme-c-fx.css, dusk/core.js,
   dusk/g2.js and dusk/viewer.js). The resting CSS of every effect is its
   finished state; start states live only under html.kb-on and
   prefers-reduced-motion: no-preference (scroll-driven ones also need
   animation-timeline support). Every added layer is .kb-deco, aria-hidden,
   pointer-events none.
   ========================================================================== */

/* the viewer's glow: viewer.js sets these on #lightbox and its ::before paints them, so they inherit */
@property --amb-1 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --amb-2 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --amb-3 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --amb-4 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --ambm-1 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --ambm-2 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --ambm-3 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --ambm-4 { syntax: "<color>"; inherits: true; initial-value: rgba(15, 18, 40, 0); }
@property --kb-drag { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ---------- Academics: the climb ----------
   g2.js draws one path along the tops of the five stage cards (down the left
   rail when they stack). A lamp-head travels with the drawing end; when it
   reaches the summit the summit lamp switches on. */
.pg-academics .journey-row { position: relative; }
.kb-climb {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.kb-climb-glow { stroke: rgba(210, 162, 76, 0.26); stroke-width: 8; stroke-dasharray: 1; stroke-dashoffset: 0; }
.kb-climb-line { stroke: url(#kb-climb-g); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.kb-climb-head, .kb-climb-halo { stroke-dasharray: 0.0001 2; stroke-dashoffset: -0.9999; opacity: 0; }
.kb-climb-head { stroke: #ffe08a; stroke-width: 7; }
.kb-climb-halo { stroke: rgba(255, 199, 44, 0.3); stroke-width: 22; }
/* passed (the finished look): the tread node glows, the stage numeral warms */
.kb-climb-on .stage-card::before { transition: box-shadow 500ms var(--ease), background-color 500ms var(--ease); }
.kb-climb-on .stage-card:not(.stage-card--summit)::before { box-shadow: 0 0 0 3px rgba(210, 162, 76, 0.18), 0 0 14px 2px rgba(210, 162, 76, 0.5); }
.kb-climb-on .stage-card:not(.stage-card--summit) .stage-card-range { color: var(--brass-deep); text-shadow: 0 0 22px rgba(210, 162, 76, 0.32); transition: color 500ms var(--ease), text-shadow 500ms var(--ease); }
.kb-climb-on .stage-card--summit .stage-card-range { text-shadow: 0 0 calc(22px * var(--lamp)) rgba(255, 199, 44, 0.34); transition: text-shadow 600ms var(--ease); }

/* ---------- Academics: streams, teaching, trust, light shafts ---------- */
.pg-academics .stream-career-note { position: relative; border-left-color: transparent; }
.pg-academics .stream-career-note::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brass), var(--stream));
}
/* evening sun through classroom windows: three faint brass shafts, still */
.pg-academics .acad-teach { isolation: isolate; }
.pg-academics .acad-teach::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(102deg, transparent 0 18%, rgba(210, 162, 76, 0.045) 18% 25%, transparent 25% 100%),
    linear-gradient(102deg, transparent 0 41%, rgba(210, 162, 76, 0.04) 41% 46%, transparent 46% 100%),
    linear-gradient(102deg, transparent 0 63%, rgba(210, 162, 76, 0.035) 63% 72%, transparent 72% 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.pg-academics .acad-trust-facts .fact strong[data-kb-odo] { text-shadow: 0 0 26px rgba(255, 199, 44, 0.35); }

/* ---------- Facilities: the sun sets and the lights stay on ---------- */
/* finished: the sun is down behind the ridge, the sky is night, stars are out */
.pg-facilities .fac-card--solar .fac-card-plate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1.2px 1.2px at 18% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 34% 12%, rgba(243, 210, 122, 0.9), transparent),
    radial-gradient(1.4px 1.4px at 61% 18%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 79% 30%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 88% 10%, rgba(243, 210, 122, 0.85), transparent),
    radial-gradient(1px 1px at 48% 34%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 9% 41%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(70% 40% at 50% 100%, rgba(255, 199, 44, 0.14), rgba(255, 199, 44, 0) 70%),
    linear-gradient(180deg, rgba(16, 23, 47, 0.92) 0%, rgba(16, 23, 47, 0.55) 70%, rgba(16, 23, 47, 0.2) 100%);
}
.pg-facilities .fac-card--solar .fac-card-plate::after { z-index: 1; }
.pg-facilities .fac-sun { translate: -50% 125%; }

/* a window in each room: the icon ring lights, the top rule warms to brass */
.pg-facilities .fac-bento .fac-card-icon { position: relative; }
.pg-facilities .kb-win .fac-card:not(.fac-card--solar) .fac-card-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--kb-light);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--kb-light) 28%, transparent), transparent 72%);
  box-shadow: 0 0 18px -2px color-mix(in srgb, var(--kb-light) 70%, transparent);
  pointer-events: none;
}
.pg-facilities .kb-win .fac-card:not(.fac-card--solar) { --kb-light: var(--brass); }
.pg-facilities .kb-win .fac-card:not(.fac-card--solar, .fac-card--early)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  height: 2px;
  background: linear-gradient(90deg, var(--brass), var(--brass-light) 60%, rgba(235, 203, 138, 0.2));
  pointer-events: none;
}
/* the rim sits just inside the card, which clips its overflow */
.pg-facilities .fac-bento > .fac-card.kb-rim { --rim-o: 0px !important; }

/* safety: each icon is a lamp on the campus walk */
.pg-facilities .kb-safe .safety-item-icon { position: relative; --kb-light: var(--brass-light); }
.pg-facilities .kb-safe .safety-item-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--kb-light);
  border-radius: 50%;
  box-shadow: 0 0 22px -4px color-mix(in srgb, var(--kb-light) 75%, transparent), inset 0 0 14px -6px var(--kb-light);
  pointer-events: none;
}
.pg-facilities .kb-safe .safety-item:first-child .safety-item-icon { --kb-light: var(--bus); }

.pg-facilities .transport-chip strong[data-kb-odo] { text-shadow: 0 0 24px rgba(255, 199, 44, 0.35); }
/* the rolling digits are spans: keep the label rules of these cards off them */
:is(.pg-facilities .transport-chip, .pg-academics .acad-trust-facts .fact) strong span {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  letter-spacing: inherit;
}
:is(.pg-facilities .transport-chip, .pg-academics .acad-trust-facts .fact) strong .kbfx-col { display: inline-block; }
:is(.pg-facilities .transport-chip, .pg-academics .acad-trust-facts .fact) strong .kbfx-strip > span { display: block; }
:is(.pg-facilities .transport-chip, .pg-academics .acad-trust-facts .fact) strong .kbfx-sr { display: inline; }

/* ---------- Gallery ---------- */
/* the thumbnail holds still; its caption's brass rule draws under the pointer */
.pg-gallery .gallery-photo-btn:hover img, .pg-gallery .gallery-photo-btn:focus-visible img { transform: none; }
/* the word the live site shows on a tile ("View") stays: it sits beside the corner arrow, on the
   corner shade, and comes up with it on hover and keyboard focus */
.pg-gallery .gallery-photo-btn::after {
  content: "View";
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 44px 15px 0;
  font: italic 500 1.02rem/1.1 var(--f-latin);
  letter-spacing: 0.01em;
  color: var(--brass-light);
}
.pg-gallery .gallery-photo figcaption { position: relative; }
.pg-gallery .gallery-photo figcaption::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 3px;
  height: 1px;
  background: linear-gradient(90deg, var(--brass), rgba(210, 162, 76, 0));
  scale: 0 1;
  transform-origin: 0 50%;
  transition: scale 320ms var(--ease);
  pointer-events: none;
}
.pg-gallery .gallery-photo:is(:hover, :focus-within) figcaption::before { scale: 1 1; }

/* videos: the poster frame takes a lamp glow; the play mark sits in a small arched window */
.pg-gallery .video-thumb-wrap { transition: box-shadow 260ms var(--ease); }
.pg-gallery .video-thumb-wrap:is(:hover, :focus-within) {
  box-shadow: inset 0 0 0 1px var(--brass-light), 0 0 0 1px rgba(235, 203, 138, 0.5), 0 18px 46px -14px rgba(235, 203, 138, calc(0.5 * var(--lamp)));
}
.pg-gallery .video-card-body { position: relative; }
.pg-gallery .video-card-body > .tag { margin-right: 40px; }
.kb-play {
  position: absolute;
  right: 0;
  top: 14px;
  width: 26px;
  height: 32px;
  border: 1px solid rgba(235, 203, 138, 0.55);
  border-radius: 13px 13px 3px 3px;
  pointer-events: none;
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease), background-color 220ms var(--ease);
}
.kb-play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 58%;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--brass-light);
  translate: -38% -50%;
}
.video-card:is(:hover, :focus-within) .kb-play { border-color: var(--brass-light); box-shadow: 0 0 14px -2px rgba(235, 203, 138, calc(0.6 * var(--lamp))); }
.video-card.is-playing .kb-play { border-color: var(--bus); background-color: rgba(255, 199, 44, 0.14); box-shadow: 0 0 16px -2px rgba(255, 199, 44, 0.55); }
.video-card.is-playing .kb-play::after { border-left-color: var(--bus); }
.video-card:only-child .kb-play { top: 0; }

/* the viewer: its dark takes the colours of the open photo */
.pg-gallery .lightbox.kb-viewer { background: transparent; overflow: hidden; }
.pg-gallery .kb-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* an opaque night (the page never shows through), lit from its four corners */
  background:
    radial-gradient(140% 72% at 0% 0%, var(--amb-1) 0%, var(--ambm-1) 46%, rgba(15, 18, 40, 0) 74%),
    radial-gradient(140% 72% at 100% 0%, var(--amb-2) 0%, var(--ambm-2) 46%, rgba(15, 18, 40, 0) 74%),
    radial-gradient(140% 72% at 0% 100%, var(--amb-3) 0%, var(--ambm-3) 46%, rgba(15, 18, 40, 0) 74%),
    radial-gradient(140% 72% at 100% 100%, var(--amb-4) 0%, var(--ambm-4) 46%, rgba(15, 18, 40, 0) 74%),
    rgb(15, 18, 40);
  opacity: calc(1 - 0.85 * var(--kb-drag, 0));
}
/* swipe and pull-down work from anywhere in the open viewer */
.pg-gallery .kb-viewer.open { touch-action: none; }
.pg-gallery .kb-viewer :is(.lightbox-close, .lightbox-prev, .lightbox-next, .lightbox-counter, .lightbox-caption) { opacity: calc(1 - var(--kb-drag, 0)); }
.pg-gallery .kb-viewer .lightbox-figure { touch-action: none; }
.pg-gallery .kb-viewer .lightbox-img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; transform-origin: 50% 50%; }
.pg-gallery .kb-viewer.is-zoomed .lightbox-img { cursor: grab; box-shadow: none; }
.pg-gallery .kb-viewer.is-panning .lightbox-img { cursor: grabbing; }

@media (prefers-reduced-motion: no-preference) {
  /* academics: the climb draws itself */
  html.kb-on .kb-climb-arm .stage-card:not(.stage-card--summit):not(.is-passed)::before { box-shadow: 0 0 0 0 rgba(210, 162, 76, 0), 0 0 0 0 rgba(210, 162, 76, 0); }
  html.kb-on .kb-climb-arm .stage-card:not(.stage-card--summit):not(.is-passed) .stage-card-range { color: var(--fg-strong); text-shadow: 0 0 0 rgba(210, 162, 76, 0); }
  html.kb-on .kb-climb-arm .stage-card--summit:not(.is-passed) .stage-card-range { text-shadow: 0 0 0 rgba(255, 199, 44, 0); }
  html.kb-on .kb-climb-arm .stage-lamp:not(.is-on)::before { opacity: 0; }
  html.kb-on .kb-climb-arm .stage-lamp.is-on::before { animation: kb-switch-on 900ms ease-out backwards; }
  html.kb-on .kb-climb-arm:not(.is-drawn) :is(.kb-climb-line, .kb-climb-glow) { stroke-dashoffset: 1; }
  html.kb-on .kb-climb-arm.is-drawn :is(.kb-climb-line, .kb-climb-glow) { animation: kb-climb-draw 1600ms cubic-bezier(.45, 0, .25, 1) both; }
  html.kb-on .kb-climb-arm.is-drawn :is(.kb-climb-head, .kb-climb-halo) { animation: kb-climb-head 1600ms cubic-bezier(.45, 0, .25, 1) both; }
  @supports (animation-timeline: view()) {
    .pg-academics .journey-row { view-timeline: --kb-climb block; }
    html.kb-on .kb-climb-arm.kb-climb-sd :is(.kb-climb-line, .kb-climb-glow) {
      animation: kb-climb-draw linear both;
      animation-timeline: --kb-climb;
      animation-range: cover var(--kb-cs, 10%) cover var(--kb-ce, 50%);
    }
    html.kb-on .kb-climb-arm.kb-climb-sd :is(.kb-climb-head, .kb-climb-halo) {
      animation: kb-climb-head linear both;
      animation-timeline: --kb-climb;
      animation-range: cover var(--kb-cs, 10%) cover var(--kb-ce, 50%);
    }
  }

  /* academics + facilities: the big numerals rise out of a clip, then the text follows */
  html.kb-on :is(.pg-academics, .pg-facilities) .teach-grid > .teach-card > h3::before {
    transition: clip-path 700ms var(--ease-rise), translate 700ms var(--ease-rise);
    transition-delay: calc(var(--i, 0) * 60ms + 140ms);
  }
  html.kb-on :is(.pg-academics, .pg-facilities) .teach-grid > .teach-card > :is(p, .teach-icon) {
    transition: opacity 600ms ease-out, translate 700ms var(--ease-rise);
    transition-delay: calc(var(--i, 0) * 60ms + 300ms);
  }
  html.kb-on :is(.pg-academics, .pg-facilities) .teach-grid > .teach-card[data-reveal]:not(.is-visible) > h3::before { clip-path: inset(0 0 100% 0); translate: 0 0.6em; }
  html.kb-on :is(.pg-academics, .pg-facilities) .teach-grid > .teach-card[data-reveal]:not(.is-visible) > :is(p, .teach-icon) { opacity: 0; translate: 0 10px; }

  /* lists inside a card arrive one by one once the card is shown */
  html.kb-on :is(.pg-academics .stream-subject-list, .pg-facilities .fac-card-list) > li {
    transition: opacity 500ms ease-out, translate 600ms var(--ease-rise);
    transition-delay: calc(var(--i, 0) * var(--kb-step) + 280ms);
  }
  html.kb-on :is(.pg-academics .stream-card, .pg-facilities .fac-card)[data-reveal]:not(.is-visible) :is(.stream-subject-list, .fac-card-list) > li { opacity: 0; translate: 0 8px; }

  /* facilities: windows wait dark until their turn */
  html.kb-on .pg-facilities .kb-win-arm .fac-card:not(.fac-card--solar):not(.is-on) .fac-card-icon::after { opacity: 0; }
  html.kb-on .pg-facilities .kb-win-arm .fac-card:not(.fac-card--solar, .fac-card--early):not(.is-on)::after { opacity: 0; scale: 0 1; }
  html.kb-on .pg-facilities .kb-win-arm .fac-card.is-on .fac-card-icon::after {
    animation: kb-switch-on 900ms ease-out backwards, kb-settle 1200ms ease-out backwards;
  }
  html.kb-on .pg-facilities .kb-win-arm .fac-card:not(.fac-card--solar, .fac-card--early)::after {
    transform-origin: 0 50%;
    transition: opacity 400ms ease-out, scale 700ms var(--ease-rise);
  }
  html.kb-on .pg-facilities .kb-win-arm .fac-card.is-on .fac-card-icon { color: var(--brass-deep); transition: color 600ms var(--ease); }
  html.kb-on .pg-facilities .kb-safe-arm .safety-item:not(.is-on) .safety-item-icon::after { opacity: 0; }
  html.kb-on .pg-facilities .kb-safe-arm .safety-item.is-on .safety-item-icon::after {
    animation: kb-switch-on 900ms ease-out backwards, kb-g2-settle-lt 1200ms ease-out backwards;
  }
  html.kb-on .pg-facilities .kb-safe-arm .safety-item:first-child.is-on .safety-item-icon::after { animation: kb-switch-on 900ms ease-out backwards; }
  /* the fleet photo: after its shutter, one very slow push-in */
  html.kb-on .pg-facilities .transport-media.is-in img {
    animation: kb-settle-in var(--t-reveal) var(--ease-rise) backwards, kb-g2-push 20s cubic-bezier(.3, 0, .3, 1) var(--t-reveal) forwards;
  }
  @supports (animation-timeline: view()) {
    .pg-facilities .fac-card--solar { view-timeline: --kb-sun block; }
    html.kb-on .pg-facilities .fac-sun { animation: kb-g2-sunset linear both; animation-timeline: --kb-sun; animation-range: cover 20% cover 70%; will-change: translate; }
    html.kb-on .pg-facilities .fac-card--solar .fac-card-plate::before { animation: kb-g2-nightfall linear both; animation-timeline: --kb-sun; animation-range: cover 30% cover 72%; }
  }

  /* gallery: thumbnails rise row by row */
  html.kb-on .pg-gallery .gallery-photo.kb-rise { transition: opacity 600ms ease-out, translate 800ms var(--ease-rise); transition-delay: calc(var(--i, 0) * 30ms); }
  html.kb-on .pg-gallery .gallery-photo.kb-rise:not(.is-in) { opacity: 0; translate: 0 18px; }
  /* videos: group titles rise and their hairline draws to the right edge */
  html.kb-on .pg-gallery .kb-g2-wait { transition: opacity 600ms ease-out, translate 700ms var(--ease-rise); transition-delay: calc(var(--i, 0) * 70ms); }
  html.kb-on .pg-gallery .kb-g2-wait:not(.is-in) { opacity: 0; translate: 0 16px; }
  html.kb-on .pg-gallery .video-group-title.kb-g2-wait::after { transform-origin: 0 50%; transition: scale 900ms var(--ease-rise) 200ms; }
  html.kb-on .pg-gallery .video-group-title.kb-g2-wait:not(.is-in)::after { scale: 0 1; }
  /* album change: a short cross-fade of the grid */
  html.kb-xfade::view-transition-old(root), html.kb-xfade::view-transition-new(root) { animation-duration: 200ms; }
  /* viewer motion */
  .pg-gallery .kb-viewer {
    --kb-amb-t: 240ms ease;
    transition: --amb-1 var(--kb-amb-t), --amb-2 var(--kb-amb-t), --amb-3 var(--kb-amb-t), --amb-4 var(--kb-amb-t),
      --ambm-1 var(--kb-amb-t), --ambm-2 var(--kb-amb-t), --ambm-3 var(--kb-amb-t), --ambm-4 var(--kb-amb-t);
  }
  .pg-gallery .kb-viewer.is-settling .lightbox-img { transition: transform 220ms var(--ease-rise), opacity 220ms ease-out; }
  .pg-gallery .kb-viewer.is-settling {
    transition: --kb-drag 220ms ease-out,
      --amb-1 var(--kb-amb-t), --amb-2 var(--kb-amb-t), --amb-3 var(--kb-amb-t), --amb-4 var(--kb-amb-t),
      --ambm-1 var(--kb-amb-t), --ambm-2 var(--kb-amb-t), --ambm-3 var(--kb-amb-t), --ambm-4 var(--kb-amb-t);
  }
}

@keyframes kb-climb-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes kb-climb-head { from { stroke-dashoffset: 0.0001; opacity: 1; } 90% { opacity: 1; } to { stroke-dashoffset: -0.9999; opacity: 0; } }
@keyframes kb-g2-sunset { from { translate: -50% 0; } to { translate: -50% 125%; } }
@keyframes kb-g2-nightfall { from { opacity: 0; } to { opacity: 1; } }
@keyframes kb-g2-push { from { scale: 1; } to { scale: 1.04; } }
@keyframes kb-g2-settle-lt { 0%, 55% { --kb-light: #ffc72c; } }

@media print {
  .kb-climb, .kb-play { display: none !important; }
  .stage-lamp::before { box-shadow: none; }
  .pg-facilities .fac-sun { translate: -50% 0; }
  .kb-rise, .kb-g2-wait, .teach-card > :is(p, .teach-icon), :is(.stream-subject-list, .fac-card-list) > li {
    opacity: 1 !important;
    translate: none !important;
  }
  .teach-card > h3::before { clip-path: none !important; translate: none !important; }
  .video-group-title::after { scale: none !important; }
}
