/* Voicing lab — extends learn/style.css, adds nothing that redefines a token.
   Light and dark come from the ts-tokens block, so this file must not set
   colours of its own; it only arranges the panels. */
body { max-width: 1080px; }
body.wide { max-width: 1080px; }
.read { max-width: 70ch; }
p.read, .read p { margin-bottom: 10px; line-height: 1.55; font-family: var(--ts-font); font-size: 15px; }

/* header: one sentence, so the chart is above the fold on a phone */
.lede { font-family: var(--ts-font); font-size: 15px; color: var(--ink); line-height: 1.45; margin: 0 0 8px; max-width: 70ch; }
.stepper { display: flex; gap: 4px; margin: 0 0 8px; flex-wrap: wrap; }
.stepper a { flex: 1 1 0; min-width: 0; text-align: center; padding: 7px 4px; border: 1px solid var(--line); border-radius: 4px;
             color: var(--dim); text-decoration: none; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper a[aria-current] { border-color: var(--phos); color: var(--phos); font-weight: 600; }
.stepper a span { font-size: 10.5px; }
@media (max-width: 520px) { .stepper a { white-space: normal; line-height: 1.2; } .stepper a span { display: block; font-size: 9px; } }
.main { display: grid; gap: 12px; }
@media (min-width: 980px) {
  .main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  #lab { position: sticky; top: 64px; }
}
#lab { margin-bottom: 0; }
.stage h2.sec { margin-top: 4px; }
.stage .num { color: var(--dim); }
.stage > * + * { margin-top: 10px; }
.sub { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); font-weight: 400; margin-bottom: 6px; }
.picks button[aria-pressed="true"] { border-color: var(--phos); color: var(--phos); font-weight: 600; }
.principle { font-family: var(--ts-font); font-size: 15px; line-height: 1.5; border-left: 3px solid var(--phos); padding: 4px 0 4px 12px; max-width: 70ch; }
.pager { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pager a { color: var(--phos); padding: 8px 0; }
.beat > * + * { margin-top: 8px; }
.rough { margin: 6px 0; font-size: 12px; }
.rough .t { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); }
.rough b { font-size: 18px; color: var(--phos); font-variant-numeric: tabular-nums; }
.rough .say { font-family: var(--ts-font); font-size: 12.5px; color: var(--dim); line-height: 1.4; }
.close-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 3px; font-size: 11px; }
.close-list li { border: 1px dashed var(--ts-accent-structural); border-radius: 3px; padding: 3px 6px; cursor: pointer; }
.close-list li.hi, .close-list li:hover, .close-list li:focus { border-style: solid; outline: none; }
.close-list .k { color: var(--phos); font-weight: 600; margin-right: 4px; }
.cmp-table td, .cmp-table th { padding: 5px 8px; }
.cmp-table tr.cur td { font-weight: 600; color: var(--phos); }
.cmp-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
details.fold { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
details.fold > summary { cursor: pointer; color: var(--phos); font-size: 13px; }
details.fold[open] > summary { margin-bottom: 8px; }
.refs a { word-break: break-all; }
.foot { margin-top: 18px; font-size: 11px; color: var(--dim); }

/* controls */
.ctl { display: grid; gap: 4px; }
.ctl label, .lab-t { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); }
.ctl .val { font-size: 10px; color: var(--phos); }
.grid-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px 12px; }
select { padding: 6px 8px; }
input[type=range] { width: 100%; accent-color: var(--phos); }
input[type=checkbox] { accent-color: var(--phos); width: 16px; height: 16px; }
.toggle { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink); cursor: pointer; padding-top: 2px; }
.desc { font-size: 10.5px; color: var(--dim); }

