/* (c) 2026 Wayne State University. All rights reserved. */
.sb {
  --sb-bar: var(--sl-wsu-green-edge);
  --sb-hot: var(--sl-danger-ink);
  --sb-roll: cubic-bezier(0.22, 1, 0.36, 1);
  font-variant-numeric: tabular-nums;
  -webkit-touch-callout: none;
}
.sb :is(h1, h2, p) { margin: 0; }
.sb button { font: inherit; }

.sb-odo { display: inline-block; white-space: nowrap; }
.sb-odo__d { position: relative; display: inline-block; line-height: 1.1; clip-path: inset(0); }
.sb-odo__ghost { visibility: hidden; }
.sb-odo__strip { position: absolute; top: 0; left: 0; display: flex; flex-direction: column;
  transition: transform 520ms var(--sb-roll); will-change: transform; }
.sb-odo__strip span { display: block; height: 1.1em; line-height: 1.1; }
.sb-odo__s { display: inline-block; line-height: 1.1; }

.sb-pill { display: inline-flex; align-items: center; gap: 4px; box-sizing: border-box; min-height: 32px; padding: 0 var(--sl-space-3);
  border: 1px solid var(--sl-border-control); border-radius: var(--sl-radius-pill); background: var(--sl-surface);
  color: var(--sl-text-2); font-size: var(--sl-fs-1); font-weight: 600; white-space: nowrap; cursor: pointer; }
.sb-pill strong { color: var(--sl-text-1); font-weight: 800; }
.sb-pill:focus-visible, .sb-from:focus-within { outline: 2px solid var(--sl-focus); outline-offset: 2px; }

.sb-res { position: relative; display: flex; flex: none; flex-direction: column; align-items: center; gap: 3px;
  padding: var(--sl-space-2) var(--sl-space-3) var(--sl-space-3); border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-card); background: var(--sl-surface); box-shadow: var(--sl-shadow-card); }
.sb-from { position: absolute; top: var(--sl-space-2); left: var(--sl-space-2); }
.sb-from::after { content: ""; width: 0; height: 0; margin-left: 2px; border: 4px solid transparent; border-top: 5px solid currentColor;
  border-bottom: 0; }
.sb-from select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0;
  font-size: 16px; cursor: pointer; }
.sb-clear { position: absolute; top: var(--sl-space-2); right: var(--sl-space-2); }

.sb-dial { position: relative; width: min(270px, 80%, 33dvh); margin-top: 18px; }
.sb-dial svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; }
.sb-dial path { fill: none; stroke-width: 14; stroke-linecap: round; }
.sb-dial__all { stroke: var(--sl-surface-sunken); }
.sb-dial__rec { stroke: var(--sl-border); stroke-dasharray: 100 100; }
.sb-dial__ep { stroke: var(--sl-border-control); stroke-dasharray: 0 200; opacity: 0;
  transition: stroke-dasharray 500ms var(--sb-roll), stroke-dashoffset 500ms var(--sb-roll), opacity 300ms ease; }
.sb-dial.is-ep .sb-dial__ep { opacity: 0.5; }
.sb-dial__val { stroke: var(--sb-bar); stroke-dasharray: 0 200; stroke-dashoffset: 0;
  transition: stroke-dasharray 800ms var(--sb-roll), stroke-dashoffset 800ms var(--sb-roll), opacity 300ms ease; }
.sb-dial__tick { fill: var(--sl-surface); opacity: 0.85; }
.sb-knob { outline: none; cursor: grab; filter: drop-shadow(var(--sl-shadow-1)); }
.sb-knob circle { fill: var(--sl-surface); stroke: var(--sl-wsu-green-edge); stroke-width: 3; }
.sb-knob text { fill: var(--sl-text-1); font-size: 12px; font-weight: 800; pointer-events: none; }
.sb-knob:focus-visible circle { stroke: var(--sl-focus); stroke-width: 4; }
.sb-dial__mid { position: absolute; right: 0; bottom: 12%; left: 0; text-align: center; pointer-events: none; }
.sb-dial__cap { font-size: var(--sl-fs-1); font-weight: 700; color: var(--sl-text-2); letter-spacing: 0.02em; }
.sb-big { font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em;
  white-space: nowrap; color: var(--sl-text-1); }
.sb-big .sb-u { margin: 0 0.5em 0 0.15em; font-size: var(--sl-fs-3); font-weight: 700; color: var(--sl-text-2); letter-spacing: 0; }
.sb-big .sb-dur__m .sb-u { margin-right: 0; }
.sb-pct { margin-top: -2px; font-size: var(--sl-fs-4); font-weight: 700; color: var(--sl-brand); }
.sb-meta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--sl-space-2); width: 100%;
  margin-top: var(--sl-space-2); font-size: var(--sl-fs-2); color: var(--sl-text-2); }
