/* steps.css — focus step cards, one concept at a time above the viewers (THA Stability modules 1, 3
   and 4: focus-steps.mjs; Spinopelvic Motion: tools/hip-spine/focus-steps.mjs). In the phone workspace
   the card heads the controls. Without JavaScript the steps stay hidden and each module works as before. */
/* Kept quiet: the step buttons and Back / Next on one row, then the step's slider beside one sentence
   and a Try line; the explanation and the question wait in folds. ---- */
.oa-steps { display: none; }
.oa-steps.is-ready {
  display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) auto;
  grid-template-areas: "head head nav" "slot step step"; gap: 10px 18px; align-items: start;
  margin: 0 0 14px; padding: 12px 16px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.oa-steps.is-ready:has(> .oa-step-controls[hidden]) { grid-template-areas: "head head nav" "step step step"; }
.oa-steps-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.oa-steps-head h3 { margin: 0; color: var(--muted); font: 700 11px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.oa-steps-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.oa-steps-list button { min-height: 34px; padding: 5px 12px; color: var(--ink); background: var(--wash, #eef3fb); border: 1px solid var(--line); border-radius: 999px; font: 600 13px/1.2 var(--sans); white-space: nowrap; cursor: pointer; }
.oa-steps-list button b { margin-right: 4px; color: var(--blue); font-family: var(--mono); }
.oa-steps-list button[aria-current="step"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.oa-steps-list button[aria-current="step"] b { color: #fff; }
.oa-steps-list button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.oa-steps > .oa-step-controls { grid-area: slot; }
.oa-steps > .oa-step { grid-area: step; }
.oa-step:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .55fr); gap: 4px 18px; align-items: start; }
.oa-step-copy p { margin: 0 0 4px; color: var(--ink); font-size: 14px; line-height: 1.45; }
.oa-step-copy .oa-step-try { color: var(--muted); font-size: 13px; }
.oa-step-fold { margin: 0; font-size: 13px; line-height: 1.5; }
.oa-step-fold summary { display: inline-flex; min-height: 30px; align-items: center; color: var(--blue-dark, var(--blue)); font-weight: 650; cursor: pointer; }
.oa-step-fold p { margin: 2px 0 6px; color: var(--muted); font-size: 13px; }
.oa-step-check { display: grid; gap: 2px; margin: 4px 0 0; padding: 0; border: 0; }
.oa-step-check legend { margin-bottom: 4px; padding: 0; font: 650 13px/1.35 var(--sans); }
.oa-step-check label { display: flex; align-items: flex-start; gap: 8px; min-height: 30px; padding: 3px 0; font-size: 13px; line-height: 1.35; cursor: pointer; }
.oa-step-check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.oa-step-feedback { margin: 2px 0 0; font-size: 13px; line-height: 1.45; }
.oa-step-feedback:empty { display: none; }
.oa-step-feedback.is-right { color: #1a6b43; }
.oa-step-feedback.is-wrong { color: #a33a2f; }
.oa-steps-nav { grid-area: nav; display: flex; justify-content: flex-end; gap: 6px; }
.oa-steps-nav .button { min-height: 34px; padding: 5px 14px; font-size: 13px; }
.oa-steps-nav [hidden] { display: none; }
@media (max-width: 900px) {
  .oa-steps.is-ready { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head nav" "slot slot" "step step"; }
  .oa-steps.is-ready:has(> .oa-step-controls[hidden]) { grid-template-areas: "head nav" "step step"; }
  .oa-step:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
}
/* In the phone workspace the steps head the controls sheet: one scrolling row of step buttons, the
   slider, the sentence, the folds, then Back / Next. */
.oa-steps.is-in-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "slot" "step" "nav"; margin: 0 0 10px; padding: 0 0 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.oa-steps.is-in-panel:has(> .oa-step-controls[hidden]) { grid-template-areas: "head" "step" "nav"; }
.oa-steps.is-in-panel .oa-steps-head h3 { display: none; }
.oa-steps.is-in-panel .oa-steps-list { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.oa-steps.is-in-panel .oa-steps-list button { flex: none; }
/* While the row overflows, scroll-strip.mjs makes it a focusable scroll region: inset ring, as it clips. */
.oa-steps-list[tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; border-radius: 8px; }
.oa-steps.is-in-panel .oa-step:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
.oa-step-apply { display: inline; padding: 1px 8px; color: var(--blue); background: var(--wash, #eef3fb); border: 1px solid var(--blue); border-radius: 999px; font: 650 12px/1.6 var(--sans); cursor: pointer; }
.oa-step-apply:hover, .oa-step-apply:focus-visible { color: #fff; background: var(--blue); }
.oa-step-controls { padding: 8px 12px; background: var(--wash, #eef3fb); border-radius: 12px; }
.oa-step-controls[hidden] { display: none; }
.oa-steps.is-in-panel .oa-step-controls { max-width: none; }
