:root {
  color-scheme: dark;
  --ink: #080b12;
  --surface: #0d1420;
  --surface2: #111c2b;
  --line: #223956;
  --text: #eef7ff;
  --muted: #87a0b9;
  --cyan: #31d7ff;
  --blue: #3585ff;
  --gold: #e9b85b;
  --danger: #ff7b92;

  /*
   * The one card surface. It was written out five times verbatim, so a change to the
   * console's depth meant finding all five.
   */
  --surface-card: linear-gradient(145deg, rgba(16, 28, 43, 0.93), rgba(9, 15, 24, 0.92));

  /* Spacing. A 4px base; everything below snaps to it. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  /* Radii. Three, plus a pill - not the nine distinct values this file had grown. */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /*
   * Type. The console is deliberately dense and its tracked uppercase labels are part of
   * that, but 8px was below the point where a label is readable at all. 9px is the floor,
   * and running prose never uses it.
   */
  --type-nano: 9px;
  --type-micro: 10px;
  --type-small: 11px;
  --type-body: 13px;
  --type-base: 14px;
  --type-lg: 16px;
  --type-xl: 18px;
  --type-display: 23px;
  --type-hero: 28px;

  /* Motion. There was exactly one transition in the whole stylesheet. */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --motion-fast: 120ms;
  --motion-base: 180ms;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at 60% -10%, #15294a 0, transparent 28rem), var(--ink);
  color: var(--text);
  min-width: 320px;
}
.atlas-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-rows: 68px 1fr;
  background: linear-gradient(130deg, rgba(49, 215, 255, 0.025), transparent 36%);
}
[hidden] {
  display: none !important;
}
.atlas-header {
  grid-column: 1/3;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  align-items: center;
  gap: var(--space-5);
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 12, 20, 0.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.atlas-wordmark {
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.22em;
  font-weight: 850;
  font-size: var(--type-lg);
}
.atlas-wordmark span {
  display: block;
  color: var(--cyan);
  font-size: var(--type-nano);
  letter-spacing: 0.17em;
  margin-top: 2px;
}
.vitals {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  overflow: auto;
  scrollbar-width: none;
}
.vital {
  white-space: nowrap;
  min-width: 92px;
  padding-right: 12px;
  border-right: 1px solid rgba(49, 215, 255, 0.14);
}
.vital span {
  display: block;
  font-size: var(--type-nano);
  letter-spacing: 0.11em;
  color: var(--muted);
  text-transform: uppercase;
}
.unavailable {
  font-size: var(--type-micro);
  color: #7790a8;
  letter-spacing: 0.04em;
}
.atlas-nav {
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 23, 36, 0.95), rgba(7, 11, 18, 0.95));
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 68px);
  position: sticky;
  top: 68px;
  align-self: start;
}
.nav-label,
.rail-title {
  font-size: var(--type-nano);
  letter-spacing: 0.16em;
  color: #7192af;
  font-weight: 800;
  padding: 0 10px 10px;
}
.nav-link {
  padding: 10px;
  border-radius: var(--radius-sm);
  color: #a9c0d6;
  text-decoration: none;
  font-size: var(--type-small);
  font-weight: 750;
  letter-spacing: 0.09em;
  transition: 0.18s;
}
.nav-link:hover,
.nav-link.active {
  background: linear-gradient(90deg, rgba(49, 215, 255, 0.17), transparent);
  color: #effbff;
  box-shadow: inset 2px 0 var(--cyan);
}
.nav-spacer {
  flex: 1;
}
.role-switch {
  border-top: 1px solid var(--line);
  padding: 12px 4px 0;
  display: grid;
  gap: var(--space-2);
}
.role-switch span {
  font-size: var(--type-nano);
  color: var(--muted);
  letter-spacing: 0.1em;
}
.role-switch button,
.new-thread,
.activity-controls button,
.evidence-strip button {
  font: inherit;
  font-size: var(--type-nano);
  letter-spacing: 0.06em;
  color: #90abc0;
  background: #101c2b;
  border: 1px solid #2b4663;
  border-radius: var(--radius-sm);
  padding: 7px;
  cursor: pointer;
}
.role-switch button.active {
  border-color: var(--cyan);
  color: var(--cyan);
}
button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.atlas-main {
  padding: var(--space-5);
  /*
   * `.ask-ceo` is fixed to the bottom centre of the viewport, so without clearance it sits
   * on top of whatever the room ends with. This reserves its height plus a margin.
   */
  padding-bottom: 92px;
  min-width: 0;
}
.room {
  max-width: 1500px;
  /*
   * `margin: auto` alone was written for a block layout, where it centres a full-width box.
   * `.atlas-workspace` is a **grid**, and on a grid item `margin: auto` cancels the default
   * `stretch` - so the room shrank to its content and centred that instead. Measured at
   * 1024px: 449px of an available 784px, every room using barely half its column while the
   * rest sat empty.
   *
   * `inline-size: 100%` restores the fill; `margin-inline: auto` keeps the centring the
   * original line was reaching for once the 1500px cap bites on a wide screen.
   */
  inline-size: 100%;
  margin-inline: auto;
}
.room-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin: 0 0 20px;
}
.room h1 {
  font-size: var(--type-hero);
  margin: 3px 0 0;
  letter-spacing: -0.035em;
}
.eyebrow {
  font-size: var(--type-micro);
  letter-spacing: 0.16em;
  color: var(--cyan);
  margin: 0;
}
.badge {
  display: inline-block;
  /*
   * A badge inside a column flex container is blockified and stretches to the full width of
   * the card, which reads as a bar rather than a pill. Fixing it here rather than on each
   * container means the next room to use a badge inherits the correct behaviour.
   *
   * BOTH properties are required, and the first version of this fix only had the first.
   * `align-self` governs the cross axis, which is the horizontal one in a *column flex*
   * container - but `.executive-node` is a **grid**, where the horizontal axis is `justify`.
   * So the Executive Board's status badges went on stretching to 135px while the portfolio's
   * looked correct, which is precisely the kind of thing that is invisible until rendered.
   */
  align-self: start;
  justify-self: start;
  font-size: var(--type-nano);
  letter-spacing: 0.08em;
  border: 1px solid #38516c;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  color: #91acc0;
}
.badge.cyan {
  border-color: rgba(49, 215, 255, 0.45);
  color: var(--cyan);
}
.badge.gold {
  border-color: rgba(233, 184, 91, 0.6);
  color: var(--gold);
}
.gold-text {
  color: var(--gold);
}
.command-room {
  max-width: 1700px;
  margin: auto;
  display: grid;
  grid-template-columns: 220px minmax(430px, 1fr) 252px;
  gap: var(--space-4);
  position: relative;
  padding-bottom: 66px;
}
.command-left,
.command-right,
.command-center,
.room,
.limited-room,
.placeholder-room {
  border: 1px solid var(--line);
  background: var(--surface-card);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}
.command-left,
.command-right {
  padding: 14px;
  min-height: 690px;
}
.thread-search,
.composer textarea,
.activity-controls input {
  width: 100%;
  margin: 9px 0;
  padding: 10px;
  background: #07111d;
  border: 1px solid #29455f;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.rail-note {
  font-size: var(--type-small);
  line-height: 1.6;
  color: var(--muted);
}
.command-center {
  min-width: 0;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.atlas-core-panel {
  height: 190px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle, rgba(49, 215, 255, 0.17), transparent 36%),
    linear-gradient(90deg, transparent, rgba(49, 215, 255, 0.04), transparent);
  border-bottom: 1px solid rgba(49, 215, 255, 0.2);
}
.core-orbit {
  position: absolute;
  border: 1px solid rgba(49, 215, 255, 0.4);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.orbit-a {
  width: 152px;
  height: 78px;
  transform: rotate(22deg);
}
.orbit-b {
  width: 112px;
  height: 148px;
  transform: rotate(-28deg);
  animation-direction: reverse;
}
.core-center {
  z-index: 1;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: radial-gradient(circle at 35% 30%, #8dffff, #1976b7 43%, #071526 70%);
  box-shadow:
    0 0 38px rgba(49, 215, 255, 0.55),
    inset 0 0 20px #bfffff;
}
.core-center strong {
  font-size: var(--type-micro);
  letter-spacing: 0.08em;
  color: #06121c;
}
.core-center small {
  font-size: var(--type-nano);
  color: #09253b;
  font-weight: 800;
}
.core-dot {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 15px #fff;
}
.core-state {
  position: absolute;
  bottom: 13px;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--type-micro);
  color: var(--muted);
}
@keyframes spin {
  to {
    rotate: 1turn;
  }
}
@media (prefers-reduced-motion: reduce) {
  .core-orbit {
    animation: none;
  }
}
.conversation {
  display: grid;
  gap: var(--space-3);
  padding: 16px 4px;
  min-height: 270px;
}
.message {
  padding: 13px 15px;
  border-left: 2px solid var(--cyan);
  background: rgba(5, 13, 22, 0.46);
  font-size: var(--type-body);
  line-height: 1.55;
}
.owner-message {
  border-color: var(--gold);
  margin-left: 9%;
  background: rgba(49, 36, 18, 0.28);
}
.message-author {
  display: block;
  font-size: var(--type-nano);
  letter-spacing: 0.13em;
  color: var(--cyan);
  font-weight: 800;
}
.owner-message .message-author {
  color: var(--gold);
}
.execution-card,
.command-result {
  border: 1px solid #284a67;
  background: #0a1523;
  padding: 13px;
}
.execution-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: center;
}
.telemetry-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}
.telemetry-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 7px 0;
  border-bottom: 1px solid rgba(116, 149, 179, 0.14);
  font-size: var(--type-small);
  color: #a9bfd1;
}
.autonomy-room {
  display: grid;
  gap: var(--space-5);
  padding: 22px;
}
.autonomy-state {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px 13px;
  border: 1px solid rgba(49, 215, 255, 0.3);
  background: rgba(7, 20, 32, 0.72);
  color: var(--muted);
  font-size: var(--type-small);
}
.autonomy-state.stale,
.autonomy-state.missing {
  border-color: rgba(233, 184, 91, 0.5);
}
.autonomy-state.failed {
  border-color: rgba(255, 102, 102, 0.55);
}
.autonomy-state p {
  margin: 0;
}
.learning-room {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.owner-correction {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line, #2a3644);
  border-radius: var(--radius-md);
}
.owner-correction input[type='text'],
.owner-correction textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem;
  font: inherit;
}
.owner-correction textarea {
  min-height: 6rem;
  resize: vertical;
}
.correction-actions {
  display: flex;
  justify-content: flex-end;
}
.correction-ok {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.autonomy-sections {
  display: grid;
  gap: var(--space-3);
}
.autonomy-sections h2 {
  margin: 12px 0 0;
  color: #b9eaf4;
  font-size: var(--type-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.autonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}
.autonomy-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #294b66;
  background: rgba(7, 17, 29, 0.82);
}
.autonomy-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  color: #dffaff;
}
.autonomy-card-head strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.autonomy-card-head .badge {
  flex: none;
}
.autonomy-fields {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
  gap: 0;
  margin: 10px 0 0;
  font-size: var(--type-micro);
}
.autonomy-fields dt,
.autonomy-fields dd {
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid rgba(116, 149, 179, 0.14);
  overflow-wrap: anywhere;
}
.autonomy-fields dt {
  color: var(--muted);
}
.autonomy-fields dd {
  min-width: 0;
  color: #c2d7e7;
}
.empty-state {
  margin: 0;
  padding: 14px;
  border: 1px dashed #36536c;
  color: var(--muted);
  font-size: var(--type-small);
}
.unavailable-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: 14px;
}
.unavailable-actions button {
  border: 1px solid #496177;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #101a24;
  color: var(--muted);
  font-size: var(--type-nano);
  letter-spacing: 0.08em;
}
.owner-mutation-console {
  display: grid;
  gap: var(--space-3);
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(49, 215, 255, 0.24);
}
.owner-mutation-console > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.owner-mutation-console h2,
.owner-mutation-card h3,
.owner-mutation-console p {
  margin: 0;
}
.owner-mutation-console > p,
.owner-mutation-card > p,
.owner-mutation-status,
.owner-replay-confirm {
  color: var(--muted);
  font-size: var(--type-small);
  line-height: 1.5;
}
.owner-mutation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-3);
}
.owner-mutation-card {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
  padding: 14px;
  border: 1px solid #36536c;
  background: rgba(7, 17, 29, 0.88);
}
.owner-mutation-card h3 {
  color: #dffaff;
  font-size: var(--type-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.owner-mutation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.owner-mutation-field {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  color: var(--muted);
  font-size: var(--type-nano);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.owner-mutation-field:first-child,
.owner-mutation-field:last-child {
  grid-column: 1 / -1;
}
.owner-mutation-field input,
.owner-mutation-field select {
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 1px solid #29455f;
  border-radius: var(--radius-sm);
  background: #07111d;
  color: var(--text);
  font: inherit;
  font-size: var(--type-small);
  letter-spacing: normal;
  text-transform: none;
}
.owner-mutation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.owner-mutation-card button {
  padding: 8px 10px;
  border: 1px solid #2b6074;
  border-radius: var(--radius-sm);
  background: rgba(23, 143, 185, 0.14);
  color: #d9fbff;
  font: inherit;
  font-size: var(--type-nano);
  font-weight: 800;
  letter-spacing: 0.07em;
}
.owner-replay-confirm {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.owner-replay-confirm input {
  flex: none;
  margin-top: 3px;
}
.owner-mutation-status {
  padding: 9px;
  border-left: 2px solid var(--gold);
  background: rgba(233, 184, 91, 0.06);
}
.owner-mutation-receipt {
  max-height: 260px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(116, 149, 179, 0.28);
  background: #050c14;
  color: #b9eaf4;
  font-size: var(--type-micro);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.composer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.composer textarea {
  resize: vertical;
  min-height: 72px;
  margin: 0;
}
.composer-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: 8px;
}
.read-command {
  margin-left: auto;
  border: 1px solid var(--cyan);
  background: rgba(23, 143, 185, 0.16);
  color: #d9fbff;
  border-radius: var(--radius-sm);
  padding: 9px;
  font-size: var(--type-nano);
  font-weight: 850;
  letter-spacing: 0.08em;
}
.evidence-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 48px;
  border: 1px solid #304d68;
  background: rgba(7, 15, 24, 0.96);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 12px;
  overflow: auto;
  font-size: var(--type-nano);
  color: var(--muted);
}
.evidence-strip strong {
  color: var(--cyan);
  white-space: nowrap;
}
.evidence-strip span {
  white-space: nowrap;
  border-left: 1px solid #27445c;
  padding-left: 10px;
}
.executive-map {
  padding: 32px 18px;
  text-align: center;
  position: relative;
  overflow: auto;
  min-height: 610px;
  background: radial-gradient(circle at 50% 10%, rgba(49, 215, 255, 0.12), transparent 35%), #09121e;
}
.owner-node,
.executive-node {
  border: 1px solid #2e5877;
  background: rgba(14, 29, 44, 0.92);
  color: var(--text);
  padding: 12px;
  min-width: 145px;
}
.owner-node {
  display: inline-block;
  border-color: var(--gold);
  color: var(--gold);
  letter-spacing: 0.12em;
  font-weight: 850;
}
.map-line.vertical {
  height: 35px;
  width: 1px;
  background: var(--cyan);
  margin: auto;
}
.map-line.horizontal {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  max-width: 700px;
  margin: 30px auto;
}
.ceo-wrap {
  display: flex;
  justify-content: center;
}
.executive-node {
  display: grid;
  gap: var(--space-2);
  text-align: left;
}
.executive-node.ceo {
  border-color: var(--cyan);
  box-shadow: 0 0 25px rgba(49, 215, 255, 0.15);
}
.executive-node small {
  font-size: var(--type-nano);
  color: var(--muted);
}
.executive-grid {
  display: grid;
  /*
   * `auto-fit` rather than a fixed 3. Three 160px columns plus gaps need 508px, and the board
   * column is 462px on a 1024px window - so the chart sat inside its `overflow-x: auto`
   * parent and made the Owner scroll sideways to see their own org chart. The nodes need
   * ~158px of content, so narrowing the columns would only move the overflow inside them.
   *
   * Reflowing to two columns shows the whole hierarchy instead. It still takes three whenever
   * there is room, and the scroll container remains as the backstop for genuinely narrow
   * screens.
   */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  max-width: 850px;
  margin: auto;
}
.fleet {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-4);
}
.capacity {
  padding: 12px;
  background: #0a1422;
}
.worker-table {
  display: grid;
  gap: var(--space-2);
}
.worker-row {
  padding: 15px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  font-size: var(--type-small);
}
.worker-row span {
  grid-column: 1/-1;
  color: var(--muted);
}
.task-graph,
.system-map {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  padding: 38px;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(53, 133, 255, 0.16), transparent 35%), #08121e;
}
.graph-node,
.system-node {
  position: relative;
  border: 1px solid #31526e;
  padding: 13px;
  min-width: 110px;
  text-align: center;
  color: #b5d2e7;
  font-size: var(--type-micro);
  letter-spacing: 0.06em;
}
.graph-node:after,
.system-node:after {
  content: '';
  position: absolute;
  width: 22px;
  height: 1px;
  right: -23px;
  top: 50%;
  background: var(--cyan);
}
.graph-node.selected {
  border-color: var(--gold);
  color: var(--gold);
}
.system-node {
  display: grid;
  gap: var(--space-2);
  min-width: 120px;
}
.approval-center {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-6);
  padding: 30px;
}
.gold-seal {
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: var(--type-body);
  letter-spacing: 0.13em;
  text-align: center;
  box-shadow: 0 0 30px rgba(233, 184, 91, 0.14);
}
.activity-stream {
  max-width: 920px;
  border-left: 1px solid var(--cyan);
  padding-left: 18px;
}
.activity-controls {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: 16px;
}
.activity-event {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: var(--space-3);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: var(--type-body);
}
.activity-event span {
  color: var(--cyan);
}
.placeholder-room,
.limited-room {
  padding: 22px;
  max-width: 900px;
}
.limited-room {
  line-height: 1.6;
}
.signin {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 10, 0.85);
  z-index: 20;
}
.signin-card {
  max-width: 430px;
  padding: 28px;
  text-align: center;
  background: #101b28;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 45px rgba(49, 215, 255, 0.15);
}
.button {
  display: inline-block;
  padding: 10px 15px;
  background: #173a54;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-sm);
}
.ask-ceo {
  position: fixed;
  z-index: 12;
  bottom: 16px;
  left: 50%;
  translate: -50%;
  border: 1px solid var(--cyan);
  background: rgba(7, 18, 31, 0.94);
  box-shadow: 0 0 25px rgba(49, 215, 255, 0.17);
  color: var(--cyan);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.ask-ceo small {
  display: block;
  font-size: var(--type-nano);
  color: var(--muted);
  margin-top: 2px;
}
.notice.error {
  padding: 16px;
  border: 1px solid var(--danger);
  color: #ffd1da;
}
.loading {
  color: var(--muted);
  padding: 50px;
  text-align: center;
}
.atlas-header {
  grid-template-columns: 190px minmax(270px, auto) minmax(0, 1fr) 220px;
}
.atlas-workspace-bar {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
}
.ghl-launch,
.board-mode-toggle,
.voice-command,
.voice-cancel {
  min-width: 0;
  border: 1px solid #31536d;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #0b1725;
  color: #bdd7e9;
  font: inherit;
  font-size: var(--type-nano);
  letter-spacing: 0.07em;
}
/* The sub-agency pull-down in a business room's header: switch without leaving the room. */
.room-agency-picker {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.room-agency-picker select {
  min-width: 0;
  max-width: 260px;
  padding: 8px 12px;
  border: 1px solid #31536d;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
}
.room-agency-picker select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Add a sub-agency. */
.add-agency-form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.add-agency-form label {
  display: grid;
  gap: var(--space-1);
  color: var(--muted);
}
.add-agency-form input {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #31536d;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
}
.add-agency-form button {
  justify-self: start;
}
@media (max-width: 720px) {
  .room-agency-picker,
  .room-agency-picker select {
    width: 100%;
    max-width: none;
  }
}

.ghl-launch {
  color: var(--gold);
  border-color: rgba(233, 184, 91, 0.5);
  white-space: nowrap;
}
.ghl-launch.inline {
  margin-top: 8px;
}
.nav-secondary-label {
  margin: 18px 10px 4px;
  color: #7192af;
  font-size: var(--type-nano);
  font-weight: 800;
  letter-spacing: 0.15em;
}
.nav-link.secondary {
  color: #8ca5b9;
  font-size: var(--type-nano);
}
.atlas-workspace {
  display: grid;
  gap: var(--space-4);
}
.atlas-preview-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  border: 1px solid rgba(233, 184, 91, 0.4);
  background: rgba(80, 55, 19, 0.16);
  color: #b9c9d5;
  font-size: var(--type-small);
  line-height: 1.45;
}
.voice-controls {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
}
.voice-state {
  color: #89a7bd;
  flex: 1 1 210px;
  min-width: 0;
  /* Prose, not a label - it wraps and carries sentences, so it does not use the label floor. */
  font-size: var(--type-small);
  line-height: 1.35;
  letter-spacing: 0.08em;
  white-space: normal;
}
.voice-state[data-voice-state='recording'],
.voice-state[data-voice-state='requesting'],
.voice-state[data-voice-state='transcribed'] {
  color: var(--gold);
}
.voice-state[data-voice-state='reconnect'],
.voice-state[data-voice-state='unavailable'],
.voice-state[data-voice-state='cancelled'] {
  color: #a5b5c0;
}
.voice-command {
  border-color: var(--cyan);
  color: var(--cyan);
  white-space: nowrap;
}
.voice-cancel {
  white-space: nowrap;
}
.atlas-workspace .voice-command,
.atlas-workspace .voice-cancel {
  min-height: 42px;
  font-size: var(--type-small);
  font-weight: 700;
}
.executive-board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.35fr);
  gap: var(--space-4);
}
.executive-inspector,
.atlas-detail-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.executive-inspector h2,
.atlas-detail-card h2 {
  margin: 4px 0 12px;
  font-size: var(--type-lg);
}
.executive-node {
  cursor: pointer;
}
.executive-node:hover {
  border-color: var(--gold);
}
/*
 * This previously set `outline: none`, which removed the only indicator a keyboard user has
 * on a clickable node. The hover colour is kept; the ring is restored by the global rule.
 */