.sb-meta p { min-width: 0; }
.sb-meta strong { color: var(--sl-text-1); font-weight: 800; }
.sb-meta .sb-pill { flex: none; color: var(--sl-text-1); font-weight: 700; }
.sb-eps { display: grid; grid-template-columns: repeat(var(--sb-n, 4), 1fr); gap: 6px; width: 100%; margin-top: 6px; }
.sb-ep { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 7px 2px var(--sl-space-2);
  border: 1px solid transparent; border-radius: var(--sl-radius-lg); background: var(--sl-surface-sunken); color: var(--sl-text-1);
  cursor: pointer; transition: transform var(--sl-dur-fast) var(--sl-ease), background-color var(--sl-dur) var(--sl-ease); }
.sb-ep:active { transform: scale(0.97); }
.sb-ep:focus-visible { outline: 2px solid var(--sl-focus); outline-offset: 2px; }
.sb-ep__k { font-size: var(--sl-fs-1); font-weight: 600; color: var(--sl-text-2); }
.sb-ep__v { font-size: 17px; font-weight: 800; line-height: 1.25; white-space: nowrap; }
.sb-ep__v .sb-u { margin: 0 3px 0 1px; font-size: var(--sl-fs-1); font-weight: 700; color: var(--sl-text-2); }
.sb-ep__v .sb-dur__m .sb-u { margin-right: 0; }
.sb-ep__p { font-size: var(--sl-fs-1); font-weight: 700; color: var(--sl-text-2); }
.sb-ep[aria-pressed="true"] { border-color: var(--sl-wsu-green-edge); background: var(--sl-wsu-green); color: var(--sl-on-wsu-green); }
.sb-ep[aria-pressed="true"] :is(.sb-ep__k, .sb-ep__p, .sb-u) { color: var(--sl-on-wsu-green); }

.sb-eq { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-height: 150px; max-height: 440px;
  padding: var(--sl-space-2) var(--sl-space-3) var(--sl-space-2) var(--sl-space-2); border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-card); background: var(--sl-surface); box-shadow: var(--sl-shadow-card); }
.sb-eq__top { display: flex; flex: none; align-items: center; gap: var(--sl-space-2); min-height: 36px; padding-left: 6px; }
.sb-eq__when { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; color: var(--sl-text-1); }
.sb-eq__when.is-hint { font-size: var(--sl-fs-2); font-weight: 500; color: var(--sl-text-2); }
.sb-eq__val { flex: none; font-size: 15px; font-weight: 800; color: var(--sl-text-1); }
.sb-eq__val small { font-size: var(--sl-fs-1); font-weight: 600; color: var(--sl-text-2); }
.sb-step { display: grid; flex: none; place-items: center; width: 36px; height: 36px; padding: 0 0 2px; border: 1px solid var(--sl-border);
  border-radius: 50%; background: var(--sl-surface); box-shadow: var(--sl-shadow-card); color: var(--sl-text-1); font-size: 20px;
  font-weight: 600; line-height: 1; cursor: pointer; }
.sb-step:disabled { opacity: 0.4; cursor: default; }
.sb-step:focus-visible { outline: 2px solid var(--sl-focus); outline-offset: 2px; }
.sb-step svg { width: 19px; height: 19px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sb-step[aria-pressed="true"] { border-color: var(--sl-wsu-green-edge); background: var(--sl-wsu-green); color: var(--sl-on-wsu-green); }

.sb-ov { position: relative; flex: none; height: 30px; margin-left: 32px; touch-action: none; cursor: ew-resize; }
.sb-ov[hidden] { display: none; }
.sb-ov__bars { position: absolute; inset: 4px 0; display: flex; align-items: flex-end; gap: 2px; }
.sb-ov__bars i { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--sb-bar); opacity: 0.6; }
.sb-ov__bars i.is-over { background: var(--sb-hot); }
.sb-ov__bars i.is-zero { background: var(--sl-border-control); opacity: 0.45; }
.sb-ov__win { position: absolute; top: 0; bottom: 0; box-sizing: border-box; border: 2px solid var(--sl-wsu-green-edge);
  border-radius: var(--sl-radius-md); pointer-events: none; transition: left var(--sl-dur) var(--sb-roll); }

.sb-plot { display: flex; flex: 1; min-height: 84px; outline-offset: 2px; touch-action: none; cursor: ns-resize; }
.sb-plot:focus-visible { outline: 2px solid var(--sl-focus); }
.sb-plot__y { position: relative; flex: none; width: 32px; }
.sb-plot__y span { position: absolute; right: 6px; font-size: var(--sl-fs-1); font-weight: 600; line-height: 1; color: var(--sl-text-3); }
.sb-plot__y span:first-child { top: 2px; }
.sb-plot__y span:last-child { bottom: 2px; }
.sb-plot__y .is-line { bottom: 20%; transform: translateY(50%); font-weight: 800; color: var(--sl-warning-ink); }
.sb-plot__area { position: relative; flex: 1; min-width: 0; }
.sb-line { position: absolute; right: -2px; bottom: 20%; left: -2px; z-index: 2; height: 0; border-top: 1.5px dashed var(--sl-brand-gold);
  pointer-events: none; }