/* views */
.view-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.view-h h3 { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.view-h small { font-size: 9.5px; color: var(--dim); }
canvas { background: var(--ts-ink); }
/* the score keyboard arrives with a stage-sized max-height; the lab wants a strip */
#keys { margin: 2px 0 4px; }
#keys svg { max-height: 128px !important; }
#keys h2, #keys p { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 10px; color: var(--dim); margin-top: 6px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* metrics */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.tile .n { font-family: var(--disp); font-style: italic; font-size: 30px; color: var(--phos); line-height: 1.1; }
.tile .t { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--dim); }
.tile .cmp { font-size: 10.5px; color: var(--dim); min-height: 1.2em; }
.tile .note { font-size: 10.5px; color: var(--dim); line-height: 1.45; margin-top: 4px; font-family: var(--ts-font); }
.up { color: var(--red); } .down { color: var(--ts-good); }
.lil-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; font-size: 11px; color: var(--ink); }
.lil-list li { border-left: 3px solid var(--amber); padding-left: 8px; }
.lil-ok { color: var(--ts-good); font-size: 12px; }

.nov { display: grid; gap: 6px; margin-top: 6px; }
.nov-row { display: grid; grid-template-columns: 74px 1fr 40px; gap: 7px; align-items: center; font-size: 10.5px; color: var(--ink); }
.nov-row .bar { height: 10px; background: var(--line); border-radius: 2px; overflow: hidden; }
.nov-row .bar span { display: block; height: 100%; border-radius: 2px; }
.nov-row .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--phos); }
.nov-row.phantom .nm { font-style: italic; color: var(--dim); }

/* experiments */
.exps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.exp { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; align-content: start; }
.exp[open] { display: grid; gap: 8px; }
.exp summary { cursor: pointer; font-family: var(--disp); font-style: italic; font-size: 17px; color: var(--ink); list-style: none; }
.exp summary::-webkit-details-marker { display: none; }
.exp summary::before { content: "▸ "; color: var(--phos); }
.exp[open] summary::before { content: "▾ "; }
.exp .num { font-family: var(--mono); font-style: normal; font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--phos); }
.exp h3 { display: none; }
.exp h3 { font-family: var(--disp); font-style: italic; font-weight: 400; font-size: 17px; color: var(--ink); }
.exp ol { margin: 0 0 0 16px; padding: 0; display: grid; gap: 4px; font-size: 12px; color: var(--ink); line-height: 1.45; }
.exp .see { font-family: var(--ts-font); font-size: 12px; color: var(--dim); border-top: 1px dashed var(--line); padding-top: 7px; line-height: 1.45; }
.exp .see b { color: var(--ink); }

table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); font-weight: 400; }
td:first-child { color: var(--phos); }

.formula { font-size: 10.5px; background: var(--ts-ink); color: var(--ts-lime);
           padding: 8px 10px; border-radius: 4px; overflow-x: auto; white-space: pre; }
h2.sec { font-family: var(--disp); font-style: italic; font-weight: 400; font-size: 22px;
         color: var(--phos); margin: 26px 0 8px; }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--ink); line-height: 1.5; }

/* key hints show only while the shortcuts work: not on touch-only screens, not while a field has focus */
#keyhint { margin-top: 4px; }
.grp { display: inline-flex; flex-direction: column; gap: 2px; padding: 2px 6px 6px; border: 1px solid var(--line); border-radius: 4px; }
.grp .row { gap: 4px; }
.grp-t { font-size: 10px; color: var(--dim); }
#abToggle b { font-weight: 400; color: var(--dim); padding: 0 2px; }
#abToggle b.on { color: var(--phos); font-weight: 700; box-shadow: inset 0 -2px 0 var(--phos); }
#abSay { margin-top: 4px; color: var(--phos); }
body.keys-off .keyhint { display: none; }
@media (hover: none) and (pointer: coarse) { .keyhint { display: none; } }

/* keyboard focus: a sky ring in the house tokens instead of the browser's white box; mouse clicks show none */
:is(select, input, button, canvas, a, summary, [tabindex]):focus { outline: none; }
:is(select, input, button, canvas, a, summary, [tabindex]):focus-visible { outline: 2px solid var(--ts-sky); outline-offset: 2px; }
#curve { cursor: ew-resize; touch-action: pan-y; }   /* horizontal drag sets the interval, vertical still scrolls */
