/* Automations (preview). Every class starts with au- so nothing here touches the rest of the app.
   Look: a precise tool. Corners 2px (small parts), 3px (controls, steps), 4px (floating surfaces); no pills or circles.
   Wires turn at right angles. Motion is quick ease-out with no bounce; state shows in borders and a thin bar, not glows.
   Colors come from the app's own tokens, so light and dark follow Settings > Appearance.
   The one accent is the Site view route blue: the light that travels the wires during a run. */
:root {
  --au-canvas: #E3E6EA; --au-grid: rgba(16, 24, 40, .05); --au-grid-major: rgba(16, 24, 40, .09); --au-node: var(--surface); --au-wire: #B4BAC2;
  --au-panel: #ECEEF1; --au-panel-line: #D9DCE1;   /* light grey chrome; fields, buttons and cards stay white */
  --au-accent: #1570EF; --au-on-accent: #FFFFFF; --au-accent-soft: rgba(21, 112, 239, .10); --au-accent-glow: rgba(21, 112, 239, .32);
  --au-ok: #067647; --au-ok-soft: #ECFDF3; --au-wait: #B54708; --au-wait-soft: #FFFAEB; --au-bad: var(--red); --au-bad-soft: #FEF3F2;
  --au-shadow-1: 0 1px 2px rgba(16, 24, 40, .06);
  --au-shadow-2: 0 1px 2px rgba(16, 24, 40, .07), 0 2px 6px -2px rgba(16, 24, 40, .10);
  --au-shadow-pop: 0 1px 2px rgba(16, 24, 40, .08), 0 10px 24px -8px rgba(16, 24, 40, .22);
  --au-ease: cubic-bezier(.2, 0, 0, 1);
}
:root[data-theme="dark"] {
  --au-canvas: #141414; --au-grid: rgba(255, 255, 255, .035); --au-grid-major: rgba(255, 255, 255, .07); --au-node: #1E1E1E; --au-wire: #3D3D3D;
  --au-panel: var(--surface); --au-panel-line: var(--line);
  --au-accent: #84ADFF; --au-on-accent: #0B0B0B; --au-accent-soft: rgba(132, 173, 255, .14); --au-accent-glow: rgba(132, 173, 255, .40);
  --au-ok: #75E0A7; --au-ok-soft: #053321; --au-wait: #FEC84B; --au-wait-soft: #4E1D09; --au-bad: #F97066; --au-bad-soft: #55160C;
  --au-shadow-1: 0 1px 0 rgba(0, 0, 0, .35);
  --au-shadow-2: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 8px -2px rgba(0, 0, 0, .5);
  --au-shadow-pop: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 28px -8px rgba(0, 0, 0, .7);
}

/* ---- page frame: top bar, steps | canvas | details, playback under the canvas ---- */
main.au { height: 100vh; min-height: 540px; overflow: hidden; container: au / inline-size; background: var(--bg); color: var(--text); }
.au-grid { position: relative; height: 100%; display: grid; grid-template-columns: 252px minmax(0, 1fr) 328px; grid-template-rows: 54px minmax(0, 1fr) 58px;
  grid-template-areas: "top top top" "left canvas right" "left play right"; }