.sb-bars { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 3px; }
.sb-bar { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--sl-radius-pill);
  background: var(--sl-surface-sunken); transition: box-shadow 150ms ease; }
.sb-bar i { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; border-radius: var(--sl-radius-pill) var(--sl-radius-pill) 0 0;
  background: var(--sb-bar); transition: height 420ms var(--sb-roll), background-color var(--sl-dur) ease; }
.sb-bar.is-over i { background: var(--sb-hot); }
.sb-bar.is-sel { box-shadow: 0 0 0 2px var(--sl-surface), 0 0 0 3.5px var(--sl-wsu-green-edge); }
.sb-bars--rough, .sb-bars--zoom { gap: var(--sl-space-2); }
:is(.sb-bars--rough, .sb-bars--zoom) .sb-bar { border-radius: 14px; }
:is(.sb-bars--rough, .sb-bars--zoom) .sb-bar i { border-radius: 12px 12px 0 0; }
.sb-bars--rough .sb-bar i::after { content: ""; position: absolute; top: 6px; left: 50%; width: 20px; height: 3px; margin-left: -10px;
  border-radius: 2px; background: color-mix(in srgb, var(--sl-surface) 55%, transparent); }
.sb-bar b { position: absolute; right: 0; left: 0; z-index: 1; font-size: var(--sl-fs-2); font-weight: 800; line-height: 16px;
  text-align: center; color: var(--sl-text-1); pointer-events: none; }
.sb-bar b.is-in { color: var(--sl-surface); }
.sb-x { position: relative; flex: none; height: 16px; margin-left: 32px; }
.sb-x span { position: absolute; top: 0; font-size: var(--sl-fs-1); font-weight: 600; line-height: 16px; white-space: nowrap; color: var(--sl-text-3); }
.sb-x--zoom span { transform: translateX(-50%); }

.sb.is-zoom :is(.sb-meta, .sb-eps, .sb-seg) { display: none; }

.sb-eq { position: relative; }
.sb-loupe { position: absolute; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 2px; box-sizing: border-box;
  width: 92px; padding: var(--sl-space-2) var(--sl-space-2) var(--sl-space-3); border: 1px solid var(--sl-border);
  border-radius: 22px; background: var(--sl-surface); box-shadow: var(--sl-shadow-2); pointer-events: none;
  --sb-loupe-fill: var(--sb-bar); }
.sb-loupe[hidden] { display: none; }
.sb-loupe.is-over { --sb-loupe-fill: var(--sb-hot); }
.sb-loupe__when { font-size: var(--sl-fs-1); font-weight: 700; color: var(--sl-text-2); white-space: nowrap; }
.sb-loupe__val { font-size: var(--sl-fs-2); font-weight: 700; color: var(--sl-text-2); }
.sb-loupe__val strong { font-size: 30px; font-weight: 800; line-height: 1; color: var(--sb-loupe-fill); }
.sb-loupe__bar { position: relative; width: 48px; height: 120px; margin-top: 4px; overflow: hidden; border-radius: var(--sl-radius-pill);
  background: var(--sl-surface-sunken); }
.sb-loupe__bar i { position: absolute; right: 0; bottom: 0; left: 0; border-radius: var(--sl-radius-pill) var(--sl-radius-pill) 0 0;
  background: var(--sb-loupe-fill); }
.sb-loupe__line { position: absolute; right: 0; bottom: 20%; left: 0; height: 0; border-top: 1.5px dashed var(--sl-brand-gold); }
@media (max-height: 680px) { .sb-loupe__bar { height: 90px; } .sb-epick__track { height: 96px; } }
.sb-loupe { transition: left 170ms var(--sb-roll), top 90ms linear; }
.sb-loupe__bar i { transition: height 140ms var(--sb-roll), background-color var(--sl-dur) ease; }
.sb-loupe__val strong { transition: color var(--sl-dur) ease; }
.sb-loupe.is-still, .sb-loupe.is-still .sb-loupe__bar i { transition: none; }

.sb-epoch::after { content: ""; width: 0; height: 0; margin-left: 2px; border: 4px solid transparent; border-bottom: 5px solid currentColor;
  border-top: 0; }
.sb-epick { position: absolute; right: 0; bottom: calc(100% + var(--sl-space-2)); z-index: 6; display: flex; align-items: stretch;
  gap: var(--sl-space-2); padding: var(--sl-space-3) var(--sl-space-3) var(--sl-space-3) var(--sl-space-2); border: 1px solid var(--sl-border);
  border-radius: 20px; background: var(--sl-surface); box-shadow: var(--sl-shadow-2); }
