/* Astra — generated from the Astra design system (tokens.json + components/bundle.css, 21/10/2026).
   Themes: "orbita" (dark, default) and "dia" (light). Fonts are served locally (OFL), never from a CDN.
   Regenerate instead of editing by hand; the dashboard's own layout lives in app.css. */
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/chakra-petch-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --void: #04070d;
  --surface: #070c16;
  --surface-raised: #0c1424;
  --surface-overlay: #111c31;
  --line: #1a2740;
  --line-strong: #506a98;
  --ink: #e8f1ff;
  --ink-muted: #9db0cf;
  --ink-subtle: #7a8fb2;
  --astra: #2f8fff;
  --astra-hover: #57a6ff;
  --astra-bright: #7cc8ff;
  --astra-soft: #0a2142;
  --astra-glow: #2f8fff59;
  --on-astra: #020814;
  --focus: #7cc8ff;
  --success: #34d6b0;
  --success-soft: #062a26;
  --warning: #ffb84d;
  --warning-soft: #2e1f05;
  --danger: #ff6b7a;
  --danger-soft: #33101a;
  --on-danger: #1a0408;
  --grid: #2f8fff14;
  --link: var(--astra-bright);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-16: 64px;
  --radius-none: 0px;
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-full: 9999px;
  --chamfer-sm: 6px;
  --chamfer-md: 8px;
  --chamfer-lg: 10px;
  --font-display: "Chakra Petch", "Rajdhani", ui-sans-serif, sans-serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow-sm: 0 1px 2px #00000080;
  --shadow-lg: 0 16px 40px -8px #000000cc;
  --glow-sm: 0 0 0 1px #2f8fff66, 0 0 16px #2f8fff33;
  --glow-lg: 0 0 0 1px #7cc8ff80, 0 0 32px #2f8fff59;
}
:root[data-theme="dia"] {
  color-scheme: light;
  --void: #e9eef6;
  --surface: #f3f6fb;
  --surface-raised: #ffffff;
  --surface-overlay: #ffffff;
  --line: #d3dcea;
  --line-strong: #7389ab;
  --ink: #08142a;
  --ink-muted: #3f5276;
  --ink-subtle: #56698c;
  --astra: #0b5fd6;
  --astra-hover: #0a4fb5;
  --astra-bright: #0a5ccc;
  --astra-soft: #e2edff;
  --astra-glow: #0b5fd640;
  --on-astra: #ffffff;
  --focus: #0b5fd6;
  --success: #0a7a63;
  --success-soft: #dcf5ee;
  --warning: #8f5200;
  --warning-soft: #fdf0d8;
  --danger: #c4213a;
  --danger-soft: #fde4e8;
  --on-danger: #ffffff;
  --grid: #0b5fd60f;
  --link: var(--astra-bright);
  --shadow-sm: 0 1px 2px #08142a14, 0 1px 3px #08142a14;
  --shadow-lg: 0 12px 32px -6px #08142a2e;
  --glow-sm: 0 0 0 1px #0b5fd64d, 0 0 12px #0b5fd626;
  --glow-lg: 0 0 0 1px #0b5fd666, 0 0 24px #0b5fd633;
}


/* ============ Base ============ */
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 24px; -webkit-font-smoothing: antialiased; }
.as-stage { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: var(--space-6); }
.as-stage.is-col { flex-direction: column; align-items: stretch; }
.as-hud { background-color: var(--void); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: var(--space-8) var(--space-8); }
.as-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.as-label-text { font-family: var(--font-display); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
:where(.as-btn, .as-tab, .as-switch, .as-cite, .as-input-wrap):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ============ Icon / Mark ============ */
.as-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.as-icon.is-filled { fill: currentColor; stroke: none; }
.as-mark { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--astra-bright); }
.as-mark-orbit { fill: none; stroke: currentColor; stroke-width: 1.6; }
.as-mark-sat, .as-mark-star { fill: currentColor; }
.as-mark-word { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; color: var(--ink); line-height: 1; }