.executive-node:focus-visible {
  border-color: var(--gold);
}
.executive-map-2d {
  min-height: 0;
  padding: 18px;
  background: #09121e;
}
.executive-map-2d .map-line {
  display: none;
}
.executive-map-2d .ceo-wrap {
  margin: 12px auto;
}
.executive-map-2d .executive-grid {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.board-mode-toggle {
  color: #d9effc;
}
.atlas-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.atlas-detail-card p,
.atlas-contract-card li {
  color: var(--muted);
  font-size: var(--type-small);
  line-height: 1.55;
}
.atlas-contract-card ul {
  padding-left: 18px;
  margin: 10px 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .atlas-workspace .core-orbit {
    animation: none;
  }
}
@media (max-width: 1100px) {
  .atlas-app {
    grid-template-columns: 185px 1fr;
    /*
     * The header becomes TWO rows here - the workspace bar, then the vitals spanning the full
     * width - but the row itself was still pinned to the 68px of the single-row layout. The
     * bar measured 75px inside it and spilled over the boundary, which is what crowded the
     * agency selector down to 21px wide. Let the header be as tall as the layout it was given.
     */
    grid-template-rows: auto 1fr;
  }
  .atlas-header {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .atlas-workspace-bar {
    grid-column: 2;
  }
  .vitals {
    grid-column: 1 / -1;
  }
  .command-room {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .command-right {
    display: none;
  }
}
@media (max-width: 900px) {
  .executive-board-layout,
  .atlas-health-grid {
    grid-template-columns: 1fr;
  }
  .voice-controls {
    flex-basis: 100%;
    order: 3;
  }
}
@media (max-width: 760px) {
  .atlas-app {
    display: block;
  }
  .atlas-header {
    position: static;
    display: block;
    padding: 14px;
  }
  .vitals {
    margin-top: 10px;
  }
  .atlas-workspace-bar {
    margin-top: 10px;
    flex-wrap: wrap;
  }
  .atlas-nav {
    position: static;
    min-height: 0;
    display: flex;
    flex-direction: row;
    overflow: auto;
    padding: 8px;
    white-space: nowrap;
  }
  .nav-label,
  .nav-spacer,
  .role-switch {
    display: none;
  }
  .nav-link {
    padding: 8px;
  }
  .atlas-main {
    padding: 10px;
  }
  .room-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .room-actions {
    flex-basis: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .autonomy-room {
    padding: 12px;
  }
  .autonomy-state {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .autonomy-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .autonomy-fields dt {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .autonomy-fields dd {
    padding-top: 2px;
  }
  .owner-mutation-grid,
  .owner-mutation-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .owner-mutation-field:first-child,
  .owner-mutation-field:last-child {
    grid-column: auto;
  }
  .command-room {
    display: block;
    padding-bottom: 58px;
  }
  .command-left,
  .command-right {
    display: none;
  }
  .command-center {
    padding: 10px;
  }
  .atlas-core-panel {
    height: 150px;
  }
  .executive-grid {
    grid-template-columns: 1fr 1fr;
  }
  .fleet,
  .approval-center {
    grid-template-columns: 1fr;
  }
  .ask-ceo {
    bottom: 8px;
  }
  .room h1 {
    font-size: var(--type-display);
  }
  .atlas-preview-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .composer-controls {
    flex-wrap: wrap;
  }
  .voice-state {
    white-space: normal;
  }
}

/* The Atlas route is an Owner workspace, not a developer console. */
.atlas-workspace {
  font-size: var(--type-lg);
}
.atlas-workspace .atlas-preview-banner {
  border-radius: var(--radius-md);
  font-size: var(--type-base);
}
.atlas-workspace .command-room {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  max-width: 1320px;
  padding-bottom: 0;
}
.atlas-workspace .command-left,
.atlas-workspace .evidence-strip,
.atlas-workspace .atlas-core-panel {
  display: none;
}
.atlas-workspace .command-center,
.atlas-workspace .command-right {
  min-height: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.atlas-workspace .command-center {
  padding: 26px;
}
.atlas-workspace .command-right {
  padding: 22px;
}
.atlas-workspace .conversation {
  min-height: 320px;
  padding: 0 0 18px;
}
.atlas-workspace .message {
  padding: 17px 18px;
  font-size: var(--type-lg);
  line-height: 1.6;
}
.atlas-workspace .message-author,
.atlas-workspace .rail-title,
.atlas-workspace .eyebrow {
  font-size: var(--type-small);
}
.atlas-workspace .rail-note,
.atlas-workspace .command-result p,
.atlas-workspace .advanced-control-content p {
  font-size: var(--type-base);
  line-height: 1.55;
}
.atlas-workspace .composer textarea {
  min-height: 120px;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: var(--type-lg);
  line-height: 1.5;
}
.atlas-workspace .composer-controls {
  justify-content: space-between;
  gap: var(--space-3);
}
.atlas-workspace .send-command,
.atlas-workspace .voice-command,
.atlas-workspace .voice-cancel,
.atlas-workspace .read-command {
  min-height: 42px;
  padding: 10px 14px;
  font-size: var(--type-body);
}
.atlas-workspace .send-command {
  margin-left: auto;
  border: 1px solid var(--cyan);
  border-radius: var(--radius-md);
  background: rgba(23, 143, 185, 0.22);
  color: #e8fdff;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.atlas-workspace .voice-state {
  font-size: var(--type-small);
  letter-spacing: 0.03em;
}
.atlas-workspace .command-result {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
}
.atlas-workspace .command-result strong {
  display: block;
  font-size: var(--type-xl);
  letter-spacing: -0.01em;
}
.result-state {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: 12px;
}
.command-diagnostics {
  margin-top: 14px;
  border-top: 1px solid rgba(116, 149, 179, 0.18);
  color: var(--muted);
}
.command-diagnostics summary {
  padding: 12px 0;
  cursor: pointer;
  color: #b8ccdb;
  font-size: var(--type-body);
}
.advanced-control-content {
  display: grid;
  gap: var(--space-3);
  padding-bottom: 8px;
}
.advanced-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.atlas-workspace .telemetry-row {
  font-size: var(--type-body);
}
.atlas-workspace .telemetry-row span:first-child {
  color: #b9ccdb;
}
.atlas-workspace .badge {
  font-size: var(--type-small);
  letter-spacing: 0.04em;
}
.atlas-header:has(.atlas-workspace-bar:not([hidden])) {
  min-height: 64px;
  grid-template-columns: auto minmax(210px, 0.8fr) minmax(150px, auto) minmax(170px, auto);
  gap: var(--space-3);
}
.atlas-header:has(.atlas-workspace-bar:not([hidden])) .atlas-wordmark {
  font-size: var(--type-lg);
}
.atlas-header:has(.atlas-workspace-bar:not([hidden])) .vitals {
  justify-content: flex-start;
}
.atlas-header:has(.atlas-workspace-bar:not([hidden])) .vital {
  min-width: 125px;
  padding-right: 0;
  border-right: 0;
}
.atlas-app[data-workspace='atlas'] .ask-ceo,
.atlas-app[data-workspace='atlas'] .role-switch {
  display: none;
}
.atlas-app[data-workspace='atlas'] .nav-link {
  font-size: var(--type-body);
  letter-spacing: 0.02em;
  text-transform: none;
}
.atlas-app[data-workspace='atlas'] .nav-label,
.atlas-app[data-workspace='atlas'] .nav-secondary-label {
  letter-spacing: 0.08em;
}
.atlas-workspace .task-diagnostics {
  margin-top: 18px;
}
@media (max-width: 900px) {
  .atlas-workspace .command-room {
    grid-template-columns: 1fr;
  }
  .atlas-workspace .command-right {
    display: block;
  }
  .atlas-header:has(.atlas-workspace-bar:not([hidden])) {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}
@media (max-width: 760px) {
  .atlas-workspace .command-right {
    display: block;
    margin-top: 14px;
    min-height: 0;
  }
  .atlas-workspace .command-center,
  .atlas-workspace .command-right {
    padding: 16px;
  }
  .atlas-workspace .conversation {
    min-height: 0;
  }
  .atlas-workspace .message {
    padding: 14px;
    font-size: var(--type-lg);
  }
  .atlas-workspace .owner-message {
    margin-left: 0;
  }
  .atlas-workspace .composer-controls,
  .atlas-workspace .voice-controls {
    align-items: stretch;
  }
  .atlas-workspace .voice-controls {
    flex-wrap: wrap;
  }
  .atlas-workspace .voice-state {
    flex-basis: 100%;
  }
  .atlas-workspace .send-command,
  .atlas-workspace .voice-command,
  .atlas-workspace .voice-cancel {
    /*
     * `flex: 1` is `1 1 0%` - a zero basis, so these shared the row equally regardless of how
     * wide their labels are. At 375px that gave "CANCEL VOICE" 73px for a 115px label and it
     * was silently clipped, the same failure as the desktop row.
     *
     * `auto` keeps the intent - the buttons still grow to fill - while the basis is the text,
     * so a label wraps to the next line instead of being cut in half.
     */
    flex: 1 1 auto;
    margin-left: 0;
  }
  .atlas-header:has(.atlas-workspace-bar:not([hidden])) {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 12px;
  }
  .atlas-header:has(.atlas-workspace-bar:not([hidden])) .atlas-workspace-bar {
    grid-column: 1 / -1;
    margin-top: 0;
  }
}

/* ------------------------------- Proposals -------------------------------- */
/*
 * Above the board, because "what should I do" is the question an Owner arrived with and the
 * board only answers "what is happening".
 */
.executive-board-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.proposals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.proposals-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.proposals-head h2 {
  margin: 0;
  font-size: var(--type-lg);
}
.proposal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line);
  background: var(--surface-card);
}
/* Consequence, not decoration: the edge marks what stops other work. */
.proposal.blocking {
  border-left-color: var(--gold);
}
.proposal-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.proposal-office {
  font-family: var(--mono, monospace);
  font-size: var(--type-small);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.proposal-observation {
  margin: 0;
  font-size: var(--type-base);
}
.proposal-text {
  margin: 0;
  font-size: var(--type-base);
  font-weight: 600;
}
.proposal-declined,
.proposal-requires {
  margin: 0;
  font-size: var(--type-body);
  color: var(--muted);
}

/* ----------------------------- Connected systems ---------------------------- */
/*
 * One surface per sub-agency. Categories stack; systems inside a category sit in a grid that
 * collapses to a single column on a narrow screen, because this page is the one an Owner is
 * most likely to open from a phone.
 */
.connected-systems {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.connected-system-category h2 {
  margin: 0 0 10px;
  font-size: var(--type-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.connected-system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.connected-system {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface-card);
}
/* A bound system is marked by an edge, never by colour alone: the badge says which it is. */
.connected-system.bound {
  border-left: 2px solid var(--cyan);
}
.connected-system-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.connected-system-head h3 {
  margin: 0;
  font-size: var(--type-lg);
}
.connected-system-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
}
.connected-system-launch {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-size: var(--type-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.connected-system-launch:hover {
  border-color: var(--cyan);
}

/* An open panel needs the room's full width, so it leaves the grid. */
.connected-system.framed {
  grid-column: 1 / -1;
}
.connected-system-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.connected-system-frame {
  width: 100%;
  height: min(70vh, 720px);
  border: 1px solid var(--line);
  background: var(--ink);
}
.connected-system-panel a {
  color: var(--cyan);
}

.funnel-grant-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.funnel-grantee {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  font-size: var(--type-body);
}
.connected-system-launch.inline {
  margin-left: 8px;
  padding: 4px 10px;
}
.voice-conversation {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--muted);
  font: inherit;
  font-size: var(--type-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.voice-conversation.active {
  border-color: var(--cyan);
  color: var(--text);
}

/* ---------------------------- Revenue Portfolio --------------------------- */
/*
 * Grouped by phase, because "what is running" and "what is only an idea" are different
 * questions and an Owner asks the first one first.
 */
.venture {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line);
  background: var(--surface-card);
}
/* A venture somebody has actually ruled on reads differently from a raw candidate. */
.venture.judged {
  border-left-color: var(--cyan);
}
.venture-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.venture-head h3 {
  margin: 0;
  font-size: var(--type-lg);
}
.venture-summary {
  margin: 0;
  font-size: var(--type-body);
  color: var(--muted);
}
.venture-verdict {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.venture-rationale {
  margin: 0;
  font-size: var(--type-body);
}
.venture-attribution,
.venture-unjudged {
  margin: 0;
  font-size: var(--type-body);
  color: var(--muted);
}

/* ------------------------------ Focus, globally ----------------------------- */
/*
 * Every interactive element gets the same visible ring. This is the only thing standing
 * between a keyboard user and a console they cannot navigate, and it was previously defined
 * for exactly one link. `:focus-visible` keeps it off mouse clicks.
 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* The main region takes focus on every route change; that is a scroll target, not a control. */
.atlas-main:focus-visible {
  outline: none;
}

/* ------------------------------ Motion ----------------------------- */
/*
 * Interactive surfaces acknowledge the pointer. Kept short and on one curve so the console
 * feels responsive rather than animated.
 */
:where(.nav-link, .button, .badge, .venture, .connected-system, .executive-node) {
  transition:
    border-color var(--motion-base) var(--ease),
    background-color var(--motion-base) var(--ease),
    color var(--motion-fast) var(--ease);
}
/* Honour the system setting: motion is a preference, not a decoration we impose. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --------------------------- Credential register --------------------------- */
/*
 * Lives in Health & Costs because that is the room an Owner already opens when something is
 * about to go wrong.
 */
.credential-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.credential-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}
.credential-row:first-child {
  border-top: none;
  padding-top: 0;
}
.credential-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.credential-name {
  font-size: var(--type-body);
  font-weight: 700;
  /*
   * Setting names are long unbroken identifiers - ENGINEERING_MATERIAL_GITHUB_APP_PRIVATE_KEY
   * is 43 characters with nowhere to wrap - so the default `normal` never breaks them and they
   * run straight out of the card. Measured at 326px inside a 214px column before this.
   */
  overflow-wrap: anywhere;
  min-width: 0;
}
.credential-purpose {
  margin: 0;
  font-size: var(--type-body);
  color: var(--muted);
}
.credential-meta {
  margin: 0;
  font-size: var(--type-small);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ------------------- Workspace bar: control before commentary ------------------- */
/*
 * The status line restates what the business switcher already shows. It shrinks first and far
 * faster than any control beside it, and never wraps: prose confirming a choice yields to the
 * controls that make one.
 */
.agency-context-status {
  min-width: 0;
  flex: 0 200 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------ Voice controls: never clip a label ------------------------ */
/*
 * Four controls in a `nowrap` row needing 365px inside 328px. Because the buttons are
 * `white-space: nowrap` with `min-width: 0`, they did not wrap and did not overflow visibly -
 * they were silently truncated: "ASK CEO" rendered into 54px of a 69px label, "CANCEL VOICE"
 * into 71px of 108px.
 *
 * A half-drawn label on the control that starts a voice command is worse than a taller row.
 * The row wraps; the buttons keep the width their text needs.
 */
.voice-controls {
  flex-wrap: wrap;
}
.voice-command,
.voice-cancel,
.voice-conversation {
  flex: 0 0 auto;
}

/* ------------------------- Waiting, not missing ------------------------- */
/*
 * `.unavailable` means the server has no such thing. A read still in flight is a different
 * fact, and rendering it in the same muted grey told the Owner a conversation did not exist
 * when it simply had not arrived.
 *
 * Distinguished by motion rather than colour: colour in this console already carries meaning
 * (cyan decided, gold attention, danger refused) and a fourth state competing with those would
 * read as a judgement. A slow pulse reads as "working" and stops being noticeable once it is.
 */
.pending {
  font-size: var(--type-micro);
  color: var(--cyan);
  letter-spacing: 0.04em;
  animation: pending-pulse 1.6s ease-in-out infinite;
}
@keyframes pending-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

/* ==========================================================================================
 * ATLAS OS - the product shell.
 *
 * Everything below is presentation over rooms that already exist and are wired; no room's
 * markup or data was changed to produce it. It is scoped to the ATLAS workspace so the legacy
 * console keeps its own look until it is retired.
 *
 * The language, from the Owner's references: a dark glass surface with one cyan accent, a
 * violet second, gold reserved for memory; a grouped left rail with the Council living at its
 * foot; status that is always visible in the top bar; and a Jarvis mode for demos only.
 * ========================================================================================== */

.atlas-app[data-workspace='atlas'] {
  --ink: #05080e;
  --surface: #0a111c;
  --surface2: #0e1726;
  --line: rgba(120, 200, 255, 0.12);
  --line-strong: rgba(120, 200, 255, 0.22);
  --text: #eaf4ff;
  --muted: #8ba1b8;
  --cyan: #3fd8ff;
  --violet: #8b7bff;
  --gold: #f5c451;
  --ok: #3ddc97;
  --warn: #ffb547;
  --stop: #ff6b6b;
  --idle: #5f7187;
  --glow: 0 0 24px rgba(63, 216, 255, 0.22);
  --surface-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  --rail-width: 248px;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  background: radial-gradient(1200px 600px at 78% -10%, rgba(63, 216, 255, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(139, 123, 255, 0.06), transparent 60%),
    var(--ink);
}
body:has(.atlas-app[data-workspace='atlas']) {
  background: #05080e;
}

/* --- Frame ------------------------------------------------------------------------------ */
.atlas-app[data-workspace='atlas'] .atlas-nav {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 12px;
  gap: 2px;
  background: linear-gradient(180deg, rgba(10, 17, 28, 0.96), rgba(5, 8, 14, 0.96));
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.atlas-app[data-workspace='atlas'] .atlas-header {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 64px;
  padding: 10px 24px;
  background: rgba(5, 8, 14, 0.78);
  border-bottom: 1px solid var(--line);
}
.atlas-app[data-workspace='atlas'] .atlas-wordmark {
  display: none;
}
.atlas-app[data-workspace='atlas'] .atlas-main {
  grid-column: 2;
  grid-row: 2;
  padding: 24px 28px 110px;
}

/* --- Brand -------------------------------------------------------------------------------- */
.os-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.os-brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  box-shadow:
    var(--glow),
    inset 0 0 12px rgba(63, 216, 255, 0.35);
  flex: none;
}
.os-brand-mark::before,
.os-brand-mark::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.os-brand-mark::before {
  inset: 6px;
  border: 1px dashed rgba(63, 216, 255, 0.55);
  animation: os-spin 18s linear infinite;
}
.os-brand-mark::after {
  inset: 12px;
  background: radial-gradient(circle, #d8f7ff, var(--cyan) 55%, transparent 70%);
}
.os-brand-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.34em;
  font-weight: 800;
}
.os-brand-text small {
  display: block;
  font-size: var(--type-nano);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-top: 3px;
}

/* --- Rail groups ---------------------------------------------------------------------------- */
.nav-group {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}
.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 10px;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font: inherit;
  font-size: var(--type-nano);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-group-toggle:hover {
  color: var(--text);
}
.nav-group-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate var(--motion-base) var(--ease);
}
.nav-group-toggle[aria-expanded='false'] .nav-group-chevron {
  rotate: -45deg;
  translate: -2px 0;
}
.nav-group-items {
  display: grid;
  gap: 2px;
}
.atlas-app[data-workspace='atlas'] .nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #b3c6da;
  font-size: var(--type-body);
  font-weight: 550;
  letter-spacing: 0.01em;
  text-transform: none;
  transition:
    background var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease);
}
.atlas-app[data-workspace='atlas'] .nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: none;
}
.atlas-app[data-workspace='atlas'] .nav-link.active {
  background: linear-gradient(90deg, rgba(63, 216, 255, 0.16), rgba(63, 216, 255, 0.02));
  color: #f2fbff;
  box-shadow: inset 2px 0 0 var(--cyan);
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.nav-link.active .nav-icon {
  color: var(--cyan);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(63, 216, 255, 0.55));
}

/* --- The Council, at the foot of the rail ------------------------------------------------- */
.os-roster {
  margin: 14px 0 6px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 2px;
}
.os-roster-title {
  margin: 0 0 6px;
  font-size: var(--type-nano);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.os-roster-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 4px;
  border-radius: 6px;
  color: #c3d3e4;
  text-decoration: none;
  font-size: var(--type-small);
}
.os-roster-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.os-roster-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--idle, #5f7187);
}
.os-dot.ok,
.os-status.ok .os-dot {
  background: var(--ok, #3ddc97);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.7);
}
.os-dot.warn,
.os-status.warn .os-dot {
  background: var(--warn, #ffb547);
  box-shadow: 0 0 8px rgba(255, 181, 71, 0.6);
}
.os-dot.stop {
  background: var(--stop, #ff6b6b);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.6);
}
/* The role preview is a development control; it never belongs on the customer surface. */
.atlas-app[data-workspace='atlas'] .role-switch {
  display: none;
}

/* --- Top bar -------------------------------------------------------------------------------- */
.atlas-app[data-workspace='atlas'] .vitals {
  gap: 10px;
  overflow: visible;
}
.os-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--type-small);
  font-weight: 600;
  white-space: nowrap;
}
.os-status.ok {
  border-color: rgba(61, 220, 151, 0.35);
  color: #c9f7e3;
}
.os-status.warn {
  border-color: rgba(255, 181, 71, 0.4);
  color: #ffe1b3;
}
.os-status.ok .os-dot {
  animation: os-pulse 2.4s ease-in-out infinite;
}
.os-clock {
  font-variant-numeric: tabular-nums;
  font-size: var(--type-body);
  color: var(--muted);
  padding: 0 4px;
}
.atlas-app[data-workspace='atlas'] .atlas-workspace-bar {
  gap: 10px;
}
.atlas-app[data-workspace='atlas'] .agency-context-status:empty {
  display: none;
}

/* --- Rooms: one glass surface ---------------------------------------------------------------- */
.atlas-app[data-workspace='atlas'] .room,
.atlas-app[data-workspace='atlas'] .command-left,
.atlas-app[data-workspace='atlas'] .command-right,
.atlas-app[data-workspace='atlas'] .command-center {
  border-radius: 18px;
  border-color: var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}
.atlas-app[data-workspace='atlas'] .room {
  padding: 24px 26px;
}
.atlas-app[data-workspace='atlas'] .room h1 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.atlas-app[data-workspace='atlas'] .eyebrow {
  font-size: var(--type-nano);
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
}
.atlas-app[data-workspace='atlas'] .badge {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  padding: 4px 9px;
  font-weight: 650;
}
.atlas-app[data-workspace='atlas'] .badge.cyan {
  border-color: rgba(63, 216, 255, 0.45);
  background: rgba(63, 216, 255, 0.08);
}
.atlas-app[data-workspace='atlas'] .badge.gold {
  border-color: rgba(245, 196, 81, 0.5);
  background: rgba(245, 196, 81, 0.08);
}

/* --- The Council as an org chart (Executive Board) ------------------------------------------ */
.atlas-app[data-workspace='atlas'] .owner-node {
  justify-self: center;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 196, 81, 0.5);
  color: var(--gold);
  font-size: var(--type-nano);
  font-weight: 800;
  letter-spacing: 0.24em;
  background: rgba(245, 196, 81, 0.06);
}
.atlas-app[data-workspace='atlas'] .executive-node {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  transition:
    border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-fast) var(--ease),
    translate var(--motion-fast) var(--ease);
}
.atlas-app[data-workspace='atlas'] .executive-node:hover {
  border-color: rgba(63, 216, 255, 0.45);
  box-shadow: var(--glow);
  translate: 0 -1px;
}
.atlas-app[data-workspace='atlas'] .executive-node.ceo {
  border-color: rgba(139, 123, 255, 0.55);
  background: linear-gradient(180deg, rgba(139, 123, 255, 0.14), rgba(139, 123, 255, 0.03));
  box-shadow: 0 0 34px rgba(139, 123, 255, 0.18);
}
.atlas-app[data-workspace='atlas'] .map-line {
  background: linear-gradient(90deg, transparent, rgba(63, 216, 255, 0.5), transparent);
}
.atlas-app[data-workspace='atlas'] .map-line.vertical {
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.6), rgba(139, 123, 255, 0.5));
}

/* --- David, from every room ------------------------------------------------------------------- */
/*
 * On David / Home the composer is the room, so the dock would only duplicate it. Everywhere
 * else it is how the Owner reaches David without leaving what they are looking at.
 */
.atlas-app[data-workspace='atlas']:not([data-room='atlas']) .ask-ceo {
  display: flex;
}
.atlas-app[data-workspace='atlas'] .ask-ceo {
  align-items: center;
  gap: 12px;
  left: auto;
  right: 28px;
  bottom: 24px;
  translate: none;
  padding: 10px 20px 10px 10px;
  border-color: rgba(63, 216, 255, 0.5);
  background: rgba(8, 16, 28, 0.92);
  box-shadow:
    0 0 0 1px rgba(63, 216, 255, 0.08),
    0 18px 40px rgba(0, 0, 0, 0.45),
    var(--glow);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.ask-ring {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  box-shadow: inset 0 0 10px rgba(63, 216, 255, 0.4);
  flex: none;
}
.ask-ring::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #e6fbff, var(--cyan) 60%, transparent 72%);
  animation: os-breathe 2.8s ease-in-out infinite;
}
.ask-text {
  display: grid;
  text-align: left;
}

/* --- Jarvis mode ------------------------------------------------------------------------------ */
html.jarvis-open {
  overflow: hidden;
}
.jarvis {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr minmax(220px, 300px);
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 28px;
  color: #eaf4ff;
  background: radial-gradient(60% 55% at 50% 50%, rgba(20, 60, 110, 0.55), transparent 70%),
    radial-gradient(40% 40% at 50% 50%, rgba(63, 216, 255, 0.1), transparent 70%), #02050b;
  animation: os-fade-in 320ms ease-out;
}
.jarvis-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.jarvis-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(52vmin, 520px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
}
.jarvis-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(63, 216, 255, 0.55);
}
.jarvis-ring.r1 {
  inset: 0;
  border-style: dashed;
  border-color: rgba(63, 216, 255, 0.35);
  animation: os-spin 60s linear infinite;
}
.jarvis-ring.r2 {
  inset: 12%;
  border-width: 2px;
  border-top-color: transparent;
  border-bottom-color: rgba(139, 123, 255, 0.6);
  animation: os-spin 24s linear infinite reverse;
}
.jarvis-ring.r3 {
  inset: 26%;
  border-color: rgba(63, 216, 255, 0.7);
  box-shadow:
    0 0 40px rgba(63, 216, 255, 0.35),
    inset 0 0 40px rgba(63, 216, 255, 0.25);
  animation: os-spin 40s linear infinite;
}
.jarvis-heart {
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #ffffff,
    #7fe9ff 35%,
    rgba(63, 216, 255, 0.2) 70%,
    transparent
  );
  box-shadow: 0 0 80px rgba(63, 216, 255, 0.6);
  animation: os-breathe 3.6s ease-in-out infinite;
}
.jarvis-title {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.jarvis-title strong {
  font-size: 18px;
  letter-spacing: 0.5em;
  color: #3fd8ff;
  text-shadow: 0 0 14px rgba(63, 216, 255, 0.6);
}
.jarvis-title span {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8ba1b8;
}
.jarvis-panels {
  position: relative;
  grid-row: 2;
  display: grid;
  align-content: center;
  gap: 12px;
}
.jarvis-left {
  grid-column: 1;
}
.jarvis-right {
  grid-column: 3;
}
.jarvis-panel {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(120, 200, 255, 0.2);
  background: linear-gradient(180deg, rgba(63, 216, 255, 0.08), rgba(63, 216, 255, 0.015));
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.jarvis-panel-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8ba1b8;
  margin-bottom: 6px;
}
.jarvis-panel strong {
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(63, 216, 255, 0.35);
}
.jarvis-agent {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  border-top: 1px solid rgba(120, 200, 255, 0.08);
}
.jarvis-agent-status {
  color: #8ba1b8;
  font-size: 11px;
}
.jarvis-empty {
  margin: 0;
  color: #8ba1b8;
  font-size: 13px;
}
.jarvis-caption {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 3;
  justify-self: center;
  margin: 0;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.18);
  background: rgba(5, 12, 22, 0.7);
  font-size: 15px;
  color: #d6ecff;
}
.jarvis-exit {
  position: absolute;
  top: 24px;
  right: 28px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.3);
  background: rgba(5, 12, 22, 0.7);
  color: #d6ecff;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
}
.jarvis-exit:focus-visible {
  outline: 2px solid #3fd8ff;
  outline-offset: 3px;
}

@keyframes os-spin {
  to {
    rotate: 360deg;
  }
}
@keyframes os-pulse {
  50% {
    opacity: 0.45;
  }
}
@keyframes os-breathe {
  50% {
    scale: 0.82;
    opacity: 0.8;
  }
}
@keyframes os-fade-in {
  from {
    opacity: 0;
  }
}

/* --- Smaller screens ---------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .atlas-app[data-workspace='atlas'] {
    --rail-width: 212px;
  }
  .atlas-app[data-workspace='atlas'] .atlas-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .atlas-app[data-workspace='atlas'] .atlas-workspace-bar {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  /* The room tabs come first on a phone, then the agency and status bar. */
  .atlas-app[data-workspace='atlas'] {
    display: flex;
    flex-direction: column;
  }
  .atlas-app[data-workspace='atlas'] .atlas-nav {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .atlas-app[data-workspace='atlas'] .os-brand {
    padding: 0 8px 0 0;
    margin: 0;
    border: 0;
  }
  .atlas-app[data-workspace='atlas'] .os-brand-text small,
  .atlas-app[data-workspace='atlas'] .nav-group-toggle,
  .atlas-app[data-workspace='atlas'] .os-roster,
  .atlas-app[data-workspace='atlas'] .nav-spacer {
    display: none;
  }
  .atlas-app[data-workspace='atlas'] .nav-group,
  .atlas-app[data-workspace='atlas'] .nav-group-items {
    display: flex;
    margin: 0;
    gap: 4px;
  }
  .atlas-app[data-workspace='atlas'] .nav-group-items[hidden] {
    display: flex !important;
  }
  .atlas-app[data-workspace='atlas'] .atlas-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    position: static;
  }
  .atlas-app[data-workspace='atlas'] .atlas-workspace-bar {
    flex-basis: 100%;
  }
  .atlas-app[data-workspace='atlas'] .atlas-main {
    padding: 14px 12px 110px;
  }
  .atlas-app[data-workspace='atlas'] .room {
    padding: 16px;
  }
  .atlas-app[data-workspace='atlas'] .ask-ceo {
    right: 12px;
    bottom: 12px;
  }
  .jarvis {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    overflow-y: auto;
  }
  .jarvis-left,
  .jarvis-right {
    grid-column: 1;
    grid-row: auto;
  }
  .jarvis-caption {
    grid-row: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .os-brand-mark::before,
  .os-status.ok .os-dot,
  .ask-ring::after,
  .jarvis-ring,
  .jarvis-heart {
    animation: none;
  }
}

/* --- Phase 2: sub-agencies and engine rooms -------------------------------------------------- */
.os-studio {
  display: grid;
  gap: 20px;
}
.os-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-section-title {
  margin: 4px 0 0;
  font-size: var(--type-nano);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.os-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.os-metric {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.os-metric-label {
  font-size: var(--type-nano);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.os-metric strong {
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.os-metric small {
  color: var(--muted);
  font-size: var(--type-small);
}

/* The content pipeline: eight stages, left to right, the way work actually moves. */
.os-pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}
.os-stage {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.os-stage::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  width: 6px;
  height: 1px;
  background: var(--line-strong);
}
.os-stage:last-child::after {
  display: none;
}
.os-stage strong {
  font-size: 24px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.os-stage span {
  font-size: var(--type-small);
  color: var(--muted);
}
.os-stage.attention {
  border-color: rgba(63, 216, 255, 0.55);
  background: rgba(63, 216, 255, 0.08);
  box-shadow: var(--glow);
}
.os-stage.held {
  border-color: rgba(255, 181, 71, 0.5);
  background: rgba(255, 181, 71, 0.07);
}

.os-holds ul,
.os-provider-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.os-holds li {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 181, 71, 0.3);
  background: rgba(255, 181, 71, 0.05);
  color: #ffe1b3;
  font-size: var(--type-body);
}
.os-provider-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: var(--type-body);
}
.os-provider-list small {
  color: var(--muted);
}

.os-launches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.os-launch {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.os-launch h3 {
  margin: 0;
  font-size: var(--type-lg);
  font-weight: 650;
}
.os-launch p {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.5;
}
.os-launch.unavailable {
  opacity: 0.75;
}
.os-launch-button {
  justify-self: start;
  margin-top: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 216, 255, 0.45);
  background: rgba(63, 216, 255, 0.08);
  color: var(--cyan);
  font: inherit;
  font-size: var(--type-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow var(--motion-base) var(--ease);
}
.os-launch-button:hover {
  box-shadow: var(--glow);
}
.os-launch-missing {
  margin-top: 6px;
  font-size: var(--type-small);
  color: var(--muted);
}

.os-ask-david {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(139, 123, 255, 0.5);
  background: rgba(139, 123, 255, 0.1);
  color: #d9d3ff;
  font: inherit;
  font-size: var(--type-body);
  font-weight: 600;
  cursor: pointer;
}
.os-ask-david:hover {
  box-shadow: 0 0 24px rgba(139, 123, 255, 0.3);
}
.ask-ring.small {
  width: 24px;
  height: 24px;
  border-color: var(--violet, #8b7bff);
}
.ask-ring.small::after {
  inset: 6px;
  background: radial-gradient(circle, #f1eeff, var(--violet, #8b7bff) 60%, transparent 72%);
}

/* Sub-agencies: the one in context, then every other business ATLAS runs. */
.os-agencies {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}
.os-agency-profile,
.os-agency-list {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.os-agency-list h2 {
  margin: 0;
  font-size: var(--type-lg);
}
.os-agency-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.os-agency-head h2 {
  margin: 2px 0;
  font-size: 22px;
}
.os-agency-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(63, 216, 255, 0.3), rgba(139, 123, 255, 0.3));
  border: 1px solid rgba(63, 216, 255, 0.4);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex: none;
}
.os-agency-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 16px;
}
.os-agency-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.os-agency-card h3 {
  margin: 0;
  font-size: var(--type-base);
}
.os-agency-card .os-launch-button {
  margin: 0;
}
.os-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: var(--type-small);
  font-weight: 600;
  text-decoration: none;
}
.os-chip:hover {
  border-color: rgba(63, 216, 255, 0.5);
  color: var(--cyan);
}

@media (max-width: 1100px) {
  .os-pipeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .os-stage::after {
    display: none;
  }
  .os-agencies {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .os-pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- The sub-agency dashboard ------------------------------------------------------------------ */
.os-dashboard {
  display: grid;
  gap: 14px;
}
.os-dashboard-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 181, 71, 0.4);
  background: rgba(255, 181, 71, 0.06);
  color: #ffe1b3;
  font-size: var(--type-body);
}
.os-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.os-widget {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-width: 0;
}
.os-widget.wide {
  grid-column: 1 / -1;
}
.os-widget-grid.editing .os-widget {
  border-style: dashed;
  border-color: rgba(63, 216, 255, 0.35);
}
.os-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.os-widget-head h3 {
  margin: 0;
  font-size: var(--type-nano);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.os-widget-open {
  font-size: var(--type-small);
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
}
.os-widget-tools {
  display: flex;
  gap: 4px;
}
.os-widget-tools button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.os-widget-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}
.os-widget-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.os-widget-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--type-body);
  color: var(--text);
  min-width: 0;
}
.os-widget-list li span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-widget-list.council li {
  display: grid;
  grid-template-columns: auto 1fr auto;
}
.os-widget-list.council small {
  color: var(--muted);
}
.os-pipeline.compact {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.os-pipeline.compact .os-stage {
  padding: 10px 8px;
}
.os-pipeline.compact .os-stage strong {
  font-size: 20px;
}
.os-add-widget {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: var(--type-small);
}
@media (max-width: 1100px) {
  .os-widget-grid {
    grid-template-columns: 1fr;
  }
  .os-pipeline.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Folded-away controls: present and working, but not the first thing a room says. */
.os-advanced {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
}
.os-advanced > summary {
  cursor: pointer;
  padding: 12px 16px;
  color: var(--muted);
  font-size: var(--type-small);
  font-weight: 600;
}
.os-advanced[open] > summary {
  border-bottom: 1px solid var(--line);
}
.os-advanced > :not(summary) {
  margin: 14px 16px 16px;
}

/* --- Owner-first rooms: needs you, the council, folded details -------------------------------- */
.needs-you,
.council {
  display: grid;
  gap: var(--space-3);
}
.needs-you-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.needs-you-title h2 {
  margin: 0;
  font-size: var(--type-lg);
  letter-spacing: 0.02em;
  text-transform: none;
}
.needs-you-item {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  background: var(--surface-card);
}
.needs-you-item.tone-bad {
  border-left-color: var(--danger);
}
.needs-you-item.tone-warn {
  border-left-color: var(--gold);
}
.needs-you-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.needs-you-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--type-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.needs-you-chip.tone-bad {
  color: var(--danger);
  border-color: rgba(255, 123, 146, 0.45);
  background: rgba(255, 123, 146, 0.08);
}
.needs-you-chip.tone-warn {
  color: var(--gold);
  border-color: rgba(233, 184, 91, 0.45);
  background: rgba(233, 184, 91, 0.08);
}
.needs-you-chip.tone-good {
  color: #6ee7a8;
  border-color: rgba(110, 231, 168, 0.4);
  background: rgba(110, 231, 168, 0.07);
}
.needs-you-office {
  color: var(--muted);
  font-size: var(--type-small);
}
.needs-you-text {
  margin: 0;
  font-size: var(--type-base);
  line-height: 1.45;
  color: var(--text);
}
.needs-you-foot {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.needs-you-action {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  background: rgba(49, 215, 255, 0.12);
  border: 1px solid rgba(49, 215, 255, 0.45);
  color: var(--cyan);
  font-size: var(--type-body);
  font-weight: 600;
  text-decoration: none;
}
.needs-you-action:hover {
  background: rgba(49, 215, 255, 0.2);
}
.owner-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
}
.owner-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 7px 12px;
  cursor: pointer;
  list-style: none;
  font-size: var(--type-body);
  color: var(--muted);
}
.owner-details > summary::-webkit-details-marker {
  display: none;
}
.owner-details > summary::before {
  content: '▸';
  margin-right: 6px;
  transition: transform var(--motion-fast) var(--ease);
}
.owner-details[open] > summary::before {
  transform: rotate(90deg);
}
.owner-details-title {
  flex: 1;
  color: var(--text);
}
.owner-details-summary {
  font-size: var(--type-small);
}
.owner-details.tone-bad .owner-details-summary {
  color: var(--danger);
}
.owner-details.tone-warn .owner-details-summary {
  color: var(--gold);
}
.owner-details-body {
  display: grid;
  gap: var(--space-2);
  padding: 4px 12px 12px;
  font-size: var(--type-body);
  color: var(--muted);
}
.needs-you-foot .owner-details {
  flex: 1;
  min-width: 180px;
}
.council-ceo {
  display: grid;
}
.council-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}
.council-card {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.council-card.ceo {
  border-color: rgba(49, 215, 255, 0.4);
}
.council-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.council-head strong {
  font-size: var(--type-base);
}
.council-line {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.4;
}
.council-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 0;
}
.council-facts dt {
  color: var(--muted);
}
.council-facts dd {
  margin: 0;
  color: var(--text);
}
.needs-you-what {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.45;
}
.needs-you-item .needs-you-text {
  font-weight: 600;
}
/* --- David's objectives: switch on, pause ------------------------------------------------------ */
.david-objectives {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.objective-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.objective-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.objective-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.objective-head h3 {
  margin: 0;
  font-size: var(--type-body);
  line-height: 1.35;
}
.objective-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.objective-actions:empty {
  display: none;
}
.home-today {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.home-today .david-objectives {
  margin-bottom: 0;
}
.task-card {
  display: grid;
  gap: var(--space-2);
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
/* A current read says nothing worth a banner; a stale one does. */
.autonomy-state.current {
  display: none;
}
.health-stack {
  display: grid;
  gap: var(--space-3);
}
/* Ask David to act: a real form, not raw inputs. */
.business-ops {
  display: grid;
  gap: var(--space-3);
}
.business-ops h2 {
  margin: 0;
  font-size: var(--type-lg);
  text-transform: none;
}
.business-ops-link {
  color: var(--cyan);
  font-size: var(--type-body);
}
.business-ops select,
.business-ops input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(8, 13, 22, 0.8);
  color: var(--text);
  font: inherit;
  font-size: var(--type-body);
}
.business-ops-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
}
.business-ops-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: var(--type-small);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.business-ops > button {
  justify-self: start;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(49, 215, 255, 0.45);
  background: rgba(49, 215, 255, 0.12);
  color: var(--cyan);
  font-weight: 600;
  cursor: pointer;
}
.business-ops > button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.business-ops-preview:empty {
  display: none;
}
.business-ops-preview {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: var(--type-body);
}
.objective-actions button {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(49, 215, 255, 0.45);
  background: rgba(49, 215, 255, 0.12);
  color: var(--cyan);
  font: inherit;
  font-size: var(--type-body);
  font-weight: 600;
  cursor: pointer;
}
.objective-actions button.primary {
  background: var(--cyan);
  color: var(--ink);
  border-color: var(--cyan);
}
.objective-actions button:disabled {
  opacity: 0.5;
  cursor: progress;
}

/* --- Jarvis voice: tap, talk, hear David ------------------------------------------------------- */
.jarvis-voice {
  position: absolute;
  left: 50%;
  bottom: 84px;
  translate: -50% 0;
  z-index: 2;
  width: min(640px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.jarvis-transcript {
  order: -1;
  width: 100%;
  max-height: 26vh;
  overflow-y: auto;
  display: grid;
  gap: 6px;
  text-align: left;
}
.jarvis-transcript:empty {
  display: none;
}
.jarvis-turn {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(5, 12, 22, 0.72);
  border: 1px solid rgba(120, 200, 255, 0.16);
  color: #d6ecff;
  font-size: 14px;
  line-height: 1.45;
}
.jarvis-turn strong {
  margin-right: 8px;
  color: #3fd8ff;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.jarvis-turn.you strong {
  color: #f5c451;
}
.jarvis-talk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid rgba(63, 216, 255, 0.6);
  background: rgba(63, 216, 255, 0.14);
  color: #eaf4ff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(63, 216, 255, 0.25);
}
.jarvis-talk:focus-visible {
  outline: 2px solid #3fd8ff;
  outline-offset: 3px;
}
.jarvis-talk:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.jarvis-talk-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3fd8ff;
  box-shadow: 0 0 12px #3fd8ff;
}
.jarvis-talk.active {
  background: rgba(255, 123, 146, 0.16);
  border-color: rgba(255, 123, 146, 0.6);
}
.jarvis-talk.active .jarvis-talk-icon {
  border-radius: 3px;
  background: #ff7b92;
  box-shadow: 0 0 12px #ff7b92;
}
.jarvis-voice-status {
  margin: 0;
  color: #d6ecff;
  font-size: 15px;
}
.jarvis-voice-heard {
  margin: 0;
  min-height: 1.4em;
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
}
.jarvis-voice-actions {
  display: flex;
  gap: 10px;
}
.jarvis-voice-actions[hidden] {
  display: none;
}
.jarvis-voice-actions button {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, 0.35);
  background: rgba(5, 12, 22, 0.75);
  color: #d6ecff;
  font: inherit;
  cursor: pointer;
}
.jarvis-voice-actions .jarvis-voice-send {
  border-color: #3fd8ff;
  color: #3fd8ff;
}
/* The core answers the conversation: it listens, thinks and speaks visibly. */
.jarvis[data-voice='listening'] .jarvis-heart {
  animation-duration: 1.1s;
  box-shadow: 0 0 120px rgba(63, 216, 255, 0.85);
}
.jarvis[data-voice='confirming'] .jarvis-heart {
  box-shadow: 0 0 110px rgba(245, 196, 81, 0.75);
}
.jarvis[data-voice='thinking'] .jarvis-ring.r2 {
  animation-duration: 3s;
}
.jarvis[data-voice='thinking'] .jarvis-ring.r1 {
  animation-duration: 12s;
}
.jarvis[data-voice='speaking'] .jarvis-heart {
  animation-duration: 0.7s;
  box-shadow: 0 0 140px rgba(139, 123, 255, 0.85);
}
.jarvis[data-voice='speaking'] .jarvis-ring.r3 {
  box-shadow:
    0 0 70px rgba(139, 123, 255, 0.55),
    inset 0 0 50px rgba(139, 123, 255, 0.35);
}
.engine-gap {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: var(--type-body);
  line-height: 1.5;
}
/* --- Security & Cameras: the Owner's Ring cameras ------------------------------------------- */
.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.camera-card {
  display: grid;
  gap: var(--space-2);
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.camera-picture {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}
.camera-picture[role='button'] {
  cursor: zoom-in;
}
.camera-picture[role='button']:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
/* One camera, large, over the room. */
.camera-view {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 8, 14, 0.82);
}
.camera-view-panel {
  display: grid;
  gap: var(--space-3);
  width: min(1100px, 100%);
  max-height: 100%;
  padding: var(--space-4, 16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.camera-view-picture {
  width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #000;
}
.camera-view-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-4);
  min-height: 0;
}
.camera-view-main {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.camera-view-stage {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 220px);
  border-radius: var(--radius-md);
  background: #000;
  overflow: hidden;
}
.camera-view-stage > * {
  width: 100%;
  height: 100%;
  max-height: none;
}
.camera-view-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-2);
  min-height: 0;
}
.camera-view-side h3 {
  margin: 0;
  font-size: var(--type-body);
}
.camera-history {
  display: grid;
  gap: var(--space-1);
  align-content: start;
  max-height: calc(100vh - 220px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.camera-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.camera-history-item:disabled {
  cursor: default;
  opacity: 0.6;
}
.camera-history-item:not(:disabled):hover {
  border-color: var(--cyan);
}
.camera-view-actions {
  display: flex;
  gap: var(--space-2);
}
@media (max-width: 820px) {
  .camera-view-body {
    grid-template-columns: 1fr;
  }
  .camera-history {
    max-height: 30vh;
  }
}
.camera-view-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.camera-view-close {
  padding: 6px 14px;
  border: 1px solid #31536d;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.camera-picture.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--type-body);
}
/* Tile size: S/M/L/XL set a minimum tile width; Auto-fit sets the columns from script. Never
 * wider than the screen, so XL on a phone is one column rather than a sideways scroll. */
.camera-grid[data-camera-grid] {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--cam-min, 260px)), 1fr));
}
.camera-card-info {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.camera-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.camera-wall-open {
  cursor: pointer;
  font: inherit;
  font-size: var(--type-body);
  font-weight: 600;
}
.camera-wall-open::before {
  content: '';
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px var(--ink);
  background: currentColor;
}
.camera-wall-open:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.camera-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.camera-seg-button {
  min-height: 32px;
  padding: 5px 11px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--type-body);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease);
}
.camera-seg-button:last-child {
  border-right: 0;
}
.camera-seg-button:hover {
  color: var(--text);
}
.camera-seg-button[aria-pressed='true'] {
  background: rgba(49, 215, 255, 0.14);
  color: var(--text);
}
.camera-seg-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}
/* Arranging: a grip, the position, and up/down arrows that work without a mouse. */
.camera-arrange {
  display: flex;
  align-items: center;
  gap: 6px;
}
.camera-grip {
  margin-right: auto;
  color: var(--muted);
  font-size: var(--type-small);
  cursor: grab;
}
.camera-move {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.camera-move:disabled {
  opacity: 0.35;
  cursor: default;
}
.camera-move:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.camera-grid[data-arranging='true'] .camera-card {
  cursor: grab;
}
.camera-card.dragging {
  opacity: 0.45;
}
.camera-card.drop-target {
  outline: 2px dashed var(--cyan);
  outline-offset: 2px;
}
/* Tight: seamless tiles, no card frames, the name a small overlay that fades. */
.camera-grid[data-spacing='tight'] {
  gap: 2px;
}
.camera-grid[data-spacing='tight'] .camera-card {
  position: relative;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
}
.camera-grid[data-spacing='tight'] .camera-picture {
  border-radius: 0;
}
.camera-grid[data-spacing='tight'] .camera-card-info {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 8px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
  animation: camera-label-fade 5s var(--ease) forwards;
}
.camera-grid[data-spacing='tight'] .camera-card-info .council-line {
  display: none;
}
.camera-grid[data-spacing='tight'] .camera-card:hover .camera-card-info,
.camera-grid[data-spacing='tight'] .camera-card:focus-within .camera-card-info,
.camera-grid[data-spacing='tight'] .camera-card[data-offline='true'] .camera-card-info,
.camera-grid[data-spacing='tight'][data-arranging='true'] .camera-card-info {
  animation: none;
  opacity: 1;
}
.camera-grid[data-spacing='tight'] .camera-arrange {
  position: absolute;
  top: 6px;
  right: 6px;
}
.camera-grid[data-spacing='tight'] .camera-grip {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
}
@keyframes camera-label-fade {
  0%,
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* --- The camera wall: every camera, full screen, edge to edge ------------------------------ */
.camwall {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  background: #000;
  color: #fff;
  outline: none;
}
.camwall::backdrop {
  background: #000;
}
.camwall:not(.show-chrome) {
  cursor: none;
}
.camwall-grid {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(var(--wall-cols, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--wall-rows, 1), minmax(0, 1fr));
  gap: 3px;
  background: #000;
}
.camwall[data-spacing='tight'] .camwall-grid {
  gap: 0;
}
.camwall-tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #05080d;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.camwall-tile:focus-visible {
  z-index: 1;
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}
.camwall-still,
.camwall-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camwall-tile:not([data-picture='true']) .camwall-still {
  visibility: hidden;
}
.camwall-video {
  opacity: 0;
  background: transparent;
  transition: opacity var(--motion-base) var(--ease);
}
.camwall-tile[data-playing='true'] .camwall-video {
  opacity: 1;
}
.camwall-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: var(--type-body);
  text-align: center;
}
.camwall-tile[data-picture='true'] .camwall-placeholder {
  display: none;
}
.camwall-tile[data-down='true'] .camwall-still {
  filter: grayscale(1) brightness(0.5);
}
.camwall-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 7px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.55);
  font-size: var(--type-small);
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease);
}
.camwall.show-chrome .camwall-label,
.camwall-tile:focus-visible .camwall-label,
.camwall-tile.is-focused .camwall-label {
  opacity: 1;
}
.camwall-dot {
  color: #ff5d6e;
  font-size: var(--type-nano);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.camwall-dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: #ff5d6e;
  vertical-align: middle;
}
/* Down or reconnecting: always shown, never faded - a blank tile would say nothing. */
.camwall-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: calc(100% - 12px);
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 123, 146, 0.6);
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.7);
  color: #ffc2cc;
  font-size: var(--type-micro);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.camwall-badge[data-tone='warn'] {
  border-color: rgba(233, 184, 91, 0.6);
  color: var(--gold);
}
.camwall-bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px 18px;
  background: linear-gradient(rgba(0, 0, 0, 0.8), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--ease);
}
.camwall.show-chrome .camwall-bar {
  opacity: 1;
  pointer-events: auto;
}
.camwall-title {
  font-size: var(--type-base);
  white-space: nowrap;
}
.camwall-note {
  flex: 1;
  min-width: 0;
  color: #c9d6e3;
  font-size: var(--type-small);
}
.camwall[data-network='offline'] .camwall-note {
  color: var(--gold);
}
.camwall-exit {
  min-height: 32px;
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font: inherit;
  font-size: var(--type-body);
  white-space: nowrap;
  cursor: pointer;
}
.camwall-exit:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
/* One camera large: the others stay live behind it, so going back is instant. */
.camwall[data-focus] .camwall-tile:not(.is-focused) {
  display: none;
}
.camwall-tile.is-focused {
  cursor: zoom-out;
}
.camwall-tile.is-focused .camwall-still,
.camwall-tile.is-focused .camwall-video {
  object-fit: contain;
}
@media (max-width: 600px) {
  .camwall-bar {
    flex-wrap: wrap;
  }
  .camwall-note {
    order: 3;
    flex-basis: 100%;
  }
}
/* A 4K wall is read from across a room: names and badges grow with the screen. */
.camwall-label {
  font-size: clamp(11px, 0.55vw, 22px);
}
.camwall-badge {
  font-size: clamp(10px, 0.5vw, 20px);
}
.camwall-dot {
  font-size: clamp(9px, 0.4vw, 16px);
}
.camwall-note {
  font-size: clamp(11px, 0.45vw, 18px);
}
.camwall-title {
  font-size: clamp(14px, 0.6vw, 24px);
}
.camwall-exit {
  font-size: clamp(13px, 0.5vw, 20px);
}
@media (prefers-reduced-motion: reduce) {
  .camera-grid[data-spacing='tight'] .camera-card-info {
    animation: none;
    opacity: 1;
  }
  .camwall-label,
  .camwall-bar,
  .camwall-video {
    transition: none;
  }
}

