/* Maya Hub — the few compositions Swarm doesn't have (DESIGN.md § Hub-only).
   Swarm tokens ONLY: scripts/check_design_drift.py fails on a raw colour, a raw radius,
   blur, or a coloured side border in this file. Everything else comes from Swarm's
   tokens.css and app.css, vendored and pinned (design.pin). */

/* The two roots are toggled with [hidden]; Swarm's .app { display: grid } would otherwise win
   and draw the tenant shell under the apex cover (seen in the P1 screenshots, invisible to every check). */
#in[hidden], #apex[hidden] { display: none; }

/* ------------------------------------------------------------ the tenant seal (H011)
   Swarm's .rail__seal is gold fill. Here the screen's primary is the gold send, so the
   seal is gold-quiet: it names the company without spending the Seal Rule budget. */
.hub-seal.sw-sticker {
  background: var(--gold-quiet); color: var(--gold-ink);
  border-radius: var(--r-pill); padding: 2px 8px;
}
.rail__brand .hub-seal { transform: translateY(-1px); }
:root[data-rail="collapsed"] .rail__brand > span:not(.hub-seal) { display: none; }

/* Activity's Needs-you count: attention tone, not gold (a count is not a decision). */
.hub-badge {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-11); font-weight: 700;
  min-width: 18px; padding: 0 6px; line-height: 18px; text-align: center;
  border-radius: var(--r-pill); background: var(--attention-bg); color: var(--attention); flex: none;
}
.hub-badge:empty { display: none; }

/* ------------------------------------------------------------ the thread is the page
   Swarm's Maya is a 400px panel; here the conversation is the whole page. The parts are
   Swarm's (.sw-maya__log, __msg, __bubble, __suggest, __compose…); this only sizes them. */
.hub-chat {
  display: flex; flex-direction: column;
  min-height: calc(100vh - 56px - var(--s-4));
  min-height: calc(100dvh - 56px - var(--s-4));
}
.hub-chat .sw-maya__log {
  flex: 1 1 auto; overflow: visible; background: none;
  padding: 0 0 var(--s-2); justify-content: flex-end;
  width: 100%; max-width: 720px; margin: 0 auto;
}
.hub-chat .sw-maya__bubble { max-width: 70ch; }
.hub-chat .sw-maya__msg--me .sw-maya__bubble { max-width: min(70ch, 85%); }
.hub-dock {
  position: sticky; bottom: 0; z-index: 3;
  width: 100%; max-width: 720px; margin: 0 auto;
  background: var(--canvas);
  padding-bottom: max(var(--s-1), env(safe-area-inset-bottom));
}
.hub-dock .sw-maya__suggest { padding: 8px 0 2px; }
.hub-dock .sw-maya__compose {
  padding: 8px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-soft);
}
.hub-dock .sw-maya__input { background: var(--sunken); }

/* Log lines: a dot and a muted sentence, never a bubble. */
.hub-logline {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: var(--t-13); color: var(--muted);
}
.hub-logline::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--faint);
}

/* Day dividers: a mono label between hairlines. */
.hub-day {
  display: flex; align-items: center; gap: var(--s-1); margin: var(--s-1) 0;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--t-11);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
}
.hub-day::before, .hub-day::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--hairline); }

/* The first-run hello: Maya's avatar and what she can do, centred above the composer. */
.hub-hello { text-align: center; padding: var(--s-5) var(--s-2) var(--s-3); }
.hub-hello .sw-maya__avatar { width: 48px; height: 48px; margin: 0 auto var(--s-2); }
.hub-hello .sw-maya__avatar .sw-mark { width: 22px; height: 22px; }
.hub-hello h1 { font-size: var(--t-28); }
.hub-hello p { margin: var(--s-1) auto 0; max-width: 52ch; color: var(--muted); font-size: var(--t-14); line-height: 1.5; }

/* Placeholder pages (P0–P5): an honest empty state, Swarm's .sw-empty. */
.hub-page { max-width: 720px; margin: 0 auto; }
.hub-page h1 { font-size: var(--t-28); margin-bottom: var(--s-1); }
.hub-page .sw-empty { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }

/* ------------------------------------------------------------ the apex cover
   maya.littlebee.ai carries no tenant (H016): a name, a picker by typed company, legal links. */
.hub-cover { max-width: 520px; margin: 0 auto; padding: 12vh var(--s-2) var(--s-5); }
.hub-cover h1 { font-size: var(--t-40); }
.hub-cover p { color: var(--body); font-size: var(--t-16); line-height: 1.5; }
.hub-cover form { display: flex; gap: var(--s-1); margin-top: var(--s-3); flex-wrap: wrap; }
.hub-cover .sw-input { flex: 1 1 220px; }
.hub-cover__foot { margin-top: var(--s-5); font-size: var(--t-13); color: var(--muted); }
.hub-cover__foot a { color: var(--muted); }

/* The phone's top bar carries the name and seal (the rail is hidden at ≤760). */
.hub-bar-brand { display: none; align-items: baseline; gap: var(--s-1); font-weight: 800; font-size: var(--t-16); color: var(--text); }
@media (max-width: 760px) {
  .hub-bar-brand { display: inline-flex; }
  #where { display: none; }
}

/* ------------------------------------------------------------ phone
   ≤760: Swarm hides the rail and shows its tab bar. The Hub's bar is the four-tab
   (guest) variant — no gold centre button: on Chat the send ↑ is the primary (H011). */
@media (max-width: 760px) {
  .hub-chat { min-height: calc(100dvh - 56px - var(--s-4) - 96px); }
  .hub-dock { bottom: calc(72px + var(--tb-lift)); }
}
@media (pointer: coarse) {
  .hub-dock .sw-maya__send, .hub-dock .sw-maya__mic, .hub-dock .sw-maya__plus { min-width: 44px; height: 44px; }
  .hub-dock .sw-maya__input { min-height: 44px; }
  .hub-dock .sw-maya__chip { min-height: 44px; }
  .hub-cover__foot a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
}
