/* Generated by `cargo run -p alpoai_ui --bin gen-css` (alpoai_ui prims) — do not edit.
   Class contract: alpo_ui_dom::dom. Boxes are checked against the hub by
   alpo_ui_dom/tests/conformance.rs. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--alpo-font); font-size: 14px; line-height: var(--alpo-leading);
  color: var(--alpo-ink); background: var(--alpo-canvas);
  -webkit-font-smoothing: antialiased; font-synthesis: none; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, blockquote, pre { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; }
.a-ic { width: 16px; height: 16px; flex-shrink: 0; }

/* appkit::page */
.a-page {
  display: flex; flex-direction: column; gap: 16px; padding: 24px;
  width: 100%; min-height: 100vh; background: var(--alpo-canvas);
}

/* appkit::stack — Col/Row (rows centre their items) */
.a-col { display: flex; flex-direction: column; min-width: 0; }
.a-row { display: flex; flex-direction: row; align-items: center; min-width: 0; }
.a-gap-none { gap: var(--alpo-gap-none); }
.a-gap-xs { gap: var(--alpo-gap-xs); }
.a-gap-sm { gap: var(--alpo-gap-sm); }
.a-gap-md { gap: var(--alpo-gap-md); }
.a-gap-lg { gap: var(--alpo-gap-lg); }
.a-gap-xl { gap: var(--alpo-gap-xl); }
.a-j-center { justify-content: center; }
.a-j-end { justify-content: flex-end; }
.a-j-between { justify-content: space-between; }
.a-al-start { align-items: flex-start; }
.a-al-center { align-items: center; }
.a-al-end { align-items: flex-end; }
.a-wrap { flex-wrap: wrap; }
.a-grow { flex-grow: 1; }
.a-contents { display: contents; }

/* prim::spacer / flex_spacer, appkit::scroll_region, grid, sized, divider */
.a-spacer { flex-shrink: 0; }
.a-scroll { display: flex; flex-direction: column; overflow: auto; min-height: 0; }
.a-grid { display: grid; grid-template-columns: repeat(var(--a-cols, 1), minmax(0, 1fr)); }
.a-sized { display: flex; flex-direction: column; flex-shrink: 0; }
.a-divider { height: 1px; width: 100%; background: var(--alpo-line); flex-shrink: 0; }

/* prim::card (+ appkit::stack gap md, heading level 4 title) */
.a-card {
  background: var(--alpo-surface); border: 1px solid var(--alpo-line);
  border-radius: var(--alpo-radius-card); min-width: 0;
}
.a-card.a-pad { padding: 16px; }
.a-card-body { display: flex; flex-direction: column; gap: 12px; }

/* appkit::heading / body_text */
.a-heading { font-weight: 600; color: var(--alpo-ink); }
.a-h1 { font-size: 24px; letter-spacing: var(--alpo-tracking-tight); }
.a-h2 { font-size: 18px; }
.a-h3 { font-size: 16px; }
.a-h4 { font-size: 14px; }
.a-text { color: var(--alpo-ink); overflow-wrap: anywhere; }
.a-text.a-s-sm { font-size: 12px; }
.a-text.a-s-md { font-size: 14px; }
.a-text.a-s-lg { font-size: 16px; }
.a-text.a-bold { font-weight: 600; }
.a-text.a-t-muted { color: var(--alpo-ink-3); }
.a-text.a-t-accent { color: var(--alpo-accent); }
.a-text.a-t-success { color: var(--alpo-green-fg); }
.a-text.a-t-warning { color: var(--alpo-amber-fg); }
.a-text.a-t-danger { color: var(--alpo-red-fg); }

/* prim::page_header */
.a-page-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 24px; width: 100%;
}
.a-page-header-main { display: flex; flex-direction: column; min-width: 0; }
.a-page-header-title { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.a-page-title {
  font-size: 24px; font-weight: 600; line-height: var(--alpo-leading-tight);
  letter-spacing: var(--alpo-tracking-tight); color: var(--alpo-ink);
}
.a-page-subtitle { font-size: 14px; color: var(--alpo-ink-3); max-width: 672px; }

/* prim::section_title */
.a-section-title {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--alpo-ink);
}
.a-section-title > span { min-width: 0; }

