/* The Basis page's out-of-the-workbook block, stop 09, and stop 10's still: the layout of the block's words.
   The window, the rail, the act panels' switching and the phones are assets/oow/oow.css; this file only sets the words inside them,
   the two tab strips (the site's .sv-tabs.dt recipe from site.css) and the pictures in their panels. Tokens only (site.css names);
   lengths in rem, as oow.css has them. The two small sizes repeat the page's own: the note (13/20, site.css .note) and the caption
   (12/16 mono, basis.css figcaption). */

/* the opening words over the window and over the strip of nineteen */
.pg-basis .oow-intro { min-width: 0; }
.pg-basis .oow-intro p:not(.vk) { margin: 0 0 1rem; max-width: var(--measure-prose); color: var(--ink-2); font-size: var(--t-body); line-height: var(--lh-prose); text-wrap: pretty; }
.pg-basis .oow-intro > :last-child { margin-bottom: 0; }

/* the window's caption, then the legend under it in the page's note voice */
.pg-basis .oow-fig > figcaption .dnb, .pg-basis .oow-cap .dnb, .pg-basis .oow-shot figcaption .dnb { white-space: nowrap; }
.pg-basis .oow-leg { display: block; margin-top: 0.5rem; max-width: 80ch; font: 400 0.8125rem/1.25rem var(--body); letter-spacing: 0; color: var(--ink-3); text-wrap: pretty; }

/* an act's words: its title, the instruction as typed into the top bar's field, the caption, how it works, what it rests on */
.pg-basis .oow-act { min-width: 0; max-width: var(--measure-prose); }
/* once the script runs, the four panels share one grid cell, so the block keeps the tallest panel's height through the loop and the
   words under it never move as the act changes; a panel not on screen keeps its box but is hidden from sight, from assistive
   technology and from the tab order (visibility), in place of oow.css's display: none. With no script all four still show stacked */
.pg-basis .oow-block.oow-js .oow-acts > .oow-act { grid-area: 1 / 1; }
.pg-basis .oow-block.oow-js .oow-acts > .oow-act:not(.on) { display: block; visibility: hidden; }
.pg-basis .oow-at { margin: 0; color: var(--ink); font: var(--w-bold) var(--t-ui)/1.5 var(--body); }
.pg-basis .oow-in { margin: 0.75rem 0 0; }
.pg-basis .oow-in kbd { display: block; padding: 0.625rem 0.875rem; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font: 400 var(--t-ui)/1.5 var(--body); text-wrap: pretty; }
.pg-basis .oow-cap { display: block; margin: 0.75rem 0 0; color: var(--ink-3); font: 500 0.75rem/1rem var(--mono); letter-spacing: .04em; text-wrap: balance; }

/* "How it works", "In Excel", "In Basis": the label over its sentence */
.pg-basis .oow-kv { display: grid; gap: 0.875rem; margin: 1rem 0 0; }
.pg-basis .oow-kv dt { color: var(--ink); font-weight: var(--w-bold); font-size: var(--t-ui); line-height: 1.5; }
.pg-basis .oow-kv dd { margin: 0.125rem 0 0; color: var(--ink-2); font-size: var(--t-ui); line-height: 1.6; text-wrap: pretty; }
.pg-basis .oow-act .note, .pg-basis .oow-ph .note, .pg-basis .oow-r10 .note, .pg-basis .oow-19 .sv-panel > .note { margin-top: 1rem; }

/* each phone's picture opens the whole still, as the window's does; the link fills the screen, the live phone lies over it and never
   takes a click, and the keyboard's ring is drawn round the phone (the screen clips anything drawn inside it) */
