/* S3 Track record + «Request the file». Source: Paper 2VZ-0 (desktop
   1200×512 inside 25O-0) and 3EQ-0 (mobile 350×649 inside 3CN-0), get_jsx.
   Mobile-first; desktop from 1024px. Lines: 1px ink at 60%. */

.track {
  --rule-60: color-mix(in srgb, var(--color-ink) 60%, transparent);
  --cream-60: color-mix(in srgb, var(--color-surface) 60%, transparent);
  --cream-80: color-mix(in srgb, var(--color-surface) 80%, transparent);
  padding-top: 80px;
  overflow-x: clip; /* the cocoa band bleeds past the right edge */
}

/* Figure (2026-10-24, human): no kicker (the h2 is visually hidden); the
   giant figure is two lines in one size and style, «$321» over «million»,
   sized by the wider word so both fit the lane (width / font-size = 2.6402
   for «million» in Chrome), capped at 120 mobile / 212 desktop; caption
   «Track record as of <month year>». */
.track__figure {
  container-type: inline-size;
}
.track__number {
  width: max-content;
  font-size: min(108px, calc(100cqi / 2.6402)); /* 2026-10-24, human: a little smaller (was 120) */
  font-weight: var(--font-weight-medium);
  line-height: 1;
  letter-spacing: -0.03em;
}
.track__unit {
  display: block;
}
.track__caption {
  margin-top: 20px; /* audit 2026-10-24: subhead-to-text step 24/20 (was 16/12) */
  font-size: 16px;
  line-height: var(--leading-body);
  opacity: 0.78;
}

/* Request lane on a milk-chocolate band (2026-09-09, human): the band runs
   from the lane to beyond the right edge of the page, rounded on the left,
   and everything on it is set in cream. */
.track__request {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  margin-top: 48px;
  padding: 24px 20px 24px 24px;
  color: var(--color-surface);
}
.track__request::before {
  content: "";
  position: absolute;
  inset: 0 -100vw 0 0;
  z-index: -1;
  border-radius: 24px 0 0 24px;
  background: var(--color-cocoa, #6B4632);
}
.track__request .track__sheet {
  border-color: var(--color-surface);
  background: var(--color-cocoa, #6B4632);
}
.track__request .track__sheet i {
  background: var(--cream-80); /* 2026-10-24: 80% so the bolder lines read (was 60%) */
}
.track__request .field input {
  border-bottom-color: var(--cream-60);
  color: var(--color-surface);
}
.track__request .field input:focus-visible {
  border-bottom-color: var(--color-surface);
  box-shadow: 0 1px 0 0 var(--color-surface);
}
.track__request .field input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-surface);
  box-shadow: inset 0 0 0 100px var(--color-cocoa, #6B4632);
}
.track__request .field input:-webkit-autofill:focus-visible {
  box-shadow: inset 0 0 0 100px var(--color-cocoa, #6B4632), 0 1px 0 0 var(--color-surface);
}
.track__request .field label {
  opacity: 0.78; /* .62 would be 3.8:1 on cocoa; .78 = 5:1 */
}
.track__request .field--invalid input {
  border-bottom-color: var(--color-ground);
}
.track__request .track__button {
  background: var(--color-surface);
  color: var(--color-ink);
}
.track__request .track__button:hover,
.track__request .track__button:active {
  background: color-mix(in oklab, var(--color-surface) 92%, #000000);
}
.track__request :focus-visible {
  outline-color: var(--color-surface);
}

/* File fan (3EX-0 / 2WM-0 sibling): two 48 × 68 sheets, 1px ink frame,
   four hairlines (100 / 100 / 100 / 55%, gap 10, padding 14 / 10); the back
   sheet turns 10° around its bottom-left corner and peeks out on the right. */
.track__fan {
  position: relative;
  width: 60px;
  height: 68px;
}
.track__sheet {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 48px;
  height: 68px;
  padding: 14px 10px;
  border: 1.5px solid var(--color-ink); /* 2026-10-24, human: lines a touch bolder (was 1px) */
  background: var(--color-paper);
}
/* Entrance (2026-10-24, human): the band waits past the right edge
   (js/site.js adds .track--armed at start) and slides in when the section
   scrolls into view (.track--in), after a 150 ms pause; the fan plays once
   the band has arrived. Without JS or under prefers-reduced-motion nothing
   is armed, so the band simply sits in place. */
.track--armed .track__request {
  transform: translateX(100vw);
}
.track--in .track__request {
  animation: track-band-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}
@keyframes track-band-in {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(0);
  }
}

/* The back sheet rests at 10°; js/site.js adds .track__fan--play after the
   band has slid in (and again on every later entry of the section) and it
   fans out to 22° and settles back in 1.2 s (2026-10-24, human); third R7
   exception by the human. Still under prefers-reduced-motion. */
.track__sheet--back {
  transform: rotate(10deg);
  transform-origin: 0 100%;
}
.track__fan--play .track__sheet--back {
  animation: track-fan 1.2s ease-in-out 1;
}
@keyframes track-fan {
  0%, 100% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(22deg);
  }
}
.track__sheet i {
  display: block;
  height: 1.5px; /* 2026-10-24: was 1px */
  background: var(--rule-60);
}
.track__sheet i:last-child {
  width: 55%;
}

.track__statement {
  padding-top: 20px;
  font-size: 16px;
  line-height: var(--leading-body);
}
/* Opt-in for occasional emails (2026-11-07): a native checkbox in the band's
   cream, unticked by default, label-sized text; the button follows after 24px. */
.track__opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
  line-height: var(--leading-body);
  opacity: 0.78;
  cursor: pointer;
}
.track__opt input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--color-surface);
  cursor: pointer;
}
/* Consent line under the form (2026-11-02): a label-sized note with the
   link to the privacy notice. */