/* --- Command Center ---------------------------------------------------------------------- */
/* The menu can be hidden so the room (or the voice view) fills the screen. */
.atlas-app[data-workspace='atlas'].nav-hidden {
  grid-template-columns: 0 minmax(0, 1fr);
}
.atlas-app[data-workspace='atlas'].nav-hidden .atlas-nav {
  display: none;
}
.atlas-app[data-workspace='atlas'].nav-hidden .atlas-header,
.atlas-app[data-workspace='atlas'].nav-hidden .atlas-main {
  grid-column: 1 / span 2;
}
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.nav-toggle:focus-visible,
.cc-widget-head:focus-visible,
.cc-widget-full:focus-visible,
.cc-strip:focus-visible,
.chat-mode:focus-visible,
.atlas-chat-reopen:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* The room beside the conversation: one column for the room, one for David. */
.atlas-app[data-workspace='atlas'] .atlas-workspace {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}
.atlas-app[data-workspace='atlas'] .atlas-workspace > :not(.atlas-chat-shell) {
  grid-column: 1;
}
.atlas-chat-shell {
  grid-column: 2;
  grid-row: 1 / span 3;
  position: sticky;
  top: 12px;
  height: calc(100vh - 110px);
  min-height: 420px;
}
.atlas-chat-shell.dropping .atlas-chat {
  outline: 2px dashed var(--cyan);
  outline-offset: -6px;
}
.atlas-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.atlas-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.atlas-chat-head strong {
  display: block;
  font-size: var(--type-lg);
}
.atlas-chat-head small {
  color: var(--muted);
  font-size: var(--type-small);
}
.atlas-chat-modes {
  display: flex;
  gap: 6px;
}
.chat-mode,
.atlas-chat-reopen {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.chat-mode[aria-pressed='true'] {
  border-color: var(--cyan);
  color: var(--cyan);
}
.atlas-chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 0;
}
.atlas-chat .conversation {
  min-height: 0;
  padding: 0;
}
.atlas-chat .message {
  padding: 10px 12px;
  font-size: var(--type-body);
}
.atlas-chat .composer {
  margin-top: 8px;
}
.atlas-chat .composer textarea {
  min-height: 70px;
}
.atlas-chat .composer-controls,
.atlas-chat .voice-controls {
  flex-wrap: wrap;
}
.chat-drop-hint,
.chat-drop-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--type-small);
}
.atlas-chat-reopen {
  display: none;
}
/* Hidden: the round David bubble brings it back (see the end of this file). */
.atlas-app[data-chat='hidden'] .atlas-chat {
  display: none;
}
/* Expanded: the conversation takes the room for deep work. */
.atlas-app[data-chat='expanded'] .atlas-workspace {
  grid-template-columns: minmax(0, 1fr);
}
.atlas-app[data-chat='expanded'] .atlas-workspace > :not(.atlas-chat-shell) {
  display: none;
}
.atlas-app[data-chat='expanded'] .atlas-chat-shell {
  grid-column: 1;
}

