/* =========================================================
   VITALIS — Premium Design System v3
   Soft · Deep · Calm · Effortless
   ========================================================= */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 3.5rem;
  --nav-h: 4.75rem;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px -4px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px -8px rgba(0,0,0,0.12);
}

html {
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  background: #f3f5f8;
}

html.dark body,
.dark body {
  background: #0b0f15;
}

/* ---------- Ambient page backgrounds (item 2) ---------- */
.app-bg {
  background: #f3f5f8;
  transition: background 0.4s var(--ease);
}
.dark .app-bg {
  background:
    radial-gradient(ellipse 90% 50% at 50% -5%, rgba(20, 184, 166, 0.06), transparent 55%),
    #0b0f15;
}
.app-bg[data-view="blood"] {
  background:
    radial-gradient(ellipse 80% 40% at 80% 0%, rgba(20, 184, 166, 0.07), transparent 50%),
    #f3f5f8;
}
.dark .app-bg[data-view="blood"] {
  background:
    radial-gradient(ellipse 80% 40% at 80% 0%, rgba(20, 184, 166, 0.09), transparent 50%),
    #0b0f15;
}
.app-bg[data-view="sleep"] {
  background:
    radial-gradient(ellipse 80% 40% at 20% 0%, rgba(99, 102, 241, 0.07), transparent 50%),
    #f3f5f8;
}
.dark .app-bg[data-view="sleep"] {
  background:
    radial-gradient(ellipse 80% 40% at 20% 0%, rgba(99, 102, 241, 0.1), transparent 50%),
    #0b0f15;
}
.app-bg[data-view="meds"] {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(245, 158, 11, 0.06), transparent 50%),
    #f3f5f8;
}
.dark .app-bg[data-view="meds"] {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(245, 158, 11, 0.08), transparent 50%),
    #0b0f15;
}

/* ---------- Safe areas ---------- */
.pt-safe { padding-top: max(0.75rem, var(--safe-top)); }
.pb-safe { padding-bottom: max(0.75rem, var(--safe-bottom)); }
.top-safe { top: max(0.5rem, var(--safe-top)); }