.au-top, .au-left, .au-right, .au-play { --line: var(--au-panel-line); }
.au-top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; background: var(--au-panel); border-bottom: 1px solid var(--line); min-width: 0; z-index: 30; }
.au-left { grid-area: left; background: var(--au-panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; z-index: 20; }
.au-right { grid-area: right; background: var(--au-panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; z-index: 20; }
.au-canvas { grid-area: canvas; position: relative; overflow: hidden; background-color: var(--au-canvas);
  background-image: linear-gradient(var(--au-grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--au-grid-major) 1px, transparent 1px),
    linear-gradient(var(--au-grid) 1px, transparent 1px), linear-gradient(90deg, var(--au-grid) 1px, transparent 1px);
  background-size: 110px 110px, 110px 110px, 22px 22px, 22px 22px; touch-action: none; }
.au-canvas.au-far { --au-grid: transparent; }   /* zoomed far out: major lines only, so the grid never turns to noise */
.au-canvas.au-panning { cursor: grabbing; }
.au-play { grid-area: play; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--au-panel); border-top: 1px solid var(--line); min-width: 0; z-index: 15; }
.au-scrim { display: none; }
.au-i { display: block; flex: none; }
.au-grow { flex: 1 1 auto; min-width: 0; }
.au-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.au-row.au-end { justify-content: flex-end; margin-top: 16px; }
.au [hidden], .au-pop [hidden] { display: none !important; }

/* ---- top bar ---- */
.au-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.au-crumb { white-space: nowrap; font-weight: 600; color: var(--text); }
.au-app-ico { display: block; flex: none; width: 22px; height: 22px; border-radius: 4px; }   /* the app's logo: Automations is its own app (Apps page) */
.au-sep { opacity: .6; }
.au-preview { font-size: 11px; font-weight: 600; color: var(--text-2); border: 1px solid var(--line-strong); border-radius: 2px; padding: 1px 8px; white-space: nowrap; cursor: help; }
.au-name { min-width: 80px; width: 22ch; max-width: min(400px, 100%); border: 1px solid transparent; background: transparent; border-radius: 2px; padding: 5px 7px; font: inherit; font-weight: 600; font-size: 14px; color: var(--text); }
.au-name:hover { border-color: var(--line-strong); }
.au-name:focus { outline: none; border-color: var(--au-accent); background: var(--surface); }
.au-save { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.au-save .au-dot { width: 6px; height: 6px; border-radius: 1px; background: var(--au-ok); }
.au-save.au-busy .au-dot { background: var(--au-wait); }
.au-save.au-err .au-dot { background: var(--au-bad); }
.au-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 2px; border: 1px solid var(--line-strong); background: var(--surface);
  font: inherit; font-size: 12.5px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.au-chip:hover { border-color: var(--muted); }
.au-chip.au-fix { color: var(--au-bad); border-color: var(--au-bad); background: var(--au-bad-soft); }
.au-chip.au-ready { color: var(--au-ok); }
.au-switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0 2px; font: inherit; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.au-track-sw { width: 34px; height: 20px; border-radius: 2px; background: var(--line-strong); position: relative; transition: background .18s; }
.au-track-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 1px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .16s var(--au-ease); }
.au-switch[aria-checked="true"] .au-track-sw { background: var(--au-ok); }
.au-switch[aria-checked="true"] .au-track-sw::after { transform: translateX(14px); }
.au-switch[aria-checked="true"] { color: var(--text); }
.au-narrow-l, .au-narrow-r { display: none !important; }

/* ---- buttons (same language as the app: black outline, black fill for the main action) ---- */
.au-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 13px; border-radius: 3px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .12s var(--au-ease), border-color .12s var(--au-ease); }
.au-btn:hover { border-color: var(--text); }
.au-btn:active { background-image: linear-gradient(rgba(0, 0, 0, .06), rgba(0, 0, 0, .06)); }
.au-btn[disabled] { opacity: .45; pointer-events: none; }
.au-btn.au-primary { background: var(--text); border-color: var(--text); color: var(--surface); }
.au-btn.au-primary:hover { opacity: .9; }
.au-btn.au-accent { background: var(--au-accent); border-color: var(--au-accent); color: var(--au-on-accent); }
.au-btn.au-ok { background: var(--au-ok); border-color: var(--au-ok); color: var(--surface); }
.au-btn.au-quiet { border-color: transparent; background: transparent; color: var(--text-2); }
.au-btn.au-quiet:hover { background: var(--subtle); border-color: transparent; }
.au-btn.au-danger { color: var(--au-bad); }
.au-btn.au-sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.au-btn.au-icon { width: 34px; padding: 0; }
.au-btn.au-sm.au-icon { width: 28px; }
.au-btn.au-full { width: 100%; }
.au-btn.au-mb { margin-bottom: 12px; }
.au :focus-visible, .au-pop :focus-visible, .au-modal :focus-visible { outline: 2px solid var(--au-accent); outline-offset: 2px; }

