/* SITO page styles. Palette and type follow the muoperator.com site:
   Oxford blue on warm white, Gruvbox with gold in the dark theme;
   Old Standard TT for text, Fira Code for everything typed or computed. */

@font-face { font-family: "Old Standard TT"; font-weight: 400; font-style: normal; font-display: swap;
  src: url(fonts/old-standard-tt-v22-latin-regular.woff2) format("woff2"); }
@font-face { font-family: "Old Standard TT"; font-weight: 400; font-style: italic; font-display: swap;
  src: url(fonts/old-standard-tt-v22-latin-italic.woff2) format("woff2"); }
@font-face { font-family: "Old Standard TT"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(fonts/old-standard-tt-v22-latin-700.woff2) format("woff2"); }
@font-face { font-family: "Fira Code"; font-weight: 300 700; font-style: normal; font-display: swap;
  src: url(fonts/FiraCode-VF.woff2) format("woff2"); }

:root {
  --paper: #fbfaf5; --paper-2: #efe8d1; --field: rgba(239, 232, 209, 0.45);
  --ink: #1a1a1a; --soft: #5d5a4e; --accent: #002147; --accent-ink: #fbfaf5;
  --border: rgba(0, 0, 0, 0.14); --grid: rgba(26, 26, 26, 0.12); --danger: #a4262c;
  --band-rgb: 0, 33, 71;
  --c1: #cc241d; --c2: #458588; --c3: #d79921; --c4: #689d6a; --c5: #b16286; --c6: #d65d0e;
  --serif: "Old Standard TT", "Iowan Old Style", Georgia, serif;
  --mono: "Fira Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 5px;
  --header-h: 3.25rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #282828; --paper-2: #1d2021; --field: rgba(29, 32, 33, 0.7);
  --ink: #ebdbb2; --soft: #a89984; --accent: #d79921; --accent-ink: #1d2021;
  --border: #3c3836; --grid: rgba(235, 219, 178, 0.14); --danger: #fb4934;
  --band-rgb: 215, 153, 33;
  --c1: #fb4934; --c2: #83a598; --c3: #fabd2f; --c4: #8ec07c; --c5: #d3869b; --c6: #fe8019;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper: #282828; --paper-2: #1d2021; --field: rgba(29, 32, 33, 0.7);
    --ink: #ebdbb2; --soft: #a89984; --accent: #d79921; --accent-ink: #1d2021;
    --border: #3c3836; --grid: rgba(235, 219, 178, 0.14); --danger: #fb4934;
    --band-rgb: 215, 153, 33;
    --c1: #fb4934; --c2: #83a598; --c3: #fabd2f; --c4: #8ec07c; --c5: #d3869b; --c6: #fe8019;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.5 var(--serif); font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.shell { max-width: 1180px; margin: 0 auto; padding: 0 16px 24px; }

/* masthead: sticky and compact; the tagline lives below it, not in it */
.masthead { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--border); }
.masthead-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.actions { display: flex; align-items: center; gap: 0.5rem; }
.tagline { color: var(--ink); font-size: 1.2rem; line-height: 1.4; margin: 1.2rem 0 0.6rem; }
.mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--accent); border-radius: var(--radius); }
a.mark:hover { color: var(--ink); }
.theme-toggle { border: 1px solid var(--border); background: transparent; border-radius: var(--radius);
  width: 2.4rem; height: 2.4rem; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.theme-toggle:hover { border-color: var(--accent); }
.wordmark-link { color: inherit; text-decoration: none; }
.wordmark { font-size: 1.7rem; line-height: 1; font-weight: 400; letter-spacing: 0; }
/* a small italic s (symbolic) before a roman Itô */
.w-s { font-style: italic; font-weight: 400; font-size: 0.6em; color: var(--accent); margin-right: 0.08em; }
.w-ito { font-weight: 700; letter-spacing: 0.03em; }
#results, #sens-notice, .examples, .layout { scroll-margin-top: calc(var(--header-h) + 0.75rem); }

/* example cards */
.examples { margin: 0.25rem -16px 0.5rem; }
.cards { position: relative; list-style: none; margin: 0; padding: 0.25rem 16px 0.75rem; display: flex; gap: 0.6rem;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.cards li { flex: 0 0 auto; scroll-snap-align: start; }
.card { width: 13.5rem; min-height: 5.6rem; height: 100%; text-align: left; display: grid; align-content: start; gap: 0.35rem;
  padding: 0.7rem 0.8rem; background: transparent; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--field); }
.card-title { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.card-math { color: var(--soft); font-size: 0.82rem; overflow: hidden; contain: paint; min-height: 1.6rem; }
.card-math .katex { font-size: 0.9em; }
.card { color: inherit; text-decoration: none; }
a.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-own { border-style: dashed; align-content: center; justify-items: center; text-align: center; }
.card-own .plus { font: 300 1.9rem/1 var(--mono); color: var(--accent); }
@media (min-width: 900px) {
  .examples { margin-inline: 0; }
  .cards { flex-wrap: wrap; overflow: visible; padding-inline: 0; }
}

/* layout */
.layout { display: grid; gap: 1.25rem; }
@media (min-width: 1080px) {
  .layout { grid-template-columns: minmax(430px, 520px) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .results { position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100vh - var(--header-h) - 2rem); overflow: auto; }
}

/* form */
fieldset { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 0.9rem 0 0.4rem; min-width: 0; }
legend { padding: 0 0.7rem 0 0; font-variant: small-caps; letter-spacing: 0.1em; font-size: 1.05rem; color: var(--soft); }
.field { display: grid; gap: 0.3rem; margin-bottom: 0.8rem; min-width: 0; }
.row { display: grid; gap: 0 0.8rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.row-names { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }  /* the two name fields stack on a phone */
label, .label { font-size: 0.82rem; letter-spacing: 0.03em; color: var(--soft); }
.aside { font-size: 0.95em; margin-left: 0.4em; opacity: 0.9; }
input[type="text"], input:not([type]), textarea, select {
  width: 100%; padding: 0.55rem 0.65rem; background: var(--field); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 0; }
textarea { resize: vertical; min-height: 2.6rem; line-height: 1.45; }
.code { font-family: var(--mono); font-size: 0.88rem; }
select { font-size: 0.95rem; appearance: auto; }
.field:has(.field-error:not(:empty)) :is(input, textarea, select) { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.86rem; line-height: 1.3; }
.field-error:empty { display: none; }
.hint { color: var(--soft); font-size: 0.88rem; }
details > summary { cursor: pointer; color: var(--soft); font-size: 0.9rem; padding: 0.2rem 0; }
details[open] > summary { margin-bottom: 0.5rem; }
.about { margin: 0 0 0.8rem; }
.about p { max-width: 44rem; margin: 0.5rem 0; line-height: 1.45; }
.about a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
.about a:hover { color: var(--ink); }
.about .caps { color: var(--soft); font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }
.transform, .dsl, .values { margin: 0.2rem 0 0.6rem; }

/* typeset preview */
.preview { min-height: 1.5rem; margin: -0.2rem 0 0.8rem; padding: 0.1rem 0.2rem; }
.preview-row { overflow-x: auto; overflow-y: hidden; }
.preview-row .katex-display { margin: 0.3rem 0; }
.preview-note { color: var(--soft); font-size: 0.88rem; }
.math .katex { font-size: 1em; }

/* segmented controls */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 0.8rem; }
.field .seg { margin-bottom: 0; }
.seg label { position: relative; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 0.45rem 0.8rem; font-size: 0.9rem; color: var(--ink); }
.seg label + label span { border-left: 1px solid var(--border); }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }
.seg label.off, .seg input:disabled + span { opacity: 0.45; cursor: not-allowed; }

/* discrete "slider" */
.stops { margin-bottom: 1rem; }
.stops-head { display: flex; align-items: baseline; gap: 0.6rem; }
.stops-head output { font: 500 0.95rem var(--mono); color: var(--ink); }
.demo-note { white-space: nowrap; margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; color: var(--soft);
  font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; }
.stops input[type="range"] { width: 100%; margin: 0.35rem 0 0; accent-color: var(--accent); height: 1.6rem; background: transparent; }
.ticks { list-style: none; display: flex; justify-content: space-between; margin: -0.15rem 0.5rem 0; padding: 0;
  font: 0.72rem var(--mono); color: var(--soft); }
.ticks li { display: inline-flex; align-items: center; gap: 0.2rem; }
.ticks li.locked { opacity: 0.55; }
.stops-head output.locked { color: var(--danger); }
.grid-note { margin: 0 0 0.7rem; padding: 0.35rem 0.7rem; border-left: 3px solid var(--accent); background: var(--field);
  color: var(--ink); font-size: 0.9rem; }
.mode-badge { margin-left: 0.8rem; font: 0.72rem var(--mono); letter-spacing: 0; font-variant: normal; color: var(--accent);
  background: none; border: 1px solid var(--accent); border-radius: 999px; padding: 0.05rem 0.55rem; cursor: pointer; vertical-align: 0.1em; }
.mode-badge:hover, .mode-badge[aria-expanded=true] { background: var(--accent); color: var(--accent-ink); }
.mode-badge[hidden] { display: none; }
.mode-help { margin: 0 0 0.8rem; padding: 0.5rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); font-size: 0.9rem; line-height: 1.4; }
.mode-help p { margin: 0 0 0.4rem; }
.mode-help p:last-child { margin: 0; }
.mode-help[hidden] { display: none; }
/* the controls that changed with the mode flash once */
.pulse { animation: pulse 1.6s ease-out 1; }
@keyframes pulse { 0% { background: var(--paper-2); box-shadow: 0 0 0 0.35rem var(--paper-2); } 100% { background: transparent; box-shadow: 0 0 0 0.35rem transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.dt-line { font-size: 0.88rem; margin: -0.4rem 0 0.7rem; }
.dt-line.coarse { color: var(--danger); }
.dt-tip { position: relative; margin-left: 0.4rem; cursor: help; }
.dt-tip[hidden] { display: none; }
.dt-tip:hover::after, .dt-tip:focus::after { content: attr(data-tip); position: absolute; left: 0; top: 1.5rem; z-index: 5; width: min(18rem, 80vw);
  padding: 0.45rem 0.65rem; background: var(--paper-2); color: var(--ink); border: 1px solid var(--border); border-radius: 3px;
  font: 0.82rem var(--serif); line-height: 1.35; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.combo-note { color: var(--danger); font-size: 0.88rem; margin: -0.4rem 0 0.7rem; }

/* sensitivities switch */
.sens { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem 0.9rem; margin: 0.9rem 0; background: var(--field); }
.switch { display: flex; gap: 0.8rem; align-items: flex-start; cursor: pointer; font-size: 1rem; color: var(--ink); letter-spacing: 0; }
.switch input { position: absolute; opacity: 0; }
.track { flex: 0 0 2.5rem; height: 1.4rem; border-radius: 1rem; border: 1px solid var(--border); background: var(--paper);
  position: relative; transition: background 0.15s; margin-top: 0.15rem; }
.track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--soft); transition: transform 0.15s, background 0.15s; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(1.1rem); background: var(--accent-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { display: grid; gap: 0.1rem; }
.switch-text span { color: var(--soft); font-size: 0.9rem; line-height: 1.35; }
.sens .hint { margin: 0.5rem 0 0 3.3rem; font-size: 0.9rem; line-height: 1.35; }

/* notice shown when sensitivities cannot show anything */
.notice { margin: 0.7rem 0 0 0; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--paper); font-size: 0.95rem; }
.notice[hidden], .notice [hidden] { display: none; }
.notice p { margin: 0 0 0.4rem; }
.notice-title { font-weight: 700; }
.notice code { font: 0.82rem var(--mono); }
.notice-lines { list-style: none; margin: 0.4rem 0 0.6rem; padding: 0; display: grid; gap: 0.25rem; }
.notice-lines li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.notice-lines .why { color: var(--soft); font-size: 0.82rem; }
.notice-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn { font-size: 0.9rem; padding: 0.4rem 0.8rem; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; border-radius: var(--radius); cursor: pointer; }
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.notice-compact { color: var(--soft); font-size: 0.9rem; }
.notice-compact .link { margin-left: 0.3rem; }
.deriv { font: 700 0.8rem var(--mono); color: var(--accent); }
.deriv.no { color: var(--soft); font-weight: 400; }
.chip-legend { margin: 0.6rem 0 0; color: var(--soft); font-size: 0.85rem; }
.panel-note { border-left-color: var(--accent); margin-top: 0.8rem; }

/* statistics reference */
.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.chips li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; }
.chip { font: 0.8rem var(--mono); padding: 0.2rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: transparent; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--accent); background: var(--field); }
.chip-note { color: var(--soft); font-size: 0.85rem; }

