/* OpenWorldEngineer: reaction kinetics forecast (artifacts-spectral.html, assets/art/spectral.js). Builds on styles.css
   (tokens, .card, .note, .tip); adds only sk- classes. One emphasis colour: the indigo accent is the selected attempt;
   the true values are ink dots inside a grey tolerance wash; every other attempt is a faint grey line. */

.sk {
  container-type: inline-size;
  --sk-sel: var(--accent);
  --sk-other: #C9CDD2;
  --sk-band: rgba(21, 23, 26, 0.085);
  --sk-bar: #9AA0A8;
  display: grid; gap: 16px; min-width: 0; color: var(--ink); font-size: var(--fs-ui);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sk { --sk-other: #464A50; --sk-band: rgba(242, 243, 245, 0.10); --sk-bar: #6B7078; }
}
:root[data-theme="dark"] .sk { --sk-other: #464A50; --sk-band: rgba(242, 243, 245, 0.10); --sk-bar: #6B7078; }

.sk-head p { max-width: 78ch; }
.sk-quiet { margin: 0; padding: 18px 0; color: var(--muted); }
.sk-note { margin: 0; max-width: 84ch; }

.sk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; min-width: 0; }
.sk-card { position: relative; padding: 16px; min-width: 0; }

/* chart card */
.sk-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.sk-title { margin: 0; font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.02em; }
.sk-link { font-size: var(--fs-small); white-space: nowrap; }
.sk-sum { margin: 6px 0 0; color: var(--ink-2); line-height: 1.5; }
.sk-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 10px 0 2px; font-size: 0.75rem; color: var(--muted); }
.sk-lk { display: inline-flex; align-items: center; gap: 6px; }
.sk-sw { position: relative; flex: none; display: inline-block; }
.sk-sw.truth { width: 16px; height: 9px; border-radius: 0; background: var(--sk-band); }
.sk-sw.truth::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.sk-sw.sel { width: 16px; height: 0; border-top: 2px solid var(--sk-sel); border-radius: 0; }
.sk-sw.other { width: 16px; height: 0; border-top: 1.5px solid var(--sk-other); }

.sk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 12px; }
.sk-panel { margin: 0; min-width: 0; }
.sk-ph { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sk-sp { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--ink); }
.sk-kind { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-ms { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-plot { position: relative; margin-top: 4px; min-width: 0; }
.sk-plot svg { display: block; max-width: 100%; overflow: visible; touch-action: pan-y; }
.sk-plot svg:focus { outline: none; }
.sk-plot svg:focus-visible .sk-focus { stroke: var(--accent); }

.sk-gl { stroke: var(--rule); stroke-width: 1; shape-rendering: crispEdges; }
.sk-axis { stroke: var(--rule-strong); stroke-width: 1; shape-rendering: crispEdges; }
.sk-tick { stroke: var(--rule-strong); stroke-width: 1; }
.sk-t { fill: var(--muted); font-size: 10.5px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sk-unit { fill: var(--muted); font-size: 10px; font-family: var(--font-sans); }
.sk-band { fill: var(--sk-band); stroke: none; }
.sk-feed { stroke: var(--rule-strong); stroke-width: 3; stroke-linecap: round; }
.sk-other { fill: none; stroke: var(--sk-other); stroke-width: 1.25; stroke-linejoin: round; }
.is-prev .sk-other { opacity: 0.55; }
.sk-prev { fill: none; stroke: var(--line-on); stroke-width: 1.75; stroke-linejoin: round; }
.sk-sel { fill: none; stroke: var(--sk-sel); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sk-seld { fill: var(--sk-sel); stroke: var(--sheet); stroke-width: 1; }
.sk-truth { fill: var(--ink); stroke: var(--sheet); stroke-width: 1.25; }
.sk-cross { stroke: var(--ink-2); stroke-width: 1; opacity: 0.5; shape-rendering: crispEdges; }
.sk-hdot { fill: var(--sk-sel); stroke: var(--sheet); stroke-width: 2; }
.sk-htruth { fill: var(--ink); stroke: var(--sheet); stroke-width: 2; }
.sk-hit { fill: transparent; cursor: crosshair; }
.sk-focus { fill: none; stroke: transparent; stroke-width: 2; pointer-events: none; }

/* case conditions (the grid's sixth cell) */
.sk-case { min-width: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--hover); align-self: start; }
.sk-case-h { margin: 0 0 8px; font-size: 0.9375rem; font-weight: 650; letter-spacing: -0.02em; }
.sk-case dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: var(--fs-small); line-height: 1.45; }
.sk-case dt { color: var(--muted); white-space: nowrap; }
.sk-case dd { margin: 0; color: var(--ink-2); }
.sk-case .note { margin: 8px 0 0; font-size: 0.75rem; }

/* attempts card */
.sk-side-h { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -0.02em; }
.sk-side-s { margin: 4px 0 8px; }
.sk-side-f { margin: 10px 0 0; font-size: 0.75rem; }
.sk-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.sk-table th { padding: 6px 6px; text-align: left; font-weight: 560; font-size: 0.75rem; color: var(--muted); border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.sk-table th.r, .sk-table td.r { text-align: right; }
.sk-table td { padding: 3px 6px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.sk-table tr:last-child td { border-bottom: 0; }
.sk-row { cursor: pointer; }
.sk-row:hover td { background: var(--hover); }
.sk-row.is-sel td { background: var(--hover); }
.sk-row.is-sel td:first-child { box-shadow: inset 2px 0 0 var(--sk-sel); }
.sk-pick {
  display: grid; width: 100%; padding: 4px 0; margin: 0; border: 0; background: none; color: var(--ink-2);
  font: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.sk-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sk-pn { font-weight: 600; font-size: 0.8125rem; line-height: 1.3; }
.sk-ps { font-size: 0.6875rem; color: var(--muted); line-height: 1.3; }
.sk-row.is-sel .sk-pn { color: var(--ink); }
.sk-v { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); }
.sk-cc { white-space: nowrap; }
.sk-bar { display: inline-block; width: 44px; height: 8px; margin-right: 6px; border-radius: 0; background: var(--hover); vertical-align: middle; position: relative; box-shadow: inset 0 0 0 1px var(--rule); }
.sk-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0; background: var(--sk-bar); }
.sk-row.is-sel .sk-bar i { background: var(--sk-sel); }
.sk-ne { display: block; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--accent-ink); }
.sk-tl { width: 1%; text-align: center; }
.sk-tl a { display: inline-block; padding: 4px 4px; color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.sk-tl a:hover { color: var(--ink); }

/* tooltip keys (the tooltip lives outside .sk) */
.tip .tk i.sk-k-truth { width: 7px; height: 7px; background: var(--tip-fg); }
.tip .tk i.sk-k-sel { width: 12px; height: 0; border-radius: 0; border-top: 2px solid var(--tip-web); }

@container (max-width: 900px) {
  .sk-layout { grid-template-columns: minmax(0, 1fr); }
  .sk-side { order: -1; }
}
@container (max-width: 560px) {
  .sk-card { padding: 12px; }
  .sk-grid { grid-template-columns: minmax(0, 1fr); }
}

/* in a task page's frame the chart card opens on the case score (no title row: the bar names the attempt) */
.embed .sk-sum { margin-top: 0; }
