/* Angel Command Dashboard — design system.
   Precise, quiet, dark: hairline borders, a 4px spacing grid, tabular numerics,
   mono micro-labels, one accent. Every section inherits from the tokens below. */

:root {
  /* surfaces — near-black, neutral, stepped in small increments */
  --bg: #0a0b0d;
  --bg-2: #0c0d10;
  --surface: #111316;
  --surface-2: #15171b;
  --surface-3: #1b1e23;
  --surface-4: #22252b;
  /* hairlines */
  --line: #1d2025;
  --line-2: #282c33;
  --line-3: #383d46;
  /* text */
  --text: #edeef1;
  --text-2: #a8adb7;
  --text-3: #747985;
  --text-4: #50545d;
  /* accent + semantic — military software: one muted steel-cyan accent (a mission display, not a
     consumer app), status colours slightly desaturated. Colour is used sparingly. */
  --accent: #7fb2c3;
  --accent-dim: #4f8596;
  --accent-soft: rgba(127, 178, 195, 0.12);
  --tac: 127, 178, 195;   /* the accent as an rgb triplet, for rgba(var(--tac), a) */
  --good: #5fbf8a;
  --warn: #dfae52;
  --bad: #e56b62;
  --mag: #b98cff;
  /* shape */
  --radius: 10px;
  --radius-sm: 7px;
  --radius-xs: 5px;
  --sidebar-w: 236px;
  --read-w: 860px;
  /* depth */
  --hl: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.42), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* type */
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter var", InterVariable, Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 13.5px; line-height: 1.5; letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::selection { background: rgba(127, 178, 195, 0.32); color: #fff; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* micro-label: the one small-caps style used for every eyebrow / column head */
.card-title, .stat-label, .tbl th, .cl-day, .users-head, .tier-feed-head {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; line-height: 1.4;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}

/* ---- layout ---- */
.app { display: grid; grid-template-columns: auto minmax(0, 1fr); height: 100vh; }
.sidebar {
  background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden;
  width: var(--sidebar-w);
  /* the page eases into the freed space as the column narrows — open and close alike */
  transition: width 0.42s var(--ease), opacity 0.32s var(--ease), border-color 0.32s var(--ease);
}
/* children keep full width while the column animates, so nothing re-wraps mid-slide */
.sidebar > * { width: var(--sidebar-w); flex-shrink: 0; }
.sidebar > .nav { flex: 1 0 auto; }
/* Scrim is a mobile-only overlay — must stay out of the desktop grid flow. */
.scrim { display: none; }
.brand { height: 56px; padding: 0 10px 0 16px; display: flex; align-items: center; gap: 10px; flex: none; }
/* Angel logo (wings + halo). White mark on the dark UI; the black mark is used for
   light browser tabs (favicon) and print. Sources live in assets/. */
.brand-mark {
  width: 28px; height: 28px; flex: none;
  background: url(assets/angel-logo-white.png) center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
}
@media print { .brand-mark { background-image: url(assets/angel-logo-black.png); filter: none; } }
.brand-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; }
.brand-name small { display: block; margin-top: 2px; font: 500 9.5px/1.2 var(--mono); color: var(--text-3); letter-spacing: 0.16em; text-transform: uppercase; }

.nav { padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
/* grouped, collapsible nav — one section per thing you're doing */
.nav-group { display: flex; flex-direction: column; }
.nav-group + .nav-group { margin-top: 6px; }
.nav-group-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px 6px; background: none; border: 0; cursor: pointer;
  font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); text-align: left;
  transition: color 0.12s;
}
.nav-group-head:hover { color: var(--text-3); }
.nav-group-caret {
  margin-left: auto; width: 12px; height: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-4); transition: transform 0.2s var(--ease), color 0.12s;
}
.nav-group-caret::before { content: ''; width: 4px; height: 4px; margin-top: -2px; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: rotate(45deg); }
.nav-group.collapsed .nav-group-caret { transform: rotate(-90deg); }
.nav-group-head:hover .nav-group-caret { color: var(--text-2); }
.nav-group-items { display: flex; flex-direction: column; gap: 1px; overflow: hidden; transition: max-height 0.28s var(--ease), opacity 0.2s var(--ease); max-height: 420px; }
.nav-group.collapsed .nav-group-items { max-height: 0; opacity: 0; pointer-events: none; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px;
  border-radius: 6px; border: none; background: none; width: 100%; text-align: left; cursor: pointer;
  color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); text-decoration: none; }
.nav-item.active { background: rgba(255, 255, 255, 0.065); color: var(--text); box-shadow: var(--hl); }
.nav-item.active::before {
  content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 2px;
  border-radius: 0 2px 2px 0; background: var(--accent);
}
.nav-item .ico { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--text-3); font-size: 13px; transition: color 0.12s; }
.nav-item:hover .ico { color: var(--text-2); }
.nav-item.active .ico { color: var(--accent); }
.nav-item .num {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 10.5px/1 var(--mono); font-variant-numeric: tabular-nums;
  color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line-2);
}
.nav-item .num:empty { display: none; }
.nav-foot { padding: 8px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 11.5px; flex: none; }
.nav-foot a { color: var(--text-2); }

.collapse-btn {
  margin-left: auto; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 7px; color: var(--text-3); cursor: pointer; font-size: 14px; line-height: 1;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.collapse-btn:hover { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
.sidebar-open-btn {
  display: inline-flex; opacity: 0; visibility: hidden; transform: translateX(-6px); pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s, background 0.12s, color 0.12s;
  position: fixed; top: 11px; left: 12px; z-index: 60; width: 32px; height: 32px; padding: 0;
  align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text-2); border-radius: 8px; cursor: pointer; font-size: 14px; box-shadow: var(--hl), var(--shadow-1);
}
.sidebar-open-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-3); }
.app.sidebar-collapsed .sidebar { width: 0; overflow: hidden; border-right-color: transparent; opacity: 0; }
.app.sidebar-collapsed .sidebar-open-btn {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity 0.22s var(--ease) 0.12s, transform 0.22s var(--ease) 0.12s, visibility 0s, background 0.12s, color 0.12s;
}
.app.sidebar-collapsed .view { padding-top: 58px; }