/* the gallery page */
/* the list of all models: a sheet over the page */
.models { padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper);
  color: var(--ink); width: min(96vw, 64rem); max-height: 92vh; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
.models::backdrop { background: rgba(0, 0, 0, 0.5); }
.models-sheet { padding: 0 1.2rem 1.4rem; }
.models-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1;
  background: var(--paper); padding: 0.8rem 0 0.4rem; }
.models-head h2 { margin: 0; font: 400 1.4rem var(--serif); }
.models-close { background: none; border: 0; color: var(--soft); font-size: 1.9rem; line-height: 1; padding: 0 0.3rem; cursor: pointer; }
.models-close:hover { color: var(--ink); }
.models-hint { margin: 0 0 0.2rem; color: var(--soft); font-size: 0.95rem; }
.card-more .plus { font-size: 1.5rem; }
body:has(dialog.models[open]) { overflow: hidden; }
@media (max-width: 700px) {
  .models { width: 100vw; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
  .models-sheet { padding: 0 1rem 1.4rem; }
}
.area { margin: 1.6rem 0 0; }
.area h2 { margin: 0 0 0.6rem; font: 400 1.05rem var(--serif); font-variant: small-caps; letter-spacing: 0.1em; color: var(--soft);
  border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; }
/* the sub-headings inside a group (Finance) */
.area-group { margin: 1.1rem 0 0.5rem; font: italic 400 1rem var(--serif); color: var(--soft); }
.area-group:first-of-type { margin-top: 0.2rem; }
.gallery-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.gallery-own { margin-top: 0.8rem; }
.gallery-cards .card { width: 100%; display: grid; }  /* a button shrinks to its content unless told */

/* the note of a model that fixes constants because of a demo limit */
.demo-note-model { display: flex; gap: 0.5rem; align-items: baseline; margin: -0.2rem 0 0.8rem; font-size: 0.88rem; color: var(--soft); line-height: 1.35; }
.demo-note-model svg { flex: none; color: var(--accent); }
.demo-note-model strong { font-weight: 700; color: var(--ink); }
.demo-note-model[hidden] { display: none; }

/* a short message that goes by itself (the model of a shared link is loaded), in the accent colours */
.toast { position: fixed; top: 0.75rem; left: 50%; transform: translateX(-50%); z-index: 30;
  width: min(calc(100vw - 2rem), 34rem); display: flex; align-items: flex-start; gap: 0.8rem;
  padding: 0.7rem 0.9rem; background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18); line-height: 1.35;
  transition: opacity 0.4s; }
