/* ─────────────────────────────────────────────────────────────
   bryonOS · unified theme  v3.0
   One base, one type system, per-module accent for wayfinding.
   Loaded LAST on every page so its tokens win.
   ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* surfaces */
  --os-bg:     #0d1322;
  --os-inset:  #10182b;
  --os-card:   #151e33;
  --os-card2:  #1a2640;
  --os-border: #2a3a5c;

  /* type */
  --os-text:   #f2f5fb;
  --os-muted:  #8a96b3;
  --os-dim:    #5d6a8c;
  --os-faint:  #46537a;

  /* module accents */
  --os-amber:  #f59e0b;  /* Life Score / hub  */
  --os-violet: #a78bfa;  /* Gratitude Vault   */
  --os-green:  #22c55e;  /* Habit Forge       */
  --os-blue:   #60a5fa;  /* Insights          */
  --os-orange: #fb923c;  /* Strength Log      */
  --os-red:    #ff4500;  /* Texas Method      */
  --os-cyan:   #22d3ee;  /* Time Forge        */
  --os-ember:  #e23c33;  /* The Cut           */

  --os-font:   'Inter', -apple-system, 'Segoe UI', sans-serif;
  --os-mono:   'JetBrains Mono', ui-monospace, monospace;
}

/* base — html body out-specifies every page's local body{} rule */
html body {
  background: var(--os-bg);
  color: var(--os-text);
  font-family: var(--os-font);
  -webkit-font-smoothing: antialiased;
}

/* ── OS chrome: identical sticky bar on every page ─────────── */
.osbar {
  position: sticky; top: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  height: 46px; padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: rgba(13,19,34,.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--os-border);
  font-family: var(--os-font);
}
.osbar-home {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--os-text); text-decoration: none;
  font-size: 13px; font-weight: 800; letter-spacing: .4px;
}
.osbar-home .glyph {
  font-family: var(--os-mono); font-weight: 700;
  color: var(--os-amber); font-size: 13px;
}
a.osbar-home { transition: opacity .15s; }
a.osbar-home:hover { opacity: .75; }
.osbar-mod {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--os-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--os-muted);
}
.osbar-mod i {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}

/* old per-page back arrows are replaced by the osbar */
a.back, a.back-btn { display: none !important; }

/* ── readability & quality floor ───────────────────────────── */
:focus-visible { outline: 2px solid var(--os-amber); outline-offset: 2px; border-radius: 4px; }

::selection { background: rgba(245,158,11,.3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--os-bg); }
::-webkit-scrollbar-thumb { background: var(--os-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--os-dim); }

/* keep long content readable on desktop without breaking
   the mobile-first column layouts each module uses */
@media (min-width: 900px) {
  html body { font-size: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
