/* Vibe Deus shell: tokens, layout and shared components.
   Visual language: the Vibe Deus landing page. Existing token names stay stable.
   Every tool page loads this file first, then adds its own page CSS. */

/* Fonts are bundled (static/fonts), so the desktop app renders the same offline. */
@import url('/static/fonts/fonts.css');

:root {
  /* Core colours */
  --bg: #050508;
  --surface-1: #0c0c10;
  --surface-2: #141419;
  --border: #28251f;
  --border-strong: #494132;
  --text: #e4e0d7;
  --text-muted: #96949d;
  --ok: #2ecc71;
  --warn: #f0a030;
  --err: #e5484d;
  --info: #5b8def;
  --off: #4a4a5e;

  /* Tool accents. A page sets its own with <body data-tool="..."> */
  --orpheus: #00cec9;    --orpheus-rgb: 0, 206, 201;
  --sirene: #7c6cf0;     --sirene-rgb: 124, 108, 240;
  --apollo: #c9a84c;     --apollo-rgb: 201, 168, 76;
  --atlas: #4a90e2;      --atlas-rgb: 74, 144, 226;
  --prometheus: #e67e22; --prometheus-rgb: 230, 126, 34;
  --accent: var(--apollo);
  --accent-rgb: var(--apollo-rgb);

  /* Spacing and radius */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-sm: 3px; --radius-md: 4px; --radius-lg: 6px; --radius-pill: 999px;

  /* Type */
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-display: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Legacy names used by older page CSS. Keep until every page is migrated. */
  --surface: var(--surface-1);
  --surface2: var(--surface-2);
  --border-hi: var(--border-strong);
  --text-dim: var(--text-muted);
  --gold: #c9a84c; --gold-dim: #8a7030; --gold-glow: #c9a84c20;
  --purple: #7c6cf0; --teal: #00cec9; --cyan: #00cec9;
  --red: #e5484d; --orange: #e67e22; --blue: #4a90e2; --green: #2ecc71; --pink: #e84393;
}

/* --accent-soft must be declared on body: a var() inside a custom property resolves
   where it is declared, so a :root declaration would always use the default accent. */
body { --accent-soft: rgba(var(--accent-rgb), 0.14); }
body[data-tool="orpheus"]    { --accent: var(--orpheus);    --accent-rgb: var(--orpheus-rgb); }
body[data-tool="sirene"]     { --accent: var(--sirene);     --accent-rgb: var(--sirene-rgb); }
body[data-tool="apollo"]     { --accent: var(--apollo);     --accent-rgb: var(--apollo-rgb); }
body[data-tool="atlas"]      { --accent: var(--atlas);      --accent-rgb: var(--atlas-rgb); }
body[data-tool="prometheus"] { --accent: var(--prometheus); --accent-rgb: var(--prometheus-rgb); }

/* ── Base ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body.ht {
  margin: 0;
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/20px var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

:where(body.ht) a { color: var(--accent); text-decoration: none; }
:where(body.ht) a:hover { text-decoration: underline; }
body.ht h1, body.ht h2, body.ht h3, body.ht p { margin: 0; }
:where(body.ht) button, :where(body.ht) input, :where(body.ht) select, :where(body.ht) textarea { font: inherit; color: inherit; }

/* Shared icon geometry; symbols remain outside document flow. */
.ht-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.ht-icon { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.ht-nav-icon { display: flex; color: var(--dot, var(--gold)); }
.ht-nav-label { padding: 0 10px 14px; }
.ht-tool > .ht-icon { width: 32px; height: 32px; color: var(--accent); }
.ht-title > .ht-overline { margin-bottom: 8px; color: var(--gold); }
body.ht { background-image: radial-gradient(ellipse at 70% 0, #c9a84c05, transparent 65%); }
.ht-sidebar { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.ht-brand-mark { display: grid; place-items: center; border: 1px solid var(--gold-dim); }
.ht-brand-mark .ht-icon { width: 20px; height: 20px; }
.ht-status span:last-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.ht-status { min-height: 36px; }
.ht-account .ht-btn { margin-left: -10px; }
.ht-account .ht-icon { width: 16px; height: 16px; }
.ht-mobile-account { display: none; }

/* ── Sidebar (desktop) ────────────────────────────────── */

.ht-sidebar {
  flex: 0 0 244px;
  width: 244px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 32px 18px 20px;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
}

.ht-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 38px;
  font: 700 17px/28px var(--font-display);
  letter-spacing: 0.02em;
  color: var(--gold);
  white-space: nowrap;
}
.ht-brand:hover { text-decoration: none; color: var(--gold); }
.ht-brand-mark { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none; background: #000; }
.ht-brand-mark img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.9); }

.ht-nav { display: flex; flex-direction: column; gap: var(--space-1); }

.ht-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 700 13px/20px var(--font-display);
  color: var(--text-muted);
}
.ht-nav a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.ht-nav a.active { color: var(--text); background: linear-gradient(90deg, #c9a84c12, transparent); border-color: var(--border); border-left-color: var(--gold); }

.ht-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--text-muted));
}
.ht-dot--orpheus { --dot: var(--orpheus); }
.ht-dot--sirene { --dot: var(--sirene); }
.ht-dot--apollo { --dot: var(--apollo); }
.ht-dot--atlas { --dot: var(--atlas); }
.ht-dot--prometheus { --dot: var(--prometheus); }
.ht-dot--ok { --dot: var(--ok); }
.ht-dot--off { --dot: var(--off); }
.ht-dot--warn { --dot: var(--warn); }
.ht-dot--err { --dot: var(--err); }

