/* ==========================================================================
   Hack The Cure: the few rules the kit's system.css does not carry.
   Everything here takes the kit's tokens (--ink, --muted, --line, --surface, --accent, --action,
   --s-*, --r-*, --t-*, the display face); no colour, size or radius is added except the six track colours.
   ========================================================================== */

:root { --s1: #edae49; --s2: #f08a4b; --s3: #ff6a5e; --s4: #e2435b; --s5: #b8336a; --s6: #8c2155; }

/* One card title for every h3 on the page: the text face, 500. Display type is for h1, h2 and the figures. */
.reason h3, .step__title h3, .criterion h3, .way h3, .contact h3, .mentor-cta h3, .jtile h3, .mtile__text h3, .faq__item h3 {
  font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em;
}

/* ---- logo ---------------------------------------------------------------- */
.nav__img { height: 40px; width: auto; }
.footer .nav__img { height: 56px; }
@media (max-width: 639px) { .nav__img { height: 32px; } .footer .nav__img { height: 44px; } }

/* ---- hero ----------------------------------------------------------------- */
/* The dates are the first line of the page, so they are set large in the display face. */
.hero__kicker { flex-direction: column; align-items: flex-start; gap: var(--s-1); }
.hero__date { font: var(--display-weight) clamp(20px, 0.9vw + 14px, 26px)/1.15 var(--font-display); letter-spacing: var(--display-tracking); color: var(--ink); }
.hero__where { font-size: var(--t-small); color: var(--muted); }
.hero__text > .hero-facts { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.hero-facts dd { margin: 0; font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: var(--display-tracking); }
@media (max-width: 639px) { .hero__text > .hero-facts { display: none; } .hero__media .countdown { display: none; } }

/* the countdown is the hero's one float card, over the collage's dark hair, not a face */
.countdown { width: min(320px, calc(100% - 2 * var(--s-5))); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-1) var(--s-3); }
.countdown__title { grid-column: 1 / -1; color: var(--muted); }
.countdown__unit { display: grid; gap: 2px; }
.countdown__value { font: var(--display-weight) 30px/1 var(--font-display); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.countdown__label { font-size: var(--t-label); color: var(--muted); }
.countdown__caption { grid-column: 1 / -1; margin-top: var(--s-2); color: var(--ink); }
.countdown__caption:empty { display: none; }
.is-skeleton { opacity: 0.3; }
.link--button { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; cursor: pointer; }
.week__cal { display: inline-flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin-left: var(--s-5); }

/* ---- statement and the three reasons ------------------------------------- */
.about__h { max-width: 18ch; margin-bottom: var(--s-5); }
.statement .mo-wh__text { max-width: 22em; }
.about__lead { margin-top: var(--s-4); color: var(--muted); }
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--gutter); margin-top: var(--s-6); }
.reason { padding-top: var(--s-4); border-top: 1px solid var(--line); display: grid; gap: var(--s-2); align-content: start; }
.reason p { color: var(--ink); max-width: 38ch; }
@media (max-width: 1023px) { .reasons { grid-template-columns: 1fr; } }

/* ---- the six tracks: a reel that pins and swaps one track for the next --- */
/* Asked for by the client. The section is exactly four screens while it pins (every section after it still
   starts on a whole screen), and a plain stack of six everywhere it does not. */
main > section.tracks:not(.is-pinned) { height: auto; min-height: 0; }
main > section.tracks > .wrap { display: flex; flex-direction: column; }
.tracks__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-5) var(--gutter); align-items: start; margin-bottom: var(--s-7); }
.tracks__head h2 { grid-column: 1 / span 6; }
.tracks__head p { grid-column: 7 / -1; max-width: none; }
@media (max-width: 1023px) { .tracks__head h2, .tracks__head p { grid-column: 1 / -1; } }