.sb-epick[hidden] { display: none; }
.sb-epick__stops { display: flex; flex-direction: column; justify-content: space-between; margin: -12px 0; }
.sb-epick__stops button { min-width: 52px; min-height: 32px; padding: 0 var(--sl-space-2); border: 0; border-radius: var(--sl-radius-pill);
  background: none; color: var(--sl-text-2); font-size: var(--sl-fs-3); font-weight: 700; text-align: right; cursor: pointer; }
.sb-epick__stops button[aria-pressed="true"] { color: var(--sl-text-1); font-weight: 800; }
.sb-epick__track { position: relative; width: 12px; height: 128px; margin: 4px 10px; border-radius: var(--sl-radius-pill);
  background: var(--sl-surface-sunken); outline: 1px solid var(--sl-border); touch-action: none; cursor: ns-resize; }
.sb-epick__track:focus-visible { outline: 2px solid var(--sl-focus); outline-offset: 4px; }
.sb-epick__track::before { content: ""; position: absolute; inset: -6px -16px; }
.sb-epick__fill { position: absolute; right: 0; bottom: 0; left: 0; border-radius: var(--sl-radius-pill); background: var(--sl-wsu-green);
  transition: height 220ms var(--sb-roll); }
.sb-epick__dot { position: absolute; left: 50%; width: 6px; height: 6px; margin: 0 0 -3px -3px; border-radius: 50%; background: var(--sl-border-control);
  pointer-events: none; }
.sb-epick__thumb { position: absolute; left: 50%; width: 28px; height: 28px; margin: 0 0 -14px -14px; box-sizing: border-box; border: 3px solid var(--sl-wsu-green-edge);
  border-radius: 50%; background: var(--sl-surface); box-shadow: var(--sl-shadow-1); pointer-events: none;
  transition: bottom 220ms var(--sb-roll); }
.sb-epick.is-dragging :is(.sb-epick__thumb, .sb-epick__fill) { transition: none; }
.sb.is-drawing .sb-bar i { transition: none; }
.sb.is-drawing .sb-odo__strip { transition-duration: 260ms; }
.sb.is-drawing :is(.sb-dial__val, .sb-dial__ep) { transition-duration: 200ms; }

.sb-seg { display: grid; flex: none; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-pill); background: var(--sl-surface-sunken); }
.sb-seg button { min-height: 38px; padding: 3px 4px; border: 1px solid transparent; border-radius: var(--sl-radius-pill);
  background: transparent; color: var(--sl-text-2); font-size: var(--sl-fs-3); font-weight: 700; line-height: 1.15; cursor: pointer; }
.sb-seg button small { margin-left: 4px; font-size: var(--sl-fs-1); font-weight: 500; opacity: 0.9; }
.sb-seg button:focus-visible { outline: 2px solid var(--sl-focus); outline-offset: 2px; }
.sb-seg button[aria-pressed="true"] { border-color: var(--sl-wsu-green-edge); background: var(--sl-wsu-green); color: var(--sl-on-wsu-green); }

.sb-links { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 18px; font-size: var(--sl-fs-2);
  color: var(--sl-text-2); line-height: var(--sl-lh-3); }
.sb-links strong, .hb-sheet__note strong { color: var(--sl-text-1); }

@media (max-width: 370px) {
  .sb-ep__v { font-size: 15px; }
  .sb-seg button small { display: none; }
}
@media (max-height: 760px) {
  .sb-res { padding-bottom: var(--sl-space-2); }
  .sb-dial { width: min(270px, 80%, 30dvh); }
  .sb-dial { margin-top: 10px; }
  .sb-meta { margin-top: 4px; }
  .sb-ep { padding-block: 3px 4px; }
  .sb-ep__v { font-size: 15px; }
  .sb-seg button { min-height: 32px; }
  .sb .tm-head__sub { display: none; }
}
@media (max-height: 680px) {
  .sb-dial { width: min(270px, 80%, 27dvh); margin-top: 6px; }
  .sb-big { font-size: 30px; }
  .sb-eq { min-height: 120px; padding-block: 6px; gap: 4px; }
  .sb-eq__top { min-height: 32px; }
  .sb-step { width: 32px; height: 32px; }
  .sb-plot { min-height: 60px; }
  .sb-plot__y span:last-child { display: none; }
  .sb-seg { padding: 3px; }
  .sb-seg button { min-height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-odo__strip, .sb-dial__val, .sb-dial__ep, .sb-bar i, .sb-ep, .sb-ov__win, .sb-loupe, .sb-loupe__bar i,
    .sb-epick__fill, .sb-epick__thumb { transition: none !important; }
}