/* prim::badge */
.a-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border: 1px solid var(--alpo-neutral-border); background: var(--alpo-neutral-bg);
  color: var(--alpo-neutral-fg); border-radius: var(--alpo-radius-md);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.a-badge.a-t-accent { border-color: var(--alpo-accent-border); background: var(--alpo-accent-bg); color: var(--alpo-accent-fg); }
.a-badge.a-t-success { border-color: var(--alpo-green-border); background: var(--alpo-green-bg); color: var(--alpo-green-fg); }
.a-badge.a-t-warning { border-color: var(--alpo-amber-border); background: var(--alpo-amber-bg); color: var(--alpo-amber-fg); }
.a-badge.a-t-danger { border-color: var(--alpo-red-border); background: var(--alpo-red-bg); color: var(--alpo-red-fg); }

/* prim::app_glyph (appkit::AVATAR_PX, radius 26 %) */
.a-app-glyph {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 8.32px; color: var(--alpo-white);
  background: linear-gradient(180deg, hsl(var(--a-hue, 212) 88% 56%), hsl(var(--a-hue, 212) 85% 49%));
}
.a-app-glyph > .a-ic { width: 16px; height: 16px; }

/* prim::kind_chip */
.a-kind-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px;
  border-radius: var(--alpo-radius-md); font-size: 11.5px; font-weight: 500; white-space: nowrap;
  color: var(--a-kind, var(--alpo-kind-file));
  background: color-mix(in srgb, var(--a-kind, var(--alpo-kind-file)) 12%, transparent);
}
.a-kind-chip > .a-ic { width: 12px; height: 12px; }
.a-kind-chip[data-kind=mail] { --a-kind: var(--alpo-kind-mail); }
.a-kind-chip[data-kind=calendar] { --a-kind: var(--alpo-kind-calendar); }
.a-kind-chip[data-kind=chat] { --a-kind: var(--alpo-kind-chat); }
.a-kind-chip[data-kind=channel] { --a-kind: var(--alpo-kind-channel); }
.a-kind-chip[data-kind=app] { --a-kind: var(--alpo-kind-app); }
.a-kind-chip[data-kind=dash] { --a-kind: var(--alpo-kind-dash); }
.a-kind-chip[data-kind=flow] { --a-kind: var(--alpo-kind-flow); }
.a-kind-chip[data-kind=file] { --a-kind: var(--alpo-kind-file); }
.a-kind-chip[data-kind=doc] { --a-kind: var(--alpo-kind-doc); }
.a-kind-chip[data-kind=board] { --a-kind: var(--alpo-kind-board); }
.a-kind-chip[data-kind=data] { --a-kind: var(--alpo-kind-data); }
.a-kind-chip[data-kind=table] { --a-kind: var(--alpo-kind-table); }
.a-kind-chip[data-kind=conn] { --a-kind: var(--alpo-kind-conn); }
.a-kind-chip[data-kind=link] { --a-kind: var(--alpo-kind-link); }
.a-kind-chip[data-kind=workspace] { --a-kind: var(--alpo-kind-workspace); }

/* prim::kbd */
.a-kbd {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 20px;
  min-width: 20px; padding: 0 4px; border-radius: var(--alpo-radius-sm);
  background: var(--alpo-canvas-2); color: var(--alpo-ink-2); font: 500 11px var(--alpo-font);
}

/* prim::icon (appkit::icon_px) */
.a-icon { color: var(--alpo-ink-2); }
.a-icon.a-s-sm { width: 14px; height: 14px; }
.a-icon.a-s-md { width: 16px; height: 16px; }
.a-icon.a-s-lg { width: 20px; height: 20px; }

/* appkit::image_frame */
.a-image {
  display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--alpo-line);
  border-radius: var(--alpo-radius-lg); background: var(--alpo-canvas-2); color: var(--alpo-ink-3);
  font-size: 13px;
}