.toast[hidden] { display: none; }
.toast.leaving { opacity: 0; }
.toast p { margin: 0; flex: 1; }
.toast-close { background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; padding: 0 0.2rem; cursor: pointer; opacity: 0.7; }
.toast-close:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* run bar */
.runbar { position: sticky; bottom: 0; padding: 0.7rem 0 calc(0.7rem + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, transparent, var(--paper) 28%); z-index: 3; }
.primary { width: 100%; padding: 0.85rem 1rem; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; letter-spacing: 0.08em; font-size: 1rem; }
.primary:hover { filter: brightness(1.08); }
.runrow { display: flex; gap: 0.6rem; }
.runrow .primary { flex: 1; width: auto; }
.secondary { padding: 0.85rem 1.3rem; border: 1px solid var(--accent); border-radius: var(--radius); cursor: pointer;
  background: var(--paper); color: var(--accent); font-weight: 700; letter-spacing: 0.08em; font-size: 1rem; }
.secondary:hover { background: var(--accent); color: var(--accent-ink); }
.secondary:disabled { opacity: 0.55; cursor: progress; }
.share-out { margin-top: 0.5rem; }
.share-status { margin: 0; color: var(--soft); font-size: 0.9rem; }
.share-link { width: 100%; margin-top: 0.35rem; font-size: 0.8rem; }
.primary:disabled { opacity: 0.55; cursor: progress; }
@media (min-width: 1080px) { .runbar { position: static; background: none; padding-inline: 0; } }