.trackreel { position: relative; flex: 1 1 auto; min-height: 0; }
.trackreel__rail { display: none; }
.trackreel__panels { display: grid; }
.trackreel li:nth-child(1), .trackpanel:nth-child(1) { --stain: var(--s1); --on: var(--ink); }
.trackreel li:nth-child(2), .trackpanel:nth-child(2) { --stain: var(--s2); --on: var(--ink); }
.trackreel li:nth-child(3), .trackpanel:nth-child(3) { --stain: var(--s3); --on: var(--ink); }
.trackreel li:nth-child(4), .trackpanel:nth-child(4) { --stain: var(--s4); --on: var(--ink); }
.trackreel li:nth-child(5), .trackpanel:nth-child(5) { --stain: var(--s5); --on: var(--bg); }
.trackreel li:nth-child(6), .trackpanel:nth-child(6) { --stain: var(--s6); --on: var(--bg); }

.trackpanel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: start; padding-block: var(--s-6); border-bottom: 1px solid var(--line); }
.trackpanel__index span { color: var(--muted); }
.trackpanel h3 { margin: var(--s-3) 0; font: var(--display-weight) var(--t-h2)/1.08 var(--font-display); letter-spacing: var(--display-tracking); }
.trackpanel__blurb { max-width: 52ch; }
.trackpanel__meta { margin-top: var(--s-4); font-size: var(--t-small); color: var(--muted); }
/* a numbered cover sheet in that track's colour */
.trackpanel__art { --art: 84px; display: grid; align-content: space-between; width: var(--art); aspect-ratio: 4 / 5; padding: calc(var(--art) * 0.09); background: var(--stain); color: var(--on); border-radius: var(--r-md); overflow: hidden; }
.trackpanel__num { font: var(--display-weight) calc(var(--art) * 0.34)/0.9 var(--font-display); letter-spacing: var(--display-tracking); }
.trackpanel__art svg { width: 52%; height: auto; justify-self: end; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }

