/* join.css: the door-frame marks. A chalk line runs down the left margin, a tick beside each height, and a print hangs level with every tick. */

.the-doorframe { overflow-x: clip; }

/* ---------- the arrival: h1 split over three prints ---------- */
.the-arrival { padding-bottom: clamp(1.5rem, 5vh, 3rem); }
.the-asked { --the-hang: 12 / -1; --the-rung: 1; align-self: end; padding: 1rem var(--the-edge) 0.25rem 0; }
.the-asked span { display: block; }
.the-asked-big { font-size: clamp(2rem, 4.8vw, 4.5rem); line-height: 1.05; }
.the-asked-small {
  margin-top: 0.5rem;
  font-size: clamp(1.25rem, 0.95rem + 1.3vw, 2rem); line-height: 1.15;
}
.the-keys { --the-hang: 1 / span 10; --the-rung: 1 / span 3; }
.the-afternoon { --the-hang: 12 / span 8; --the-rung: 2; }
.the-coats { --the-hang: 12 / span 8; --the-rung: 3; }
.the-mentor {
  --the-hang: 20 / -1; --the-rung: 2 / span 2;
  position: relative; align-self: stretch; min-height: 0;
}
.the-mentor img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; aspect-ratio: auto;
}

/* ---------- the plain answer ---------- */
.the-reply-head { --the-hang: 2 / span 14; --the-rung: 1; }
.the-reply-text { --the-hang: 2 / span 12; --the-rung: 2; max-width: 38rem; font-size: 1.25rem; line-height: 1.55; }
.the-reply-facts { --the-hang: 2 / span 14; --the-rung: 3; }
.the-reply-facts > div { padding-block: 0.65rem; }
.the-doorway { --the-hang: 18 / -1; --the-rung: 1 / span 3; --the-shape: 4 / 5; }

/* ---------- the door-frame marks (set piece) ---------- */
.the-jamb {
  container: jamb / inline-size;
  position: relative;
  padding-block: var(--the-breath);
}
/* the frame itself: one chalk line in the left margin, clear of all text */
.the-jamb::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 0.125rem; background: var(--the-chalk); opacity: 0.45;
}
.the-jamb-head {
  display: grid; gap: 1rem 3rem;
  padding-inline: var(--the-edge);
  margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
}
.the-jamb-head .the-scene { max-width: 34rem; }

.the-rung {
  --the-sill: clamp(1.25rem, 4vh, 2.5rem);
  position: relative;
  display: grid; gap: 1rem;
  padding: var(--the-sill) 0 var(--the-sill) var(--the-edge);
}
/* the tick: each one a little longer than the last, always shorter than the margin */
.the-rung::before {
  content: ""; position: absolute; left: 0; top: var(--the-sill);
  width: calc(var(--the-edge) * var(--the-reach, 0.4)); height: 0.125rem;
  background: var(--the-chalk);
}
.the-rung-text { padding-right: var(--the-edge); }
.the-rung-text p { max-width: 34rem; margin: 0.6rem 0 0.25rem; font-size: 1.125rem; }
.the-rung-text p a { text-decoration: underline 0.125rem var(--the-brass); text-underline-offset: 0.22em; }
.the-word { font-size: calc(1.5rem + 0.6vw * var(--the-climb, 1)); line-height: 1.05; }

@container jamb (min-width: 44rem) {
  .the-jamb-head { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; }
  .the-rung { grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: start; padding-right: 0; }
  .the-rung > .the-print { grid-row: 1; grid-column: 1 / span var(--the-span); }
  .the-rung > .the-rung-text { grid-row: 1; grid-column: calc(var(--the-span) + 2) / -1; }
  .the-rung-b > .the-print { grid-column: calc(25 - var(--the-span)) / -1; }
  .the-rung-b > .the-rung-text { grid-column: 1 / calc(24 - var(--the-span)); }
}

/* ---------- what we ask back ---------- */
.the-return-head { --the-hang: 2 / span 11; --the-rung: 1; }
.the-return-text { --the-hang: 2 / span 10; --the-rung: 2; max-width: 38rem; font-size: 1.125rem; }
.the-return-text a { text-decoration: underline 0.125rem var(--the-brass); text-underline-offset: 0.22em; }
.the-return-text a:hover, .the-return-text a:focus-visible { color: var(--the-gleam); }
.the-return-print { --the-hang: 14 / -1; --the-rung: 1 / span 2; }

/* ---------- the wall folds to two columns ---------- */
@container band (max-width: 44rem) {
  .the-asked { order: -1; padding: 0.75rem var(--the-edge) 0; }
  .the-keys, .the-coats, .the-mentor, .the-doorway, .the-return-print { --the-narrow: 1 / -1; }
  .the-mentor { aspect-ratio: 4 / 5; }
  .the-doorway { --the-shape: 1 / 1; }
  .the-reply-text, .the-return-text { font-size: 1.0625rem; }
}
@media (max-width: 47.9rem) {
  .the-rung-text p { font-size: 1.0625rem; }
}
