/* Quality vs speed (prefix sc-) */
.sc-card { position: relative; padding: 22px 26px 18px; }
.sc-plot { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.sc-svg { display: block; overflow: visible; }
.sc-svg text { font-family: var(--font); }

/* "Cloud references" switch, top right of the card (above the plot on phones) */
.sc-reftoggle { position: absolute; top: 14px; right: 18px; z-index: 1; display: inline-flex; align-items: center; gap: 9px;
  border: 0; background: transparent; cursor: pointer; padding: 5px 8px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2);
  white-space: nowrap; }
.sc-reftoggle:hover { background: var(--line-2); }
.sc-reftoggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.sc-switch { position: relative; flex: none; width: 28px; height: 16px; border-radius: 8px; background: #cfd4da;
  transition: background .15s ease; }
.sc-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .25); transition: transform .15s ease; }
.sc-reftoggle[aria-checked="true"] .sc-switch { background: var(--ink); }
.sc-reftoggle[aria-checked="true"] .sc-switch::after { transform: translateX(12px); }

.sc-zone { fill: var(--lime-soft); }
.sc-grid-h { stroke: var(--line); stroke-dasharray: 3 4; shape-rendering: crispEdges; }
.sc-grid-v { stroke: var(--line-2); shape-rendering: crispEdges; }
.sc-axis { stroke: var(--line); shape-rendering: crispEdges; }
.sc-thr { stroke: #c4dc8a; stroke-width: 1.3; stroke-dasharray: 5 4; }
.sc-tick { font-size: 11.5px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.sc-cap { font-size: 12.5px; fill: var(--muted); }
.sc-zone-t { font-size: 13px; font-weight: 650; fill: var(--lime-ink); }
.sc-zone-s { font-size: 11.5px; font-weight: 500; fill: var(--lime-ink); opacity: .72; }

.sc-label { fill: var(--ink-2); font-weight: 480; paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round;
  transition: opacity .15s ease; }
.sc-label.sc-on-zone { stroke: var(--lime-soft); }
.sc-label.sc-label-rec { fill: var(--ink); font-weight: 650; }
.sc-part { fill: var(--warn); font-weight: 600; }
.sc-leader { stroke: #b4bcc6; stroke-width: 1; transition: opacity .15s ease; }

.sc-pt { outline: none; cursor: default; transition: opacity .15s ease; }
.sc-dot { stroke: #fff; stroke-width: 1.6; transition: r .15s ease; }
.sc-partial .sc-dot { stroke-width: 2.4; }
.sc-ring { fill: var(--lime); stroke: var(--lime-ink); stroke-width: 1.4; }
.sc-hit { fill: transparent; }
.sc-pt:focus-visible .sc-hit { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sc-pt.sc-hot .sc-dot { r: 9px; }
.sc-dim .sc-pt:not(.sc-hot), .sc-dim .sc-label:not(.sc-hot), .sc-dim .sc-leader:not(.sc-hot) { opacity: .3; }
.sc-label.sc-hot { fill: var(--ink); font-weight: 650; }

/* cloud references: hollow diamonds with a "cloud" tag (time), or dashed lines with pills (decode) */
.sc-dia { fill: #fff; stroke-width: 2; stroke-linejoin: round; transform-box: fill-box; transform-origin: center;
  transition: transform .15s ease; }
.sc-pt.sc-hot .sc-dia { transform: scale(1.2); }
.sc-tag { fill: var(--track); stroke: none; }
.sc-tagtext { fill: var(--muted); stroke: none; font-weight: 600; letter-spacing: .02em; }
.sc-reflab.sc-hot .sc-tagtext { fill: var(--ink-2); }
.sc-refline { fill: none; stroke-width: 1.5; opacity: .6; transition: stroke-width .15s ease, opacity .15s ease; }
.sc-refline.sc-ref-hot { stroke-width: 2.25; opacity: 1; }
.sc-refhit { fill: none; stroke: transparent; stroke-width: 10; }
.sc-refpill { outline: none; transition: opacity .15s ease; }
.sc-refpill rect { fill: #fff; stroke-width: 1; stroke-opacity: .55; transition: stroke-opacity .15s ease; }
.sc-refpill.sc-ref-hot rect, .sc-refpill:focus-visible rect { stroke-opacity: 1; stroke-width: 1.5; }
.sc-refleader { fill: none; stroke-width: 1; opacity: .6; }
.sc-refletter { fill: #fff; font-weight: 760; letter-spacing: -.04em; }
.sc-refname { fill: var(--ink-2); font-weight: 500; }
.sc-refsep { fill: var(--faint); }
.sc-refval { fill: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.sc-refdim .sc-refline:not(.sc-ref-hot) { opacity: .2; }
.sc-refdim .sc-refpill:not(.sc-ref-hot) { opacity: .3; }

.sc-empty { min-height: 260px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }

.sc-foot { align-items: center; margin-top: 8px; }
.sc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.sc-leg { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.sc-leg .lb-mono { font-size: 9.5px !important; }
.sc-leg-rec i { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--lime);
  border: 1.4px solid var(--lime-ink); box-shadow: inset 0 0 0 3.5px var(--lime), inset 0 0 0 9px var(--ink-2); }
.sc-cloud { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px;
  padding-top: 10px; border-top: 1px solid var(--line-2); }
.sc-cloud-key { display: inline-flex; align-items: center; gap: 8px; }
.sc-key-dia, .sc-key-dash { display: block; flex: none; }
.sc-key-dia path { fill: #fff; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; }
.sc-key-dash line { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 6 4; }

@media (prefers-reduced-motion: reduce) {
  .sc-label, .sc-leader, .sc-pt, .sc-dot, .sc-dia, .sc-refline, .sc-refpill, .sc-refpill rect, .sc-switch, .sc-switch::after { transition: none; }
}
@media (max-width: 640px) {
  .sc-card { padding: 16px 14px 14px; }
  .sc-reftoggle { position: static; margin: 0 0 4px -8px; }
}