/* What needs the Owner, across the top. */
.cc {
  display: grid;
  gap: 12px;
}
.cc-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text);
  font: inherit;
  text-align: left;
}
button.cc-strip {
  cursor: pointer;
}
.cc-strip span:not(.cc-widget-chevron) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.cc-strip.hot {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.1);
}
.cc-strip.hot strong {
  color: var(--stop);
}
.cc-strip.calm {
  color: var(--muted);
}
.cc-needs {
  display: grid;
  gap: 10px;
}

/* The widgets: one line each until opened. */
.cc-grid {
  display: grid;
  gap: 10px;
}
.cc-widget {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.cc-widget-bar {
  display: flex;
  align-items: stretch;
}
.cc-widget-head {
  display: grid;
  grid-template-columns: auto 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cc-widget-title {
  font-weight: 600;
}
.cc-widget-headline {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.cc-widget-chevron {
  color: var(--muted);
}
.cc-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--idle, #5f7187);
}
.cc-light.tone-good {
  background: var(--ok, #3ddc97);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.5);
}
.cc-light.tone-warn {
  background: var(--warn, #ffb547);
  box-shadow: 0 0 8px rgba(255, 181, 71, 0.5);
}
.cc-light.tone-bad {
  background: var(--stop, #ff6b6b);
}
.cc-widget-full {
  width: 44px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.cc-widget-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}
/* A room shown inside a widget keeps its tools but not its big page title. */
.cc-widget-body .room {
  max-width: none;
  margin: 0;
  padding: 12px 0 0;
}
.cc-widget-body .room-head h1 {
  font-size: var(--type-lg);
}
.cc-widget-body .room-head .eyebrow {
  display: none;
}
.cc-widget.full {
  position: fixed;
  inset: 16px;
  z-index: 60;
  overflow-y: auto;
  background: var(--ink, #05080e);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@media (max-width: 980px) {
  .atlas-app[data-workspace='atlas'] .atlas-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .atlas-chat-shell {
    grid-column: 1;
    grid-row: auto;
    position: static;
    height: 70vh;
  }
  .cc-widget-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .cc-widget-headline {
    grid-column: 2;
    grid-row: 2;
  }
}

/* A full-screen widget escapes the room: the room's blur would otherwise trap it inside. */
.room:has(.cc-widget.full) {
  backdrop-filter: none;
}

/* David's memory widget. */
.cc-memory {
  display: grid;
  gap: 12px;
}
.memory-note {
  margin: 0;
  color: var(--muted);
}
.memory-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: inherit;
}
.memory-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.memory-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.memory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.memory-kind {
  color: var(--gold);
}
.memory-pending {
  color: #f0a35b;
}
.memory-text {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cc-learning {
  margin-top: 18px;
}

/* The council's punch lists. */
.office-plate {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.plate-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.plate-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  white-space: nowrap;
}
.plate-chip.tone-good {
  color: #7fd6a4;
  border-color: rgba(127, 214, 164, 0.4);
}
.plate-chip.tone-bad {
  color: #ff8a80;
  border-color: rgba(255, 138, 128, 0.45);
}
.plate-chip.tone-warn {
  color: var(--gold);
  border-color: rgba(233, 184, 91, 0.45);
}
.plate-chip.tone-muted {
  color: var(--muted);
}
.plate-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.plate-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}
.plate-title {
  flex: 1 1 160px;
  overflow-wrap: anywhere;
}
.plate-overdue {
  color: #ff8a80;
  font-size: 11px;
}
.plate-due,
.plate-meta,
.plate-note {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.plate-target {
  display: grid;
  gap: 4px;
}
.plate-target-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.plate-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.plate-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
}
.plate-next {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.office-open,
.office-back,
.plate-move,
.plate-new button {
  justify-self: start;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.office-open {
  margin-top: 10px;
}
.office-room {
  display: grid;
  gap: 16px;
}
.office-room-head {
  display: grid;
  gap: 8px;
}
.office-room-head h2 {
  margin: 0;
}
.office-targets {
  display: grid;
  gap: 10px;
}
.plate-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.plate-column h3,
.office-targets h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.plate-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.plate-item-note {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.plate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.plate-new {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plate-new input {
  flex: 1 1 200px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: inherit;
}
.plate-new input[type='date'] {
  flex: 0 0 auto;
}

/* ==========================================================================================
 * Owner UI polish (23 Sep): the chat in the style of Claude.ai and ChatGPT, an arrangeable
 * Command Center, and a phone layout.
 *
 * Appended rather than threaded through the older rules so it reads as one design and wins
 * where it overlaps them. Colours come from the ATLAS tokens at the top of the ATLAS section.
 * ========================================================================================== */

/* --- Small icon buttons --------------------------------------------------------------------- */
.ui-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease);
}
.icon-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}
.icon-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}
.icon-button:disabled {
  opacity: 0.35;
  cursor: default;
}
.icon-button[hidden] {
  display: none;
}

/* --- The chat panel ------------------------------------------------------------------------- */
.atlas-chat {
  padding: 0;
  overflow: hidden;
}
.atlas-chat-head {
  padding: 10px 8px 10px 14px;
}
.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.chat-avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8f7ff, var(--cyan) 45%, #0d3a55 78%);
  box-shadow: 0 0 10px rgba(63, 216, 255, 0.35);
}
.chat-title-text strong {
  display: block;
  font-size: var(--type-base);
  font-weight: 600;
  line-height: 1.2;
}
.chat-title-text small {
  display: block;
  color: var(--muted);
  font-size: var(--type-micro);
  letter-spacing: 0.02em;
}
.atlas-chat-modes {
  gap: 2px;
}
.atlas-chat .chat-mode {
  min-width: 0;
  width: 32px;
  height: 32px;
  border: 0;
}
.atlas-chat .chat-mode[aria-pressed='true'] {
  background: rgba(63, 216, 255, 0.12);
  color: var(--cyan);
}
.atlas-chat-handle,
.chat-sheet-close {
  display: none;
}
.atlas-chat-body {
  padding: 16px 14px 10px;
}
.chat-transcript,
.atlas-workspace .chat-transcript {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 0;
}

/* Messages: the Owner's as quiet right-aligned pills, David's as plain text. */
.chat-msg {
  max-width: 100%;
  font-size: var(--type-body);
  line-height: 1.55;
}
.chat-owner {
  display: flex;
  justify-content: flex-end;
}
.chat-pill {
  max-width: 85%;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: var(--type-small);
}
.chat-name {
  color: var(--cyan);
  font-weight: 600;
}
.chat-meta time {
  font-variant-numeric: tabular-nums;
}
.chat-chip {
  padding: 1px 8px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: var(--radius-pill);
  font-size: var(--type-micro);
}
.chat-chip.tone-warn,
.chat-chip.tone-gold {
  border-color: rgba(255, 181, 71, 0.45);
  color: var(--warn, #ffb547);
}
.chat-chip.tone-bad,
.chat-chip.tone-stop {
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--stop, #ff6b6b);
}
.reply-speech-controls {
  display: inline-flex;
  margin-left: auto;
}
.reply-speech-controls .icon-button {
  width: 26px;
  height: 26px;
}
.reply-speech-controls .ui-icon {
  width: 15px;
  height: 15px;
}
.chat-text {
  color: var(--text);
  overflow-wrap: anywhere;
}
.chat-text p,
.chat-text ul,
.chat-text ol,
.chat-text pre {
  margin: 0 0 0.65em;
}
.chat-text > :last-child {
  margin-bottom: 0;
}
.chat-text ul,
.chat-text ol {
  padding-left: 1.35em;
}
.chat-text li {
  margin: 0.2em 0;
}
.chat-text code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.chat-text pre {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  white-space: pre;
}
.chat-text pre code {
  padding: 0;
  background: none;
}
.chat-heading {
  font-weight: 600;
}
.chat-status-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
}
.chat-failed .chat-status-note {
  color: var(--stop, #ff6b6b);
}
.chat-failed .chat-dots {
  display: none;
}
.chat-pending {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-empty {
  margin: auto 0;
  padding: 28px 10px;
  color: var(--muted);
  text-align: center;
}
.chat-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}
.chat-empty p {
  margin: 0;
  font-size: var(--type-body);
}
.chat-dots {
  display: inline-flex;
  gap: 3px;
}
.chat-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: chat-dot 1.2s infinite ease-in-out;
}
.chat-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.chat-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chat-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

/* Task and results: one thin line until opened. */
.chat-task {
  margin: 0 14px;
  border-top: 1px solid var(--line);
  font-size: var(--type-small);
}
.chat-task > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 2px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.chat-task > summary::-webkit-details-marker {
  display: none;
}
.chat-task > summary::after {
  content: '\25BE';
  margin-left: 2px;
}
.chat-task[open] > summary::after {
  content: '\25B4';
}
.chat-task-label {
  flex: 1;
}
.chat-task-state {
  color: var(--text);
}
.chat-task .command-result,
.atlas-workspace .chat-task .command-result {
  max-height: 38vh;
  margin: 0 0 8px;
  padding: 10px 12px;
  overflow: auto;
  border-radius: var(--radius-md);
  font-size: var(--type-small);
  white-space: normal;
}
.atlas-workspace .chat-task .command-result strong {
  font-size: var(--type-body);
}

/* --- The composer: one rounded box with small icons inside ---------------------------------- */
.chat-composer,
.atlas-chat .chat-composer {
  margin: 0;
  padding: 8px 12px 10px;
  border-top: 0;
}
.composer-box {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 6px 14px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  transition:
    border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-fast) var(--ease);
}
.composer-box:focus-within {
  border-color: rgba(63, 216, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(63, 216, 255, 0.08);
}
.chat-composer .composer-box textarea.composer-input {
  width: 100%;
  min-height: 24px;
  max-height: 200px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: var(--type-base);
  line-height: 1.5;
  resize: none;
}
.composer-input::placeholder {
  color: var(--muted);
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  margin-top: 4px;
}
.composer-spacer {
  display: none;
}
.chat-composer .voice-state {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 6px;
  color: var(--muted);
  font-size: var(--type-small);
  letter-spacing: 0;
  line-height: 1.3;
}
.chat-composer .voice-state:empty,
.chat-composer .voice-state[data-quiet] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.chat-composer .voice-state[data-voice-state='recording'],
.chat-composer .voice-state[data-voice-state='requesting'],
.chat-composer .voice-state[data-voice-state='transcribed'] {
  color: var(--cyan);
}
.chat-composer .voice-state[data-voice-state='blocked'],
.chat-composer .voice-state[data-voice-state='unavailable'],
.chat-composer .voice-state[data-voice-state='reconnect'] {
  color: var(--warn, #ffb547);
}
.composer-mic.listening {
  background: rgba(255, 107, 107, 0.16);
  color: var(--text);
}
.mic-live {
  position: absolute;
  top: 5px;
  right: 5px;
  display: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stop, #ff6b6b);
}
.composer-mic.listening .mic-live {
  display: block;
  animation: mic-pulse 1.1s infinite ease-in-out;
}
@keyframes mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0);
  }
}
.composer-mic.blocked .ui-icon {
  opacity: 0.55;
}
.composer-mic.blocked::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 1.8px;
  border-radius: 1px;
  background: currentColor;
  rotate: -45deg;
  opacity: 0.8;
}
.composer-send {
  border-radius: 50%;
  background: var(--text);
  color: var(--ink, #05080e);
}
.composer-send:hover:not(:disabled) {
  background: #ffffff;
  color: var(--ink, #05080e);
}
.composer-send:disabled {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
  color: var(--muted);
}
.composer-send .ui-icon {
  stroke-width: 2.2;
}
.composer-more .ui-icon {
  stroke-width: 3;
}
.composer-more-wrap {
  position: relative;
  margin-left: auto;
}
.composer-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(310px, 82vw);
  padding: 6px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: 12px;
  background: #0b1320;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.composer-menu[hidden] {
  display: none;
}
.composer-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}
.composer-menu .menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.menu-item-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.menu-item-label {
  font-size: var(--type-body);
}
.menu-item-hint {
  color: var(--muted);
  font-size: var(--type-small);
}
.menu-switch {
  position: relative;
  flex: none;
  width: 30px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  transition: background var(--motion-fast) var(--ease);
}
.menu-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: translate var(--motion-fast) var(--ease);
}
.menu-item[aria-checked='true'] .menu-switch {
  background: var(--cyan);
}
.menu-item[aria-checked='true'] .menu-switch::after {
  translate: 12px 0;
}
.composer-menu .advanced-controls {
  margin: 4px 0 0;
  padding: 0 10px;
  border-top: 1px solid var(--line);
}
.composer-menu .advanced-controls summary {
  padding: 9px 0;
  color: var(--muted);
  font-size: var(--type-small);
}
.composer-menu .advanced-control-content p,
.atlas-workspace .composer-menu .advanced-control-content p {
  margin: 0;
  font-size: var(--type-small);
}
.composer-menu .read-command,
.atlas-workspace .composer-menu .read-command {
  min-height: 0;
  margin: 8px 0 10px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: var(--type-small);
  letter-spacing: 0;
}
.composer-hint {
  margin: 6px 4px 0;
  color: var(--muted);
  font-size: var(--type-micro);
  text-align: center;
  opacity: 0.8;
}
.chat-drop-status {
  margin: 0 4px 6px;
}

