/* Chair's shell, shared by Chair, Corpus, the Lab and Seven Emotions: input sources and their
   status, a mode bar, a workbench of the view beside a side panel, the lens/blindfold pair, an
   essay and the page footer. Link after tokens.css; each page keeps only the widgets unique to it. */
.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.status { margin: 0 0 14px; max-width: none; font: 400 var(--step--1)/1.45 var(--font-data); color: var(--muted); }
.modebar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 12px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; }

/* Mode tabs in the bar (role="tablist", the current one aria-selected), Save image at its right end */
.modes { display: flex; flex-wrap: wrap; }
.modes button {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
  color: var(--muted); padding: 10px 10px 8px; margin-bottom: -1px;
}
.modes button:hover { background: none; color: var(--ink); }
.modes button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--box); }
.modes kbd { font-weight: 400; color: var(--muted); margin-right: 5px; }
.modebar #save-btn { margin: 0 0 6px auto; padding: 7px 10px; }

/* Score meters: one row per score, name and value, with a full-width bar underneath */
.meter { list-style: none; padding: 0; margin: 6px 0 12px; display: grid; gap: 5px; }
.meter li { display: grid; grid-template-columns: minmax(0, 1fr) 3.5em; gap: 2px 8px; font: 400 var(--step--1)/1.3 var(--font-data); }
.meter .v { text-align: right; color: var(--scan); }
.meter .bar { grid-column: 1 / -1; height: 3px; background: var(--rule); }
.meter .bar i { display: block; height: 100%; background: var(--scan); }

/* The view on the left, a 340px panel on the right from 900px up */
.workbench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .workbench { grid-template-columns: minmax(0, 1fr) 340px; } }
.view { margin: 0; min-width: 0; }
.view-wrap { width: 100%; position: relative; }
.view-wrap > canvas { display: block; max-width: 100%; margin: 0 auto; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); border-radius: var(--radius); }
.readout { margin-top: 8px; font: 400 var(--step--1)/1.45 var(--font-data); color: var(--muted); overflow-wrap: anywhere; }
.readout .measure { font-variant-numeric: tabular-nums; }

.umwelt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; margin-top: 14px; }
@media (min-width: 640px) { .umwelt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.umwelt p:not(.label) { margin: 3px 0 12px; font-size: 0.9375rem; line-height: 1.45; max-width: 60ch; }

/* :where keeps panel paragraphs at element specificity, so a class like .note wins on its own */
:where(.panel) p { margin: 3px 0 12px; font-size: 0.9375rem; line-height: 1.45; }
.panel .label { margin: 0; }
.panel hr { border: 0; border-top: 1px solid var(--rule); margin: 14px 0 12px; }
.note { color: var(--muted); font-size: var(--step--1); }
.does { font-family: var(--font-display); font-size: var(--step-0); }

.what { margin-top: 40px; }   /* with .prose */
.site-foot { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: var(--step--1); }
.site-foot p { max-width: 90ch; margin: 6px 0; overflow-wrap: anywhere; }