/* appkit::notice */
.a-notice {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px;
  border-radius: var(--alpo-radius-lg); border: 1px solid var(--alpo-neutral-border);
  background: var(--alpo-neutral-bg); color: var(--alpo-neutral-fg);
}
.a-notice > .a-ic { margin-top: 1.75px; }
.a-notice-text { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.a-notice.a-t-accent { border-color: var(--alpo-accent-border); background: var(--alpo-accent-bg); color: var(--alpo-accent-fg); }
.a-notice.a-t-success { border-color: var(--alpo-green-border); background: var(--alpo-green-bg); color: var(--alpo-green-fg); }
.a-notice.a-t-warning { border-color: var(--alpo-amber-border); background: var(--alpo-amber-bg); color: var(--alpo-amber-fg); }
.a-notice.a-t-danger { border-color: var(--alpo-red-border); background: var(--alpo-red-bg); color: var(--alpo-red-fg); }

/* prim::empty_state (not framed) */
.a-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; padding: 32px 16px; text-align: center; border-radius: var(--alpo-radius-xl);
}
.a-empty-state-icon { display: flex; padding-bottom: 8px; color: var(--alpo-ink-3); }
.a-empty-state-icon > .a-ic { width: 24px; height: 24px; }
.a-empty-state-title { font-size: 14px; font-weight: 500; padding-bottom: 4px; }
.a-empty-state-body { font-size: 13px; color: var(--alpo-ink-3); max-width: 420px; }

/* appkit::progress */
.a-progress { display: flex; flex-direction: column; gap: 4px; }
.a-progress-label { align-self: flex-start; font-size: 12px; font-weight: 500; color: var(--alpo-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.a-progress-track { height: 8px; width: 100%; border-radius: 9999px; background: var(--alpo-canvas-2); overflow: hidden; }
.a-progress-fill { height: 100%; border-radius: 9999px; background: var(--alpo-accent); }

/* prim::tooltip (native title bubble on the web) */
.a-tooltip { display: inline-flex; align-items: center; }

/* prim::button */
.a-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0;
  height: var(--alpo-h9); padding: 0 16px; border: 0; border-radius: var(--alpo-radius-md);
  font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: var(--alpo-shadow-soft);
}
.a-button:focus-visible, .a-icon-button:focus-visible, .a-tabs-item:focus-visible,
.a-segmented-item:focus-visible, .a-toggle:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--alpo-accent-ring);
}
.a-button.a-s-sm { height: var(--alpo-h8); padding: 0 12px; font-size: 13px; }
.a-button.a-s-sm > .a-ic { width: 14px; height: 14px; }
.a-button.a-s-lg { height: var(--alpo-h10); padding: 0 24px; }
.a-button.a-v-primary { background: var(--alpo-accent); color: var(--alpo-white); }
.a-button.a-v-primary:hover:not(:disabled) { background: var(--alpo-accent-hover); }
.a-button.a-v-secondary { background: var(--alpo-surface); color: var(--alpo-ink); border: 1px solid var(--alpo-line); }
.a-button.a-v-secondary:hover:not(:disabled) { background: var(--alpo-canvas-2); }
.a-button.a-v-ghost { background: transparent; color: var(--alpo-ink-2); box-shadow: none; }
.a-button.a-v-ghost:hover:not(:disabled) { background: var(--alpo-canvas-2); color: var(--alpo-ink); }
.a-button.a-v-danger { background: var(--alpo-danger); color: var(--alpo-white); }
.a-button.a-v-danger:hover:not(:disabled) { background: var(--alpo-danger-hover); }
.a-button:disabled, .a-icon-button:disabled { opacity: 0.5; }

/* prim::icon_button (H8) */
.a-icon-button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: var(--alpo-h8); height: var(--alpo-h8); padding: 0; border: 0; border-radius: var(--alpo-radius-md);
  background: transparent; color: var(--alpo-ink-2);
}
.a-icon-button:hover:not(:disabled), .a-icon-button.a-active { background: var(--alpo-canvas-2); color: var(--alpo-ink); }

