/* Steam tables — on top of calc.css (light only, like the rest of the site) */
main.st .tabs { grid-template-columns: repeat(3, 1fr); }
main.st .stage-bar { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
main.st .stage-bar .hist { margin-left: auto; }
#view { display: block; width: 100%; height: auto; user-select: none; touch-action: none; }
#view .hit { fill: transparent; stroke: none; }
#view .handle { cursor: grab; }
#view.dragging .handle { cursor: grabbing; }
#view .handle .knob { fill: var(--surface); stroke: var(--sel); stroke-width: 1.8; }
#view .handle:hover .knob, #view .handle:focus .knob { fill: var(--sel); }

/* the chart */
.st-grid { fill: var(--fill-2); }
.st-frame { fill: none; stroke: var(--steel-350); stroke-width: .8; pointer-events: none; }
.st-wet { fill: var(--steel-50); stroke: none; }
.st-sat { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.st-p { fill: none; stroke: var(--x-7f9fc4, #7f9fc4); stroke-width: .9; }
.st-p.major { stroke-width: 1.1; }
.st-x { fill: none; stroke: var(--x-9aa7a0, #9aa7a0); stroke-width: .7; stroke-dasharray: 1.5 3; }
.st-t { fill: none; stroke: var(--x-c9a46b, #c9a46b); stroke-width: .8; stroke-dasharray: 5 3; }
.st-pl, .st-xl, .st-tl { font-size: 10.5px; font-weight: 500; paint-order: stroke; stroke: var(--halo); stroke-width: 3px; stroke-linejoin: round; }
.st-pl { fill: var(--x-3d6491, #3d6491); }
.st-xl { fill: var(--x-56645c, #56645c); }
.st-tl { fill: var(--x-85612a, #85612a); }
.st-cp { fill: var(--ink); }
.st-cpl { font-size: 10.5px; fill: var(--text-3); paint-order: stroke; stroke: var(--halo); stroke-width: 3px; }
.st-tick { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.st-axt { font-size: 11px; font-weight: 500; fill: var(--text-2); }
.st-proc { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.st-proc.sel { stroke-width: 3.4; }
.st-iso { fill: none; stroke-width: 1; stroke-dasharray: 3 3; }
.st-2s { fill: var(--surface); stroke-width: 1.3; }
.st-pt { fill: var(--text); stroke: var(--halo); stroke-width: 1.5; }
.st-pt.sel { fill: var(--sel); }
.st-badge { cursor: pointer; }
.st-badge rect { fill: var(--surface); stroke: var(--steel-400); stroke-width: 1; }
.st-badge text { font-size: 11px; font-weight: 600; fill: var(--text); font-variant-numeric: tabular-nums; }
.st-badge.sel rect { stroke: var(--sel); stroke-width: 1.5; }
.st-badge.sel text { fill: var(--sel); }
.st-badge:hover rect, .st-badge:focus rect { stroke: var(--sel); }
.st-badge:focus { outline: none; }

/* live strip and flags */
.st-live { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-height: 38px; align-items: center; }
.st-live b { font-weight: 500; color: var(--text-3); margin-right: 5px; }
.st-lname { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.st-flags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.st-flags span { font-size: 11.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.st-flags span.st-err { color: var(--bad-ink, #b0321f); border-color: color-mix(in srgb, var(--bad) 35%, transparent); white-space: normal; }
.st-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; border: 1px solid var(--steel-400); border-radius: 9px; font-size: 11px; font-weight: 600; line-height: 1; color: var(--text); margin-right: 6px; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.st-phase { font-size: 11.5px; color: var(--text-3); }

/* panel */
.st-seg { margin-bottom: 6px; }
.st-lab { font-size: 12px; color: var(--text-3); margin: 8px 0 4px; }
.f.st-pair > label { display: block; }
.st-pair label select { width: 100%; max-width: 100%; font: inherit; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 4px; background: var(--surface); }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.st-chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.st-chip:hover { border-color: var(--text-3); color: var(--text); }
.st-chip:disabled { opacity: .5; cursor: default; }
.st-type { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.st-x { font-size: 11.5px; padding: 1px 8px; }
#panel .grp.sel { background: var(--sel-bg); border-radius: 8px; box-shadow: 0 0 0 6px var(--sel-bg); }
#panel .grp-h h3 { display: inline-flex; align-items: center; }
#panel .grp-h .aside { display: inline-flex; align-items: center; gap: 8px; }
#panel input.bad { color: var(--bad); }
#panel.fade-b { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent); }
#panel.fade-t { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px); mask-image: linear-gradient(to bottom, transparent, #000 28px); }
#panel.fade-t.fade-b { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 32px), transparent); }

/* summary */
.st-say { margin-top: 6px; font-size: 12.5px; color: var(--text-2); line-height: 1.4; max-width: 38ch; }

/* tables */
table.st-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.st-table th { font-size: 12px; font-weight: 500; color: var(--text-3); text-align: right; padding: 6px 8px; white-space: nowrap; }
table.st-table tr.u th { font-weight: 400; font-size: 11.5px; padding-top: 0; border-bottom: 1px solid var(--line); }
table.st-table td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.st-table .l { text-align: left; white-space: normal; }
table.st-table tr.sel td { background: var(--sel-bg); }
table.st-table tr[data-pick] { cursor: pointer; }
table.st-table tr.sub td { color: var(--text-2); }
.st-procs { margin-top: 14px; }
table.st-props td.k { text-align: left; color: var(--text-2); white-space: normal; }
table.st-props td.sym { text-align: left; color: var(--text-3); width: 1%; }
table.st-props td.uu { text-align: left; color: var(--text-3); width: 1%; padding-left: 4px; }
table.st-props th.l { text-align: left; }
table.st-props .uph { display: none; }
#checks td.note { white-space: normal; min-width: 200px; line-height: 1.4; }

@media (max-width: 760px) {
  #checks thead { display: none; }
  #checks, #checks tbody { display: block; width: 100%; }
  #checks tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  #checks td { display: block; border: 0; padding: 0; text-align: left; white-space: normal; }
  #checks td.chk { grid-column: 1; grid-row: 1; }
  #checks td:nth-child(5) { grid-column: 2; grid-row: 1; align-self: center; }
  #checks td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  #checks td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12.5px; text-align: right; }
  #checks td:nth-child(2)::before { content: "actual "; color: var(--text-3); }
  #checks td:nth-child(3)::before { content: "allowed "; color: var(--text-3); }
  #checks td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--text-3); min-width: 0; }
  /* states and processes: one card per row */
  #states thead, #procs thead { display: none; }
  #states, #states tbody, #procs, #procs tbody { display: block; width: 100%; }
  #states tr, #procs tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  #states td, #procs td { display: block; border: 0; padding: 0; text-align: left; font-size: 12.5px; white-space: normal; }
  #states td.l, #procs td.l { grid-column: 1 / -1; font-weight: 500; }
  #states td:nth-child(2)::before { content: "p "; color: var(--text-3); }
  #states td:nth-child(3)::before { content: "T "; color: var(--text-3); }
  #states td:nth-child(4)::before { content: "h "; color: var(--text-3); }
  #states td:nth-child(5)::before { content: "s "; color: var(--text-3); }
  #states td:nth-child(6)::before { content: "v "; color: var(--text-3); }
  #procs td:nth-child(2)::before { content: "w "; color: var(--text-3); }
  #procs td:nth-child(3)::before { content: "q "; color: var(--text-3); }
  #procs td:nth-child(4)::before { content: "power "; color: var(--text-3); }
  #procs td:nth-child(5) { grid-column: 1 / -1; }
  table.st-props td, table.st-props th { padding: 6px 4px; font-size: 12px; }
  table.st-props td.k { min-width: 0; }
  table.st-props td.sym, table.st-props td.uu, table.st-props th:nth-child(2), table.st-props th:last-child { display: none; }
  table.st-props .uph { display: inline; color: var(--text-3); }
  #states td:nth-child(7)::before { content: ""; }
}

/* theme-auto:start · generated by scripts/theme/hexmap.py: dark values (the rule of scripts/theme/colour.py) for
   colours that are not tokens, written as var(--x-rrggbb, #rrggbb): light is the fallback, unchanged */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --x-3d6491: #85a7cf; --x-56645c: #88958e; --x-6e7177: #85827f; --x-7f9fc4: #809ab8; --x-85612a: #c1a276;
    --x-9aa7a0: #555f5a; --x-c9a46b: #e0c192;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --x-3d6491: #85a7cf; --x-56645c: #88958e; --x-6e7177: #85827f; --x-7f9fc4: #809ab8; --x-85612a: #c1a276;
    --x-9aa7a0: #555f5a; --x-c9a46b: #e0c192;
  }
}
/* theme-auto:end */
