/* MetricPull product page: the walkthrough preview and its full-screen player, and the export example. Tokens, type, the
   phone frame and the woodpecker come from hero.css and page.css. The page shows a preview that opens the player in a
   full-screen dialog; below it, the example's choices and the one file they make. Every phone size is derived from the
   visible height, with a readable floor. */

/* ---------- The step ---------- */
/* The step and its sentence. Every step's words share one grid cell, so their space never changes and nothing moves.
   Without the script, all steps are listed. */
.wk-progress { display: none; align-items: center; gap: .7rem; margin-top: .45rem; }
.wk-ready .wk-progress { display: flex; }
.wk-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; flex: 1; max-width: 8rem; }
.wk-bars span { height: 3px; border-radius: 2px; background: var(--line-strong); }
.wk-bars span[data-state='done'] { background: color-mix(in srgb, var(--teal-ink) 45%, transparent); }
.wk-bars span[data-state='current'] { background: var(--teal-ink); }
.wk-position { font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.wk-ready .wk-steps { gap: 0; padding-top: .55rem; border-top: 1px solid var(--line); }
.wk-ready .wk-steps > li { grid-area: 1 / 1; visibility: hidden; }
.wk-ready .wk-steps > li.is-current { visibility: visible; }
.wk-phase { display: block; font-size: 1.2rem; font-weight: 500; line-height: 1.3; color: var(--heading); }
.wk-say { display: block; margin-top: .35rem; color: var(--ink-2); text-wrap: pretty; }

/* Back, Play or Pause (Replay at the end) and Next. A control at its end stays focusable and says it is unavailable, so focus
   never jumps away from it. */
.wk-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; padding: .35rem .5rem;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 .875rem/1 var(--sans); cursor: pointer; }
.wk-btn svg { width: .75rem; height: .75rem; flex: none; }
.wk-btn:hover { border-color: var(--ink-3); }
.wk-btn[aria-disabled='true'] { color: var(--ink-3); border-color: var(--line); background: transparent; cursor: default; }
.wk-btn--toggle [data-icon] { display: none; }
.wk-btn--toggle[data-state='paused'] [data-icon='play'], .wk-btn--toggle[data-state='playing'] [data-icon='pause'],
.wk-btn--toggle[data-state='ended'] [data-icon='replay'] { display: block; }

/* ---------- The screen ---------- */
/* Every recorded state is layered in the same frame at the same scale; only the current one shows. The new screen fades in
   over the old one, which stays whole until it is covered, so the screen never dims between states. */
.wk-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.wk-shot.is-current { z-index: 2; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .wk-ready .wk-shot { transition: opacity 0s linear .2s; }
  .wk-ready .wk-shot.is-current { transition: opacity .2s ease; }
}
/* The cue: a teal outline around the real control that leads to the next screen (outside its label, never over it), with
   a white keyline so it reads on teal buttons too. Shown still while paused; before an automatic step it pulses, then the
   press registers where the app was actually tapped, and the result follows. The press stays visible on the old screen as
   the new one covers it (the echo). Back shows no press: it is the visitor's history, not a tap in the app. */
.wk-target, .wk-echo { position: absolute; left: var(--bx); top: var(--by); width: var(--bw); height: var(--bh); border-radius: var(--br);
  pointer-events: none; box-shadow: 0 0 0 1.5px rgb(255 255 255 / 92%), 0 0 0 3.5px var(--wk-cue); opacity: 0; }
.wk-target { z-index: 3; }
.wk-echo { z-index: 1; background: rgb(0 114 118 / 18%); }
.wk-ready .wk-target[data-phase='static'], .wk-ready .wk-target[data-phase='cue'], .wk-ready .wk-target[data-phase='press'] { opacity: 1; }
.wk-target[data-phase='cue'] { box-shadow: 0 0 0 1.5px rgb(255 255 255 / 95%), 0 0 0 5px var(--wk-cue); }
.wk-target[data-phase='press'] { background: rgb(0 114 118 / 18%); }
.wk-press { position: absolute; left: var(--tx); top: var(--ty); width: max(14px, calc(var(--screen) * .06)); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; background: rgb(0 114 118 / 60%); box-shadow: 0 0 0 2px rgb(255 255 255 / 95%); opacity: 0; }
.wk-target[data-phase='press'] .wk-press, .wk-echo .wk-press { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .wk-target[data-phase='cue']::before { content: ''; position: absolute; inset: 0; border-radius: inherit; animation: wk-pulse var(--wk-pulse, 450ms) ease-out 2; }
  @keyframes wk-pulse { from { box-shadow: 0 0 0 4px rgb(0 114 118 / 75%); } to { box-shadow: 0 0 0 calc(var(--screen) * .07) rgb(0 114 118 / 0%); } }
  .wk-target[data-phase='press'] .wk-press { animation: wk-tap .18s ease-out; }
  @keyframes wk-tap { from { scale: .35; } }
  .wk-echo.is-on { animation: wk-echo .34s ease-out; }
  @keyframes wk-echo { from { opacity: 1; } to { opacity: 0; } }
}

