/* SPDX-FileCopyrightText: 2026 Projex Labs
 * SPDX-License-Identifier: LicenseRef-ProjexLabs-Proprietary
 *
 * Charter Studio styles. Every color derives from the house tokens in index.html - the studio
 * follows the app's light/dark themes rather than bringing its own chrome. The only new hues are
 * the five write-discipline colors and the three-valued simulate states, defined here as tokens so
 * both themes tune them in one place.
 */

:root {
  --d-once:#4A7DC9; --d-mono:#3D9BAA; --d-slot:#3E9C77; --d-computed:#8B67C9; --d-narrative:#767F84;
  --n-crit:#C97E4A; --n-exit:#4E9A6B; --n-fail:#C2564B; --n-band:#C9A227;
  --sim-unknown:#8B67C9;
  --studio-grid:color-mix(in srgb, var(--text) 6%, transparent);
}
:root[data-theme="dark"], :root[data-theme="dark"] * { --studio-grid:color-mix(in srgb, var(--text) 9%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --studio-grid:color-mix(in srgb, var(--text) 9%, transparent); }
  :root:not([data-theme="light"]) {
    --d-once:#6B9BE0; --d-mono:#57B6C5; --d-slot:#54B78F; --d-computed:#A98BE0; --d-narrative:#8A939A;
    --n-crit:#DD9964; --n-exit:#63B382; --n-fail:#D4776C; --n-band:#DDBB48;
    --sim-unknown:#A98BE0;
  }
}
:root[data-theme="dark"] {
  --d-once:#6B9BE0; --d-mono:#57B6C5; --d-slot:#54B78F; --d-computed:#A98BE0; --d-narrative:#8A939A;
  --n-crit:#DD9964; --n-exit:#63B382; --n-fail:#D4776C; --n-band:#DDBB48;
  --sim-unknown:#A98BE0;
}

/* ── library ───────────────────────────────────────────────────────────────────────────────── */
/* The unsaved draft that survived a reload (#1404). Deliberately the loudest thing on the page:
 * it is unregistered work the author did not choose to leave, so it must be impossible to miss - 
 * but it stays a strip rather than a modal, because it must never block reading the library. */
.st-resume { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px;
  padding:10px 12px; border-radius:var(--radius);
  border:1px solid color-mix(in srgb, var(--n-band) 55%, var(--border));
  background:color-mix(in srgb, var(--n-band) 10%, var(--surface)); }