/* ---- side panels ---- */
.au-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.au-tab { border: 0; background: transparent; padding: 8px 10px 10px; margin-bottom: -1px; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.au-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.au-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--line); font-size: 11px; color: var(--text-2); }
.au-pane { flex: 1; overflow: auto; min-height: 0; overscroll-behavior: contain; }
.au-pad { padding: 14px 12px 6px; }
.au-search { position: relative; margin: 12px 12px 4px; }
.au-search .au-i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.au-search input { width: 100%; height: 34px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--subtle); padding: 0 10px 0 32px; font: inherit; font-size: 13px; color: var(--text); }
.au-search input:focus { outline: none; border-color: var(--au-accent); background: var(--surface); }
.au-group-h { padding: 14px 16px 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.au-lib-item { display: flex; gap: 11px; align-items: flex-start; margin: 0 8px; padding: 8px; border: 1px solid transparent; border-radius: 3px; cursor: grab; }
.au-lib-item:hover { background: var(--subtle); border-color: var(--line); }
.au-lib-t { display: block; font-weight: 600; font-size: 13px; line-height: 1.3; }
.au-lib-d { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.au-hint { margin: 10px 16px 18px; font-size: 12px; color: var(--muted); line-height: 1.45; }
/* step icons: bare glyphs, no boxes. Acter AI keeps the accent blue. */
.au-tile { width: 20px; height: 20px; display: grid; place-items: center; flex: none; color: var(--text); }
.au-g-ai { color: var(--au-accent); }
.au-lib-item .au-tile, .au-n-main .au-tile { margin-top: -1px; }
/* Automations tab: "Your automations" (what you built) above "Templates" (where to start) */
.au-sec-h { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 14px 16px 6px; font-size: 11.5px; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.au-sec-h .au-count { margin-left: 0; text-transform: none; letter-spacing: 0; }
.au-sec-tpl { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.au-sec-sub { margin: -2px 16px 8px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.au-mine { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.au-list-item { position: relative; display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 9px 10px 10px 12px; border-radius: 3px; border: 1px solid transparent;
  background: transparent; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.au-list-item:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.au-list-item[aria-current="true"] { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--au-shadow-1); }
.au-list-item[aria-current="true"]::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 0; background: var(--text); }
.au-li-t { display: block; font-weight: 600; font-size: 13px; line-height: 1.3; }
.au-li-d { display: block; font-size: 12px; line-height: 19px; color: var(--muted); }
.au-li-d .au-st { margin-right: 6px; vertical-align: top; }
.au-st { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 2px; font-size: 11px; font-weight: 650; white-space: nowrap; cursor: help; }
.au-st-off { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-2); }
.au-st-on { background: var(--au-ok-soft); color: var(--au-ok); }
.au-st-fix { background: var(--au-bad-soft); color: var(--au-bad); }
.au-st-ex { background: var(--au-accent-soft); color: var(--au-accent); }
.au-tpls { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 18px; }
.au-tpl { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 10px 11px 11px; border-radius: 3px; border: 1px dashed var(--line-strong);
  background: transparent; font: inherit; text-align: left; color: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
.au-tpl:hover, .au-tpl:focus-visible { border-style: solid; border-color: var(--text); background: var(--surface); }
.au-tpl-ico { flex: none; width: 20px; display: grid; place-items: center; margin-top: 1px; color: var(--text-2); }
.au-tpl-text { flex: 1; min-width: 0; }
.au-tpl-t { display: block; font-weight: 600; font-size: 13px; line-height: 1.3; }
.au-tpl-d { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.au-tpl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.au-tpl-m { font-size: 11.5px; color: var(--text-2); }
.au-tpl-use { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px; border-radius: 2px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text); }
.au-tpl:hover .au-tpl-use, .au-tpl:focus-visible .au-tpl-use { background: var(--text); border-color: var(--text); color: var(--surface); }

/* ---- details panel ---- */
.au-insp-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px 6px; }
.au-info-btn { flex: none; align-self: flex-start; margin: -2px -4px 0 auto; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 2px;
  background: transparent; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.au-info-btn:hover, .au-info-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.au-info-pop .au-opt.au-static { gap: 10px; line-height: 1.45; color: var(--text-2); }
.au-info-pop .au-opt .au-i { margin-top: 2px; color: var(--muted); }
.au-info-pop .au-opt b { color: var(--text); font-weight: 600; }
.au-info-pop .au-info-preview .au-i { color: var(--au-wait); }
.au-insp-k { font-size: 12px; color: var(--muted); }
.au-insp-t { font-weight: 650; font-size: 15.5px; line-height: 1.25; text-wrap: balance; overflow-wrap: anywhere; }
.au-section { padding: 12px 16px; border-top: 1px solid var(--line); }
.au-section h3 { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.au-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.au-field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.au-field input, .au-field select, .au-field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); color: var(--text); padding: 8px 10px; font: inherit; font-size: 13.5px; line-height: 1.4;
  box-shadow: var(--au-shadow-1); transition: border-color .12s, box-shadow .12s; }
.au-field input { height: 38px; }
.au-field input:hover, .au-field textarea:hover { border-color: var(--muted); }
.au-field textarea { resize: vertical; min-height: 64px; }
.au-field input:focus, .au-field select:focus, .au-field textarea:focus { outline: none; border-color: var(--au-accent); box-shadow: 0 0 0 3px var(--au-accent-soft); }

/* dropdowns: a button that opens a menu (the hidden <select> beside it keeps the value) */
.au-dd { display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 9px 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--au-shadow-1); transition: border-color .12s, box-shadow .12s; }
.au-dd:hover { border-color: var(--muted); }
.au .au-dd:focus-visible, .au-dd[aria-expanded="true"] { outline: none; border-color: var(--au-accent); box-shadow: 0 0 0 3px var(--au-accent-soft); }
.au-dd-v { display: flex; align-items: baseline; gap: 7px; flex: 1; min-width: 0; overflow: hidden; }
.au-dd-m { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--text); }
.au-dd-s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.au-dd-chev { color: var(--muted); transition: transform .18s ease, color .12s; }
.au-dd[aria-expanded="true"] .au-dd-chev { transform: rotate(180deg); color: var(--text); }
.au-av { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 2px; background: var(--subtle); border: 1px solid var(--line-strong);
  color: var(--text-2); font-size: 9px; font-weight: 700; letter-spacing: .03em; }
.au-av.au-me { background: var(--text); border-color: var(--text); color: var(--surface); font-size: 8px; }
.au-dd-ico { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 2px; background: var(--subtle); border: 1px solid var(--line); color: var(--text-2); }
.au-pop.au-dd-menu { min-width: 0; max-width: none; max-height: none; overflow: hidden; padding: 5px; }
.au-dd-search { position: relative; margin-bottom: 5px; }
.au-dd-search .au-i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.au-dd-q { width: 100%; height: 34px; padding: 0 10px 0 30px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--subtle); font: inherit; font-size: 13px; color: var(--text); }
.au-dd-q:focus { outline: none; border-color: var(--au-accent); background: var(--surface); }
.au-dd-list { max-height: 300px; overflow: auto; overscroll-behavior: contain; outline: none; }
.au-pop.au-dd-menu .au-dd-list:focus-visible, .au-pop.au-dd-menu .au-dd-q:focus-visible { outline: none; }
.au-dd-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 2px; line-height: 1.3; cursor: pointer; user-select: none; -webkit-user-select: none; }
.au-dd-opt.au-hl { background: color-mix(in srgb, var(--text) 6%, var(--surface)); }
.au-dd-opt .au-dd-v { flex-direction: column; align-items: flex-start; gap: 1px; }
.au-dd-opt .au-dd-m { font-weight: 500; }
.au-dd-opt[aria-selected="true"] .au-dd-m { font-weight: 650; }
.au-dd-opt .au-dd-s { font-size: 12px; }
.au-dd-ck { margin-left: auto; color: var(--au-accent); visibility: hidden; }
.au-dd-opt[aria-selected="true"] .au-dd-ck { visibility: visible; }
.au-dd-empty { padding: 12px 8px; font-size: 13px; color: var(--muted); }
.au-seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--line); }
.au-seg button { border: 0; background: transparent; padding: 4px 10px; border-radius: 2px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.au-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--au-shadow-1); }
.au-note { display: flex; gap: 9px; margin: 0 0 10px; padding: 10px 11px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.au-note .au-i { margin-top: 1px; color: var(--muted); }
.au-note b { font-weight: 600; color: var(--text); }
.au-note.au-bad { background: var(--au-bad-soft); border-color: transparent; color: var(--text); }
.au-note.au-bad .au-i { color: var(--au-bad); }
.au-note.au-warn { background: var(--au-wait-soft); border-color: transparent; color: var(--text); }
.au-note.au-warn .au-i { color: var(--au-wait); }
.au-note.au-ok .au-i { color: var(--au-ok); }
.au-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.au-stat { padding: 10px; border-radius: 3px; background: var(--subtle); border: 1px solid var(--line); }
.au-stat b { display: block; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.au-stat span { font-size: 11.5px; color: var(--muted); }
.au-issue { display: flex; gap: 9px; width: 100%; margin-bottom: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); font: inherit; font-size: 12.5px; line-height: 1.4; text-align: left; color: var(--text); cursor: pointer; }
.au-issue:hover { border-color: var(--text); }
.au-issue .au-i { color: var(--au-bad); margin-top: 1px; }
.au-issue.au-notes .au-i { color: var(--au-wait); }
.au-empty-panel { padding: 28px 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.au-empty-panel h4 { margin: 0 0 6px; color: var(--text); font-size: 14px; }
.au-empty-panel p { margin: 0 0 12px; }

/* ---- run log ---- */
.au-run-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.au-rh-t { font-weight: 650; font-size: 14px; }
.au-rh-s { font-size: 12px; color: var(--muted); }
.au-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 2px; font-size: 11.5px; font-weight: 600; background: var(--subtle); color: var(--text-2); white-space: nowrap; }
.au-pill.au-run { background: var(--au-accent-soft); color: var(--au-accent); }
.au-pill.au-wait { background: var(--au-wait-soft); color: var(--au-wait); }
.au-pill.au-ok { background: var(--au-ok-soft); color: var(--au-ok); }
.au-pill.au-bad { background: var(--au-bad-soft); color: var(--au-bad); }
.au-pd { width: 6px; height: 6px; border-radius: 1px; background: currentColor; }
.au-log { list-style: none; margin: 0; padding: 8px 0 20px; }
.au-log li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 8px 16px; cursor: pointer; animation: au-log-in .16s var(--au-ease) both; }
.au-log li.au-still, .au-log li.au-k-start { animation: none; }
.au-log li.au-k-start { cursor: default; }
.au-log li:hover { background: var(--subtle); }
.au-li-ico { width: 22px; height: 22px; border-radius: 2px; display: grid; place-items: center; background: var(--subtle); color: var(--text-2); }
.au-k-done .au-li-ico, .au-k-yes .au-li-ico, .au-k-approved .au-li-ico { background: var(--au-ok-soft); color: var(--au-ok); }
.au-k-wait .au-li-ico { background: var(--au-wait-soft); color: var(--au-wait); }
.au-k-rejected .au-li-ico, .au-k-warn .au-li-ico { background: var(--au-bad-soft); color: var(--au-bad); }
.au-k-end .au-li-ico { background: var(--text); color: var(--surface); }
.au-lt { font-weight: 600; font-size: 13px; line-height: 1.3; }
.au-lm { font-size: 12.5px; color: var(--text-2); line-height: 1.4; margin-top: 1px; }
.au-tag { display: inline-block; margin-top: 4px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 2px; font-size: 11px; color: var(--muted); }
.au-tm { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.au-approve-card { margin: 12px 12px 4px; padding: 14px; border-radius: 3px; border: 1px solid var(--au-wait); background: var(--surface); box-shadow: inset 3px 0 0 var(--au-wait); }
.au-ac-h { display: flex; align-items: center; gap: 7px; color: var(--au-wait); font-size: 12.5px; font-weight: 600; }
.au-ac-t { font-weight: 650; font-size: 15px; margin: 6px 0 4px; }
.au-approve-card p { margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.au-ac-ctx { margin-bottom: 12px; padding: 8px 10px; border-radius: 2px; background: var(--subtle); font-size: 12.5px; color: var(--text); }
.au-approve-card .au-fine { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); }
.au-ac-ctx b { font-weight: 600; }
.au-inline-approve .au-ia-doc { margin: 0 0 6px; padding: 6px 8px; border-radius: 2px; background: var(--subtle); color: var(--text); font-size: 12px; line-height: 1.4; }
.au-inline-approve .au-ia-where { margin: 0 0 8px; font-size: 11.5px; color: var(--muted); }
.au-inline-approve { width: 252px; }
.au-inline-approve .au-row { flex-wrap: nowrap; gap: 6px; }
.au-inline-approve .au-row .au-btn { flex: 1 1 auto; padding: 0 8px; }

/* ---- the canvas: steps and wires ---- */
.au-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.au-world.au-smooth { transition: transform .45s var(--au-ease); }
.au-canvas.au-smooth-bg { transition: background-size .45s var(--au-ease), background-position .45s var(--au-ease); }
.au-wires { position: absolute; left: -6000px; top: -6000px; width: 12000px; height: 12000px; overflow: visible; pointer-events: none; }
.au-wire { fill: none; stroke: var(--au-wire); stroke-width: 1.5; stroke-linejoin: miter; transition: stroke .2s var(--au-ease); }
.au-wire.au-lit { stroke: var(--au-accent); stroke-width: 2; }
.au-wire.au-dim { opacity: .35; }
.au-wire.au-sel { stroke: var(--text); stroke-width: 2; }
.au-wire.au-temp { stroke: var(--au-accent); stroke-dasharray: 4 4; display: none; }
.au-wire.au-temp.au-show { display: inline; }
.au-wire-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
/* a run: the wire fills behind a small square that travels it */
.au-trail { fill: none; stroke: var(--au-accent); stroke-width: 2; stroke-linejoin: miter; }
.au-pulse-core { fill: var(--au-accent); stroke: var(--au-canvas); stroke-width: 2; paint-order: stroke; }
.au-building .au-wire { stroke-dasharray: var(--au-len) var(--au-len); stroke-dashoffset: var(--au-len); animation: au-draw .42s var(--au-ease) forwards; animation-delay: var(--au-d, 0s); }

.au-node { position: absolute; width: 248px; background: var(--au-node); border: 1px solid var(--line-strong); border-radius: 3px; box-shadow: var(--au-shadow-2);
  cursor: grab; user-select: none; -webkit-user-select: none; transition: border-color .15s var(--au-ease), box-shadow .15s var(--au-ease), opacity .3s var(--au-ease); }
.au-node:hover { border-color: var(--muted); }
.au-node.au-gliding { transition: left .4s var(--au-ease), top .4s var(--au-ease); }
.au-node.au-dragging { cursor: grabbing; box-shadow: var(--au-shadow-pop); z-index: 5; }
.au-node.au-sel { outline: 1.5px solid var(--au-accent); outline-offset: 2px; }
.au-node.au-drop-ok { border-color: var(--au-accent); box-shadow: 0 0 0 1px var(--au-accent), var(--au-shadow-2); }
.au-building .au-node { animation: au-pop .3s var(--au-ease) both; animation-delay: var(--au-d, 0s); }
.au-n-main { display: flex; gap: 11px; padding: 12px 12px 11px; }
.au-n-text { min-width: 0; flex: 1; }
.au-n-kind { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.25; }
.au-n-title { margin-top: 3px; font-weight: 650; font-size: 13.5px; line-height: 1.28; overflow-wrap: anywhere; }
.au-n-detail { margin-top: 3px; font-size: 12.5px; color: var(--text-2); line-height: 1.38; overflow-wrap: anywhere; }
.au-n-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 12px 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.au-n-writes { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.au-n-warn { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-top: 1px solid var(--line); border-radius: 0 0 2px 2px; background: var(--au-bad-soft); color: var(--au-bad); font-size: 11.5px; font-weight: 600; }
.au-node.au-unguarded { border-color: var(--au-bad); }
.au-n-bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--au-accent); transform-origin: left center;
  transform: scaleX(var(--au-p, 0)); opacity: 0; transition: opacity .15s var(--au-ease); pointer-events: none; }