/* The composer's microphone replaces the floating ASK CEO control in the ATLAS rooms. */
.atlas-app[data-workspace='atlas'] .ask-ceo,
.atlas-app[data-workspace='atlas']:not([data-room='atlas']) .ask-ceo {
  display: none;
}

/* --- Command Center: view toggle, Arrange, list and tiles ----------------------------------- */
/* One column that may shrink: the needs strip's one-line text must not widen the room. */
.cc,
.cc-needs {
  grid-template-columns: minmax(0, 1fr);
}
.cc-strip {
  min-width: 0;
}
.room-actions {
  flex-wrap: wrap;
}
.cc-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pref-status {
  color: var(--muted);
  font-size: var(--type-small);
}
.pref-status[data-state='offline'],
.pref-status[data-state='error'] {
  color: var(--warn, #ffb547);
}
.cc-view-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.cc-view-option {
  width: 30px;
  height: 28px;
}
.cc-view-option[aria-pressed='true'] {
  background: rgba(63, 216, 255, 0.14);
  color: var(--cyan);
}
.cc-arrange {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--type-body);
  cursor: pointer;
}
.cc-arrange.active {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--ink, #05080e);
  font-weight: 600;
}
.cc-arrange:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* List: slim rows, about half the old height. */
.cc-grid.view-list {
  gap: 6px;
}
.cc-row .cc-widget-head {
  grid-template-columns: auto 150px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 12px;
  font-size: var(--type-body);
}
.cc-widget-bar > .cc-widget-full {
  width: 38px;
  height: auto;
  border-left: 1px solid var(--line);
  border-radius: 0;
}
.cc-widget-body {
  overflow-x: auto;
}

