@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/hanken-grotesk.woff2?v=e9201eddf1d41d0b") format("woff2");
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2?v=a97804dc9fbe5fc9") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2?v=3c5a451f9ec27a35") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2?v=756026ff72eb76fd") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-600.woff2?v=c4d3deb734a27e6d") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-700.woff2?v=a51b6594bdda5d76") format("woff2");
}

/* castbot Slice 0 mock styles. Dark first; html.light swaps the tokens.
   No inline styles anywhere: every visual lives in this file (strict CSP). */
:root {
  --bg: #0d1214; --bg2: #11181b; --surf: #151d21; --raise: #1b252a; --hover: #212d33;
  --line: #27343b; --line2: #33434b;
  --tx: #e7eef0; --tx2: #a9b8be; --tx3: #7d8f97;
  --acc: #ff8f5a; --acc-ink: #2a1206; --acc-soft: rgba(255,143,90,.14); --acc-line: rgba(255,143,90,.45);
  --ok: #4ade9b; --ok-soft: rgba(74,222,155,.13);
  --run: #4ade9b; --start: #6cb6ff; --start-soft: rgba(108,182,255,.14);
  --pause: #9aa6ad; --pause-soft: rgba(154,166,173,.14);
  --err: #ff6b6b; --err-soft: rgba(255,107,107,.13); --danger: #e5484d; --danger-ink: #fff;
  --warn: #f2c14e;
  --con-bg: #080c0d; --con-tx: #cfe3d9;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --scrim: rgba(4,7,8,.62);
  --r: 12px; --r2: 16px;
  --ui: "Hanken Grotesk", "Figtree", system-ui, sans-serif;
  --hd: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}
html.light {
  --bg: #f6f4f1; --bg2: #efece7; --surf: #ffffff; --raise: #f3f0eb; --hover: #ebe6df;
  --line: #e2dcd3; --line2: #d3cbc0;
  --tx: #1b2226; --tx2: #4c5a61; --tx3: #6f7d84;
  --acc: #e8662a; --acc-ink: #fff; --acc-soft: rgba(232,102,42,.11); --acc-line: rgba(232,102,42,.45);
  --ok: #138a55; --ok-soft: rgba(19,138,85,.1); --run: #16a061;
  --start: #2b78c9; --start-soft: rgba(43,120,201,.1);
  --pause: #6d7a81; --pause-soft: rgba(109,122,129,.12);
  --err: #c93434; --err-soft: rgba(201,52,52,.09); --danger: #d13c41;
  --con-bg: #12191c; --con-tx: #cfe3d9;
  --shadow: 0 18px 50px rgba(60,40,20,.16);
  --scrim: rgba(30,24,18,.38);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--tx); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--hd); font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--tx2); }
.faint { color: var(--tx3); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--hd); font-size: 21px; letter-spacing: -.02em; }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand b { font-weight: 750; }
.brand span { font-weight: 400; color: var(--tx2); }
.mark .m-bg { fill: var(--acc); }
.mark .m-line { fill: none; stroke: var(--acc-ink); stroke-width: 2.4; stroke-linecap: round; }
.mark .m-dot { fill: var(--acc-ink); }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 284px minmax(0,1fr); min-height: 100vh; }
.app.with-pane { grid-template-columns: 284px minmax(0,1fr) 400px; }
/* The stage holds the chat and the panel. Its children stay grid items of .app. */
#stage { display: contents; }
.sb { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.sb-top { display: flex; align-items: center; gap: 8px; padding: 18px 16px 12px 18px; }
.sb-top .brand { flex: 1; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--tx2); }
.ibtn:hover { background: var(--hover); color: var(--tx); }
.ibtn.solid { background: var(--acc); color: var(--acc-ink); }
.ibtn.line { border-color: var(--line); }
.search { margin: 0 14px 10px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--surf); border: 1px solid var(--line); color: var(--tx3); font-size: 14px; }
.search kbd { margin-left: auto; font: 12px var(--mono); color: var(--tx3); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.sec { padding: 12px 10px 2px; }
.sec h4 { display: flex; align-items: center; gap: 6px; font: 700 11.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); padding: 0 10px 6px; }
.sec h4 .ibtn { width: 26px; height: 26px; margin-left: auto; }
.sec h4 form.fold { display: inline-flex; }
.sec h4 button.fold { width: 26px; height: 26px; border: 0; background: transparent; color: var(--tx3); display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0; }
.sec h4 button.fold:hover { background: var(--hover); color: var(--tx); }
.sec h4 button.fold .i { transform: rotate(90deg); }
.sec h4 button.fold.shut .i { transform: none; }
.group-intro { padding: 12px 20px 0; }
.group-intro .sub { margin: 0; color: var(--tx2); font-size: 14px; }
.group-pane form { display: grid; gap: 10px; }
.group-pane h3 { margin: 0; font: 650 16px var(--hd); }
.group-pane .selwrap { width: 100%; }
.ask { margin: 8px 0 0; color: var(--tx2); font-size: 14px; }
.ag { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; min-height: 48px; }
.ag:hover { background: var(--hover); }
.ag.on { background: var(--raise); box-shadow: inset 2px 0 0 var(--acc); }
.ag .who { min-width: 0; flex: 1; }
.ag .nm { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.ag .sub { font-size: 12.5px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag .sub.err { color: var(--err); }
.ag .sub.start { color: var(--start); }
.badge { font-size: 11.5px; font-weight: 750; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--line2); color: var(--tx); }
.badge.acc { background: var(--acc); color: var(--acc-ink); }
.badge.appr { background: var(--acc-soft); color: var(--acc); border: 1px solid var(--acc-line); gap: 3px; }
.sb-empty { margin: 8px 14px; padding: 18px 16px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--tx2); font-size: 13.5px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.sb-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); }
.acct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.acct:hover { background: var(--hover); }
.acct .nm { font-weight: 650; font-size: 14px; }
.acct .sub { font-size: 12px; color: var(--tx3); }

/* avatars */
.av { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font: 700 14px var(--hd); color: #10161a; flex: none; position: relative; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.av.xs { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.av.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
.av.c1 { background: #ffb38a; } .av.c2 { background: #8fd8c4; } .av.c3 { background: #c9b6ff; }
.av.c4 { background: #ffd57a; } .av.c5 { background: #9cc7ff; } .av.c6 { background: #f59fb8; } .av.c0 { background: #c8d3d8; }
.av.c7 { background: #a7e08a; } .av.c8 { background: #d9c9a3; } .av.c9 { background: #86dcf2; }
.av.me { border-radius: 50%; background: #3b4a52; color: #e7eef0; }
.av .dot { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--bg2); background: var(--pause); }
.dot.run { background: var(--run); } .dot.start { background: var(--start); } .dot.pause { background: var(--pause); } .dot.err { background: var(--err); }

/* ---------- status chip ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 650; white-space: nowrap; background: var(--raise); color: var(--tx2); border: 1px solid var(--line); }
.chip .pip { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.run { color: var(--run); background: var(--ok-soft); border-color: transparent; }
.chip.start { color: var(--start); background: var(--start-soft); border-color: transparent; }
.chip.pause { color: var(--pause); background: var(--pause-soft); border-color: transparent; }
.chip.err { color: var(--err); background: var(--err-soft); border-color: transparent; }
.chip.acc { color: var(--acc); background: var(--acc-soft); border-color: transparent; }
.chip .meta { color: var(--tx2); font-weight: 500; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); color: var(--tx); font-weight: 650; font-size: 14px; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.btn.danger-ghost { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); background: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn[disabled], .btn.dis { opacity: .42; cursor: not-allowed; }
.btn.wide { width: 100%; }
.link { color: var(--acc); font-weight: 650; }

/* ---------- main column / chat ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.ch-h { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--bg); min-height: 64px; }
.ch-h .back { display: none; }
.who-btn { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px 8px 4px 4px; border-radius: 10px; text-align: left; min-width: 0; }
.who-btn:hover { background: var(--hover); }
.who-btn .nm { font: 650 16px var(--hd); display: flex; align-items: center; gap: 6px; }
.who-btn .sub { font-size: 12.5px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); margin-left: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--tx2); }
.tabs a.on { background: var(--raise); color: var(--tx); box-shadow: 0 1px 0 var(--line2); }
.tabs a .badge { height: 18px; min-width: 18px; font-size: 11px; }
.ch-body { flex: 1; display: flex; flex-direction: column; }
.msgs { width: 100%; max-width: 780px; margin: 0 auto; padding: 24px 28px 8px; display: grid; gap: 16px; }
.day { text-align: center; font-size: 12px; color: var(--tx3); font-weight: 600; letter-spacing: .04em; }
.m-user { justify-self: end; max-width: 78%; background: var(--raise); border: 1px solid var(--line); padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.m-user .who { font-size: 12px; font-weight: 650; color: var(--tx2); margin-bottom: 2px; }
.m-agent { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 12px; align-items: start; }
.m-agent.pending:not(:has(.body > :not([hidden]):not(:empty):not(.act-slot))) { align-items: center; }
.m-agent .av { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
.m-agent .body { display: grid; gap: 10px; min-width: 0; }
.m-agent .who { font-size: 12px; font-weight: 650; color: var(--tx2); }
.m-agent .body p { line-height: 1.6; }
.m-agent ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.stamp { font-size: 12px; color: var(--tx3); }
.caret { display: inline-block; width: .5em; height: 1.1em; vertical-align: -.18em; background: var(--acc); border-radius: 2px; margin-left: 2px; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.streaming { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--acc); font-weight: 650; }
.streaming .bars { display: inline-flex; gap: 2px; }
.streaming .bars i { width: 3px; height: 10px; border-radius: 2px; background: currentColor; opacity: .85; }
.streaming .bars i:nth-child(2) { height: 14px; } .streaming .bars i:nth-child(3) { height: 7px; }

/* tool-call row */
.tool { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surf); font-size: 13.5px; min-width: 0; }
.tool .chev { color: var(--tx3); }
.tool .tic { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--raise); color: var(--tx2); flex: none; }
.tool .tn { font-family: var(--mono); font-weight: 600; font-size: 13px; white-space: nowrap; }
.tool .ta { color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; font-family: var(--mono); font-size: 12.5px; }
.tool .ts { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.tool .ts.ok { color: var(--ok); } .tool .ts.wait { color: var(--acc); } .tool .ts.err { color: var(--err); }
.tools { display: grid; gap: 6px; }

/* approval card */
.appr { border: 1px solid var(--acc-line); background: linear-gradient(180deg, var(--acc-soft), transparent 70%), var(--surf); border-radius: var(--r2); padding: 16px; display: grid; gap: 12px; }
.appr-h { display: flex; align-items: center; gap: 10px; }
.appr-h .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--acc-soft); color: var(--acc); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.appr-h h3 { font-size: 15.5px; }
.appr-h .stamp { margin-left: auto; white-space: nowrap; }
.cmd { font: 13px/1.6 var(--mono); background: var(--con-bg); color: var(--con-tx); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); overflow-x: auto; white-space: pre; }
.cmd .p { color: var(--acc); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13.5px; }
.kv dt { color: var(--tx3); }
.kv dd { margin: 0; min-width: 0; }
.appr-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.appr-f .btn { min-width: 110px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--tx2); min-height: 40px; cursor: pointer; }
.check .box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.check input:checked + .box { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.check .box .i { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.check input:checked + .box .i { opacity: 1; }
.appr.done { border-color: var(--line); background: var(--surf); }

/* banners */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surf); font-size: 14px; }
.banner .ico { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.banner.start { border-color: color-mix(in srgb, var(--start) 40%, transparent); background: var(--start-soft); }
.banner.start .ico { color: var(--start); }
.banner.pause { background: var(--pause-soft); }
.banner.pause .ico { color: var(--pause); }
.banner.err { border-color: color-mix(in srgb, var(--err) 45%, transparent); background: var(--err-soft); }
.banner.err .ico { color: var(--err); }
.banner.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.banner.ok .ico { color: var(--ok); }
.banner b { font-weight: 700; }
.banner .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* composer */
.comp-wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 8px 28px 22px; display: grid; gap: 8px; }
.pending-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--acc-soft); border: 1px solid var(--acc-line); font-size: 13.5px; font-weight: 600; }
.pending-bar[hidden] { display: none; }
.pending-bar .i { color: var(--acc); }
.comp { border: 1px solid var(--line2); background: var(--surf); border-radius: 16px; padding: 12px 12px 10px 16px; display: grid; gap: 8px; }
.comp .ph { color: var(--tx3); min-height: 24px; }
.comp .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.start-note { margin: 0 0 8px; font-size: 13px; line-height: 1.35; color: var(--tx2); }
.start-form { display: flex; justify-content: flex-end; }
.start-form .btn { min-height: 36px; }
.comp .row .hint { font-size: 12.5px; color: var(--tx3); margin-left: 4px; }
.comp .row .btn { margin-left: auto; }
.comp .send { margin-left: auto; width: 38px; height: 38px; border-radius: 11px; }
.btn.stop { height: 38px; gap: 6px; background: var(--raise); }
.btn.stop .sq { width: 10px; height: 10px; border-radius: 2px; background: currentColor; }