/* appkit::field around prim::input / appkit::text_area / prim::select */
.a-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.a-field-label { display: flex; min-width: 0; font-size: 13px; font-weight: 500; color: var(--alpo-ink-2); }
.a-field-label > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-field-help { font-size: 12px; color: var(--alpo-ink-3); }
.a-field-error { font-size: 12px; color: var(--alpo-red-fg); }
.a-input {
  display: flex; align-items: center; gap: 8px; height: var(--alpo-h9); padding: 0 12px;
  background: var(--alpo-surface); border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-md);
  box-shadow: var(--alpo-shadow-soft); color: var(--alpo-ink-3);
}
.a-input > .a-control {
  flex: 1 1 0; min-width: 0; height: calc(var(--alpo-h9) - 2px); padding: 0; border: 0; outline: none;
  background: transparent; font-size: 14px; color: var(--alpo-ink);
}
.a-textarea {
  display: flex; flex-direction: column; width: 100%; min-height: 96px; padding: 8px 12px;
  background: var(--alpo-surface); border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-md);
  box-shadow: var(--alpo-shadow-soft);
}
.a-textarea > .a-control {
  height: 80px; padding: 0; border: 0; outline: none; resize: none; background: transparent;
  font-size: 14px; color: var(--alpo-ink);
}
.a-control::placeholder { color: var(--alpo-ink-3); opacity: 1; }
.a-input:focus-within, .a-textarea:focus-within {
  border-color: var(--alpo-accent); box-shadow: 0 0 0 3px var(--alpo-accent-ring);
}
.a-input.a-invalid, .a-textarea.a-invalid { border-color: var(--alpo-red-border); }
.a-input:has(.a-control:disabled), .a-textarea:has(.a-control:disabled) { opacity: 0.5; }
.a-select { position: relative; display: flex; }
.a-select > .a-control {
  appearance: none; width: 100%; height: var(--alpo-h9); padding: 0 36px 0 12px;
  background: var(--alpo-surface); border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-md);
  box-shadow: var(--alpo-shadow-soft); font-size: 13.5px; color: var(--alpo-ink); outline: none;
}
.a-select > .a-control:focus-visible { border-color: var(--alpo-accent); box-shadow: 0 0 0 3px var(--alpo-accent-ring); }
.a-select > .a-control[aria-invalid=true] { border-color: var(--alpo-red-border); }
.a-select > .a-ic {
  position: absolute; right: 12px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px;
  pointer-events: none; color: var(--alpo-ink-3);
}

/* prim::segmented */
.a-segmented {
  display: inline-flex; align-self: flex-start; align-items: center; height: var(--alpo-h9);
  padding: 3px; background: var(--alpo-canvas-2); border-radius: var(--alpo-radius-lg);
}
.a-segmented-item {
  display: inline-flex; align-items: center; gap: 6px; height: calc(var(--alpo-h9) - 6px); padding: 0 10px;
  border: 0; border-radius: var(--alpo-radius-md); background: transparent; color: var(--alpo-ink-2);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.a-segmented-item.a-selected { background: var(--alpo-surface); color: var(--alpo-ink); box-shadow: var(--alpo-shadow-soft); }

/* prim::tabs (underline) */
.a-tabs { display: flex; align-items: center; gap: 20px; width: 100%; border-bottom: 1px solid var(--alpo-line); }
.a-tabs-item {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: var(--alpo-h10);
  padding: 0; border: 0; background: transparent; color: var(--alpo-ink-3);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.a-tabs-item.a-selected { color: var(--alpo-ink); }
.a-tabs-item.a-selected::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--alpo-accent);
}

/* prim::toggle (the switch only; its label is the accessible name) */
.a-toggle { display: inline-flex; align-self: flex-start; width: 32px; height: 18px; padding: 0; border: 0; background: none; border-radius: 9999px; }
.a-toggle-track {
  display: flex; align-items: center; width: 32px; height: 18px; border: 1px solid transparent;
  border-radius: 9999px; background: var(--alpo-line-strong); box-shadow: var(--alpo-shadow-soft);
}
.a-toggle[aria-checked=true] .a-toggle-track { background: var(--alpo-accent); padding-left: 14px; }
.a-toggle-thumb {
  width: 16px; height: 16px; border-radius: 9999px; background: var(--alpo-white);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}