/* Tiles: cards the size of app icons, with the headline number. */
.cc-grid.view-tiles {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-flow: row dense;
  gap: 10px;
}
.cc-tile {
  position: relative;
  border-radius: var(--radius-lg);
}
.cc-tile .cc-widget-bar {
  position: relative;
  height: 100%;
}
.cc-tile .cc-widget-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 112px;
  padding: 12px 14px 14px;
  border-radius: var(--radius-lg);
}
.cc-tile .cc-widget-head:hover {
  background: rgba(255, 255, 255, 0.03);
}
.cc-tile-top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-right: 26px;
}
.cc-tile .cc-widget-title {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--type-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.cc-tile-metric {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-tile-metric.is-text {
  font-size: var(--type-lg);
  line-height: 1.5;
}
.cc-tile .cc-widget-headline {
  display: -webkit-box;
  overflow: hidden;
  font-size: var(--type-small);
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.cc-tile .cc-widget-bar > .cc-widget-full {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-left: 0;
  border-radius: 8px;
  opacity: 0.55;
}
.cc-tile .cc-widget-bar > .cc-widget-full:hover,
.cc-tile .cc-widget-bar > .cc-widget-full:focus-visible {
  opacity: 1;
}
.cc-tile.open {
  grid-column: 1 / -1;
}
.cc-tile.open .cc-widget-bar {
  height: auto;
}
.cc-tile.open .cc-widget-head {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 10px 48px 10px 14px;
}
.cc-tile.open .cc-tile-top {
  width: auto;
  padding-right: 0;
}
.cc-tile.open .cc-tile-metric {
  font-size: var(--type-lg);
}

/* Arrange: iPhone-style jiggle, drag to reorder, x to hide. */
.cc-editable {
  position: relative;
  touch-action: none;
  user-select: none;
}
.cc-editable .cc-widget-head {
  cursor: grab;
}
.cc-row.cc-editable .cc-widget-head {
  grid-template-columns: auto auto 150px minmax(0, 1fr);
}
.cc-grip {
  display: inline-grid;
  color: var(--muted);
}
.cc-hide {
  position: absolute;
  top: -8px;
  left: -8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: 50%;
  background: #273142;
  color: var(--text);
}
.cc-hide .ui-icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}
.cc-move-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
}
.cc-tile .cc-move-group {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 0;
}
.cc-move {
  width: 28px;
  height: 28px;
}
@keyframes cc-jiggle {
  0%,
  100% {
    rotate: -0.7deg;
  }
  50% {
    rotate: 0.7deg;
  }
}
@keyframes cc-jiggle-row {
  0%,
  100% {
    rotate: -0.18deg;
  }
  50% {
    rotate: 0.18deg;
  }
}
.cc-grid.editing.view-tiles .cc-widget {
  animation: cc-jiggle 0.32s ease-in-out infinite;
}
.cc-grid.editing.view-list .cc-widget {
  animation: cc-jiggle-row 0.32s ease-in-out infinite;
}
.cc-grid.editing .cc-widget:nth-child(2n) {
  animation-delay: -0.16s;
}
.cc-grid .cc-widget.dragging {
  z-index: 5;
  animation: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  cursor: grabbing;
  opacity: 0.96;
}
.cc-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong, #31536d);
  border-radius: 12px;
  color: var(--muted);
  font-size: var(--type-small);
}
.cc-restore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 8px;
  border: 1px solid var(--line-strong, #31536d);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: var(--type-small);
  cursor: pointer;
}
.cc-restore .ui-icon {
  width: 14px;
  height: 14px;
}
.cc-restore:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.cc-hidden-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-small);
}
@media (prefers-reduced-motion: reduce) {
  .cc-grid.editing .cc-widget {
    animation: none;
    outline: 1px dashed var(--line-strong, #31536d);
    outline-offset: 2px;
  }
  .chat-dots i,
  .composer-mic.listening .mic-live {
    animation: none;
  }
}

/* --- Phones: the chat becomes a bottom sheet, the widgets tiles ----------------------------- */
@media (max-width: 767px) {
  body:has(.atlas-app[data-workspace='atlas']) {
    overflow-x: clip;
  }
  .atlas-app[data-workspace='atlas'][data-chat] .atlas-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .atlas-app[data-workspace='atlas'] .atlas-main {
    padding-bottom: 170px;
  }
  /*
   * The room tabs scroll sideways inside their own strip. Without a stretch the strip took the
   * width of every tab (about 1700px) and pushed the whole page sideways on a phone.
   */
  .atlas-app[data-workspace='atlas'] .atlas-nav {
    align-self: stretch;
    max-width: 100%;
    min-width: 0;
  }
  .atlas-chat-shell {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    height: auto;
    min-height: 0;
  }
  .atlas-chat {
    height: auto;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background: #0a111c;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.5);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .atlas-chat-handle {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 8px 0 2px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .atlas-chat-grabber {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.28);
  }
  .atlas-chat-handle-label,
  .atlas-chat-head,
  .atlas-chat-body,
  .chat-task,
  .composer-hint {
    display: none;
  }
  /* Pulled up, or expanded: the conversation takes the screen. */
  .atlas-app[data-chat-sheet='open'] .atlas-chat-shell,
  .atlas-app[data-chat='expanded'] .atlas-chat-shell {
    top: 0;
  }
  .atlas-app[data-chat-sheet='open'] .atlas-chat,
  .atlas-app[data-chat='expanded'] .atlas-chat {
    height: 100%;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
  }
  .atlas-app[data-chat-sheet='open'] .atlas-chat-head,
  .atlas-app[data-chat='expanded'] .atlas-chat-head {
    display: flex;
  }
  .atlas-app[data-chat-sheet='open'] .atlas-chat-body,
  .atlas-app[data-chat='expanded'] .atlas-chat-body,
  .atlas-app[data-chat-sheet='open'] .chat-task,
  .atlas-app[data-chat='expanded'] .chat-task {
    display: block;
  }
  .atlas-app[data-chat-sheet='open'] .chat-sheet-close {
    display: inline-grid;
  }
  .atlas-app[data-chat-sheet='open'] .atlas-chat-handle,
  .atlas-app[data-chat='expanded'] .atlas-chat-handle {
    display: none;
  }
  /* iOS zooms into any field under 16px; the composer must not trigger it. */
  .chat-composer .composer-box textarea.composer-input {
    font-size: 16px;
  }
  .cc-grid.view-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cc-toolbar {
    width: 100%;
    justify-content: flex-end;
  }
  .cc-row .cc-widget-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .cc-row .cc-widget-headline {
    grid-column: 2;
    grid-row: 2;
  }
  .room-head {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
}

/* ==========================================================================================
 * Three Owner controls (24 Sep): David's heartbeat, the council's proposals, recent problems.
 * Compact rows and small buttons, in the punch lists' vocabulary.
 * ========================================================================================== */

.plate-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.hb-small,
.hb-link {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}
.hb-small:disabled,
.plate-move:disabled {
  opacity: 0.5;
  cursor: default;
}
.hb-link {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--cyan);
}

/* --- David's heartbeat, at the top of David's work ----------------------------------------- */
.hb-card {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.015);
}
.hb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hb-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.hb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.hb-label {
  color: var(--muted);
  font-size: 12px;
}
.hb-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hb-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.hb-slot-remove {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.hb-slot-remove:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.hb-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.hb-card input[type='time'],
.hb-card input[type='date'],
.hb-card select {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  color-scheme: dark;
}
.hb-status {
  color: var(--muted);
  font-size: 12px;
}
.hb-reply {
  display: grid;
  gap: 2px;
}
.hb-reply-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hb-runs-list,
.diag-related {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.hb-run {
  display: flex;
  gap: 10px;
}
.hb-run-when {
  min-width: 110px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* --- David's proposals, in the Council ----------------------------------------------------- */
.proposals {
  display: grid;
  gap: 8px;
}
.proposal-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.proposal-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.proposal-item {
  display: grid;
  gap: 5px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.proposal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.proposal-office {
  color: var(--muted);
  font-size: 12px;
}
.proposal-summary,
.proposal-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.proposal-detail {
  white-space: pre-wrap;
}
.proposal-actions .plate-move {
  padding: 3px 10px;
}

/* --- Recent problems, in Health & Costs ---------------------------------------------------- */
.diag-body {
  display: grid;
  gap: 8px;
}
.diag-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.diag-item {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.diag-item.open {
  border-color: rgba(49, 215, 255, 0.35);
}
.diag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 0;
}
.diag-open {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.diag-component {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.diag-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}
.diag-code,
.diag-detail code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--gold);
}
.diag-count,
.diag-seen {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.diag-actions {
  display: inline-flex;
  gap: 4px;
}
.diag-detail {
  display: grid;
  gap: 8px;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.diag-message {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.diag-block h4 {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.diag-chain {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
}
.diag-chain li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: calc(var(--depth, 0) * 14px);
  overflow-wrap: anywhere;
}
.diag-chain li + li::before {
  content: '↳';
  color: var(--muted);
}
.diag-ids {
  display: grid;
  gap: 4px;
}
.diag-id {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.diag-id span {
  min-width: 72px;
}
.diag-id code {
  color: var(--text);
  overflow-wrap: anywhere;
}
.diag-copy {
  padding: 1px 8px;
  font-size: 11px;
}
.diag-stack {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre;
  color: var(--muted);
}

/* --- A widget line that leads to another room ---------------------------------------------- */
.cc-widget-alert {
  align-self: center;
  margin-right: 8px;
  padding: 2px 10px;
  border: 1px solid rgba(233, 184, 91, 0.45);
  border-radius: 999px;
  background: rgba(233, 184, 91, 0.08);
  color: var(--gold);
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.cc-widget-alert.tone-bad {
  border-color: rgba(255, 123, 146, 0.45);
  background: rgba(255, 123, 146, 0.08);
  color: var(--danger);
}
.cc-widget-alert:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .diag-row {
    flex-wrap: wrap;
    padding-left: 0;
  }
  .hb-run-when {
    min-width: 90px;
  }
}

/* Native option lists are drawn by the OS: on Windows Chrome they inherited our light text on
   the system's white list, so the business names were unreadable when the pull-down opened. */
select {
  color-scheme: dark;
}
select option,
select optgroup {
  background-color: var(--surface2);
  color: var(--text);
}
select option:disabled {
  color: var(--muted, #87a0b9);
}

/* --- The business switcher: top of the left menu, GoHighLevel style ------------------------- */
.nav-business {
  margin: 2px 0 12px;
}
.business-switcher {
  display: grid;
  align-items: center;
  border: 1px solid rgba(120, 200, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #eaf4ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.business-switcher:hover:not(:disabled) {
  border-color: rgba(63, 216, 255, 0.55);
  background: rgba(63, 216, 255, 0.07);
}
.business-switcher:focus-visible,
.business-option:focus-visible,
.top-bubble:focus-visible,
.profile-action:focus-visible {
  outline: 2px solid #3fd8ff;
  outline-offset: 2px;
}
.business-switcher:disabled {
  cursor: default;
  opacity: 0.7;
}
.business-switcher.full-form {
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
}
.business-switcher-mark,
.business-option-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3fd8ff, #8b7bff);
  color: #04101c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.business-switcher.unselected .business-switcher-mark {
  background: rgba(255, 255, 255, 0.12);
  color: #eaf4ff;
}
.business-switcher-text,
.business-option-text {
  display: grid;
  min-width: 0;
  gap: 1px;
}
.business-switcher-text strong,
.business-option-text strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.business-switcher-text small,
.business-option-text small {
  overflow: hidden;
  color: #8ba1b8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.business-switcher-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.6px solid #8ba1b8;
  border-bottom: 1.6px solid #8ba1b8;
  transform: translateY(-2px) rotate(45deg);
}
.business-switcher[aria-expanded='true'] .business-switcher-chevron {
  transform: translateY(2px) rotate(225deg);
}
/* The round badge stands in for the switcher only while the left menu is hidden. */
.business-switcher.badge-form {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  place-items: center;
  flex: none;
}
.business-switcher.badge-form .business-switcher-mark {
  width: 34px;
  height: 34px;
}
.atlas-app.nav-hidden .atlas-workspace-bar .business-switcher.badge-form {
  display: grid;
}

/* --- Drop-down panels: the business list and the bubbles' panels --------------------------- */
/* Appended to the page rather than the app, so they carry their own colours. */
.atlas-popover {
  position: fixed;
  z-index: 60;
  width: min(340px, calc(100vw - 16px));
  max-height: min(72vh, 560px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 12px;
  background: #0b1422;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  color: #eaf4ff;
  color-scheme: dark;
  font-size: 14px;
  line-height: 1.45;
}
.atlas-popover p {
  margin: 0;
}
.popover-title {
  margin: 0 0 8px;
  color: #8ba1b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.popover-link {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  border-top: 1px solid rgba(120, 200, 255, 0.12);
  color: #3fd8ff;
  text-decoration: none;
}
.popover-link:hover {
  text-decoration: underline;
}
.business-list {
  display: grid;
  gap: 4px;
}
.business-option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #eaf4ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.business-option:hover {
  background: rgba(63, 216, 255, 0.08);
}
.business-option.selected {
  border-color: rgba(63, 216, 255, 0.35);
  background: rgba(63, 216, 255, 0.1);
}
.business-option-tick {
  color: #3fd8ff;
  font-weight: 800;
}

/* --- Top-right bubbles ----------------------------------------------------------------------- */
.top-bubbles {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.top-bubble {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}
.top-bubble:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.bubble-david {
  background: linear-gradient(135deg, #3fd8ff, #8b7bff);
  color: #04101c;
}
.bubble-needs {
  background: #f59e0b;
  color: #1f1300;
}
.bubble-phone {
  background: #16a34a;
}
.bubble-help {
  background: #2563eb;
}
.bubble-profile {
  background: #475569;
}
.bubble-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bubble-glyph {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}
.bubble-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 2px solid #05080e;
  border-radius: 9px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
.avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #475569;
  color: #ffffff;
  font-weight: 800;
}
.avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.avatar.large {
  width: 48px;
  height: 48px;
  flex: none;
  font-size: 16px;
}
.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- The bubbles' panels ----------------------------------------------------------------------- */
.bubble-panel {
  display: grid;
  gap: 10px;
}
.bubble-panel .needs-you {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.help-rooms {
  display: grid;
  gap: 2px 0;
  margin: 0;
}
.help-rooms dt a {
  color: #3fd8ff;
  font-weight: 700;
  text-decoration: none;
}
.help-rooms dd {
  margin: 0 0 8px;
  color: #b9ccdb;
}
.help-keys {
  padding-top: 8px;
  border-top: 1px solid rgba(120, 200, 255, 0.12);
  color: #8ba1b8;
  font-size: 13px;
}
.profile-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-names {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.profile-names strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-names small {
  color: #8ba1b8;
}
.profile-role {
  justify-self: start;
  padding: 1px 8px;
  border: 1px solid rgba(63, 216, 255, 0.35);
  border-radius: 999px;
  color: #3fd8ff;
  font-size: 12px;
  font-weight: 700;
}
.profile-section {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 200, 255, 0.12);
}
.profile-section-title {
  color: #8ba1b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.profile-action {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #eaf4ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.profile-action:hover:not(:disabled) {
  border-color: rgba(63, 216, 255, 0.55);
}
.profile-action:disabled {
  color: #8ba1b8;
  cursor: not-allowed;
}
.profile-action.sign-out {
  margin-top: 4px;
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffc9c9;
}
.login-as-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.login-as-list li {
  display: grid;
  gap: 1px;
}
.login-as-target {
  padding: 0;
  border: 0;
  background: none;
  color: #eaf4ff;
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.login-as-list small,
.atlas-popover .rail-note {
  color: #8ba1b8;
  font-size: 13px;
}
.profile-status:empty {
  display: none;
}
.profile-status.tone-good {
  color: #3ddc97;
}
.profile-status.tone-bad {
  color: #ff8a8a;
}
.profile-status.tone-muted {
  color: #8ba1b8;
}

/* --- The ATLAS top bar: menu toggle and status, then the clock, then the bubbles -------------- */
.atlas-app[data-workspace='atlas'] .atlas-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.atlas-app[data-workspace='atlas'] .atlas-workspace-bar {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.atlas-app[data-workspace='atlas'] .vitals {
  flex: 0 1 auto;
  min-width: 0;
}
@media (max-width: 760px) {
  .atlas-app[data-workspace='atlas'] .atlas-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .atlas-app[data-workspace='atlas'] .atlas-workspace-bar {
    flex-basis: auto;
  }
  /* A phone keeps the business as a round badge at the start of the menu row. */
  .atlas-app[data-workspace='atlas'] .nav-business {
    flex: none;
    margin: 0 6px 0 0;
  }
  .atlas-app[data-workspace='atlas'] .business-switcher.full-form {
    grid-template-columns: 32px;
    width: auto;
    padding: 2px;
    border-radius: 50%;
  }
  .atlas-app[data-workspace='atlas'] .business-switcher.full-form .business-switcher-text,
  .atlas-app[data-workspace='atlas'] .business-switcher.full-form .business-switcher-chevron {
    display: none;
  }
}
@media (max-width: 520px) {
  /* The dot and the clock say it; the words stay for a screen reader. */
  .atlas-app[data-workspace='atlas'] .os-status span:not(.os-dot) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .atlas-app[data-workspace='atlas'] .os-status {
    padding: 7px;
  }
  .top-bubbles {
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .top-bubble {
    transition: none;
  }
}

/* --- Cameras, picture in picture ------------------------------------------------------------- */
.bubble-cameras {
  background: #db2777;
}
.camera-pip {
  position: fixed;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 380px;
  height: 300px;
  min-width: 240px;
  min-height: 200px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  resize: both;
  border: 1px solid rgba(120, 200, 255, 0.28);
  border-radius: 12px;
  background: #0b1422;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
  color: #eaf4ff;
  color-scheme: dark;
  font-size: 14px;
}
.camera-pip.corner-top-left {
  top: 80px;
  left: 16px;
}
.camera-pip.corner-top-right {
  top: 80px;
  right: 16px;
}
.camera-pip.corner-bottom-left {
  bottom: 16px;
  left: 16px;
}
/* Clear of the round David chat bubble in the same corner. */
.camera-pip.corner-bottom-right {
  right: 16px;
  bottom: 88px;
}
.camera-pip.dragging {
  opacity: 0.9;
  user-select: none;
}
.camera-pip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 200, 255, 0.12);
  cursor: grab;
  touch-action: none;
}
.camera-pip.dragging .camera-pip-head {
  cursor: grabbing;
}
.camera-pip-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.camera-pip-actions {
  display: flex;
  flex: none;
  gap: 6px;
}
.camera-pip-button {
  padding: 4px 10px;
  border: 1px solid rgba(120, 200, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #eaf4ff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.camera-pip-button:hover {
  border-color: rgba(63, 216, 255, 0.6);
}
.camera-pip-button:focus-visible,
.camera-pip-tile:focus-visible {
  outline: 2px solid #3fd8ff;
  outline-offset: 2px;
}
.camera-pip-button.close {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}
.camera-pip-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}
.camera-pip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.camera-pip-tile {
  display: grid;
  gap: 4px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(120, 200, 255, 0.18);
  border-radius: 8px;
  background: #060b14;
  color: #eaf4ff;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.camera-pip-tile:hover {
  border-color: rgba(63, 216, 255, 0.6);
}
.camera-pip-picture {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0e1726;
}
.camera-pip-picture.empty {
  display: grid;
  place-items: center;
  color: #8ba1b8;
}
.camera-pip-name {
  padding: 0 8px 6px;
}
.camera-pip-video {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 8px;
  background: #000000;
  object-fit: contain;
}
.camera-pip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.camera-pip-note {
  margin: 0;
  color: #8ba1b8;
  font-size: 12px;
}
@media (max-width: 520px) {
  .camera-pip {
    width: calc(100vw - 24px);
    height: 250px;
  }
  .camera-pip.corner-top-left,
  .camera-pip.corner-bottom-left {
    left: 12px;
  }
  .camera-pip.corner-top-right,
  .camera-pip.corner-bottom-right {
    right: 12px;
  }
}

/* --- The hidden chat: a round David bubble, bottom right, on every screen size -------------- */
.atlas-app[data-chat='hidden'] .atlas-workspace,
.atlas-app[data-workspace='atlas'][data-chat='hidden'] .atlas-workspace {
  grid-template-columns: minmax(0, 1fr);
}
/* The shell keeps no box of its own: only the fixed bubble inside it shows. */
.atlas-app[data-chat='hidden'] .atlas-chat-shell {
  display: contents;
}
.atlas-app[data-chat='hidden'] .atlas-chat-reopen {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 52px;
  min-width: 0;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #3fd8ff, #8b7bff);
  color: #04101c;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(63, 216, 255, 0.25);
  writing-mode: horizontal-tb;
}
.atlas-chat-reopen .bubble-icon {
  width: 24px;
  height: 24px;
}
.chat-unread-dot {
  display: none;
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border: 2px solid #05080e;
  border-radius: 50%;
  background: #ef4444;
}
.atlas-chat-reopen[data-unread='true'] .chat-unread-dot {
  display: block;
}

/* --- Search: the box under the business switcher, and the palette it opens ------------------- */
.nav-search-wrap {
  margin: 0 0 12px;
}
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(120, 200, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #8ba1b8;
  font: inherit;
  cursor: pointer;
}
.nav-search:hover {
  border-color: rgba(63, 216, 255, 0.45);
  color: #eaf4ff;
}
.nav-search:focus-visible,
.palette-input:focus-visible {
  outline: 2px solid #3fd8ff;
  outline-offset: 2px;
}
.nav-search.full-form {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
}
.nav-search-icon,
.palette-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-search-label {
  flex: 1;
}
.nav-search-kbd,
.palette-kbd {
  padding: 1px 6px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 5px;
  color: #8ba1b8;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* The magnifier stands in for the box only while the left menu is hidden. */
.nav-search.icon-form {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border-radius: 50%;
}
.atlas-app.nav-hidden .atlas-workspace-bar .nav-search.icon-form {
  display: grid;
}
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 12px 12px;
  background: rgba(2, 5, 11, 0.6);
}
.palette {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid rgba(120, 200, 255, 0.28);
  border-radius: 14px;
  background: #0b1422;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  color: #eaf4ff;
  color-scheme: dark;
}
.palette-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(120, 200, 255, 0.12);
  color: #8ba1b8;
}
.palette-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #eaf4ff;
  font: inherit;
  font-size: 16px;
}
.palette-input::placeholder {
  color: #6f86a0;
}
.palette-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
}
.palette-group {
  margin: 8px 8px 4px;
  color: #8ba1b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.palette-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.palette-option.active {
  background: rgba(63, 216, 255, 0.12);
  box-shadow: inset 2px 0 0 #3fd8ff;
}
.palette-label {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.palette-detail {
  flex: none;
  max-width: 55%;
  overflow: hidden;
  color: #8ba1b8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.palette-empty {
  margin: 12px 10px;
  color: #8ba1b8;
}
.palette-foot {
  margin: 0;
  padding: 8px 14px;
  border-top: 1px solid rgba(120, 200, 255, 0.12);
  color: #6f86a0;
  font-size: 12px;
}
@media (max-width: 760px) {
  .atlas-app[data-workspace='atlas'] .nav-search-wrap {
    flex: none;
    margin: 0 6px 0 0;
  }
  .atlas-app[data-workspace='atlas'] .nav-search.full-form {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
  }
  .atlas-app[data-workspace='atlas'] .nav-search.full-form .nav-search-label,
  .atlas-app[data-workspace='atlas'] .nav-search.full-form .nav-search-kbd {
    display: none;
  }
  .palette-backdrop {
    padding-top: 8vh;
  }
}
/* The top bar's controls stay on one line; with the menu hidden on a phone, the bubbles take a
   second row of their own rather than squeezing the badge, search and clock into a column. */
.atlas-app[data-workspace='atlas'] .os-clock {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .atlas-app[data-workspace='atlas'] .atlas-workspace-bar {
    flex-wrap: nowrap;
    margin-top: 0;
  }
}
@media (max-width: 520px) {
  .atlas-app[data-workspace='atlas'].nav-hidden .atlas-header {
    flex-wrap: wrap;
  }
  .atlas-app[data-workspace='atlas'].nav-hidden .top-bubbles {
    margin-left: auto;
  }
}

/* --- The business in view, at the top of the left menu ---------------------------------------- */
.business-brand {
  min-height: 56px;
}
.business-brand-logo {
  display: block;
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}
.business-brand-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3fd8ff, #8b7bff);
  color: #04101c;
  font-size: 14px;
  font-weight: 800;
}
.business-brand-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #eaf4ff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.popover-link.as-button {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.business-logo-control .profile-status {
  padding: 0 10px;
}
@media (max-width: 760px) {
  /* On a phone the switcher's badge already names the business; only a real logo adds to it. */
  .atlas-app[data-workspace='atlas'] .business-brand:not(.has-logo) {
    display: none;
  }
  .atlas-app[data-workspace='atlas'] .business-brand {
    min-height: 0;
  }
  .atlas-app[data-workspace='atlas'] .business-brand-logo {
    max-width: 96px;
    max-height: 32px;
  }
}

/* --- Freeze ATLAS and sign out everywhere (freeze-controls.js) ------------------------------ */
.os-status.bad {
  border-color: rgba(255, 107, 107, 0.5);
  color: #ffd0d0;
}
.os-status.bad .os-dot {
  background: var(--stop, #ff6b6b);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.7);
}
.freeze-card.is-frozen {
  border-color: rgba(255, 107, 107, 0.45);
}
.freeze-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.freeze-state {
  margin: 0;
  font-weight: 700;
}
.freeze-state.running {
  color: #c9f7e3;
}
.freeze-state.frozen {
  color: #ffb3b3;
}
.freeze-controls .rail-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-body);
  overflow-wrap: anywhere;
}
.freeze-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.freeze-button {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #eaf4ff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.freeze-controls.compact .freeze-button {
  width: 100%;
}
.freeze-button:hover {
  border-color: rgba(63, 216, 255, 0.55);
}
.freeze-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.freeze-button.danger {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.12);
  color: #ffd0d0;
  font-weight: 700;
}
.freeze-button.confirm {
  border-color: rgba(61, 220, 151, 0.5);
  color: #c9f7e3;
  font-weight: 700;
}
.freeze-button.quiet {
  color: var(--muted);
}
.freeze-input {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong, rgba(120, 200, 255, 0.22));
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}
.freeze-status:empty {
  display: none;
}
.freeze-status {
  margin: 0;
  font-size: var(--type-body);
}
.freeze-status.tone-good {
  color: #3ddc97;
}
.freeze-status.tone-bad {
  color: #ff8a8a;
}
.freeze-status.tone-muted {
  color: var(--muted);
}
/* ==========================================================================================
 * Content Studio (content-studio.js): the Owner's approval queue, calendar, published list,
 * held posts and brand board for the business in context. Laid out like GoHighLevel's Social
 * Planner where the two overlap; the colours are ATLAS status tokens.
 * ========================================================================================== */

.cs {
  --cs-waiting: var(--gold, #f5c451);
  --cs-scheduled: var(--cyan, #3fd8ff);
  --cs-published: var(--ok, #3ddc97);
  --cs-held: var(--stop, #ff6b6b);
  --cs-with-david: var(--violet, #8b7bff);
  --cs-rejected: var(--idle, #5f7187);
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}
.cs button {
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
}
.cs button[disabled] {
  cursor: default;
  opacity: 0.55;
}
.cs-muted {
  margin: 0;
  color: var(--muted);
  font-size: var(--type-small);
}
.cs-loading,
.cs-empty {
  margin: 0;
  padding: var(--space-5);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

/* ---- header: this week's numbers and the one call to action ---------------------------- */
.cs-head {
  display: grid;
  gap: var(--space-3);
}
.cs-head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.cs-head-top > div {
  display: grid;
  gap: 6px;
  flex: 1 1 320px;
  min-width: 0;
}
.cs-kicker {
  margin: 0;
  font-size: var(--type-micro);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-publishing {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-size: var(--type-body);
  line-height: 1.4;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.cs-publishing.draft {
  border-color: rgba(245, 196, 81, 0.35);
  background: rgba(245, 196, 81, 0.07);
}
.cs-publishing.on {
  border-color: rgba(61, 220, 151, 0.3);
}
.cs-cta {
  flex: 0 0 auto;
  font-size: var(--type-base);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 196, 81, 0.6);
  background: linear-gradient(180deg, #f5c451, #d9a634);
  color: #1a1204;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(245, 196, 81, 0.18);
}
.cs-cta.quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  box-shadow: none;
}
.cs-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}
.cs-stat {
  display: grid;
  font-size: var(--type-body);
  align-content: start;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong, var(--line));
  background: var(--surface-card);
  color: var(--text);
  text-align: left;
}
.cs-stat-waiting {
  border-top-color: var(--cs-waiting);
}
.cs-stat-scheduled {
  border-top-color: var(--cs-scheduled);
}
.cs-stat-published {
  border-top-color: var(--cs-published);
}
.cs-stat-held {
  border-top-color: var(--cs-held);
}
.cs-stat-label {
  font-size: var(--type-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-stat strong {
  font-size: 26px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.cs-stat small {
  color: var(--muted);
  font-size: var(--type-small);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cs-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-size: var(--type-body);
}
.cs-banner.good {
  border-color: rgba(61, 220, 151, 0.4);
  background: rgba(61, 220, 151, 0.08);
}
.cs-banner.warn {
  border-color: rgba(255, 181, 71, 0.4);
  background: rgba(255, 181, 71, 0.08);
}
.cs-banner.bad {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.08);
}
.cs-banner-close,
.cs-dialog-close {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

/* ---- problems and their one action ------------------------------------------------------ */
.cs-business-problems,
.cs-held-business {
  display: grid;
  gap: var(--space-2);
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.05);
}
.cs-held-business h3,
.cs-held h3,
.cs-brand-section h3 {
  margin: 0 0 6px;
  font-size: var(--type-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-problems {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-problems li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.cs-problems p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 0;
  margin: 0;
  font-size: var(--type-body);
  line-height: 1.4;
}
.cs-link {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong, var(--line));
  background: rgba(63, 216, 255, 0.06);
  color: var(--cyan);
  font-size: var(--type-small);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.cs-link:hover {
  background: rgba(63, 216, 255, 0.12);
}

/* ---- platform connections --------------------------------------------------------------- */
.cs-platforms {
  display: grid;
  gap: 8px;
}
.cs-platforms-title {
  margin: 0;
  font-size: var(--type-small);
  color: var(--muted);
}
.cs-platforms-title strong {
  color: var(--text);
}
.cs-platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: var(--type-small);
  background: rgba(255, 255, 255, 0.02);
}
.cs-platform-state {
  color: var(--muted);
}
.cs-platform.connected {
  border-color: rgba(61, 220, 151, 0.4);
}
.cs-platform.connected .cs-platform-state {
  color: var(--cs-published);
}
.cs-platform.needs-attention {
  border-color: rgba(255, 181, 71, 0.45);
}
.cs-platform.not-connected .cs-pf,
.cs-platform.not-reported .cs-pf {
  filter: grayscale(1);
  opacity: 0.55;
}

/* Platform marks, in the platforms' own colours. */
.cs-pf {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: #3a4a5e;
}
.cs-pf-facebook {
  background: #1877f2;
}
.cs-pf-instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
}
.cs-pf-linkedin {
  background: #0a66c2;
}
.cs-pf-googleBusinessProfile {
  background: #34a853;
}
.cs-pf-tiktok {
  background: #111;
  box-shadow: inset 0 0 0 1px #25f4ee;
}
.cs-pf-youtube {
  background: #ff0000;
}
.cs-pf-pinterest {
  background: #e60023;
}
.cs-pf-threads,
.cs-pf-x {
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.cs-pf-bluesky {
  background: #1185fe;
}

/* ---- tabs, filters, toolbar -------------------------------------------------------------- */
.cs-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.cs-tab {
  flex: 0 0 auto;
  padding: 10px 14px;
  font-size: var(--type-base);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.cs-tab.active {
  border-bottom-color: var(--cyan);
  color: var(--text);
}
.cs-view {
  min-width: 0;
}
.cs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: var(--space-3);
}
.cs-filters,
.cs-row,
.cs-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.cs-filter,
.cs-row > button:not(.cs-primary):not(.cs-danger):not(.cs-link),
.cs-nav {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: var(--type-small);
}
.cs-filter.active {
  border-color: var(--cyan);
  background: rgba(63, 216, 255, 0.12);
}
.cs-bulk label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--type-small);
  color: var(--muted);
}
.cs-primary,
.cs-danger {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--type-small);
  font-weight: 700;
}
.cs-primary {
  background: var(--cs-published);
  color: #04160d;
}
.cs-danger {
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.5);
  color: #ffd2d2;
}
.cs-primary.unavailable {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* ---- the approval queue: one card per post ---------------------------------------------- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-4);
  align-items: start;
}
.cs-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong, var(--line));
  background: var(--surface-card);
}
.cs-card.busy {
  opacity: 0.6;
}
.cs-card-waiting {
  border-left-color: var(--cs-waiting);
}
.cs-card-scheduled {
  border-left-color: var(--cs-scheduled);
}
.cs-card-published {
  border-left-color: var(--cs-published);
}
.cs-card-held {
  border-left-color: var(--cs-held);
}
.cs-card-with-david {
  border-left-color: var(--cs-with-david);
}
.cs-card-rejected {
  border-left-color: var(--cs-rejected);
}
.cs-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.cs-card-platforms {
  display: inline-flex;
  gap: 3px;
}
.cs-when {
  margin-left: auto;
  font-size: var(--type-small);
  color: var(--muted);
  white-space: nowrap;
}
.cs-status,
.cs-tag {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--type-micro);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cs-tag {
  border: 1px solid var(--line-strong, var(--line));
  color: var(--muted);
}
.cs-status-waiting {
  background: rgba(245, 196, 81, 0.16);
  color: var(--cs-waiting);
}
.cs-status-scheduled {
  background: rgba(63, 216, 255, 0.14);
  color: var(--cs-scheduled);
}
.cs-status-published {
  background: rgba(61, 220, 151, 0.14);
  color: var(--cs-published);
}
.cs-status-held {
  background: rgba(255, 107, 107, 0.14);
  color: var(--cs-held);
}
.cs-status-with-david {
  background: rgba(139, 123, 255, 0.16);
  color: var(--cs-with-david);
}
.cs-status-rejected {
  background: rgba(95, 113, 135, 0.2);
  color: #a9b6c6;
}
.cs-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 20%, rgba(63, 216, 255, 0.1), transparent 60%), #070b12;
  aspect-ratio: 16 / 9;
}
.cs-media.tall {
  aspect-ratio: 4 / 5;
}
/* In a card the preview is a preview: tall media is letterboxed so the words stay in view. */
.cs-card .cs-media {
  max-height: 280px;
}
.cs-media.square {
  aspect-ratio: 1 / 1;
}
.cs-media img,
.cs-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.cs-media.empty {
  align-content: center;
  gap: 4px;
  padding: 12px;
  text-align: center;
}
.cs-media-kind {
  font-size: var(--type-small);
  font-weight: 700;
  color: var(--text);
}
.cs-media:not(.empty) .cs-media-kind {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.6);
  font-size: var(--type-micro);
  pointer-events: none;
}
.cs-media small {
  max-width: 34ch;
  color: var(--muted);
  font-size: var(--type-micro);
}
.cs-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.cs-version {
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-size: var(--type-micro);
}
.cs-version.active {
  border-color: var(--cyan);
  color: var(--text);
}
.cs-headline {
  margin: 0;
  font-weight: 700;
  font-size: var(--type-base);
  overflow-wrap: anywhere;
}
.cs-caption {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: var(--type-body);
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}
.cs-caption.short {
  color: var(--muted);
  -webkit-line-clamp: 2;
}
.cs-cta-line {
  margin: 0;
  font-size: var(--type-small);
  color: var(--muted);
}
.cs-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
  font-size: var(--type-small);
}
.cs-meta dt {
  color: var(--muted);
}
.cs-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.cs-live {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--type-small);
}
.cs-live li,
.cs-held-post,
.cs-published-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cs-live a {
  color: var(--cyan);
}
.cs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.cs-action {
  flex: 1 1 auto;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: var(--type-small);
  font-weight: 600;
}
.cs-action.primary {
  background: var(--cs-published);
  border-color: transparent;
  color: #04160d;
}
.cs-action.danger {
  border-color: rgba(255, 107, 107, 0.45);
  color: #ffb3b3;
}
.cs-action.unavailable {
  border-style: dashed;
  background: none;
  color: var(--muted);
}
.cs-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong, var(--line));
  background: rgba(0, 0, 0, 0.25);
}
.cs-panel p {
  margin: 0;
  font-size: var(--type-small);
  line-height: 1.4;
}
.cs-field {
  display: grid;
  gap: 4px;
  font-size: var(--type-small);
  color: var(--muted);
}
.cs-panel textarea,
.cs-panel input[type='date'] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong, var(--line));
  background: #060a10;
  color: var(--text);
  font: inherit;
  font-size: var(--type-body);
  color-scheme: dark;
}
.cs-choices {
  display: grid;
  gap: 6px;
  font-size: var(--type-small);
}
.cs-choices label,
.cs-edit-keep {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-edit-version {
  display: grid;
  gap: 6px;
}
.cs-note {
  margin: 0;
  font-size: var(--type-small);
  line-height: 1.4;
}
.cs-note:empty {
  display: none;
}
.cs-note.bad {
  color: #ffb3b3;
}
.cs-note.muted {
  color: var(--muted);
}

/* ---- calendar ------------------------------------------------------------------------------ */
.cs-cal-title {
  margin-left: 6px;
  font-size: var(--type-base);
}
.cs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
  font-size: var(--type-small);
  color: var(--muted);
}
.cs-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cs-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
}
.cs-dot.cs-status-waiting {
  background: var(--cs-waiting);
}
.cs-dot.cs-status-scheduled {
  background: var(--cs-scheduled);
}
.cs-dot.cs-status-published {
  background: var(--cs-published);
}
.cs-dot.cs-status-held {
  background: var(--cs-held);
}
.cs-dot.cs-status-with-david {
  background: var(--cs-with-david);
}
.cs-dot.cs-status-rejected {
  background: var(--cs-rejected);
}
.cs-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cs-cal-weekday {
  padding: 6px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: var(--type-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-cal-day {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: 120px;
  padding: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-calendar[data-mode='month'] .cs-cal-day {
  min-height: 96px;
}
.cs-cal-day.today {
  background: rgba(63, 216, 255, 0.06);
}
.cs-cal-day.outside {
  opacity: 0.45;
}
.cs-cal-date {
  font-size: var(--type-micro);
  font-weight: 700;
  color: var(--muted);
}
.cs-cal-day.today .cs-cal-date {
  color: var(--cyan);
}
.cs-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong, var(--line));
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: var(--type-micro);
  text-align: left;
}
.cs-chip-waiting {
  border-left-color: var(--cs-waiting);
}
.cs-chip-scheduled {
  border-left-color: var(--cs-scheduled);
}
.cs-chip-published {
  border-left-color: var(--cs-published);
}
.cs-chip-held {
  border-left-color: var(--cs-held);
}
.cs-chip-with-david {
  border-left-color: var(--cs-with-david);
}
.cs-chip-time {
  flex: 0 0 auto;
  color: var(--muted);
}
.cs-chip-platforms {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 1px;
}
.cs-chip-platforms .cs-pf {
  width: 14px;
  height: 14px;
  font-size: 7px;
}
.cs-chip-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A week has room to read: time and platforms on one line, the first words of the post below. */
.cs-calendar[data-mode='week'] .cs-chip {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 3px;
  padding: 6px;
}
.cs-calendar[data-mode='week'] .cs-chip-text {
  display: -webkit-box;
  flex-basis: 100%;
  white-space: normal;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* ---- published, held, brand -------------------------------------------------------------- */
.cs-published,
.cs-held-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-published-row {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.cs-published-body {
  display: grid;
  flex: 1 1 auto;
  gap: 2px;
  min-width: 0;
  font-size: var(--type-small);
}
.cs-held {
  display: grid;
  gap: var(--space-4);
}
.cs-held-list > li {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cs-held);
  background: var(--surface-card);
}
.cs-held-post {
  flex-wrap: wrap;
  font-size: var(--type-small);
}
.cs-held-post .cs-caption {
  flex: 1 1 100%;
}
.cs-brand {
  display: grid;
  gap: var(--space-3);
}
.cs-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--space-3);
}
.cs-brand-section {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.cs-brand-section ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
  font-size: var(--type-small);
  overflow-wrap: anywhere;
}
.cs-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin-left: -16px;
}
.cs-swatch-chip {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.cs-gap {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.cs-gap h2 {
  margin: 0;
  font-size: var(--type-lg);
}
.cs-gap p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

/* ---- the post dialog (from the calendar) ------------------------------------------------ */
.cs-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 5, 10, 0.72);
}
.cs-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--surface, #0a111c);
}
.cs-dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 1;
}