/* ---------- info pane ---------- */
.pane { border-left: 1px solid var(--line); background: var(--bg2); min-width: 0; display: flex; flex-direction: column; }
.pane-h { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--line); min-height: 64px; }
.pane-h .nm { font: 650 17px var(--hd); }
.pane-h .sub { font-size: 12.5px; color: var(--tx3); }
.grabber { display: none; }
.psec { padding: 16px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.psec:last-child { border-bottom: 0; }
.psec-h { display: flex; align-items: center; gap: 8px; }
.psec-h h4 { font: 700 11.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); }
.psec-h .link { margin-left: auto; font-size: 13px; }
.preview { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--con-bg); font: 11.5px/1.65 var(--mono); color: var(--con-tx); padding: 10px 12px; min-height: 118px; display: block; }
.preview .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .t { color: #6f8a80; }
.preview .open { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--ui); color: #e7eef0; background: rgba(255,255,255,.1); padding: 4px 8px; border-radius: 7px; }
.preview.paused { filter: saturate(.2); }
.preview.paused::after { content: ""; position: absolute; inset: 0; background: rgba(8,12,13,.8); }
.preview .ovl { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; font: 650 13.5px var(--ui); color: #e7eef0; }
.steps { display: grid; gap: 8px; padding: 2px 0; }
.step { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--tx2); }
.step .s { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--line2); flex: none; }
.step.done { color: var(--tx); } .step.done .s { background: var(--ok); border-color: var(--ok); color: #06210f; }
.step.done .s .i { width: 12px; height: 12px; stroke-width: 3; }
.step.now { color: var(--tx); font-weight: 650; } .step.now .s { border: 0; color: var(--start); }
.step .pct { margin-left: auto; font: 12px var(--mono); color: var(--start); }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--start); border-radius: 3px; }
.bar i.w62 { width: 62%; } .bar i.w40 { width: 40%; } .bar i.w18 { width: 18%; } .bar i.w41 { width: 41%; } .bar i.w75 { width: 75%; } .bar i.w100 { width: 100%; background: var(--ok); }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 13.5px; }
.meta-grid .k { font-size: 12px; color: var(--tx3); }
.meta-grid .v { font-weight: 600; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; font-size: 13.5px; min-height: 44px; }
.row-item:hover { background: var(--hover); }
.row-item .t1 { font-weight: 600; }
.row-item .t2 { font-size: 12.5px; color: var(--tx3); }
.row-item .side { margin-left: auto; font-size: 12.5px; color: var(--tx3); white-space: nowrap; }
.row-item .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--raise); color: var(--tx2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mem { font-size: 13.5px; color: var(--tx2); padding-left: 12px; border-left: 2px solid var(--line2); }
.model { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surf); }
.model .pv { width: 34px; height: 34px; border-radius: 9px; background: var(--raise); display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--mono); color: var(--tx2); flex: none; }
.model .t1 { font-weight: 650; font-size: 14px; }
.model .t2 { font-size: 12.5px; color: var(--tx3); }
.errbox { border: 1px solid color-mix(in srgb, var(--err) 45%, transparent); background: var(--err-soft); border-radius: 12px; padding: 12px; display: grid; gap: 6px; font-size: 13.5px; }
.errbox b { color: var(--err); }

/* ---------- generic page ---------- */
.page-h { display: flex; align-items: center; gap: 14px; padding: 22px 32px 16px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; }
.page-h .sub { color: var(--tx2); font-size: 14px; }
.page-h .right { margin-left: auto; display: flex; gap: 8px; }
.page-b { padding: 0 32px 32px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); }
.seg label, .seg a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--tx2); cursor: pointer; }
.seg input:checked + span { color: var(--tx); }
.seg label:has(input:checked), .seg a.on { background: var(--raise); color: var(--tx); box-shadow: 0 1px 0 var(--line2); }

/* routines list */
.rt-list { border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; background: var(--surf); }
.rt { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) 64px; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.rt:first-child { border-top: 0; }
.rt.head { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); background: var(--bg2); padding-top: 10px; padding-bottom: 10px; }
.rt .t1 { font-weight: 650; }
.rt .t2 { font-size: 12.5px; color: var(--tx3); display: flex; align-items: center; gap: 6px; }
.trig { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
.trig .tag { font: 700 10.5px var(--ui); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--raise); color: var(--tx2); border: 1px solid var(--line); }
.trig .tag.ev { color: var(--start); border-color: color-mix(in srgb, var(--start) 35%, transparent); background: var(--start-soft); }
.last { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.last.ok { color: var(--ok); } .last.err { color: var(--err); } .last.none { color: var(--tx3); }
.tog { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.tog .track { width: 40px; height: 24px; border-radius: 12px; background: var(--line2); position: relative; flex: none; }
.tog .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.tog input:checked + .track { background: var(--acc); }
.tog input:checked + .track::after { left: 19px; }
.tog .lbl { margin-left: 10px; font-size: 14px; }

/* sheet / drawer */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; z-index: 30; background: var(--bg2); border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px 24px; border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-size: 19px; flex: 1; }
.drawer-b { padding: 18px 24px; display: grid; gap: 16px; overflow: auto; flex: 1; align-content: start; }
.drawer-f { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.drawer-f .note { margin-right: auto; font-size: 12.5px; color: var(--tx3); }
.field { display: grid; gap: 6px; }
.field > .lab { font-size: 13px; font-weight: 650; color: var(--tx2); display: flex; align-items: center; gap: 6px; }
.field > .lab .opt { font-weight: 500; color: var(--tx3); }
.field .help { font-size: 12.5px; color: var(--tx3); }
.mpick { display: grid; gap: 14px; min-width: 0; }
.mpick .field, .mpick .selwrap, .mpick select.sel { min-width: 0; max-width: 100%; }
.inp { height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); padding: 0 12px; display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.inp input, .inp select { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; height: 100%; }
.inp.mono input { font-family: var(--mono); font-size: 14.5px; letter-spacing: .02em; }
.inp.focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.inp.bad { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.inp .suffix { color: var(--tx3); font-size: 13px; white-space: nowrap; }
.inp .ibtn { width: 32px; height: 32px; margin-right: -6px; }
select.sel { appearance: none; height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); padding: 0 36px 0 12px; width: 100%; }
.selwrap { position: relative; }
.selwrap .i { position: absolute; right: 12px; top: 13px; pointer-events: none; color: var(--tx3); }
textarea.ta { width: 100%; min-height: 92px; border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); padding: 10px 12px; resize: vertical; line-height: 1.5; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line2); font-size: 13.5px; font-weight: 600; color: var(--tx2); cursor: pointer; }
.pchip:has(input:checked) { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
.cron-prev { border-radius: 12px; background: var(--surf); border: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 8px; }
.cron-prev .say { font: 650 16px var(--hd); display: flex; align-items: center; gap: 8px; }
.cron-prev .say .i { color: var(--acc); }
.cron-prev .next { font-size: 12.5px; color: var(--tx3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cron-parts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; font: 11px var(--mono); color: var(--tx3); text-align: center; }
.radio-list { display: grid; gap: 8px; }
.ropt { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surf); cursor: pointer; min-height: 48px; }
.ropt .rd { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line2); flex: none; margin-top: 2px; }
.ropt:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); }
.ropt:has(input:checked) .rd { border: 5px solid var(--acc); }
.ropt .t1 { font-weight: 650; font-size: 14px; }
.ropt .t2 { font-size: 12.5px; color: var(--tx3); }
.ropt .side { margin-left: auto; text-align: right; font-size: 13px; white-space: nowrap; }
.ropt .side b { display: block; font-size: 14px; }
.copyrow { display: flex; gap: 8px; }
.copyrow .inp { flex: 1; }

/* new agent */
.na { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; padding: 0 32px 40px; align-items: start; }
.na-form { display: grid; gap: 18px; min-width: 0; }
.na-form .err { color: var(--err); font-size: 12.5px; }
.conn { display: grid; gap: 8px; min-width: 0; }
.conn label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.secret-in { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.appr.secret { grid-template-columns: minmax(0, 1fr); align-items: start; }
.appr.secret .field { min-width: 0; }
.appr.secret p { margin: 0; }
.appr.secret form { min-width: 0; }
.conn-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.conn-grid .card, .conn-card { min-width: 0; }
.conn-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.conn-acts form { display: inline-flex; margin: 0; }
.token-box { display: grid; gap: 8px; min-width: 0; position: relative; }
.token-have { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; }
.token-have .mono { min-width: 0; overflow-wrap: anywhere; }
.token-edit { display: none; min-width: 0; }
.token-toggle:checked ~ .token-have { display: none; }
.token-toggle:checked ~ .token-edit { display: block; }
.token-toggle:focus-visible + .token-have .link { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (min-width: 800px) {
  .conn-grid { grid-template-columns: 1fr 1fr; }
}
.toolrow { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 8px; align-items: center; min-width: 0; }
.toolrow label { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; }
.toolrow .selwrap { min-width: 0; }
.file input { max-width: 100%; }
.skip { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.card { background: var(--surf); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px 20px; display: grid; gap: 14px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; }
.card-h .num { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--mono); background: var(--acc-soft); color: var(--acc); flex: none; }
.card-h .num.done { background: var(--ok-soft); color: var(--ok); }
.card-h h3 { font-size: 16.5px; }
.card-h .side { margin-left: auto; font-size: 13px; color: var(--tx3); }
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.tpl { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; display: grid; gap: 6px; align-content: start; cursor: pointer; background: var(--bg2); min-height: 112px; }
.tpl:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc); }
.tpl .ti { width: 30px; height: 30px; border-radius: 8px; background: var(--raise); color: var(--tx2); display: inline-flex; align-items: center; justify-content: center; }
.tpl:has(input:checked) .ti { background: var(--acc); color: var(--acc-ink); }
.tpl .t1 { font-weight: 650; font-size: 14px; }
.tpl .t2 { font-size: 12.5px; color: var(--tx3); line-height: 1.4; }
.or { display: flex; align-items: center; gap: 10px; color: var(--tx3); font-size: 12.5px; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.secret { display: grid; grid-template-columns: minmax(0,200px) minmax(0,1fr) auto; gap: 8px; align-items: center; }
.secret .inp.mono input { letter-spacing: .12em; }
.okline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok); font-weight: 600; }
.size { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; display: grid; gap: 3px; cursor: pointer; background: var(--bg2); }
.size:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc); }
.size .t1 { font-weight: 700; }
.size .t2 { font-size: 12.5px; color: var(--tx3); }
.size .pr { font: 600 13px var(--mono); margin-top: 4px; }
.sum { position: sticky; top: 20px; background: var(--surf); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; display: grid; gap: 14px; }
.sum h3 { font-size: 16px; }
.sum .kv { font-size: 13.5px; }
.cost { border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); padding: 14px; display: grid; gap: 4px; }
.cost .big { font: 700 28px var(--hd); letter-spacing: -.02em; }
.cost .big small { font: 500 14px var(--ui); color: var(--tx2); }
.cost .ln { display: flex; justify-content: space-between; font-size: 13px; color: var(--tx2); }
.cost .ln b { color: var(--tx); font-weight: 650; font-family: var(--mono); font-size: 12.5px; }
.fineprint { font-size: 12px; color: var(--tx3); }
.mobile-cta { display: none; }

