/* Trial page: the seam as a progress line. Order: layout, type, colour, motion. */

/* ================= LAYOUT ================= */
.trialpath { --tda-fill: 0; }

/* The picture and its caption keep the page margin. */
.trialpath .hall { padding: 0.6rem var(--tda-edge) var(--tda-edge); }

/* The hairline seam comes from site.css. It runs in its own gutter beside the divider,
   so the column's text keeps the same page margin as Classes and Home. */
.trialpath-studio { position: relative; }
.seamline {
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 0.25rem;
}
.seamline-fill {
  position: sticky;
  top: var(--tda-lintel);
  display: block;
  height: 0;
  min-height: 1.5rem;
  max-height: 100%;
}
.trialpath-studio { --tda-track: calc(100vh - var(--tda-lintel)); }

/* The four steps, two and two. The rule under them stops at the column's margin. */
.tally {
  position: sticky;
  top: var(--tda-lintel);
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.6rem var(--tda-edge);
}
.tally::after {
  content: "";
  position: absolute;
  right: var(--tda-edge);
  bottom: 0;
  left: var(--tda-edge);
  height: var(--tda-tread);
}
.tally li { min-width: 0; }
.tally .tile {
  display: flex;
  width: 100%;
  padding: 0.35rem 0.7rem;
  white-space: normal;
  justify-content: flex-start;
  text-align: left;
}
.trialpath .scene:first-of-type { padding-top: clamp(1.5rem, 5vh, 3rem); }
.trialpath .scene { scroll-margin-top: 8rem; }

/* The offer: a blue-ruled note, apart from the four steps. */
.trialpath .terms {
  margin: 0 var(--tda-edge) clamp(2.5rem, 9vh, 6.5rem);
  padding: 1.1rem 1.25rem 1.25rem;
  border: var(--tda-tread) solid;
  border-top-width: 0.375rem;
}
.trialpath .mirror { aspect-ratio: 16 / 9; }

/* The closing hand-off: the title on two lines, the two action boxes matched to it. */
.visit-trial .bow-way { min-height: 3.5rem; }

@media (max-width: 48rem) {
  .trialpath .hall { padding: 0 var(--tda-edge); }
  .seamline { display: none; }
  /* In the flow on a phone: relative only to hold the rule under it, so the sticky offset
     must be cleared or it pushes the tiles down over the first scene. */
  .tally { position: relative; top: auto; padding: 0.75rem var(--tda-edge); }
  .trialpath .scene { scroll-margin-top: 1rem; }
  .trialpath .terms { padding: 0.9rem 1rem 1rem; }
}

/* ================= TYPE ================= */
.tally .tile { font-size: 0.9rem; }
.trialpath .chapter { margin-bottom: 0; }
.trialpath .chapter-small { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }

/* ================= COLOUR ================= */
.seamline { background: transparent; }
.seamline-fill { background: var(--tda-blue); }
.tally { background: var(--tda-straw); }
.tally::after { background: var(--tda-bark); }
.tally .tile[aria-current="step"] { background: var(--tda-blue); color: var(--tda-straw); border-color: var(--tda-blue); }
.trialpath .terms { background: var(--tda-straw); border-color: var(--tda-blue); }

/* ================= MOTION ================= */
.seamline-fill { transition: height 150ms linear; }
.tally .tile[aria-current="step"] { transition: background-color 150ms linear, color 150ms linear; }
@media (prefers-reduced-motion: reduce) {
  .seamline-fill { transition: none !important; }
}