.a-toggle-label, .a-sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* appkit::checkbox (the whole row is the control) */
.a-checkbox { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.a-checkbox-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.a-checkbox-box {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 16px; height: 16px;
  border: 1px solid var(--alpo-line-strong); border-radius: var(--alpo-radius-sm); background: var(--alpo-surface);
  color: var(--alpo-white);
}
.a-checkbox-box > .a-ic { width: 12px; height: 12px; visibility: hidden; }
.a-checkbox-input:checked + .a-checkbox-box { background: var(--alpo-accent); border-color: var(--alpo-accent); }
.a-checkbox-input:checked + .a-checkbox-box > .a-ic { visibility: visible; }
.a-checkbox-input:focus-visible + .a-checkbox-box { box-shadow: 0 0 0 3px var(--alpo-accent-ring); }
.a-checkbox-label { font-size: 14px; color: var(--alpo-ink); }

/* Form: appkit::stack gap lg */
.a-form { display: flex; flex-direction: column; gap: 16px; }

/* prim::dialog / dialog_card (overlay layer) */
.a-dialog-closed { display: none; }
.a-dialog-layer {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: color-mix(in srgb, var(--alpo-ink) 20%, transparent); backdrop-filter: blur(2px);
}
.a-dialog {
  display: flex; flex-direction: column; width: 100%; max-width: 600px; max-height: 88vh;
  background: var(--alpo-surface); border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-xl);
  box-shadow: var(--alpo-shadow-pop); overflow: hidden;
}
.a-dialog-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border-bottom: 1px solid var(--alpo-line); }
.a-dialog-title { min-width: 0; margin-right: auto; font-size: 16px; font-weight: 600; }
.a-dialog-body { display: flex; flex-direction: column; gap: 16px; padding: 20px; min-height: 0; overflow: auto; font-size: 13px; }

/* Markdown (alpoai_ui::markdown: 13.5 px, leading-relaxed) */
.a-markdown { font-size: 13.5px; line-height: 1.625; color: var(--alpo-ink); }
.a-markdown > :first-child { margin-top: 0; }
.a-markdown > :last-child { margin-bottom: 0; }
.a-md-p { margin: 6px 0; }
.a-markdown .a-heading { font-size: 13.5px; font-weight: 600; margin: 8px 0 4px; }
.a-md-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.a-md-item { display: flex; }
.a-md-marker { width: 20px; flex-shrink: 0; padding-right: 6px; display: flex; justify-content: flex-end; color: var(--alpo-ink-3); }
.a-md-item-text { flex: 1 1 0; min-width: 0; }
.a-md-code { font: 12px "JetBrains Mono", monospace; background: color-mix(in srgb, var(--alpo-ink) 6%, transparent); padding: 1px 4px; border-radius: 4px; }
.a-md-pre { margin: 8px 0; padding: 12px; border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-xl); background: var(--alpo-canvas-2); font: 12px/1.625 "JetBrains Mono", monospace; white-space: pre-wrap; }
.a-md-link { color: var(--alpo-accent); }
.a-md-quote { margin: 6px 0; padding-left: 12px; border-left: 2px solid var(--alpo-line); color: var(--alpo-ink-2); }

/* Host chrome: toasts (prim::toast look), unsupported parts */
.a-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.a-toast {
  padding: 10px 14px; border-radius: var(--alpo-radius-lg); background: var(--alpo-surface);
  border: 1px solid var(--alpo-line); box-shadow: var(--alpo-shadow-pop); font-size: 13px;
}
.a-toast.a-t-danger { color: var(--alpo-red-fg); border-color: var(--alpo-red-border); }
.a-toast.a-t-success { color: var(--alpo-green-fg); border-color: var(--alpo-green-border); }
#alpo-captcha { margin-top: 16px; }

/* alpo::uirs Block / DropZone: the app's own box (layout + surface through the CSSOM) */
.a-block, .a-drop-zone { display: flex; flex-direction: column; position: relative; background: var(--a-bg); }
/* a background shader's fallback (z-index -1) stays under the block's content and above its own background */
.a-block:has(> .a-shader), .a-drop-zone:has(> .a-shader) { isolation: isolate; }
.a-block[data-hov]:hover, .a-drop-zone[data-hov]:hover { background: var(--a-hov); }
.a-block[data-press]:active, .a-drop-zone[data-press]:active { background: var(--a-press); }
.a-block[role=button] { cursor: pointer; }
.a-block[role=button]:focus-visible, .a-trigger-box:focus-visible, .a-vlist-row:focus-visible, .a-radio:focus-visible,
.a-collapsible-head:focus-visible, .a-menu-item:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--alpo-accent-ring); }

/* prim::uirs::motion (Animate / Timeline): transform + opacity per display frame */
.a-motion { display: flex; flex-direction: column; transform-origin: 50% 50%; }

/* prim::uirs::vector_scene / view3d (2D canvas) */
.a-scene, .a-scene3d { display: block; flex-shrink: 0; }
.a-scene.a-fluid { width: 100%; height: auto; flex-shrink: 1; }
.a-scene3d { border-radius: 8px; }
canvas[data-pa], canvas[data-wa] { touch-action: none; }
canvas[data-orbit] { cursor: grab; touch-action: none; }