/* provisioning */
.prov { max-width: 620px; margin: 40px auto; padding: 0 24px; display: grid; gap: 18px; }
.prov .card { padding: 22px 24px; }
.prov h1 { font-size: 26px; }

/* computer tab */
.vm-bar { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.vm-bar .meta { display: flex; gap: 16px; font-size: 13px; color: var(--tx2); flex-wrap: wrap; }
.vm-bar .meta b { color: var(--tx); font-weight: 650; }
.vm-bar .ctl { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.vm-bar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.vm-wrap { padding: 18px 24px 28px; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; }
.con { background: var(--con-bg); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; min-width: 0; }
.con-h { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid #1d282c; color: #a9b8be; font-size: 13px; }
.con-h .seg { background: #0f1517; border-color: #1d282c; }
.con-h .seg a { height: 30px; font-size: 13px; color: #a9b8be; }
.con-h .seg a.on { background: #1b252a; color: #e7eef0; box-shadow: none; }
.con-h .live { display: inline-flex; align-items: center; gap: 6px; color: var(--run); font-weight: 650; margin-left: auto; }
.con-h .live.off { color: #9aa6ad; }
.con-b { padding: 12px 14px 14px; font: 12.5px/1.75 var(--mono); color: var(--con-tx); min-height: 420px; }
.con-b .l { display: flex; gap: 12px; white-space: pre-wrap; word-break: break-word; }
.con-b .ts { color: #5f7a70; flex: none; }
.con-b .lv { flex: none; width: 44px; font-weight: 600; }
.lv.info { color: #7fb8ff; } .lv.ok { color: #4ade9b; } .lv.warn { color: #f2c14e; } .lv.err { color: #ff7b7b; } .lv.sys { color: #c9b6ff; }
.con-b .prompt { color: #ff9a6a; }
.con-b .cur { display: inline-block; width: 8px; height: 15px; background: #cfe3d9; vertical-align: -3px; animation: blink 1s steps(2,start) infinite; }
.con-f { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid #1d282c; color: #7d8f97; font-size: 12.5px; }
.side-cards { display: grid; gap: 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 14px; white-space: nowrap; }
.toast .i { color: var(--ok); }

/* modal */
.modal { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 480px; max-width: calc(100vw - 24px); background: var(--bg2); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; }
.modal-h { display: flex; gap: 12px; align-items: flex-start; }
.modal-h .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--err-soft); color: var(--err); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.modal-h h2 { font-size: 19px; }
.modal ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--tx2); }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; }

/* first run */
.fr { max-width: 820px; margin: 0 auto; padding: 56px 32px 40px; display: grid; gap: 26px; }
.fr .hero { display: grid; gap: 12px; }
.fr .hero h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.03em; }
.fr .hero p { font-size: 17px; color: var(--tx2); max-width: 600px; }
.fr .art { width: 100%; height: 120px; }
.art .vm { fill: var(--surf); stroke: var(--line2); }
.art .vm-on { fill: var(--acc-soft); stroke: var(--acc); }
.art .w { stroke: var(--line2); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; }
.art .t { fill: var(--tx3); font: 600 11px var(--mono); }
.art .tl { fill: var(--acc); font: 700 11px var(--mono); }
.art .b { fill: var(--line2); }
.art .ba { fill: var(--acc); }
.checklist { display: grid; gap: 10px; }
.ck { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--surf); }
.ck .n { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 14px var(--mono); border: 1.5px solid var(--line2); color: var(--tx2); flex: none; }
.ck.done .n { background: var(--ok); color: #06210f; border-color: var(--ok); }
.ck.now { border-color: var(--acc-line); box-shadow: inset 0 0 0 1px var(--acc-line); }
.ck.now .n { border-color: var(--acc); color: var(--acc); }
.ck .t1 { font-weight: 700; font-size: 15.5px; }
.ck .t2 { font-size: 13.5px; color: var(--tx2); }
.ck .btn { margin-left: auto; }
.ck.later { opacity: .7; }
.empty-chat { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 40px 28px; }
.empty-chat h2 { font-size: 24px; }
.empty-chat p { color: var(--tx2); max-width: 460px; }
.sugs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 560px; width: 100%; margin-top: 6px; }
.sug { text-align: left; border: 1px solid var(--line); background: var(--surf); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--tx2); min-height: 44px; }
.sug b { display: block; color: var(--tx); font-size: 14px; margin-bottom: 2px; }

/* ======================= phone ======================= */
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .dt-only { display: none !important; }
  .app, .app.with-pane { display: block; min-height: 100vh; }
  .sb, .main, .pane { display: none; }
  .p-list .sb { display: flex; min-height: 100vh; border-right: 0; padding-bottom: 76px; }
  .p-chat .main, .p-main .main { display: flex; min-height: 100vh; }
  .p-pane .pane { display: flex; min-height: 100vh; border-left: 0; }
  .ibtn { width: 44px; height: 44px; }
  .btn { height: 44px; }
  .btn.sm { height: 44px; }
  .sb-top { position: sticky; top: 0; z-index: 5; background: var(--bg2); padding: 10px 10px 10px 16px; }
  .search { height: 44px; margin: 0 12px 8px; }
  .search kbd { display: none; }
  .ag { min-height: 60px; padding: 8px 10px; }
  .ag .av { width: 40px; height: 40px; }
  .sb-foot { display: none; }
  .p-main .main { padding-bottom: 76px; }
  .p-main.no-bnav .main { padding-bottom: 0; }

  .ch-h { position: sticky; top: 0; z-index: 5; padding: 6px 8px; gap: 4px; min-height: 58px; flex-wrap: wrap; }
  .ch-h .back { display: inline-flex; }
  .who-btn { flex: 1; min-height: 44px; padding: 2px 4px; }
  .who-btn .nm { font-size: 16px; }
  .ch-h .tabs { order: 5; width: 100%; margin: 4px 0 2px; justify-content: stretch; }
  .ch-h .tabs a { flex: 1; justify-content: center; height: 40px; padding: 0 4px; font-size: 13px; }
  .ch-h .tabs a .i { display: none; }
  .ch-h .vmchip { display: none; }
  .msgs { padding: 16px 14px 8px; gap: 14px; }
  .m-user { max-width: 88%; }
  .m-agent { grid-template-columns: 26px minmax(0,1fr); gap: 10px; }
  .m-agent .av { width: 26px; height: 26px; font-size: 12px; }
  .tool { min-height: 44px; }
  .tool .ta { display: none; }
  .appr { padding: 14px; }
  .appr-f .btn { flex: 1; min-width: 0; }
  .appr-f form.always { flex: 1 0 100%; }
  .appr-f form.always .btn { width: 100%; }
  .appr-f .check { width: 100%; min-height: 44px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: 6px; }
  .comp-wrap { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: 6px 10px 12px; border-top: 1px solid var(--line); }
  .comp { padding: 8px 8px 8px 14px; }
  .comp .row .hint { display: none; }
  .comp .send, .btn.stop { width: 44px; height: 44px; }
  .btn.stop .lbl { display: none; }
  .pending-bar { min-height: 44px; }
  .banner { flex-wrap: wrap; }
  .banner .acts { width: 100%; }
  .banner .acts .btn { flex: 1; }

  /* sheet pattern */
  .p-pane .app { background: var(--scrim); }
  .sheet-peek { display: block; height: 44px; }
  .pane { border-radius: 20px 20px 0 0; border-top: 1px solid var(--line2); }
  .grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line2); margin: 8px auto 0; }
  .pane-h { min-height: 60px; padding: 6px 8px 10px 16px; }
  .psec { padding: 14px 16px; }
  .row-item { min-height: 52px; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .acts .btn { flex: 1; }

  .page-h { padding: 14px 16px 10px; gap: 10px; }
  .page-h h1 { font-size: 22px; }
  .page-h .right { margin-left: 0; width: 100%; }
  .page-h .right .btn { flex: 1; }
  .group-intro { padding: 10px 14px 0; }
  .sec h4 button.fold { width: 44px; height: 44px; }
  .page-b { padding: 0 12px 20px; }
  .ph-top { display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 56px; position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
  .ph-top .t { font: 650 17px var(--hd); flex: 1; }
  .seg { width: 100%; }
  .seg label, .seg a { flex: 1; justify-content: center; height: 40px; padding: 0 6px; }
  .rt-list { border-radius: 14px; }
  .rt { grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; padding: 12px 14px; }
  .rt.head { display: none; }
  .rt .c-trig { grid-column: 1; }
  .rt .c-next, .rt .c-last { grid-column: 1; font-size: 12.5px; }
  .rt .c-tog { grid-column: 2; grid-row: 1 / span 2; align-self: start; }

  .drawer { position: static; width: auto; min-height: 100vh; border-left: 0; box-shadow: none; }
  .p-drawer .scrim, .p-drawer .app { display: none; }
  .drawer-h { position: sticky; top: 0; z-index: 5; background: var(--bg2); padding: 8px 8px 8px 16px; }
  .drawer-b { padding: 16px; overflow: visible; }
  .drawer-f { position: sticky; bottom: 0; background: var(--bg2); padding: 10px 12px 14px; }
  .drawer-f .note { display: none; }
  .drawer-f .btn { flex: 1; }
  .pchip { height: 44px; padding: 0 14px; border-radius: 22px; }

  .na { grid-template-columns: 1fr; padding: 0 12px 20px; gap: 14px; }
  .card { padding: 16px 14px; }
  .tpl-grid { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .toolrow { grid-template-columns: 1fr; }
  .conn-acts .btn, .conn-grid .btn { min-height: 44px; }
  .three { grid-template-columns: 1fr; }
  .secret { grid-template-columns: minmax(0,1fr) auto; }
  .secret .k { grid-column: 1 / -1; }
  .sum { position: static; }
  .sum .dt-only { display: none; }
  .mobile-cta { display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; z-index: 6; background: var(--bg2); border-top: 1px solid var(--line); padding: 10px 12px 14px; }
  .mobile-cta .c1 { font: 700 18px var(--hd); }
  .mobile-cta .c2 { font-size: 12px; color: var(--tx3); }
  .mobile-cta .btn { margin-left: auto; }

  .vm-bar { padding: 12px; gap: 10px; }
  .vm-bar .meta { gap: 4px 12px; font-size: 12.5px; }
  .vm-bar .ctl { margin-left: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
  .vm-bar .ctl .btn { padding: 0 6px; font-size: 13px; gap: 5px; }
  .vm-bar .sep { display: none; }
  .vm-wrap { grid-template-columns: 1fr; padding: 12px; }
  .con-b { min-height: 300px; font-size: 11.5px; line-height: 1.7; padding: 10px; }
  .con-b .l { gap: 8px; }
  .con-b .ts { display: none; }
  .con-b .lv { width: 38px; }
  .con-h .seg { width: auto; }
  .con-h .seg a { flex: none; height: 40px; padding: 0 12px; }
  .con-f .btn { height: 44px; }
  .toast { bottom: 16px; white-space: normal; width: calc(100vw - 24px); }
  .modal { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-width: none; border-radius: 20px 20px 0 0; padding: 18px 16px 20px; }
  .modal-f .btn { flex: 1; }

  .fr { padding: 20px 16px 28px; gap: 18px; }
  .fr .hero h1 { font-size: 30px; }
  .fr .hero p { font-size: 15.5px; }
  .fr .art { height: 92px; }
  .ck { flex-wrap: wrap; padding: 14px; }
  .ck .btn { margin-left: 46px; }
  .ck .grow { min-width: 200px; }
  .empty-chat { padding: 28px 16px; }
  .sugs { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .caret, .con-b .cur, .spin { animation: none; }
}
@media (max-width: 760px) {
  .p-pane .pane { margin-top: 36px; }
}

/* ---------- QA fixes, round 1 ---------- */
@media (min-width: 761px) { .ph-only { display: none !important; } }
.badge.apb .i { width: 12px; height: 12px; }
.badge.apb { gap: 3px; }
.ch-h.pane-open:not(.s19h) .vmchip { display: none; }
.ch-h.pane-open .tabs a .i { display: none; }
.who-btn { flex: 0 1 auto; }
.psec > .chip, .hero > .chip { justify-self: start; }
.help { font-size: 12.5px; color: var(--tx3); display: flex; align-items: center; gap: 6px; }
.secret .full { grid-column: 1 / -1; margin-top: -2px; }
.card > .btn.ghost { justify-self: start; }
.appr.done, .appr.settled { padding: 12px 14px; }
.appr.settled { border-color: var(--line); background: var(--surf); }
.appr.settled .ico { background: var(--raise); color: var(--tx2); }
.appr.done .ico { background: var(--ok-soft); color: var(--ok); }
.appr.done h3, .appr.settled h3 { font-size: 14.5px; }
.appr { min-width: 0; max-width: 100%; }
.appr .kv dd { overflow-wrap: anywhere; min-width: 0; }
.appr .cmd, .appr .mono { white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-width: 100%; }
.appr details summary { cursor: pointer; }
.appr.appr-fold { padding: 0; gap: 0; }
.appr.appr-fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; list-style: none; cursor: pointer; min-width: 0; }
.appr.appr-fold > summary::-webkit-details-marker { display: none; }
.appr.appr-fold > summary::marker { content: ""; }
.appr.appr-fold > summary:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.appr.appr-fold > summary .st { font-weight: 700; flex: none; }
.appr.appr-fold > summary .tn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.appr.appr-fold > summary .stamp { margin-left: auto; flex: none; }
.appr.appr-fold > summary .chev { flex: none; color: var(--tx3); }
.appr.appr-fold[open] > summary .chev { transform: rotate(90deg); }
.appr.appr-fold .ico { width: 28px; height: 28px; }
.appr.appr-fold .appr-more { display: grid; gap: 12px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.appr-filter { margin: 2px 0 10px; }
#approval-earlier { display: grid; gap: 14px; }
.appr-day { display: grid; gap: 8px; }
.appr-day[hidden] { display: none !important; }
.appr-day-h { margin: 0; font: 600 12px/1.3 var(--ui); letter-spacing: .02em; color: var(--tx3); }
#approval-earlier .appr[hidden] { display: none !important; }
#approval-earlier-count { margin: 0; }
#approval-earlier-count[hidden] { display: none !important; }
#approval-earlier-more { justify-self: start; justify-content: flex-start; border: 0; background: none; padding: 0; font: inherit; font-weight: 650; cursor: pointer; text-align: left; }
#approval-earlier-more[hidden] { display: none !important; }
#approval-filter-empty { margin: 4px 0 8px; }
#approval-filter-empty[hidden] { display: none !important; }
.rt-filter { margin-bottom: 12px; }
.drawer-b { gap: 14px; padding-top: 16px; }
.drawer-b textarea.ta { min-height: 72px; }
.drawer-b .ropt { padding: 10px 14px; }
@media (max-width: 760px) {
  .ch-h .av, .pane-h .av { width: 36px; height: 36px; }
  .pane-h .av.lg { width: 44px; height: 44px; }
  .comp { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 4px; }
  .comp .row { display: contents; }
  .comp .ph { order: 2; flex: 1; min-height: 0; }
  .comp .row > .ibtn:first-child { order: 1; }
  .comp .send, .comp .btn.stop { order: 3; margin-left: 0; }
  .start-form .btn { min-height: 44px; }
  .cmd { white-space: pre-wrap; word-break: break-all; }
  .ch-h .tabs a, .seg label, .seg a { height: 44px; }
  .psec-h .link, .link { display: inline-flex; align-items: center; min-height: 44px; }
  .brand { min-height: 44px; }
  .inp .ibtn { width: 44px; height: 44px; margin-right: -12px; }
  .size { grid-template-columns: 1fr auto; column-gap: 12px; }
  .size .pr { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }
  .vm-bar .ctl { grid-template-columns: 1fr 1fr 1fr; }
  .vm-bar .ctl .btn.dis { display: none; }
  .toast { bottom: 12px; }
  .rt .c-next .ph-only { display: inline; }
}
@media (max-width: 760px) {
  .psec-h .link, a.link, button.link { min-width: 44px; justify-content: flex-end; padding-left: 8px; }
  .tog { min-width: 52px; justify-content: flex-end; }
  .con-h .seg a { height: 44px; min-width: 64px; }
}

.badge.apb { background: var(--acc-soft); color: var(--acc); border: 1px solid var(--acc-line); }

.drawer .radio-list { grid-template-columns: 1fr 1fr; }
.drawer-b textarea.ta { min-height: 96px; }
.eta { margin-left: auto; font-size: 13px; color: var(--tx3); }
@media (max-width: 760px) { .drawer .radio-list { grid-template-columns: 1fr; } .drawer-b textarea.ta { min-height: 120px; } }
@media (max-width: 760px) { .fr .art { display: none; } }
.m-user.queued { border-style: dashed; color: var(--tx2); background: transparent; }
.qlabel { justify-self: end; margin-top: -10px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--start); font-weight: 600; }
.qlabel.err { color: var(--err); }
@media (max-width: 760px) { .prov { margin: 14px auto; padding: 0 12px; } .prov .card { padding: 18px 16px; } }
.preview .ovl { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #1b252a; border: 1px solid #33434b; padding: 6px 12px; border-radius: 9px; white-space: nowrap; font-size: 12.5px; }

/* ---------- 07 login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-top { display: none; }
.auth-side { background: var(--bg2); border-right: 1px solid var(--line); padding: 56px 56px 48px; display: flex; flex-direction: column; gap: 18px; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 2px solid var(--acc-line); box-shadow: 0 0 0 40px var(--acc-soft), 0 0 0 80px rgba(255,143,90,.05); }
.brand.big { font-size: 28px; gap: 12px; }
.brand.big .mark { width: 40px; height: 40px; }
.auth-side h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.025em; max-width: 440px; }
.auth-side p { color: var(--tx2); font-size: 16px; max-width: 420px; }
.auth-pts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; font: 13px var(--mono); color: var(--tx2); }
.auth-pts li { display: flex; align-items: center; gap: 10px; }
.auth-pts .dot { width: 9px; height: 9px; border-radius: 50%; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; gap: 18px; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.auth-card h1 { font-size: 28px; }
.auth-foot { font-size: 12.5px; color: var(--tx3); max-width: 400px; text-align: center; }
.lab-link { margin-left: auto; font-size: 13px; }
.err-help { color: var(--err); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--tx2); justify-self: start; min-height: 32px; }
.acct-pill { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surf); font-size: 14px; }
.acct-pill .link { font-size: 13px; padding: 0 6px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; cursor: text; }
.otp .cell { height: 56px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surf); display: flex; align-items: center; justify-content: center; font: 600 24px var(--mono); }
.otp .cell.now { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.otp .cell.now::after { content: ""; width: 2px; height: 26px; background: var(--acc); }
.otp.bad .cell { border-color: var(--err); color: var(--err); background: var(--err-soft); }
.center-link { justify-self: center; font-size: 13.5px; }
.btn.lg.wide + .btn.lg.wide { margin-top: 12px; }

/* ---------- 08 settings ---------- */
.acct.on { background: var(--raise); }
.set-wrap { display: grid; gap: 16px; max-width: 760px; }
.set-id { display: flex; align-items: center; gap: 14px; padding-bottom: 4px; }
.set-id .t1 { font: 650 18px var(--hd); }
.set-id .t2 { color: var(--tx3); font-size: 13.5px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row .k { font-size: 12.5px; color: var(--tx3); }
.set-row .v { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set-row .t2 { font-size: 12.5px; color: var(--tx3); }
.small { font-size: 13.5px; }
.key-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.key-row .pv { width: 34px; height: 34px; border-radius: 9px; background: var(--raise); display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--mono); color: var(--tx2); flex: none; }
.key-row .t1 { font-weight: 650; }
.key-row .t2 { font-size: 12.5px; color: var(--tx3); }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-opt { border: 1px solid var(--line2); border-radius: 12px; padding: 10px; display: grid; gap: 10px; cursor: pointer; background: var(--bg2); }
.theme-opt:has(input:checked) { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.tprev { height: 64px; border-radius: 8px; display: grid; grid-template-columns: 28% 1fr; grid-template-rows: 1fr 1fr; gap: 5px; padding: 6px; border: 1px solid var(--line); }
.tprev i { border-radius: 4px; }
.tprev i:first-child { grid-row: 1 / span 2; }
.tprev.dark { background: #0d1214; } .tprev.dark i { background: #1b252a; } .tprev.dark i:nth-child(2) { background: #ff8f5a; }
.tprev.light { background: #f6f4f1; } .tprev.light i { background: #e2dcd3; } .tprev.light i:nth-child(2) { background: #e8662a; }
.tprev.system { background: linear-gradient(135deg, #0d1214 50%, #f6f4f1 50%); } .tprev.system i { background: rgba(127,140,146,.45); } .tprev.system i:nth-child(2) { background: #ff8f5a; }
.theme-opt .tl { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.theme-opt .rd { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line2); }
.theme-opt:has(input:checked) .rd { border: 5px solid var(--acc); }

@media (max-width: 760px) {
  .auth { display: block; }
  .auth-side { display: none; }
  .auth-top { display: flex; padding: 10px 16px; border-bottom: 1px solid var(--line); min-height: 60px; align-items: center; }
  .auth-main { padding: 24px 16px 28px; justify-content: flex-start; }
  .auth-card h1 { font-size: 26px; }
  .back-link { min-height: 44px; }
  .acct-pill { flex-wrap: wrap; }
  .acct-pill .link { min-height: 44px; }
  .otp { gap: 6px; }
  .otp .cell { height: 54px; font-size: 22px; }
  .lab-link { min-height: 32px; }
  .set-wrap { gap: 12px; }
  .set-row { flex-wrap: wrap; gap: 8px 12px; }
  .set-row .grow { min-width: 180px; }
  .key-row { flex-wrap: wrap; }
  .key-row .btn { margin-left: 46px; }
  .theme-grid { gap: 6px; }
  .theme-opt { padding: 8px; }
  .tprev { height: 52px; }
}
@media (max-width: 760px) { .check { min-height: 44px; } .lab-link { min-height: 44px; margin: -12px 0; } }
@media (max-width: 760px) { .lab-link { margin: -12px 0 -12px auto; } }
.auth-side::after { border: 1px solid var(--acc-line); box-shadow: 0 0 0 36px rgba(255,143,90,.06), 0 0 0 72px rgba(255,143,90,.03); opacity: .8; }

/* Real controls. Layout and color stay in the rules above. */
.search input {
  border: 0; background: transparent; outline: none; flex: 1; min-width: 0;
  color: var(--tx); height: 100%; width: 100%;
}
.search input::placeholder { color: var(--tx3); }
textarea.ph {
  border: 0; outline: none; resize: none; background: transparent; font: inherit;
  width: 100%; min-height: 24px; max-height: 140px; padding: 0; color: var(--tx);
}
textarea.ph::placeholder { color: var(--tx3); }
.menu { position: relative; margin-left: auto; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; width: 220px;
  background: var(--surf); border: 1px solid var(--line2); border-radius: 12px;
  padding: 10px; box-shadow: var(--shadow); display: grid; gap: 8px;
}
.menu-pop input {
  height: 40px; width: 100%; min-width: 0; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--bg); padding: 0 8px;
}
.m-agent.pending .stamp { color: var(--acc); }
.errbox { display: grid; gap: 8px; max-width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--err); background: var(--err-soft); }
.errbox p { margin: 0; color: var(--err); }
.m-user, .m-agent .body, .m-agent .body p, .acct-pill .grow, .set-row .v, .auth-card, .key-row .t2, .errbox { overflow-wrap: anywhere; }
.m-user, .m-agent .body p { white-space: pre-wrap; }
.app, .main, .sb, .pane, .auth, .ch-h { min-width: 0; }
.app { height: 100vh; }
.sb, .main, .pane { height: 100vh; overflow: auto; }
.sb-foot { position: sticky; bottom: 0; background: var(--bg2); }
.ch-body { min-height: 0; }
.main:has(.ch-body) { overflow: hidden; height: 100vh; height: 100dvh; }
.ch-body { flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; }
.ch-h, .comp-wrap { flex: none; }
@media (max-width: 760px) {
  .p-chat .main:has(.ch-body) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .p-chat .comp-wrap { position: static; }
}
@media (max-width: 760px) {
  .menu-pop { width: min(220px, calc(100vw - 32px)); }
  .menu-pop input, .menu-pop .btn { height: 44px; }
  .comp .hint { display: none; }
  .comp .btn { order: 3; flex: none; }
}
.machine { display: grid; gap: 14px; max-width: 560px; min-width: 0; }
.cli-box { display: grid; gap: 8px; min-width: 0; }
.cli-blob { font: 12.5px/1.55 var(--mono); background: var(--con-bg); color: var(--con-tx); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; overflow-x: hidden; max-width: 100%; }
.tok { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.tok .meta { color: var(--tx3); font-size: 12.5px; }
.m-note { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--raise); color: var(--tx2); font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.thread-switch { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 16px 0; min-width: 0; }
.roster-note { margin: 0; padding: 8px 16px 0; font-size: 12.5px; color: var(--tx3); min-width: 0; overflow-wrap: anywhere; }
.field .tog { max-width: 100%; flex-wrap: wrap; }
.field .tog .lbl { min-width: 0; }
.field > .help { display: block; min-width: 0; overflow-wrap: anywhere; }
.thread-switch a { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--tx2); text-decoration: none; }
.thread-switch a.on { color: var(--tx); border-color: var(--acc); }
.machine h2 { margin: 0; font: 650 22px/1.2 var(--hd); }
.machine-del { display: grid; gap: 8px; }
.machine .chip { justify-self: start; }
.macts { display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--surf); min-width: 0; }
.macts form { margin: 0; min-width: 0; }
button.mact, a.mact { display: grid; gap: 3px; width: 100%; margin: 0; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; appearance: none; min-height: 44px; min-width: 0; }
.macts > :first-child.mact, .macts > :first-child .mact { border-top: 0; border-top-left-radius: 11px; border-top-right-radius: 11px; }
.macts > :last-child.mact, .macts > :last-child .mact { border-bottom-left-radius: 11px; border-bottom-right-radius: 11px; }
button.mact:hover, a.mact:hover { background: var(--hover); }
button.mact.pri { background: var(--acc-soft); }
button.mact.pri:hover { background: color-mix(in srgb, var(--acc) 22%, var(--surf)); }
button.mact:disabled, button.mact[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
button.mact:focus-visible, a.mact:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.mact .t1 { font-weight: 650; font-size: 14px; min-width: 0; }
.mact .t2 { font-size: 12.5px; line-height: 1.45; font-weight: 450; color: var(--tx3); overflow-wrap: anywhere; min-width: 0; }
a.mact { grid-template-columns: minmax(0, 1fr) 16px; column-gap: 12px; align-items: center; }
a.mact .t1, a.mact .t2 { grid-column: 1; }
a.mact::after { content: ""; grid-column: 2; grid-row: 1 / span 2; justify-self: center; width: 7px; height: 7px; border-right: 1.5px solid var(--tx3); border-top: 1.5px solid var(--tx3); transform: rotate(45deg); }
@media (max-width: 760px) {
  .machine { padding-bottom: 88px; }
}
.meta-grid .v.upd { color: var(--acc); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.rsteps { list-style: none; margin: 0; padding: 0; }
.rsteps .step { align-items: flex-start; flex-direction: row; gap: 10px; }
.rsteps .grow { display: grid; gap: 2px; }
.rsteps .ssub { display: block; font-size: 12.5px; font-weight: 500; color: var(--tx3); }
.rhint { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--acc-line); background: var(--acc-soft); font-size: 14px; }
.rhint.quiet { border-color: var(--line); background: var(--bg2); color: var(--tx2); }
.rhint b { color: var(--tx); }
.reason, .lockline { font-size: 13.5px; color: var(--tx2); margin: 0; }
.bline.warnl { color: var(--warn); font-size: 13.5px; }
.hist { display: grid; gap: 8px; }
.hist h3 { margin: 0; font-size: 14px; }
.hist button.link { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.hist #machine-history-more:empty { display: none; }
.hist .evs { list-style: none; margin: 0; padding: 0; }
.hist .evs li { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.hist .evs li:first-child { border-top: 0; padding-top: 0; }
.hist .evs .t { font-size: 12px; color: var(--tx3); }
.nomach p { font-size: 13.5px; margin: 2px 0 0; color: var(--tx2); }
.rmodal { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 700px; max-width: calc(100vw - 24px); background: var(--bg2); border: 1px solid var(--line2); border-top: 3px solid var(--acc); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 16px; }
.rmodal .grabber { display: none; }
.rm-h { display: flex; gap: 14px; align-items: flex-start; }
.rm-h .ico { width: 40px; height: 40px; border-radius: 11px; background: var(--acc-soft); color: var(--acc); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rm-h h2 { font-size: 20px; margin: 0 0 4px; }
.rm-h p { font-size: 14px; line-height: 1.55; margin: 0; }
.rimg { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surf); border: 1px solid var(--line); }
.rimg > div { display: grid; gap: 2px; }
.rimg .k { font-size: 12px; color: var(--tx3); }
.rimg .v { font-size: 15px; font-weight: 600; }
.rimg-to { font-size: 12.5px; color: var(--tx3); font-weight: 600; }
.tag-new { justify-self: start; font: 700 10.5px var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ok); }
.rlists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rlist { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surf); }
.rlist h3 { font: 700 11.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.rlist.kept h3 { color: var(--ok); }
.rlist.lost h3 { color: var(--warn); }
.rlist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.rlist li { display: flex; gap: 8px; align-items: flex-start; }
.rlist.kept .i { color: var(--ok); }
.rlist.lost .i { color: var(--warn); }
.promise { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--tx2); margin: 0; }
.promise .i { color: var(--ok); }
.promise b { color: var(--tx); }
.rm-f { display: flex; justify-content: flex-end; gap: 10px; }
.comp.locked { background: var(--bg2); border-style: dashed; }
.comp.locked .ph { color: var(--tx2); margin: 0; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
@media (max-width: 760px) {
  .rhint { flex-wrap: wrap; }
  .rhint .btn { width: 100%; }
  .nomach .btn { width: 100%; }
  .p-confirm .app, .p-confirm .scrim { display: none; }
  .p-confirm { background: var(--scrim); }
  .rmodal { position: static; transform: none; width: auto; max-width: none; border-radius: 20px 20px 0 0; border-top-width: 1px; min-height: 100vh; }
  .rlists { grid-template-columns: 1fr; }
  .rm-f { position: sticky; bottom: 0; background: var(--bg2); padding: 10px 0 14px; }
  .rm-f .btn { flex: 1; min-height: 44px; }
  .comp.locked { display: block; padding: 12px 14px; }
  .p-files .pane { display: flex; position: fixed; left: 44px; right: 0; top: 0; bottom: 0; z-index: 30; width: auto; max-width: none; border-left: 1px solid var(--line); }
  .p-files .main { display: flex; }
  .p-files .peek { display: block; }
  .p-files .fdrop { display: none !important; }
  .p-files .ch-h .tabs { display: none; }
  .p-files .app { display: block; }
  .fup .t2 { display: none; }
  .comp .row .hint.keep { display: block; }
}

/* routines panel */
.pbody { min-height: 0; }
.psec-h .side { margin-left: auto; color: var(--tx3); font-size: 12.5px; }
.psec-h .btn { margin-left: 8px; }
.fld { display: grid; gap: 6px; font-size: 13px; font-weight: 650; }
.fld input, .fld select, .fld textarea { font-weight: 450; width: 100%; border-radius: 10px; border: 1px solid var(--line2); background: var(--surf); padding: 10px 12px; }
.fld .hint, .fld .parts { font-weight: 450; color: var(--tx3); font-size: 12.5px; }
.fld .parts { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; font-family: var(--mono); font-size: 11px; }
.pchip input, .ropt input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.empty-r { gap: 10px; }
.empty-r h3 { font: 650 18px var(--hd); }
.empty-r p { color: var(--tx2); font-size: 14px; font-weight: 450; }
.prompt { white-space: pre-wrap; color: var(--tx2); font-size: 14px; font-weight: 450; }
.back { justify-self: start; }
.app.with-pane.wide-pane { grid-template-columns: 284px minmax(0, 1fr) 540px; }
.pane.routines { overflow: hidden; }
.pane.routines .pbody { flex: 1 1 auto; min-height: 0; overflow: auto; }
.pane.routines .pfoot { flex: none; position: sticky; bottom: 0; z-index: 2; }
body.panel-routines .ch-h .tabs { display: none; }
.pane.routines { min-width: 0; }
.rst.held { color: var(--tx2); }
.rst { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); background: var(--raise); color: var(--tx2); justify-self: start; }
.rst.ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.rst.run { color: var(--start); background: var(--start-soft); border-color: color-mix(in srgb, var(--start) 35%, transparent); }
.rst.wait { color: var(--acc); background: var(--acc-soft); border-color: var(--acc-line); }
.rst.err { color: var(--err); background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.rst.late { color: var(--tx); }
.rrow { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rrow .rmain { display: grid; gap: 3px; min-width: 0; padding: 4px 8px; margin: -4px -8px; border-radius: 10px; }
.rrow .t1 { font-weight: 650; font-size: 14px; }
.rrow .t2 { font-size: 12.5px; color: var(--tx3); }
.rrow .t2.paused { color: var(--pause); }
.rrow.off .t1 { color: var(--tx2); }
.redit { padding: 16px 18px 20px; display: grid; gap: 16px; }
.radio-list.one { grid-template-columns: 1fr; }
.cron-prev.dim .say { color: var(--tx3); font-weight: 600; font-size: 14px; }
.ferr { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--err); font-weight: 600; }
.pfoot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg2); }
.pfoot .note { margin-right: auto; font-size: 12.5px; color: var(--tx3); font-weight: 450; }
.rhead { display: flex; align-items: center; gap: 10px; }
.rhead .t1 { font: 650 16px var(--hd); }
.rhead .t2 { font-size: 12.5px; color: var(--tx3); font-weight: 450; }
.runs { display: grid; }
.runrow { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 8px; margin: 0 -8px; border-radius: 10px; border-top: 1px solid var(--line); font-size: 13.5px; min-height: 48px; }
.runrow:first-child { border-top: 0; }
.runrow .t1 { font-weight: 600; }
.runrow .t2 { font-size: 12.5px; color: var(--tx3); }
.runrow.cur { background: var(--raise); box-shadow: inset 3px 0 0 var(--acc); }
.pnote { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surf); font-size: 13.5px; color: var(--tx2); font-weight: 450; }
.pnote.late { border-color: var(--start); background: var(--start-soft); }
.rmark { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--line2); background: var(--bg2); font-size: 13.5px; min-height: 52px; }
.rmark .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--raise); color: var(--acc); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rmark .grow { display: grid; min-width: 0; }
.rmark .t1 { font-weight: 650; }
.rmark .t2 { font-size: 12.5px; color: var(--tx3); }
.rmark .open { display: inline-flex; align-items: center; gap: 4px; color: var(--acc); font-weight: 650; font-size: 13px; white-space: nowrap; }
.tbar { display: flex; align-items: center; gap: 12px; padding: 8px 20px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.tbar .t1 { display: flex; align-items: center; gap: 6px; font-weight: 650; font-size: 14.5px; }
.tbar .t2 { font-size: 12.5px; color: var(--tx3); }
.rprompt { justify-self: end; max-width: 78%; border-radius: 16px 16px 4px 16px; padding: 10px 14px; background: var(--surf); border: 1px dashed var(--acc-line); display: grid; gap: 4px; }
.rprompt .lab { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--acc); }
.sysline { display: flex; align-items: center; gap: 8px; justify-content: center; text-align: center; font-size: 12.5px; color: var(--tx3); padding: 2px 8px; flex-wrap: wrap; }
.expline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tx2); margin: 0; }
@media (max-width: 760px) {
  .p-slide .pane.routines { display: flex; position: fixed; top: 0; right: 0; bottom: 0; left: 44px; z-index: 20; min-height: 100vh; }
  .p-slide .main { display: none; }
  .p-run .main { display: flex; min-height: 100vh; }
  .p-run .pane { display: none; }
  .pfoot .note { display: none; }
  .runrow { grid-template-columns: minmax(0, 1fr); }
  .tback { height: 44px; }
}

/* Secrets vault */
.vwrap { display: grid; gap: 16px; max-width: 860px; align-content: start; }
.vlist { display: grid; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); min-width: 0; }
.vrow .t1 { font-weight: 650; overflow-wrap: anywhere; }
.vrow .t1.mono, .t1.mono { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.vrow .t2 { font-size: 12.5px; color: var(--tx3); }
.vrow.link-row { color: var(--tx); text-decoration: none; }
.vrow.link-row:hover { background: var(--hover); }
.vrow.hl { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-soft); }
.vrow .chev { color: var(--tx3); display: inline-flex; }
.pv { width: 34px; height: 34px; border-radius: 9px; background: var(--raise); display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--mono); color: var(--tx2); flex: none; }
.lbl { display: block; font-size: 12.5px; color: var(--tx3); font-weight: 500; }
.mask { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 96px; }
.dots { font-family: var(--mono); letter-spacing: .14em; color: var(--tx2); font-size: 14px; }
.dots.sm { font-size: 12px; letter-spacing: .1em; color: var(--tx3); }
.t3 { font-size: 11.5px; color: var(--tx3); }
.used { display: inline-flex; align-items: center; gap: 8px; min-width: 190px; }
.used .stack { display: inline-flex; }
.used .stack .av { border: 2px solid var(--bg2); margin-left: -6px; }
.used .stack .av:first-child { margin-left: 0; }
.used.none .chip { height: 22px; font-size: 11.5px; }
.vnote { display: flex; gap: 8px; align-items: flex-start; }
.vempty { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--line2); border-radius: 12px; }
.vempty .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--acc-soft); color: var(--acc); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.vempty p { margin: 4px 0 0; font-size: 13.5px; }
.glist { display: grid; gap: 6px; }
.check.gpick { display: flex; width: 100%; gap: 10px; padding: 6px 10px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--surf); color: var(--tx); }
.check.gpick:has(input:checked) { border-color: var(--acc); background: var(--acc-soft); }
.gpick .t1 { display: block; font-weight: 650; font-size: 14px; }
.gpick .t2 { display: block; font-size: 12.5px; color: var(--tx3); }
.ferr { display: flex; gap: 6px; align-items: flex-start; color: var(--err); font-size: 13px; flex-wrap: wrap; }
.ferr .link { color: var(--err); text-decoration: underline; }
.back-to { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--tx2); justify-self: start; min-height: 32px; }
.dhead { display: flex; align-items: center; gap: 14px; }
.dhead h2 { font-size: 22px; overflow-wrap: anywhere; }
.dhead .t2 { margin: 2px 0 0; color: var(--tx3); font-size: 13px; }
.dhead .pv { width: 44px; height: 44px; border-radius: 12px; color: var(--acc); background: var(--acc-soft); }
.grow-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.grow-row .t1 { font-weight: 650; }
.grow-row .t2 { font-size: 12.5px; color: var(--tx3); }
.rstat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.rstat.ok { color: var(--ok); }
.rstat.run { color: var(--start); }
.rstat.wait { color: var(--tx3); }
.rstat.err { color: var(--err); }
.vhist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.vhist li { display: grid; gap: 2px; }
.vhist .t2 { font-size: 12.5px; color: var(--tx3); }
.card.dz { border-color: color-mix(in srgb, var(--err) 30%, var(--line)); }
.card.dz .vrow { background: transparent; border: 0; padding: 0; }
.card.dz p { margin: 0; }
.smodal .muted { margin: 0; font-size: 14px; }
.smodal.acc .modal-h .ico { background: var(--acc-soft); color: var(--acc); }
.smodal.warnm .modal-h .ico { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.smodal.acc { border-top: 3px solid var(--acc); }
.reloadbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surf); display: grid; gap: 8px; font-size: 14px; }
.reloadbox ul { margin: 0; }
.nomach { margin: 0; display: flex; gap: 8px; align-items: flex-start; color: var(--ok); font-size: 13.5px; font-weight: 600; }
.row-item.static:hover { background: transparent; }
.row-item .revoke { font-size: 13px; margin-left: 8px; display: inline-flex; align-items: center; min-height: 32px; }
.sclose { border: 1px solid var(--line2); width: 40px; height: 40px; }
.stoc { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 32px 14px; }
.stoc a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--tx2); }
.stoc a.on { color: var(--tx); border-color: var(--acc); background: var(--acc-soft); }
.s19pane { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.s19ph { gap: 12px; }
.pane .ptabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.pane .ptabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 1px; border-radius: 10px; font-size: 11.5px; font-weight: 650; color: var(--tx3); min-width: 0; }
.pane .ptabs a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pane .ptabs a.on { background: var(--raise); color: var(--tx); box-shadow: inset 0 -2px 0 var(--acc); }
.pane .ptabs a.on .i { color: var(--acc); }
.pbody { overflow: auto; flex: 1; min-height: 0; }
.pclose { border-color: var(--line2); }
.vault-open .tabs { display: none; }
.card-h > .btn { margin-left: auto; }
.peek { display: none; }
@media (min-width: 761px) {
  .vlist > .vrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 84px minmax(160px, 230px) 104px; }
  .vlist > .vrow > .pv { grid-column: 1; }
  .vlist > .vrow > .grow { grid-column: 2; }
  .vlist > .vrow > .mask { grid-column: 3; min-width: 0; }
  .vlist > .vrow > .used { grid-column: 4; min-width: 0; }
  .vlist > .vrow > .btn, .vlist > .vrow > .chev { grid-column: 5; justify-self: end; }
}
@media (max-width: 760px) {
  .vwrap { gap: 12px; }
  .vrow { flex-wrap: wrap; gap: 8px 12px; }
  .vrow > .grow { flex: 1 1 calc(100% - 90px); }
  .vrow .mask { order: 3; min-width: 0; margin-left: 46px; flex-direction: row; align-items: baseline; gap: 8px; }
  .vrow .used { order: 4; min-width: 0; flex: 1 1 100%; margin-left: 46px; }
  .vrow .btn, .vrow .chev { min-height: 44px; }
  .vempty { flex-wrap: wrap; }
  .vempty .btn { width: 100%; min-height: 44px; }
  .grow-row { flex-wrap: wrap; }
  .grow-row .btn, .drawer .btn, .smodal .btn, .s19pane .btn, .stoc a { min-height: 44px; }
  .stoc { padding: 0 12px 12px; }
  .stoc a { height: 44px; padding: 0 14px; }
  .ph-top .sclose { width: 44px; height: 44px; margin-left: auto; }
  .row-item .revoke { min-height: 44px; }
  .dhead h2 { font-size: 19px; }
  .vault-drawer .drawer-f { flex-wrap: wrap; }
  .vault-drawer .drawer-f .note { display: block; flex: 1 1 100%; margin: 0 0 8px; }
  .p-slide .s19pane { display: flex; position: fixed; top: 0; right: 0; bottom: 0; left: 44px; z-index: 30; overflow: auto; border-left: 1px solid var(--line2); border-radius: 18px 0 0 18px; box-shadow: var(--shadow); }
  .p-slide .peek { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 44px; z-index: 29; background: var(--scrim); }
  .p-modal .scrim { z-index: 35; }
  .p-modal .modal { z-index: 40; }
  .pclose-ph { height: 44px; }
}
.fup { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.fup .t2 { color: var(--text-3); font-size: 12px; }
.fup.low { display: block; }
.fup.low .btn { width: 100%; }
.fseg { margin: 0 0 10px; }
.fseg a { text-decoration: none; color: inherit; }
.fsearch { margin-top: 2px; }
.flist { padding-top: 4px; }
.fgroup { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 11.5px; padding: 6px 2px; }
.frow { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-top: 1px solid var(--line); }
.frow .fmain { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit; }
.frow .t1 { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow .t2 { color: var(--text-3); font-size: 11.5px; }
.fic { color: var(--text-3); flex: none; }
.fdl { flex: none; }
.fqueue { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.fprog { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.fprog .fst { width: 22px; height: 22px; display: grid; place-items: center; color: var(--text-2); flex: none; }
.fprog .t1 { font-size: 12.5px; }
.fprog .t2 { color: var(--text-3); font-size: 11.5px; }
.fprog .line { margin-top: 2px; }
.fbar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.fbar i { display: block; height: 100%; width: 0; background: var(--accent); }
.fprog.err .fst { color: var(--danger); }
.fprog.wait .fst { color: var(--text-3); }
.pnote2 { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); margin: 0 0 12px; font-size: 12.5px; }
.pnote2 form { margin-left: auto; }
.fdrop { position: absolute; inset: 8px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--accent); border-radius: 12px; background: var(--bg); text-align: center; padding: 16px; }
.fdrop[hidden] { display: none; }
.fdrop b { font-size: 14px; }
.fdrop span { color: var(--text-2); font-size: 12.5px; }
.pane.files .pbody { position: relative; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg2); border-radius: 8px; padding: 4px 8px; margin: 0 6px 6px 0; font-size: 12.5px; }
.m-user .fchip { background: transparent; }
.pathline { margin: 4px 0 8px auto; max-width: 92%; color: var(--text-3); font-size: 12px; text-align: right; }
.facts { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.facts .fout { flex: 1; margin: 0; text-decoration: none; color: inherit; }
.facts .fout .grow { display: flex; flex-direction: column; min-width: 0; }
.facts .t1 { font-weight: 600; font-size: 13px; }
.facts .t2 { display: block; color: var(--text-3); font-size: 12px; }
.fout { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; margin: 0 0 8px; }
.fout .fn { font-size: 12.5px; }
.fout .st { margin-left: auto; color: var(--text-3); font-size: 11.5px; }
.fhead { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; }
.fhead .t1 { font-size: 14px; font-weight: 600; }
.fhead .t2 { color: var(--text-3); font-size: 12px; }
.fpre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: auto; max-height: 280px; }
.fpre .l { display: flex; gap: 10px; padding: 0 10px; white-space: pre-wrap; }
.fpre .n { width: 28px; color: var(--text-3); text-align: right; flex: none; }
.mgrid2 { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 12.5px; margin: 0 0 12px; }
.mgrid2 dt { color: var(--text-3); }
.mgrid2 dd { margin: 0; }
.pacts { display: flex; flex-wrap: wrap; gap: 8px; }
.psub { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.psub h3 { margin: 0; font-size: 15px; }
.pempty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 8px; }
.pempty b { font-size: 14px; }
.pempty span { color: var(--text-2); font-size: 12.5px; max-width: 280px; }
.calm { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); margin: 0 0 10px; font-size: 12.5px; }
.calm .ico { color: var(--text-2); flex: none; }
.calm p { margin: 0; }
.ibtn.dis, .btn:disabled { opacity: .45; cursor: not-allowed; }
.sres { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; }
.sres-h, .sres-f { color: var(--text-3); font-size: 11px; padding: 6px 8px; }
.sitem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; text-decoration: none; color: inherit; border-radius: 8px; }
.sitem:hover { background: var(--bg); }
.sitem .t2 { display: block; color: var(--text-3); font-size: 11.5px; }
.sb { position: relative; }
#search-pop { position: absolute; z-index: 40; left: 12px; right: 12px; top: 112px; }
.p-files .ch-h .tabs { display: none; }
.comp-wrap { position: relative; }
#resume-live { margin: 0; }
#resume-live:has(.act), #resume-live:has(.banner) { margin: 0 0 8px; }
#resume-act { margin: 0 0 8px; }
#resume-live:empty { display: none; }
.inchat { display: inline-flex; align-items: center; min-height: 28px; margin: 4px 0 8px; font-size: 13.5px; font-weight: 650; color: var(--acc); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fchips[hidden], #fqueue[hidden], #fdrop[hidden], #search-pop[hidden], #low-space-note[hidden] { display: none; }

/* S19 agent panel */
.s19h { gap: 10px; flex-wrap: nowrap; }
.s19h .hsp { flex: 1; }
.s19h .who-btn { overflow: hidden; flex: 0 1 auto; }
.s19h .who-btn .grow { min-width: 0; overflow: hidden; }
.s19h .who-btn .sub { display: block; }
a.vmchip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; border-radius: 14px; }
.apill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; font-size: 13.5px; font-weight: 700; background: var(--acc-soft); color: var(--acc); border: 1px solid var(--acc-line); white-space: nowrap; text-decoration: none; }
.apill .w { margin-left: -2px; }
.ptoggle { border: 1px solid var(--line); }
.ptoggle.on { background: var(--raise); color: var(--tx); border-color: var(--line2); }
.ibtn.back { position: relative; }
.bbadge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font: 750 11px var(--ui); background: var(--acc); color: var(--acc-ink); display: inline-flex; align-items: center; justify-content: center; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn.ghost:hover { background: var(--hover); color: var(--tx); }
.pclose { border-color: var(--line2); color: var(--tx); }
.glance { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; padding: 8px 2px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.glance .t1 { font-weight: 650; }
.glance .t2 { font-size: 12.5px; color: var(--tx3); }
.tbadge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font: 750 11px var(--ui); background: var(--acc); color: var(--acc-ink); display: inline-flex; align-items: center; justify-content: center; }
.tbadge[hidden] { display: none; }
#approval-pill { display: contents; }
.pane .ptabs a { position: relative; }
#agent-panel[hidden], .s19toast[hidden] { display: none !important; }
.s19toast { gap: 10px; border-color: var(--acc-line); white-space: normal; }
.s19toast b { font-weight: 700; }
.card-h .tag-new { color: var(--acc); background: var(--acc-soft); padding: 2px 7px; border-radius: 6px; }
button.sclose, a.sclose { font: inherit; cursor: pointer; text-decoration: none; }
.sclose:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
@media (max-width: 1179px) {
  .app.with-pane.wide-pane { grid-template-columns: 72px minmax(0, 1fr) minmax(280px, 540px); }
  .app.with-pane.wide-pane .sb .wm,
  .app.with-pane.wide-pane .sb .search,
  .app.with-pane.wide-pane .sb .who,
  .app.with-pane.wide-pane .sb .sec h4,
  .app.with-pane.wide-pane .sb .sb-foot .grow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 1039px) {
  .app.with-pane:not(.wide-pane) { grid-template-columns: 72px minmax(0, 1fr) minmax(280px, 400px); }
  .app.with-pane:not(.wide-pane) .sb .wm,
  .app.with-pane:not(.wide-pane) .sb .search,
  .app.with-pane:not(.wide-pane) .sb .who,
  .app.with-pane:not(.wide-pane) .sb .sec h4,
  .app.with-pane:not(.wide-pane) .sb .sb-foot .grow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (max-width: 760px) {
  .s19h { gap: 2px; }
  .s19h .hsp { display: none; }
  .s19h .vmchip, .ch-h.s19h .vmchip { display: none; }
  .s19h .who-btn { flex: 1; min-width: 0; }
  .apill { height: 44px; min-width: 44px; padding: 0 10px; border-radius: 22px; justify-content: center; }
  .apill .w { display: none; }
  .ptoggle { width: 44px; height: 44px; }
  body.p-chat.p-slide .main { display: flex; min-height: 100vh; position: relative; }
  .p-run .pane, .p-run .s19pane { display: none; }
  .p-list.no-bnav .sb { padding-bottom: 12px; }
  .s19toast { left: 12px; right: 12px; transform: none; width: auto; bottom: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .s19toast .btn { grid-column: 1 / -1; min-height: 44px; }
  .pclose-ph { min-height: 44px; }
  .inchat { min-height: 44px; min-width: 44px; }
}

/* ---------- #22 agent markdown and activity ---------- */
:root {
  --act-cycle: 800ms;
  --act-cycle-slow: 1600ms;
  --act-ease: cubic-bezier(.4, 0, .6, 1);
  --act-dot: 3px;
  --act-gap: 2px;
  --act-box: 16px;
  --act-dot-sm: 3px;
  --act-gap-sm: 1px;
  --act-box-sm: 12px;
  --act-dim: .22;
  --act-held: .55;
  --act-color: var(--acc);
  --act-label: var(--tx2);
  --act-label-size: 13px;
  --act-show-delay: 300ms;
  --act-fade: 150ms;
  --act-min-dwell: 600ms;
}
.actico { display: inline-grid; grid-template-columns: repeat(2, var(--act-dot)); grid-auto-rows: var(--act-dot); gap: var(--act-gap); width: var(--act-box); height: var(--act-box); place-content: center; color: var(--act-color); flex: none; }
.actico i { width: var(--act-dot); height: var(--act-dot); border-radius: 50%; background: currentColor; opacity: var(--act-dim); animation: act-dot var(--act-cycle) var(--act-ease) infinite; }
.actico i:nth-child(1) { animation-delay: calc(var(--act-cycle) * 0 / 6); opacity: .48; }
.actico i:nth-child(2) { animation-delay: calc(var(--act-cycle) * -5 / 6); opacity: .74; }
.actico i:nth-child(4) { animation-delay: calc(var(--act-cycle) * -4 / 6); opacity: 1; }
.actico i:nth-child(6) { animation-delay: calc(var(--act-cycle) * -3 / 6); }
.actico i:nth-child(5) { animation-delay: calc(var(--act-cycle) * -2 / 6); }
.actico i:nth-child(3) { animation-delay: calc(var(--act-cycle) * -1 / 6); }
@keyframes act-dot { 0% { opacity: 1; } 50%, 100% { opacity: var(--act-dim); } }
.actico.slow i { animation-duration: var(--act-cycle-slow); }
.actico.slow i:nth-child(2) { animation-delay: calc(var(--act-cycle-slow) * -5 / 6); }
.actico.slow i:nth-child(4) { animation-delay: calc(var(--act-cycle-slow) * -4 / 6); }
.actico.slow i:nth-child(6) { animation-delay: calc(var(--act-cycle-slow) * -3 / 6); }
.actico.slow i:nth-child(5) { animation-delay: calc(var(--act-cycle-slow) * -2 / 6); }
.actico.slow i:nth-child(3) { animation-delay: calc(var(--act-cycle-slow) * -1 / 6); }
.actico.held i { animation: none; opacity: var(--act-held); }
.actico.sm { grid-template-columns: repeat(2, var(--act-dot-sm)); grid-auto-rows: var(--act-dot-sm); gap: var(--act-gap-sm); width: var(--act-box-sm); height: var(--act-box-sm); }
.actico.sm i { width: var(--act-dot-sm); height: var(--act-dot-sm); }
.act { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; max-width: 100%; flex-wrap: wrap; font-size: var(--act-label-size); font-weight: 600; color: var(--act-label); animation: act-in var(--act-fade) ease-out var(--act-show-delay) both; }
.act .actxt { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.act form.stop { margin: 0 0 0 auto; }
.act form.stop button { display: inline; border: 0; background: none; padding: 0; margin: 0; width: auto; height: auto; min-width: 0; min-height: 0; font: inherit; font-weight: 650; line-height: 1.2; color: var(--acc); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.act form.stop button:hover { color: var(--tx); }
.act form.stop button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.stop-note { margin: 0; color: var(--tx2); font-size: 13.5px; }
.act:has(.actmode[data-mode="held"]) .actico i { animation: none; opacity: var(--act-held); }
.act:has(.actmode[data-mode="slow"]) .actico i { animation-duration: var(--act-cycle-slow); }
.act:has(.actmode[data-mode="slow"]) .actico i:nth-child(2) { animation-delay: calc(var(--act-cycle-slow) * -5 / 6); }
.act:has(.actmode[data-mode="slow"]) .actico i:nth-child(4) { animation-delay: calc(var(--act-cycle-slow) * -4 / 6); }
.act:has(.actmode[data-mode="slow"]) .actico i:nth-child(6) { animation-delay: calc(var(--act-cycle-slow) * -3 / 6); }
.act:has(.actmode[data-mode="slow"]) .actico i:nth-child(5) { animation-delay: calc(var(--act-cycle-slow) * -2 / 6); }
.act:has(.actmode[data-mode="slow"]) .actico i:nth-child(3) { animation-delay: calc(var(--act-cycle-slow) * -1 / 6); }
@keyframes act-in { from { opacity: 0; } to { opacity: 1; } }
.act .lbl { color: var(--act-label); }
.act .el { color: var(--tx3); font-weight: 500; }
.act .hint { color: var(--tx3); font-weight: 500; }
.act-hold[hidden], #netbar[hidden], .md-src { display: none; }
.tools:empty, .md-tail:empty, .fail-slot:empty, .act-slot:empty { display: none; }
.ag .sub.act-sub { display: inline-flex; align-items: center; gap: 6px; }
.md { display: grid; gap: 12px; min-width: 0; font-size: 15px; line-height: 1.6; color: var(--tx); }
.cards:empty, .md:empty { display: none; }
.md > * { margin: 0; min-width: 0; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--hd); line-height: 1.3; letter-spacing: -.005em; margin-top: 6px; }
.md h1 { font-size: 19px; font-weight: 750; }
.md h2 { font-size: 17px; font-weight: 720; }
.md h3 { font-size: 15.5px; font-weight: 700; }
.md h4 { font-size: 14.5px; font-weight: 700; color: var(--tx2); }
.md > :first-child { margin-top: 0; }
.md strong { font-weight: 720; }
.md p, .m-agent .md p { white-space: normal; }
.md ul, .md ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.md ol { list-style: decimal; }
.md ul { list-style: disc; }
.md li > ul, .md li > ol { margin-top: 4px; }
.md li > ul { list-style: circle; }
.md li::marker { color: var(--tx3); }
.md ol > li::marker { font-weight: 650; font-variant-numeric: tabular-nums; }
.md a { color: var(--acc); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; }
.md :not(pre) > code { font-family: var(--mono); font-size: .86em; padding: 1px 5px; border-radius: 5px; background: var(--raise); border: 1px solid var(--line); overflow-wrap: anywhere; }
.md blockquote { border-left: 3px solid var(--line2); padding: 2px 0 2px 14px; color: var(--tx2); display: grid; gap: 8px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.md .task { margin-right: 6px; }
.md-code { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--con-bg); overflow: hidden; min-width: 0; }
.md-code-h { display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; height: 36px; border-bottom: 1px solid color-mix(in srgb, var(--con-tx) 12%, transparent); }
.md-code-h .lang { font-family: var(--mono); font-size: 12px; color: color-mix(in srgb, var(--con-tx) 70%, transparent); flex: 1; }
.md-code-h .copy { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; gap: 6px; font-size: 12.5px; color: color-mix(in srgb, var(--con-tx) 80%, transparent); border-radius: 7px; background: transparent; border: 0; cursor: pointer; }
.md-code-h .copy .i { width: 14px; height: 14px; }
.md-code-h .copy.done, .msg-acts .ibtn.done { color: #4ade9b; }
.md-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; color: var(--con-tx); font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre; tab-size: 4; background: var(--con-bg); }
.md-code pre:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; }
.md-code code { font: inherit; background: none; border: 0; padding: 0; }
.md-code.open { border-bottom-style: dashed; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.md-code.open .wait { font-size: 12px; color: color-mix(in srgb, var(--con-tx) 55%, transparent); padding-right: 8px; }
.md-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.md-table:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.md table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 14px; line-height: 1.45; }
.md th, .md td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 8.5em; }
.md th { font-weight: 700; font-size: 13px; color: var(--tx2); background: color-mix(in srgb, var(--raise) 70%, transparent); white-space: nowrap; }
.md tr:last-child td { border-bottom: 0; }
.md td.num, .md th.num { text-align: right; font-variant-numeric: tabular-nums; }
.msg-acts { display: flex; align-items: center; gap: 4px; }
.msg-acts .stamp { margin-right: 4px; }
.msg-acts .ibtn { width: 30px; height: 30px; border-radius: 8px; color: var(--tx3); }
.m-user a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }
.m-agent .calm { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surf); font-size: 14px; color: var(--tx2); max-width: 100%; }
.m-agent .calm .ico { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--err-soft); color: var(--err); }
.m-agent .calm .ico .i { width: 16px; height: 16px; }
.m-agent .calm b { color: var(--tx); font-weight: 680; }
.m-agent .calm p { margin: 0; line-height: 1.5; white-space: normal; color: var(--tx2); }
.m-agent .calm .acts { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.m-agent.partial .md { color: var(--tx2); }
.netbar { display: none; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--surf); border: 1px solid var(--line2); font-size: 13.5px; color: var(--tx2); margin-bottom: 8px; }
.netbar:not([hidden]), .netbar.on { display: flex; }
.netbar b { color: var(--tx); font-weight: 680; }
.netbar .i.off { color: var(--tx2); flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) {
  .md-code-h { height: 44px; }
  .md-code-h .copy { height: 44px; min-width: 44px; }
  .msg-acts .ibtn { width: 44px; height: 44px; }
  .m-agent .calm .acts .btn { min-height: 44px; }
  .act form.stop button { min-height: 0; min-width: 0; height: auto; width: auto; padding: 0; }
  .netbar .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .act { animation: none; }
  .actico i, .actico.slow i { animation: none; }
  .act:has(.actmode[data-mode="held"]) .actico i,
  .act:has(.actmode[data-mode="slow"]) .actico i { animation: none; }
  .actico i:nth-child(n) { opacity: var(--act-dim); }
  .actico i:nth-child(1), .actico i:nth-child(2), .actico i:nth-child(3) { opacity: 1; }
  .actico.held i:nth-child(n) { opacity: var(--act-held); }
  .caret { animation: none; }
}