.au-n-badge { position: absolute; top: -1px; right: -1px; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 0 3px 0 3px; display: none; align-items: center;
  justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.au-node[data-state="running"] { border-color: var(--au-accent); box-shadow: 0 0 0 1px var(--au-accent), var(--au-shadow-2); }
.au-node[data-state="running"] .au-n-bar { opacity: 1; }
/* waiting for a person: a marching dashed bar along the top edge */
.au-node[data-state="waiting"] { border-color: var(--au-wait); box-shadow: 0 0 0 1px var(--au-wait), var(--au-shadow-2); }
.au-node[data-state="waiting"] .au-n-bar { opacity: 1; transform: none; height: 3px; background: linear-gradient(90deg, var(--au-wait) 50%, transparent 0) 0 0 / 10px 100%;
  animation: au-march .7s linear infinite; }
.au-node[data-state="done"] .au-n-badge, .au-node[data-state="yes"] .au-n-badge, .au-node[data-state="no"] .au-n-badge, .au-node[data-state="approved"] .au-n-badge { display: inline-flex; background: var(--au-ok); animation: au-fade .16s var(--au-ease); }
.au-node[data-state="no"] .au-n-badge { background: var(--text-2); }
.au-node[data-state="rejected"] .au-n-badge { display: inline-flex; background: var(--au-bad); animation: au-fade .16s var(--au-ease); }
.au-node[data-state="waiting"] .au-n-badge { display: inline-flex; background: var(--au-wait); }
:root[data-theme="dark"] .au-n-badge { color: #0B0B0B; }
.au-node[data-state="skipped"] { opacity: .38; }
.au-node[data-state="done"], .au-node[data-state="yes"], .au-node[data-state="no"], .au-node[data-state="approved"] { border-color: var(--au-ok); }
.au-port { position: absolute; width: 9px; height: 9px; border-radius: 1px; background: var(--surface); border: 1.5px solid var(--muted); transform: translate(-50%, -50%); z-index: 2; }
.au-port.au-in { top: 0; left: 50%; pointer-events: none; }
.au-port.au-out { top: 100%; cursor: crosshair; transition: border-color .12s var(--au-ease), background .12s var(--au-ease), box-shadow .12s var(--au-ease); }
.au-port.au-out::after { content: ""; position: absolute; inset: -8px; }   /* a bigger target than it looks */
.au-port.au-out:hover { border-color: var(--au-accent); background: var(--au-accent); box-shadow: 0 0 0 3px var(--au-accent-soft); }
.au-node[data-trigger="1"]::before { content: ""; position: absolute; left: 50%; top: -16px; width: 2px; height: 12px; border-radius: 2px; background: var(--text); transform: translateX(-50%); }
.au-port-label { position: absolute; top: 100%; transform: translate(-50%, 10px); padding: 1px 6px; border-radius: 2px; background: var(--au-canvas); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; pointer-events: none; transition: color .2s, background .2s; }
.au-node[data-state="yes"] .au-port-label[data-port="yes"], .au-node[data-state="no"] .au-port-label[data-port="no"], .au-node[data-state="approved"] .au-port-label[data-port="approved"] { color: var(--surface); background: var(--au-ok); }
.au-node[data-state="rejected"] .au-port-label[data-port="rejected"] { color: var(--surface); background: var(--au-bad); }
.au-add-next { position: absolute; top: 100%; transform: translate(-50%, 0); margin-top: 30px; width: 22px; height: 22px; padding: 0; border-radius: 2px; border: 1px dashed var(--muted);
  background: var(--au-canvas); color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: border-color .12s var(--au-ease), color .12s var(--au-ease), background .12s var(--au-ease); z-index: 1; }
.au-add-next::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 0; height: 25px; border-left: 1px dashed var(--au-wire); transform: translateX(-50%); }
.au-add-next:hover { border-style: solid; border-color: var(--au-accent); background: var(--surface); color: var(--au-accent); }
.au-has-labels .au-add-next { margin-top: 38px; }
.au-has-labels .au-add-next::before { height: 12px; }
.au-wire-add { position: absolute; width: 22px; height: 22px; padding: 0; border-radius: 2px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); box-shadow: var(--au-shadow-2);
  display: none; place-items: center; transform: translate(-50%, -50%); z-index: 4; cursor: pointer; }
