/* Orbit base — shared tokens, resets, layout primitives, fonts.
   V3: Mission Control + Alo + Drishti-midnight cohabit.
   Themes layer ON TOP via .theme-xavier, .theme-gia, .theme-parent.
   Source of truth: orbit_v3_alo_gia_only_v1.html mockup. */

:root {
  /* ---- SHARED ALO PALETTE (Gia + parent + roadmap) ---- */
  --cream:        #FAF7F2;
  --cream-lift:   #FBFAF7;
  --cream-deep:   #F5F1EA;
  --ivory:        #FFFFFF;
  --ink:          #1A1815;
  --ink-soft:     #2C2925;
  --ink-mid:      #6F6A62;
  --ink-dim:      #9A938A;
  --ink-faint:    #C9C2B6;
  --rule:         rgba(26, 24, 21, 0.08);
  --rule-soft:    rgba(26, 24, 21, 0.05);
  --rule-strong:  rgba(26, 24, 21, 0.14);
  --clay:         #D4B79E;
  --gold-warm:    #B89968;

  /* ---- GIA ACCENT — dusty rose ---- */
  --g-accent:      #C9A8A0;
  --g-accent-deep: #B98F86;
  --g-accent-soft: rgba(201, 168, 160, 0.22);
  --g-accent-fade: rgba(201, 168, 160, 0.10);
  --g-accent-rule: rgba(185, 143, 134, 0.24);

  /* ---- MISSION CONTROL (Xavier) ---- */
  --mc-bg:        #0A0E1F;
  --mc-bg-lift:   #111733;
  --mc-bg-deep:   #060919;
  --mc-cyan:      #00D4FF;
  --mc-cyan-soft: #7FE4F2;
  --mc-cyan-dim:  #2A6F7A;
  --mc-cyan-glow: rgba(0, 212, 255, 0.25);
  --mc-ivory:     #E8ECF5;
  --mc-dim:       #6B7799;
  --mc-rule:      rgba(0, 212, 255, 0.18);
  --mc-rule-soft: rgba(0, 212, 255, 0.08);
  --mc-orange:    #FF6B35;
  --mc-ok:        #00FF88;

  /* ---- PARENT — Drishti midnight ---- */
  --pa-bg:        #0E1428;
  --pa-bg-lift:   #161D33;
  --pa-bg-deeper: #0A1020;
  --pa-ivory:     #E8E4D8;
  --pa-ivory-dim: #A0A092;
  --pa-gold:      #D8B871;
  --pa-gold-soft: #E8CD8F;
  --pa-gold-dim:  #8A7449;
  --pa-blue-gray: #5B6B85;
  --pa-rule:      rgba(91, 107, 133, 0.22);
  --pa-gold-rule: rgba(216, 184, 113, 0.35);
  --pa-warn:      #E08B5C;
  --pa-ok:        #8FB87C;

  /* ---- Legacy generic tokens (some pages still reference) ---- */
  --bg: var(--cream);
  --bg-elev: var(--cream-lift);
  --bg-card: var(--cream-lift);
  --fg: var(--ink);
  --fg-muted: var(--ink-mid);
  --fg-dim: var(--ink-dim);
  --accent: var(--ink);
  --accent-bright: var(--g-accent-deep);
  --accent-cool: var(--g-accent);
  --line: var(--rule);
  --line-strong: var(--rule-strong);
  --danger: #B86B5C;
  --success: #8FB87C;

  /* ---- Radii / spacing / type / motion ---- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 12px;
  --gap-4: 16px;
  --gap-5: 24px;
  --gap-6: 32px;
  --gap-7: 48px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', "Iowan Old Style", Georgia, serif;
  --font-mono: 'JetBrains Mono', "SF Mono", Menlo, monospace;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --fz-xs: 11px;
  --fz-sm: 12.5px;
  --fz-base: 15px;
  --fz-md: 17px;
  --fz-lg: 22px;
  --fz-xl: 30px;
  --fz-2xl: 42px;

  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --dur-fast: 140ms;
  --dur-med: 280ms;
  --dur-slow: 520ms;

  --maxw: 520px;
  --container-pad: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: contain;
  font-feature-settings: "ss01" on, "kern" on;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: max(env(safe-area-inset-top), 0px);
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
}

/* --- Native button reset (every interactive element is a real <button>) --- */
button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* --- Tap debug pill (dev-only) --- */
.tap-debug {
  position: fixed;
  top: max(env(safe-area-inset-top), 8px);
  right: 8px;
  z-index: 9999;
  background: rgba(40, 220, 130, 0.88);
  color: #06140A;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}
body.is-dev .tap-debug { display: block; }
.tap-debug.flash { opacity: 1; transform: translateY(0); }

/* --- Generic muted text --- */
.muted { color: var(--ink-dim); }