/* ============ Button ============ */
.as-btn { --c: var(--chamfer-md); --edge: var(--line-strong); --fill: var(--surface-raised); position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-5); border: 0; background: transparent; color: var(--ink); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color .16s ease, filter .2s ease; }
.as-btn::before, .as-btn::after { content: ""; position: absolute; transition: background-color .16s ease; }
.as-btn::before { inset: 0; z-index: -2; background: var(--edge); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.as-btn::after { inset: 1px; z-index: -1; background: var(--fill); clip-path: polygon(calc(var(--c) - .42px) 0, 100% 0, 100% calc(100% - var(--c) + .42px), calc(100% - var(--c) + .42px) 100%, 0 100%, 0 calc(var(--c) - .42px)); }
.as-btn-sm { --c: var(--chamfer-sm); height: 32px; padding: 0 var(--space-3); font-size: 11px; gap: 6px; }
.as-btn-lg { --c: var(--chamfer-lg); height: 48px; padding: 0 var(--space-6); font-size: 13px; }
.as-btn-primary { --edge: var(--astra); --fill: var(--astra); color: var(--on-astra); }
.as-btn-primary:hover:not(:disabled) { --edge: var(--astra-hover); --fill: var(--astra-hover); filter: drop-shadow(0 0 10px var(--astra-glow)); }
.as-btn-secondary:hover:not(:disabled) { --edge: var(--astra); --fill: var(--astra-soft); }
.as-btn-ghost { --edge: transparent; --fill: transparent; color: var(--ink-muted); }
.as-btn-ghost:hover:not(:disabled) { --fill: var(--astra-soft); color: var(--ink); }
.as-btn-danger { --edge: var(--danger); --fill: var(--danger-soft); color: var(--danger); }
.as-btn-danger:hover:not(:disabled) { --fill: var(--danger); color: var(--on-danger); }
.as-btn:active:not(:disabled) { transform: translateY(1px); }
.as-btn:disabled { cursor: not-allowed; opacity: .42; }
.as-btn.is-loading { opacity: .8; cursor: progress; }
.as-iconbtn { width: 40px; padding: 0; }
.as-iconbtn.as-btn-sm { width: 32px; }
.as-iconbtn.as-btn-lg { width: 48px; }
.as-spin { fill: none; stroke: currentColor; stroke-width: 2.5; animation: as-rot .8s linear infinite; }

/* ============ Input ============ */
.as-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 240px; }
.as-field-label { font-family: var(--font-display); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.as-input-wrap { display: flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-3); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink-subtle); transition: border-color .16s ease, box-shadow .16s ease; }
.as-input-wrap:hover { border-color: var(--ink-subtle); }
.as-input-wrap:focus-within { border-color: var(--astra); box-shadow: var(--glow-sm); color: var(--astra-bright); }
.as-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.as-input::placeholder { color: var(--ink-subtle); }
.as-input-suffix { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }
.as-field-hint { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.as-field.is-error .as-input-wrap { border-color: var(--danger); }
.as-field.is-error .as-input-wrap:focus-within { box-shadow: 0 0 0 1px var(--danger); }
.as-field.is-error .as-field-hint { color: var(--danger); }

/* ============ Switch ============ */
.as-switch { display: inline-flex; align-items: center; gap: var(--space-3); padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.as-switch-track { position: relative; width: 40px; height: 20px; flex: none; background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-xs); transition: background-color .2s ease, border-color .2s ease; }
.as-switch-thumb { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--ink-subtle); border-radius: 1px; transition: transform .22s cubic-bezier(.2,.8,.2,1), background-color .2s ease, box-shadow .2s ease; }
.as-switch[aria-checked="true"] .as-switch-track { background: var(--astra-soft); border-color: var(--astra); }
.as-switch[aria-checked="true"] .as-switch-thumb { transform: translateX(20px); background: var(--astra-bright); box-shadow: 0 0 8px var(--astra-glow); }
.as-switch:disabled { opacity: .42; cursor: not-allowed; }