/* results */
.results { min-width: 0; }
.placeholder { color: var(--soft); padding: 2rem 0; border-top: 1px solid var(--border); }
.results .panel, .job-status { margin-top: 0.4rem; }
.job-status { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 0; border-top: 1px solid var(--border); color: var(--soft); }
.spinner { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .track, .track::after { transition: none; } }
.link { margin-left: auto; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0.2rem; }
.panel { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius);
  padding: 0.8rem 1rem; background: var(--field); }
.panel h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.panel ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.panel-limits, .panel-spec, .panel-timeout, .panel-internal { border-left-color: var(--danger); }
.panel pre { white-space: pre-wrap; font: 0.8rem var(--mono); margin: 0.4rem 0 0; }
.transformed { border-top: 1px solid var(--border); padding: 0.7rem 0 0; overflow-x: auto; }
.transformed .label { font-variant: small-caps; letter-spacing: 0.08em; font-size: 0.95rem; }

.result { border-top: 1px solid var(--border); padding: 1rem 0 0.4rem; }
.result header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.result h3 { font-size: 1.1rem; }
.badge { font-variant: small-caps; letter-spacing: 0.08em; color: var(--soft); font-size: 0.92rem; }
.chart { position: relative; width: 100%; height: 280px; }
.chart-sens { height: 210px; margin-top: 0.8rem; }
@media (min-width: 700px) { .chart { height: 330px; } .chart-sens { height: 240px; } }
.chart .u-wrap { font-family: var(--mono); }
.view { display: block; }
.view-pairs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.5rem; }
.view-pairs button { font: 0.8rem var(--mono); color: var(--soft); background: none; border: 1px solid var(--border);
  border-radius: 999px; padding: 0.15rem 0.7rem; cursor: pointer; }
