/* chrome.css — shared Hub chrome (Topbar, StatusStrip, ModuleLauncher,
   SurfaceToggle) extracted from home.css 2026-06-17 so purchases (and future
   React surfaces) reuse the exact chrome styling instead of duplicating it.
   Tokens (--font, --font-body, --s-*, --status-h, --r-card, --line, --accent,
   --fg*, --bg*) come from the theme files (vesper/cobalt/glass), which every
   page loads — so these rules resolve identically on home and purchases. The
   .theme-picker* styling is injected by theme-switch.js, not here. Loaded by
   BOTH index.html (home) and purchases-react.html. */

/* ---------------- topbar ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  min-height: 88px;
}
.topbar-l { display: flex; align-items: center; gap: var(--s-5); }
.brand-mark {
  display: block;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  /* light / dark marks carry their own colour. */
}
.brand-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.brand-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.brand-wordmark {
  font-family: var(--font);
  font-feature-settings: var(--feat-display);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-transform: lowercase;
  line-height: 1;
}
.brand-slogan {
  font-family: var(--font);
  font-feature-settings: var(--feat-meta);
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: lowercase;
  line-height: 1;
}
.crumb-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: var(--s-5);
  border-left: 1px solid var(--line);
  margin-left: var(--s-3);
}
.crumb {
  font-family: var(--font);
  font-feature-settings: var(--feat-display);
  font-weight: 500; font-size: 22px;
  color: var(--fg); letter-spacing: 0.02em;
  text-transform: lowercase;
  line-height: 1;
}
.crumb-meta {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-style: italic;
  font-size: 13px;
  color: var(--fg-dim);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.crumb-meta .sep { color: var(--fg-ghost); margin: 0 6px; font-style: normal; }

.topbar-r { display: flex; align-items: center; gap: var(--s-2); }

.surface-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  text-transform: lowercase;
  transition: border-color 120ms ease-out, color 120ms ease-out, background 120ms ease-out;
}
.surface-toggle:hover { border-color: var(--accent-dim); color: var(--fg); background: var(--bg-elev); }
.surface-toggle .dot {
  width: 8px; height: 8px; border-radius: var(--r-pill);
  background: var(--accent); display: inline-block;
}
/* icon-only light/dark toggle — sun (light) / moon (dark), no word label */
.surface-toggle-icon { padding: 6px 10px; }
.surface-ico { font-size: 15px; line-height: 1; display: inline-block; }

.launcher {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: lowercase;
  transition: background 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
.launcher:hover { border-color: var(--accent-dim); background: var(--bg-elev); color: var(--fg); }
.launcher .kbd {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-style: italic;
  font-size: 11px;
  color: var(--fg-dim);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-elev);
}

/* ---------------- status strip ---------------- */
.status {
  display: grid; grid-template-columns: auto 1fr auto auto auto auto;
  align-items: center; gap: var(--s-5);
  padding: var(--s-1) var(--s-5);
  border-top: 1px solid var(--line); background: var(--bg);
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-style: italic;
  font-size: 12px; color: var(--fg-dim);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.status .clock {
  font-style: normal;
  font-family: var(--font-body);
  font-feature-settings: var(--feat-text), var(--feat-tnum);
  color: var(--accent);
  font-size: 14px; letter-spacing: 0.04em;
}
.status .clock::before { content: "● "; color: var(--accent); font-style: normal; }
.status .ambient { color: var(--fg-dim); }
.status .weather { color: var(--fg); }
.status .weather .label { color: var(--fg-dim); margin-right: 4px; }
.status .weather .sep { color: var(--fg-ghost); margin: 0 var(--s-2); font-style: normal; }
.status .src { color: var(--fg-faint); font-size: 11px; font-style: italic; }
.status .src .ok  { color: var(--accent);   font-style: normal; }
.status .src .dim { color: var(--fg-ghost); font-style: normal; }
.status .src .warn { color: var(--warn-dim); font-style: normal; }
.status .src .sep { color: var(--fg-ghost); margin: 0 4px; font-style: normal; }
.status .src .reconnect { color: var(--warn-dim); font-style: normal; text-decoration: underline; cursor: pointer; }
.status .src .reconnect:hover { color: var(--warn, var(--accent)); }

/* ---------------- module launcher ---------------- */
.launch-scrim {
  position: fixed; inset: 0;
  background: var(--launch-scrim);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 96px;
  z-index: 50;
  backdrop-filter: blur(3px);
}
.launch-panel {
  width: min(720px, 92vw);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--modal-shadow);
}
.launch-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.launch-head .lbl {
  font-family: var(--font);
  font-feature-settings: var(--feat-display);
  font-weight: 500; font-size: 20px;
  color: var(--fg); letter-spacing: 0.02em;
  text-transform: lowercase;
}
.launch-head .meta {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-style: italic; font-size: 11px;
  color: var(--fg-dim);
}
.launch-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-soft); padding: 1px;
}
.launch-tile {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-5) var(--s-4);
  background: var(--bg-elev);
  border: 0; text-align: left; cursor: pointer;
  transition: background 120ms ease-out;
  min-height: 120px;
}
/* hover = the "select the module" gesture: a hard-stop diagonal fill. quiet by
   default — accent-faint, no lift or shadow — to stay in vesper's flat voice;
   cobalt.css overrides this with its brutalist accent fill + offset shadow. */
.launch-tile:hover { background: linear-gradient(135deg, var(--accent-faint) 50%, var(--bg-elev-2) 50%); }
.launch-tile .tile-name {
  font-family: var(--font);
  font-feature-settings: var(--feat-display);
  font-weight: 500; font-size: 22px;
  color: var(--fg); letter-spacing: 0.02em;
  text-transform: lowercase;
}
.launch-tile .tile-desc {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-text);
  font-size: 13px; color: var(--fg-dim);
  letter-spacing: 0.01em; line-height: 1.55;
}
.launch-tile .tile-meta {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-weight: 500; font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-top: auto;
}
/* ---- tiered launcher: home mainstay → workspaces → utilities ---- */
.launch-tier + .launch-tier { border-top: 1px solid var(--line); }
.tier-label {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-weight: 500; font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-faint);
  padding: var(--s-4) var(--s-4) var(--s-2);
}
/* home tier: one full-width mainstay block, row layout with a trailing arrow —
   biggest type in the launcher so the hub reads as the anchor. */
.launch-grid.tier-home { grid-template-columns: 1fr; }
.launch-tile.tile-home {
  flex-direction: row; align-items: center; justify-content: space-between;
  min-height: 96px;
}
.launch-tile.tile-home .tile-home-text { display: flex; flex-direction: column; gap: var(--s-2); }
.launch-tile.tile-home .tile-name { font-size: 30px; }
.launch-tile.tile-home .tile-arrow {
  font-family: var(--font-body);
  font-size: 26px; color: var(--accent); line-height: 1;
}

.launch-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-style: italic; font-size: 11px;
  color: var(--fg-dim);
}
.launch-foot .kbd {
  font-family: var(--font-body);
  font-feature-settings: var(--feat-meta);
  font-style: italic;
  font-size: 11px; color: var(--fg-mute);
  padding: 1px 6px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--bg);
}