/* ============ Tabs ============ */
.as-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); }
.as-tab { position: relative; display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); border: 0; background: none; color: var(--ink-muted); font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: color .16s ease; }
.as-tab:hover { color: var(--ink); }
.as-tab[aria-selected="true"] { color: var(--ink); }
.as-tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px; height: 2px; background: var(--astra-bright); box-shadow: 0 0 10px var(--astra-glow); }
.as-tab-count { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--ink-subtle); }
.as-tab[aria-selected="true"] .as-tab-count { color: var(--astra-bright); }

/* ============ Badge ============ */
.as-badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); color: var(--ink-muted); }
.as-badge-dot { width: 6px; height: 6px; flex: none; background: currentColor; }
.as-badge.is-pulse .as-badge-dot { animation: as-pulse 1.6s ease-in-out infinite; }
.as-badge-astra { border-color: var(--astra); background: var(--astra-soft); color: var(--astra-bright); }
.as-badge-success { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.as-badge-warning { border-color: var(--warning); background: var(--warning-soft); color: var(--warning); }
.as-badge-danger { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

/* ============ Panel & corners ============ */
.as-panel { position: relative; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-none); transition: border-color .2s ease, box-shadow .2s ease; }
.as-panel.is-active { border-color: var(--line-strong); box-shadow: var(--glow-sm); }
.as-corner { position: absolute; width: 10px; height: 10px; border: 0 solid var(--astra); pointer-events: none; z-index: 1; }
.as-corner-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.as-corner-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.as-corner-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.as-corner-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.as-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line); }
.as-panel-title { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-family: var(--font-display); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.as-panel-title::before { content: ""; width: 6px; height: 6px; background: var(--astra-bright); box-shadow: 0 0 6px var(--astra-glow); }
.as-panel-side { display: flex; align-items: center; gap: var(--space-2); }
.as-panel-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); }
.as-panel-body { padding: var(--space-4); }
.as-panel-body.is-flush { padding: 0; }

/* ============ AstraCore ============ */
.as-core { display: inline-flex; flex-direction: column; align-items: center; gap: var(--space-3); color: var(--astra-bright); }
.as-core-svg { overflow: visible; filter: drop-shadow(0 0 14px var(--astra-glow)); }
.as-core-svg circle, .as-core-svg path { transform-box: view-box; transform-origin: 60px 60px; }
.as-core-ring0 { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 2 5; animation: as-rot 40s linear infinite; }
.as-core-ring1 { fill: none; stroke: var(--astra); stroke-width: 2; stroke-dasharray: 54 12 18 12 70 12 18 99; animation: as-rot 18s linear infinite reverse; }
.as-core-ring2 { fill: none; stroke: var(--astra-bright); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; animation: as-rot 26s linear infinite; }
.as-core-halo { fill: none; stroke: var(--astra-bright); stroke-width: 1; opacity: .35; }
.as-core-heart { fill: var(--astra-soft); stroke: var(--astra-bright); stroke-width: 1.5; }
.as-core-star { fill: var(--astra-bright); }
.as-core-label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.as-core.is-idle .as-core-star { opacity: .8; }
.as-core.is-listening .as-core-halo { animation: as-ripple 1.8s ease-out infinite; }
.as-core.is-listening .as-core-heart { animation: as-breathe 1.8s ease-in-out infinite; }
.as-core.is-thinking .as-core-ring1 { animation-duration: 2.2s; }
.as-core.is-thinking .as-core-ring2 { animation-duration: 3.4s; opacity: 1; }
.as-core.is-thinking .as-core-ring0 { animation-duration: 8s; stroke: var(--astra); }
.as-core.is-thinking .as-core-star { animation: as-rot 2.2s cubic-bezier(.6,0,.4,1) infinite; }
.as-core.is-speaking .as-core-heart, .as-core.is-speaking .as-core-star { animation: as-beat .9s ease-in-out infinite; }
.as-core.is-speaking .as-core-halo { animation: as-ripple 0.9s ease-out infinite; }
.as-core.is-thinking .as-core-label, .as-core.is-speaking .as-core-label { color: var(--astra-bright); }