.view-pairs button:hover { color: var(--ink); }
.view-pairs button[aria-pressed=true] { color: var(--ink); border-color: var(--accent); }
.view-panel { position: relative; margin: 0; }
.view-panel canvas { display: block; width: 100%; height: 300px; touch-action: pan-y; }
@media (min-width: 700px) { .view-panel canvas { height: 340px; } }
.view-note { color: var(--soft); font-size: 0.86rem; margin: 0.3rem 0 0.8rem; }
.tablist { display: flex; flex-wrap: wrap; gap: 0 0.3rem; border-bottom: 1px solid var(--border); margin: 0 0 0.8rem; }
.tablist [role=tab] { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0.4rem 0.7rem;
  font: 0.85rem var(--mono); color: var(--soft); cursor: pointer; }
.tablist [role=tab]:hover { color: var(--ink); }
.tablist [role=tab][aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.tablist [role=tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
[role=tabpanel][hidden] { display: none; }
.chart-note { position: absolute; inset: 0; display: grid; place-items: center; color: var(--soft); }
.tip { position: absolute; pointer-events: none; z-index: 5; background: var(--paper); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.3rem 0.5rem; font: 0.72rem/1.4 var(--mono); white-space: nowrap; }
.tip b { font-weight: 500; color: var(--soft); }
.legend { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.82rem; color: var(--soft); margin: 0.3rem 0 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.swatch { display: inline-block; width: 1.1rem; height: 0; border-top: 2px solid; }
.swatch.dash { border-top-style: dashed; }
.swatch.dot { border-top-style: dotted; }
.swatch.fill { height: 0.6rem; border: 0; background: linear-gradient(to right, transparent, rgb(var(--band-rgb))); }
.facts { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; margin: 0.6rem 0 0; }
.facts div { display: grid; }
.facts dt { font-size: 0.78rem; color: var(--soft); letter-spacing: 0.03em; }
.facts dt { display: flex; align-items: center; gap: 0.4rem; }
.facts .swatch { border-top-color: var(--ink); }
.facts .swatch.dash { border-top-color: var(--soft); }
.facts dd { margin: 0; font: 500 0.95rem var(--mono); }
.big-number { font: 500 2.2rem/1.1 var(--mono); margin: 0.2rem 0 0.4rem; }
.note { color: var(--soft); font-size: 0.86rem; margin-top: 0.4rem; }
.sens table, table.sens { border-collapse: collapse; margin-top: 0.6rem; font-size: 0.9rem; }
table.sens caption { text-align: left; font-variant: small-caps; letter-spacing: 0.08em; color: var(--soft); padding-bottom: 0.2rem; }
table.sens th { text-align: left; font-weight: 400; padding: 0.1rem 1.4rem 0.1rem 0; }
table.sens td { font-family: var(--mono); }
.timing { color: var(--soft); font-size: 0.86rem; border-top: 1px solid var(--border); padding-top: 0.6rem; margin-top: 0.8rem; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; margin-top: 2rem;
  padding-top: 0.8rem; border-top: 1px solid var(--border); color: var(--soft); font-size: 0.85rem; }

.colophon a { color: inherit; text-decoration: none; }
.colophon a:hover, .colophon a:focus-visible { color: var(--accent); text-decoration: underline; }
.colophon .mark { display: inline-grid; width: 1.5rem; height: 1.5rem; vertical-align: middle; margin-right: 0.4rem; color: var(--accent); }
.colophon .mark svg { width: 1.2rem; height: 1.2rem; }
.colophon .demo-note { margin-left: 0; }
.colophon .w-s { font-size: 1em; margin-right: 0.04em; }
.colophon .w-ito { letter-spacing: 0; }
.colophon .sep { margin: 0 0.55rem; }

/* uPlot theming */
.uplot, .uplot * { font-family: var(--mono); }
.u-legend { display: none; }

/* the badges of the demo limits and their sheet */
.demo-link { background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.demo-link:hover, .demo-link:focus-visible { color: var(--accent); text-decoration: underline; }
.label-row { display: flex; align-items: baseline; gap: 0.6rem; }
.label-row .demo-note { margin-left: auto; }
.label-row label { margin-bottom: 0; }
.info { flex: none; align-self: flex-start; padding: 0.35rem 0.3rem; margin: -0.35rem -0.1rem 0 -0.15rem; border: 0; background: none;
  color: var(--accent); font: italic 0.78rem/1 var(--serif); cursor: pointer; }
.info:hover, .info:focus-visible, .info[aria-expanded=true] { text-decoration: underline; color: var(--ink); }
.info-note { max-width: 22rem; margin: 0.1rem 0 0.4rem; padding: 0.4rem 0.7rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper-2); color: var(--soft); font-size: 0.86rem; line-height: 1.4; }
.info-note[hidden] { display: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.models.limits { width: min(96vw, 40rem); }
.limits-list { margin: 0.6rem 0 0; }
.limits-list > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.8rem; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.limits-list dt { font-variant: small-caps; letter-spacing: 0.06em; color: var(--soft); }
.limits-list dd { margin: 0; }
body:has(dialog.limits[open]) { overflow: hidden; }
@media (max-width: 700px) { .limits-list > div { grid-template-columns: 1fr; gap: 0.1rem; } }

/* the values table: a name on the left, its value on the right */
.values-status { color: var(--accent); }
.values-col { min-width: 0; }
.values-rows { display: grid; gap: 0.35rem; }
.vrow { display: grid; grid-template-columns: minmax(3rem, 30%) 1fr; align-items: center; gap: 0.6rem; }
.vname { font-family: var(--mono); font-size: 0.9rem; color: var(--ink); overflow-wrap: anywhere; }
.vrow input { min-width: 0; }
.vrow input[aria-invalid=true] { border-color: var(--danger); }
.values-empty { margin: 0; color: var(--soft); font-size: 0.86rem; }