/* prim::uirs drag_source / drop_slot */
.a-drag-source { display: flex; flex-direction: column; cursor: grab; touch-action: none; }
.a-dragging { opacity: 0.4; }
.a-drag-ghost { position: fixed; left: 0; top: 0; z-index: 70; margin: 0; pointer-events: none; opacity: 0.92; box-shadow: var(--alpo-shadow-pop); }
.a-drop-zone:empty { min-height: 48px; }
.a-drop-over { outline: 2px dashed var(--alpo-accent); outline-offset: 2px; }
.a-drop-before { box-shadow: 0 -2px 0 var(--alpo-accent); }
.a-drop-end { box-shadow: inset 0 -2px 0 var(--alpo-accent); }

/* prim::scroll_area + prim::uirs::list_row (VirtualList) */
.a-vlist { position: relative; overflow: auto; overflow-anchor: none; flex-shrink: 0; max-width: 100%; }
.a-vlist-row { display: flex; flex-direction: column; justify-content: center; overflow: hidden; flex-shrink: 0; }
.a-vlist-row[data-a] { cursor: pointer; }
.a-vlist-row[data-a]:hover { background: var(--alpo-canvas-2); }
.a-vlist-row.a-selected { background: var(--alpo-accent-soft); }

/* prim::uirs::slider (shadcn slider) */
.a-slider { display: flex; flex-direction: column; gap: 8px; }
.a-slider-head { display: flex; justify-content: space-between; }
.a-slider-label { font-size: 13px; font-weight: 500; color: var(--alpo-ink); }
.a-slider-input {
  appearance: none; width: clamp(160px, 50%, 480px); height: 16px; margin: 0; background: transparent; cursor: pointer;
}
.a-slider-input::-webkit-slider-runnable-track {
  height: 6px; border-radius: 9999px;
  background: linear-gradient(90deg, var(--alpo-accent) var(--a-fill, 0%), var(--alpo-canvas-2) var(--a-fill, 0%));
}
.a-slider-input::-moz-range-track { height: 6px; border-radius: 9999px; background: var(--alpo-canvas-2); }
.a-slider-input::-moz-range-progress { height: 6px; border-radius: 9999px; background: var(--alpo-accent); }
.a-slider-input::-webkit-slider-thumb {
  appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 9999px;
  background: var(--alpo-surface); border: 1px solid var(--alpo-accent); box-shadow: var(--alpo-shadow-soft);
}
.a-slider-input::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 9999px; background: var(--alpo-surface);
  border: 1px solid var(--alpo-accent); box-shadow: var(--alpo-shadow-soft);
}
.a-slider-input:focus-visible { outline: none; }
.a-slider-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--alpo-accent-ring); }
.a-slider-input:disabled { opacity: 0.5; cursor: default; }

/* prim::uirs::radio_group */
.a-radio-group { display: flex; flex-direction: column; gap: 4px; }
.a-radio-group-label { font-size: 13px; font-weight: 500; color: var(--alpo-ink); }
.a-radio {
  display: flex; align-items: center; gap: 8px; padding: 4px; border: 0; border-radius: var(--alpo-radius-md);
  background: transparent; color: var(--alpo-ink); font-size: 14px; text-align: left;
}
.a-radio:hover:not(:disabled) { background: color-mix(in srgb, var(--alpo-ink) 4%, transparent); }
.a-radio-dot {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 9999px; border: 1.5px solid var(--alpo-line-strong);
  background: var(--alpo-surface);
}
.a-radio[aria-checked=true] > .a-radio-dot { border: 5px solid var(--alpo-accent); }

/* render_uirs Collapsible: prim::uirs::collapsible_head (chevron + heading) */
.a-collapsible { display: flex; flex-direction: column; gap: 8px; }
.a-collapsible-head {
  display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent;
  color: var(--alpo-ink); text-align: left;
}
.a-collapsible-head > .a-ic { width: 14px; height: 14px; color: var(--alpo-ink-3); }
.a-collapsible-head[aria-disabled=true] { cursor: default; }
.a-collapsible-body { display: flex; flex-direction: column; gap: 8px; }
.a-collapsible-body:empty { display: none; }

