/* ============================================================================
   Aether 3 — unified dashboard
   Design language: editorial cartography. Light, quiet, elegant.
   Shared palette with Atlas. Everything clickable; selection is visible.
   ========================================================================== */

:root {
  /* Text / surfaces */
  --text:      #111827;
  --text-2:    #374151;
  --muted:     #6B7280;
  --subtle:    #9CA3AF;
  --line:      #E7E5E4;      /* warm paper grey, matches Atlas */
  --line-2:    #F5F5F4;
  --bg:        #FFFFFF;
  --bg-alt:    #FAFAF9;       /* slight cream */
  --bg-panel:  #F8FAFC;
  --paper:     #F8F5EE;       /* Atlas ocean colour */

  /* Brand + accent (Atlas heat ramp uses this) */
  --accent:    #1D4ED8;
  --accent-2:  #1E40AF;
  --accent-soft: #EFF6FF;
  --ok:        #15803D;
  --warn:      #B45309;
  --err:       #B91C1C;

  /* Heat ramp — same six RGB stops as the Atlas rev 3 */
  --heat-0: rgb(196,221,240);
  --heat-1: rgb(215,230,238);
  --heat-2: rgb(245,240,220);
  --heat-3: rgb(246,195,132);
  --heat-4: rgb(237,140, 78);
  --heat-5: rgb(215, 72, 60);

  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", "Source Serif Pro", ui-serif, Georgia, serif;

  /* Sizes */
  --topbar-h: 58px;
  --panel-w:  380px;
  --panel-w-min: 300px;
  --panel-w-max: 640px;
  --wb-w:     400px;
  --wb-w-min: 320px;
  --wb-w-max: 560px;
  --radius:   10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100vh; height: 100dvh;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg-alt);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button {
  font-family: inherit;
  color: inherit;
}

/* ============================================================================
   Shell
   ========================================================================== */

.shell {
  display: grid;
  /* Three columns when the workbench is open, two when collapsed.
     The workbench width animates to 0 via the .wb-collapsed class. */
  grid-template-columns: 1fr var(--wb-w-current, 0px) var(--panel-w);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  height: 100vh; height: 100dvh;
  transition: grid-template-columns 240ms var(--ease);
  min-height: 100vh;
  max-height: 100vh; max-height: 100dvh;
  overflow: hidden;
}

/* When the workbench is open, set --wb-w-current to the live width. */
.shell.wb-open { --wb-w-current: var(--wb-w); }