/* ---------- Scroll ---------- */
.scroll-area {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ---------- Header ---------- */
.app-header {
  background: rgba(243, 245, 248, 0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.dark .app-header {
  background: rgba(11, 15, 21, 0.86);
  border-bottom-color: rgba(255,255,255,0.04);
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  box-shadow: 0 6px 18px -4px rgba(13, 148, 136, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Bottom Nav ---------- */
.bottom-nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,0.05);
}
.dark .bottom-nav {
  background: rgba(16, 20, 28, 0.94);
  border-top-color: rgba(255,255,255,0.05);
}

.nav-item {
  position: relative;
  color: #94a3b8;
  transition: color 0.25s var(--ease);
  -webkit-user-select: none;
  user-select: none;
}
.nav-item.active { color: #0d9488; }
.dark .nav-item.active { color: #2dd4bf; }

.nav-pill {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 20px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
  transform: translateX(-50%) scaleX(0);
  opacity: 0;
  transition: transform 0.35s var(--ease-spring), opacity 0.25s;
  box-shadow: 0 0 10px currentColor;
}
.nav-item.active .nav-pill {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* ---------- Card depth system (item 4) ---------- */
.card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.035);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.dark .card {
  background: #151a23;
  border-color: rgba(255,255,255,0.04);
  box-shadow: 0 2px 12px -4px rgba(0,0,0,0.35);
}

.card-raised {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-md);
}
.dark .card-raised {
  background: #161b26;
  border-color: rgba(255,255,255,0.045);
  box-shadow: 0 6px 24px -6px rgba(0,0,0,0.45);
}

.card-hero {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-md);
}
.dark .card-hero {
  background: #161b26;
  border-color: rgba(255,255,255,0.04);
  box-shadow: 0 8px 28px -8px rgba(0,0,0,0.5);
}

.card-interactive {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.card-interactive:active {
  transform: scale(0.975);
  transition-duration: 0.1s;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-good { background: #ecfdf5; color: #047857; }
.dark .badge-good { background: rgba(6, 78, 59, 0.4); color: #6ee7b7; }
.badge-warn { background: #fffbeb; color: #b45309; }
.dark .badge-warn { background: rgba(120, 53, 15, 0.35); color: #fcd34d; }
.badge-bad { background: #fff1f2; color: #be123c; }
.dark .badge-bad { background: rgba(136, 19, 55, 0.35); color: #fda4af; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.dark .badge-neutral { background: #1e2533; color: #94a3b8; }

/* ---------- Buttons — fixed & premium ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  border-radius: 16px;
  transition: all 0.22s var(--ease);
  -webkit-user-select: none;
  user-select: none;
  border: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary {
  background: linear-gradient(160deg, #2dd4bf 0%, #0d9488 55%, #0f766e 100%);
  color: #ffffff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 8px 24px -6px rgba(13, 148, 136, 0.5);
  text-shadow: 0 1px 1px rgba(0,0,0,0.12);
}
.btn-primary:active {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.1) inset,
    0 4px 12px -4px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  background: #eef1f6;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.dark .btn-secondary {
  background: #1c2330;
  color: #e2e8f0;
  box-shadow: none;
}

.btn-ghost {
  color: #64748b;
  background: transparent;
}
.dark .btn-ghost { color: #94a3b8; }

.btn-danger {
  background: #fff1f2;
  color: #be123c;
}
.dark .btn-danger {
  background: rgba(136, 19, 55, 0.3);
  color: #fda4af;
}

/* Large primary CTA */
.btn-cta {
  width: 100%;
  padding: 1.05rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 18px;
  letter-spacing: -0.01em;
}

/* ---------- Forms ---------- */
.input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: #eef1f6;
  border: 1.5px solid transparent;
  color: #0f172a;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.dark .input {
  background: #1a2030;
  color: #f1f5f9;
}
.input::placeholder { color: #94a3b8; }
.input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
  background: #fff;
}
.dark .input:focus { background: #12161f; }

.label {
  display: block;
  font-size: 0.78rem;
  font-weight: 550;
  color: #64748b;
  margin-bottom: 0.4rem;
}
.dark .label { color: #94a3b8; }

/* ---------- Progress ---------- */
.progress-bar {
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}
.dark .progress-bar { background: #1e2533; }
.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #14b8a6, #5eead4);
  transition: width 0.85s var(--ease);
}

/* ---------- Modal / Sheet ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 11, 18, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.28s var(--ease);
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1.5rem; }
}

.modal-sheet {
  width: 100%;
  max-width: 28rem;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -16px 48px rgba(0,0,0,0.16);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetUp 0.45s var(--ease-spring);
}
.dark .modal-sheet {
  background: #131820;
  box-shadow: 0 -16px 48px rgba(0,0,0,0.5);
}
@media (min-width: 640px) {
  .modal-sheet { border-radius: 28px; max-height: 85vh; }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: #cbd5e1;
  margin: 12px auto 6px;
  flex-shrink: 0;
}
.dark .sheet-handle { background: #334155; }

/* ---------- Toast ---------- */
.toast {
  pointer-events: auto;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 12px 36px -8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  animation: toastIn 0.4s var(--ease-spring);
}
.dark .toast {
  background: #f1f5f9;
  color: #0f172a;
}

/* ---------- Upload zone ---------- */
.upload-zone {
  border: 2px dashed rgba(148, 163, 184, 0.35);
  border-radius: var(--radius-lg);
  background: rgba(238, 241, 246, 0.6);
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.dark .upload-zone {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(30, 37, 51, 0.45);
}
.upload-zone.dragover,
.upload-zone:active {
  border-color: #14b8a6;
  background: rgba(20, 184, 166, 0.08);
  transform: scale(0.985);
}

/* ---------- AI scan ---------- */
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #5eead4, transparent);
  animation: scan 2.2s ease-in-out infinite;
  box-shadow: 0 0 14px #14b8a6;
}
@keyframes scan {
  0% { top: 8%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

.ai-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #0f766e, #134e4a);
  color: white;
}
.ai-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(94, 234, 212, 0.22), transparent 55%);
}

/* ---------- Sleep visualizer ---------- */
.viz {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 26px;
}
.viz-bar {
  width: 3px;
  border-radius: 99px;
  background: #5eead4;
  animation: vizPulse 1.15s ease-in-out infinite;
}
.viz-bar:nth-child(2) { animation-delay: 0.1s; }
.viz-bar:nth-child(3) { animation-delay: 0.2s; }
.viz-bar:nth-child(4) { animation-delay: 0.3s; }
.viz-bar:nth-child(5) { animation-delay: 0.15s; }
.viz-bar:nth-child(6) { animation-delay: 0.25s; }
.viz-bar:nth-child(7) { animation-delay: 0.05s; }
@keyframes vizPulse {
  0%, 100% { height: 5px; opacity: 0.4; }
  50% { height: 22px; opacity: 1; }
}

/* ---------- Heatmap ---------- */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #e2e8f0;
  transition: background 0.3s;
}
.dark .heat-cell { background: #1e2533; }
.heat-1 { background: #99f6e4; }
.dark .heat-1 { background: #0f766e; }
.heat-2 { background: #2dd4bf; }
.dark .heat-2 { background: #14b8a6; }
.heat-3 { background: #0d9488; }
.dark .heat-3 { background: #5eead4; }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}
.dark .skeleton {
  background: linear-gradient(90deg, #1a2030 25%, #242b3d 50%, #1a2030 75%);
  background-size: 200% 100%;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- Typography ---------- */
.display-1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.display-2 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.display-3 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Hero number animation (item 3) */
.hero-num {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 3.25rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Empty states (item 6) ---------- */
.empty-illust {
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin: 0 auto 1.1rem;
  border-radius: 22px;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.12));
}
.dark .empty-illust {
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.35));
}
.empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
}

/* ---------- Animations (item 5) ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheetUp {
  from { opacity: 0; transform: translateY(52px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes countIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-enter { animation: slideUp 0.42s var(--ease); }
.stagger > * { animation: slideUp 0.48s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.11s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.19s; }
.stagger > *:nth-child(6) { animation-delay: 0.23s; }
.float-anim { animation: float 5s ease-in-out infinite; }
.hero-num { animation: countIn 0.55s var(--ease) both; }

/* ---------- Section labels ---------- */
.section-label {
  font-size: 0.78rem;
  font-weight: 550;
  color: #94a3b8;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.dark .section-label { color: #64748b; }

/* ---------- Sticky header (item 7) ---------- */
.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 245, 248, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-bottom: 1px solid transparent;
}
.dark .sticky-bar {
  background: rgba(11, 15, 21, 0.9);
}

/* ---------- Heroes ---------- */
.hero-sleep {
  background: linear-gradient(165deg, #eef2ff 0%, #f8fafc 70%);
}
.dark .hero-sleep {
  background: linear-gradient(165deg, rgba(30, 27, 75, 0.32) 0%, #161b26 70%);
}
.hero-brand {
  background: linear-gradient(150deg, #f0fdfa 0%, #ffffff 65%);
}
.dark .hero-brand {
  background: linear-gradient(150deg, rgba(15, 118, 110, 0.16) 0%, #161b26 70%);
}

/* ---------- Chips ---------- */
.chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 0.45rem 0.95rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 550;
  background: #eef1f6;
  color: #475569;
  transition: all 0.2s var(--ease);
  border: 1.5px solid transparent;
  cursor: pointer;
}
.dark .chip {
  background: #1e2533;
  color: #94a3b8;
}
.chip.active {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.28);
}
.dark .chip.active {
  background: rgba(20, 184, 166, 0.15);
  color: #5eead4;
  border-color: rgba(20, 184, 166, 0.25);
}

/* ---------- Clarity chips (item 15) ---------- */
.clarity-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.clarity-row::-webkit-scrollbar { display: none; }
.clarity-chip {
  flex-shrink: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: var(--shadow-sm);
  min-width: 110px;
}
.dark .clarity-chip {
  background: #151a23;
  border-color: rgba(255,255,255,0.04);
}
.clarity-chip .val {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.clarity-chip .lbl {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.15rem;
  font-weight: 500;
}

/* ---------- Timeline (item 12) ---------- */
.timeline {
  position: relative;
  padding-left: 1.25rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: #e2e8f0;
  border-radius: 99px;
}
.dark .timeline::before { background: #1e2533; }
.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #14b8a6;
  border: 2px solid #f3f5f8;
  box-shadow: 0 0 0 2px rgba(20,184,166,0.25);
}
.dark .timeline-item::before {
  border-color: #0b0f15;
}

/* ---------- Panel groups (item 11) ---------- */
.panel-group {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
  background: #fff;
}
.dark .panel-group {
  background: #151a23;
  border-color: rgba(255,255,255,0.04);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  font-weight: 600;
  font-size: 0.875rem;
  background: rgba(238,241,246,0.5);
}
.dark .panel-head { background: rgba(30,37,51,0.5); }
.panel-body {
  padding: 0.25rem 0.75rem 0.75rem;
}

/* ---------- Mini bar ---------- */
.mini-bar {
  background: #161b26;
  border-radius: 18px;
  padding: 0.7rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: 0 8px 28px -6px rgba(0,0,0,0.45);
}

/* ---------- Misc ---------- */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 99px;
  background: #e2e8f0;
}
.dark input[type=range] { background: #1e2533; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d9488;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.45);
  border: 3px solid white;
}
.dark input[type=range]::-webkit-slider-thumb { border-color: #131820; }

.chart-wrap {
  position: relative;
  width: 100%;
  height: 190px;
}

:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 3px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-good { background: #10b981; }
.dot-warn { background: #f59e0b; }
.dot-bad { background: #f43f5e; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0b0f15;
  color: white;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Icon circle helper */
.icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-circle.teal { background: rgba(20,184,166,0.12); color: #0d9488; }
.dark .icon-circle.teal { background: rgba(20,184,166,0.15); color: #5eead4; }
.icon-circle.indigo { background: rgba(99,102,241,0.12); color: #4f46e5; }
.dark .icon-circle.indigo { background: rgba(99,102,241,0.18); color: #a5b4fc; }
.icon-circle.amber { background: rgba(245,158,11,0.12); color: #d97706; }
.dark .icon-circle.amber { background: rgba(245,158,11,0.15); color: #fcd34d; }
