/* The bands below the trailer: the road, the note, the way in and the end (round 5, 4 Nov). */
/* They use the tokens and the type scale of style.css, and they never touch the opening, the hero or the trailer. */

/* ---- The road: a heading and one sentence, then one drawing across the frame. ---- */

/* The heading runs on one line, and its sentence sits under it at reading width. */
.path__title,
.join__title {
  font-size: 2.75rem;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.path__text {
  max-width: 40rem;
  margin-top: 1.75rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.6;
}

/* The drawing fills the frame's width, with room under it for the labels of the stops. */
.road {
  margin: 5rem 0 0;
  padding-bottom: 9rem;
}

/* The labels sit on the drawing by the same fractions as the points they name. */
.road__stage {
  position: relative;
}

.road__art {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* The whole road is one ink line, so it reads as one way and never as a progress bar. */
.road__line {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* Past the last stop a learner builds today, the road goes on flat in a lighter ink, with no status words. */
.road__line--on {
  stroke: var(--ink-400);
}

/* The empty file is an open square, and each stop on the way is a small filled one. */
.road__start {
  fill: var(--page);
  stroke: var(--text);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.road__stop {
  fill: var(--text);
}

/* The dots between the named stops are the many lessons in between, in the lighter ink of the road ahead. */
.road__more {
  fill: var(--ink-400);
}

/* A stop on the road ahead is an outline in the lighter ink, so the road shows how far it runs today without a status word. */
.road__stop--ahead {
  fill: var(--page);
  stroke: var(--ink-400);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* The end is the one square in the accent, the same size as the start, since it is where the road goes. */
.road__end {
  fill: var(--accent);
}

/* Each label is as wide as the gap to the next stop, less a gutter, so neighbours never touch. */
.road__label {
  position: absolute;
  width: calc(20.83% - 1.5rem);
}

.road__name {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.road__note {
  margin-top: 0.375rem;
  color: var(--text-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Every label hangs under its point, the end's included, so all five read alike. */
.road__label--1,
.road__label--2,
.road__label--3,
.road__label--4,
.road__label--end {
  top: calc(100% + 1rem);
}

/* Each label starts at its stop's left edge, which sits at 0, 242, 482 and 722 of 1152 units. */
.road__label--1 {
  left: 0;
}

.road__label--2 {
  left: 21.01%;
}

.road__label--3 {
  left: 41.84%;
}

.road__label--4 {
  left: 62.67%;
}

/* The end sits flush with the frame's right edge, and its label is right-aligned in the room left after the fourth. */
.road__label--end {
  right: 0;
  width: 16.5%;
  text-align: right;
}

/* ---- What a visitor can check beside who builds it, in two columns. ---- */

.proof {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: 4rem;
  align-items: start;
}

.proof__text {
  color: var(--text-2);
  font-size: 1.125rem;
  line-height: 1.65;
}

.proof__text + .proof__text {
  margin-top: 1rem;
}

.proof__text a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 200ms var(--ease);
}

.proof__text a:hover {
  color: var(--teal-800);
}

/* ---- The end: the builder's name links to their own page, in the line's quiet ink. ---- */

.end__name {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-400);
  transition: color 200ms var(--ease);
}

.end__name:hover {
  color: var(--text);
}

.note__text {
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* The signature links to the owner's own page, with a quiet underline that takes the accent on hover. */
.note__name {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-300);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 200ms var(--ease);
}

.note__name:hover {
  text-decoration-color: var(--accent);
}

/* The signature is the owner's name in the heading face, a clear step above the note's text. */
.note__sign {
  margin-top: 1.5rem;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---- The way in: what runs today and the request on one side, the account and the install line on the other. ---- */

.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 4rem;
  align-items: start;
}

/* The title spans both columns, so the two sides start on the same line under it. */
.join__title {
  grid-column: 1 / -1;
  margin-bottom: 2.5rem;
}

.join__text {
  max-width: 34rem;
  color: var(--text-2);
  font-size: 1.25rem;
  line-height: 1.6;
}

.join__text + .join__text {
  margin-top: 1rem;
}

.join__ask .btn {
  margin-top: 2rem;
}

/* The request is outlined, so the end's Try lesson 1 stays the only filled button below the trailer. */
.btn--quiet {
  min-height: 3.5rem;
  padding: 0 2.25rem;
  border-color: var(--ink-300);
  background: var(--white);
  color: var(--text);
  font: 600 1rem / 1 var(--font-sans);
}

.btn--quiet:hover {
  border-color: var(--ink-950);
}

.btn--quiet:active {
  background: var(--ink-100);
}

.join__install .command {
  display: flex;
  width: 100%;
  margin-top: 1.25rem;
}

/* A column too narrow for the install line breaks it between its parts, so all of it stays in view. */
.join__install .command code {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.join__install .command__line {
  white-space: normal;
}

.join__install .command__part {
  white-space: nowrap;
}

/* What the install line touches stays folded under one quiet line until a visitor opens it. */
.close__more {
  margin-top: 1rem;
}

.close__more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-3);
  font-size: 0.9375rem;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
  transition: color 200ms var(--ease);
}

.close__more summary::-webkit-details-marker {
  display: none;
}

/* A small plus turns into a minus when the note is open. */
.close__more summary::before {
  content: "+";
  width: 0.75rem;
  color: var(--text-4);
  font-family: var(--font-sans);
}

.close__more[open] summary::before {
  content: "\2212";
}

.close__more summary:hover {
  color: var(--text);
}

.close__more summary:focus-visible {
  outline: 2px solid var(--teal-700);
  outline-offset: 2px;
}

.join .close__note {
  margin-top: 0.5rem;
  color: var(--text-4);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.join__text a,
.join .close__note a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 200ms var(--ease);
}

.join__text a:hover,
.join .close__note a:hover {
  color: var(--teal-800);
}

/* ---- One column when the frame is too narrow for two. ---- */

@media (max-width: 60rem) {
  .join {
    grid-template-columns: minmax(0, 1fr);
  }

  .join__install {
    margin-top: 3rem;
  }

  .road {
    padding-bottom: 0;
  }

  .proof {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof .note__body {
    margin-top: 3rem;
  }

  .note__text {
    font-size: 1.25rem;
  }

  .road__art {
    display: none;
  }

  .road__stage {
    border-left: 1px solid var(--text);
    padding-left: 1.5rem;
  }

  .road__label,
  .road__label--end {
    position: static;
    width: auto;
    max-width: 34rem;
    text-align: left;
    white-space: normal;
  }

  .road__label + .road__label {
    margin-top: 1.5rem;
  }
}

/* ---- The note: the owner's words alone in their band, on the frame's centre line. ---- */

.note-alone {
  display: flex;
  justify-content: center;
}

.note-alone .note__body {
  max-width: 44rem;
}