.track__consent {
  margin-top: 16px;
  font-size: 13px;
  line-height: var(--leading-body);
  opacity: 0.78;
}
.track__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Form: two underlined fields (slot 52, label as placeholder at 62%, was 50%
   on the canvas until the AA contrast fix of 2026-09-09: 3.29:1 -> 4.5:1),
   then the ink button 52 tall. Labels are real <label>s laid over the
   input; they fade once the field has text. */
.track__form {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
}
.field {
  position: relative;
}
/* The underline belongs to the input (slot 52 + 1px line = 53), so an error
   message below never moves it. */
.field input {
  display: block;
  width: 100%;
  height: 53px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--rule-60);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: var(--leading-body);
  color: var(--color-ink);
}
/* Focus for the underlined field: no rectangle; the underline itself turns
   solid ink and 2px (1px border + 1px shadow, so nothing moves). */
.field input:focus-visible {
  outline: none;
  border-bottom-color: var(--color-ink);
  box-shadow: 0 1px 0 0 var(--color-ink);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-ink);
  box-shadow: inset 0 0 0 100px var(--color-paper);
}
.field input:-webkit-autofill:focus-visible {
  box-shadow: inset 0 0 0 100px var(--color-paper), 0 1px 0 0 var(--color-ink);
}
.field label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 52px;
  font-size: 16px;
  line-height: var(--leading-body);
  opacity: 0.62;
  pointer-events: none;
}
.field input:not(:placeholder-shown) + label {
  opacity: 0;
}
/* Inline validation (JS): message under the field in the page's own type,
   the underline turns --color-ground-deep (3.8:1 on paper, a UI-component
   contrast); the text stays ink for 4.5:1. Empty = hidden. */
.field--invalid input {
  border-bottom-color: var(--color-ground-deep);
}
.field__error {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 16px;
  line-height: var(--leading-body);
}
.field__error:empty {
  display: none;
}
.track__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 20px;
  padding: 0 40px;
  border: 0;
  background: var(--color-ink);
  color: #FFFFFF;
  font-size: var(--text-cta);
  font-weight: var(--font-weight-semibold);
  line-height: 18px;
  white-space: nowrap;
}
.track__button:hover,
.track__button:active {
  background: color-mix(in oklab, var(--color-ink) 88%, #FFFFFF);
}
.track__button:disabled {
  opacity: 0.6;
  cursor: default;
}
.track__status {
  padding-top: 12px;
  font-size: 16px;
  line-height: var(--leading-body);
}
.track__status:empty {
  display: none;
}

@media (min-width: 1024px) {
  /* Two lanes: figure stretches to the request lane's height with the
     kicker at the top and the caption at the bottom (2VZ-0). */
  .track {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding-top: 128px;
  }
  /* 2026-09-09, human: recomposition with the request lane untouched. The
     figure is a tight lockup (kicker, number, caption with 8px gaps) aligned
     to the top of the request lane; variant B anchors kicker top / lockup
     bottom (see PLAN). */
  /* Figure lane spans the band's height (margin-top -48 like the band) and
     centres the lockup on it; the number fills the lane width (696 -> 240). */
  .track__figure {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    margin-top: -48px;
  }
  .track--anchored .track__figure {
    justify-content: space-between;
  }
  .track__number {
    font-size: min(192px, calc(100cqi / 2.6402)); /* 2026-10-24, human: a little smaller (was 212) */
  }
  .track__caption {
    margin-top: 24px;
    font-size: 20px;
    line-height: 140%;
  }
  /* Desktop: form content 384 wide, moved 48px left (x 768 at 1440); the
     band has 48px padding, so its top sits 48px above the fan, level with
     the section top of the figure lane (margin-top -48). */
  /* Lane 528: content 384 at x 840 (96px left of the canvas position),
     band padding 48 on the left, the rest runs to the page edge. */
  /* 2026-10-24, lane 1296: the request lane grows 528 -> 576 (padding-right
     96 -> 144) so the band's left edge (x 792) and the form content (x 840,
     384 wide) stay exactly where the human put them. */
  .track__request {
    flex: 0 0 576px;
    margin-top: -48px;
    padding: 48px 144px 48px 48px;
  }
  .track__statement {
    padding-top: 24px;
    font-size: var(--text-body);
    line-height: var(--leading-body);
  }
  .track__form {
    padding-top: 32px;
  }
  .field input,
  .field label {
    font-size: var(--text-body);
    line-height: var(--leading-body);
  }
  .field__error {
    font-size: var(--text-body);
    line-height: var(--leading-body);
  }
  .track__button {
    align-self: flex-start;
    width: auto;
    margin-top: 24px;
  }
  .track__status {
    font-size: var(--text-body);
    line-height: var(--leading-body);
  }
}