.au-wire-add.au-show { display: grid; }
.au-wire-add:hover { background: var(--au-accent); border-color: var(--au-accent); color: var(--au-on-accent); }
.au-inline-approve { position: absolute; width: 212px; padding: 11px; border-radius: 4px; background: var(--surface); border: 1px solid var(--au-wait); box-shadow: var(--au-shadow-pop);
  z-index: 6; cursor: default; animation: au-pop .18s var(--au-ease) both; }
.au-ia-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--au-wait); }
.au-inline-approve p { margin: 5px 0 10px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }
.au-inline-approve .au-btn { flex: 1; }

/* ---- things floating on the canvas ---- */
/* The plain-English bar: one focus ring (the bar's), wraps long requests up to 4 lines, Build is grey until there's text */
.au-describe-wrap { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); width: min(680px, calc(100% - 32px)); z-index: 10; }
.au-describe { display: flex; align-items: flex-start; gap: 10px; padding: 7px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--au-shadow-2); transition: border-color .15s, box-shadow .15s; }
.au-describe:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line-strong)); }
.au-describe:focus-within { border-color: var(--au-accent); box-shadow: 0 0 0 4px var(--au-accent-soft), var(--au-shadow-2); }
.au-eye { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 2px; background: var(--au-accent-soft); color: var(--au-accent); }
.au-describe.au-loading .au-eye { animation: au-breathe 1s ease-in-out infinite; }
.au-describe-in { flex: 1; min-width: 0; height: 34px; min-height: 34px; padding: 6px 0; border: 0; background: transparent; resize: none; overflow-y: auto;
  font: inherit; font-size: 14.5px; line-height: 22px; color: var(--text); scrollbar-width: thin; }