/* ---------- What you get ---------- */
.out { padding-block: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.out h2 { font-family: var(--serif); font-weight: 420; font-size: clamp(1.95rem, 3.1vw, 2.6rem); letter-spacing: -.022em; line-height: 1.06; }

@media (max-width: 719px) {
  .wk-ready .wk-progress { display: contents; }
  .wk-ready .wk-progress .wk-position { grid-column: 2; grid-row: 1; }
  .wk-ready .wk-progress .wk-bars { grid-column: 1 / -1; max-width: none; margin-top: .3rem; }
}

/* ---------- The hero: the intro and its action beside the walkthrough preview ---------- */
.landing-hero { position: relative; overflow-x: clip; padding-block: clamp(1rem, 2.4vw, 2.25rem) clamp(2.5rem, 5vw, 4rem); }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: '. side' 'intro side' 'act side' '. side'; column-gap: clamp(2.5rem, 5vw, 5.5rem); }
.landing-grid .hero__intro { padding-top: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- The player: step line, phone, one controls group ---------- */
.pl { --wk-cue: #007276; --pw: calc(var(--screen) + 2 * var(--bezel)); display: grid; }
.pl-cap { grid-area: cap; display: grid; gap: .5rem; align-content: start; min-width: 0; }
.pl-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .3rem .8rem; }
.pl-flow { font-size: .875rem; font-weight: 500; color: var(--ink); }
.wk-ready .pl-head .wk-progress { display: contents; }
.pl-head .wk-position { grid-column: 2; grid-row: 1; }
.pl-head .wk-bars { grid-column: 1 / -1; max-width: none; }
.pl.wk-ready .wk-steps { border-top: 0; padding-top: .2rem; }   /* .pl and .wk-ready are one element; the header's rule is the only divider */
.pl .wk-phase { font-size: 1.15rem; }
.pl-dev { grid-area: dev; display: grid; justify-items: center; }
.pl-ctl { grid-area: ctl; width: var(--pw); justify-self: center; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: .4rem; }
.pl-ctl[hidden] { display: none; }
.pl-ctl .wk-btn { min-height: 44px; }
/* Pace: three choices in the buttons' own columns, so each sits under a button; "Pace" names the group for assistive technology */
.pl-pace { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: .4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.pl-pace legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pl-pace label { position: relative; display: flex; }
.pl-pace input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pl-pace span { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid transparent; border-radius: 9px;
  font-size: .8125rem; color: var(--ink-2); }
.pl-pace input:checked + span { border-color: var(--line); background: var(--wash); color: var(--ink); }
.pl-pace input:hover + span { color: var(--ink); }
.pl-pace input:focus-visible + span { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.pl-say { grid-area: say; display: none; color: var(--ink-2); text-wrap: pretty; }
.pl-note { grid-area: note; }

/* ---------- The preview in the page, and the focus dialog ---------- */
.b-preview { grid-area: side; display: grid; grid-template-columns: auto minmax(0, 16rem); align-items: center; gap: 1.75rem; padding: 1.5rem 1.75rem;
  border: 1px solid var(--lav-line); border-radius: 18px; background: var(--surface); }
.b-mini { --screen: 168px; --bezel: 7px; }
.b-mini.phone::after { display: none; }
.b-mini img { display: block; width: 100%; height: 100%; }
.b-mini picture { display: block; height: 100%; }
.b-about { display: grid; gap: .8rem; }
/* One list of walkthroughs: each row opens its own directly, its name at the left and a small play mark at the right. The rows
   reach a little past the text column, so the names align with the heading and the hover tint has room. */
.b-starts { list-style: none; margin: 0 -.6rem; padding: 0; }
.b-starts:has(.b-start[hidden]) { display: none; }   /* nothing to show until the script can open the walkthroughs */
.b-starts li + li { border-top: 1px solid var(--line); }
.b-start { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; min-height: 48px; padding: .45rem .6rem;
  border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 .9375rem/1.3 var(--sans); text-align: left; cursor: pointer; }
.b-start:hover { background: var(--wash); }
.b-start:focus-visible { outline-offset: -2px; }
.b-start svg { flex: none; width: .6rem; height: .6rem; color: var(--teal-ink); }
.b-start[hidden] { display: none; }
/* The walkthrough picker: a select-only combobox (the WAI-ARIA pattern), so its open list follows the page's theme, which a native
   select's menu cannot. The box matches the playback buttons at 40 px (a transparent edge keeps a 44 px target) and holds every
   name invisibly, so it is as wide as the longest. */
.b-pick { position: relative; display: inline-flex; min-width: 0; }
.b-pick[hidden] { display: none; }
.b-pick__box { position: relative; display: inline-grid; align-items: center; min-width: 0; min-height: 40px; padding: 0 2.1rem 0 .8rem;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 .875rem/1.2 var(--sans);
  white-space: nowrap; cursor: pointer; user-select: none; -webkit-user-select: none; }
.b-pick__box::before { content: ''; position: absolute; inset: -3px -1px; }   /* the 44 px target */
.b-pick__box > span { grid-area: 1 / 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.b-pick__fit { visibility: hidden; }
.b-pick__box:hover, .b-pick__box[aria-expanded='true'] { border-color: var(--ink-3); }
.b-pick__box:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -2px; }
.b-pick__box::after { content: ''; position: absolute; top: 50%; right: .95rem; width: .375rem; height: .375rem; border: solid var(--ink-2); border-width: 0 1.5px 1.5px 0;
  translate: 0 -70%; rotate: 45deg; pointer-events: none; }
.b-pick__box[aria-expanded='true']::after { translate: 0 -25%; rotate: 225deg; }
.b-pick__list { position: absolute; z-index: 1; top: calc(100% + .375rem); left: 0; display: grid; min-width: 100%; padding: .3rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); box-shadow: 0 12px 28px rgb(var(--shade) / 14%), 0 2px 6px rgb(var(--shade) / 6%); }
.b-pick__list[hidden] { display: none; }
.b-pick__opt { display: grid; grid-template-columns: .75rem auto; align-items: center; column-gap: .6rem; min-height: 44px; padding: 0 1rem 0 .65rem;
  border-radius: 8px; color: var(--ink); font: 500 .875rem/1.2 var(--sans); white-space: nowrap; cursor: pointer; }
.b-pick__opt svg { width: .75rem; height: .75rem; visibility: hidden; }
.b-pick__opt.is-active { background: var(--wash); }
.b-pick__opt[aria-selected='true'] { color: var(--teal-ink); }
.b-pick__opt[aria-selected='true'] svg { visibility: visible; }
.wk-steps[hidden] { display: none; }
.b-focus { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--mist); color: var(--ink); }
.b-focus[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.b-focus::backdrop { background: rgb(0 0 0 / 45%); }
html:has(.b-focus[open]) { overflow: hidden; }
/* The header: the picker, (on phones) the step count, and Close, in one row over the divider, as wide as the player below and never
   nearer the window than the gutter. --bar is its whole height; the player's size reads it, so the two share the visible height
   exactly. */
.b-focus { --bar: calc(44px + 1.25rem + 1px); }
.b-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .5rem; min-height: var(--bar);
  padding: .625rem max(var(--gutter), (100% - var(--screen) - 2 * var(--bezel) - 17.5rem) / 2);
  border-bottom: 1px solid var(--line); background: var(--mist); }   /* stays reachable wherever a short screen scrolls */
.b-bar p { font-weight: 500; color: var(--ink); }
.b-close { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin: 0 -.7rem 0 auto; padding: 0 .7rem; border: 0; border-radius: 10px;
  background: none; color: var(--ink-2); font: 500 .875rem/1 var(--sans); cursor: pointer; }
.b-close:hover { background: var(--wash); color: var(--ink); }
.b-close:focus-visible { outline-offset: -2px; }   /* inside the target, so the header's edge never clips the ring */
.b-close svg { width: .75rem; height: .75rem; }
.b-count { display: none; margin-left: auto; font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Wide: the step's words beside the phone, the controls and the note under the phone. The phone is sized from the visible height
   (the header, --bar; the controls 84 px and the note's line 1.3rem, each after a .75rem gap), and never wider than the two
   columns leave room for at the narrowest two-column widths. The header reads the same size for its row. */
.b-focus { --screen: min(clamp(210px, calc((100dvh - var(--bar) - 2rem - 84px - 2 * .75rem - 1.3rem - 2 * var(--bezel)) * 1170 / 2532), 340px),
    calc(100vw - 2 * var(--gutter) - 15rem - 2.5rem - 2 * var(--bezel) - 1rem)); }
/* Centred in the visible height where it fits. Where it does not (a short window, the phone at its 210 px floor), it starts under
   the header and the dialog scrolls, so the top of the app, the words, the controls and the note all stay reachable: auto
   margins never go below zero, where plain centring overflowed upward under the header. */
.b-focus .pl { align-self: start; margin-block: auto; justify-self: center; padding: 1rem var(--gutter);
  grid-template-columns: var(--pw) 15rem; grid-template-areas: 'dev cap' 'ctl .' 'note .'; column-gap: 2.5rem; row-gap: .75rem; align-items: start; }
/* The woodpecker, at the product page's proportion (hero.css sizes it from --bird-h, .4167 of this phone's screen). It is out of
   the flow, so the phone and controls never move. Roomy windows keep its perch on the phone's left edge; where that would clip,
   it moves to the right edge, mirrored, below the side button and under the step's words (14.5rem clears the longest). --fit is
   1 where the left perch fits: the centred player leaves (100vw − phone − 17.5rem) / 2 beside the phone, and the bird needs its
   width and 1rem of it. Without sign(), the right perch is used. */
.b-focus .pl .bird { --bird-h: calc(var(--screen) * .4167); left: 100%; right: auto; top: max(44%, 14.5rem); transform: scaleX(-1); }
@supports (left: calc(1px * sign(1px))) {
  .b-focus .pl .bird { --bird-w: calc(var(--vb-w) * var(--bird-h) / 373.59);
    --fit: max(0, sign(100vw - var(--pw) - 19.5rem - 2 * var(--bird-w)));
    left: calc(var(--fit) * -1 * var(--bird-w) + (1 - var(--fit)) * 100%);
    top: calc(var(--fit) * var(--screen) * .34 + (1 - var(--fit)) * max(44%, 14.5rem));
    transform: scaleX(calc(2 * var(--fit) - 1)); }
}
.b-focus .pl-flow { display: none; }
.b-focus .pl-note { justify-self: center; width: var(--pw); text-align: center; line-height: 1.3rem; }   /* under the phone's controls */

/* ---------- Output: the example's choices, then the one file they make ---------- */
.o-rel { max-width: 40rem; margin-top: .75rem; color: var(--ink-2); text-wrap: pretty; }
.o-plain { display: grid; gap: .75rem; align-content: start; }
.o-plain p { color: var(--ink-2); text-wrap: pretty; }
.o-plain b { font-weight: 500; color: var(--ink); }
/* One column (phones and tablets): the choices, the file, then what a kit is */
.b-flow { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'side' 'file' 'kit'; row-gap: 2.5rem; margin-top: 1.75rem; }
.b-side { grid-area: side; min-width: 0; }
.b-outp { grid-area: file; min-width: 0; }
.b-kitnote { grid-area: kit; max-width: 40rem; }
.b-kitnote .nobr { white-space: nowrap; }   /* "AI-assisted" never breaks at its hyphen */
.b-in { position: relative; display: grid; gap: .85rem; padding: .95rem 1.1rem 1rem; border: 1px solid var(--lav-line); border-radius: 14px; background: var(--surface-2); }
.b-in__label { font-size: .8125rem; font-weight: 500; letter-spacing: .01em; color: var(--ink-2); }
.b-choices { display: grid; gap: .4rem; margin: 0; }
.b-choices > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: .75rem; align-items: baseline; }
.b-choices dt, .b-fmt legend { font-size: .8125rem; color: var(--ink-3); }
.b-choices dd { margin: 0; color: var(--ink); text-wrap: pretty; }
.b-choices .nobr { white-space: nowrap; }   /* the date range breaks after its label, never inside */
.b-switch { display: grid; gap: .55rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.b-switch[hidden] { display: none; }
.b-fmt { margin: 0; padding: 0; border: 0; min-width: 0; }
.b-fmt legend { float: left; width: 4.5rem; margin-right: .75rem; padding: 0; line-height: 38px; }   /* floated, so it sits in line with the switch */
.b-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wash); }
.b-seg label { position: relative; display: inline-flex; }
.b-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.b-seg span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 1rem; border-radius: 8px; font: 500 .8125rem/1 var(--sans); color: var(--ink-2); }
.b-seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(var(--shade) / 14%); }
.b-seg input:focus-visible + span { outline: 2px solid var(--teal-ink); outline-offset: 1px; }
.b-kit { position: relative; display: inline-flex; align-items: center; gap: .55rem; min-height: 36px; margin-left: 5.25rem; justify-self: start;
  font-size: .9rem; color: var(--ink); cursor: pointer; }