/* ============ Metric ============ */
.as-metric { display: flex; flex-direction: column; gap: var(--space-2); min-width: 180px; padding: var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); }
.as-metric-label { font-family: var(--font-display); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.as-metric-value { font-family: var(--font-display); font-size: 32px; line-height: 36px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.as-metric-unit { margin-left: 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.as-metric-foot { display: flex; align-items: flex-end; justify-content: space-between; min-height: 24px; }
.as-delta { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.as-delta.is-good { color: var(--success); }
.as-delta.is-bad { color: var(--danger); }
.as-spark polyline { fill: none; stroke: var(--astra-bright); stroke-width: 1.5; stroke-linejoin: round; }
.as-spark rect { fill: var(--astra-bright); }

/* ============ RelevanceMeter ============ */
.as-rel { display: inline-flex; align-items: center; gap: var(--space-2); }
.as-rel-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); }
.as-rel-bar { display: inline-flex; gap: 2px; }
.as-rel-seg { width: 5px; height: 12px; background: var(--line); border-radius: 1px; }
.as-rel-seg.is-on { background: var(--astra); }
.as-rel.is-high .as-rel-seg.is-on { background: var(--astra-bright); box-shadow: 0 0 4px var(--astra-glow); }
.as-rel.is-low .as-rel-seg.is-on { background: var(--ink-subtle); }
.as-rel-value { min-width: 32px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ============ Citation ============ */
.as-cite { --c: 4px; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin: 0 2px; padding: 0 4px; vertical-align: .12em; border: 0; background: var(--astra-soft); color: var(--astra-bright); font-family: var(--font-mono); font-size: 11px; font-weight: 600; line-height: 1; clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); cursor: default; transition: background-color .14s ease, color .14s ease; }
button.as-cite { cursor: pointer; }
button.as-cite:hover, .as-cite.is-active { background: var(--astra); color: var(--on-astra); }
button.as-cite:focus-visible { clip-path: none; outline-offset: 1px; }
.as-cite-static { margin: 0; flex: none; }

/* ============ SourceCard ============ */
.as-source { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); background: var(--surface-raised); border: 1px solid var(--line); transition: border-color .18s ease, box-shadow .18s ease; }
.as-source:hover { border-color: var(--line-strong); }
.as-source.is-active { border-color: var(--astra); box-shadow: var(--glow-sm); }
.as-source-head { display: flex; align-items: flex-start; gap: var(--space-3); }
.as-source-head .as-cite { margin-top: 3px; }
.as-source-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.as-source-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.as-source-path { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-source-kind { flex: none; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); }
.as-source-excerpt { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.as-hl { background: var(--astra-soft); color: var(--ink); box-shadow: inset 0 -1px 0 var(--astra); padding: 0 2px; }
.as-source-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--line); }
.as-source-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); }

/* ============ Message ============ */
.as-msg { display: flex; gap: var(--space-3); max-width: 720px; }
.as-msg-user { flex-direction: column; align-items: flex-end; margin-left: auto; gap: 4px; }
.as-msg-bubble { max-width: 560px; padding: var(--space-3) var(--space-4); background: var(--surface-overlay); border: 1px solid var(--line); color: var(--ink); font-size: 15px; line-height: 24px; }
.as-msg-avatar { --c: var(--chamfer-sm); flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: var(--astra-soft); color: var(--astra-bright); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
.as-msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.as-msg-head { display: flex; align-items: baseline; gap: var(--space-3); min-height: 28px; align-items: center; }
.as-msg-name { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--astra-bright); }
.as-msg-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); }
.as-msg-body { font-size: 15px; line-height: 26px; color: var(--ink); }
.as-msg-body p { margin: 0 0 var(--space-3); }
.as-msg-body p:last-child { margin-bottom: 0; }
.as-msg-body strong { font-weight: 600; }
.as-msg-actions { display: flex; gap: var(--space-1); margin-left: -8px; }
.as-caret { display: inline-block; width: 8px; height: 16px; margin-left: 3px; vertical-align: -2px; background: var(--astra-bright); box-shadow: 0 0 8px var(--astra-glow); animation: as-blink 1s steps(1) infinite; }