.main { min-width: 0; overflow-y: auto; height: 100vh; background: var(--bg); }
.view { max-width: 1120px; margin: 0 auto; padding: 28px 32px 88px; transition: padding-top 0.34s var(--ease); }
/* every section eases in instead of popping */
.view > * { animation: ui-rise 0.34s var(--ease) both; }
@keyframes ui-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ui-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ui-pop { from { opacity: 0; transform: translateY(-4px) scale(0.985); } to { opacity: 1; transform: none; } }
.view-head { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.view-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.view-head p { margin: 6px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.55; max-width: 76ch; }

/* ---- panels (collapsible) ---- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; box-shadow: var(--hl), var(--shadow-1); }
.panel > .panel-head {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 8px 14px 8px 12px; user-select: none; transition: background 0.12s;
}
.panel > .panel-head:hover { background: rgba(255, 255, 255, 0.015); }
.panel > .panel-head::-webkit-details-marker { display: none; }
/* chevron drawn in CSS (the ▸ glyph is hidden) */
.panel-caret {
  width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0; color: var(--text-3); transition: transform 0.18s var(--ease), color 0.12s;
}
.panel-caret::before { content: ''; width: 5px; height: 5px; margin-left: -2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.panel[open] > .panel-head .panel-caret { transform: rotate(90deg); }
.panel > .panel-head:hover .panel-caret { color: var(--text-2); }
.panel-title { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.panel-sub { color: var(--text-3); font-size: 12px; }
.panel-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.panel-body > :first-child { margin-top: 14px; }

/* ---- cards / stats / pills ---- */
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--hl); }
.card-title { margin-bottom: 10px; }
/* KPI tile: label on top, big tabular number below */
.stat {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px 15px; box-shadow: var(--hl), var(--shadow-1);
}
.panel .stat, .card .stat { background: var(--surface-2); box-shadow: var(--hl); border-radius: var(--radius-sm); }
.stat-label { order: -1; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--text-3); font-size: 11.5px; margin-top: 6px; }
.stat.is-text .stat-value { font: 500 14px/1.45 var(--mono); letter-spacing: 0; color: var(--text); overflow-wrap: anywhere; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line-2);
}
.pill.good { color: #6fdaa6; border-color: rgba(69, 201, 139, 0.28); background: rgba(69, 201, 139, 0.08); }
.pill.warn { color: #f0c873; border-color: rgba(229, 180, 80, 0.28); background: rgba(229, 180, 80, 0.08); }
.pill.bad { color: #f59393; border-color: rgba(239, 107, 107, 0.3); background: rgba(239, 107, 107, 0.08); }
.pill.accent { color: #a9cbd6; border-color: rgba(127, 178, 195, 0.3); background: var(--accent-soft); }
.pill.mag { color: #cfaeff; border-color: rgba(185, 140, 255, 0.3); background: rgba(185, 140, 255, 0.08); }

.empty { color: var(--text-3); font-size: 12.5px; padding: 22px 16px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.01); }
.loading { color: var(--text-3); display: flex; gap: 10px; align-items: center; padding: 14px 4px; font-size: 12.5px; }
.spin { width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---- buttons / inputs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12.5px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
  box-shadow: var(--hl), 0 1px 1px rgba(0, 0, 0, 0.25);
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--surface-4); border-color: var(--line-3); text-decoration: none; }
.btn:active { transform: translateY(0.5px); }
.btn.primary { background: #eef0f3; border-color: #eef0f3; color: #0a0b0d; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.btn.danger { color: #f38b8b; border-color: rgba(239, 107, 107, 0.32); background: rgba(239, 107, 107, 0.06); }
.btn.danger:hover { background: rgba(239, 107, 107, 0.12); border-color: rgba(239, 107, 107, 0.55); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:disabled:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn.primary:disabled:hover { background: #eef0f3; border-color: #eef0f3; }
.btn.ghost:disabled:hover { background: transparent; border-color: transparent; }

input, select, textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 0 10px; font-size: 13px; font-family: inherit; transition: border-color 0.12s, box-shadow 0.12s;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select { height: 32px; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23747985' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.5; cursor: not-allowed; }
::placeholder { color: var(--text-4); }
textarea { resize: vertical; min-height: 64px; width: 100%; padding: 8px 10px; line-height: 1.5; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.input-full { width: 100%; }

/* ---- progress ---- */
.bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02); }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s var(--ease); }

/* ---- charts ---- */
.chart { width: 100%; height: auto; display: block; }
.chart.spark { height: 36px; }
text.bar-label, text.ci-label { fill: var(--text-3); font-size: 10px; font-family: var(--sans); }
text.bar-value, text.ci-value { fill: var(--text-2); font-size: 10px; font-family: var(--mono); }
text.donut-label { fill: var(--text); font-size: 13px; font-weight: 600; font-family: var(--sans); }

/* ---- chat (Halo) ---- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 150px); }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 4px 16px; display: flex; flex-direction: column; gap: 22px; }
.msg { display: flex; gap: 12px; width: 100%; max-width: var(--read-w); margin: 0 auto; }
.msg .av {
  width: 26px; height: 26px; border-radius: 7px; flex: none; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); box-shadow: var(--hl);
}
.msg.halo .av { background: var(--accent-soft); border-color: rgba(127, 178, 195, 0.3); color: #c2dbe3; }
.msg .body { flex: 1; min-width: 0; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.msg .content { white-space: pre-wrap; word-wrap: break-word; line-height: 1.6; }
/* your turns read as right-aligned bubbles; Halo's as open text */
.msg.user { justify-content: flex-end; }
.msg.user .av, .msg.user .who { display: none; }
.msg.user .body { flex: 0 1 auto; max-width: min(78%, 640px); display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .content { background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 14px 14px 4px 14px; padding: 8px 13px; box-shadow: var(--hl); }
/* per-message toolbar: Copy on every bubble, Edit (rewind + resend) on your own — appears on hover */
.msg-actions { display: flex; gap: 5px; margin-top: 7px; opacity: 0; transition: opacity 0.14s var(--ease); }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.msg.user .msg-actions { justify-content: flex-end; }
.msg-act {
  width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--text-3); cursor: pointer;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease), background 0.12s var(--ease);
}
.msg-act:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-3); }
.msg-act .i { width: 14px; height: 14px; stroke-width: 2; }
.msg-editor { width: 100%; margin-top: 8px; }
.msg.user .msg-editor { min-width: min(78vw, 560px); }
.msg-edit {
  width: 100%; min-height: 62px; resize: none; padding: 10px 12px; box-sizing: border-box;
  border: 1px solid var(--line-3); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 13.5px; line-height: 1.55;
}
.msg-edit:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.msg-editor-row { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.chat-input {
  display: flex; gap: 8px; align-items: flex-end; width: 100%; max-width: var(--read-w); margin: 12px auto 0;
  border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; background: var(--surface);
  box-shadow: var(--hl), var(--shadow-2); transition: border-color 0.12s, box-shadow 0.12s;
}
.chat-input:focus-within { border-color: var(--line-3); }
.chat-input textarea { border: none; background: none; flex: 1; min-height: 24px; max-height: 180px; padding: 4px 6px; resize: none; }
.chat-input textarea:focus { outline: none; box-shadow: none; }
/* Halo's tool work runs in the background — a quiet, expandable one-liner, not a dump. */
.work { margin-bottom: 6px; }
.work-chip { background: none; border: none; color: var(--text-3); font: 500 11px var(--mono); cursor: pointer; padding: 2px 0; display: inline-flex; align-items: center; gap: 6px; transition: color 0.12s; }
.work-chip:hover, .work-chip.open { color: var(--text-2); }
/* Overview — "What changed": git history as a plain-English changelog */
.changelog { padding: 16px 18px 8px; }
.cl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.cl-note { font-size: 12px; color: var(--accent); }
.cl-day { margin: 18px 0 4px; }
.cl-row { padding: 14px 0; border-top: 1px solid var(--line); }
.cl-day + .cl-row { border-top: 0; padding-top: 6px; }
.cl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.cl-area { font-size: 11px; font-weight: 500; height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: var(--radius-xs); border: 1px solid; }
.cl-area.a-dash { color: #a9cbd6; border-color: rgba(127, 178, 195, 0.3); background: rgba(127, 178, 195, 0.08); }
.cl-area.a-sim { color: #d4b3ff; border-color: rgba(185, 140, 255, 0.3); background: rgba(185, 140, 255, 0.08); }
.cl-area.a-brain { color: #7fe0ad; border-color: rgba(69, 201, 139, 0.3); background: rgba(69, 201, 139, 0.08); }
.cl-area.a-safety { color: #f59a9a; border-color: rgba(239, 107, 107, 0.3); background: rgba(239, 107, 107, 0.08); }
.cl-area.a-flight { color: #f0cd7a; border-color: rgba(229, 180, 80, 0.3); background: rgba(229, 180, 80, 0.08); }
.cl-area.a-hw { color: #7fd6e6; border-color: rgba(79, 209, 197, 0.3); background: rgba(79, 209, 197, 0.08); }
.cl-area.a-ui { color: var(--text-2); border-color: var(--line-2); background: var(--surface-2); }
.cl-area.a-muted { color: var(--text-3); border-color: var(--line); background: transparent; }
.cl-when { font-size: 12px; color: var(--text-3); margin-left: 4px; }
.cl-size { margin-left: auto; font: 11px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.cl-headline { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; letter-spacing: -0.01em; }
.cl-summary { font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.55; max-width: 82ch; }
.cl-points { margin: 7px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.55; max-width: 82ch; }
.cl-points li { margin: 2px 0; }
.cl-points li::marker { color: var(--text-4); }
.cl-points:empty { display: none; }
.cl-foot { margin-top: 8px; }
.cl-toggle { background: none; border: none; padding: 0; font-size: 12px; color: var(--text-3); cursor: pointer; transition: color 0.12s; }
.cl-toggle:hover { color: var(--text); }
.cl-tech { display: none; margin-top: 8px; }
.cl-row.open .cl-tech { display: block; }
.cl-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.cl-raw { margin: 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 11.5px/1.55 var(--mono); color: var(--text-3); white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }

/* Halo thinking-effort selector (header) */
.effort-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.effort-sel { height: 32px; padding: 0 28px 0 10px; border-radius: var(--radius-sm); background-color: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); font-size: 12.5px; }
.effort-sel:focus { outline: none; border-color: var(--accent-dim); }

/* Halo memory panel */
.mem-add { display: flex; gap: 8px; margin-bottom: 10px; }
.mem-list { gap: 2px; }
.mem-item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: var(--radius-sm); transition: background 0.1s; }
.mem-item:hover { background: rgba(255, 255, 255, 0.03); }
.mem-item.pinned { background: rgba(185, 140, 255, 0.06); box-shadow: inset 2px 0 0 rgba(185, 140, 255, 0.55); }
.mem-item .grow { flex: 1; min-width: 0; }
.mem-text { font-size: 13px; line-height: 1.5; color: var(--text-2); cursor: text; }
.mem-item.pinned .mem-text { color: var(--text); }
.mem-tag { display: inline-block; font: 500 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mag); background: rgba(185, 140, 255, 0.12); border-radius: 4px; padding: 2px 6px; margin-right: 7px; vertical-align: 1px; }
.mem-edit { width: 100%; background: var(--bg); border: 1px solid var(--accent-dim); border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; padding: 6px 8px; resize: vertical; }
.mem-edit:focus { outline: none; }

/* Halo agent — live progress, the plan, attachments */
.msg.live .live-status { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; min-height: 22px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; animation: livepulse 1.4s ease-out infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(127, 178, 195, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(127, 178, 195, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 178, 195, 0); } }
.live-steps { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.live-step { font: 11.5px/1.5 var(--mono); color: var(--text-3); display: flex; gap: 7px; }
.live-step .ck { color: var(--good); flex: none; }
.live-plan:not(:empty), .reply-plan { margin: 10px 0 6px; }
.todo-list { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); max-width: 620px; box-shadow: var(--hl); }
.todo { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.todo-box { width: 15px; height: 15px; flex: none; margin-top: 2px; border-radius: 4px; border: 1.5px solid var(--line-3); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.todo.in_progress { color: var(--text); }
.todo.in_progress .todo-box { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.todo.completed { color: var(--text-3); }
.todo.completed span:last-child { text-decoration: line-through; text-decoration-color: rgba(116, 121, 133, 0.55); }
.todo.completed .todo-box { background: var(--good); border-color: var(--good); color: #06120b; }
.attach-chips { display: none; flex-wrap: wrap; gap: 6px; padding: 8px 2px 0; flex: none; }
.attach-chips.sent { display: flex; padding: 8px 0 0; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px 0 10px; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 7px; font-size: 12px; color: var(--text-2); }
.attach-chip .sz { color: var(--text-3); font: 10.5px var(--mono); }
.attach-chip .x { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 0 2px; font-size: 11px; }
.attach-chip .x:hover { color: var(--bad); }
.chat.drop .chat-input { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Halo composer bar: attach + thinking on the left, send on the right (like other AI apps) */
.chat-input.composer { flex-direction: column; align-items: stretch; gap: 8px; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.composer-left { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.composer-tool { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; background: transparent; border: 1px solid var(--line-2); border-radius: 8px; color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: color 0.12s, border-color 0.12s, background 0.12s; }
.composer-tool:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-3); }
.composer-tool .ic { font-size: 14px; }
.composer-effort { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.composer-effort .effort-sel { height: 30px; background-color: transparent; }
.attach-chip.img { height: 34px; padding: 0 8px 0 4px; }
.chip-thumb { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; flex: none; }
.msg-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg-img { max-width: 240px; max-height: 240px; border-radius: 10px; border: 1px solid var(--line-2); object-fit: cover; display: block; }

/* Rendered Markdown in chat replies */
.md, .msg .content.md { line-height: 1.6; white-space: normal; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 8px 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 18px 0 6px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; color: var(--text); }
.md h1 { font-size: 18px; } .md h2 { font-size: 16px; } .md h3 { font-size: 14.5px; } .md h4 { font-size: 13.5px; }
.md ul, .md ol { margin: 8px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--text-4); }
.md a { color: var(--accent); text-decoration: none; }
.md a:hover { text-decoration: underline; }
.md strong { font-weight: 600; color: var(--text); }
.md code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.md pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; margin: 10px 0; }
.md pre code { background: none; border: none; padding: 0; font-size: 12px; line-height: 1.55; color: var(--text-2); }
.md blockquote { margin: 10px 0; padding: 2px 12px; border-left: 2px solid var(--accent-dim); color: var(--text-2); }
.md table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 12px 0; font-size: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; display: table; font-variant-numeric: tabular-nums; }
.md th, .md td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.md th { background: var(--surface-2); font-weight: 600; color: var(--text); font-size: 12px; }
.md tr:last-child td { border-bottom: none; }
.md td + td, .md th + th { border-left: 1px solid var(--line); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.mermaid-diagram { margin: 12px 0; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; text-align: center; }
.mermaid-diagram svg { max-width: 100%; height: auto; }

/* Inline conversation rename */
.rename-input { width: 100%; background: var(--bg); border: 1px solid var(--accent-dim); border-radius: 6px; color: var(--text); font-size: 13px; padding: 0 8px; height: 28px !important; }
.rename-input:focus { outline: none; }

/* ---- Home: Halo + overview on one surface ----
   Empty state: greeting, composer, quick jumps, program cards (scrolls).
   Chat state:  focused conversation, only the log scrolls, composer pinned.
   Conversations + memory live in a left panel that slides in (closed on load). */
.view.homeview {
  position: relative; max-width: none; width: 100%; margin: 0; padding: 0; height: 100vh; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
}
.app.sidebar-collapsed .view.homeview { padding-top: 0; }
.view.homeview > * { animation-name: ui-fade; }

.conv-panel {
  min-width: 0; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid transparent; opacity: 0; width: 0;
  transition: width 0.42s var(--ease), opacity 0.32s var(--ease), border-color 0.32s var(--ease);
}
.homeview.panel-open .conv-panel { width: 288px; opacity: 1; border-right-color: var(--line); }
.conv-panel > * { width: 288px; flex-shrink: 0; }
.conv-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 56px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line); transition: padding 0.34s var(--ease); }
.app.sidebar-collapsed .conv-panel-head { padding-left: 52px; }
.conv-tabs { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; }
.conv-tab { height: 26px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); font-size: 12.5px; font-family: inherit; cursor: pointer; transition: background 0.16s var(--ease), color 0.16s var(--ease); }
.conv-tab:hover { color: var(--text); }
.conv-tab.on { background: var(--surface-4); color: var(--text); box-shadow: var(--hl), 0 1px 2px rgba(0, 0, 0, 0.35); }
.conv-pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 10px 16px; animation: ui-fade 0.22s var(--ease); }
.conv-search { height: 32px !important; margin-bottom: 10px; }
.conv-list { display: flex; flex-direction: column; gap: 1px; }
.conv-item { position: relative; display: flex; align-items: center; border-radius: 7px; transition: background 0.14s var(--ease); }
.conv-item:hover, .conv-item.on { background: var(--surface-2); }
.conv-item.on::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent); }
.conv-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: none; border: 0; color: inherit; font-family: inherit; text-align: left; cursor: pointer; }
.conv-open .ttl { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-open .sub { font: 11px var(--mono); color: var(--text-4); }
.conv-acts { display: flex; gap: 2px; padding-right: 6px; opacity: 0; transition: opacity 0.14s var(--ease); }
.conv-item:hover .conv-acts, .conv-item:focus-within .conv-acts { opacity: 1; }
.conv-item .rename-input { margin: 5px 6px; }

.home-icon-btn {
  width: 32px; height: 32px; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 8px; color: var(--text-3); cursor: pointer;
  transition: background 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.home-icon-btn:hover, .home-icon-btn[aria-expanded="true"] { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
.home-icon-btn.sm { width: 26px; height: 26px; border-radius: 6px; }
.home-icon-btn.sm .i { width: 14px; height: 14px; }

.home-main { position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.home-top { position: relative; z-index: 3; flex: none; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 16px 0 14px; transition: padding 0.34s var(--ease); }
.app.sidebar-collapsed .homeview:not(.panel-open) .home-top { padding-left: 56px; }
.home-new { gap: 6px; }
.home-new .i { width: 14px; height: 14px; }

.conv-menu { position: relative; min-width: 0; }
.conv-sum {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; max-width: min(46vw, 440px); padding: 0 8px 0 10px;
  border: 1px solid transparent; border-radius: 8px; color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; user-select: none;
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease);
}
.conv-sum::-webkit-details-marker { display: none; }
.conv-sum:hover, .conv-menu[open] .conv-sum { background: var(--surface-3); border-color: var(--line-2); }
.conv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-caret { display: inline-flex; color: var(--text-3); transition: transform 0.2s var(--ease); }
.conv-caret .i { width: 14px; height: 14px; }
.conv-menu[open] .conv-caret { transform: rotate(180deg); }
.conv-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 320px; max-height: min(440px, 62vh); overflow-y: auto; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-3), var(--hl);
  transform-origin: top left; animation: ui-pop 0.16s var(--ease);
}
.conv-pop-head { padding: 8px 10px 6px; font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); }
.conv-pop-empty { padding: 8px 10px 12px; color: var(--text-3); font-size: 12.5px; }
.conv-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: none; border: 0; border-radius: 7px; color: var(--text-2); font-size: 13px; font-family: inherit; text-align: left; cursor: pointer; transition: background 0.12s var(--ease), color 0.12s var(--ease); }
.conv-row:hover, .conv-row.on { background: var(--surface-3); color: var(--text); }
.conv-row-ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-row-when { flex: none; font: 11px var(--mono); color: var(--text-4); }
.conv-pop-all { width: 100%; margin-top: 4px; padding: 10px 10px 6px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text-3); font-size: 12.5px; font-family: inherit; text-align: left; cursor: pointer; transition: color 0.12s; }
.conv-pop-all:hover { color: var(--text); }


/* the Angel mark behind the page: crisp when idle, softens while you type, blurs away in a chat */
.home-mark {
  position: absolute; z-index: 0; left: 50%; top: 46%; width: min(74vh, 760px); aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%); pointer-events: none;
  background: url(assets/angel-logo-white.png) center / contain no-repeat; opacity: 0.12;
  /* slow, smooth easing so the mark drifts out of focus after a chat is sent — never a snap */
  transition: filter 1.6s var(--ease), opacity 1.6s var(--ease), transform 1.8s var(--ease);
}
/* typing does NOT blur the mark — the blur eases in only once a chat is sent (.is-chat, below) */
.home-veil {
  position: absolute; z-index: 0; left: 50%; top: 46%; width: min(118vh, 1180px); aspect-ratio: 1.4 / 1;
  transform: translate(-50%, -50%) scale(0.98); pointer-events: none; opacity: 0;
  /* a soft, wide wash that fades out well before any edge — no disc, no visible circle */
  background: radial-gradient(ellipse at center, rgba(132, 136, 145, 0.07), transparent 62%);
  -webkit-backdrop-filter: blur(6px) saturate(55%); backdrop-filter: blur(6px) saturate(55%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 75%); mask-image: radial-gradient(ellipse at center, #000, transparent 75%);
  transition: opacity 1.5s var(--ease), transform 1.8s var(--ease);
}
/* the veil is no longer tied to typing; it eases in with the mark's light blur after a chat is sent */
.homeview.is-chat .home-veil { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
.homeview.is-chat .home-mark { filter: blur(12px); opacity: 0.05; transform: translate(-50%, -50%) scale(1.06); }
.home-body { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 32px 190px; scroll-behavior: smooth; }
/* empty state: the page itself does NOT scroll down — the only scroll is the carousels
   (sideways). Hero + quick jumps + the card wheel are sized to sit within the viewport. */
.homeview.is-empty .home-body { overflow: hidden; padding-bottom: 150px; }
.home-body > * { width: 100%; max-width: var(--read-w); margin-left: auto; margin-right: auto; }
.home-body > .home-cards { max-width: 1440px; }
.home-hero { padding: clamp(24px, 8vh, 72px) 0 14px; text-align: center; }
.home-hero h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; }
.home-hero p { margin: 6px auto 0; max-width: 58ch; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.homeview .chat { height: auto; }
.homeview .chat-input { background: rgba(17, 19, 22, 0.84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.homeview.is-empty .chat-log { display: none; }
.homeview .chat-log { flex: none; overflow: visible; padding: 4px 4px 12px; }
/* Halo's composer: liquid glass, docked at the bottom over a soft fade */
.home-dock {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 40px 32px 22px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(to top, rgba(10, 11, 13, 0.92) 30%, rgba(10, 11, 13, 0));
}
.home-dock > * { pointer-events: auto; width: 100%; max-width: var(--read-w); }
.home-dock .chat-input { margin: 0; }
.home-dock .attach-chips { padding: 0 4px; }
.homeview.is-empty .home-new { display: none; }
.home-main.drop .chat-input { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.home-jumps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.home-jump {
  height: 28px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 7px; background: transparent;
  color: var(--text-3); font-size: 12px; font-family: inherit; cursor: pointer;
  transition: background 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.home-jump:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); }
.home-cards { margin-top: clamp(18px, 4vh, 44px); }
.home-cards .ov-stats { margin-bottom: 12px; }
/* re-entering either state eases in rather than snapping */
.homeview.is-empty .home-hero, .homeview.is-empty .home-jumps, .homeview.is-empty .home-cards { animation: ui-rise 0.36s var(--ease) both; }
.homeview.is-empty .home-jumps { animation-delay: 0.04s; }
/* the cards' load-in rise must not hold its end state (fill-mode backwards), or it pins them
   visible and the typing fade below can't run — they'd just vanish instead of dissolving */
.homeview.is-empty .home-cards { animation-delay: 0.08s; animation-fill-mode: backwards; }
.homeview.is-chat .home-hero, .homeview.is-chat .home-jumps, .homeview.is-chat .home-cards { display: none; }
/* typing: the cards dissolve away (soft fade + a slight sink), the logo stays sharp; clear the
   box and they fade back up. Smooth both ways — no snap. */
.home-cards { opacity: 1; transform: none; transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1), transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s; }
.homeview.is-empty.is-typing .home-cards {
  opacity: 0; transform: translateY(14px) scale(0.98); visibility: hidden; pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1), transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.42s;
}
.homeview.is-chat .home-body { padding-top: 12px; }
.homeview.is-chat .chat-log { animation: ui-fade 0.3s var(--ease); }
.chat-log > .msg { animation: ui-rise 0.28s var(--ease) both; }
@media (max-width: 640px) { .view.homeview { height: calc(100vh - 52px); } }
@media (max-width: 860px) {
  .view.homeview.panel-open { grid-template-columns: 0 minmax(0, 1fr); }
  .conv-panel { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 0; transition: width 0.3s var(--ease), opacity 0.24s var(--ease); }
  .homeview.panel-open .conv-panel { width: min(86vw, 300px); box-shadow: 0 0 48px rgba(0, 0, 0, 0.6); }
  .home-body { padding: 0 16px 48px; }
  .home-hero h1 { font-size: 24px; }
}
.tool-trace { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 10px; margin: 8px 0; }
.tool-trace b { color: var(--accent); font-weight: 500; }

/* ---- diffs ---- */
.proposal { border: 1px solid var(--line-2); border-radius: var(--radius-sm); margin: 10px 0; overflow: hidden; box-shadow: var(--shadow-1); }
.proposal-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface-2); }
.proposal-head .path { font-family: var(--mono); font-size: 12px; }
.proposal-head .st { margin-left: auto; font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.proposal-head .st .a { color: var(--good); } .proposal-head .st .d { color: var(--bad); }
.proposal .why { padding: 9px 12px; color: var(--text-2); font-size: 12.5px; border-top: 1px solid var(--line); }
.diff { font-family: var(--mono); font-size: 12px; line-height: 1.55; overflow-x: auto; background: var(--bg); border-top: 1px solid var(--line); max-height: 420px; overflow-y: auto; }
.diff-line { display: flex; white-space: pre; }
.diff-gutter { width: 24px; flex: none; text-align: center; color: var(--text-4); user-select: none; }
.diff-text { flex: 1; padding-right: 10px; }
.diff-add { background: rgba(69, 201, 139, 0.09); } .diff-add .diff-gutter { color: var(--good); }
.diff-del { background: rgba(239, 107, 107, 0.09); } .diff-del .diff-gutter { color: var(--bad); }
.diff-hunk { color: var(--text-3); background: var(--surface); padding: 3px 0 3px 24px; }
.proposal-foot { display: flex; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-top: 1px solid var(--line); }

/* ---- lists / tables ---- */
.list { display: flex; flex-direction: column; gap: 1px; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); transition: background 0.1s; }
.list-item:hover { background: rgba(255, 255, 255, 0.035); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .ttl { font-size: 13px; font-weight: 500; }
.list-item .sub { font-size: 11.5px; color: var(--text-3); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td, .tbl tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ---- code tree / file view ---- */
.code-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; }
.tree { font-size: 13px; max-height: 70vh; overflow: auto; }
.tree .t-item { padding: 0 8px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; color: var(--text-2); transition: background 0.1s, color 0.1s; }
.tree .t-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.tree .t-item .ti { width: 14px; text-align: center; color: var(--text-3); }
.filebox { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 70vh; overflow: auto; }
.filebox pre { margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre; }
.filebox .fb-head { position: sticky; top: 0; background: var(--surface-2); padding: 8px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; display: flex; gap: 10px; align-items: center; }

/* ---- fleet / 3d ---- */
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.platform { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; box-shadow: var(--hl); transition: border-color 0.15s, transform 0.15s var(--ease), background 0.15s; }
.platform:hover { border-color: var(--line-3); background: var(--surface-2); }
.platform .pico { font-size: 22px; color: var(--text-2); }
.platform .pnm { font-weight: 600; margin-top: 8px; letter-spacing: -0.01em; }
.platform .pspec { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.viewer-frame { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #000; }

/* ---- Brains: cognition-stack schematic + full-page tier workspace ---- */
.tier-glow { --tc: var(--warn); --tc-rgb: 229, 180, 80; }
.tier-hands { --tc: var(--good); --tc-rgb: 69, 201, 139; }
.tier-wings { --tc: var(--accent); --tc-rgb: 127, 178, 195; }
.tier-halo { --tc: var(--mag); --tc-rgb: 185, 140, 255; }
.view.brainsview { padding: 0; min-height: 100vh; display: flex; flex-direction: column; }
.brains-screen { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.brains-screen > * { animation: ui-rise 0.34s var(--ease) both; }
.tier-ico {
  width: 44px; height: 44px; flex: none; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--tc); background: radial-gradient(circle at 30% 20%, rgba(var(--tc-rgb), 0.2), rgba(var(--tc-rgb), 0.06));
  border: 1px solid rgba(var(--tc-rgb), 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 24px rgba(var(--tc-rgb), 0.08);
}
.tier-ico .i { width: 20px; height: 20px; }

.bp { padding: 0 40px 72px; max-width: 1320px; }
.bp > .view-head { margin: 0 -40px 0; }
.bp-eyebrow { font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); margin-bottom: 8px; }
.btable { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.brow {
  display: grid; grid-template-columns: 200px minmax(0, 1fr) 250px 190px 110px 18px; gap: 18px; align-items: center;
  width: 100%; padding: 11px 16px; text-align: left; font: inherit; color: inherit; background: none; border: 0;
  border-top: 1px solid var(--line); cursor: pointer; transition: background 0.15s;
}
.btable > .brow:first-child { border-top: 0; }
.brow:not(.bhead):hover { background: rgba(255, 255, 255, 0.022); }
.brow:not(.bhead):hover .brow-go { color: var(--text); transform: translateX(2px); }
.bhead { cursor: default; padding-top: 9px; padding-bottom: 9px; background: var(--bg-2); font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); }
.b-tier { display: flex; align-items: center; gap: 10px; min-width: 0; }
.btable .tier-ico { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; }
.btable .tier-ico .i { width: 14px; height: 14px; }
.b-name { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.b-code { font: 500 10.5px var(--mono); color: var(--tc); }
.b-role { font-size: 12.5px; line-height: 1.5; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b-model { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.b-model .mono { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-class { font-size: 11px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-runs { font-size: 12px; line-height: 1.45; color: var(--text-2); }
.b-lat { font-size: 11.5px; color: var(--text-3); }
.brow-go { display: flex; justify-content: center; color: var(--text-4); transition: color 0.15s, transform 0.15s var(--ease); }
.blinks { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.blink-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr) 190px; gap: 18px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--line); font: 11.5px/1.45 var(--mono); color: var(--text-2); }
.blink-row:first-child { border-top: 0; }
.bl-pair { display: flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 12.5px; color: var(--text); }
.bl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }
.bl-arrow { color: var(--text-4); margin: 0 2px; }
.bl-ch b { margin-right: 6px; font-weight: 700; }
.bl-ch b.dn { color: var(--accent); }
.bl-ch b.up { color: var(--good); }
.bl-note { color: var(--text-4); }
.bp-note { margin: 16px 0 0; font-size: 12px; color: var(--text-4); }
@media (max-width: 1180px) {
  .brow { grid-template-columns: 180px minmax(0, 1fr) 220px 18px; }
  .brow .b-runs, .brow .b-lat { display: none; }
  .blink-row { grid-template-columns: 1fr; gap: 4px; }
}

/* workspace: one page — sticky glass toolbar, growing editors, activity column, Halo dock */
.bws { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.bws-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 20px 0 16px;
  background: rgba(10, 11, 13, 0.78); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line); transition: padding 0.34s var(--ease);
}
.app.sidebar-collapsed .bws-top { padding-left: 56px; }
.bws-back {
  display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 11px 0 6px; flex: none;
  border: 1px solid var(--line-2); border-radius: 8px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)), var(--surface-2);
  color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.bws-back:hover { color: var(--text); border-color: var(--line-3); }
.bws-sep { width: 1px; height: 20px; background: var(--line-2); flex: none; }
.bws-title { display: flex; align-items: center; gap: 10px; flex: none; }
.bws-title .tier-ico { width: 30px; height: 30px; border-radius: 8px; }
.bws-title .tier-ico .i { width: 16px; height: 16px; }
.bws-name { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.bws-chips { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.bws-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2); font: 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.bws-staged { flex: none; }
.bws-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.bws-icon {
  width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.bws-icon:hover { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
.bws-icon:disabled { opacity: 0.32; cursor: default; background: none; border-color: transparent; }
.bws-msg { width: 240px; height: 30px !important; padding: 0 10px; font-size: 12.5px; }
.bws-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.bws-main { min-width: 0; padding: 30px 40px 16px; display: flex; flex-direction: column; gap: 34px; }
.ed { display: flex; flex-direction: column; min-width: 0; }
.ed-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ed-label { font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.ed-meta { margin-left: auto; font: 11px var(--mono); color: var(--text-4); }
.ed textarea.code {
  display: block; width: 100%; min-height: 120px; overflow: hidden; resize: none; padding: 16px 18px 16px 20px;
  background: linear-gradient(90deg, rgba(var(--tc-rgb), 0.05), transparent 30%), var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-left: 2px solid rgba(var(--tc-rgb), 0.55); border-radius: var(--radius-sm);
  font: 12.5px/1.7 var(--mono); tab-size: 2; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.ed textarea.code:focus { border-color: var(--line-3); border-left-color: var(--tc); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(var(--tc-rgb), 0.1); }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kv { display: flex; flex-direction: column; gap: 8px; }
.kv > span { font: 500 10px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.mono-in { font-family: var(--mono) !important; font-size: 12.5px !important; }
.kv-static { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; font: 12px/1.6 var(--mono); }
.kv-static .k { color: var(--text-4); text-transform: uppercase; font-size: 10px; letter-spacing: 0.1em; }
.kv-static .v { color: var(--text-2); }
.ed-warn { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(229, 180, 80, 0.25); background: rgba(229, 180, 80, 0.06); color: #e8c27a; font-size: 12.5px; line-height: 1.5; }
.staged-diff { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 10px; overflow: hidden; }
.staged-diff > summary { cursor: pointer; padding: 8px 12px; font: 11.5px var(--mono); color: var(--text-3); background: var(--surface-2); list-style: none; }
.staged-diff > summary::-webkit-details-marker { display: none; }
/* version timeline */
.vtl { display: flex; flex-direction: column; }
.vtl-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 9px 0; }
.vtl-item::before { content: ''; position: absolute; left: 4.5px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.vtl-item:first-child::before { top: 15px; }
.vtl-item:last-child::before { bottom: calc(100% - 15px); }
.vtl-dot { position: relative; z-index: 1; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--line-3); background: var(--bg); }
.vtl-item.cur .vtl-dot { border-color: var(--tc); background: var(--tc); box-shadow: 0 0 0 3px rgba(var(--tc-rgb), 0.18); }
.vtl-note { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; min-width: 0; }
.vtl-item.cur .vtl-note { color: var(--text); }
.vtl-cur { font: 600 9.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--tc); padding: 3px 5px; border-radius: 4px; background: rgba(var(--tc-rgb), 0.1); }
.vtl-time { font: 11px var(--mono); color: var(--text-4); white-space: nowrap; }
/* activity column — sticky, flows with the page */
.bws-feed { width: 300px; min-width: 0; overflow: hidden; border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(14, 16, 19, 0.7), rgba(14, 16, 19, 0.25)); transition: width 0.42s var(--ease), opacity 0.32s var(--ease), border-color 0.32s; }
.bws.feed-closed .bws-feed { width: 0; opacity: 0; border-left-color: transparent; }
.bws-feed-inner { position: sticky; top: 58px; width: 300px; padding: 26px 16px 24px; }
.bws-feed-head { font: 500 10.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding: 0 6px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.bws-feed-empty { padding: 10px 6px; color: var(--text-4); font-size: 12px; line-height: 1.55; }
.tier-feed-list { display: flex; flex-direction: column; gap: 1px; }
.tier-feed-item { padding: 8px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; display: flex; gap: 8px; align-items: baseline; transition: background 0.12s; animation: ui-rise 0.25s var(--ease); }
.tier-feed-item:hover { background: rgba(255, 255, 255, 0.035); }
.tier-feed-item .ic { flex: none; width: 14px; text-align: center; color: var(--text-3); }
.tier-feed-item .tx { flex: 1; min-width: 0; color: var(--text-2); }
.tier-feed-item .tm { color: var(--text-4); font: 10.5px var(--mono); white-space: nowrap; }
.tier-feed-item.kind-save .ic, .tier-feed-item.kind-save .tx { color: var(--good); }
.tier-feed-item.kind-undo .ic, .tier-feed-item.kind-redo .ic { color: var(--warn); }
.tier-feed-item.kind-error .ic, .tier-feed-item.kind-error .tx { color: var(--bad); }
.bws > .halo-dock-wrap { padding-left: 40px; padding-right: 40px; }
.bws:not(.feed-closed) > .halo-dock-wrap { padding-right: 340px; }
.flash { animation: flashbg 1.1s ease; }
@keyframes flashbg { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
@media (max-width: 1100px) { .bws-chips, .bws-msg { display: none; } }
@media (max-width: 860px) {
  .bws-body { grid-template-columns: 1fr; } .bws-feed { display: none; }
  .bws-main { padding: 22px 16px; } .bp { padding: 0 16px 48px; } .bp > .view-head { margin: 0 -16px 0; }
  .bws:not(.feed-closed) > .halo-dock-wrap, .bws > .halo-dock-wrap { padding: 20px 12px 0; }
}

/* ---- Simulations: ChatGPT-style agent ---- */
.simchat { display: grid; grid-template-columns: 236px 1fr; height: calc(100vh - 150px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.simchat.side-closed { grid-template-columns: 0 1fr; }
.simchat-side { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.simchat.side-closed .simchat-side { border-right: none; }
.simchat-side-head { height: 50px; padding: 0 10px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); flex: none; }
.simchat-sessions { flex: 1; overflow-y: auto; padding: 6px; }
.simchat-session { height: 32px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-size: 13px; display: flex; gap: 6px; align-items: center; color: var(--text-2); transition: background 0.1s, color 0.1s; }
.simchat-session:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.simchat-session.active { background: rgba(255, 255, 255, 0.065); color: var(--text); box-shadow: var(--hl); }
.simchat-session .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.simchat-main { display: flex; flex-direction: column; min-width: 0; }
.simchat-top { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.simchat-top .title { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.simchat-feed { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.simchat-input { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; margin: 0 16px 16px; background: var(--bg); flex: none; transition: border-color 0.12s; }
.simchat-input:focus-within { border-color: var(--line-3); }
.simchat-input textarea { border: none; background: none; flex: 1; min-height: 24px; max-height: 160px; padding: 4px 6px; color: var(--text); font-family: inherit; font-size: 13.5px; resize: none; }
.simchat-input textarea:focus { outline: none; box-shadow: none; }
.simchat-empty { margin: auto; text-align: center; color: var(--text-3); max-width: 440px; }
.simchat-empty h2 { color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; margin: 0 0 8px; }
.simchat-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.simchat-chip { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; height: 30px; padding: 0 12px; font-size: 12.5px; cursor: pointer; color: var(--text-2); transition: border-color 0.12s, color 0.12s, background 0.12s; }
.simchat-chip:hover { border-color: var(--line-3); color: var(--text); background: var(--surface-3); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.toggle .sw { width: 30px; height: 18px; border-radius: 999px; background: var(--surface-4); border: 1px solid var(--line-2); position: relative; transition: background 0.15s, border-color 0.15s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); transition: transform 0.18s var(--ease), background 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.toggle.on .sw { background: var(--accent); border-color: var(--accent); }
.toggle.on .sw::after { transform: translateX(12px); background: #fff; }

/* live sim-run feed inside the chat */
.run-feed { border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; margin-top: 10px; }
.run-feed-head { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--surface-2); font-size: 12.5px; }
.run-feed-head .nm { font-weight: 600; }
.run-feed pre { margin: 0; padding: 10px 12px; background: var(--bg); font-family: var(--mono); font-size: 11.5px; line-height: 1.5; max-height: 220px; overflow: auto; white-space: pre-wrap; color: var(--text-2); }
.run-feed .metrics { padding: 10px 12px; border-top: 1px solid var(--line); }

/* ---- full-screen platform viewer ----
   The 3D runs edge to edge; one slim bar on top. Arrows float over the model, hidden
   until you move over the viewer, and sharpen out of a blur when you point at them. */
.pv-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; animation: pv-in 0.24s var(--ease); }
.pv-overlay.closing { animation: pv-out 0.2s var(--ease) forwards; pointer-events: none; }
@keyframes pv-in { from { opacity: 0; transform: scale(0.992); } to { opacity: 1; transform: none; } }
@keyframes pv-out { to { opacity: 0; transform: scale(0.992); } }
.pv-bar { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); flex: none; }
.pv-bar .btn { height: 30px; }
.pv-name { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 9px; }
.pv-name .pico { font-size: 17px; }
.pv-badges { display: flex; gap: 6px; }
.pv-pos { margin-left: auto; color: var(--text-3); font: 11.5px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.pv-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0a0b0d; transition: opacity 0.32s var(--ease), filter 0.32s var(--ease); }
.pv-frame.loading { opacity: 0; filter: blur(6px); }
.pv-arrow {
  position: absolute; z-index: 5; top: calc(50% + 23px); width: 46px; height: 46px; margin-top: -23px; padding: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
  background: rgba(17, 19, 22, 0.55); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), var(--hl);
  opacity: 0; filter: blur(6px); transform: scale(0.9);
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s, border-color 0.2s;
}
.pv-arrow .i { width: 20px; height: 20px; stroke-width: 2; }
.pv-arrow.prev { left: 20px; }
.pv-arrow.next { right: 400px; } /* just left of the viewer's 380px stats panel */
.pv-stage:hover .pv-arrow, .pv-arrow:focus-visible { opacity: 0.6; filter: blur(1.5px); transform: none; }
.pv-stage .pv-arrow:hover { opacity: 1; filter: none; transform: scale(1.06); background: rgba(27, 30, 35, 0.82); border-color: rgba(255, 255, 255, 0.16); }
.pv-stage .pv-arrow:active { transform: scale(0.97); }
@media (hover: none) { .pv-arrow { opacity: 0.8; filter: none; transform: none; } }
.pv-info { position: absolute; top: 58px; left: 16px; width: 300px; max-width: calc(100% - 32px); background: rgba(17, 19, 22, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px; z-index: 6; box-shadow: var(--shadow-3), var(--hl); animation: ui-pop 0.18s var(--ease); }
.pv-info .card { margin-bottom: 8px; }
.pv-info .card:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .pv-info { width: auto; right: 16px; }
  .pv-pos { display: none; }
}
@media (max-width: 820px) { .pv-arrow { top: 28vh; } .pv-arrow.next { right: 16px; } }

/* ---- Projects: AI goal interface ---- */
.goal-designer { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px; background: var(--surface); margin-bottom: 18px; box-shadow: var(--hl), var(--shadow-1); transition: border-color 0.12s; }
.goal-designer:focus-within { border-color: var(--line-3); }
.goal-designer textarea { border: none; background: none; flex: 1; min-height: 24px; max-height: 120px; resize: none; color: var(--text); font-family: inherit; font-size: 13.5px; padding: 4px 6px; }
.goal-designer textarea:focus { outline: none; box-shadow: none; }
.goal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--hl), var(--shadow-1); }
.goal-card .ghead { display: flex; align-items: flex-start; gap: 10px; }
.goal-card .gtitle { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; }
.goal-card .gdesc { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.goal-measure { margin: 14px 0 6px; }
.goal-measure .mlabel { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 7px; gap: 10px; }
.goal-measure .mlabel b { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.goal-check { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.goal-check input { width: 15px; height: 15px; accent-color: var(--accent); }
.goal-check.done span { color: var(--text-3); text-decoration: line-through; }
.goal-notes { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.goal-note { display: flex; gap: 10px; font-size: 12.5px; padding: 4px 0; }
.goal-note .nt { color: var(--text-3); white-space: nowrap; font: 10.5px/1.9 var(--mono); flex: none; }
.goal-talk { display: flex; gap: 8px; margin-top: 12px; }
.goal-talk input { flex: 1; }

/* ---- toast ---- */
.toast-host { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 999; }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity 0.22s var(--ease), transform 0.22s var(--ease); box-shadow: var(--shadow-3), var(--hl); max-width: 360px; }
.toast.show { opacity: 1; transform: none; }
.toast.good { border-color: rgba(69, 201, 139, 0.4); box-shadow: var(--shadow-3), inset 2px 0 0 var(--good); }
.toast.bad { border-color: rgba(239, 107, 107, 0.5); box-shadow: var(--shadow-3), inset 2px 0 0 var(--bad); }

/* ---- security banner ---- */
.lan-note { font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.lan-note .lock { color: var(--good); }

/* ---- Simulations: Human sim | AI testing ---- */
.sim-tabs { display: flex; gap: 8px; margin: 2px 0 16px; }
.sim-tab { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s; }
.sim-tab:hover { border-color: var(--line-3); color: var(--text); }
.sim-tab.active { background: var(--surface-4); border-color: var(--line-3); color: var(--text); }
.sim-tab .ico { font-size: 13px; }
.sim-host { min-width: 0; }
.sim-human { display: flex; flex-direction: column; gap: 10px; }
.sim-human-note { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-3); }
.sim-human-note span { flex: 1; min-width: 0; }
.sim-build { display: inline-flex; align-items: center; height: 28px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); flex: none; }
.sim-build .lbl { font: 500 10px var(--mono); color: var(--text-3); padding: 0 8px 0 8px; text-transform: uppercase; letter-spacing: 0.1em; }
.sim-build-opt { height: 22px; background: transparent; border: none; border-radius: 6px; color: var(--text-3); font-size: 12px; font-weight: 500; padding: 0 11px; cursor: pointer; transition: color 0.12s, background 0.12s; }
.sim-build-opt:hover { color: var(--text); }
.sim-build-opt.active { background: var(--surface-4); color: var(--text); box-shadow: var(--hl), 0 1px 2px rgba(0, 0, 0, 0.35); }
.sim-human-frame { width: 100%; height: calc(100vh - 210px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: block; }

/* Simulations is a full-page surface — no padded column, no framed box, no text wall.
   The strip uses the sim command bar's color so the two read as one header. */
.view.simview { max-width: none; width: 100%; margin: 0; padding: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.app.sidebar-collapsed .view.simview { padding-top: 0; }
.sim-strip { flex: none; display: flex; align-items: center; gap: 16px; height: 50px; padding: 0 16px; background: #0e1013; border-bottom: 1px solid var(--line); }
.app.sidebar-collapsed .sim-strip { padding-left: 60px; }
.sim-strip-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.sim-strip .sim-tabs { margin: 0; gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; }
.sim-strip .sim-tab { height: 26px; padding: 0 13px; font-size: 12.5px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); }
.sim-strip .sim-tab:hover { color: var(--text); border: 0; }
.sim-strip .sim-tab.active { background: var(--surface-4); color: var(--text); box-shadow: var(--hl), 0 1px 2px rgba(0, 0, 0, 0.35); }
.sim-strip-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sim-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.sim-host > .sim-human-frame { flex: 1 1 auto; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: var(--bg); }
.sim-host > .simchat { flex: 1 1 auto; height: auto; min-height: 0; border: 0; border-radius: 0; }
@media (max-width: 640px) { .view.simview { height: calc(100vh - 56px); } }
@media (max-width: 860px) {
  .sim-strip { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
}

/* ---- accounts: auth gate, user footer, admin ---- */
/* ---- sign-in gate: full-bleed split — the wireframe dome (lib/gate-dome.js) on the left,
   the access panel on the right. Hairlines, mono micro-labels, one accent; on phones the
   dome becomes a header band and the panel scrolls beneath it. ---- */
.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 480px); background: var(--bg); }
.app.gated .sidebar, .app.gated .main, .app.gated .sidebar-open-btn { display: none; }
.auth-visual {
  position: relative; overflow: hidden; min-height: 0; container-type: inline-size;
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0) 0 0 / 24px 24px, #08090b;
}
.auth-visual::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 78% 72% at 50% 58%, transparent 38%, rgba(8, 9, 11, 0.9) 100%); }
.gate-dome { position: absolute; inset: 0; display: block; }
.gv-corner { position: absolute; z-index: 2; width: 14px; height: 14px; border: 0 solid rgba(237, 238, 241, 0.22); }
.gv-corner.tl { top: 18px; left: 18px; border-top-width: 1px; border-left-width: 1px; }
.gv-corner.tr { top: 18px; right: 18px; border-top-width: 1px; border-right-width: 1px; }
.gv-corner.bl { bottom: 18px; left: 18px; border-bottom-width: 1px; border-left-width: 1px; }
.gv-corner.br { bottom: 18px; right: 18px; border-bottom-width: 1px; border-right-width: 1px; }
.gv-brand { position: absolute; z-index: 2; top: 40px; left: 44px; display: flex; flex-direction: column; gap: 7px; }
.gv-word { font-size: 15px; font-weight: 600; letter-spacing: 0.44em; color: var(--text); line-height: 1; }
.gv-sub { font: 500 9.5px/1 var(--mono); letter-spacing: 0.62em; color: var(--text-3); }
.gv-hud { position: absolute; z-index: 2; left: 44px; bottom: 40px; display: flex; flex-direction: column; gap: 7px; font: 500 10px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.gv-row { display: grid; grid-template-columns: 62px auto; gap: 12px; }
.gv-k { color: var(--text-4); }
.gv-v { color: var(--text-2); font-variant-numeric: tabular-nums; }
/* the mission caption over the dome (lib/gate-dome.js): what the simulated fleet is doing, a
   progress hairline, pips that jump to a mission, and the last few orders as a comms log */
.gm { position: absolute; z-index: 2; top: 40px; right: 44px; width: 312px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.gm-top { display: flex; justify-content: space-between; align-items: center; font: 500 9.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-4); }
.gm-tag::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; animation: gate-pulse 1.8s ease-in-out infinite; }
.gm-idx { color: var(--text-3); font-variant-numeric: tabular-nums; }
.gm-name { margin-top: 4px; font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text); }
.gm-line { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.gm.swap .gm-name, .gm.swap .gm-line { animation: ui-rise 0.45s var(--ease) both; }
.gm-bar { height: 1px; margin-top: 2px; background: rgba(237, 238, 241, 0.08); overflow: hidden; }
.gm-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.gm-pips { display: flex; gap: 6px; pointer-events: auto; }
.gm-pip { position: relative; width: 20px; height: 12px; padding: 0; background: none; border: 0; cursor: pointer; }
.gm-pip::after { content: ''; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: rgba(237, 238, 241, 0.14); transition: background 0.2s; }
.gm-pip:hover::after { background: rgba(237, 238, 241, 0.4); }
.gm-pip.on::after { background: var(--accent); }
.gm-log { display: flex; flex-direction: column; gap: 6px; min-height: 84px; margin: 2px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid rgba(237, 238, 241, 0.06); font: 500 9.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.gm-log li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; white-space: nowrap; color: var(--text-4); animation: ui-rise 0.3s var(--ease) both; }
.gm-log li span:last-child { overflow: hidden; text-overflow: ellipsis; }
.gm-log li:last-child { color: var(--text-2); }
.gm-log li.hot { color: rgba(229, 107, 98, 0.5); }
.gm-log li.amb { color: rgba(223, 174, 82, 0.5); }
.gm-log li.hot:last-child { color: var(--bad); }
.gm-log li.amb:last-child { color: var(--warn); }
.gm-log .gm-t { color: var(--text-4); font-variant-numeric: tabular-nums; }
.gm.still .gm-top, .gm.still .gm-bar, .gm.still .gm-pips, .gm.still .gm-log { display: none; }
@media (max-height: 720px) { .gm-log { display: none; } }
/* the hero narrows on mid-size windows: the caption shrinks so it never meets the wordmark */
@container (max-width: 820px) { .gm { width: 262px; } }
@container (max-width: 680px) { .gm { width: 210px; gap: 8px; } .gm-line, .gm-log { display: none; } }
@container (max-width: 540px) { .gm { width: 172px; } .gm-tag { display: none; } .gm-name { font-size: 12px; letter-spacing: 0.24em; } }
/* the scene carousel under the caption (lib/gate-dome.js): arrows either side of the scene tabs,
   and the live tab's hairline fills as its missions run. A wheel, trackpad or swipe over the hero
   scrolls through the scenes too, so the hero takes horizontal drags and leaves vertical ones. */
.auth-visual { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gate-dome { cursor: grab; }
.auth-visual.dragging, .auth-visual.dragging .gate-dome { cursor: grabbing; }
.gc { position: absolute; z-index: 2; right: 44px; bottom: 40px; display: flex; align-items: center; gap: 14px; }
.gc-arrow { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgba(237, 238, 241, 0.14); background: rgba(14, 15, 18, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); color: var(--text-3); cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.gc-arrow:hover { color: var(--text); border-color: rgba(237, 238, 241, 0.34); background: rgba(26, 28, 32, 0.72); }
.gc-arrow:active { transform: scale(0.96); }
.gc-arrow svg { width: 12px; height: 12px; }
.gc-tabs { display: flex; gap: 16px; }
.gc-tab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 54px; padding: 2px 0 9px; background: none; border: 0; cursor: pointer; font: 500 9.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-4); transition: color 0.15s; }
.gc-tab:hover { color: var(--text-2); }
.gc-tab.on { color: var(--text); }
.gc-n { font-size: 8px; letter-spacing: 0.12em; color: var(--text-4); font-variant-numeric: tabular-nums; transition: color 0.15s; }
.gc-tab.on .gc-n { color: var(--accent); }
.gc-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(237, 238, 241, 0.1); overflow: hidden; }
.gc-prog b { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.gc-count { display: none; min-width: 52px; text-align: center; font: 500 9.5px/1 var(--mono); letter-spacing: 0.16em; color: var(--text-2); font-variant-numeric: tabular-nums; }
.gc.still .gc-prog { display: none; }
.gc-dots { display: none; }
.gc-dot { position: relative; width: 24px; height: 24px; padding: 0; background: none; border: 0; cursor: pointer; }
.gc-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(237, 238, 241, 0.22); transition: background 0.25s, transform 0.25s, box-shadow 0.25s; }
.gc-dot.on::after { background: var(--accent); transform: scale(1.35); box-shadow: 0 0 8px rgba(127, 178, 195, 0.55); }
/* narrower hero: the tabs give way to a counter so the carousel never meets the status block */
@container (max-width: 720px) { .gc-tabs { display: none; } .gc-count { display: block; } }

.auth-panel { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--line); }
.auth-panel-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 368px; margin: 0 auto; padding: 56px 32px 40px; }
.auth-panel-inner > * { animation: ui-rise 0.4s var(--ease) both; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; padding: 18px 32px; border-top: 1px solid var(--line); font: 500 9.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); }
.auth-card { display: flex; flex-direction: column; width: 100%; }
.auth-head { margin-bottom: 28px; }
.auth-product { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; font-size: 13px; font-weight: 500; letter-spacing: -0.005em; color: var(--text-2); }
.auth-product .brand-mark { width: 26px; height: 26px; }
.auth-eyebrow { margin-bottom: 10px; font: 500 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.auth-title { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -0.032em; line-height: 1.12; color: var(--text); }
.auth-sub { margin: 9px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-3); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); }
.auth-input { width: 100%; height: 44px !important; padding: 0 14px; background: var(--bg) !important; border: 1px solid var(--line-2); border-radius: 9px; color: var(--text); font: 400 14px var(--sans); letter-spacing: normal; text-transform: none; transition: border-color 0.15s, box-shadow 0.15s; }
.auth-input:hover { border-color: var(--line-3); }
.auth-input:focus { outline: none; border-color: rgba(127, 178, 195, 0.6); box-shadow: 0 0 0 3px rgba(127, 178, 195, 0.12); }
.auth-extra { display: none; flex-direction: column; gap: 14px; }
.auth-card.mode-signup .auth-extra { display: flex; }
.btn.auth-google { width: 100%; height: 44px; gap: 10px; border-radius: 9px; background: var(--surface-2); border-color: var(--line-2); font-size: 13.5px; font-weight: 500; }
.btn.auth-google:hover { background: var(--surface-3); border-color: var(--line-3); }
.auth-google .g { display: inline-flex; }
.auth-google .g svg { width: 18px; height: 18px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--text-4); font: 500 10px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.auth-btn { width: 100%; height: 44px; margin-top: 4px; gap: 8px; border-radius: 9px; font-size: 13.5px; }
.auth-arrow { display: inline-flex; }
.auth-arrow .i { width: 15px; height: 15px; stroke-width: 2; transition: transform 0.15s var(--ease); }
.btn.auth-btn:hover .auth-arrow .i { transform: translateX(2px); }
.auth-link { align-self: center; margin-top: 4px; padding: 6px; background: none; border: 0; color: var(--text-3); font: inherit; font-size: 13px; cursor: pointer; transition: color 0.12s; }
.auth-link:hover { color: var(--text); }
.auth-err { color: var(--bad); font-size: 13px; line-height: 1.5; }
.auth-err:empty { display: none; }
.auth-status { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; height: 28px; margin-bottom: 18px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 6px; font: 500 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.auth-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.auth-status.warn { color: var(--warn); border-color: rgba(223, 174, 82, 0.35); background: rgba(223, 174, 82, 0.06); }
.auth-status.warn i { animation: gate-pulse 1.4s ease-in-out infinite; }
.auth-status.bad { color: var(--bad); border-color: rgba(229, 107, 98, 0.35); background: rgba(229, 107, 98, 0.06); }
@keyframes gate-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.pending-msg { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.pending-who { margin-bottom: 20px; font: 11.5px var(--mono); color: var(--text-3); }
.pending-job-row { display: flex; gap: 8px; }
.pending-job-row .auth-input { flex: 1; min-width: 0; }
.pending-job-row .btn { height: 44px; border-radius: 9px; }
.auth-actions { display: flex; gap: 8px; margin-top: 22px; }
.auth-card .loading { padding: 4px 0; }

@media (max-width: 900px) {
  /* a fixed band height: a minmax() row collapsed to its 250px floor under the tall panel */
  .auth-gate { grid-template-columns: minmax(0, 1fr); grid-template-rows: clamp(330px, 48vh, 440px) auto; align-content: start; overflow-y: auto; }
  .auth-panel { min-height: auto; overflow: visible; border-left: 0; border-top: 1px solid var(--line); }
  .auth-panel-inner { justify-content: flex-start; padding: 32px 24px 32px; }
  .auth-product { margin-bottom: 26px; }
  .auth-title { font-size: 26px; }
  .gv-brand { top: 26px; left: 26px; }
  .gv-hud { display: none; }
  .gv-corner { display: none; }
  .gm { top: 24px; right: 22px; width: auto; max-width: 46%; gap: 8px; }
  .gm-top { font-size: 9.5px; }
  .gm-tag { display: none; }
  .gm-name { margin-top: 0; font-size: 13px; letter-spacing: 0.24em; }
  .gm-line, .gm-log, .gm-pips { display: none; }
  /* the carousel is just the scene dots, centred along the bottom of the band */
  .gc { left: 50%; right: auto; bottom: 12px; gap: 0; transform: translateX(-50%); }
  .gc-arrow, .gc-tabs, .gc-count { display: none; }
  .gc-dots { display: flex; gap: 2px; }
  .auth-input { font-size: 16px !important; }   /* iOS zooms into inputs below 16px */
  .auth-foot { padding: 16px 24px; }
}

.nav-foot .user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; transition: background 0.12s; }
.nav-foot .user-chip:hover { background: rgba(255, 255, 255, 0.03); }
.user-av { width: 28px; height: 28px; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text); flex: none; box-shadow: var(--hl); }
.user-av.lg { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; }
.user-id { flex: 1; min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font: 500 10px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.signout { background: none; border: 1px solid transparent; color: var(--text-3); width: 28px; height: 28px; padding: 0; border-radius: 7px; cursor: pointer; flex: none; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: color 0.12s, background 0.12s, border-color 0.12s; }
.signout:hover { color: var(--text); background: var(--surface-3); border-color: var(--line-2); }

.users-head { margin: 4px 0 10px; }
.users-list { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; box-shadow: var(--hl); }
.user-job { font-size: 12.5px; color: var(--text-2); font-style: italic; margin-top: 2px; }
.user-ctl { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.user-ctl select { height: 32px; border-radius: var(--radius-sm); background-color: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); padding: 0 28px 0 10px; }
.user-ctl .role-desc { max-width: 210px; line-height: 1.35; }

/* =====================================================================
   PAGE SYSTEM — every section fills the page.
   A full-bleed header band, flat sections divided by hairlines (no bordered box
   standing in for the page), glossy tiles only for real objects, and nothing ever
   scrolls inside a card: text areas grow, lists/diffs/logs show in full, the page
   is the only scroller (a sticky side column is the one exception).
   ===================================================================== */
.view { max-width: none; padding: 0 40px 96px; }
/* content keeps a sensible measure on very wide screens (full-page surfaces opt out) */
.view:not(.homeview):not(.simview):not(.brainsview):not(.flyview) > :not(.view-head):not(.halo-dock-wrap) { max-width: 1320px; }
.app.sidebar-collapsed .view { padding-top: 0; }
.view-head { position: relative; margin: 0 -40px 4px; padding: 26px 40px 18px; border-bottom: 1px solid var(--line); transition: padding 0.34s var(--ease); }
.view-head h1 { font-size: 19px; letter-spacing: -0.022em; }
.view-head p { margin-top: 5px; font-size: 13px; max-width: 72ch; color: var(--text-3); }
.app.sidebar-collapsed .view-head { padding-left: 72px; }

/* <details class="panel"> now reads as a page section, not a box */
.panel { background: none; border: 0; border-radius: 0; box-shadow: none; margin: 0; overflow: visible; }
.panel > .panel-head { min-height: 0; padding: 22px 0 10px; gap: 10px; border-bottom: 1px solid var(--line); }
.panel > .panel-head:hover { background: none; }
.panel > .panel-head:hover .panel-title { color: #fff; }
.panel-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; transition: color 0.15s; }
.panel-sub { font: 11px var(--mono); color: var(--text-4); letter-spacing: 0.02em; }
.panel-caret { width: 14px; margin-left: -2px; }
.panel-body { padding: 14px 0 6px; border-top: 0; }

/* plain page sections (lib/util.js section()) */
.sec { padding-top: 22px; }
.sec-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.sec-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.sec-sub { font: 11px var(--mono); color: var(--text-4); letter-spacing: 0.02em; }
.sec-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.sec-desc { margin: -8px 0 16px; color: var(--text-3); font-size: 12.5px; line-height: 1.55; max-width: 80ch; }
/* main column + sticky side column */
.page-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 0 44px; align-items: start; }
.page-split > .side-col { position: sticky; top: 0; padding-bottom: 24px; }
.page-split.side-left { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
@media (max-width: 1100px) { .page-split, .page-split.side-left { grid-template-columns: minmax(0, 1fr); } .page-split > .side-col { position: static; } }

/* glossy tiles: a faint top sheen + inner highlight */
.card, .stat, .goal-card {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: none;
}
.panel .stat, .card .stat { background: var(--surface); border-radius: var(--radius); }
.card .card { background: var(--surface-2); box-shadow: none; }

/* glossy controls */
.btn { background: var(--surface-3); box-shadow: none; }
.btn.primary { background: #e6e8ec; border-color: #e6e8ec; box-shadow: none; }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.primary:disabled:hover { background: #e6e8ec; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { background: rgba(239, 107, 107, 0.06); box-shadow: none; }
input, select, textarea { background-color: var(--bg-2); box-shadow: none; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select { height: 32px; }
input:focus, select:focus, textarea:focus { border-color: rgba(127, 178, 195, 0.55); box-shadow: 0 0 0 3px rgba(127, 178, 195, 0.12); }
textarea { padding: 10px 12px; }
textarea.autogrow { resize: none; overflow: hidden; }
label.field { gap: 6px; font: 500 10px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
label.field > input, label.field > select, label.field > textarea { font-family: var(--sans); font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: normal; text-transform: none; color: var(--text); }
.empty { padding: 12px 0; border: 0; border-radius: 0; background: none; color: var(--text-4); font-size: 12.5px; text-align: left; }

/* nothing scrolls inside a card */
.diff { max-height: none; overflow: visible; }
.diff-line { white-space: pre-wrap; word-break: break-word; }
.cl-raw { max-height: none; overflow: visible; }
.run-feed pre { max-height: none; overflow: visible; }

/* ---- Halo dock: floating liquid-glass input that rides along as you scroll ---- */
.view.has-dock { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 0; }
.halo-dock-wrap { position: sticky; bottom: 22px; z-index: 25; margin-top: auto; margin-bottom: 22px; padding: 28px 0 0; display: flex; justify-content: center; pointer-events: none; }
.halo-dock {
  pointer-events: auto; position: relative; isolation: isolate; width: 100%; max-width: 780px;
  display: flex; align-items: flex-end; gap: 10px; padding: 9px 9px 9px 10px; border-radius: 24px;
  background: rgba(20, 22, 26, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(130%); backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.halo-dock:focus-within { border-color: rgba(255, 255, 255, 0.18); }
.halo-dock .dock-av {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: url(assets/angel-logo-white.png) center / 62% no-repeat, rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.halo-dock textarea {
  flex: 1; min-height: 36px; max-height: 160px; padding: 8px 4px; border: 0; background: none; box-shadow: none;
  color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.45; resize: none;
}
.halo-dock textarea:hover { border: 0; }
.halo-dock textarea:focus { outline: none; box-shadow: none; }
.halo-dock textarea::placeholder { color: rgba(237, 238, 241, 0.46); }
.halo-dock .dock-send {
  flex: none; height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px 0 12px; border-radius: 18px; border: 0;
  background: #e6e8ec; color: #0a0b0d; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background 0.15s var(--ease), opacity 0.15s;
}
.halo-dock .dock-send .i { width: 15px; height: 15px; stroke-width: 2.2; }
.halo-dock .dock-send:hover { background: #fff; }
.halo-dock .dock-send:disabled { opacity: 0.5; cursor: default; transform: none; }
.halo-dock .dock-hint { position: absolute; left: 58px; top: -22px; font: 10.5px var(--mono); letter-spacing: 0.06em; color: var(--text-4); text-transform: uppercase; pointer-events: none; }
/* Home's composer gets the same glass */
.homeview .chat-input {
  border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 22, 26, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(130%); backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}
.homeview .chat-input:focus-within { border-color: rgba(255, 255, 255, 0.18); }

/* ---- per-page layouts on the page system ---- */
/* Settings → AI usage: month total strip, provider + model breakdowns, earlier months */
.usage-strip { display: flex; align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.usage-strip .hs-item:first-child .hs-value { font-size: 20px; }
.usage-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 40px; }
.usage-sub { margin: 20px 0 4px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.usage-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr) 64px; gap: 12px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.u-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-name.mono { font: 11.5px var(--mono); color: var(--text-2); }
.u-cost { font: 500 12.5px var(--mono); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.u-src, .u-calls { font: 11px var(--mono); color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-calls { text-align: right; }
.usage-note { margin: 14px 0 0; max-width: 90ch; font-size: 12px; line-height: 1.55; color: var(--text-4); }
@media (max-width: 1100px) { .usage-cols { grid-template-columns: minmax(0, 1fr); } }

/* Code → Changes: branch facts, Halo's commit requests awaiting approval, the uncommitted
   files (checkboxes; protected files locked), a message box and the diff, all in full. */
.chg-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; }
.chg-branch { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px 14px; align-items: baseline; font-size: 12.5px; }
.chg-k { font: 500 9.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); }
.chg-branch .mono { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg-actions { display: flex; gap: 6px; }
.chg-rule { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12px; color: var(--text-3); }
.chg-sub { display: flex; align-items: center; gap: 10px; margin: 20px 0 6px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.chg-req { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: start; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.chg-req-msg { font-size: 13.5px; font-weight: 500; color: var(--text); }
.chg-req-why { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.chg-req-files { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font: 11px/1.5 var(--mono); color: var(--text-3); }
.chg-req-meta { margin-top: 6px; font: 10.5px var(--mono); color: var(--text-4); }
.chg-req-acts { display: flex; gap: 6px; }
.chg-files { display: flex; flex-direction: column; }
.chg-file { display: grid; grid-template-columns: 18px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 12.5px; }
.chg-file:hover { background: rgba(255, 255, 255, 0.018); }
.chg-file.chg-all { color: var(--text-3); }
.chg-file.blocked { cursor: default; opacity: 0.55; }
.chg-file input { margin: 0; accent-color: var(--accent); }
.chg-kind { font: 500 9.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); }
.chg-kind.k-new, .chg-kind.k-added { color: var(--good); }
.chg-kind.k-deleted { color: var(--bad); }
.chg-kind.k-modified { color: #a9cbd6; }
.chg-path { font: 12px/1.4 var(--mono); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg-prot { font: 500 9.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); }
.chg-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.chg-form textarea { width: 100%; font: 12.5px/1.5 var(--mono); }
.chg-form-foot { display: flex; align-items: center; gap: 6px; }
.chg-diffbox { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.chg-diffbox .diff-file { color: var(--text-2); background: var(--surface-2); font-weight: 500; }
.chg-diffbox .diff-text { padding-left: 10px; }

/* Flight Tests: program folders → stats line → type / drone-type filters → the log,
   grouped by day, youngest first. One row per record, columns line up down the page. */
.ft-bar { display: flex; align-items: center; gap: 8px; padding: 18px 0 14px; }
.ft-folders { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-folder { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: transparent; color: var(--text-3); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.14s var(--ease), color 0.14s var(--ease), border-color 0.14s var(--ease); }
.ft-folder:hover { color: var(--text); border-color: var(--line-3); }
.ft-folder.on { background: var(--surface-2); border-color: var(--line-3); color: var(--text); }
.ft-folder.add { border-style: dashed; font-weight: 400; font-size: 12.5px; }
.ft-folder-ico { display: inline-flex; color: var(--text-3); }
.ft-folder.on .ft-folder-ico { color: var(--accent); }
.ft-folder-ico .i { width: 15px; height: 15px; }
.ft-count { font: 11px var(--mono); color: var(--text-4); font-variant-numeric: tabular-nums; }
.ft-stats { display: flex; align-items: stretch; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ft-stats::-webkit-scrollbar { display: none; }
.ft-bar2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 0 2px; }
.ft-filters { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; }
.ft-chip { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; transition: background 0.14s var(--ease), color 0.14s var(--ease); }
.ft-chip:hover { color: var(--text); }
.ft-chip.on { background: var(--surface-3); color: var(--text); }
select.ft-plat-sel { width: auto; height: 30px; font-size: 12.5px; }
input.ft-search { width: 220px; height: 30px; margin: 0; font-size: 12.5px; }
.ft-loading { padding: 28px 2px; color: var(--text-4); font-size: 12.5px; }
.ft-list { display: flex; flex-direction: column; }
.ft-day { margin-top: 22px; padding: 0 2px 8px; border-bottom: 1px solid var(--line); font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.ft-row { display: grid; grid-template-columns: 62px 84px minmax(200px, 1.3fr) minmax(0, 1.7fr) 132px 118px 24px; gap: 14px; align-items: baseline; padding: 11px 2px; border-bottom: 1px solid var(--line); transition: background 0.14s; }
.ft-row:hover { background: rgba(255, 255, 255, 0.018); }
.ft-time { font: 11.5px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ft-kind { justify-self: start; padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 4px; font: 500 9.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.ft-kind.k-flight { color: #a9cbd6; border-color: rgba(127, 178, 195, 0.35); }
.ft-kind.k-bench { color: #e9c77f; border-color: rgba(229, 180, 80, 0.3); }
.ft-kind.k-sitl { color: #cdb0ff; border-color: rgba(185, 140, 255, 0.32); }
.ft-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ft-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; font-weight: 500; color: var(--text); }
.ft-file { font: 11px/1.4 var(--mono); color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-detail { font-size: 12px; line-height: 1.5; color: var(--text-3); }
.ft-metrics { display: flex; flex-wrap: wrap; gap: 3px 14px; font: 11.5px/1.5 var(--mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
.ft-metrics em { margin-right: 5px; font-style: normal; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.ft-metrics.muted { color: var(--text-4); }
.ft-plat { font: 11px/1.5 var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-src { font: 11px/1.5 var(--mono); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-out { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; color: var(--text-2); }
.ft-out i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); }
.ft-out.good i { background: var(--good); }
.ft-out.bad i { background: var(--bad); }
.ft-out.warn i { background: var(--warn); }
.ft-del { align-self: center; opacity: 0; transition: opacity 0.15s; }
.ft-row:hover .ft-del { opacity: 1; }
.ft-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.ft-form label.field { display: flex; flex-direction: column; }
.ft-form label.field.wide { grid-column: 1 / -1; }
.ft-form-foot { grid-column: 1 / -1; display: flex; gap: 8px; }
@media (max-width: 1180px) {
  .ft-row { grid-template-columns: 56px 80px minmax(0, 1fr) 24px; }
  .ft-metrics, .ft-plat, .ft-src { grid-column: 3; }
  .ft-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Record | Fly switch */
.ft-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ft-tabs { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px; flex: none; margin-top: 2px; }
.ft-tab { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-3); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background 0.14s var(--ease), color 0.14s var(--ease); }
.ft-tab:hover { color: var(--text); }
.ft-tab.on { background: var(--surface-4); color: var(--text); box-shadow: var(--hl), 0 1px 2px rgba(0, 0, 0, 0.35); }
.ft-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
/* live GCS, full-bleed below the header band */
.view.ft-flying { padding-bottom: 0; }
.ft-fly { display: flex; flex-direction: column; gap: 0; }
.ft-fly-note { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; padding: 10px 14px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); background: rgba(69, 201, 139, 0.06); border: 1px solid rgba(69, 201, 139, 0.22); border-radius: var(--radius-sm); }
.ft-fly-note .lock { color: var(--good); flex: none; }
.ft-fly-note .lock .i { width: 16px; height: 16px; }
.ft-fly-frame { width: 100%; height: calc(100vh - 220px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: block; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.35); }

/* Operate — the Drone Safety Remote, native (sections/operate.js). The remote's own
   layout, restyled in the dashboard palette: muted surfaces, desaturated status
   colours, big unambiguous flight buttons. */
.op-banner { text-align: center; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; padding: 11px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid var(--line); }
.op-banner.op-up { background: rgba(95, 191, 138, 0.1); color: var(--good); border-color: rgba(95, 191, 138, 0.4); }
.op-banner.op-bad { background: rgba(229, 107, 98, 0.1); color: var(--bad); border-color: rgba(229, 107, 98, 0.4); }
.op-banner.op-warn { background: rgba(223, 174, 82, 0.1); color: var(--warn); border-color: rgba(223, 174, 82, 0.4); }
.op-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.op-card-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.op-card-head h2 { font: 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.op-card-head .grow { flex: 1; }
.op-settings { padding: 4px 14px 10px; border-bottom: 1px solid var(--line); }
.op-set { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.op-set:last-child { border-bottom: 0; }
.op-sw { width: 46px; height: 28px; border-radius: 14px; background: var(--surface-4); position: relative; transition: 0.15s; cursor: pointer; flex: none; }
.op-sw.on { background: #1f6f43; }
.op-sw b { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.15s; }
.op-sw.on b { left: 21px; }
.op-num { width: 72px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text); padding: 6px; font-size: 15px; text-align: center; }
.op-locked { color: var(--text-3); font-size: 13px; }
.op-tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 14px; }
.op-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.op-tile .op-k { font: 10px/1 var(--mono); letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }
.op-v { font: 700 26px/1.2 var(--mono); margin-top: 4px; }
.op-u { font-size: 12px; color: var(--text-3); }
.op-ok { color: var(--good); }
.op-meta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: var(--text-3); padding: 0 14px 10px; }
.op-meta b { color: var(--text); }
.op-fence { padding: 0 14px 14px; }
.op-fbar { height: 9px; background: var(--surface-4); border-radius: 5px; overflow: hidden; }
.op-ffill { height: 100%; width: 0; background: var(--good); transition: 0.3s; }
.op-ftxt { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 5px; }
.op-actions { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.op-btn { width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 17px; font-family: inherit; font-size: 18px; font-weight: 700; color: var(--text); background: var(--surface-3); cursor: pointer; }
.op-btn:active { transform: translateY(1px); }
.op-pre { font-size: 14.5px; padding: 12px; color: var(--text-2); }
.op-takeoff { background: #1f6f43; border-color: #2a8a54; font-size: 21px; padding: 20px; color: #fff; }
.op-home { background: #a83c34; border-color: #c04a41; font-size: 23px; padding: 24px; color: #fff; }
.op-land { background: #99701d; border-color: #b58524; color: #fff; }
.op-hold { background: var(--surface-4); }
.op-mic { background: #3d6a7a; border-color: #4f8596; color: #fff; font-size: 16px; padding: 15px; }
.op-mic.on { background: #5b4a8a; border-color: #7763ad; }
.op-ptt { font-size: 15.5px; padding: 15px; }
.op-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .op-duo { grid-template-columns: 1fr; } .op-tiles { grid-template-columns: 1fr; } }
.op-confirm { background: var(--surface-2); border: 2px solid var(--accent-dim); border-radius: var(--radius); padding: 12px; font-size: 14.5px; }
.op-cbtns { display: flex; gap: 8px; margin-top: 10px; }
.op-cbtn { flex: 1; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; color: var(--text); background: var(--surface-4); }
.op-cbtn.op-yes { background: #1f6f43; border-color: #2a8a54; color: #fff; }
.op-ord { display: flex; gap: 8px; }
.op-ord-input { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text); padding: 12px; font-size: 16px; font-family: inherit; }
.op-send { border: 0; border-radius: var(--radius-sm); padding: 12px 18px; background: var(--accent); color: #0b1418; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.op-hint { font-size: 12px; color: var(--text-4); line-height: 1.5; }
.op-resume { background: #1f6f43; border-color: #2a8a54; color: #fff; font-size: 14.5px; padding: 12px; margin-bottom: 10px; }
.op-disarm { background: transparent; border: 2px solid var(--bad); color: var(--bad); font-size: 14.5px; padding: 13px; margin-bottom: 10px; }
.op-status { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; font: 13px/1.5 var(--mono); color: var(--text-2); min-height: 20px; margin-bottom: 24px; }

/* Learning */
.learn-assist .chat-log { height: auto; max-width: none; overflow: visible; gap: 18px; padding: 4px 0 6px; }
.learn-assist .msg { max-width: 820px; margin: 0; }
.learn-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.learn-prop { padding: 16px 18px; }
.learn-prop.decided { opacity: 0.7; }
.data-list .list-item { border-radius: 0; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.data-list .list-item:first-child { border-top: 1px solid var(--line); }

/* Code: sticky repository column + full-length file */
.codeview .code-split { flex: 1 1 auto; align-items: stretch; }
.code-split { gap: 0 32px; }
.code-nav { max-height: 100vh; overflow-y: auto; padding-top: 26px; padding-right: 4px; scrollbar-width: thin; }
.code-nav .sec-head { margin-bottom: 14px; }
.code-nav .t-group { font-weight: 600; color: var(--text-2); }
.code-nav .t-item.open { color: var(--text); }
.code-main { min-width: 0; display: flex; flex-direction: column; }
.code-browse { min-width: 0; }
/* Code assistant — its own thread; reuses the shared chat styles at full width */
.code-chat { display: flex; flex-direction: column; min-width: 0; padding-top: 22px; }
.code-empty { padding-top: 2px; }
.code-chat.has-convo .code-empty { display: none; }
.code-chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.code-chat-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.code-chat .chat-log { height: auto; max-width: none; display: flex; flex-direction: column; gap: 22px; padding: 4px 0 8px; }
.code-chat .msg { max-width: 860px; margin: 0; }
.code-recent .conv-pop { right: 0; left: auto; transform-origin: top right; }
.code-recent .conv-sum { height: 30px; font-size: 12.5px; }
.tree { max-height: none; overflow: visible; }
.code-main { min-width: 0; position: relative; }
.code-main .filebox { margin-top: 26px; max-height: none; overflow: visible; border-radius: var(--radius); background: var(--bg-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.35); }
/* the file viewer is an overlay that slides over the conversation */
.code-main .code-fileview { position: absolute; inset: 22px 0 0; z-index: 8; margin: 0; max-height: none; overflow: auto; border: 1px solid var(--line-2); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); animation: ui-fade 0.18s var(--ease); }
.filebox .fb-head { z-index: 5; height: 44px; padding: 0 12px 0 16px; border-radius: var(--radius) var(--radius) 0 0; background: rgba(17, 19, 22, 0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--text-2); }
.fb-meta { font: 11px var(--mono); color: var(--text-4); white-space: nowrap; }
.filebox pre { counter-reset: ln; padding: 12px 0; white-space: pre-wrap; word-break: break-word; }
.filebox pre .cl { display: block; position: relative; padding: 0 16px 0 64px; min-height: 1.6em; }
.filebox pre .cl::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 44px; text-align: right; color: var(--text-4); user-select: none; }
.filebox pre .cl:hover { background: rgba(255, 255, 255, 0.02); }
.filebox pre .cl.hit { background: rgba(127, 178, 195, 0.12); box-shadow: inset 2px 0 0 var(--accent); }

/* Projects */
.goal-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 18px; }
.gs-k { font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); }
.gs-v { font: 600 13px var(--mono); color: var(--text); }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.goal-grid .goal-card { margin: 0; padding: 18px 20px; }

/* Settings: aligned setting rows */
.set-list { display: flex; flex-direction: column; }
.set-row { display: grid; grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.set-row:first-child { padding-top: 4px; }
.set-row:last-child { border-bottom: 0; }
.set-id { min-width: 0; }
.set-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.set-hint { margin-top: 4px; font-size: 12.5px; line-height: 1.55; color: var(--text-3); }
.set-ctl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.set-ctl > input:not([type=checkbox]) { flex: 1; min-width: 0; }
.set-ctl > select { width: 128px; flex: none; }
.set-static { font-size: 12.5px; color: var(--text-3); }
.set-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); flex: none; }
@media (max-width: 980px) { .set-row { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* Users */
.users-list { gap: 10px; }
.user-row { background: var(--surface); box-shadow: none; padding: 14px 18px; }

/* Fleet tiles */
.fleet-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.platform { display: flex; flex-direction: column; text-align: left; font: inherit; color: inherit; padding: 18px 20px 16px; background: var(--surface); box-shadow: none; }
.platform:hover { background: var(--surface-2); }
.p-top { display: flex; align-items: center; justify-content: space-between; }
.platform .pico { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); }
.platform .pico .i { width: 20px; height: 20px; }
.pcode { font: 600 10.5px/1 var(--mono); letter-spacing: 0.12em; color: var(--text-3); padding: 5px 7px; border: 1px solid var(--line-2); border-radius: 6px; }
.platform .pnm { margin-top: 14px; font-size: 15px; }
.plist { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.plist li { font: 11.5px/1.5 var(--mono); color: var(--text-3); }
.plist li::before { content: '›'; margin-right: 8px; color: var(--text-4); }
.pfoot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.popen { font-size: 12px; color: var(--text-3); transition: color 0.15s, transform 0.15s var(--ease); }
.platform:hover .popen { color: var(--text); transform: translateX(2px); }
.pv-name .pico { display: inline-flex; width: 20px; height: 20px; }
.pv-name .pico .i { width: 18px; height: 18px; }

/* Simulations › AI testing: the agent input gets Halo's glass */
.simchat-input {
  margin: 0 auto 20px; width: calc(100% - 40px); max-width: 820px; padding: 9px; border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 22, 26, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(130%); backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}
.simchat-input:focus-within { border-color: rgba(255, 255, 255, 0.18); }

/* ---- Home carousels: one row per category, most important first ---- */
/* Home status: one line of numbers between hairlines (label · value · hint) */
.home-status { display: flex; align-items: stretch; margin: 6px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.home-status::-webkit-scrollbar { display: none; }
.hs-item { flex: 1 1 0; min-width: 120px; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; background: none; border: 0; border-left: 1px solid var(--line); color: inherit; font: inherit; text-align: left; }
.hs-item:first-child { border-left: 0; padding-left: 2px; }
button.hs-item { cursor: pointer; transition: background 0.14s var(--ease); }
button.hs-item:hover { background: rgba(255, 255, 255, 0.025); }
.hs-label { font: 500 9.5px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); }
.hs-value { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-item.is-text { flex-grow: 1.6; }
.hs-item.is-text .hs-value { font: 500 12px/1.5 var(--mono); letter-spacing: 0; color: var(--text-2); }
.hs-hint { font: 10.5px/1.3 var(--mono); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car { margin-top: 26px; }
.car:first-child { margin-top: 8px; }
.homeview.is-empty .car { margin-top: 16px; }
.homeview.is-empty .car:first-child { margin-top: 2px; }
/* a touch shorter in the empty state so the category rows fit the viewport together */
.homeview.is-empty .cc { min-height: clamp(220px, 42vh, 340px); }
.homeview.is-empty .cc-stat { min-height: 108px; }
.homeview.is-empty .car-head { margin-bottom: 8px; }
.car-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.car-title { font-size: 13.5px; font-weight: 600; letter-spacing: -0.012em; }
.car-urgent .car-title::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; vertical-align: 1px; background: var(--warn); }
.car-sub { font: 11px var(--mono); color: var(--text-4); }
.car-link { margin-left: auto; padding: 0; border: 0; background: none; color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; transition: color 0.15s; }
.car-link:hover { color: var(--text); }
.car-viewport { position: relative; }
/* Cover Flow: a true 3D ring. Cards stack at the stage centre and JS places each on a circle
   (sin/cos → x + z, plus rotateY), so neighbours curve back and spin BEHIND the front card as
   the wheel turns. Drag / wheel / arrows turn it; it eases to the nearest card on release —
   a soft settle, not a hard magnet. */
.car-stage {
  position: relative; width: 100%; height: clamp(280px, 48vh, 400px); margin: 2px 0 8px;
  perspective: 1350px; perspective-origin: 50% 44%; transform-style: flat;
  overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 11%, #000 89%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 11%, #000 89%, transparent);
}
.car-stage.dragging { cursor: grabbing; }
.car-stage:focus { outline: none; }
.homeview.is-empty .car-stage { height: clamp(270px, 46vh, 390px); }
.car.no-scroll .car-stage { -webkit-mask-image: none; mask-image: none; }
.car-arrow {
  position: absolute; z-index: 2; top: 50%; width: 36px; height: 36px; margin-top: -22px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
  background: rgba(22, 24, 29, 0.7); border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 0; filter: blur(4px); transform: scale(0.9); transition: opacity 0.25s var(--ease), filter 0.25s var(--ease), transform 0.25s var(--ease);
}
.car-arrow .i { width: 16px; height: 16px; stroke-width: 2; }
.car-arrow.prev { left: -8px; }
.car-arrow.next { right: -8px; }
.car-viewport:hover .car-arrow { opacity: 0.9; filter: none; transform: none; }
.car-viewport .car-arrow:hover { opacity: 1; transform: scale(1.06); }
.car.at-start .car-arrow.prev, .car.at-end .car-arrow.next, .car.no-scroll .car-arrow { opacity: 0 !important; pointer-events: none; }
.cc {
  position: absolute; left: 50%; top: 50%; width: clamp(380px, 42vw, 580px); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 12px; min-height: clamp(220px, 42vh, 340px); padding: 26px 30px;
  /* liquid glass: see-through tint + blurred backdrop, a glossy diagonal sheen, lit top edge */
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.035) 36%, rgba(255, 255, 255, 0.012) 62%, rgba(255, 255, 255, 0.05) 100%),
    rgba(16, 20, 24, 0.86);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 0 rgba(255, 255, 255, 0.05), 0 18px 48px rgba(0, 0, 0, 0.42);
  /* the spin: JS places each card on the ring per-frame (translate + rotateY + z + scale) */
  transform: var(--spin, translate(-50%, -50%)); opacity: var(--spin-op, 1);
  transform-style: flat; backface-visibility: hidden; will-change: transform, opacity;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
/* specular highlight in the top-left corner, like light catching glass */
.cc::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    /* HUD corner brackets — a quiet mission-display detail */
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) 10px 10px / 12px 1px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) 10px 10px / 1px 12px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) right 10px top 10px / 12px 1px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) right 10px top 10px / 1px 12px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) left 10px bottom 10px / 12px 1px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) left 10px bottom 10px / 1px 12px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) right 10px bottom 10px / 12px 1px no-repeat,
    linear-gradient(rgba(var(--tac), 0.4), rgba(var(--tac), 0.4)) right 10px bottom 10px / 1px 12px no-repeat,
    radial-gradient(120% 65% at 12% -12%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035) 40%, transparent 62%),
    radial-gradient(80% 70% at 105% -5%, rgba(var(--cc), var(--cc-wash, 0)), transparent 60%);
}
.cc > * { position: relative; }
/* neutral panels; colour is a SIGNAL only. A card that means something (good / needs review /
   failing) gets .has-signal + --cc: a lit top edge, a faint wash and a status label. */
.cc { --cc: 140, 148, 160; }
.cc::after {
  content: ''; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--tac), 0.55), transparent);
}
.cc.has-signal { --cc-wash: 0.12; }
.cc.has-signal::after { background: linear-gradient(90deg, transparent, rgba(var(--cc), 0.95), transparent); }
.cc-chip {
  width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  color: rgb(var(--tac)); background: rgba(var(--tac), 0.08); border: 1px solid rgba(var(--tac), 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.cc-signal {
  display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 99px; white-space: nowrap;
  font: 500 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: rgb(var(--cc)); background: rgba(var(--cc), 0.1); border: 1px solid rgba(var(--cc), 0.35);
}
.cc-signal::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--cc)); }
.cc-chip .i { width: 14px; height: 14px; }
.cc-section .cc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc.has-inner .cc-body { -webkit-line-clamp: 2; }
/* cards on the card: tiles (label · value · hint) and a short list, as small glass panes */
.cc-tiles { display: grid; grid-template-columns: repeat(var(--tiles, 3), minmax(0, 1fr)); gap: 8px; }
.cc-tile {
  min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.cc-tile-k { font: 500 9px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-tile-v { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-tile-h { font: 10.5px/1.3 var(--mono); color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-tile.t-good .cc-tile-v { color: var(--good); }
.cc-tile.t-warn .cc-tile-v { color: var(--warn); }
.cc-tile.t-bad .cc-tile-v { color: var(--bad); }
.cc-rows { display: flex; flex-direction: column; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.cc-row { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 12.5px; color: var(--text-2); }
.cc-row-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(var(--tac), 0.55); }
.cc-row.t-good .cc-row-dot { background: var(--good); }
.cc-row.t-warn .cc-row-dot { background: var(--warn); }
.cc-row.t-bad .cc-row-dot { background: var(--bad); }
.cc-row.t-muted .cc-row-dot { background: var(--text-4); }
.cc-row-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-row-r { font: 10.5px/1.3 var(--mono); color: var(--text-4); white-space: nowrap; }
/* an outside (web) story on the briefing card — its own small glass card that opens the article */
.cc-ext {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.cc-ext:hover { text-decoration: none; background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.18); }
.cc-ext { -webkit-user-drag: none; }
/* News page: the same story cards, full width, in the briefing's blue */
.news-industry { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.news-industry .cc-ext.wide { padding: 14px 16px; gap: 6px; }
.news-industry .cc-ext.wide .cc-ext-t { font-size: 14.5px; }
.news-industry .cc-ext.wide .cc-ext-why { -webkit-line-clamp: 3; }
.news-industry-foot { grid-column: 1 / -1; font: 10.5px var(--mono); color: var(--text-4); padding-top: 2px; }
.cc-ext-k { display: flex; align-items: center; gap: 7px; font: 500 9.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-ext-live { width: 6px; height: 6px; flex: none; border-radius: 50%; background: rgb(var(--tac)); box-shadow: 0 0 0 3px rgba(var(--tac), 0.15); }
.cc-ext-t { font-size: 13.5px; font-weight: 500; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-ext-why { font-size: 12px; line-height: 1.45; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* story actions: Explain-with-Halo + Read-article, side by side under the headline */
.cc-ext-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cc-ext-btn {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.01em; padding: 6px 10px; border-radius: 7px;
  text-decoration: none; color: var(--text-2); background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.cc-ext-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: var(--text); text-decoration: none; }
.cc-ext-btn.primary { color: var(--text); background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); }
.cc-ext-btn.primary:hover { background: rgba(255, 255, 255, 0.2); }
.cc-ext-btn:disabled { opacity: 0.6; cursor: default; }
/* Halo's inline explanation, streamed onto the story card when you hit Explain */
.cc-ext-answer { display: none; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.cc-ext-answer.on { display: block; animation: cc-ext-in 0.18s var(--ease); }
@keyframes cc-ext-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.cc-ext-answer-status { display: flex; align-items: center; gap: 8px; font: 12px/1.4 var(--mono); color: var(--text-3); }
.cc-ext-answer-who { font: 500 9.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 5px; }
.cc-ext-answer-body { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.cc-ext-answer-body > :first-child { margin-top: 0; }
.cc-ext-answer-body > :last-child { margin-bottom: 0; }
.cc-ext-answer-body p { margin: 0 0 7px; }
.cc-ext-answer-body ul, .cc-ext-answer-body ol { margin: 0 0 7px; padding-left: 18px; }
.cc-ext-answer-err { font-size: 12px; line-height: 1.4; color: var(--bad); }
.cc-bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.cc-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.75)); }
.cc.is-center { border-color: rgba(255, 255, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(255, 255, 255, 0.06), 0 26px 64px rgba(0, 0, 0, 0.5); }
.cc.link { cursor: pointer; }
.cc.link:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 36%, rgba(255, 255, 255, 0.02) 62%, rgba(255, 255, 255, 0.06) 100%),
    rgba(20, 25, 30, 0.9);
}
/* the big section cards in the main carousel: a touch larger type, more breathing room */
.cc-section .cc-title, .cc-news .cc-title { font-size: 21px; line-height: 1.28; letter-spacing: -0.02em; }
.cc-section .cc-body, .cc-news .cc-body { font-size: 14.5px; line-height: 1.6; -webkit-line-clamp: 5; }
.cc-section .cc-tag, .cc-news .cc-tag { font-size: 11px; color: rgba(var(--tac), 0.9); }
.cc-section .cc-meta, .cc-news .cc-meta { font-size: 12px; }
.cc-section .cc-go, .cc-news .cc-go { font-size: 13.5px; }
.cc-section .cc-foot, .cc-news .cc-foot { margin-top: auto; padding-top: 12px; }
/* the News briefing card leading the carousel */
@media (max-width: 640px) { .cc { width: 290px; } .car-stage { height: 248px; } .homeview.is-empty .car-stage { height: 236px; } }
/* short windows (a laptop browser with a tab bar): keep the bigger cards clear of Halo's composer */
@media (max-height: 720px) {
  .home-hero { padding-top: 14px; }
  .cc { padding: 22px 26px; gap: 10px; }
  .homeview.is-empty .cc { min-height: clamp(200px, 40vh, 300px); }
  .cc-section .cc-body, .cc-news .cc-body { -webkit-line-clamp: 3; }
  .cc.has-inner .cc-body { display: none; }
  .cc-row:nth-child(n+3) { display: none; }
  .cc-tile { padding: 8px 11px; }
  .cc-tile-v { font-size: 17px; }
  .cc-tile-h { display: none; }
  .cc-section .cc-title, .cc-news .cc-title { font-size: 18px; }
  .cc-section .cc-foot { display: none; } /* the whole card opens its section */
  .cc-news.has-ext .cc-row:nth-child(n+2) { display: none; } /* room for the outside story */
  .cc-ext-why { -webkit-line-clamp: 1; }
}
.cc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cc-tag { font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.cc-top .cl-area { height: 18px; font-size: 10.5px; }
.cc-meta { font: 11px/1.4 var(--mono); color: var(--text-4); }
.cc-top .cc-meta { margin-left: auto; white-space: nowrap; }
.cc-title { font-size: 14px; font-weight: 600; letter-spacing: -0.012em; line-height: 1.35; color: var(--text); }
.cc-body { font-size: 12.5px; line-height: 1.55; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cc-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.cc-foot.mono { font: 11px var(--mono); color: var(--text-4); }
.cc-go { margin-left: auto; font-size: 12px; color: var(--text-3); transition: color 0.15s, transform 0.15s var(--ease); }
.cc.link:hover .cc-go { color: var(--text); transform: translateX(2px); }
.cc-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--text-4); }
.tone-warn .cc-dot { background: var(--warn); }
.tone-bad .cc-dot { background: var(--bad); }
.tone-good .cc-dot { background: var(--good); }
.tone-accent .cc-dot { background: var(--accent); }
.tone-mag .cc-dot { background: var(--mag); }
.car-urgent .cc { border-color: rgba(229, 180, 80, 0.22); }
.cc-stat { flex-basis: 210px; min-height: 124px; }
.cc-value { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 4px; }
.cc-stat.is-text .cc-value { font: 500 13.5px/1.45 var(--mono); letter-spacing: 0; overflow-wrap: anywhere; }
.cc-stat .cc-meta { margin-top: auto; }
.cc-ms .cc-pct { margin-left: auto; font: 600 12px var(--mono); color: var(--text); }
.cc-ms .bar { margin-top: auto; }
.cc-change { flex-basis: 320px; }
.car-quiet { margin-top: 44px; color: var(--text-3); font-size: 12.5px; text-align: center; }

/* ---- News: Halo's daily briefing ---- */
.news-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.news-head h1 { font-size: 26px; letter-spacing: -0.03em; }
.news-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.news-actions .btn .i { width: 14px; height: 14px; }
.news-stamp { font: 11px var(--mono); color: var(--text-4); }
.news-feed { padding-top: 26px; }
.news-writing { display: flex; align-items: center; gap: 12px; padding: 48px 4px; color: var(--text-3); font-size: 13px; }
.news-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: news-pulse 1.3s var(--ease) infinite; }
@keyframes news-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }
.news-card {
  position: relative; display: flex; flex-direction: column; padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.news-card:hover { border-color: var(--line-3); }
.news-card.lead { padding: 28px 30px; background: var(--surface); }
.news-meta { display: flex; align-items: center; gap: 10px; }
.news-imp { display: inline-flex; gap: 3px; margin-left: auto; }
.news-imp i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-3); }
.news-imp i.on { background: var(--text-2); }
.imp-3 .news-imp i.on { background: var(--warn); }
.news-title { margin: 12px 0 6px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.news-card.lead .news-title { margin: 14px 0 8px; font-size: 22px; letter-spacing: -0.025em; line-height: 1.25; }
.news-body { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.news-card.lead .news-body { font-size: 14px; max-width: 82ch; }
.news-go { align-self: flex-start; margin-top: 14px; padding: 0; border: 0; background: none; color: #a9cbd6; font: inherit; font-size: 12.5px; cursor: pointer; transition: color 0.15s, transform 0.15s var(--ease); }
.news-btns { display: flex; gap: 22px; align-items: center; }
.news-btns .news-go { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Lock: camera lock-on visualizer + 3D steering view ---- */
.lock-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 14px; align-items: start; }
/* Vision page: pipeline diagram, step workspace, scoped composer */
.lock-pipe-card { margin-bottom: 14px; }
.lock-pipe { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.lock-arrow { align-self: center; color: var(--muted); font-size: 15px; flex: 0 0 auto; }
.lock-node { flex: 1 1 0; min-width: 118px; text-align: left; background: var(--surface2, var(--surface)); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: pointer; color: var(--text); font: inherit; }
.lock-node:hover { border-color: var(--accent); }
.lock-node.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lock-node.ok { border-color: var(--good); }
.lock-node.ok.sel { box-shadow: 0 0 0 1px var(--good); }
.lock-node.bad { border-color: var(--bad); }
.lock-node.bad.sel { box-shadow: 0 0 0 1px var(--bad); }
.lock-node.muted { opacity: 0.75; }
.lock-node-name { font-weight: 650; font-size: 13.5px; }
.lock-node-role { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.35; }
.lock-node-detail { font-family: var(--mono); font-size: 10.5px; margin-top: 6px; line-height: 1.4; word-break: break-word; }
.lock-node.ok .lock-node-detail { color: var(--good); }
.lock-node.bad .lock-node-detail { color: var(--bad); }
.lock-node.muted .lock-node-detail { color: var(--muted); }
.lock-step-card { margin-bottom: 14px; }
.lock-step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lock-step-title { font-weight: 650; font-size: 15px; }
.lock-step-desc { color: var(--text); opacity: 0.88; font-size: 13px; line-height: 1.55; margin: 8px 0 6px; max-width: 900px; }
.lock-step-last { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lock-composer-card { position: sticky; bottom: 10px; margin-top: 14px; z-index: 5; }
.lock-thread { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin-bottom: 10px; }
.lock-thread:empty { margin-bottom: 0; }
.lock-msg { max-width: 85%; padding: 8px 11px; border-radius: 10px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.lock-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent, #0a0b0d); }
.lock-msg.halo { align-self: flex-start; background: var(--surface2, var(--surface)); border: 1px solid var(--line); }
.lock-composer { display: flex; gap: 8px; align-items: flex-end; }
.lock-composer-input { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 9px 11px; font: inherit; font-size: 13.5px; resize: vertical; min-height: 40px; }
.lock-composer-input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 900px) { .lock-grid { grid-template-columns: 1fr; } }
.lock-card { padding: 16px 18px; }
.lock-stage { position: relative; background: #000; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.lock-video { width: 100%; height: 100%; display: block; object-fit: cover; }
.lock-overlay { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.lock-cammsg { position: absolute; left: 12px; bottom: 10px; right: 12px; color: var(--text-2); font-size: 12.5px; pointer-events: none; }
.lock-controls { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.lock-mic.on { color: var(--bad); border-color: rgba(229, 107, 98, 0.55); }
.lock-controls .input-full { flex: 1; }
.lock-status { margin-top: 10px; font-size: 13px; color: var(--text-2); line-height: 1.5; min-height: 20px; }
.lock-3d { width: 100%; height: auto; display: block; background: radial-gradient(120% 90% at 50% 0%, #101318 0%, #0a0b0d 70%); border: 1px solid var(--line); border-radius: 10px; }
.lock-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
@media (max-width: 560px) { .lock-tiles { grid-template-columns: repeat(2, 1fr); } }
.lock-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.lock-tile-k { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.lock-tile-v { font-family: var(--mono); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-note { margin-top: 10px; font-size: 12px; color: var(--text-2); line-height: 1.55; }
/* ---- Fusion frame: gestures + vision converging (top of the Vision tab) ---- */
.fusion-card { margin-bottom: 14px; }
.fusion-intro { color: var(--text); opacity: 0.88; font-size: 13px; line-height: 1.55; margin: 8px 0 0; max-width: 900px; }
.fusion-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 900px) { .fusion-branches { grid-template-columns: 1fr; } }
.fusion-branch { background: var(--surface2, var(--surface)); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.fusion-item { font-size: 12.5px; line-height: 1.55; color: var(--text); opacity: 0.9; margin: 8px 0 0; }
.fusion-flow { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-top: 12px; }
.fusion-step { flex: 1 1 0; min-width: 132px; background: var(--surface2, var(--surface)); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.fusion-notes { margin-top: 10px; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.fusion-notes p { margin: 0 0 6px; }
.fusion-notes p:last-child { margin-bottom: 0; }
.news-go:hover { color: #fff; transform: translateX(2px); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.prof-list { display: flex; flex-direction: column; margin-bottom: 14px; }
.prof-item { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.prof-src { font: 500 9.5px/2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.prof-text { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.prof-empty { padding: 4px 0 12px; color: var(--text-4); font-size: 12.5px; line-height: 1.55; }
.prof-add { display: flex; gap: 8px; }
.prof-signals { display: grid; gap: 7px; margin-top: 18px; font: 11.5px var(--mono); }
.prof-signals .k { display: inline-block; width: 82px; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.prof-signals .v { color: var(--text-2); }

/* ---- phones only ----
   The sidebar stays docked (and never closes on its own) down to phone width. Only below
   640px does it become a slide-over menu, opened with the Menu button. */
.menu-btn { display: none; }
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 84%; max-width: 300px; height: 100vh; transform: translateX(-100%); transition: transform 0.22s var(--ease); }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 48px rgba(0, 0, 0, 0.6); }
  .app.sidebar-collapsed .sidebar { width: 84%; opacity: 1; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(2px); z-index: 40; }
  .app.nav-open .scrim { display: block; }
  .menu-btn { display: inline-flex; position: sticky; top: 0; z-index: 30; margin: 10px; }
  .sidebar > * { width: auto; }
  .view { padding: 8px 16px 72px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .code-wrap { grid-template-columns: 1fr; }
}

/* opening a collapsible panel slides its body in */
.panel[open] > .panel-body { animation: ui-rise 0.24s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
}

/* ---- Outreach section ---- */
.outreach-gmail { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted, #9aa0a8); font-size: 13px; }
.outreach-gmail-btns { display: inline-flex; gap: 8px; }
.outreach-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 4px 0 18px; }
.outreach-filters { display: flex; gap: 10px; margin-bottom: 10px; }
.outreach-search { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 9px 12px; font-size: 13.5px; }
.outreach-search:focus { outline: none; border-color: var(--accent); }
.outreach-statussel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 9px 10px; font-size: 13.5px; }
.outreach-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.outreach-chip { background: var(--surface); border: 1px solid var(--line); color: var(--muted, #9aa0a8); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; }
.outreach-chip:hover { color: var(--text); border-color: var(--line-3); }
.outreach-chip.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.outreach-count { color: var(--muted, #9aa0a8); font-size: 12px; margin-bottom: 8px; }
.outreach-list { display: flex; flex-direction: column; gap: 6px; }
.outreach-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: pointer; color: var(--text); }
.outreach-row:hover { border-color: var(--line-3); }
.outreach-row.sel { border-color: var(--accent); }
.outreach-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.outreach-row-name { font-weight: 600; font-size: 14px; }
.outreach-row-sub { color: var(--muted, #9aa0a8); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outreach-row-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.outreach-row-email { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.outreach-row-email.muted { color: var(--muted, #9aa0a8); font-family: inherit; }
.outreach-row-dates { color: var(--muted, #9aa0a8); font-size: 12px; }
.outreach-detail { display: flex; flex-direction: column; gap: 12px; }
.outreach-detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.outreach-detail-line { display: flex; gap: 10px; font-size: 13px; align-items: baseline; }
.outreach-detail-line a { color: var(--accent); word-break: break-all; }
.outreach-detail .k, .outreach-detail-block .k { color: var(--muted, #9aa0a8); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; min-width: 92px; }
.outreach-detail-line .v.muted { color: var(--muted, #9aa0a8); }
.outreach-detail-block p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; }
.outreach-draft-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.outreach-draft { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; margin: 6px 0 0; }
.outreach-statusbtns { display: flex; gap: 8px; flex-wrap: wrap; }

/* account sign-ins */
.signin-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.signin-form .btn { align-self: flex-start; }
.signin-note { font-size: 12.5px; line-height: 1.55; color: var(--text-3); }
.signin-ok { padding: 10px 0 2px; font-size: 12.5px; font-weight: 600; color: var(--good); }

/* ---- send via Carlo ---- */
.or-sendctl { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.or-send-q { font-size: 12.5px; color: var(--text); }
.or-send-badge { display: inline-flex; align-items: center; padding: 5px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--muted, #9aa0a8); }
.or-send-badge.ok { color: var(--good); border-color: var(--good); }


/* ---- Fly: Operate + Ground control in one tab (sections/fly.js) ---- */
.flyview > .fly-host > :not(.view-head) { max-width: 1320px; }
.fly-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fly-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); }
.fly-tab { height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--text-3); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 0.12s, color 0.12s; }
.fly-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.fly-tab.on { color: var(--bg); background: #e6e8ec; font-weight: 600; }
.fly-head-bar { padding-top: 18px; }


/* ---- Anti-Hack: the security posture + proofs (sections/antihack.js) ---- */
.ah-layers { align-items: start; }
.ah-layer { display: flex; flex-direction: column; gap: 12px; }
.ah-layer-head { display: flex; align-items: flex-start; gap: 12px; }
.ah-num {
  flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  font: 600 13px/1 var(--mono); color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(var(--tac), 0.3);
}
.ah-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.ah-tag { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ah-k { font: 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); }
.ah-stops { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--text-2); }
.ah-how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.ah-how li { position: relative; padding-left: 16px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.ah-how li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-dim); }
.ah-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ah-file { font: 11px var(--mono); color: var(--text-3); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 2px 7px; }
.ah-proven { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.ah-suite-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.ah-note .ah-how li { font-size: 13px; }
.ah-proofs { display: flex; flex-direction: column; }
.ah-proof { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.ah-proof:last-child { border-bottom: 0; }
.ah-proof-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ah-proof-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.ah-proof-blurb { line-height: 1.45; }
.ah-proof-right { display: flex; align-items: center; gap: 12px; flex: none; }
.ah-when { min-width: 56px; text-align: right; }
.ah-status { display: inline-flex; align-items: center; min-width: 84px; justify-content: flex-end; }
@media (max-width: 760px) {
  .ah-proof { flex-direction: column; align-items: stretch; gap: 10px; }
  .ah-proof-right { justify-content: space-between; }
  .ah-when { text-align: left; }
}

/* Anti-Hack attack range */
.ah-metrics { padding: 4px 0 6px; }
.ah-gauge { display: flex; align-items: baseline; gap: 12px; }
.ah-gauge-num { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ah-gauge-cap { font-size: 13px; color: var(--text-2); }
.ah-breach { color: #f59393; font-weight: 500; }
.ah-allheld { color: #6fdaa6; font-weight: 500; }
.ah-gaugebar { margin-top: 10px; max-width: 520px; }
.ah-gaugebar > i.warn { background: var(--warn); }
.ah-targets { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.ah-tgt { font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.ah-tgt b { color: var(--text); font-weight: 600; }
.ah-attacks { margin-top: 14px; }
.ah-cat { display: flex; align-items: center; gap: 10px; padding: 14px 2px 7px; border-bottom: 1px solid var(--line); }
.ah-cat:first-child { padding-top: 4px; }
.ah-cat-name { font: 11px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.ah-atk { display: flex; align-items: flex-start; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.ah-atk.breached { background: rgba(239, 107, 107, 0.05); }
.ah-atk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ah-atk-title { font-size: 13px; font-weight: 500; }
.ah-atk-tries { font-style: italic; }
.ah-atk-ev { font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.ah-tgt-badge { flex: none; font: 10px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 7px; border-radius: var(--radius-xs); border: 1px solid var(--line-2); color: var(--text-3); margin-top: 1px; }
.ah-tgt-badge.fleet { color: #a9cbd6; border-color: rgba(127, 178, 195, 0.3); background: var(--accent-soft); }
.ah-tgt-badge.dashboard { color: #cfaeff; border-color: rgba(185, 140, 255, 0.3); background: rgba(185, 140, 255, 0.08); }

/* Anti-Hack AI vulnerability analysis */
.ah-an-summary { font-size: 13.5px; line-height: 1.6; color: var(--text); max-width: 80ch; margin: 2px 0 14px; }
.ah-finds { display: flex; flex-direction: column; gap: 10px; }
.ah-find { display: flex; flex-direction: column; gap: 8px; }
.ah-find-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ah-find-title { font-size: 13.5px; font-weight: 600; }
.ah-find-why { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.ah-find-fix { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; color: var(--text-2); padding-top: 8px; border-top: 1px solid var(--line); }
.ah-find-fix .ah-k { flex: none; }