.au-describe-in::placeholder { color: var(--muted); }
.au .au-describe-in:focus, .au .au-describe-in:focus-visible { outline: none; }
.au-describe-wrap kbd, .au-start kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 2px; background: var(--surface); font: inherit; font-size: 11px; font-weight: 650; line-height: 1; color: var(--text-2); }
.au-describe .au-slash { flex: none; align-self: center; margin-right: 2px; color: var(--muted); }
.au-describe:focus-within .au-slash, .au-describe.au-has-text .au-slash { display: none; }
.au-btn.au-build { flex: none; min-height: 34px; height: 34px; padding: 0 8px 0 14px; gap: 9px; border-radius: 3px; font-size: 13px; font-weight: 650; }
.au-btn.au-build:hover { border-color: var(--au-accent); filter: brightness(1.07); }
.au-build-k { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 1px; background: rgba(255, 255, 255, .2); }
.au-btn.au-build[disabled] { opacity: 1; background: var(--subtle); border-color: var(--line); color: var(--muted); }
.au-btn.au-build[disabled] .au-build-k { background: color-mix(in srgb, var(--text) 7%, transparent); }
.au-btn.au-build.au-busy { padding-right: 14px; background: var(--au-accent); border-color: var(--au-accent); color: var(--au-on-accent); }
.au-build.au-busy .au-build-k { display: none; }
.au-build.au-busy::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: au-spin .7s linear infinite; }

/* Under the bar: examples (empty or short), or a live read of what Build will make */
.au-suggest { display: none; margin-top: 8px; padding: 6px; max-height: min(460px, calc(100vh - 240px)); overflow-y: auto; border-radius: 4px; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--au-shadow-pop); animation: au-pop-in .14s var(--au-ease); }
.au-suggest.au-show { display: block; }
.au-suggest[data-mode="examples"] .au-sg-pv, .au-suggest[data-mode="preview"] .au-sg-exs { display: none; }
.au-sg-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 10px 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); }
.au-sg-m { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-2); font-variant-numeric: tabular-nums; }
.au-sg-list { display: flex; flex-direction: column; gap: 2px; }
.au-ex { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 3px; background: transparent; font: inherit; font-size: 13.5px;
  line-height: 1.45; color: var(--text); text-align: left; cursor: pointer; }