@media (max-width: 1100px) {
  .cs-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  /* Five small numbers on a phone: the hints live on the tabs they lead to. */
  .cs-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .cs-stat {
    padding: 8px 10px;
  }
  .cs-stat small {
    display: none;
  }
  .cs-stat-label {
    font-size: 9px;
    letter-spacing: 0.06em;
  }
  .cs-cta {
    width: 100%;
  }
  .cs-stat strong {
    font-size: 20px;
  }
  /* A seven-column month does not fit a phone: the calendar becomes a list of days. */
  .cs-cal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cs-cal-weekday {
    display: none;
  }
  .cs-cal-day,
  .cs-calendar[data-mode='month'] .cs-cal-day {
    min-height: 0;
  }
  .cs-calendar[data-mode='month'] .cs-cal-day.empty {
    display: none;
  }
  .cs-when {
    margin-left: 0;
    flex-basis: 100%;
  }
  /* The ten platforms as one row of marks; the state is the ring, the words are in the title. */
  .cs-platform {
    padding: 2px;
  }
  .cs-platform-name,
  .cs-platform-state {
    display: none;
  }
  .cs-platform.connected {
    box-shadow: 0 0 0 1px var(--cs-published);
  }
  .cs-published-row {
    flex-wrap: wrap;
  }
}