.trackreel.is-pinned .trackreel__stage { position: sticky; top: var(--nav); height: calc(100svh - var(--nav)); display: flex; align-items: center; overflow: hidden; }
.trackreel.is-pinned .trackreel__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; width: 100%; }
.trackreel.is-pinned .trackreel__rail { display: grid; gap: var(--s-3); justify-items: center; }
.trackreel__pip { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font: 500 13px/1 var(--font-text); color: var(--ink); font-variant-numeric: tabular-nums; transition: background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease); }
.trackreel__pip:hover { border-color: var(--ink); }
.trackreel__pip[aria-current='true'] { background: var(--stain); border-color: var(--stain); color: var(--on); }
.trackreel.is-pinned .trackpanel { grid-area: 1 / 1; column-gap: clamp(40px, 7vw, 112px); align-items: center; padding: 0; border: 0; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 420ms var(--ease), transform 420ms var(--ease), visibility 420ms; }
.trackreel.is-pinned .trackpanel.is-active { opacity: 1; visibility: visible; transform: none; }
.trackreel.is-pinned .trackpanel h3 { margin: var(--s-4) 0 var(--s-5); }
.trackreel.is-pinned .trackpanel__blurb { font-size: var(--t-lead); line-height: 1.5; max-width: 44ch; }
.trackreel.is-pinned .trackpanel__meta { margin-top: var(--s-6); }
.trackreel.is-pinned .trackpanel__art { --art: min(40vh, 24vw, 340px); border-radius: var(--r-lg); }
.trackreel.is-pinned .trackpanel__art svg { stroke-width: 0.9; }
.is-flash { animation: htc-flash 1.7s var(--ease); }
@keyframes htc-flash { 0% { box-shadow: 0 0 0 0 transparent; } 18% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 50%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- the week ------------------------------------------------------------ */
.week { margin: 0 0 var(--s-6); }
.week__days, .week__bars { display: grid; grid-template-columns: repeat(var(--days, 8), minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.week__day { padding: 0 0 var(--s-2) var(--s-2); border-left: 1px solid var(--ink); }
.week__dow { display: block; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.week__num { display: block; font: var(--display-weight) clamp(22px, 2.4vw, 34px)/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.week__bars { height: 48px; border-radius: var(--r-md); overflow: hidden; }
.week__bar { display: flex; align-items: center; min-width: 0; padding-inline: var(--s-4); font-size: var(--t-small); font-weight: 500; }
.week__bar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.week__bar--open { background: var(--action); color: var(--action-ink); }
.week__bar--build { grid-column: 2 / -2; background: var(--surface); color: var(--ink); }
.week__bar--close { background: var(--ink); color: var(--bg); }
.week figcaption { margin-top: var(--s-3); }
@media (max-width: 639px) { .week__bar--open span, .week__bar--close span, .week__more { display: none; } .week__bars { height: 40px; } .week__day { padding-left: 4px; } .week__cal { display: flex; margin: var(--s-2) 0 0; } }

.steps { display: grid; }
.step { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 4fr) minmax(0, 6fr); gap: var(--s-3) var(--gutter); align-items: stretch; padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 0; }
.step__marker { font: var(--display-weight) var(--t-h2)/1 var(--font-display); letter-spacing: var(--display-tracking); }
.step--final .step__marker { color: var(--accent); }
.step__title h3 { margin-top: var(--s-1); }
.step__text p { max-width: 58ch; }
.step__text .day__note { margin-top: var(--s-2); font-size: var(--t-small); color: var(--muted); }
@media (max-width: 1023px) { .step { grid-template-columns: 4.5rem minmax(0, 1fr); } .step__marker { grid-row: span 2; } .step__text { grid-column: 2; } }

/* ---- judging: 100 points drawn to scale ---------------------------------- */
.rubric__bar { display: flex; height: 40px; border-radius: var(--r-md); overflow: hidden; }
.rubric__bar span { flex: var(--w) 0 0; display: flex; align-items: flex-end; padding: var(--s-2) var(--s-3); font: 500 var(--t-small)/1 var(--font-text); color: var(--bg); font-variant-numeric: tabular-nums; }
.rubric__bar span:nth-child(1) { background: var(--action); color: var(--action-ink); }
.rubric__bar span:nth-child(2) { background: var(--ink); }
.rubric__bar span:nth-child(3) { background: color-mix(in oklab, var(--ink) 70%, var(--bg)); }
.rubric__bar span:nth-child(4) { background: color-mix(in oklab, var(--ink) 34%, var(--bg)); color: var(--ink); }
.rubric__bar span:nth-child(5) { background: color-mix(in oklab, var(--ink) 16%, var(--bg)); color: var(--ink); }
.criteria { margin-top: var(--s-3); }
.criterion { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: var(--s-2) var(--s-5); align-items: baseline; padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.criterion:first-child { padding-top: 0; }
.criterion__weight { font: var(--display-weight) var(--t-h2)/1 var(--font-display); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.criterion__weight span { font-size: 0.5em; margin-left: 2px; }
.criterion h3 { margin-bottom: 2px; }
.criterion p:not(.criterion__weight) { max-width: 56ch; }

/* ---- people: judges and team, five to a row ------------------------------ */
.people { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); align-items: start; list-style: none; padding: 0; }
.people .tile { gap: var(--s-3); }
.jtile__text, .mtile__text { display: grid; gap: 2px; min-width: 0; }
.jtile__link { display: inline-flex; align-items: center; justify-content: flex-start; width: 44px; height: 44px; margin-top: calc(var(--s-1) * -1); }
.jtile__link img { width: 24px; height: 24px; }
/* most portraits came from round profile pictures; the zoom crops the leftover corners out of the square frame */
.jtile .tile__media > img { scale: var(--zoom, 1.22); }
@media (max-width: 1023px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-4); } }

/* partners merge into the team section as its last row */
.partners { margin-top: var(--s-8); display: grid; gap: var(--s-4); }
.partner { display: grid; grid-template-columns: 72px minmax(0, 5fr) minmax(0, 6fr) auto; gap: var(--s-3) var(--gutter); align-items: center; }
.partner__logo { width: 72px; height: 72px; border-radius: 50%; }
.partner__name { font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: var(--display-tracking); }
.partner__about { max-width: 52ch; }
@media (max-width: 1023px) { .partner { grid-template-columns: 72px minmax(0, 1fr); } .partner__logo { grid-row: span 3; } .partner__about, .partner .link { grid-column: 2; justify-self: start; } }

/* ---- the countries band: outlines inked in one at a time ------------------ */
/* Asked for by the client. Three screens while it pins; the stage sits on screen for the middle two. Light
   colour on this dark ground is the kit's --ink, and the dark is --bg. */
main > section.world { padding: 0; }
main > section.world:not(.is-pinned) { height: auto; min-height: 0; padding: var(--s-9) 0; }
main > section.world > .wrap { height: 100%; }
.world__stage { display: block; }
.world.is-pinned .world__stage { position: sticky; top: var(--nav); height: calc(100svh - var(--nav)); display: flex; align-items: center; overflow: hidden; }
.world__inner { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s-7) var(--gutter); align-items: start; width: 100%; }
.world h2 { font-size: var(--t-h2); }
.world .t-lead { margin-top: var(--s-5); }
.world__now { display: none; }
.world__name { font: var(--display-weight) var(--t-h2)/1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--accent); }
.world__map { --h: clamp(110px, 21vh, 210px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 0.5fr); gap: var(--s-6) var(--s-5); list-style: none; padding: 0; margin: 0; }
.country { display: grid; gap: var(--s-3); justify-items: center; align-content: end; }
.country svg { width: 100%; height: var(--h); overflow: visible; }
.country path { fill: var(--c, var(--accent)); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill 420ms var(--ease), stroke 420ms var(--ease); }
.country__name { font-size: var(--t-label); font-weight: 500; transition: color 420ms var(--ease); }
.country--tall { grid-column: 4; grid-row: 1 / span 2; }
.country--tall svg { height: calc(var(--h) * 2 + var(--s-6)); }
.country:nth-child(1) { --c: var(--s1); }
.country:nth-child(2) { --c: var(--s2); }
.country:nth-child(3) { --c: var(--s4); }
.country:nth-child(4) { --c: var(--s5); }
.country:nth-child(5) { --c: var(--s6); }
.country:nth-child(6) { --c: var(--s3); }
.country:nth-child(7) { --c: var(--ink); }
.world.is-pinned .world__now { display: flex; align-items: baseline; gap: var(--s-4); margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.world.is-pinned .country:not(.is-on) path { fill: transparent; stroke: color-mix(in oklab, var(--ink) 40%, transparent); }
.world.is-pinned .country:not(.is-on) .country__name { color: color-mix(in oklab, var(--ink) 55%, transparent); }
@media (max-width: 1023px) { .world__inner { grid-template-columns: 1fr; } }
@media (max-width: 639px) {
  .world__map { --h: 84px; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 0.45fr); gap: var(--s-5) var(--s-4); }
  .country--tall { grid-column: 3; grid-row: 1 / span 3; }
  .country--tall svg { height: calc(var(--h) * 3 + var(--s-5) * 2 + 36px); }
}
@media (prefers-reduced-motion: reduce) { main > section.tracks, main > section.world { height: auto; min-height: 0; } }

/* ---- three ways in -------------------------------------------------------- */
.way { display: grid; gap: var(--s-3); justify-items: start; align-content: start; }
.way p { max-width: 46ch; }
.way--lead { padding: var(--s-7); background: var(--surface); border-radius: var(--r-lg); gap: var(--s-4); min-height: 100%; align-content: end; }
.ways { display: grid; gap: var(--s-6); }
.ways .way + .way { padding-top: var(--s-6); }

/* ---- questions ------------------------------------------------------------ */
.faq__lead { margin-top: var(--s-4); color: var(--muted); }
.contact { display: grid; gap: var(--s-2); }
.contact p { max-width: 40ch; }

/* ---- sign-up -------------------------------------------------------------- */
.signup { background: var(--surface); }
.mentor-cta { margin-top: var(--s-7); display: grid; gap: var(--s-3); justify-items: start; }
.mentor-cta p { max-width: 44ch; }
.form--sign { padding: var(--s-6); background: var(--bg); border-radius: var(--r-lg); }
.field--full { grid-column: 1 / -1; }
.field--check { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s-2) var(--s-3); font-weight: 400; min-height: 44px; }
.field--check input { width: 22px; height: 22px; accent-color: var(--ink); }
.field--check .field__error { grid-column: 1 / -1; }
.form__status a { font-weight: 500; text-decoration: underline; }