.b-kit input { accent-color: var(--teal-ink); width: 1.05rem; height: 1.05rem; margin: 0; flex: none; }
.b-arrow { position: absolute; left: 50%; bottom: -2.05rem; display: flex; color: var(--teal-ink); translate: -50% 0; rotate: 90deg; }
.b-arrow svg { width: 1.4rem; height: 1.4rem; }

/* The file: one container. A plain export shows its name and content; a kit shows the ZIP, its files, and the picked one */
.bx { min-width: 0; border: 1px solid var(--lav-line); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgb(var(--shade) / 5%); }
.bx + .bx { margin-top: 1rem; }
.is-switchable .bx + .bx { margin-top: 0; }
.bx[hidden], .bx [hidden] { display: none; }
.bx__head { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; column-gap: .65rem; row-gap: .1rem; padding: .75rem 1rem;
  border-bottom: 1px solid var(--line); background: var(--surface-2); }
.bx__head svg { width: 16px; height: 16px; color: var(--teal-ink); }
.bx__name { min-width: 0; margin: 0; font: 500 .8125rem/1.45 var(--mono); letter-spacing: 0; color: var(--ink); overflow-wrap: anywhere; }
.bx__name .nobr { white-space: nowrap; }   /* a long file name breaks after an underscore, never inside its date */
.bx__size { font-size: .8125rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bx-seg { display: flex; width: fit-content; gap: 2px; margin: .8rem 1rem 0; padding: 3px; border-radius: 10px; background: var(--wash); }
.bx-seg [role='tab'] { min-height: 32px; padding: 0 .9rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: 500 .8125rem/1 var(--sans); cursor: pointer; }
.bx-seg [aria-selected='true'] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(var(--shade) / 14%); }
.bx-seg [role='tab']:focus-visible, .bx-files [role='tab']:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 1px; }
.bx__cap { padding: .7rem 1rem 0; font-size: .8125rem; color: var(--ink-3); }
.bx__scroll { overflow-x: auto; }
.bx__scroll:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: -3px; }
.bx__panel .csv__table { margin-top: .35rem; border-top: 1px solid var(--line); }
.bx__code { margin: 0; padding: .45rem 1rem .85rem; font: .75rem/1.6 var(--mono); color: var(--ink); white-space: pre; }
.bx__code--wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.bx__doc { display: grid; gap: .45rem; padding: .5rem 1rem .95rem; font: .75rem/1.6 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.bx__doc .md-h { font-weight: 500; color: var(--teal-ink); }
.bx__doc .md-gap { color: var(--ink-3); }
.bx__doc .md-table { margin: 0; color: var(--ink); white-space: pre; }
.bx__member .csv__notes, .bx > .csv__notes { margin-top: .2rem; }
/* The files in a ZIP, indented under it like a folder; the picked one is marked */
.bx-files { display: grid; gap: 2px; margin-left: 1.5rem; padding: .45rem .55rem .45rem .5rem; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bx-files [role='tab'] { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; column-gap: .6rem; min-height: 44px; padding: .35rem .6rem;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.bx-files [role='tab'] svg { width: 16px; height: 16px; color: var(--teal-ink); }
.bx-files [role='tab']:hover { background: var(--surface-2); }
.bx-files [aria-selected='true'], .bx-files [aria-selected='true']:hover { background: var(--wash); box-shadow: inset 2px 0 0 var(--teal-ink); }
.bx-file__label { min-width: 0; font-size: .8125rem; line-height: 1.4; }
.bx-file__name { font: 500 .8125rem/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.bx-file__desc { color: var(--ink-3); white-space: nowrap; }
.bx-file__size { font-size: .8125rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bx__mname { display: flex; align-items: center; gap: .55rem; padding: .75rem 1rem 0; font-size: .8125rem; color: var(--ink); }
.bx__mname svg { width: 16px; height: 16px; flex: none; color: var(--teal-ink); }
.bx__mname code { overflow-wrap: anywhere; }
.is-switchable .bx__mname { display: none; }   /* the file list names the picked file; without the script, each file names itself */
.bx__member + .bx__member { border-top: 1px solid var(--line); }
.is-switchable .bx__member + .bx__member { border-top: 0; }

/* ---------- Wide: the choices and what a kit is on the left, the file on the right; the arrow joins the two ---------- */
@media (min-width: 960px) {
  .b-flow { grid-template-columns: minmax(0, 18rem) minmax(0, 40rem); grid-template-rows: auto 1fr; grid-template-areas: 'side file' 'kit file';
    column-gap: 4.5rem; row-gap: 2rem; align-items: start; }
  .b-arrow { left: auto; right: -3.25rem; top: 50%; bottom: auto; translate: 0 -50%; rotate: none; }
  .b-kitnote { padding-top: .25rem; }
  .b-kitnote p:not(.fine) { font-size: .9375rem; }
}
/* ---------- Compact desktop and tablets: the hero stacks, the preview below the intro and its action ---------- */
@media (max-width: 959px) {
  .landing-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: 'intro' 'act' 'side'; justify-items: center; }
  .landing-grid .hero__intro { max-width: 40rem; text-align: center; justify-items: center; }
  .landing-grid .hero__act { justify-content: center; margin-top: 1.25rem; }
  .b-preview { margin-top: 2.25rem; width: min(100%, 36rem); }
  .b-out .wrap { max-width: calc(40rem + 2 * var(--gutter)); }   /* the whole output is one column, centred under the stacked hero; its text stays left-aligned */
}
@media (min-width: 700px) and (max-width: 959px) {
  .b-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .b-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
  .b-kit { margin-left: 0; }
}
/* ---------- Phones ---------- */
@media (max-width: 699px) {
  .landing-grid { justify-items: stretch; }
  .landing-grid .hero__intro { text-align: left; justify-items: start; }
  .landing-grid .hero__act { display: grid; justify-content: stretch; gap: .55rem; margin-top: 1.25rem; }
  .landing-grid .hero__act .btn { width: 100%; }
  .landing-grid .hero__fine { text-align: center; }
  /* The heading above, the list beside a smaller phone (the names keep one line at 360 px), the note under both */
  .b-preview { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'head head' 'mini list' 'note note'; gap: .85rem .875rem; padding: 1rem; margin-top: 1.75rem; }
  .b-about { display: contents; }
  .b-about > .eyebrow { grid-area: head; }
  .b-mini { grid-area: mini; --screen: clamp(96px, 25vw, 140px); --bezel: 5px; }
  .b-starts { grid-area: list; margin: 0 -.5rem 0 0; }
  .b-start { padding-inline: .5rem; font-size: .9rem; }
  .b-about > .demo-note { grid-area: note; }
  .b-flow { row-gap: 2.25rem; margin-top: 1.4rem; }
  .b-in { gap: .6rem; padding: .8rem .9rem .85rem; }
  /* The settings read as a two-line summary; their labels stay for assistive technology */
  .b-choices { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: .1rem; font-size: .9375rem; }
  .b-choices > div { display: flex; align-items: baseline; }
  .b-choices dt, .b-fmt legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .b-choices > div:first-child, .b-choices > div:last-child { flex-basis: 100%; }   /* three short lines: the metrics; the export and units; the dates */
  .b-choices > div:nth-child(3)::before { content: ''; align-self: center; width: 3px; height: 3px; margin: 0 .55rem; border-radius: 50%; background: var(--ink-3); }
  .b-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding-top: .65rem; }   /* the kit switch drops below CSV|JSON only when the row is too narrow */
  .b-fmt legend { float: none; }
  .b-kit { margin-left: 0; white-space: nowrap; }
  .b-arrow { bottom: -1.95rem; }
  .bx__head { padding: .7rem .85rem; }
  .bx[data-art$='kit'] .bx__head { grid-template-columns: 16px minmax(0, 1fr); }   /* a ZIP's long name takes the row; its size goes under it */
  .bx[data-art$='kit'] .bx__size { grid-column: 2; }
  .bx-seg { width: auto; margin: .7rem .85rem 0; }
  .bx-seg [role='tab'] { flex: 1; padding: 0 .4rem; white-space: nowrap; }   /* equal halves where they fit; a label never breaks */
  .bx__cap { padding-inline: .85rem; }
  .bx__code, .bx__doc { padding-inline: .85rem; }
  .bx-files { margin-left: 1.35rem; }
  .bx-files [role='tab'] { grid-template-columns: 16px minmax(0, 1fr); padding-inline: .5rem; }
  .bx-file__size { grid-column: 2; }
}

/* ---------- Focus mode on phones: stacked, the screen first in size ---------- */
/* The step's label and sentence above the phone, the controls and pace under it, all in the visible height. The script picks
   the largest screen that fits; where that would leave the phone small, it marks the player tight and the sentence moves
   under the controls. The position joins the top bar. */
@media (max-width: 699px) {
  /* Deliberate rhythm: 1rem under the header, the step's label and sentence, .75rem to the phone, .75rem to the controls */
  .b-focus .pl { --bezel: 7px; align-self: start; margin-block: 0; justify-self: stretch; padding: 1rem var(--gutter) 1rem;
    --screen: clamp(205px, calc((100dvh - var(--bar) - 9.5rem - 84px - 2rem - 2 * var(--bezel)) * 1170 / 2532), min(320px, calc(100vw - 2 * var(--gutter) - 2 * var(--bezel))));
    grid-template-columns: minmax(0, 1fr); grid-template-areas: 'cap' 'dev' 'ctl' 'say' 'note'; justify-items: center; row-gap: .75rem; }
  .b-focus .pl-cap { width: min(100%, 24rem); text-align: center; }
  .b-focus .pl.is-tight { padding-top: .5rem; row-gap: .5rem; }   /* short screens: a compact rhythm before the phone goes below its comfortable size */
  .b-focus .pl-head { display: none; }   /* the count joins the header group as .b-count; the bars stay a wide-layout element */
  .b-count { display: block; }
  .b-focus { --bar: calc(44px + .75rem + 1px); }
  .b-bar { padding: .375rem max(var(--gutter), (100% - 24rem) / 2); }   /* the controls' 44 px with less air than when wide; as wide as the words' column */
  .b-close { margin-left: 0; }   /* the count takes the free space before it */
  .b-focus .pl .wk-steps { padding-top: 0; }
  .b-focus .pl .wk-phase { font-size: 1.05rem; }
  .b-focus .pl .wk-say { margin-top: .3rem; font-size: .9375rem; line-height: 1.45; }
  .b-focus .pl.is-tight .wk-say { display: none; }
  .b-focus .pl.is-tight .pl-say { display: block; }
  .b-focus .pl-say, .b-focus .pl-note { width: var(--pw); }
  .b-focus .pl-note { text-align: center; }
  .b-focus .pl .bird { display: none; }
  .b-focus .pl-ctl { gap: .35rem; }
  .b-focus .pl-pace span { min-height: 32px; }
}
/* Narrowest phones: Close shows its icon only (its name stays for assistive technology), so the picker keeps its full names */
@media (max-width: 389px) {
  .b-close { width: 44px; margin-right: -1rem; padding: 0; justify-content: center; }   /* the icon ends on the column's edge */
  .b-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Footer: deliberate groups, the copyright with the site's links, and the page's appearance ---------- */
/* Wide: one row, the two groups at either end. Compact: the page's centred column, the copyright over the links beside the
   appearance control. Phones: the copyright and links together, then the control; every link and segment a comfortable target. */
.mp-landing .foot__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'copy links look'; align-items: center; gap: .5rem 2rem; }
.mp-landing .foot__inner > p:first-child { grid-area: copy; }
.mp-landing .foot__links { grid-area: links; }
.mp-landing .page-look { grid-area: look; justify-self: end; }
.mp-landing .foot a { min-height: 2.25rem; }   /* as tall as the appearance segments */
@media (max-width: 959px) {
  .mp-landing .foot .wrap { max-width: calc(40rem + 2 * var(--gutter)); }
  .mp-landing .foot__inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'copy look' 'links look'; row-gap: 0; }
}
@media (max-width: 699px) {
  .mp-landing .foot__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'links' 'look'; }
  .mp-landing .foot a, .mp-landing .page-look label span { min-height: 2.75rem; }
  .mp-landing .page-look { justify-self: start; margin-top: .85rem; }
}
