/* tokens.css — theme custom properties (spec §9.4 "salvage the theme tokens").
 *
 * Palette consolidated from frontend/static/style.css (accent #e94560, muted #a0b4c8,
 * error #f87171) onto the darker surface the spike used (#0a0f1e) — the "#0a0f1e /
 * #e94560" palette named in CLAUDE.md. Components read these vars only, so the theme
 * is changed in one place. */
:root {
  --bg: #0a0f1e; /* worksurface / app background */
  --panel: #0f1830; /* status bar, menus, panels */
  --panel-2: #16223f; /* raised controls */
  --grid: #13203c; /* worksurface grid lines */
  --border: #2a3a5e;
  --text: #d7e2f4;
  --muted: #9fb2d0;
  --accent: #e94560;
  --accent-soft: #f3b1bd;
  --error: #f87171;
  --ok: #34d399; /* health traffic-light: good */
  --warn: #fbbf24; /* health: degraded */

  --bar-h: 34px; /* status bar height */
  --radius: 6px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Monospace, for machine output shown alongside prose — thinking blocks and tool
     calls in the LLM chat. A different FACE rather than a different colour, so the
     distinction survives at a glance and in a screenshot. */
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  /* The app's base size. Nothing set one before, so everything that does not pin its
     own size inherited the browser default (16px). Components that DO pin a size —
     the 10-11px chrome in the node panes and embedded views — are unaffected. */
  --font-size-base: 13pt;
}

/* Applied to `body`, not `html`, deliberately: putting it on `html` would rescale
   every `rem` in the app as a side effect of a font change. */
body {
  font-size: var(--font-size-base);
  font-family: var(--font);
}

/* Dockview panel content (light-DOM, so it can't live in a component's shadow) */
.panel-fill {
  height: 100%;
  overflow: hidden;
}
.panel-fill > * {
  height: 100%;
}
.core-panel {
  padding: 12px;
  font: 13px var(--font);
  color: var(--text);
}
.core-panel .k {
  color: var(--muted);
  font-size: 11px;
}
.core-panel .v {
  margin-top: 4px;
}
.core-panel .mono {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.core-panel .events {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 100%;
  overflow: auto;
}
.core-panel button {
  margin-top: 8px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  font: inherit;
  cursor: pointer;
}
.core-panel button:hover {
  border-color: var(--accent);
}

/* the floating panel dock — above the surface, hidden until a panel opens; the user
   can move it (drag the strip) and resize it (bottom-right handle) (§5) */
.dock-host {
  position: absolute;
  top: calc(var(--bar-h) + 12px);
  right: 12px;
  width: 420px;
  height: 62%;
  min-width: 240px;
  min-height: 160px;
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; /* required so `resize` shows a handle */
  resize: both;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 15;
}
.dock-host.open {
  display: flex;
}
.dock-strip {
  flex: 0 0 auto;
  height: 22px;
  line-height: 22px;
  padding: 0 8px;
  font: 11px var(--font);
  color: var(--muted);
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  cursor: move;
  user-select: none;
}
.dock-inner {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
