/* The home page's findings band (templates/_findings_band.html, static/findings-band.js).
   Type reuses existing rules: the headline is the search band's (.hero-search h2), the lede is the Budget band's body,
   the steps are its caption type, and the passage is the Hansard reader's turn (.rd .who2 .nm, .meta, .body).
   The selection pick, pins, carets and magnifier copy the findings tool's own (deploy/findings/ui.css). */
.fx{background:var(--navy);color:var(--on-navy);overflow:clip}
.fx .wrap{padding-top:clamp(56px,7vw,96px);padding-bottom:clamp(56px,7vw,96px)}
.fx-eyebrow{color:var(--on-navy-soft);letter-spacing:.14em}
.fx h2{margin:14px 0 18px;color:var(--paper);font-size:clamp(30px,4.2vw,56px)}
.fx h2 span,.fx h2 em{display:block}
.fx h2 em{font-style:normal;color:#8fb0ec}
.fx-lede{margin:0;font-size:clamp(19px,1.9vw,23px);line-height:1.4;color:var(--on-navy-soft);max-width:26em}

/* Layout: the steps lead the demo; the passage (select) and the card (create) sit side by side, the hint under the
   passage it explains and the button under the card it acts on. */
.fx-grid{display:grid;column-gap:clamp(28px,4vw,56px);align-items:start;
  grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);grid-template-rows:auto auto auto 1fr auto;
  grid-template-areas:"head head" "steps steps" "rec card" "rec act" "hint ."}
.fx-head{grid-area:head;margin-bottom:clamp(36px,4.5vw,56px)}
.fx-steps{grid-area:steps;list-style:none;margin:0 0 24px;padding:0 0 14px;display:flex;flex-wrap:wrap;gap:8px 28px;border-bottom:1px solid var(--on-navy-line)}
.fx-steps li{font:700 14px/1.55 var(--cond);letter-spacing:.14em;text-transform:uppercase;color:var(--on-navy-soft)}
.fx-steps a,.fx-lede a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.fx-steps a:hover,.fx-lede a:hover{color:var(--paper)}
.fx-record{grid-area:rec;position:relative;isolation:isolate;background:var(--paper);color:var(--ink);border-radius:6px;padding:22px 26px 24px;box-shadow:0 18px 40px rgba(0,0,0,.35)}
.fx-hint{grid-area:hint;margin:14px 0 0;font:400 15px/1.55 var(--body);color:var(--on-navy-soft)}
.fx-card{grid-area:card;margin:0}
.fx-demo{display:contents}
.fx-actions{grid-area:act;margin-top:22px;display:flex;flex-wrap:wrap;gap:14px 24px;align-items:center}
.fx a:focus-visible{outline:2px solid #8fb0ec;outline-offset:3px}

/* the record: a turn, as the reader sets it */
.fx-record-head{display:flex;justify-content:space-between;gap:12px;align-items:start;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px}
.fx-whoblock{display:grid;gap:3px}
.fx-who{font:800 17px/1.15 var(--cond);letter-spacing:.02em;text-transform:uppercase;color:var(--navy)}
.fx-meta{font:400 13.5px/1.3 var(--body);color:var(--ink-soft)}
.fx-when{font:400 13.5px/1.3 var(--body);color:var(--ink-soft);white-space:nowrap}
.fx-text{font-family:"Source Serif 4",Georgia,serif;font-size:18px;line-height:1.62;color:var(--ink);cursor:text}
.fx-text p{margin:0 0 .75em}
.fx-text p:last-child{margin:0}
.fx-text .w{cursor:pointer}
.fx-text .w.on,.fx-text .sp.on{background:rgba(48,98,192,.24)}
.fx-text .w.on{border-radius:2px}
@media(pointer:coarse){.fx-text{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}}
.fx-caret{position:absolute;z-index:2;width:2px;margin-left:-1px;background:#3062c0;pointer-events:none}
.fx-handle{position:absolute;z-index:3;width:44px;height:44px;margin-left:-22px;touch-action:none;cursor:grab}
.fx-handle::after{content:"";position:absolute;left:16px;top:6px;width:12px;height:12px;box-sizing:border-box;border-radius:50%;background:#3062c0;border:2px solid #fff;box-shadow:0 1px 4px #081b3373}
.fx-handle[data-which=start]::after{top:28px}
.fx-handle.drag::after{transform:scale(1.2)}
.fx-caret[hidden],.fx-handle[hidden]{display:none}
.fx-loupe{position:fixed;z-index:1003;max-width:min(86vw,340px);padding:8px 12px;border-radius:10px;background:#081b33;color:#fafdf7;font:500 20px/1.3 var(--body);box-shadow:0 4px 14px #081b3366;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translateX(-50%)}
.fx-loupe b{background:#f6dc9b;color:#081b33;padding:0 2px;border-radius:2px}
.fx-loupe[hidden]{display:none}

/* the result: the site's own quote card */
.fx-card{position:relative;aspect-ratio:1200/630;background:var(--paper);border-radius:4px;overflow:hidden;box-shadow:0 18px 40px rgba(0,0,0,.35)}
.fx-card img{display:block;width:100%;height:100%;object-fit:cover;transition:opacity .2s}
.fx-card.busy img{opacity:.55}
.fx-card-msg{position:absolute;inset:auto 0 0 0;margin:0;padding:12px 16px;background:rgba(8,27,51,.9);color:var(--paper);font:600 15px/1.35 var(--body)}

/* Narrow and short (a phone on its side): the stacked layout's card would be taller than the screen and hide the
   passage, so keep the two columns and let the card follow the passage down its own column, just under the sticky
   site header (findings-band.js measures it into --fx-pin). */
@media (min-width:641px) and (max-width:900px) and (orientation:landscape){
  .fx-grid{grid-template-rows:auto auto auto auto;grid-template-areas:"head head" "steps steps" "rec card" "hint act"}
  .fx-card{position:sticky;top:var(--fx-pin,64px);z-index:3}
  .fx-actions{margin-top:14px}
  .fx-record{padding:18px 18px 20px}
  .fx-text{font-size:17px;line-height:1.6}
}

@media (max-width:640px),(max-width:900px) and (orientation:portrait){
  .fx-grid{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"head" "demo" "steps" "act"}
  /* card, then the passage it comes from. The card is not pinned here: it is often taller than the passage, so a
     pinned card slides over the very words being picked. Card and passage fit on one screen together. */
  .fx-demo{grid-area:demo;display:flex;flex-direction:column}
  .fx-demo .fx-card{order:-1}
  .fx-head{margin-bottom:28px}
  .fx-record{padding:18px 18px 20px}
  .fx-text{font-size:17px;line-height:1.6}
  .fx-card{margin:0 0 20px}
  .fx-steps{display:grid;gap:8px;margin:28px 0 24px;padding:0;border:0}
  .fx-actions{margin:0}
}
@media (prefers-reduced-motion:reduce){.fx-card img{transition:none}}