/* ---- footer ---------------------------------------------------------------- */
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; }
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer__links2 { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.footer__col a { text-decoration: none; overflow-wrap: anywhere; }

/* ==========================================================================
   Inner pages: mentor registration, privacy, terms
   ========================================================================== */
main.page { display: block; padding: calc(var(--nav) + var(--s-8)) 0 var(--s-10); }
.page__wrap { max-width: 960px; margin-inline: auto; }
.page__intro { display: grid; gap: var(--s-4); margin-bottom: var(--s-8); }
.page__intro h1 { font-size: var(--t-h1); }
.page__intro .t-lead { max-width: 52ch; }
.legal { border-top: 1px solid var(--line); }
.legal h2 { margin-top: var(--s-7); font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: var(--display-tracking); }
.legal p { margin-top: var(--s-2); max-width: 62ch; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.pagefoot { padding-block: var(--s-7) var(--s-6); }

.mform { display: grid; gap: var(--s-8); padding: var(--s-7); background: var(--surface); border-radius: var(--r-lg); }
.mform__part { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-5); min-width: 0; }
.mform__part legend { width: 100%; padding: 0; margin-bottom: var(--s-5); font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: var(--display-tracking); }
.mform__part + .mform__part legend { padding-top: var(--s-7); border-top: 1px solid var(--line); }
.mform__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--gutter); align-items: start; }
.mform .field label { font-size: var(--t-small); font-weight: 500; }
.mform .field__optional { font-weight: 400; color: var(--muted); }
.mform .error { font: 500 var(--t-small)/1.4 var(--font-text); color: #8f1b11; }
.mform .error:empty { display: none; }
.mform :is(input, select)[aria-invalid="true"] { border: 2px solid #b42318; }
.photo-pick { display: flex; align-items: center; gap: var(--s-4); }
.photo-pick__preview { flex: none; width: 56px; height: 56px; border-radius: var(--r-md); border: 1px dashed var(--line); background: var(--bg) center / cover no-repeat; }
.photo-pick__preview.has-photo { border-style: solid; border-color: var(--ink); }
.photo-pick input[type='file'] { height: auto; padding: var(--s-2); border: 0; background: none; font-size: var(--t-small); }
.hours__note { max-width: 62ch; }
.hours__same { display: inline-flex; align-items: center; gap: var(--s-3); font-weight: 500; cursor: pointer; min-height: 44px; }
.hours__same input { width: 20px; height: 20px; accent-color: var(--ink); }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--s-5) var(--s-6); }
.hours__day { min-width: 0; }
.hours__label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-2); font-weight: 500; }
.hours__count { font-size: var(--t-label); font-weight: 400; color: var(--muted); }
.hours__count.is-good { color: var(--ink); font-weight: 500; }
.hours__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; touch-action: none; user-select: none; }
.hours__cell { height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: 500 11px/1 var(--font-text); color: var(--muted); transition: background-color 140ms var(--ease), border-color 140ms var(--ease); }
.hours__cell:hover { border-color: var(--ink); }
.hours__cell[aria-pressed='true'] { background: var(--action); border-color: var(--action); color: var(--action-ink); }
#m-error-hours:empty { display: none; }
.mform .form__status { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); font-weight: 500; }
.mform .form__status svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.mform .form__status[data-state='success'] { background: color-mix(in oklab, #1d6a4c 14%, var(--bg)); color: #1d6a4c; }
.mform .form__status[data-state='error'] { background: color-mix(in oklab, #b42318 12%, var(--bg)); color: #8f1b11; }
.mform .form__status[data-state='error'] svg { display: none; }
.mform .form__status[hidden] { display: none; }
.mform .btn { justify-self: start; }
@media (max-width: 639px) { .mform { padding: var(--s-5); } .mform__row { grid-template-columns: 1fr; } }