.ht-planned {
  padding: 18px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 16px;
}
.ht-planned .ht-overline { margin: 0 10px; }
.ht-planned summary { padding-block: 12px; cursor: pointer; }
.ht-planned summary::marker { color: var(--gold-dim); }
.ht-planned[open] summary { margin-bottom: 8px; }
.ht-planned .ht-nav a { font: 400 12px/20px var(--font-ui); min-height: 38px; padding-block: 8px; }
.ht-planned .ht-icon { width: 19px; height: 19px; color: var(--gold-dim); }

.ht-sidebar-status {
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ht-sidebar-status > .ht-status { margin: 0 12px; }
a.ht-status { color: var(--text-muted); }
a.ht-status:hover { color: var(--text); text-decoration: none; }
.ht-nav--settings { margin-top: 8px; }
.ht-gear { flex: 0 0 24px; }
.ht-bottombar-settings { min-width: 44px; }
/* Public site: who is signed in, and a way out (shell.js adds these). */
.ht-account { display: grid; gap: 4px; margin: 16px 10px 0; padding-top: 16px; border-top: 1px solid var(--border); }
.ht-account-email { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-account .ht-btn { justify-self: start; }
.ht-bottombar-signout { flex: 1 1 0; min-width: 44px; background: none; border: 0; color: var(--text-muted); font: 500 11px/1 var(--font-ui); cursor: pointer; }

.ht-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 11px;
  line-height: 16px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Bottom bar (phone) ───────────────────────────────── */

.ht-bottombar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  min-height: 72px;
  height: calc(72px + env(safe-area-inset-bottom, 0px));
  align-items: center;
  justify-content: space-between;
  padding: 0 4px env(safe-area-inset-bottom, 0px);
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  z-index: 50;
}
.ht-bottombar a, .ht-bottombar-signout {
  display: flex;
  flex: 1 1 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  padding: 0 2px;
  font-size: 9px;
  line-height: 16px;
  color: var(--text-muted);
}
.ht-bottombar a.active { color: var(--text); background: #c9a84c0a; box-shadow: inset 0 1px var(--gold); }
.ht-bottombar a:hover { text-decoration: none; }

/* ── Main column ──────────────────────────────────────── */

.ht-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ht-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 40px 44px 28px;
}
.ht-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ht-tool {
  font: 700 32px/40px var(--font-display);
  letter-spacing: 0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-wrap: anywhere;
}
.ht-sub { font-size: 13px; line-height: 22px; color: var(--text-muted); }

.ht-tabs {
  display: flex;
  gap: 8px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.ht-tabs::-webkit-scrollbar { display: none; }

.ht-tab {
  flex: 0 0 auto;
  padding: 12px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font: 500 13px/16px var(--font-ui);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.ht-tab:hover { color: var(--text); text-decoration: none; }
.ht-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ht-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }

.ht-content {
  flex: 1 1 auto;
  padding: 28px 44px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ht-panel { display: none; }
.ht-panel.active { display: block; }

/* ── Type helpers ─────────────────────────────────────── */

.ht-overline {
  font: 400 10px/16px var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ht-h { font: 600 15px/20px var(--font-ui); color: var(--text); }
.ht-small { font-size: 12px; line-height: 16px; }
.ht-muted { color: var(--text-muted); }
.ht-mono { font: 400 13px/18px var(--font-mono); }
.ht-accent { color: var(--accent); }
.ht-warn-text { color: var(--warn); }
.ht-err-text { color: var(--err); }
.ht-ok-text { color: var(--ok); }

/* ── Buttons ──────────────────────────────────────────── */

.ht-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  min-height: 44px;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font: 500 13px/16px var(--font-ui);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ht-btn:hover { border-color: var(--accent); text-decoration: none; }
.ht-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* One focus ring for everything else that takes the keyboard. */
:where(body.ht) :is(a, input, select, textarea, summary, [tabindex], .ht-chip, .ht-row, .ht-preset, .ht-check):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.ht-btn:disabled, .ht-btn[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }

.ht-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.ht-btn--primary:hover { filter: brightness(1.1); }
.ht-btn--ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.ht-btn--ghost:hover { color: var(--text); background: var(--surface-2); border-color: transparent; }
.ht-btn--sm { padding: 7px 12px; min-height: 34px; font-size: 12px; }

/* ── Cards and tiles ──────────────────────────────────── */

.ht-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ht-card--tight { padding: 16px; gap: 10px; }
.ht-card > .ht-h { margin: 0; }

.ht-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.ht-stat {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ht-stat-value {
  font: 500 28px/32px var(--font-mono);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ht-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ht-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ht-split { display: flex; gap: 24px; align-items: flex-start; }
.ht-split > .ht-split-main { flex: 1 1 auto; min-width: 0; }
.ht-split > .ht-split-side { flex: 0 0 360px; width: 360px; display: flex; flex-direction: column; gap: 16px; }
.ht-stack { display: flex; flex-direction: column; gap: 16px; }
.ht-row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ht-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ht-toolbar .ht-spacer { flex: 1 1 auto; }

/* ── Badge, chip, status, banner ──────────────────────── */

.ht-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font: 400 13px/18px var(--font-mono);
  color: var(--accent);
  white-space: nowrap;
}
.ht-badge--warn { background: rgba(240, 160, 48, 0.14); color: var(--warn); }
.ht-badge--err { background: rgba(229, 72, 77, 0.14); color: var(--err); }
.ht-badge--ok { background: rgba(46, 204, 113, 0.14); color: var(--ok); }
.ht-badge--muted { background: var(--surface-2); color: var(--text-muted); }

.ht-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  font: 500 13px/16px var(--font-ui);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.ht-chip:hover { color: var(--text); border-color: var(--border-strong); }
.ht-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

.ht-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--info);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.ht-banner--warn { border-left-color: var(--warn); }
.ht-banner--err { border-left-color: var(--err); }
.ht-banner--ok { border-left-color: var(--ok); }
.ht-banner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ht-banner-title { font: 600 15px/20px var(--font-ui); color: var(--text); }
.ht-banner-detail { font-size: 12px; line-height: 16px; color: var(--text-muted); }

/* ── Inputs ───────────────────────────────────────────── */

.ht-input, .ht-select, .ht-textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font: 400 14px/20px var(--font-ui);
  color: var(--text);
  outline: none;
}
.ht-input::placeholder, .ht-textarea::placeholder { color: var(--text-muted); }
.ht-input:focus, .ht-select:focus, .ht-textarea:focus { border-color: var(--accent); }
.ht-select { appearance: none; -webkit-appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8aa0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.ht-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ht-field > label { font: 400 10px/16px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.ht-input--sm, .ht-select--sm { padding: 5px 10px; font-size: 13px; line-height: 16px; }

.ht-check {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  flex: 0 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
}
.ht-check:checked { background: var(--accent); border-color: var(--accent); }
.ht-check:checked::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: translateY(-1px) rotate(-45deg);
}

/* ── Lists and rows ───────────────────────────────────── */

.ht-list {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ht-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.ht-row:last-child { border-bottom: 0; }
.ht-row.selected { background: var(--accent-soft); }
.ht-row:hover { background: var(--surface-2); }
.ht-row.selected:hover { background: var(--accent-soft); }
.ht-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ht-row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-row-sub { font-size: 12px; line-height: 16px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ht-kv { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ht-kv .ht-mono { color: var(--text-muted); }

.ht-preset {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  text-align: left;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.ht-preset:hover { border-color: var(--accent); background: var(--surface-2); }
.ht-preset:disabled { opacity: 0.45; cursor: default; }
.ht-preset-name { font: 600 15px/20px var(--font-ui); }
.ht-preset-desc { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.ht-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.ht-finding { display: flex; gap: 10px; align-items: flex-start; }
.ht-finding .ht-dot { margin-top: 6px; }
.ht-finding-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ht-finding-sub { font-size: 12px; line-height: 16px; color: var(--text-muted); }

.ht-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 64px 16px;
  text-align: center;
}
.ht-empty .ht-h { margin: 0; }
.ht-empty .ht-small { color: var(--text-muted); max-width: 520px; }

.ht-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ht-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes ht-spin { to { transform: rotate(360deg); } }

/* ── Bars (simple charts) ─────────────────────────────── */

.ht-bars { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 172px; }
.ht-bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; cursor: default; }
.ht-bar i { display: block; width: 100%; min-height: 2px; border-radius: 2px; background: var(--accent); }
.ht-bar span { font-size: 10px; line-height: 16px; color: var(--text-muted); white-space: nowrap; }
.ht-bar.gap i { background: var(--border); height: 2px; }
.ht-bar.gap span { color: var(--warn); }
.ht-bar.clickable { cursor: pointer; }
.ht-bar.clickable:hover i { filter: brightness(1.2); }

/* ── Hub tool cards ───────────────────────────────────── */

.ht-tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  color: var(--text);
  transition: border-color 0.15s;
}
.ht-tool-card:hover { border-color: var(--tool, var(--border-strong)); text-decoration: none; }
.ht-tool-card-top { display: flex; align-items: center; gap: 10px; }
.ht-tool-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(var(--tool-rgb), 0.14);
  display: grid; place-content: center;
}
.ht-tool-mark { color: var(--tool, var(--gold)); width: 48px; height: 48px; background: transparent; border: 1px solid var(--border-strong); border-radius: 50%; }
.ht-tool-mark .ht-icon { width: 26px; height: 26px; }
.ht-tool-name { font: 700 18px/28px var(--font-display); letter-spacing: 0.02em; }
.ht-tool-desc { color: var(--text-muted); }
.ht-tool-open { font: 500 13px/16px var(--font-ui); color: var(--tool); }

.ht-planned-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
}
.ht-planned-card b { font-weight: 500; font-size: 13px; color: var(--text); }

/* ── Docs prose ───────────────────────────────────────── */

.ht-prose { max-width: 720px; display: flex; flex-direction: column; gap: 12px; color: var(--text-muted); }
.ht-prose h2 { font: 600 15px/20px var(--font-ui); color: var(--text); margin-top: 12px; }
.ht-prose h3 { font: 500 13px/16px var(--font-ui); color: var(--text); margin-top: 4px; }
.ht-prose code, .ht-prose pre { font: 400 12px/18px var(--font-mono); background: var(--surface-2); border-radius: 4px; }
.ht-prose code { padding: 1px 5px; }
.ht-prose pre { padding: 12px; overflow-x: auto; margin: 0; color: var(--text); }
.ht-prose table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ht-prose th, .ht-prose td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.ht-prose th { font-weight: 500; color: var(--text); }
.ht-prose ul, .ht-prose ol { margin: 0; padding-left: 20px; }
.ht-prose strong { color: var(--text); font-weight: 500; }

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 900px) {
  .ht-sidebar { display: none; }
  .ht-mobile-account { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
  .ht-mobile-account .ht-overline { color: var(--gold); white-space: nowrap; }
  .ht-bottombar { display: flex; }
  .ht-main { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .ht-header { padding: 28px 20px 20px; flex-wrap: wrap; }
  .ht-tool { font-size: 26px; line-height: 34px; }
  .ht-tool > .ht-icon { width: 28px; height: 28px; }
  .ht-title { flex-basis: 200px; }
  .ht-tabs { padding: 0 4px; gap: 4px; }
  .ht-content { padding: 24px 20px 32px; gap: 20px; }
  .ht-btn, .ht-chip, .ht-tab, .ht-status, .ht-input--sm, .ht-select--sm { min-height: 44px; }
  .ht-check { width: 44px; height: 44px; flex-basis: 44px; }
  .ht-banner { flex-wrap: wrap; }
  .ht-banner-text { flex-basis: 200px; }
  .ht-card { padding: 20px; }
  .ht-preset-grid { grid-template-columns: minmax(0, 1fr); }
  .ht-grid-2, .ht-grid-3 { grid-template-columns: 1fr; }
  .ht-split { flex-direction: column; align-items: stretch; }
  .ht-split > .ht-split-side { flex: 1 1 auto; width: 100%; }
  .ht-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ht-sub { display: block; }
}

/* Public sessions keep Settings but hide local connections and setup controls. */
body[data-public="1"] .ht-status,
body[data-public="1"] #setup,
body[data-public="1"] #reload-btn,
body[data-public="1"] #lc-start,
body[data-public="1"] #lc-csv { display: none !important; }

/* Atlas owns its map layout; keep its blue identity without moving the map controls. */
body[data-tool="atlas"] { --atlas: #4a90e2; }
body[data-tool="atlas"]:not(.ht) { --accent-rgb: 74, 144, 226; }
body[data-tool="atlas"] .at-brand h1 { display: flex; align-items: center; gap: 8px; }
body[data-tool="atlas"] .at-brand h1::before {
  content: ''; width: 24px; height: 24px; background: currentColor;
  mask: url('/static/icons/atlas.svg') center / contain no-repeat;
}
@media (prefers-reduced-motion: reduce) {
  body.ht *, body.ht *::before, body.ht *::after { animation: none !important; transition: none !important; }
}
