/* profile/theme.css — base tokens and the page ground for signed-in surfaces.
   New pages link this instead of pasting a :root block, which is how the
   product ended up with four palettes that disagree. */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --page-background: #FFFFFF;
  --text-primary: #363636;
  --text-secondary: #6B6B70;
  --text-tertiary: #6B6B70;      /* AA at 12.5px on white; #8E8E93 fails */
  --shell-hairline: rgba(60, 60, 67, 0.10);
  --card-border: rgba(0, 0, 0, 0.07);
  --code-bg: #F4F4F7;

  --accent-blue: #007AFF;
  --accent-blue-deep: #0060DF;
  --toggle-on: #34C759;
  --success-ink: #248A3D;
  --danger: #E5342B;
  --warning-ink: #B25000;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Critically damped for structure; a little overshoot only for small
     controls that carry momentum (knobs, chevrons). */
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --spring-bounce: cubic-bezier(0.34, 1.4, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-family);
  background-color: var(--page-background);
  color: var(--text-primary);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

/* The Configure aura, shared by every signed-in page. */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 58% at 0% 15%, rgba(255, 130, 80, 0.30) 0%, transparent 65%),
    radial-gradient(ellipse 55% 58% at 100% 25%, rgba(140, 80, 240, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 60% 55% at 95% 85%, rgba(60, 140, 255, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 50% 48% at 50% 0%, rgba(255, 150, 100, 0.19) 0%, transparent 65%);
  background-size: 200% 200%;
  background-position: 30% 30%, 70% 30%, 70% 70%, 50% 30%;
  filter: blur(60px);
  will-change: transform;
  backface-visibility: hidden;
  animation: meshDrift 10s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translateZ(0) translate(0%, 0%) scale(1); }
  33%  { transform: translateZ(0) translate(3%, -2%) scale(1.02); }
  66%  { transform: translateZ(0) translate(-2%, 3%) scale(0.98); }
  100% { transform: translateZ(0) translate(1%, 1%) scale(1.01); }
}
/* A full-viewport blurred surface oscillating this slowly is exactly the
   pattern that triggers vestibular discomfort. It stops on request. */
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; border-radius: 4px; }