.pg-basis .oow-ph-scr > a { display: block; height: 100%; }
.pg-basis .oow-ph-body:has(> .oow-ph-scr > a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pg-basis .oow-ph-scr > a:focus-visible { outline: none; }

/* the phones' words, under each phone: the title, the caption, how it works, what it rests on; and the line under the pair */
.pg-basis .oow-ph figcaption { color: var(--ink-3); }
.pg-basis .oow-pt { display: block; color: var(--ink); font: var(--w-bold) var(--t-ui)/1.5 var(--body); letter-spacing: 0; }
.pg-basis .oow-ph .oow-cap { margin-top: 0.375rem; }
.pg-basis .oow-ph .oow-kv { letter-spacing: 0; font-family: var(--body); }
.pg-basis .oow-ph .oow-kv dd, .pg-basis .oow-ph .note { font-weight: 400; }
.pg-basis .oow-ph .note { font-family: var(--body); letter-spacing: 0; }
.pg-basis .oow-desk { grid-column: 1 / -1; margin: 0; }

/* The climb's six steps carry their own numbers; What is not in it is a plain list */
.pg-basis .dt .sv-panel ol.oow-steps, .pg-basis .dt .sv-panel ul.oow-not { list-style: none; padding-left: 0; }

/* the strip of nineteen: the labels wrap on a computer with a tighter gap; on a phone the site's rule scrolls the row inside itself.
   At 1.125rem the strip takes two rows at 1280 px and three at 900 px, with no row holding a single label. */
.pg-basis .oow-19 .sv-tablist { gap: 0 1.125rem; }
.pg-basis .oow-19 .sv-tablist button { min-width: 2.75rem; justify-content: center; } /* "Say it" is narrower than a 44 px target */
/* the keyboard's ring stands 4 px clear of a label's words where the strip wraps (from 768 px); under that the strip scrolls inside
   itself and would cut a ring drawn outside the label, so the site's inset ring stays */
@media (min-width: 48em) {
  .pg-basis .oow-19 .sv-tablist button:focus-visible { outline-offset: 4px; }
}
.pg-basis .oow-19 .sv-panel > .oow-kv, .pg-basis .oow-19 .sv-panel > .note { max-width: var(--measure-prose); }
/* the strip's own words open a new part of the stop: the space a strip takes goes above them, and the strip follows them closely */
.pg-basis .oow-i19 { margin-top: var(--sp-cell); }
.pg-basis .oow-i19 + .oow-19 { margin-top: 0; }
/* inside a tab panel the "Rests on today" line keeps the page's note size (the panel's paragraph rule would set it in body size) */
.pg-basis .dt .sv-panel p.note { font-size: 0.8125rem; line-height: 1.25rem; color: var(--ink-3); }

/* a tab's picture(s) and its caption; two desk frames sit one over the other at every width, each as wide as a single tab's picture;
   the desk frame and the phone still sit side by side from 768 px, the phone keeping its own shape */
.pg-basis .oow-shot { margin: 0; min-width: 0; }
.pg-basis .oow-pics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 48em) {
  .pg-basis .oow-ph2 .oow-pics { grid-template-columns: minmax(0, 3.46fr) minmax(0, 1fr); }
}
.pg-basis .shot.oow-tall { aspect-ratio: 780 / 1688; }
/* at phone width each tab's picture is its close-up (a <picture> whose phone-width source is /img/oow/<id>-close.jpg, cut from the
   same still to the part the screen is about, 16 by 10 like the still); a press still opens the whole still. The <picture> takes no
   box of its own, so every rule on the link's img holds as it did. The phone in «Say it» shows its close-up too, at the row's width. */
.pg-basis .oow-19 picture { display: contents; }
@media (max-width: 47.9375em) {
  .pg-basis .shot.oow-tall { aspect-ratio: 16 / 10; }
}
/* from 1024 px the open panel is two columns: the picture or pictures on the left, the panel's words in an 18rem column beside them,
   so the strip, the picture and the words share one view under the two sticky bars (at 1440 by 900: a 960 by 600 picture, 750 px from
   the strip's top to the caption's foot, of 798). Set only on the panel showing and only once the script has shown the strip: a hidden
   panel stays hidden, and with no script every panel keeps its stacked layout. Below 1024 px the words stay under the picture.
   A panel of two desk screens (.oow-two without .oow-ph2) takes the same two columns: its two screens one over the other in the left
   column, each drawn as large as a single tab's picture, the words beside the first. */
@media (min-width: 64em) {
  .pg-basis .oow-19 .sv-tablist:not([hidden]) ~ .sv-panel:not([hidden]) { display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem; grid-template-rows: auto 1fr; grid-template-areas: "fig kv" "fig note"; column-gap: 2rem;
    align-items: start; }
  .pg-basis .oow-19 .sv-tablist:not([hidden]) ~ .sv-panel > .oow-shot { grid-area: fig; }
  .pg-basis .oow-19 .sv-tablist:not([hidden]) ~ .sv-panel > .oow-kv { grid-area: kv; margin-top: 0; }
  .pg-basis .oow-19 .sv-tablist:not([hidden]) ~ .sv-panel > .note { grid-area: note; }
}

/* stop 10: the read-back card's still beside the list */
.pg-basis .oow-r10 { min-width: 0; }

/* a link that stands alone under a panel's words is a full tap target (2.75rem, the page's smallest button) */
.pg-basis .dt .sv-panel a.oow-go { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* The two marks in each of the nineteen panels: the first label of the pair (the workbook's) is led by a small grid in the positive
   green, the second (Basis's) by the site's own plain rounded square in the accent, the inner square of favicon.svg at its corner ratio
   of 3 to 14. Decoration only: empty pseudo-elements, so a screen reader reads the label alone. One size for both, the same gap before
   the label, centred on the label's one line. The grid is three by three cells of 0.1875rem in a 0.6875rem mark, the space left over
   shared out between them by background-repeat: space. */
.pg-basis .oow-19 .oow-kv > div:nth-child(-n+2) > dt { display: flex; align-items: center; gap: 0.5rem; }
.pg-basis .oow-19 .oow-kv > div:nth-child(-n+2) > dt::before { content: ""; flex: none; width: 0.6875rem; height: 0.6875rem;
  border-radius: calc(3 / 14 * 100%); }
.pg-basis .oow-19 .oow-kv > div:nth-child(1) > dt::before { background: linear-gradient(var(--ok), var(--ok)) 0 0 / 0.1875rem 0.1875rem space; }
.pg-basis .oow-19 .oow-kv > div:nth-child(2) > dt::before { background: var(--accent); }
