/* Home, "First visit checklist" (Wren, 2026-09-28). Without .live (no script,
   ?nofx=1, reduced motion) this is the resting state: all four steps as cards,
   every drawing complete. first-visit.js adds .live, builds the rail and shows
   one step at a time. Drawings: olive line, sage for the quiet strokes, copper
   for the one mark that matters in each (graphics only; never text). */
.fv{background:var(--paper);padding:72px 0;border-top:1px solid var(--line)}
.fv-grid{display:grid;gap:32px}
.fv-head h2{font-size:1.9rem;font-size:max(1.9rem,min(6.4vw,3rem));font-size:clamp(1.9rem,6.4vw,3rem);max-width:12em}
.fv-head h2 em{font-style:italic}
.fv-steps{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.fv-step{display:grid;grid-template-columns:96px minmax(0,1fr);gap:18px;align-items:start;padding:20px;background:var(--cream);border:1px solid var(--line);border-radius:var(--r)}
.fv-art svg{display:block;width:100%;height:auto;overflow:visible}
.fv-n{font:italic 400 1.02rem/1.3 var(--display);color:var(--muted);margin-bottom:6px}
.fv-step h3{font-size:1.35rem;line-height:1.2}
.fv-text>p:not(.fv-n){margin-top:10px;font-size:.96rem;line-height:1.6;color:var(--ink-2);max-width:36em}
.fv-marks{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.fv-marks li{font:500 .8rem/1.2 var(--body);padding:6px 10px;border:1px solid var(--line-strong);border-radius:999px;color:var(--olive);background:var(--paper)}
.fv-rail:empty{display:none}

/* the drawings */
.fv-art path{fill:none;stroke:var(--olive);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.fv-art .soft{stroke:var(--sage)}
.fv-art .acc{stroke:var(--copper);stroke-width:2}
.fv-art .cell{fill:none;stroke:var(--line-strong);stroke-width:1}
.fv-art .dot{fill:var(--sage)}
.fv-art .pick{fill:rgba(197,140,81,.14);stroke:var(--copper);stroke-width:1.4}
.fv-art .fill{fill:var(--olive)}
.fv-art .p,.fv-art .rise{transform-box:fill-box;transform-origin:50% 50%}

/* the player's parts */
.fv-btn{display:inline-flex;align-items:center;gap:8px;min-width:44px;height:44px;margin-top:16px;padding:0 16px 0 13px;border-radius:999px;font:500 .88rem/1 var(--body);border:1px solid var(--line-strong);background:var(--cream);color:var(--olive);cursor:pointer;touch-action:manipulation}
.fv-btn:hover{border-color:var(--olive)}
.fv-btn[hidden]{display:none}
.fv-btn .i-play,.fv-btn.is-paused .i-pause,.fv-btn .w-play,.fv-btn.is-paused .w-pause{display:none}
.fv-btn.is-paused .w-play{display:inline}
.fv-btn.is-paused .i-play{display:block}
.fv-rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:28px}
.fv-tab{position:relative;display:flex;align-items:center;gap:10px;min-height:56px;padding:10px 12px;margin:0;border:1px solid var(--line);border-radius:var(--r);background:transparent;color:var(--muted);font:500 .86rem/1.25 var(--body);text-align:left;cursor:pointer;overflow:hidden;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:border-color .3s,color .3s,background-color .3s}
.fv-tn{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:1px solid var(--line-strong);font:600 .75rem/1 var(--body);color:var(--olive)}
.fv-tl{min-width:0}
.fv-tp{position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--olive);transform-origin:0 50%;transform:scaleX(var(--p,0))}
.fv-tab[aria-current="step"]{color:var(--olive);border-color:var(--line-strong);background:var(--cream)}
.fv-tab[aria-current="step"] .fv-tn{background:var(--olive);border-color:var(--olive);color:var(--cream)}
.fv-tab.done{color:var(--olive)}
.fv-tab.done .fv-tp{background:var(--line-strong)}
@media (hover:hover){.fv-tab:hover{border-color:var(--olive);color:var(--olive)}}

/* live: one step at a time, stacked in one cell so the height never jumps */
.fv.live .fv-steps{grid-template-areas:"s"}
.fv.live .fv-step{grid-area:s;visibility:hidden;opacity:0;transition:opacity .45s var(--ease),visibility 0s linear .45s}
.fv.live .fv-step.on{visibility:visible;opacity:1;transition:opacity .45s var(--ease),visibility 0s linear 0s}
.fv.live .fv-step{grid-template-columns:minmax(0,1fr);gap:8px}
.fv.live .fv-art{max-width:200px}

/* phones and tablets, live: the whole checklist on one screen (Lindsey,
   2026-10-05). The rail is four thin story lines that fill as the steps go
   by, a small numeral under each and the pause folded in as a round key at
   the end. Each line is a 44px button; the label stays in it for screen
   readers, the card below names the step for everyone else. The card puts
   a small drawing beside its heading and lists the notes as plain dots. */
@media (max-width:920px){
  .fv.live{padding:38px 0 42px}
  .fv.live .fv-grid{gap:12px}
  /* the pause sits over the scrub (Eric, 2026-10-05): a quiet icon at the end
     of the eyebrow's row, so the four lines run the full width under the heading */
  .fv.live .fv-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px}
  .fv.live .fv-head>.eyebrow{grid-column:1;grid-row:1;margin-bottom:8px}
  .fv.live .fv-head>h2{grid-column:1/-1;grid-row:2;margin-bottom:12px}

  .fv.live .fv-rail{grid-column:1/-1;grid-row:3;display:flex;gap:6px;margin:0}
  .fv.live .fv-tab{flex:1 1 0;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:0;min-width:0;min-height:44px;padding:13px 0 0;border:0;border-radius:0;background:none;color:var(--muted);overflow:visible}
  .fv.live .fv-tab::before{content:"";position:absolute;left:0;right:0;top:13px;height:3px;border-radius:2px;background:var(--line)}
  .fv.live .fv-tp{top:13px;bottom:auto;height:3px;border-radius:2px;background:var(--olive)}
  .fv.live .fv-tab.done .fv-tp{background:var(--olive)}
  .fv.live .fv-tn{display:block;width:auto;height:auto;margin-top:9px;border:0;border-radius:0;background:none;font:600 .7rem/1 var(--body);letter-spacing:.1em;color:inherit;transition:color .3s}
  .fv.live .fv-tab[aria-current="step"]{background:none;color:var(--olive)}
  .fv.live .fv-tab[aria-current="step"] .fv-tn{background:none;color:var(--olive)}
  .fv.live .fv-tl{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  .fv.live .fv-tab:focus-visible{outline-offset:4px;border-radius:4px}

  /* 28px seen, 44px to the finger (the ::before); no fill, no shadow, ink at 60% until it has focus */
  .fv.live .fv-btn{grid-column:2;grid-row:1;align-self:start;position:relative;width:28px;min-width:28px;height:28px;margin:-6px -6px 0 0;padding:0;justify-content:center;gap:0;border:0;border-radius:50%;background:none;box-shadow:none;color:var(--olive);opacity:.6;transition:opacity .2s}
  .fv.live .fv-btn::before{content:"";position:absolute;top:-8px;right:-8px;bottom:-8px;left:-8px;inset:-8px}
  .fv.live .fv-btn:hover{opacity:1}.fv.live .fv-btn:focus-visible{opacity:1}
  .fv.live .fv-btn:focus-visible{outline-offset:1px}
  .fv.live .fv-btn .fv-bl{display:none}
  .fv.live .fv-btn svg{width:16px;height:16px}

  /* the swipe (2026-10-05): the whole stage, heading, scrub lines and card,
     leaves vertical scroll and pinch zoom to the browser and the sideways
     stroke to the script; the card follows the finger a little and glides
     back, so it carries transform in its transition here */
  .fv.live{overflow-x:clip;touch-action:pan-y pinch-zoom}
  .fv.live .fv-step{transition:opacity .45s var(--ease),visibility 0s linear .45s,transform .4s var(--ease)}
  .fv.live .fv-step.on{transition:opacity .45s var(--ease),visibility 0s linear 0s,transform .4s var(--ease)}
  .fv.live .fv-step{grid-template-columns:78px minmax(0,1fr);column-gap:16px;row-gap:0;align-items:center;padding:18px 20px 20px}
  .fv.live .fv-art{grid-column:1;grid-row:1/3;max-width:none}
  .fv.live .fv-text{display:contents}
  .fv.live .fv-n{grid-column:2;grid-row:1;align-self:end;margin:0 0 2px;font-size:.92rem}
  .fv.live .fv-step h3{grid-column:2;grid-row:2;align-self:start;font-size:1.22rem}
  .fv.live .fv-text>p:not(.fv-n){grid-column:1/-1;margin-top:12px;font-size:.93rem;line-height:1.55}
  .fv.live .fv-marks{grid-column:1/-1;margin-top:12px;gap:6px 16px}
  .fv.live .fv-marks li{display:inline-flex;align-items:center;gap:7px;padding:0;border:0;border-radius:0;background:none;font:500 .8rem/1.3 var(--body);color:var(--muted)}
  .fv.live .fv-marks li::before{content:"";flex:none;width:5px;height:5px;border-radius:50%;background:var(--copper)}
}

@media (min-width:600px){
  .fv:not(.live) .fv-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fv:not(.live) .fv-step{grid-template-columns:minmax(0,1fr)}
  .fv:not(.live) .fv-art{max-width:150px}
}
@media (min-width:921px){
  .fv{padding:112px 0}
  .fv-grid{gap:48px}
  .fv.live .fv-grid{grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:64px;align-items:start}
  .fv.live .fv-rail{grid-template-columns:minmax(0,1fr);gap:6px;margin-top:36px}
  .fv.live .fv-tab{font-size:.95rem;min-height:56px}
  .fv.live .fv-step{grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:40px;align-items:center;padding:44px 40px;min-height:100%}
  .fv.live .fv-art{max-width:none}
  .fv.live .fv-step h3{font-size:1.9rem}
  .fv.live .fv-text>p:not(.fv-n){font-size:1.04rem}
}
@media (min-width:1100px){
  .fv:not(.live) .fv-steps{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* the drawing plays only with the motion layer confirmed and motion allowed */
@media (prefers-reduced-motion:no-preference){
  html.fx .fv.live .d{stroke-dasharray:1 2}
  html.fx .fv.live .fv-step.on .d{animation:fvDraw .9s var(--ease) var(--d,0s) both}
  html.fx .fv.live .fv-step.on .p{animation:fvPop .45s var(--ease) var(--d,0s) both}
  html.fx .fv.live .fv-step.on .rise{animation:fvRise .8s var(--ease) var(--d,0s) both}
  html.fx .fv.live.held .fv-step *{animation-play-state:paused}
}
@keyframes fvDraw{from{stroke-dashoffset:1.05}to{stroke-dashoffset:0}}
@keyframes fvPop{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:none}}
@keyframes fvRise{from{transform:translateY(22px)}to{transform:none}}
@media (prefers-reduced-motion:reduce){.fv-step,.fv-tab{transition:none}}