/* Top bar — pinned. Double-locked with sticky so it can never scroll off. */
.topbar {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  background: white;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(17,24,39,0.02);
  z-index: 100;
  flex-shrink: 0;
}
.topbar .brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--serif);
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
}
.topbar .brand .mark {
  width: 22px; height: 22px; border-radius: 5px;
  background: conic-gradient(from 210deg, var(--heat-5), var(--heat-3), var(--heat-1), var(--heat-5));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* ============================================================================
   Capacity gauge — the HUD bar living in the top-left brand row.
   Energy-bar semantics (remaining cognitive capacity), Tesla-dashboard look.
   ========================================================================== */
.capacity {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF9 100%);
  font-family: var(--sans);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
  user-select: none;
  outline: none;
}
.capacity:hover,
.capacity:focus-visible {
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(17,24,39,0.06);
}
.capacity .cap-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--subtle); font-weight: 600;
}
.capacity .cap-bar {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 5px;
  background: #F1F1EE;
  box-shadow: inset 0 0 0 1px rgba(17,24,39,0.05);
}
.capacity .cap-seg {
  width: 8px; height: 12px;
  border-radius: 1.5px;
  background: #E5E3DE;
  transition: background 280ms var(--ease), box-shadow 220ms var(--ease),
              transform 220ms var(--ease);
}
/* Segment colours depend on POSITION — the bar is a scale from danger
   (left) to safety (right). Fill shows how far up the scale you've
   climbed. At 100% you see the whole red → orange → green ramp. At
   15% you only see red: the visual itself says "you haven't escaped
   the danger zone." Hard tricolor boundaries (no gradient) match the
   quantised energy-bar aesthetic.
     · segments 1-4   (0-29%)   RED    — the say-no / overload zone
     · segments 5-10  (29-71%)  ORANGE — stretched, sustainable-ish
     · segments 11-14 (71-100%) GREEN  — actual headroom
*/
.capacity .cap-seg.on                  { background: #10B981; color: #10B981; } /* default (green) */
.capacity .cap-seg.on:nth-child(-n+10) { background: #F59E0B; color: #F59E0B; } /* override 1-10 → orange */
.capacity .cap-seg.on:nth-child(-n+4)  { background: #DC2626; color: #DC2626; } /* override 1-4  → red */
/* Edge segment (the last filled one) gets a soft glow — reads as "here's
   where capacity ends right now". */
.capacity .cap-seg.on.edge {
  box-shadow: 0 0 6px currentColor;
}
/* When stretched+ the edge segment breathes — subtle, once per 1.4s */
@keyframes cap-edge-breath {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%      { transform: scaleY(1.15); opacity: 0.75; }
}
.capacity[data-band="stretched"] .cap-seg.on.edge,
.capacity[data-band="overload"]  .cap-seg.on.edge {
  animation: cap-edge-breath 1.4s ease-in-out infinite;
}
.capacity[data-band="overload"]  .cap-seg.on.edge { animation-duration: 0.9s; }

.capacity .cap-num {
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 34px; text-align: right;
  color: var(--text);
  letter-spacing: -0.01em;
}
.capacity[data-band="stretched"] .cap-num { color: #B45309; }
.capacity[data-band="overload"]  .cap-num { color: #B91C1C; }
.capacity .cap-glyph {
  font-size: 12px; line-height: 1;
  display: inline-block; min-width: 0;
}
.capacity .cap-glyph.warn { color: #F59E0B; }
.capacity .cap-glyph.crit { color: #DC2626; }

@media (prefers-reduced-motion: reduce) {
  .capacity .cap-seg.on.edge { animation: none; }
}

/* Popover — appears on hover / focus / click, anchored below the gauge.
   Flex-column so head + foot stay visible and the body scrolls if the
   drainer list overflows the viewport height. */
.cap-pop {
  position: fixed;
  width: 360px;
  max-width: 92vw;
  /* Cap at viewport minus a margin — avoids bottom cut-off. The JS
     positioning also updates this dynamically to account for the
     space below the gauge. */
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(17,24,39,0.15), 0 2px 6px rgba(17,24,39,0.06);
  z-index: 1000;
  opacity: 0; transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  font-family: var(--sans);
}
.cap-pop.open {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.cap-pop-head {
  display: grid; grid-template-columns: auto 1fr;
  gap: 12px; align-items: center;
  padding: 14px 16px 12px 16px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.cap-pop-big {
  font-family: var(--serif);
  font-size: 34px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cap-pop-big span {
  font-size: 18px; font-weight: 500;
  margin-left: 2px; color: var(--muted);
}
.cap-pop-head[data-band="stretched"] .cap-pop-big { color: #B45309; }
.cap-pop-head[data-band="overload"]  .cap-pop-big { color: #B91C1C; }
.cap-pop-meta .cap-pop-band {
  font-size: 13px; font-weight: 600; color: var(--text);
  letter-spacing: -0.005em;
}
.cap-pop-meta .cap-pop-sub {
  font-size: 11.5px; color: var(--muted); margin-top: 2px;
}
.cap-pop-body {
  padding: 8px 16px 10px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.cap-row { padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.cap-row:last-child { border-bottom: none; }
.cap-row-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.cap-row-label { font-size: 13px; font-weight: 600; color: var(--text); }
.cap-row-val {
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--subtle); font-weight: 600;
}
.cap-row-detail { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cap-items { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.cap-item {
  text-align: left;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  border-radius: 6px;
  font-size: 11.5px; color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms, border-color 120ms;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cap-item:hover { background: white; border-color: #CBD5E1; color: var(--text); }
.cap-pop-foot {
  padding: 8px 16px 10px 16px;
  border-top: 1px solid var(--line-2);
  font-size: 10.5px;
  color: var(--subtle);
  flex-shrink: 0;
}
.cap-empty { font-size: 12px; color: var(--muted); padding: 8px 0; }

.topbar .tabs {
  display: flex; gap: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
}
.topbar .tab {
  padding: 6px 18px;
  border: none; background: transparent;
  font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  border-radius: 6px;
  transition: background 140ms var(--ease), color 140ms var(--ease);
  letter-spacing: 0.01em;
}
.topbar .tab:hover { color: var(--text); background: white; }
.topbar .tab.active {
  background: white; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(17,24,39,0.08);
}

.topbar .icons {
  justify-self: end;
  display: flex; gap: 4px; align-items: center;
}
.topbar .iconbtn {
  width: 34px; height: 34px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--muted);
  transition: background 120ms, color 120ms, border-color 120ms;
}
.topbar .iconbtn:hover {
  background: var(--bg-alt); color: var(--text); border-color: var(--line);
}
.topbar .iconbtn.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: #BFDBFE;
}
.topbar .iconbtn svg { width: 18px; height: 18px; }

/* Main surface -------------------------------------------------------------- */
.surface {
  position: relative;
  min-width: 0; min-height: 0;
  overflow: hidden;
  background: var(--paper);
}
.surface-inner { position: absolute; inset: 0; overflow: hidden; }

/* Surface header (sub-bar over each surface) */
.subbar {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 14px 22px 12px 22px;
  display: flex; align-items: baseline; gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 70%, rgba(255,255,255,0));
  z-index: 10;
  pointer-events: none;
}
.subbar > * { pointer-events: auto; }
.subbar h1 {
  font-family: var(--serif);
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0;
}
.subbar .sub { color: var(--muted); font-size: 13px; }
.subbar .spacer { flex: 1; }

.toolchip {
  display: flex; gap: 2px; align-items: center;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  backdrop-filter: blur(10px);
}
.toolchip .tc-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 0 6px 0 8px;
}
.toolchip .tc-label + button { margin-left: 2px; }
.toolchip button {
  border: none; background: transparent;
  padding: 5px 10px; font-size: 12px;
  color: var(--muted); cursor: pointer;
  border-radius: 6px;
  transition: background 120ms, color 120ms;
}
.toolchip button:hover:not(.active) { background: var(--bg-alt); color: var(--text); }
.toolchip button.active {
  background: var(--accent); color: white; font-weight: 600;
}
.toolchip .sep { width: 1px; background: var(--line); margin: 2px 3px; }

/* Workbench (middle column) ------------------------------------------------ */
.workbench {
  position: relative;
  background: white;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0; min-height: 0;
  overflow: hidden;
  box-shadow: inset 1px 0 0 rgba(17,24,39,0.02);
}
.workbench[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
.shell.wb-open .workbench[aria-hidden="true"] { /* still hidden during animation */ }
.shell.wb-open .workbench { visibility: visible; pointer-events: auto; }
.workbench .wb-resizer {
  position: absolute; left: -3px; top: 0; bottom: 0;
  width: 6px; cursor: col-resize; z-index: 5; background: transparent;
}
.workbench .wb-resizer:hover,
.workbench .wb-resizer.active {
  background: linear-gradient(to right, transparent, rgba(29,78,216,0.12), transparent);
}
.workbench .wb-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline;
  gap: 10px; padding: 14px 18px 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, white, rgba(248,245,238,0.4));
}
.workbench .wb-title {
  font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
}
.workbench .wb-sub { font-size: 11.5px; }
.workbench .closex {
  border: none; background: transparent; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--muted);
  width: 26px; height: 26px; border-radius: 6px;
}
.workbench .closex:hover { background: var(--bg-alt); color: var(--text); }
.workbench .wb-body { overflow-y: auto; min-height: 0; }

/* ── LIST mode ─────────────────────────────────────────────────────────────── */
.wb-list { padding: 8px 0 12px 0; }
.wb-sec { padding: 12px 18px 6px 18px; }
.wb-sec + .wb-sec { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
.wb-sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase;
}
.wb-sec-head .wb-count {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0;
  background: var(--bg-alt); color: var(--muted);
  padding: 1px 7px; border-radius: 9px;
}
.wb-row {
  padding: 9px 10px; margin-bottom: 4px; border-radius: 7px;
  cursor: pointer; border-left: 2px solid transparent;
  transition: background 120ms, border-color 120ms;
}
.wb-row:hover { background: var(--bg-alt); border-left-color: var(--line); }
.wb-row.draft   { border-left-color: rgba(22,101,52,0.55); }
.wb-row.suggest { border-left-color: rgba(217,119,6,0.55); }
.wb-row.urgent  { border-left-color: rgba(220,38,38,0.7);  background: rgba(254,226,226,0.25); }
.wb-row-title { font-size: 13px; color: var(--text); font-weight: 500; line-height: 1.35; }
.wb-row-meta  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wb-empty {
  padding: 4px 10px 6px 10px; font-size: 12px; color: var(--muted); font-style: italic;
}

/* ── OPEN mode — single commitment focus ───────────────────────────────────── */
.wb-open { padding: 16px 20px 22px 20px; }
.wb-back { margin-bottom: 8px; }
.wb-back-btn {
  border: none; background: transparent; color: var(--muted);
  font-size: 11.5px; cursor: pointer; padding: 2px 0;
}
.wb-back-btn:hover { color: var(--text); }
.wb-proj {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--text); letter-spacing: -0.01em; line-height: 1.15;
}
.wb-proj-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; margin-bottom: 16px; }
.wb-ask {
  font-size: 14px; color: var(--text); line-height: 1.5;
  padding: 10px 0 16px 0; border-bottom: 1px solid var(--line);
}

/* Strategy strip */
.wb-strip {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 14px 0 6px 0;
}
.wb-pill {
  border: 1px solid var(--line); background: white; color: var(--text);
  padding: 5px 11px; border-radius: 14px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.wb-pill:hover:not(.active) { background: var(--bg-alt); }
.wb-pill.active {
  background: var(--accent); color: white; border-color: var(--accent);
  font-weight: 600;
}
.wb-pill-add {
  border: 1px dashed var(--line); background: white; color: var(--muted);
  width: 28px; height: 28px; border-radius: 14px;
  font-size: 16px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.wb-pill-add:hover { color: var(--accent); border-color: var(--accent); }
.wb-compose {
  display: inline-flex; align-items: stretch; gap: 4px;
  border: 1px solid var(--accent); border-radius: 14px;
  padding: 2px 4px 2px 10px; background: white;
}
.wb-compose input {
  border: none; outline: none; background: transparent;
  font-size: 12px; min-width: 220px;
}
.wb-compose-ok {
  border: none; background: var(--accent); color: white;
  font-size: 11px; font-weight: 600; padding: 0 9px; border-radius: 11px;
  cursor: pointer;
}
.wb-compose-x {
  border: none; background: transparent; color: var(--muted);
  font-size: 14px; cursor: pointer; padding: 0 4px;
}

/* Strategy logic */
.wb-logic {
  margin-top: 8px; margin-bottom: 16px;
  background: rgba(241,245,249,0.55);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px;
}
.wb-logic-head {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700; margin-bottom: 4px;
}
.wb-logic-body { font-size: 12.5px; color: var(--text); line-height: 1.5; }

/* Draft */
.wb-draft {
  margin-top: 6px;
  border: 1px solid var(--line); border-radius: 8px;
  background: white;
}
.wb-draft-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 12px 4px 12px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700;
}
.wb-draft-hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11px; }
.wb-draft-body {
  display: block; width: 100%; box-sizing: border-box;
  border: none; outline: none; background: transparent;
  resize: vertical; min-height: 130px;
  padding: 6px 12px 12px 12px;
  font-family: inherit; font-size: 13px; color: var(--text); line-height: 1.55;
}
.wb-draft-body.flash { background: #FFF8E1; transition: background 600ms; }
.wb-draft-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 8px 12px 12px 12px; border-top: 1px solid var(--line);
}
.wb-draft-actions .btn {
  border: 1px solid var(--line); background: white; color: var(--text);
  font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.wb-draft-actions .btn:hover { background: var(--bg-alt); }
.wb-draft-actions .btn.primary {
  background: var(--accent); color: white; border-color: var(--accent);
  font-weight: 600;
}
.wb-draft-actions .btn.primary:hover { filter: brightness(0.95); }
.wb-draft-actions .btn.ghost { color: var(--muted); }

/* Toast */
.wb-toast {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: rgba(17,24,39,0.92); color: white;
  padding: 7px 14px; border-radius: 16px;
  font-size: 12px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  z-index: 20;
}
.wb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Workbench-toggle badge */
.topbar .iconbtn { position: relative; }
.topbar .iconbtn .badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--err); color: white;
  font-size: 10px; font-weight: 700; line-height: 16px;
  border-radius: 8px;
  border: 2px solid white;
  text-align: center;
}

/* Right panel -------------------------------------------------------------- */
.panel {
  position: relative;
  background: white;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: 1fr;     /* bot occupies the whole panel now */
  min-height: 0;
  overflow: hidden;
}
.panel .resizer {
  position: absolute; left: -3px; top: 0; bottom: 0;
  width: 6px; cursor: col-resize;
  z-index: 5;
}
.panel .resizer:hover,
.panel .resizer.active {
  background: linear-gradient(to right, transparent, rgba(29,78,216,0.12), transparent);

}

/* Panel top (contextual, changes per surface) */
.panel-top {
  padding: 18px 20px 14px 20px;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  min-height: 0;
}
.panel-top .kicker {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 4px;
}
.panel-top h2 {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em; margin: 0 0 10px 0;
}
.panel-top p { font-size: 13.5px; color: var(--text-2); margin: 0 0 10px 0; line-height: 1.55; }
.panel-top .dim { color: var(--muted); font-size: 12.5px; }

/* Flash on panel update — the user-visible feedback for any click */
@keyframes panel-flash {
  0%   { background: rgba(29, 78, 216, 0.10); }
  100% { background: rgba(29, 78, 216, 0.00); }
}
.panel-top.flash { animation: panel-flash 520ms var(--ease); }

/* Entries in the panel top: clickable cards */
.ptile {
  display: grid; grid-template-columns: 4px 1fr auto;
  gap: 10px; align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-alt);
  cursor: pointer;
  transition: background 120ms, border-color 120ms, transform 120ms;
  margin-bottom: 8px;
}
.ptile:hover { background: white; border-color: #BFDBFE; transform: translateX(2px); }
.ptile.selected { border-color: var(--accent); background: var(--accent-soft); }
.ptile .bar { width: 4px; align-self: stretch; border-radius: 2px; }
.ptile .title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.ptile .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ptile .due {
  font-size: 11px; font-family: var(--mono); color: var(--muted); text-align: right; white-space: nowrap;
}
.ptile .due.soon    { color: var(--warn); font-weight: 600; }
.ptile .due.today   { color: var(--err);  font-weight: 700; }
.ptile .due.overdue { color: var(--err);  font-weight: 700; }

.ptag {
  display: inline-block;
  font-size: 10.5px; font-weight: 600;
  padding: 1px 7px; border-radius: 10px;
  background: var(--line-2); color: var(--muted);
  margin-right: 5px;
}
.ptag.meeting  { background: #DBEAFE; color: #1E3A8A; }
.ptag.deadline { background: #FEE2E2; color: #991B1B; }
.ptag.signal   { background: #FEF3C7; color: #92400E; }

/* Bot chat (right-panel column) — full height so input sticks to bottom. */
.bot {
  /* Three rows: header (auto), transcript (fills), compose (auto).
     The earlier four-row template made the compose form soak up all the
     remaining space, which — combined with align-items:stretch inside
     the flex form — blew the textarea up to fill the panel. Three rows
     is the correct shape. */
  display: grid; grid-template-rows: auto 1fr auto;
  height: 100%;
  min-height: 0;
  background: var(--bg-panel);
  border-top: 1px solid var(--line);
}
.bot .bhead {
  padding: 12px 16px 8px 16px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
}
.bot .bdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(21,128,61,0.15);
}
.bot .btitle {
  font-family: var(--serif); font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
}
.bot .bsub { color: var(--muted); font-size: 12px; margin-left: auto; }
.bot .bstream {
  overflow-y: auto;
  /* Bubbles float their handles (#N, close, quote) a few px outside their
     borders — the extra left/right padding keeps those handles from being
     clipped by the stream edge. Extra top padding avoids clipping the row
     just above the first bubble. */
  padding: 14px 18px 10px 18px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 13px;
}
.bubble {
  /* Position relative so we can float the handle/close/quote on the edges.
     Min-height ensures the handles have somewhere to land even on one-liners. */
  position: relative;
  max-width: 86%;
  padding: 9px 11px;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 13px;
  animation: bubble-in 200ms var(--ease);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 220ms ease;
}
.bubble.fading { opacity: 0; transform: translateY(-2px) scale(0.98); }
/* Post-quote nudge — brief glow so the user knows which bubble was quoted. */
.bubble.b-just-quoted {
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.bubble.bot-msg {
  align-self: flex-start;
  background: white;
  border: 1px solid var(--line);
  color: var(--text-2);
  border-bottom-left-radius: 4px;
}
.bubble.user-msg {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  border-bottom-right-radius: 4px;
}
.bubble.kicker {
  align-self: flex-start;
  background: var(--accent-soft);
  border: 1px solid #BFDBFE;
  color: #1E3A8A;
  font-size: 12.5px;
}
/* Ephemeral selection breadcrumb — fades out a few seconds after landing. */
.bubble.focus-chip { transition: opacity 420ms ease, transform 420ms ease; }
.bubble.focus-chip.fading { opacity: 0; transform: translateY(-3px); }

/* Drafts and imminent actions pulse softly in the briefing stage so the eye
   goes to work that is actually waiting. One pulse per 1.8s, low-amplitude
   ring. */
@keyframes bbub-pulse {
  0%   { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 0 rgba(16,185,129,0.35); }
  60%  { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 10px rgba(16,185,129,0.00); }
  100% { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 0 rgba(16,185,129,0.00); }
}
@keyframes bbub-pulse-urgent {
  0%   { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 0 rgba(220,38,38,0.38); }
  60%  { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 10px rgba(220,38,38,0.00); }
  100% { box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 0 rgba(220,38,38,0.00); }
}
.bbub.pulse.draft    { animation: bbub-pulse         1.8s ease-out infinite; }
.bbub.pulse.owe,
.bbub.pulse.deadline { animation: bbub-pulse-urgent  1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .bbub.pulse.draft,
  .bbub.pulse.owe,
  .bbub.pulse.deadline { animation: none; }
}
.bubble .bk {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; opacity: 0.7; margin-bottom: 4px;
}
.bubble .bdim {
  color: var(--muted); font-size: 12.5px; opacity: 0.78;
}

/* ----- Bubble handles: #N id + mac-style close + quote button ------------- */

/* #N — small monospace handle, always visible (subtle so it doesn't scream).
   Top-right for bot, top-left for user (mirrored so it stays outboard of the
   tail). Sits just outside the bubble so it doesn't fight with content. */
.bubble .b-n {
  position: absolute;
  top: -6px;
  font-family: var(--mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--bg-panel, #F9FAFB);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1px 5px;
  line-height: 1.4;
  opacity: 0.55;
  pointer-events: none;       /* decorative; click goes to the bubble */
  transition: opacity 120ms ease, color 120ms ease;
}
.bubble:hover .b-n { opacity: 0.9; color: var(--text-2); }
.bubble.bot-msg .b-n,
.bubble.kicker  .b-n { right: 8px; }
.bubble.user-msg .b-n {
  left: 8px;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.35);
}

/* Mac-style close dot — hidden until bubble hover. Red circle; the ×
   glyph fades in on its own hover, matching macOS traffic-light affordance. */
.bubble .b-close {
  position: absolute;
  top: -7px; left: -7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #FF5F57;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  padding: 0;
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 140ms ease, transform 140ms ease;
}
.bubble:hover .b-close { opacity: 1; transform: scale(1); }
.bubble .b-close svg {
  width: 10px; height: 10px;
  color: rgba(74,0,0,0.0);     /* hidden until close-dot hover */
  transition: color 120ms ease;
}
.bubble .b-close:hover svg { color: rgba(74,0,0,0.85); }
.bubble .b-close:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Quote (reply-to) button — curved-arrow glyph, top-right of bot bubbles,
   top-left of user bubbles (opposite corner from the #N badge, but still
   outboard). Reveals on bubble hover. */
.bubble .b-quote {
  position: absolute;
  top: -8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  color: var(--muted);
  padding: 0;
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 140ms ease, transform 140ms ease, color 120ms ease, border-color 120ms ease;
}
.bubble:hover .b-quote { opacity: 0.95; transform: scale(1); }
.bubble .b-quote:hover { color: var(--accent); border-color: var(--accent); }
.bubble .b-quote svg { width: 12px; height: 12px; }
.bubble .b-quote:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.bubble.bot-msg .b-quote,
.bubble.kicker  .b-quote { right: 32px; }   /* inboard of the #N */
.bubble.user-msg .b-quote { left: 32px; background: rgba(255,255,255,0.92); }

/* ----- Inline clickables inside bot bubbles ------------------------------ */

/* <em> → "Ask this" chip. Looks like a softly underlined suggestion and
   flips to an accent link on hover so it reads as clickable. */
.bubble em.b-chip {
  font-style: italic;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px dashed rgba(37,99,235,0.45);
  padding-bottom: 1px;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
  border-radius: 3px;
}
.bubble em.b-chip:hover {
  background: rgba(37,99,235,0.08);
  border-bottom-color: var(--accent);
}

/* <b> that resolved to a project or person — make it a quiet pivot target. */
.bubble b.b-pivot {
  cursor: pointer;
  border-bottom: 1px dotted rgba(17,24,39,0.30);
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
  border-radius: 3px;
  padding: 0 2px;
}
.bubble b.b-pivot:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(37,99,235,0.06);
}
.bubble.user-msg b.b-pivot { border-bottom-color: rgba(255,255,255,0.55); }
.bubble.user-msg b.b-pivot:hover { background: rgba(255,255,255,0.16); color: white; }
.bot .bcompose {
  padding: 10px 12px 12px 12px;
  border-top: 1px solid var(--line);
  background: white;
  display: flex;
  /* Don't stretch the textarea vertically — it sizes itself via rows + JS */
  align-items: flex-end;
}
.bot .bcompose textarea {
  flex: 1;
  width: 100%;
  /* 2 lines by default (13px × 1.45 line-height × 2 + 18px padding + 2px border ≈ 58px) */
  min-height: 58px;
  max-height: 40vh;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 13px; color: var(--text);
  outline: none; font-family: inherit;
  line-height: 1.45;
  background: var(--bg-alt);
  resize: none;
  overflow-y: auto;
  transition: border-color 120ms, background 120ms;
}
.bot .bcompose textarea:focus { border-color: var(--accent); background: white; }

/* ============================================================================
   Drawer: contacts — opens from the right via the book icon
   ========================================================================== */
.drawer-scrim {
  position: fixed; inset: 0;
  background: rgba(17,24,39,0.18);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 160ms var(--ease);
  z-index: 40;
}
.drawer-scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 340px; background: white;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 220ms var(--ease);
  z-index: 50;
  display: grid; grid-template-rows: auto 1fr;
  box-shadow: -10px 0 30px rgba(17,24,39,0.08);
}
.drawer.open { transform: translateX(0); }
.drawer .dhead {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 10px;
}
.drawer .dhead h3 {
  font-family: var(--serif);
  font-size: 16px; font-weight: 600; margin: 0;
}
.drawer .dhead .dim { color: var(--muted); font-size: 12px; }
.drawer .dhead .closex {
  margin-left: auto; background: none; border: none;
  font-size: 18px; color: var(--muted); cursor: pointer;
}
.drawer .dsearch {
  padding: 10px 16px 6px 16px;
  position: sticky; top: 0; background: white;
  border-bottom: 1px solid var(--line-2);
  z-index: 2;
}
.drawer .dsearch input {
  width: 100%; padding: 7px 10px;
  border: 1px solid var(--line); background: var(--bg-alt);
  border-radius: 6px; font-size: 13px; outline: none;
}
.drawer .dsearch input:focus { border-color: var(--accent); background: white; }
.drawer .dlist { overflow-y: auto; padding: 4px 0 40px 0; }
.drawer .drow {
  display: grid; grid-template-columns: 32px 1fr auto;
  align-items: center; gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.drawer .drow:hover { background: var(--bg-alt); border-left-color: var(--accent); }
.drawer .drow.selected { background: var(--accent-soft); border-left-color: var(--accent); }
.drawer .drow .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 700;
}
.drawer .drow .nm { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .drow .ro { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer .drow .fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.drawer .drow .fdot.fresh { background: var(--ok); }
.drawer .drow .fdot.warm  { background: var(--warn); }
.drawer .section-h {
  padding: 12px 16px 2px 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--subtle);
}

/* ============================================================================
   Briefing surface — lane-packed speech bubbles
   ========================================================================== */
.briefing {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
}
.briefing .now-strip {
  margin: 52px 22px 10px 22px;
  padding: 10px 14px;
  background: linear-gradient(to right, var(--accent-soft), white);
  border-left: 3px solid var(--accent);
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  font-size: 13.5px; color: var(--text-2);
  cursor: pointer;
  transition: background 140ms;
}
.briefing .now-strip:hover { background: linear-gradient(to right, #DBEAFE, var(--accent-soft)); }
.briefing .now-strip b { color: var(--text); }

.briefing .stage {
  position: absolute;
  left: 22px; right: 22px; bottom: 22px;
  top: 120px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.briefing .stage-inner {
  position: relative;
  min-height: 100%;
  min-width: 1100px;
  padding: 30px 22px 22px 130px;
}

/* Time-axis along the top of the stage */
.briefing .axis {
  position: sticky; top: 0;
  height: 36px;
  background: linear-gradient(to bottom, white 60%, rgba(255,255,255,0));
  z-index: 3;
  margin-left: -108px;
  margin-right: -6px;
  padding-left: 108px;
}
.briefing .axis .day {
  position: absolute; top: 4px;
  font-size: 11px; color: var(--muted);
  font-family: var(--mono);
  transform: translateX(-50%);
}
.briefing .axis .day b { color: var(--text); font-weight: 600; }
.briefing .axis .today-mark {
  position: absolute; top: 2px;
  transform: translateX(-50%);
  background: var(--err); color: white;
  font-size: 9.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  letter-spacing: 0.06em;
}
.briefing .axis .hourtick {
  position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line);
}

/* Lane labels on the left */
.briefing .lane {
  position: relative;
  min-height: 60px;
  margin-bottom: 18px;
}
.briefing .lane-label {
  position: absolute;
  left: -108px;
  top: 0; width: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.briefing .lane-label .ldot {
  width: 8px; height: 8px; border-radius: 50%;
}
.briefing .lane-label .lcount {
  color: var(--subtle); font-weight: 500; margin-left: auto;
}
.briefing .lane-body {
  position: relative;
  min-height: 60px;
  border-top: 1px dashed var(--line-2);
  padding-top: 8px;
}
.briefing .now-line {
  position: absolute;
  top: 36px; bottom: 22px;
  width: 1.5px;
  background: repeating-linear-gradient(to bottom, var(--err) 0 4px, transparent 4px 8px);
  pointer-events: none;
  z-index: 2;
}

/* Speech bubble */
.bbub {
  position: absolute;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  max-width: 220px;
  min-width: 80px;
  cursor: pointer;
  transition: transform 140ms var(--ease), box-shadow 140ms, border-color 140ms, background 140ms;
  box-shadow: 0 1px 2px rgba(17,24,39,0.04);
  z-index: 1;
}
.bbub:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(17,24,39,0.10);
  z-index: 4;
}
.bbub.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  z-index: 5;
}
.bbub .bt {
  font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bbub .bm {
  font-size: 11px; color: var(--muted); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Tail pointing down from bubble to axis */
.bbub .tail {
  position: absolute;
  left: 14px; bottom: -5px;
  width: 10px; height: 10px;
  background: white;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
  z-index: -1;
}
.bbub.selected .tail { background: var(--accent-soft); border-color: var(--accent); }
/* Lane-specific accent */
.bbub.meeting  { border-left: 3px solid var(--accent); }
.bbub.deadline { border-left: 3px solid var(--err); }
.bbub.signal   { border-left: 3px solid var(--warn); }
.bbub.owe      { border-left: 3px solid var(--err); }
.bbub.owed     { border-left: 3px solid var(--accent); }
.bbub.draft    { border-left: 3px solid var(--ok); }

/* ============================================================================
   Atlas surface — continents, rivers, heat. Mostly inherited from aether2.
   ========================================================================== */
.atlas { position: absolute; inset: 0; }
.atlas svg#map { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--paper); }
.atlas .legend {
  position: absolute; left: 22px; bottom: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 11.5px;
  color: var(--text-2);
  max-width: 260px;
  backdrop-filter: blur(6px);
  z-index: 5;
}
.atlas .legend .title {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
.atlas .legend .heat-strip {
  display: flex; height: 8px; border-radius: 3px; overflow: hidden;
  border: 1px solid var(--line);
}
.atlas .legend .heat-strip span { flex: 1; }
.atlas .legend .heat-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--subtle); font-family: var(--mono);
  margin-top: 2px;
}
.atlas .legend .row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.atlas .legend .swatch { width: 10px; height: 10px; border-radius: 50%; }

/* Atlas toolbar (Projectland/People/Riverlinks + cluster filter) */
.atlas .toolchip { position: absolute; top: 66px; right: 20px; z-index: 6; }

.atlas .province-label {
  font-family: var(--sans);
  font-size: 12.5px; font-weight: 600;
  paint-order: stroke;
  stroke: white; stroke-width: 3px;
  cursor: pointer;
}
.atlas .person-label {
  font-family: var(--sans);
  font-size: 10px; fill: var(--text-2);
  paint-order: stroke;
  stroke: white; stroke-width: 2.5px;
}
.atlas .city { cursor: pointer; transition: r 120ms; }
.atlas .city:hover { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25)); }
.atlas .province-hull { cursor: pointer; transition: filter 140ms; }
.atlas .province-hull:hover { filter: brightness(1.05) drop-shadow(0 4px 6px rgba(0,0,0,0.08)); }
.atlas .province-hull.selected { filter: drop-shadow(0 0 0 2px var(--accent)); }

.atlas .river { fill: none; stroke: rgba(22,101,52,0.9); stroke-linecap: round; transition: stroke 140ms, stroke-width 140ms; }
.atlas .river-halo { fill: none; stroke: rgba(236,253,245,0.88); stroke-linecap: round; }
.atlas .river:hover { stroke: rgba(22,101,52,1); filter: drop-shadow(0 0 3px rgba(22,101,52,0.35)); }

/* ============================================================================
   Hive surface — the old Connectome, reskinned to match Atlas
   ========================================================================== */
.hive { position: absolute; inset: 0; }
.hive svg#hive { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--paper); }
.hive .toolchip { position: absolute; top: 66px; right: 20px; z-index: 6; }
.hive .legend {
  position: absolute; left: 22px; bottom: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 11.5px;
  color: var(--text-2);
  max-width: 260px;
  backdrop-filter: blur(6px);
  z-index: 5;
}
.hive .legend .title {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.hive .legend .row { display: flex; gap: 8px; align-items: center; margin-top: 5px; }
.hive .legend .swatch { width: 10px; height: 10px; border-radius: 50%; }

/* Hive nodes/edges */
.hive .edge        { fill: none; stroke: rgba(55,65,81,0.20); stroke-linecap: round; transition: stroke 140ms, stroke-width 140ms; }
.hive .edge.strong { stroke: rgba(55,65,81,0.42); }
.hive .edge.hot    { stroke: rgba(215,72,60,0.55); }
.hive .edge.dim    { stroke: rgba(55,65,81,0.10); }
.hive .pnode     { cursor: pointer; }
.hive .pnode circle { transition: r 140ms, filter 140ms; }
.hive .pnode:hover circle { filter: drop-shadow(0 4px 10px rgba(17,24,39,0.18)); }
.hive .pnode.selected circle { stroke: var(--accent); stroke-width: 3; }

/* Pressure aura: pulses around people who are waiting on me. The ring
   breathes — scales up and fades to zero, then restarts. Period tracks
   urgency: lo breathes slowly, hi is a firm heartbeat. The stroke colour
   is painted inline (red when I owe them, amber for they_owe nudges)
   so we don't fight CSS specificity over theme. */
@keyframes hive-pressure-pulse {
  0%   { stroke-opacity: 0.85; transform: scale(1.00); }
  70%  { stroke-opacity: 0.00; transform: scale(1.55); }
  100% { stroke-opacity: 0.00; transform: scale(1.55); }
}
.hive .pressure-aura {
  transform-origin: center;
  transform-box: fill-box;
  pointer-events: none;
  animation: hive-pressure-pulse 2.2s ease-out infinite;
}
.hive .pressure-aura.lo  { animation-duration: 2.4s; }
.hive .pressure-aura.mid { animation-duration: 1.6s; }
.hive .pressure-aura.hi  { animation-duration: 1.0s; }
@media (prefers-reduced-motion: reduce) {
  .hive .pressure-aura { animation: none; stroke-opacity: 0.35; }
}
.hive .hnode circle { transition: r 140ms; }
.hive .hnode:hover circle { filter: drop-shadow(0 2px 4px rgba(17,24,39,0.2)); }
.hive .hnode.selected circle { stroke: var(--accent); stroke-width: 2.5; }
.hive .hnode { cursor: pointer; }
.hive .tlabel {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  paint-order: stroke;
  stroke: white; stroke-width: 3px;
}
.hive .plabel {
  font-family: var(--sans);
  font-size: 10.5px; fill: var(--text-2);
  paint-order: stroke;
  stroke: white; stroke-width: 2.5px;
}

/* ============================================================================
   Tooltip (shared by atlas + hive)
   ========================================================================== */
.tooltip {
  position: fixed;
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17,24,39,0.12);
  padding: 10px 12px;
  font-size: 12.5px;
  max-width: 280px;
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  transition: opacity 120ms var(--ease);
  color: var(--text-2);
  line-height: 1.5;
}
.tooltip.visible { opacity: 1; }
.tooltip .ttitle { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 3px; }
.tooltip .tpill {
  display: inline-block; padding: 1px 6px; border-radius: 8px;
  color: white; font-size: 10.5px; font-weight: 600;
  margin-bottom: 5px;
}
.tooltip .tmeta { color: var(--muted); font-size: 11.5px; margin-top: 4px; }

/* ============================================================================
   Utilities
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.clickable { cursor: pointer; transition: color 120ms, background 120ms; }
.clickable:hover { color: var(--accent); }
.empty { padding: 14px 16px; color: var(--subtle); font-style: italic; font-size: 12.5px; }
.hidden { display: none !important; }
