/* ============================================================================
   1. DESIGN TOKENS & BASE RESET (PHOENIX CV Spatial Chromatic WebGL Engine)
   ============================================================================ */
:root {
  --app-vh: 1vh;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: 'TheSeasons', 'Cormorant Garamond', 'Noto Serif SC', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-dark-400: #060b1d;
  --color-dark-500: #051125;
  --color-brand-white: #f5f5f5;
  --color-brand-blue: #3762be;
  --color-brand-blue-200: #88aeff;
  --color-brand-blue-300: #062969;
  --color-brand-blue-500: #143a8a;
  --color-brand-blue-600: #00276e;
  --color-brand-black: #29345a;
  --color-brand-rose-200: #6248a4;
  --radius-xs: 8px;
  --reveal-radius: 0vmax;
  --reveal-feather: 14vmax;
  /* Unified Spatial Glass & Control System Tokens */
  --control-height: 38px;
  --control-radius: 9999px;
  --glass-light-bg: rgba(255, 255, 255, 0.54);
  --glass-light-bg-hover: rgba(255, 255, 255, 0.76);
  --glass-light-border: rgba(36, 44, 78, 0.12);
  --glass-light-shadow: 0 8px 28px rgba(36, 44, 78, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  --glass-dark-bg: rgba(10, 15, 32, 0.62);
  --glass-dark-bg-hover: rgba(18, 26, 52, 0.80);
  --glass-dark-border: rgba(255, 255, 255, 0.15);
  --glass-dark-shadow: 0 12px 36px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --ink-light-primary: #1b2240;
  --ink-light-muted: #525c82;
  --ink-dark-primary: #f4f7ff;
  --ink-dark-muted: #9aa7c7;
  --accent-champagne: #e8b88a;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-sans);
  background-color: #f8f7fd;
  color: var(--color-brand-black);
}

body.is-home {
  background-color: #e5def9;
  user-select: none;
  -webkit-user-select: none;
}

body.is-subpage {
  background-color: #f8f7fd !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: auto !important;
}

.is-subpage #liquid-cursor,
.is-subpage #liquid-glass-filter,
.is-subpage svg.fixed {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.is-subpage * {
  cursor: auto;
}

.is-subpage a,
.is-subpage button,
.is-subpage [role="button"],
.is-subpage select {
  cursor: pointer !important;
}

.is-subpage input,
.is-subpage textarea {
  cursor: text !important;
  user-select: text !important;
}

/* Enable smooth text selection inside all form controls & drawer panels */
input,
textarea,
#advisor-chat-list,
#tab-panel-blueprint,
.selectable-text {
  user-select: text;
  -webkit-user-select: text;
}

body.dark-mode {
  color: #ffffff;
}

.font-serif-editorial {
  font-family: var(--font-serif) !important;
  font-style: italic;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(6, 11, 29, 0.12);
}
::-webkit-scrollbar-thumb {
  background: rgba(136, 174, 255, 0.45);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(136, 174, 255, 0.8);
}