.au-ex[aria-selected="true"] { background: var(--au-accent-soft); }
.au-ex-ico { flex: none; display: grid; place-items: center; width: 22px; color: var(--text-2); }
.au-ex[aria-selected="true"] .au-ex-ico { color: var(--au-accent); }
.au-ex-t { flex: 1; min-width: 0; }
.au-describe-wrap .au-ex-k { flex: none; visibility: hidden; }
.au-describe-wrap .au-ex[aria-selected="true"] .au-ex-k { visibility: visible; border-color: color-mix(in srgb, var(--au-accent) 35%, transparent); color: var(--au-accent); }
.au-sg-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 6px -6px -6px; padding: 9px 14px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 2.5%, var(--surface)); font-size: 12px; color: var(--text-2); }
.au-sg-hint { justify-content: flex-start; gap: 18px; color: var(--muted); }
.au-sg-hint > span, .au-sg-keys { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.au-sg-keys { color: var(--muted); }
.au-sg-rule { display: flex; align-items: center; gap: 7px; min-width: 0; line-height: 1.4; }
.au-sg-rule .au-i { flex: none; color: var(--au-ok); }
/* the preview reads top to bottom like the canvas: glyphs on one wire */
.au-pv { list-style: none; margin: 0; padding: 0 4px 4px; }
.au-pv-step { position: relative; display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 0 6px; font-size: 13.5px; color: var(--text); }
.au-pv-step:not(:last-child)::after { content: ""; position: absolute; left: 17.25px; top: 26px; bottom: -9px; width: 1.5px; border-radius: 1px; background: var(--line-strong); }
.au-pv-ico { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--text-2); }
.au-pv-start .au-pv-ico { color: var(--text); }
.au-pv-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.au-pv-tag { flex: none; padding: 2px 8px; border-radius: 2px; background: color-mix(in srgb, var(--text) 6%, transparent); font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.au-pv-ap .au-pv-tag { background: var(--au-ok-soft); color: var(--au-ok); }
.au-pv-w .au-pv-tag { background: var(--au-wait-soft); color: var(--au-wait); }
.au-pv-ai .au-pv-ico { color: var(--au-accent); }
.au-pv-ai .au-pv-tag { background: var(--au-accent-soft); color: var(--au-accent); }
.au-pv-side { margin: 0 10px 6px 46px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.au-pv-side b { font-weight: 600; color: var(--text-2); }
.au-zoom { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--au-shadow-2); z-index: 10; }
.au-zl { min-width: 46px; height: 28px; border: 0; border-radius: 2px; background: transparent; font: inherit; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; cursor: pointer; }
.au-zl:hover { background: var(--subtle); }
.au-div { width: 1px; height: 18px; margin: 0 3px; background: var(--line); }
.au-minimap { position: absolute; right: 14px; bottom: 14px; width: 168px; height: 108px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--au-shadow-2); z-index: 10; overflow: hidden; cursor: pointer; }
.au-minimap.au-hidden { display: none; }
.au-mm { fill: var(--line-strong); }
.au-mm.au-on { fill: var(--au-accent); }
.au-mm-vp { fill: var(--au-accent-soft); stroke: var(--au-accent); stroke-width: 1.2; }
/* The start card on an empty canvas. It steps back while the bar is open, so the bar has the focus. */
.au-empty { position: absolute; inset: 88px 16px 64px; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 8; }
.au-start { pointer-events: auto; width: min(580px, 100%); max-height: 100%; overflow-y: auto; padding: 26px 26px 18px; border-radius: 4px; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--au-shadow-2); transition: opacity .15s var(--au-ease); }
.au-suggesting .au-start { opacity: .35; }
.au-start h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; text-wrap: balance; }
.au-start-sub { margin: 6px 0 18px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.au-start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.au-trig { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface);
  font: inherit; text-align: left; color: var(--text); cursor: pointer; transition: border-color .12s var(--au-ease), background .12s var(--au-ease); }