/* prim::uirs::text_editor */
.a-text-editor {
  display: flex; flex-direction: column; width: 100%; padding: 8px 12px; background: var(--alpo-surface);
  border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-md); box-shadow: var(--alpo-shadow-soft);
}
.a-text-editor:focus-within { border-color: var(--alpo-accent); box-shadow: 0 0 0 3px var(--alpo-accent-ring); }
.a-text-editor > .a-control {
  padding: 0; border: 0; outline: none; resize: none; background: transparent; color: var(--alpo-ink);
  font-size: 14px; line-height: 21px; height: calc(var(--a-rows, 8) * 21px);
}
.a-text-editor.a-mono > .a-control {
  font-family: var(--alpo-font-mono); font-size: 13px; line-height: 20px;
  height: calc(var(--a-rows, 8) * 20px);
}

/* prim::dropdown_menu / context_menu / popover (the Popover API's top layer) */
.a-anchor, .a-trigger { display: contents; }
.a-trigger.a-trigger-box { display: flex; flex-direction: column; cursor: pointer; }
.a-menu, .a-popover {
  position: fixed; inset: auto; margin: 0; border: 1px solid var(--alpo-line); border-radius: var(--alpo-radius-lg);
  background: var(--alpo-surface); color: var(--alpo-ink); box-shadow: var(--alpo-shadow-pop); overflow: visible;
}
.a-menu { min-width: 180px; padding: 4px; }
.a-menu:popover-open { display: flex; flex-direction: column; }
.a-popover { min-width: 220px; max-width: min(360px, calc(100vw - 16px)); padding: 12px; }
.a-popover:popover-open { display: flex; flex-direction: column; gap: 8px; }
.a-popover-body { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.a-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; height: var(--alpo-h8); padding: 0 8px; border: 0;
  border-radius: var(--alpo-radius-sm); background: transparent; color: var(--alpo-ink); font-size: 13.5px; text-align: left;
}
.a-menu-item:hover:not(:disabled), .a-menu-item:focus { background: var(--alpo-canvas-2); outline: none; }
.a-menu-item.a-danger { color: var(--alpo-red-fg); }
.a-menu-item:disabled { opacity: 0.5; cursor: default; }
.a-menu-icon-space { width: 16px; flex-shrink: 0; }
.a-menu-label { flex: 1 1 auto; white-space: nowrap; }
.a-menu-hint { font: 500 11px var(--alpo-font); color: var(--alpo-ink-3); }
.a-menu-sep { height: 1px; margin: 4px -4px; background: var(--alpo-line); }

/* Sheet: the dialog panel at an edge (modal <dialog>) */
.a-sheet-closed { display: none; }
dialog.a-sheet {
  position: fixed; inset: 0 0 0 auto; width: min(420px, 100vw); max-width: 100vw; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; border-left: 1px solid var(--alpo-line); background: var(--alpo-surface);
  color: var(--alpo-ink); box-shadow: var(--alpo-shadow-pop);
}
dialog.a-sheet[open] { display: flex; flex-direction: column; }
dialog.a-sheet.a-side-left { inset: 0 auto 0 0; border-left: 0; border-right: 1px solid var(--alpo-line); }
dialog.a-sheet::backdrop { background: color-mix(in srgb, var(--alpo-ink) 20%, transparent); backdrop-filter: blur(2px); }
.a-sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border-bottom: 1px solid var(--alpo-line); }
.a-sheet-title { min-width: 0; margin-right: auto; font-size: 16px; font-weight: 600; }
.a-sheet-body { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 20px; font-size: 13px; }

/* Chart (SVG): alpoai_ui::charts series colours, tick text */
.a-chart { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.a-chart-title { font-size: 14px; font-weight: 600; color: var(--alpo-ink); }
.a-chart-svg { width: 100%; height: auto; overflow: visible; }
.a-chart-grid { stroke: var(--alpo-line); stroke-width: 1; }
.a-chart-axis { stroke: var(--alpo-line-strong); stroke-width: 1; }
.a-chart-tick { fill: var(--alpo-ink-3); font-size: 11px; font-family: var(--alpo-font); }
.a-chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.a-chart-area { opacity: 0.18; }
.a-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--alpo-ink-2); }
.a-chart-key { display: inline-flex; align-items: center; gap: 6px; }
.a-chart-swatch { width: 10px; height: 10px; border-radius: 2px; }