/* ============ QueryComposer ============ */
.as-composer { position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); background: var(--surface-raised); border: 1px solid var(--line-strong); transition: border-color .18s ease, box-shadow .18s ease; }
.as-composer:focus-within { border-color: var(--astra); box-shadow: var(--glow-sm); }
.as-composer-scope { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.as-composer-scope-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); }
.as-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--space-2); background: var(--astra-soft); color: var(--astra-bright); font-family: var(--font-mono); font-size: 11px; font-weight: 500; border-radius: var(--radius-xs); }
.as-composer-input { width: 100%; box-sizing: border-box; resize: none; padding: var(--space-1) 0; border: 0; background: transparent; color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 24px; outline: none; }
.as-composer-input::placeholder { color: var(--ink-subtle); }
.as-composer-bar { display: flex; align-items: center; gap: var(--space-3); }
.as-composer-tools { display: flex; gap: 2px; margin-left: -8px; }
.as-composer-hint { flex: 1; text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--ink-subtle); }
.as-composer.is-busy { border-color: var(--astra); }

/* ============ PipelineTrace ============ */
.as-trace { display: flex; flex-direction: column; gap: var(--space-2); }
.as-trace-list { list-style: none; margin: 0; padding: 0; }
.as-trace-step { position: relative; display: grid; grid-template-columns: 14px 1fr auto; gap: var(--space-3); padding-bottom: var(--space-4); }
.as-trace-step:last-child { padding-bottom: 0; }
.as-trace-step::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 2px; width: 1px; background: var(--line-strong); }
.as-trace-step:last-child::before { display: none; }
.as-trace-step.is-done::before { background: var(--astra); }
.as-trace-node { width: 14px; height: 14px; margin-top: 3px; box-sizing: border-box; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--on-astra); }
.as-trace-step.is-done .as-trace-node { background: var(--astra); border-color: var(--astra); }
.as-trace-step.is-done .as-trace-node .as-icon { stroke-width: 3; }
.as-trace-step.is-active .as-trace-node { border-color: var(--astra-bright); box-shadow: 0 0 0 3px var(--astra-soft), 0 0 10px var(--astra-glow); animation: as-pulse 1.4s ease-in-out infinite; }
.as-trace-step.is-error .as-trace-node { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.as-trace-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.as-trace-step.is-pending .as-trace-label { color: var(--ink-subtle); }
.as-trace-step.is-error .as-trace-label { color: var(--danger); }
.as-trace-detail { font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-subtle); margin-top: 2px; }
.as-trace-ms { font-family: var(--font-mono); font-size: 12px; line-height: 20px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.as-trace-step.is-active .as-trace-ms { color: var(--astra-bright); }
.as-trace-total { display: flex; justify-content: space-between; padding-top: var(--space-3); border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.as-trace-total span:last-child { color: var(--ink); font-weight: 600; }

/* ============ Motion ============ */
@keyframes as-rot { to { transform: rotate(360deg); } }
@keyframes as-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes as-blink { 50% { opacity: 0; } }
@keyframes as-ripple { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes as-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes as-beat { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  .as-core *, .as-spin, .as-caret, .as-badge-dot, .as-trace-node { animation: none !important; }
  .as-btn, .as-switch-thumb { transition: none; }
}