.au-trig:hover { border-color: var(--text); }
.au-trig:active { background: var(--subtle); }
.au-trig-ico { flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: var(--text); }
.au-trig-text { flex: 1; min-width: 0; padding-right: 14px; }
.au-trig-t { display: block; font-size: 13.5px; font-weight: 650; line-height: 22px; }
.au-trig-d { display: block; margin-top: 1px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.au-trig-go { position: absolute; right: 12px; top: 17px; display: grid; color: var(--text); opacity: 0; transform: translateX(-4px); transition: opacity .12s var(--au-ease), transform .12s var(--au-ease); }
.au-trig:hover .au-trig-go, .au-trig:focus-visible .au-trig-go { opacity: 1; transform: none; }
.au-start-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.au-start-or::before, .au-start-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au-start-tpls { display: flex; flex-direction: column; gap: 1px; margin: 0 -10px; }
.au-start-tpl { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 3px; background: transparent; font: inherit; font-size: 13px; color: var(--text);
  text-align: left; cursor: pointer; }
.au-start-tpl:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.au-start-tpl-ico { flex: none; display: grid; place-items: center; width: 22px; color: var(--text-2); }
.au-start-tpl-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.au-start-tpl-m { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.au-start-tip { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 14px -26px -18px; padding: 11px 16px; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 2.5%, var(--surface)); font-size: 12px; color: var(--muted); }
.au-start-dot { width: 3px; height: 3px; margin: 0 3px; border-radius: 1px; background: currentColor; opacity: .6; }
.au-chip.au-todo { color: var(--text-2); }
.au-chip.au-todo .au-i { opacity: .75; }

/* ---- playback bar ---- */
.au-pb { width: 36px; min-height: 36px; height: 36px; padding: 0; border-radius: 3px; flex: none; }
.au-run-pick { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 200px; padding: 4px 8px; border: 0; border-radius: 2px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; flex: none; }
.au-run-pick:hover { background: var(--subtle); }
.au-rp-t { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.au-rp-s { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.au-track { position: relative; flex: 1; min-width: 80px; height: 30px; cursor: pointer; touch-action: none; }
.au-rail { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 0; background: var(--line-strong); }
.au-fill { position: absolute; left: 0; top: 50%; width: 0; height: 2px; margin-top: -1px; border-radius: 0; background: var(--au-accent); }
.au-tick { position: absolute; top: 50%; width: 2px; height: 10px; margin-top: -5px; border-radius: 0; background: var(--muted); opacity: .6; transform: translateX(-50%); }
.au-tick.au-ok { background: var(--au-ok); opacity: 1; }
.au-tick.au-wait { background: var(--au-wait); opacity: 1; }
.au-tick.au-bad { background: var(--au-bad); opacity: 1; }
.au-head { position: absolute; top: 50%; width: 3px; height: 20px; margin-top: -10px; border-radius: 1px; background: var(--au-accent); transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--au-panel); }
.au-time { min-width: 84px; text-align: right; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.au-play-empty { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; font-size: 13px; color: var(--text-2); }
.au-play-empty span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- on the body: popovers, toasts, dialog ---- */
.au-pop { position: fixed; z-index: 60; min-width: 240px; max-width: 320px; max-height: min(460px, 70vh); overflow: auto; padding: 6px; border-radius: 4px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: var(--au-shadow-pop); font-size: 13px; animation: au-pop-in .14s var(--au-ease); }
.au-pop-h { padding: 8px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.au-pop-sep { margin: 4px 0; border-top: 1px solid var(--line); }
.au-pop-search { width: 100%; height: 32px; margin-bottom: 4px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--subtle); font: inherit; font-size: 13px; color: var(--text); }
.au-pop-search:focus { outline: none; border-color: var(--au-accent); }
.au-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 2px; background: transparent; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.au-opt:hover, .au-opt.au-hl { background: var(--subtle); }
.au-opt.au-static { cursor: default; align-items: flex-start; }
.au-opt.au-static:hover { background: transparent; }
.au-opt .au-tile { width: 20px; height: 20px; }
.au-opt-t { display: block; }
.au-opt-s { display: block; font-size: 11.5px; color: var(--muted); }
.au-toasts { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 80; pointer-events: none; }
.au-toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 3px; background: var(--text); color: var(--surface);
  font-size: 13px; box-shadow: var(--au-shadow-pop); pointer-events: auto; animation: au-toast-in .16s var(--au-ease); transition: opacity .2s var(--au-ease); }
.au-toast.au-out { opacity: 0; }
.au-toast-act { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.au-modal-bg { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(10, 12, 15, .42); animation: au-fade .12s var(--au-ease); }
.au-modal { width: min(440px, calc(100vw - 32px)); padding: 20px; border-radius: 4px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--au-shadow-pop); }
.au-modal h2 { margin: 0 0 12px; font-size: 17px; }
.au-keys { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 13px; }
.au-keys kbd { padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--subtle); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }

@keyframes au-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes au-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes au-draw { to { stroke-dashoffset: 0; } }
@keyframes au-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes au-march { to { background-position: 10px 0; } }
@keyframes au-log-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes au-toast-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes au-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes au-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .au *, .au *::before, .au *::after, .au-pop, .au-toast, .au-modal-bg { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- narrower: steps slide in from the left, then details from the right ---- */
@container au (max-width: 1060px) {
  .au-grid { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "top top" "canvas right" "play right"; }
  .au-left { position: absolute; left: 0; top: 54px; bottom: 0; width: 284px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--au-shadow-pop); z-index: 50; }
  .au-show-left .au-left { transform: none; }
  .au-narrow-l { display: inline-flex !important; }
  .au-show-left .au-scrim { display: block; position: absolute; inset: 54px 0 0 0; z-index: 45; background: rgba(10, 12, 15, .25); }
  .au-save { display: none; }
}
@container au (max-width: 760px) {
  .au-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "canvas" "play"; }
  .au-right { position: absolute; right: 0; top: 54px; bottom: 0; width: min(340px, 92%); transform: translateX(102%); transition: transform .22s ease; box-shadow: var(--au-shadow-pop); z-index: 50; }
  .au-show-right .au-right { transform: none; }
  .au-show-right .au-scrim { display: block; position: absolute; inset: 54px 0 0 0; z-index: 45; background: rgba(10, 12, 15, .25); }
  .au-narrow-r { display: inline-flex !important; }
  .au-wide-only, .au-crumb, .au-sep, .au-minimap, .au-play .au-seg { display: none !important; }
  .au-top { gap: 8px; padding: 0 8px; }
  .au-title { flex: 1; }
  .au-name { width: 100%; }
  .au-ct, .au-test .au-lbl { display: none; }
  .au-test { width: 34px; padding: 0; }
  .au-run-pick { max-width: 120px; }
  .au-time { min-width: 0; }
  .au-describe-wrap { top: 10px; }
  .au-empty { inset: 76px 10px 60px; }
  .au-sg-hint > span:last-child { display: none; }
}
@container au (max-width: 600px) {
  .au-start { padding: 20px 18px 14px; }
  .au-start-tip { margin: 12px -18px -14px; }
  .au-start-grid { grid-template-columns: 1fr; gap: 8px; }
  .au-trig { padding: 12px; }
  .au-start-tpl-m, .au-pv-tag, .au-sg-keys { display: none; }
}