/* ---- analytics ---------------------------------------------------------------------------- */
.cs-analytics {
  display: grid;
  gap: var(--space-4);
}
.cs-collecting {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(63, 216, 255, 0.35);
  background: rgba(63, 216, 255, 0.05);
  color: var(--text);
  font-size: var(--type-body);
  line-height: 1.45;
}
.cs-variety {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--space-3);
}
.cs-variety > div,
.cs-table-wrap {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.cs-variety h3,
.cs-table-wrap h3 {
  margin: 0 0 8px;
  font-size: var(--type-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-table-wrap .cs-toolbar h3 {
  margin: 0;
}
.cs-variety ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-variety li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: var(--type-small);
}
.cs-variety strong {
  font-variant-numeric: tabular-nums;
}
.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--type-small);
}
.cs-table th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-strong, var(--line));
  color: var(--muted);
  font-size: var(--type-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.cs-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.cs-table td .cs-pf {
  vertical-align: middle;
}
.cs-table a {
  color: var(--text);
}
.cs-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cs-num.unmeasured {
  color: var(--muted);
}
.cs-boost {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: rgba(245, 196, 81, 0.16);
  color: var(--cs-waiting);
  font-size: var(--type-micro);
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 760px) {
  /* A nine-column table does not fit a phone: each row becomes a small card. */
  .cs-table thead {
    display: none;
  }
  .cs-table,
  .cs-table tbody,
  .cs-table tr,
  .cs-table td {
    display: block;
    width: 100%;
  }
  .cs-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .cs-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border: 0;
    text-align: right;
  }
  .cs-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    text-align: left;
  }
}

/* --- Fixes, 24 Sep: the Needs-you bubble panel and the centered business logo ------------------ */
/* The panel's grid sized its track to the longest line of text (min-width: auto), so cards were
   wider than the popover and every sentence ran off its edge behind a sideways scrollbar. */
.atlas-popover.popover-needs {
  width: min(420px, calc(100vw - 24px));
  overflow-x: hidden;
}
.bubble-panel,
.bubble-panel .needs-you,
.bubble-panel .needs-you-item {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.bubble-panel .needs-you * {
  min-width: 0;
  overflow-wrap: anywhere;
}
/* The business logo sits centered in the top of the left menu, as in GoHighLevel. */
.business-brand.has-logo {
  justify-content: center;
}
.business-brand-logo {
  margin-inline: auto;
  object-position: center center;
}

/* ==========================================================================================
 * The business owner's console (customer-console.js): a customer signed in with Google or
 * email sees their own business and nothing else. Its own frame, so none of the Owner's layout
 * rules apply; the palette is the ATLAS workspace's.
 * ========================================================================================== */

.atlas-app[data-workspace='customer'] {
  display: block;
  min-height: 100vh;
  background: #05080e;
}
body:has(.atlas-app[data-workspace='customer']) {
  background: #05080e;
}
.signin-card .signin-customer {
  display: block;
  margin: 18px 0 12px;
  font-weight: 700;
}
.signin-card .signin-owner {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: var(--type-small);
}
.cust-app {
  --ink: #05080e;
  --surface: #0a111c;
  --surface2: #0e1726;
  --line: rgba(120, 200, 255, 0.12);
  --line-strong: rgba(120, 200, 255, 0.22);
  --text: #eaf4ff;
  --muted: #8ba1b8;
  --cyan: #3fd8ff;
  --violet: #8b7bff;
  --gold: #f5c451;
  --ok: #3ddc97;
  --warn: #ffb547;
  --stop: #ff6b6b;
  --idle: #5f7187;
  --surface-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(1200px 600px at 78% -10%, rgba(63, 216, 255, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(139, 123, 255, 0.06), transparent 60%),
    var(--ink);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  overflow-x: hidden;
}
.cust-top {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 12, 20, 0.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 5;
  min-width: 0;
}
.cust-wordmark {
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cyan);
  font-size: 15px;
  flex: none;
}
.cust-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  flex: 1 1 auto;
}
.cust-brand-logo {
  height: 36px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  flex: none;
}
.cust-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(63, 216, 255, 0.25), rgba(139, 123, 255, 0.25));
  border: 1px solid var(--line-strong);
  font-weight: 800;
  font-size: 13px;
  flex: none;
}
.cust-brand-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.cust-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.cust-switch-label {
  color: var(--muted);
  font-size: var(--type-small);
}
.cust-switch select {
  min-width: 0;
  max-width: 320px;
  width: 100%;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}
.cust-switch select option {
  background: #0e1726;
  color: #eaf4ff;
}
.cust-profile {
  position: relative;
  flex: none;
  margin-left: auto;
}
.cust-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(63, 216, 255, 0.3), rgba(139, 123, 255, 0.3));
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.cust-menu {
  position: absolute;
  right: 0;
  top: 48px;
  width: min(280px, calc(100vw - 32px));
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #0c1522;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.cust-menu p {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.cust-menu-name {
  font-weight: 700;
}
.cust-menu-email,
.cust-menu-role {
  color: var(--muted);
  font-size: var(--type-body);
}
.cust-signout {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.cust-rail {
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  background: rgba(7, 12, 20, 0.6);
}
.cust-nav {
  display: grid;
  gap: 4px;
}
.cust-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--type-base);
  font-weight: 600;
}
.cust-link.active,
.cust-link:hover {
  color: var(--text);
  background: rgba(63, 216, 255, 0.08);
}
.cust-link.active {
  box-shadow: inset 2px 0 0 var(--cyan);
}
.cust-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.cust-main {
  min-width: 0;
  padding: 24px 28px 48px;
}
.cust-room {
  display: grid;
  gap: 18px;
  max-width: 1100px;
  min-width: 0;
}
.cust-hero h1 {
  margin: 2px 0 6px;
  font-size: 28px;
  line-height: 1.2;
}
.cust-hero.compact h1 {
  font-size: 23px;
}
.cust-eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: var(--type-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cust-lede,
.cust-muted {
  color: var(--muted);
  margin: 0;
}
.cust-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cust-tile {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.cust-tile:hover {
  border-color: var(--line-strong);
}
.cust-tile-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold);
}
.cust-tile-label {
  font-weight: 700;
}
.cust-tile-note {
  color: var(--muted);
  font-size: var(--type-body);
}
.cust-card {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  min-width: 0;
}
.cust-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
}
.cust-card p {
  margin: 0 0 10px;
  line-height: 1.55;
}
.cust-button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(63, 216, 255, 0.5);
  background: rgba(63, 216, 255, 0.14);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cust-button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.cust-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
  color: #ffb4b4;
}
.cust-david {
  max-width: 820px;
}
.cust-chat-log {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 240px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.cust-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.cust-bubble p {
  margin: 0 0 6px;
}
.cust-bubble p:last-child {
  margin-bottom: 0;
}
.cust-bubble.you {
  justify-self: end;
  background: rgba(63, 216, 255, 0.14);
  border: 1px solid rgba(63, 216, 255, 0.3);
}
.cust-bubble.david {
  justify-self: start;
  background: rgba(139, 123, 255, 0.1);
  border: 1px solid rgba(139, 123, 255, 0.28);
}
.cust-bubble-who {
  display: block;
  font-size: var(--type-small);
  color: var(--violet);
  font-weight: 700;
  margin-bottom: 2px;
}
.cust-chat-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.cust-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface2);
  color: var(--text);
  font: inherit;
}
.cust-app .cs {
  min-width: 0;
}
@media (max-width: 760px) {
  .cust-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 56px auto minmax(0, 1fr);
  }
  .cust-top {
    grid-column: 1;
    padding: 0 16px;
    gap: 10px;
  }
  .cust-wordmark {
    display: none;
  }
  .cust-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px;
    position: sticky;
    top: 56px;
    z-index: 4;
    background: rgba(7, 12, 20, 0.94);
  }
  .cust-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cust-link {
    justify-content: center;
    padding: 8px 6px;
    font-size: var(--type-body);
    gap: 6px;
  }
  .cust-link.active {
    box-shadow: inset 0 -2px 0 var(--cyan);
  }
  .cust-link .cust-icon {
    display: none;
  }
  .cust-link span {
    white-space: nowrap;
  }
  .cust-main {
    padding: 18px 16px 40px;
  }
  .cust-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .cust-hero h1 {
    font-size: 23px;
  }
  .cust-bubble {
    max-width: 92%;
  }
}

/* Users & Roles (users-roles.js): the Owner invites the people who run each business. */
.ur {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.ur-invite,
.ur-business {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-card);
  min-width: 0;
}
.ur-invite h2,
.ur-business h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.ur-help,
.ur-sub {
  color: var(--muted);
  font-size: var(--type-body);
  margin: 0 0 10px;
}
.ur-sub {
  display: block;
  margin: 2px 0 0;
}
.ur-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.ur-field {
  display: grid;
  gap: 4px;
  font-size: var(--type-body);
  color: var(--muted);
  min-width: 0;
}
.ur-field input,
.ur-field select,
.ur-table select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong, var(--line));
  background: var(--surface2, #0e1726);
  color: var(--text);
  font: inherit;
}
.ur-field select option,
.ur-table select option {
  background: #0e1726;
  color: #eaf4ff;
}
.ur-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  font-size: var(--type-body);
}
.ur-primary,
.ur-secondary,
.ur-danger {
  padding: 9px 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}
.ur-primary {
  border: 1px solid rgba(63, 216, 255, 0.5);
  background: rgba(63, 216, 255, 0.14);
}
.ur-secondary {
  border: 1px solid var(--line-strong, var(--line));
  background: transparent;
}
.ur-danger {
  border: 1px solid rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.14);
}
.ur-list {
  display: grid;
  gap: 14px;
}
.ur-table-wrap {
  overflow-x: auto;
}
.ur-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--type-body);
}
.ur-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.ur-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ur-removed td {
  opacity: 0.55;
}
.ur-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--type-small);
  font-weight: 700;
}
.ur-status-active {
  color: var(--ok, #3ddc97);
  background: rgba(61, 220, 151, 0.12);
}
.ur-status-invited {
  color: var(--gold, #f5c451);
  background: rgba(245, 196, 81, 0.12);
}
.ur-status-removed {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}
.ur-error,
.ur-notice {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
}
.ur-error {
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
  color: #ffb4b4;
}
.ur-notice {
  border: 1px solid rgba(61, 220, 151, 0.4);
  background: rgba(61, 220, 151, 0.08);
}
