
/* Layout: console shell. Fixed left rail with two products (VMs, Services) and shared tools; work area on the right. Services use a dotted canvas with a side panel. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --sunk: #eceff3;
  --line: #dadfe6;
  --fg: #161a20;
  --muted: #5a6472;
  --accent: #2743a6;
  --accent-soft: #e6eafb;
  --good: #1b7a45;
  --good-soft: #e3f3ea;
  --warn: #9a5b00;
  --warn-soft: #fbf0dc;
  --bad: #b42318;
  --bad-soft: #fbe6e3;
  --dot: #cfd5dd;
  --purple: #6b3fb8;
  --purple-soft: #f1ebfb;
  --scrim: rgba(20, 26, 36, .38);
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 4px 14px rgba(20, 30, 50, .06);
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1216; --surface: #161a20; --sunk: #1c2128; --line: #2b313a; --fg: #e5e8ec; --muted: #98a2ae;
    --accent: #93a6ff; --accent-soft: #232b4d; --good: #4cc38a; --good-soft: #15321f; --warn: #e3a54a; --warn-soft: #3a2a10;
    --bad: #f27a6e; --bad-soft: #3d1a17; --dot: #2a3039; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
    --purple: #c4a5ff; --purple-soft: #2a1f42; --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1216; --surface: #161a20; --sunk: #1c2128; --line: #2b313a; --fg: #e5e8ec; --muted: #98a2ae;
  --accent: #93a6ff; --accent-soft: #232b4d; --good: #4cc38a; --good-soft: #15321f; --warn: #e3a54a; --warn-soft: #3a2a10;
  --bad: #f27a6e; --bad-soft: #3d1a17; --dot: #2a3039; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --purple: #c4a5ff; --purple-soft: #2a1f42; --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-sans); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--f-mono); font-size: 12.5px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.shell { display: grid; grid-template-columns: 236px 1fr; grid-template-rows: auto 1fr; min-height: 100%; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.project { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--muted); }
.project b { color: var(--fg); font-weight: 500; }
.topbar .spacer { flex: 1; }
.who { font-size: 13px; color: var(--muted); }

.rail { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.rail .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 6px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; border: 0; background: none; text-align: left; cursor: pointer; width: 100%; color: var(--fg); }
.nav:hover { background: var(--sunk); }
.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.nav svg { flex: none; }
.nav small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.nav[aria-current="page"] small { color: var(--accent); opacity: .8; }

main { padding: 24px 28px 48px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 64ch; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.good { color: var(--good); border-color: var(--good); }
.btn.bad { color: var(--bad); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel-pad { padding: 16px 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small-t { font-size: 12.5px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--sunk); }
tbody tr { cursor: default; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--sunk); }
tr:last-child td { border-bottom: 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.good { color: var(--good); background: var(--good-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.idle { color: var(--muted); background: var(--sunk); }
.pill.info { color: var(--accent); background: var(--accent-soft); }
.pill.plain::before { display: none; }
.pill.purple { color: var(--purple); background: var(--surface); border-color: var(--purple); }

.hallmark { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 99px; font-weight: 600; font-size: 13px; }
.hallmark .seal { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; font-size: 12px; }
.hallmark.good { color: var(--good); background: var(--good-soft); }
.hallmark.warn { color: var(--warn); background: var(--warn-soft); }
.hallmark.bad { color: var(--bad); background: var(--bad-soft); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-bottom: 16px; }
.tab { padding: 9px 14px; border: 0; background: none; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 500; }
input[type=text], select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.55; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.choice { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.choice b { font-weight: 600; }
.choice small { color: var(--muted); font-size: 12px; }
.choice:disabled { cursor: not-allowed; opacity: .6; background: var(--sunk); }
.choice .tagrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.linklike:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.policy-card { border: 1px dashed var(--accent); border-radius: 8px; padding: 14px 16px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 12px; }
.policy-card .kv { font-size: 13px; align-items: center; }
.radio-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.radio-item { display: grid; grid-template-columns: 18px minmax(0,1fr); gap: 10px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.radio-item:last-child { border-bottom: 0; }
.radio-item input { margin: 3px 0 0; accent-color: var(--accent); }
.radio-item b { font-weight: 600; display: block; }
.radio-item small { color: var(--muted); font-size: 12px; display: block; }
.radio-item.on { background: var(--accent-soft); }
.radio-item.off { cursor: not-allowed; opacity: .55; }
.export-toggle { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--warn); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch .track, .switch .track::after { transition: none; } }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button { padding: 3px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 500; cursor: default; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.seg button[data-recipient]:not([aria-pressed="true"]) { cursor: pointer; }
.seg button[data-recipient]:not([aria-pressed="true"]):hover { border-color: var(--accent); color: var(--accent); }
.seg button:disabled { opacity: .45; cursor: not-allowed; background: var(--sunk); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.hash { font-family: var(--f-mono); font-size: 12px; overflow-wrap: anywhere; color: var(--fg); }
.codebox { position: relative; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-family: var(--f-mono); font-size: 12.5px; overflow-x: auto; white-space: pre; }
.codebox .copy { position: absolute; top: 6px; right: 6px; }

.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 6px; background: var(--sunk); font-size: 13px; color: var(--muted); }
.note b { color: var(--fg); font-weight: 500; }
.note.info { background: var(--accent-soft); color: var(--fg); }

.layers { display: flex; flex-direction: column; }
.layer { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.layer:last-child { border-bottom: 0; }
.layer .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-top: 1px; }
.ic.good { background: var(--good-soft); color: var(--good); }
.ic.bad { background: var(--bad-soft); color: var(--bad); }
.ic.warn { background: var(--warn-soft); color: var(--warn); }
.ic.idle { background: var(--sunk); color: var(--muted); }
.layer p { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }

/* services canvas */
.svc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.svc-layout.open { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); }
.canvas { position: relative; min-height: 460px; border: 1px solid var(--line); border-radius: 10px; background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; padding: 28px; display: flex; flex-wrap: wrap; gap: 28px; align-content: flex-start; }
.card { width: 250px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 14px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.card:hover { border-color: var(--muted); }
.card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.card .top { display: flex; align-items: center; gap: 10px; }
.card .glyph { width: 30px; height: 30px; border-radius: 7px; background: var(--sunk); display: grid; place-items: center; flex: none; }
.card .name { font-weight: 600; }
.card .sub { font-size: 12px; color: var(--muted); font-family: var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.card .foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .foot .pill { flex: none; }
.card.new { border-style: dashed; box-shadow: none; background: transparent; align-items: center; justify-content: center; min-height: 138px; color: var(--muted); font-weight: 500; }
.canvas-legend { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: var(--muted); }
.side { min-width: 0; }
.side .panel { position: sticky; top: 12px; }
.side-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 0; }
.side-body { padding: 0 18px 18px; }
.x { background: none; border: 0; cursor: pointer; font-size: 18px; color: var(--muted); padding: 2px 6px; border-radius: 4px; }
.x:hover { background: var(--sunk); }

/* deploy steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 10px; padding: 8px 0; align-items: start; font-size: 13px; }
.step .ic { width: 20px; height: 20px; font-size: 11px; }
.step .who { font-size: 11.5px; color: var(--muted); font-family: var(--f-mono); }
.step.wait { opacity: .55; }
.step.run .ic { background: var(--accent-soft); color: var(--accent); animation: pulse 1s ease-in-out infinite; }
.step p { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
@keyframes pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .step.run .ic { animation: none; } }

.lint { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lint li { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.lint li.error { background: var(--bad-soft); }
.lint li.warning { background: var(--warn-soft); }
.lint li.ok { background: var(--good-soft); }
.lint li p { color: var(--muted); font-size: 12px; }
.lint .ic { width: 20px; height: 20px; font-size: 11px; }

.diff { font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.diff div { padding: 3px 10px; white-space: pre; }
.diff .ln { color: var(--muted); display: inline-block; width: 3ch; }
.diff .del { background: var(--bad-soft); }
.diff .add { background: var(--good-soft); }

.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.level { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.level .n { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.level p { font-size: 12.5px; color: var(--muted); }

.logs { background: var(--sunk); border-radius: 6px; padding: 10px 12px; font-family: var(--f-mono); font-size: 12px; overflow-x: auto; white-space: pre; line-height: 1.6; }

.toast { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); max-width: min(360px, calc(100% - 40px)); }

.trustpage { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.trustpage .bar { background: var(--sunk); padding: 6px 12px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
.trustpage .body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1100px) {
  .svc-layout.open { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .rail .label { display: none; }
  .nav { width: auto; white-space: nowrap; }
  .nav small { display: none; }
  main { padding: 18px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .who { display: none; }
  .canvas { padding: 16px; gap: 16px; min-height: 0; padding-bottom: 40px; }
  .card { width: 100%; }
}
/* Design doc bubbles: a small ID pill; hover or tap shows a card that links to that section of the design doc. */
.dref { display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px; height: 18px; border-radius: 99px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font: 600 10.5px/1 var(--f-mono); vertical-align: middle; cursor: help; letter-spacing: 0; text-transform: none; }
.dref:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#dtip { position: fixed; z-index: 1000; max-width: 300px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 12px; font-size: 12.5px; line-height: 1.45; display: none; }
#dtip b { display: block; margin-bottom: 4px; }
#dtip p { color: var(--muted); margin: 0 0 8px; }
#dtip a { color: var(--accent); font-weight: 600; text-decoration: none; }
#dtip a:hover { text-decoration: underline; }
.rail .doclink { margin-top: auto; padding: 10px; font-size: 12px; color: var(--accent); text-decoration: none; }
/* demo scenario: registry, signing modal, demo drawer */
[hidden] { display: none !important; }
main { padding-bottom: 120px; }
body.drawer-open main { padding-bottom: 380px; }
.toast { z-index: 300; }
.canvas-empty { align-self: center; max-width: 260px; color: var(--muted); font-size: 13px; }
.step.fail b { color: var(--bad); }
.note.warn { background: var(--warn-soft); color: var(--fg); }
.note.warn > span:first-child { color: var(--bad); font-weight: 600; }
.addbox { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.addbox.on { border-color: var(--accent); background: var(--accent-soft); }
.addbox input { margin: 3px 0 0; accent-color: var(--accent); }
.addbox b { display: block; font-weight: 600; }
.addbox small { display: block; color: var(--muted); font-size: 12px; }
.strip { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
.sbox { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); min-width: 0; }
.sbox b { color: var(--fg); font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.sarr { align-self: center; color: var(--muted); }
.pend.hl { box-shadow: 0 0 0 3px var(--purple); }
details.os summary { cursor: pointer; }
details.os summary h2 { display: inline; }
details.os[open] summary { margin-bottom: 8px; }
.files td:last-child { white-space: normal; overflow-wrap: anywhere; min-width: 180px; }
.scrim { position: fixed; inset: 0; z-index: 200; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.device { animation: pulse 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .device { animation: none; } }
.drawer { position: fixed; z-index: 100; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.drawer-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; background: none; border: 0; cursor: pointer; text-align: left; }
.drawer-head b { flex: 1; }
.scenes { list-style: none; margin: 0; padding: 0 14px; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.scenes li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; font-size: 12.5px; }
.scenes .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.scenes p { color: var(--muted); font-size: 12px; }
.scenes li.ok b { color: var(--muted); font-weight: 500; }
.drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); margin-top: 10px; }
@media (max-width: 760px) {
  .strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sarr { display: none; }
  .drawer { left: 0; right: 0; bottom: 0; width: auto; border-radius: 10px 10px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .scenes { max-height: 28vh; }
  body.drawer-open main { padding-bottom: 50vh; }
  .scenes p { display: none; }
  .drawer-foot { margin-top: 6px; padding-block: 6px; }
  .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }
}
/* recorded run: operation cards, event dots, log, contract view */
.banner-rec { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--fg); font-size: 13px; margin-bottom: 16px; }
.banner-rec b { font-weight: 600; }
.rec { display: inline-block; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; margin-left: 4px; white-space: nowrap; vertical-align: middle; }
.ops { display: flex; flex-direction: column; gap: 12px; }
.opcard { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.opcard .ev { display: grid; grid-template-columns: 26px 108px minmax(0, 1fr); gap: 4px 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.opcard .ev:first-of-type { border-top: 0; }
.ev .seq, .ev .stage { color: var(--muted); font-family: var(--f-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.ev .when { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.ev .msg { display: block; overflow-wrap: anywhere; }
.ev .evd { display: block; font-family: var(--f-mono); font-size: 11.5px; overflow-wrap: anywhere; }
.ev.sel { background: var(--accent-soft); border-radius: 6px; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; background: transparent; padding: 0; cursor: pointer; }
.dot.first { margin-left: 10px; }
.dot.first:first-child { margin-left: 0; }
.dot.good { color: var(--good); }
.dot.bad { color: var(--bad); }
.dot.warn { color: var(--warn); }
.dot.info { color: var(--accent); }
.dot.run { color: var(--accent); animation: pulse 1s ease-in-out infinite; }
.dot.sel, .dot:hover { background: currentColor; }
.dot.sel { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 30%, transparent); }
.evdetail { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.logs { white-space: pre-wrap; overflow-wrap: anywhere; }
.logs .t { color: var(--muted); }
.regs { font-family: var(--f-mono); font-size: 11.5px; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; overflow-wrap: anywhere; margin-top: 8px; }
.regs dt { color: var(--muted); }
.regs dd { margin: 0; min-width: 0; }
.appframe .body form { display: flex; gap: 8px; flex-wrap: wrap; }
.appframe input[type=text] { width: auto; flex: 1; min-width: 160px; }
#modePills { display: inline-flex; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) {
  .opcard .ev { grid-template-columns: 24px minmax(0, 1fr); }
  .ev .stage { grid-column: 2; }
  .ev .body { grid-column: 2; }
}

.official-style-0 { gap:8px }
.official-style-1 { color:var(--bad) }
.official-style-2 { margin-bottom:16px;border-color:var(--accent) }
.official-style-3 { justify-content:space-between }
.official-style-4 { max-width:880px }
.official-style-5 { grid-column:1/-1 }
.official-style-6 { color:var(--warn) }
.official-style-7 { flex-wrap:nowrap }
.official-style-8 { min-width:0 }
.official-style-9 { padding-top:12px }
.official-style-10 { gap:4px }
.official-style-11 { width:100%;height:280px;border:0;background:var(--surface) }
.official-style-12 { margin-top:8px }
.official-style-13 { cursor:pointer }
.official-style-14 { gap:6px }
.official-style-15 { font-size:12px;overflow-wrap:anywhere }
.official-style-16 { margin-top:12px }
.official-style-17 { align-items:start }
.official-style-18 { justify-content:space-between;border-bottom:1px solid var(--line) }
.official-style-19 { margin-top:16px }