/* The questions page, read top to bottom: spine title, preface, print, narrowing row, ledger, hand-off. */

/* A phone stacks the whole page in one column; the print sits full width under the preface,
   cut short, so the coat reads at a glance without pushing the first rows off the screen. */
.gtt-asking{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-areas:
    "title"
    "preface"
    "crop"
    "pick"
    "rows"
    "hand";
  gap:var(--step);
  padding-block:clamp(1.5rem,5vh,3.25rem);
  padding-inline:clamp(1rem,4vw,3rem);
  background:var(--overcast);color:var(--darkroom);
}

/* The title runs down the far left on a desk, upright on a phone. */
.gtt-spine{grid-area:title;align-self:center;min-width:0}
.gtt-spine h1{
  margin:0;font-weight:500;font-size:1.875rem;line-height:1.1;
}

/* Preface: what to say, and the honest note about prices. */
.gtt-preface{grid-area:preface;min-width:0}
.gtt-preface h2{font-weight:500;margin-block-end:.4em}
.gtt-preface p{max-width:60ch}
.gtt-preface p:last-child{margin-block-end:0}

/* The print on a phone: the full measure of the column, a shallow crop of the coat. */
.gtt-crop{grid-area:crop;align-self:start;min-width:0}
.gtt-crop-clip{overflow:hidden;aspect-ratio:16/7;background:var(--darkroom)}
.gtt-crop-clip img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .6s cubic-bezier(.22,.72,.28,1),transform-origin .6s cubic-bezier(.22,.72,.28,1);
}
.gtt-croplines{display:none;margin-block-start:.75rem;max-width:none}
.gtt-cropline{grid-area:1/1;margin:0;visibility:hidden;font-size:var(--smallprint);line-height:1.45;max-width:36ch}
.gtt-cropline-live{visibility:visible}

/* The narrowing row: plain text controls in one tidy line. On a phone it scrolls sideways
   inside its own box, inset from the edge, and fades out at the right to show there is more. */
.gtt-pick{grid-area:pick;min-width:0}
.gtt-narrow{
  display:flex;flex-wrap:nowrap;align-items:center;gap:1.25rem;
  overflow-x:auto;scrollbar-width:thin;
  padding-block:.6rem;padding-inline:.5rem 3rem;
  -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 3rem),transparent);
  mask-image:linear-gradient(to right,#000 calc(100% - 3rem),transparent);
}
.gtt-narrow-pick{flex:0 0 auto;white-space:nowrap;text-decoration-thickness:var(--edge)}
.gtt-narrow-pick[aria-pressed="true"]{text-decoration-thickness:.16em}
.gtt-narrow-pick[aria-pressed="true"]::after{opacity:1}
.gtt-tally{margin:0;min-height:1.4em;font-size:var(--smallprint)}

/* The ledger: six rows on one baseline; the live row takes the four marks.
   The lower marks close inside the row, clear of its rule. */
.gtt-questions{grid-area:rows;list-style:none;margin:0;padding:0;min-width:0}
.gtt-query{
  position:relative;display:grid;gap:.25rem 1.5rem;
  padding-block:.9rem;padding-inline:.6rem;
  margin-block-end:.6rem;
  border-block-end:var(--edge) solid var(--rule-seam);
}
.gtt-query[hidden]{display:none}
.gtt-query::after{
  content:"";position:absolute;
  inset:calc(-1 * var(--mark-offset)) calc(-1 * var(--mark-offset)) var(--mark-offset);
  background-image:
    linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),
    linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),
    linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor),
    linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor);
  background-repeat:no-repeat;
  background-size:
    var(--mark-arm) var(--mark-weight),var(--mark-weight) var(--mark-arm),
    var(--mark-arm) var(--mark-weight),var(--mark-weight) var(--mark-arm),
    var(--mark-arm) var(--mark-weight),var(--mark-weight) var(--mark-arm),
    var(--mark-arm) var(--mark-weight),var(--mark-weight) var(--mark-arm);
  background-position:0 0,0 0,100% 0,100% 0,0 100%,0 100%,100% 100%,100% 100%;
  opacity:0;pointer-events:none;transition:opacity .25s linear;
}
.gtt-query-live::after{opacity:1}
.gtt-query-head{display:grid;gap:.1rem;align-content:start}
.gtt-query-kind{font-size:var(--smallprint);font-weight:600;line-height:1.3}
.gtt-query h3{margin:0;font-family:var(--display);font-weight:500;font-size:var(--subhead);line-height:1.15}
.gtt-query h3 a{display:inline-block;min-height:2.75rem;padding-block:.35rem}
.gtt-query p{margin:0;font-size:var(--reading);line-height:1.5;max-width:60ch;align-self:center}

/* The one live line between the first row and the rest, with air above it. */
.gtt-ask-line{list-style:none;padding-inline:.6rem;margin-block:2rem 1.1rem}
.gtt-ask-line p{
  margin:0;font-family:var(--display);font-weight:500;
  font-size:var(--subhead);line-height:1.2;max-width:none;
}

/* The hand-off under the rows: the number on its own line, then where to read on. */
.gtt-handset{
  grid-area:hand;display:grid;gap:1rem clamp(1.5rem,4vw,3.5rem);
  padding-block-start:clamp(.75rem,2vh,1.5rem);min-width:0;
}
.gtt-handset p{margin:0;font-size:1.125rem;line-height:1.55;max-width:46ch}
.gtt-handset .gtt-dial{
  display:block;width:fit-content;
  font-size:2.25rem;line-height:1.2;margin-block:.1rem .2rem;
}

/* On a desk the print takes the right column and runs down beside the preface AND the
   narrowing row: the filters end on the caption's baseline instead of hanging in a gap. */
@media (min-width:60rem){
  .gtt-asking{
    grid-template-columns:minmax(2.6rem,max-content) minmax(0,1fr) clamp(16rem,30vw,26rem);
    grid-template-areas:
      "title preface crop"
      "title pick crop"
      "title rows rows"
      "title hand hand";
    align-items:start;
  }
  .gtt-spine{writing-mode:vertical-rl;text-orientation:mixed;align-self:start}
  .gtt-spine h1{font-size:2.75rem;line-height:1}
  .gtt-crop{padding-block:0 .5rem;padding-inline:.5rem}
  .gtt-crop-clip{aspect-ratio:16/9}
  .gtt-croplines{display:grid}
  .gtt-pick{align-self:end}
  .gtt-narrow{
    flex-wrap:wrap;overflow:visible;padding-inline:.5rem;padding-block:.2rem;
    -webkit-mask-image:none;mask-image:none;
  }
  .gtt-query{grid-template-columns:minmax(10rem,.9fr) minmax(0,1.5fr);align-items:baseline}
  .gtt-handset{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end}
}

@media (prefers-reduced-motion:reduce){
  .gtt-crop-clip img,.gtt-query::after{transition:none}
}