/* ---------- per-agent colors (issue 27) ----------
   Avatar fills are the same in both themes. Bubble fill, border, and text
   are literal hex. c0 is the legacy default and has no bubble. */
.m-user.c1 { background: #52443c; border-color: #7e6050; color: #e7eef0; }
.m-user.c2 { background: #354e4b; border-color: #4c716a; color: #e7eef0; }
.m-user.c3 { background: #44455b; border-color: #666285; color: #e7eef0; }
.m-user.c4 { background: #524d38; border-color: #7e7049; color: #e7eef0; }
.m-user.c5 { background: #38495b; border-color: #526a85; color: #e7eef0; }
.m-user.c6 { background: #4f3f48; border-color: #7a5865; color: #e7eef0; }
.m-user.c7 { background: #3b503c; border-color: #577550; color: #e7eef0; }
.m-user.c8 { background: #484a43; border-color: #6d6a5c; color: #e7eef0; }
.m-user.c9 { background: #324f57; border-color: #48737f; color: #e7eef0; }
.m-user.c1 *, .m-user.c2 *, .m-user.c3 *, .m-user.c4 *, .m-user.c5 *, .m-user.c6 *, .m-user.c7 *, .m-user.c8 *, .m-user.c9 * { color: inherit; }
.m-user.c1 code, .m-user.c2 code, .m-user.c3 code, .m-user.c4 code, .m-user.c5 code, .m-user.c6 code, .m-user.c7 code, .m-user.c8 code, .m-user.c9 code { background: rgba(0,0,0,.18); color: inherit; border-radius: 4px; padding: 0 3px; }
html.light .m-user.c1 { background: #ffe2d3; border-color: #ffcaad; color: #1b2226; }
html.light .m-user.c2 { background: #d4f0e9; border-color: #b1e4d6; color: #1b2226; }
html.light .m-user.c3 { background: #eae3ff; border-color: #d9ccff; color: #1b2226; }
html.light .m-user.c4 { background: #ffefcc; border-color: #ffe2a2; color: #1b2226; }
html.light .m-user.c5 { background: #d9eaff; border-color: #bad8ff; color: #1b2226; }
html.light .m-user.c6 { background: #fbdbe4; border-color: #f8bccd; color: #1b2226; }
html.light .m-user.c7 { background: #def3d3; border-color: #c1e9ad; color: #1b2226; }
html.light .m-user.c8 { background: #f1eadc; border-color: #e4d9bf; color: #1b2226; }
html.light .m-user.c9 { background: #d1f2fa; border-color: #aae6f6; color: #1b2226; }
html.light .m-user.c1 code, html.light .m-user.c2 code, html.light .m-user.c3 code, html.light .m-user.c4 code, html.light .m-user.c5 code, html.light .m-user.c6 code, html.light .m-user.c7 code, html.light .m-user.c8 code, html.light .m-user.c9 code { background: rgba(0,0,0,.06); }
.m-user.c1.queued { background: transparent; border-style: dashed; border-color: #7e6050; color: var(--tx2); }
.m-user.c2.queued { background: transparent; border-style: dashed; border-color: #4c716a; color: var(--tx2); }
.m-user.c3.queued { background: transparent; border-style: dashed; border-color: #666285; color: var(--tx2); }
.m-user.c4.queued { background: transparent; border-style: dashed; border-color: #7e7049; color: var(--tx2); }
.m-user.c5.queued { background: transparent; border-style: dashed; border-color: #526a85; color: var(--tx2); }
.m-user.c6.queued { background: transparent; border-style: dashed; border-color: #7a5865; color: var(--tx2); }
.m-user.c7.queued { background: transparent; border-style: dashed; border-color: #577550; color: var(--tx2); }
.m-user.c8.queued { background: transparent; border-style: dashed; border-color: #6d6a5c; color: var(--tx2); }
.m-user.c9.queued { background: transparent; border-style: dashed; border-color: #48737f; color: var(--tx2); }
html.light .m-user.c1.queued { border-color: #ffcaad; }
html.light .m-user.c2.queued { border-color: #b1e4d6; }
html.light .m-user.c3.queued { border-color: #d9ccff; }
html.light .m-user.c4.queued { border-color: #ffe2a2; }
html.light .m-user.c5.queued { border-color: #bad8ff; }
html.light .m-user.c6.queued { border-color: #f8bccd; }
html.light .m-user.c7.queued { border-color: #c1e9ad; }
html.light .m-user.c8.queued { border-color: #e4d9bf; }
html.light .m-user.c9.queued { border-color: #aae6f6; }

.swatches { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.swatches legend { padding: 0; font-size: 13px; font-weight: 650; color: var(--tx2); }
.swatch-row { display: flex; flex-wrap: nowrap; gap: 4px; }
.swatch { position: relative; flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 4px; cursor: pointer; }
.swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.swatch .sq { width: 32px; height: 32px; border-radius: 10px; }
.swatch .sq .check { display: none; width: 16px; height: 16px; }
.swatch:has(input:checked) .sq { box-shadow: 0 0 0 2px var(--surf), 0 0 0 4px var(--tx); }
.swatch:has(input:checked) .sq .check { display: block; }
.swatch .nm { font-size: 12.5px; color: var(--tx2); white-space: nowrap; }
.swatch:has(input:checked) .nm { color: var(--tx); font-weight: 650; }
.swatch:has(input:focus-visible) .sq { outline: 2px solid var(--acc); outline-offset: 6px; }
.swatches .help { font-size: 12.5px; color: var(--tx3); margin: 0; }
@media (max-width: 760px) {
  .swatch-row { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 8px 4px; }
  .swatch { min-width: 44px; min-height: 44px; }
}