.st-resume .spacer { flex:1; }
.st-lib-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.st-lib-head .spacer { flex:1; }
.st-tagrow { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin:2px 0 12px; }
.st-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:12px; }
.st-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:14px 15px 12px; }
.st-card h3 { margin:0 0 2px; font-size:14.5px; }
.st-card .meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:6px 0 8px; }
.st-card .foot { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.st-vchip { font-size:11px; font-weight:700; color:var(--accent); border:1px solid var(--accent-line);
  background:var(--accent-soft); padding:1px 8px; border-radius:10px; }
.st-digest { font-family:var(--mono); font-size:10.5px; color:var(--link);
  background:color-mix(in srgb, var(--link) 8%, transparent);
  border:1px solid color-mix(in srgb, var(--link) 30%, transparent);
  padding:2px 8px; border-radius:6px; overflow-wrap:anywhere; }
.st-lineage { display:flex; align-items:center; margin-top:8px; }
.st-ldot { width:9px; height:9px; border-radius:50%; background:var(--faint); position:relative; }
.st-ldot.cur { background:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.st-lseg { width:26px; height:1.5px; background:var(--border); }
.st-lv { font-size:9px; color:var(--faint); position:absolute; top:12px; left:50%; transform:translateX(-50%); white-space:nowrap; }
.st-drop { border:1.5px dashed var(--border); border-radius:var(--radius); padding:14px;
  text-align:center; color:var(--faint); font-size:12px; margin-top:14px; }
.st-drop.hover { border-color:var(--accent); background:var(--accent-soft); }

/* ── editor frame ──────────────────────────────────────────────────────────────────────────── */
/* TWO columns, not three. The inspector is an OVERLAY (below), so the canvas keeps the full
   width whether or not a node is selected - the editor does not reflow every time you click a
   node, and nothing reading a diagram jumps sideways under the cursor. */
.st-editor { display:grid; grid-template-columns:200px minmax(0,1fr); gap:12px; align-items:start;
  position:relative; }
@media (max-width: 1100px) { .st-editor { grid-template-columns:1fr; } }
.st-topbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.st-topbar .f.inline { width:170px; }
.st-topbar .spacer { flex:1; }
.st-lens { display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.st-lens button { background:var(--surface); border:0; color:var(--dim); padding:5px 12px;
  font:600 11.5px system-ui; cursor:pointer; border-right:1px solid var(--border); }
.st-lens button:last-child { border-right:0; }
.st-lens button.on { background:var(--accent-soft); color:var(--accent); }

/* left rail: palette + authored order */
.st-rail { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:11px; }
.st-rail h4 { font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); margin:12px 0 7px; }
.st-rail h4:first-child { margin-top:0; }
.st-pal { display:flex; flex-direction:column; gap:4px; }
.st-palrow { display:flex; align-items:center; gap:4px; }
.st-palrow > button:first-child { flex:1; }
.st-pal button[data-st-add] { display:flex; align-items:center; gap:8px; padding:5px 8px; border:1px solid var(--border);
  border-radius:7px; background:var(--surface2); cursor:pointer; font:600 12px system-ui; color:var(--text); text-align:left; }
.st-pal button[data-st-add]:hover { border-color:var(--accent-line); }
.st-sw { width:10px; height:10px; border-radius:3px; flex:none; }
.st-outline { display:flex; flex-direction:column; gap:1px; }
.st-o { display:flex; align-items:center; gap:7px; padding:4px 6px; border-radius:6px; color:var(--dim);
  font-size:12px; cursor:grab; border:1px solid transparent; }
.st-o:hover { background:var(--surface2); }
.st-o.sel { background:var(--accent-soft); color:var(--text); }
.st-o.dragging { opacity:.4; }
.st-o .grip { color:var(--faint); cursor:grab; }
.st-o .dot { width:7px; height:7px; border-radius:2px; flex:none; }
.st-o .nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.st-ordernote { margin-top:10px; font-size:10.5px; color:var(--faint); line-height:1.5;
  border-left:2px solid var(--accent); padding-left:8px; }
/* One section per kind. The section boundary IS the reorder boundary - a drag only moves an item
   within its own slice - so making the kinds visible makes that rule visible too, instead of
   leaving a refused cross-kind drop looking like a bug. */
.st-railsec { margin-top:11px; }
.st-railsec:first-of-type { margin-top:0; }
/* The header is a BUTTON: sections start collapsed and this is the toggle. Styled like the
   old h5 heading so a fully-expanded rail looks the way it always did. */
.st-railhead { display:flex; align-items:center; gap:6px; margin:0 0 4px; padding:2px 0; width:100%;
  border:0; background:none; cursor:pointer; text-align:left;
  font:700 9.5px system-ui; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); }
.st-railhead:hover { color:var(--dim); }
.st-railhead .chev { width:10px; flex:none; color:var(--dim); }
.st-railhead .sw { width:7px; height:7px; border-radius:2px; flex:none; }
.st-railhead .n { margin-left:auto; color:var(--dim); font-weight:600; letter-spacing:0; }
.st-railsec.closed { margin-top:7px; }
/* Label-primary rows: the human name leads, the slug renders underneath as the identity it
   still is. Unlabeled nodes emit no .slug line and look exactly as before. */
.st-o .nmwrap { display:flex; flex-direction:column; min-width:0; }
.st-o .slug { font-family:var(--mono); font-size:9.5px; color:var(--faint);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── problems: the editor's FOOTER ──────────────────────────────────────────────────────────
   Full width, at the end of the editor, in NORMAL FLOW - sized to show five rows and scroll
   past that. It was sticky and column-width first, and Lophie's read was right on both counts:
   a panel that follows the scroll competes with the canvas it is reporting on, and one the
   width of a single grid column reads as belonging to the canvas rather than to the charter.
   A footer sits where footers sit; you visit it when you want it. */
.st-probpanel { margin-top:12px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  overflow:hidden; }
.st-probhead { display:flex; align-items:center; gap:8px; padding:7px 11px;
  border-bottom:1px solid var(--border); font:700 9.5px system-ui; letter-spacing:.08em;
  text-transform:uppercase; color:var(--faint); }
.st-probhead .counts { margin-left:auto; letter-spacing:0; text-transform:none; font-weight:600; }
.st-probhead .counts .e { color:var(--crit); }
.st-probhead .counts .w { color:var(--warn); }
.st-probhead .counts .ok { color:var(--ok); }
/* Five rows, then scroll. Rows wrap, so the cap is generous enough for a two-line row without
   letting five long ones take the screen. */
.st-problist { max-height:150px; overflow-y:auto; padding:6px 8px; }
.st-problist .st-prob { width:100%; text-align:left; background:none; border:0; cursor:pointer;
  padding:4px 6px; border-radius:6px; }
.st-problist .st-prob:hover { background:var(--surface2); }
.st-problist .st-prob.nojump { cursor:default; }
.st-problist .st-prob.nojump:hover { background:none; }
.st-probempty { padding:9px 11px; font-size:12px; color:var(--faint); }

/* canvas */
.st-canvas-wrap { position:relative; overflow:auto; border:1px solid var(--border); border-radius:var(--radius);
  background:radial-gradient(var(--studio-grid) 1px, transparent 1px) 0 0/20px 20px, var(--inset); }
.st-canvas { position:relative; min-width:940px; }
.st-canvas svg { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.st-lane-h { position:absolute; top:8px; font-size:9.5px; font-weight:700; letter-spacing:.1em; color:var(--faint); }
.st-lane-bg { position:absolute; top:0; bottom:0; border-left:1px dashed var(--border); }

.st-node { position:absolute; width:220px; background:var(--surface); border:1px solid var(--border);
  border-radius:9px; padding:7px 9px 6px; box-shadow:0 1px 4px rgba(0,0,0,.10); cursor:pointer; user-select:none; }
.st-node .head { display:flex; align-items:center; gap:6px; }
.st-node .ic { width:18px; height:18px; border-radius:5px; display:flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:800; color:#fff; flex:none; }
.st-node .nm { font-weight:700; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.st-node .slugtxt { font-family:var(--mono); font-size:9px; color:var(--faint);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:none; max-width:38%; }
.st-node .kind { font-size:9.5px; color:var(--dim); margin-left:auto; font-weight:600; flex:none; }
.st-node .sub { font-size:10px; color:var(--faint); margin-top:3px; line-height:1.35; }
.st-node .grip { position:absolute; left:2px; top:50%; transform:translateY(-50%); color:var(--faint);
  cursor:grab; font-size:11px; padding:2px; }
.st-node.dragging { opacity:.5; z-index:3; }
.st-node.sel { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft), 0 1px 6px rgba(0,0,0,.12); }
.st-node[data-top="once"] { border-top:2px solid var(--d-once); }      .st-node[data-top="once"] .ic { background:var(--d-once); }
.st-node[data-top="mono"] { border-top:2px solid var(--d-mono); }      .st-node[data-top="mono"] .ic { background:var(--d-mono); }
.st-node[data-top="slot"] { border-top:2px solid var(--d-slot); }      .st-node[data-top="slot"] .ic { background:var(--d-slot); }
.st-node[data-top="computed"] { border-top:2px solid var(--d-computed); } .st-node[data-top="computed"] .ic { background:var(--d-computed); }
.st-node[data-top="narrative"] { border-top:2px solid var(--d-narrative); } .st-node[data-top="narrative"] .ic { background:var(--d-narrative); }
.st-node[data-top="crit"] { border-top:2px solid var(--n-crit); }      .st-node[data-top="crit"] .ic { background:var(--n-crit); }
.st-node[data-top="exit"] { border-top:2px solid var(--n-exit); }      .st-node[data-top="exit"] .ic { background:var(--n-exit); }
.st-node[data-top="fail"] { border-top:2px solid var(--n-fail); }      .st-node[data-top="fail"] .ic { background:var(--n-fail); }
.st-node[data-top="band"] { border-top:2px solid var(--n-band); }      .st-node[data-top="band"] .ic { background:var(--n-band); }
.st-badges { display:flex; gap:4px; margin-top:5px; flex-wrap:wrap; }
.st-bdg { font-size:8.5px; font-weight:700; padding:1px 6px; border-radius:7px; border:1px solid var(--border); color:var(--dim); }
.st-bdg.ok { color:var(--ok); border-color:var(--ok-line); }
.st-bdg.acc { color:var(--accent); border-color:var(--accent-line); }
.st-warnb { position:absolute; top:-7px; right:-7px; background:var(--warn); color:#fff; font-size:10px;
  font-weight:800; width:16px; height:16px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; cursor:help; }

path.st-edge { fill:none; stroke-width:1.6; }
path.st-e-grade { stroke:var(--n-crit); stroke-opacity:.4; }
path.st-e-derive { stroke:var(--d-computed); stroke-opacity:.6; stroke-dasharray:5 4; }
path.st-e-gather { stroke:var(--n-exit); stroke-opacity:.4; }
path.st-e-fail { stroke:var(--n-fail); stroke-opacity:.5; }
path.st-e-band { stroke:var(--n-band); stroke-opacity:.55; }
path.st-e-live { stroke:var(--sim-unknown); stroke-opacity:.85; stroke-dasharray:6 5; animation:st-flow 1.1s linear infinite; }
@media (prefers-reduced-motion: reduce) { path.st-e-live { animation:none; } }
@keyframes st-flow { to { stroke-dashoffset:-11; } }

/* simulate states */
.st-node.sim-written { border-color:var(--ok-line); box-shadow:0 0 0 2px var(--ok-bg); }
.st-node.sim-unknown { border-color:color-mix(in srgb, var(--sim-unknown) 55%, transparent);
  box-shadow:0 0 0 2px color-mix(in srgb, var(--sim-unknown) 18%, transparent);
  background:repeating-linear-gradient(135deg, var(--surface) 0 9px,
    color-mix(in srgb, var(--sim-unknown) 7%, var(--surface)) 9px 18px); }
.st-node.sim-unwritten { opacity:.45; }
.st-node.sim-blocked { border-color:color-mix(in srgb, var(--sim-unknown) 55%, transparent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--sim-unknown) 22%, transparent); }
.st-stt { font-size:9.5px; font-weight:800; margin-top:5px; letter-spacing:.04em; }
.st-stt.w { color:var(--ok); } .st-stt.u { color:var(--sim-unknown); } .st-stt.n { color:var(--faint); }
.st-simstrip { display:flex; gap:12px; flex-wrap:wrap; padding:9px 12px; background:var(--surface);
  border:1px solid var(--border); border-radius:9px; margin-bottom:10px; }
.st-simf { display:flex; align-items:center; gap:6px; font:600 11.5px system-ui; color:var(--text); }
.st-tri { display:flex; border:1px solid var(--border); border-radius:6px; overflow:hidden; }
.st-tri button { padding:2px 8px; font:600 10px system-ui; color:var(--faint); background:var(--surface);
  border:0; border-right:1px solid var(--border); cursor:pointer; }
.st-tri button:last-child { border-right:0; }
.st-tri button.w.on { background:var(--ok-bg); color:var(--ok); }
.st-tri button.u.on { background:color-mix(in srgb, var(--sim-unknown) 15%, transparent); color:var(--sim-unknown); }
.st-tri button.n.on { background:var(--surface2); color:var(--dim); }
.st-simlaw { margin-top:10px; padding:9px 13px; border-left:3px solid var(--sim-unknown);
  background:color-mix(in srgb, var(--sim-unknown) 8%, transparent); border-radius:0 8px 8px 0;
  font-size:12px; color:var(--text); max-width:620px; }

/* inspector */
/* The inspector floats OVER the canvas, right-aligned, and only while a node is selected.
   Editing a node is a brief, focused act - giving it a permanent 300px column charged the canvas
   for a panel that is empty most of the time. Absolute rather than fixed so it scrolls with the
   editor and stays inside the card it belongs to. */
.st-insp { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:12px; overflow-y:auto;
  position:absolute; top:0; right:0; width:300px; max-height:calc(100vh - 90px);
  z-index:20; box-shadow:var(--shadow);
  transform:translateX(calc(100% + 16px)); opacity:0; pointer-events:none;
  transition:transform .16s ease, opacity .16s ease; }
.st-insp.open { transform:none; opacity:1; pointer-events:auto; }
@media (prefers-reduced-motion: reduce) { .st-insp { transition:none; } }
/* Narrow: there is no room to float beside anything, so it becomes a normal block again. */
@media (max-width: 1100px) {
  .st-insp { position:static; width:auto; transform:none; opacity:1; pointer-events:auto;
             box-shadow:none; max-height:none; display:none; }
  .st-insp.open { display:block; }
}
.st-insp .head .x { margin-left:auto; background:none; border:0; color:var(--faint);
  font-size:15px; line-height:1; cursor:pointer; padding:2px 6px; border-radius:6px; }
.st-insp .head .x:hover { background:var(--surface2); color:var(--text); }
.st-insp .head { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.st-insp .head .ic { width:22px; height:22px; border-radius:6px; display:flex; align-items:center;
  justify-content:center; font-weight:800; font-size:11px; color:#fff; }
.st-insp .head .nm { font-weight:700; font-size:13.5px; overflow-wrap:anywhere; }
.st-insp .head .slug { font-family:var(--mono); font-size:10px; color:var(--faint); overflow-wrap:anywhere; }
.st-grp { margin-bottom:14px; }
.st-grp > label.h { display:block; font-size:10px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--faint); margin-bottom:6px; }
.st-seg { display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.st-seg button { flex:1; text-align:center; padding:5px 2px; font:700 9.5px system-ui; color:var(--faint);
  cursor:pointer; border:0; border-right:1px solid var(--border); background:var(--surface); }
.st-seg button:last-child { border-right:0; }
.st-seg button.on { color:#fff; }
.st-seg button.on[data-v="once"] { background:var(--d-once); }
.st-seg button.on[data-v="mono"] { background:var(--d-mono); }
.st-seg button.on[data-v="slot"] { background:var(--d-slot); }
.st-seg button.on[data-v="computed"] { background:var(--d-computed); }
.st-seg button.on[data-v="narrative"] { background:var(--d-narrative); }
.st-hint { font-size:10.5px; color:var(--faint); margin-top:5px; line-height:1.45; }
.st-tgl { display:flex; justify-content:space-between; align-items:center; padding:5px 0; font:600 12px system-ui; color:var(--text); }
.st-reflist { display:flex; flex-direction:column; gap:4px; }
.st-ref { display:flex; align-items:center; gap:7px; border:1px solid var(--border); border-radius:7px;
  padding:4px 8px; font:600 11.5px system-ui; color:var(--text); }
.st-ref .dot { width:8px; height:8px; border-radius:2px; flex:none; }
.st-ref .x { margin-left:auto; color:var(--faint); cursor:pointer; background:none; border:0; font-size:12px; }
.st-ref .x:hover { color:var(--crit); }
.st-kindpick { display:flex; flex-direction:column; gap:8px; }
.st-kindgrp .q { font-size:10.5px; font-weight:700; color:var(--dim); margin-bottom:4px; }
.st-kindgrp .ks { display:flex; flex-wrap:wrap; gap:4px; }
.st-kind { font:600 10.5px var(--mono); padding:2px 8px; border-radius:7px; border:1px solid var(--border);
  background:var(--surface2); color:var(--dim); cursor:pointer; }
.st-kind.on { border-color:var(--n-crit); color:var(--n-crit);
  background:color-mix(in srgb, var(--n-crit) 10%, transparent); }
.st-kv { display:grid; grid-template-columns:1fr 1fr 24px; gap:4px; margin-bottom:4px; }
.st-conseq { border:1px solid var(--border); border-radius:8px; padding:8px 10px; font-size:11px; color:var(--dim); }
.st-conseq .row { display:flex; align-items:center; gap:5px; padding:2px 0; flex-wrap:wrap; }
.st-danger { border-top:1px solid var(--border); margin-top:14px; padding-top:10px; }

/* problems + diff */
.st-problems { display:flex; flex-direction:column; gap:5px; margin-top:10px; }
.st-prob { display:flex; gap:7px; font-size:11.5px; align-items:baseline; color:var(--text); }
.st-prob .sev { font-weight:800; font-size:9.5px; padding:1px 6px; border-radius:6px; flex:none; }
.st-prob .sev.err { color:var(--crit); background:var(--crit-bg); }
.st-prob .sev.warn { color:var(--warn); background:var(--warn-bg); }
.st-node.added { box-shadow:0 0 0 3px var(--ok-bg), 0 0 14px var(--ok-bg); }
.st-node.removedghost { opacity:.5; border-style:dashed; border-color:var(--crit-line); }
.st-node.changedd { box-shadow:0 0 0 3px var(--warn-bg); }
.st-dtag { position:absolute; top:-8px; left:8px; font-size:8.5px; font-weight:800; padding:1px 7px; border-radius:7px; }
.st-dtag.a { color:var(--ok); background:var(--ok-bg); border:1px solid var(--ok-line); }
.st-dtag.c { color:var(--warn); background:var(--warn-bg); border:1px solid var(--warn-line); }
.st-dtag.r { color:var(--crit); background:var(--crit-bg); border:1px solid var(--crit-line); }
.st-difflist { display:flex; flex-direction:column; gap:7px; }
.st-diffi { display:flex; gap:8px; font-size:12px; align-items:baseline; }
.st-diffi .k { font-weight:800; font-size:10px; padding:1px 7px; border-radius:7px; flex:none; }
.st-diffi .k.a { color:var(--ok); background:var(--ok-bg); }
.st-diffi .k.c { color:var(--warn); background:var(--warn-bg); }
.st-diffi .k.r { color:var(--crit); background:var(--crit-bg); }
.st-diffi .k.o { color:var(--link); background:color-mix(in srgb, var(--link) 12%, transparent); }

/* packs */
.st-pk-stack { display:flex; gap:3px; margin:8px 0; }
.st-pk-doc { width:30px; height:38px; border:1px solid var(--border); border-radius:4px; background:var(--surface2); position:relative; }
.st-pk-doc::before { content:""; position:absolute; inset:6px 5px auto; height:2px; background:var(--border);
  box-shadow:0 4px 0 var(--border), 0 8px 0 var(--border); }
.st-seal { display:inline-flex; align-items:center; gap:5px; font-family:var(--mono); font-size:10px;
  color:var(--link); background:color-mix(in srgb, var(--link) 8%, transparent);
  border:1px solid color-mix(in srgb, var(--link) 30%, transparent); padding:2px 8px; border-radius:6px; }
.st-seal::before { content:"◈"; color:var(--accent); }
.st-honest { font-size:10.5px; color:var(--warn); border:1px solid var(--warn-line);
  background:var(--warn-bg); border-radius:7px; padding:6px 10px; line-height:1.5; margin-top:8px; }

/* #1397 - the opening instruction bar and the alias suggester */
.st-instr { margin:10px 0 4px; }
.st-instr label.h { display:block; font-size:10px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--faint); margin-bottom:4px; }
.st-instr textarea.f { width:100%; resize:vertical; min-height:44px; }
.st-alsug { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.st-alsug .st-ref { cursor:pointer; border-style:dashed; }
.st-alsug .st-ref:hover { border-color:var(--accent-line); color:var(--text); }

/* ── pack uploads (#2189) ─────────────────────────────────────────────────────────────────────
 * The card carries one bar and one sentence, both reading the same pair of counts the platform
 * reported, plus the five steps with the one it is at marked. The steps stay visible in every
 * state: where a file stopped is what tells a reader whether it is theirs to fix. */
.st-drop { display:flex; align-items:center; gap:14px; padding:16px 18px; cursor:pointer; text-align:left;
  border:1.5px dashed color-mix(in srgb, var(--border) 80%, var(--text)); border-radius:var(--radius);
  background:var(--surface); }
.st-drop:hover, .st-drop.over { border-color:var(--accent-line); background:var(--accent-soft); }
.st-drop .st-drop-ic { font-size:22px; color:var(--accent); line-height:1; }
.st-drop .st-drop-t { flex:1; display:flex; flex-direction:column; gap:2px; }
.st-drop .st-drop-t .note { line-height:1.45; }
/* The chip is a span inside the label, not a button: the whole zone is the control, and a real
 * button inside a label would swallow the click that opens the file picker. */
.st-drop .small { border:1px solid var(--border); border-radius:8px; padding:6px 11px;
  background:var(--surface2); font-size:12px; font-weight:600; white-space:nowrap; }
.st-drop:hover .small, .st-drop.over .small { border-color:var(--accent-line); color:var(--accent); }

.st-up { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:13px 15px; margin-bottom:10px; display:flex; flex-direction:column; gap:9px; }
.st-up.bad { border-color:var(--crit-line); }
.st-up.warn { border-color:var(--warn-line); }
.st-up.busy { border-color:var(--accent-line); }
.st-up-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.st-up-head .spacer { flex:1; }
.st-up-bar { display:flex; align-items:center; gap:10px; }
.st-up-bar .num { font-size:12.5px; font-weight:600; min-width:42px; text-align:right; }
.st-up-say { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.st-up-say > div:first-child { flex:1; min-width:240px; }
.st-up .foot { display:flex; gap:8px; flex-wrap:wrap; }

.st-steps { list-style:none; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  margin:0; padding:0; font-size:12px; color:var(--faint); }
.st-steps li { display:flex; align-items:center; gap:6px; }
.st-steps li.on { color:var(--text); font-weight:600; }
.st-steps .tick { width:18px; height:18px; border-radius:50%; display:grid; place-items:center;
  font-size:10.5px; box-sizing:border-box; border:1.5px solid var(--border); color:var(--faint);
  background:var(--inset); font-weight:600; }
.st-steps .tick.ok { background:var(--ok); border-color:var(--ok); color:#fff; }
.st-steps .tick.now { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); }
.st-steps .tick.no { background:var(--crit); border-color:var(--crit); color:#fff; }
