/* Shared by index.html and coach.html. Dark ("Duo") is the default; light ("Paper Duo") via data-theme="light". */

:root {
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg-rgb: 9, 9, 11;
  --surface: #0f0f12;
  --surface-2: #141418;
  --band: #0b0b0e;
  --panel-top: rgba(20, 20, 24, 0.9);
  --panel-bottom: rgba(12, 12, 15, 0.9);
  --border: #1c1c21;
  --border-strong: #27272a;
  --text: #fafafa;
  --text-soft: #e4e4e7;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-4: #52525b;
  --line-rgb: 255, 255, 255;

  --accent-rgb: 56, 189, 248;
  --accent-soft-rgb: 52, 211, 153;
  --accent-deep-rgb: 14, 165, 233;
  --orb-hi-rgb: 167, 243, 208;
  --orb-dark-rgb: 12, 74, 110;
  --accent-pale: #5eead4;
  --accent-paler: #7dd3fc;

  --agent: #7dd3fc;
  --user: #34d399;
  --user-rgb: 52, 211, 153;
  --user-hi: #a7f3d0;
  --user-deep: #10b981;
  --user-dark: #064e3b;
  --danger: #ef4444;
  --danger-border: #dc2626;
  --danger-bg: #1c0a0a;
  --dot-idle: #3f3f46;

  --bg: rgb(var(--bg-rgb));
  --accent: rgb(var(--accent-rgb));
  --accent-soft: rgb(var(--accent-soft-rgb));
  --accent-deep: rgb(var(--accent-deep-rgb));
  --orb-hi: rgb(var(--orb-hi-rgb));
  --orb-dark: rgb(var(--orb-dark-rgb));
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg-rgb: 246, 241, 231;
  --surface: #fbf8f2;
  --surface-2: #f1ebdf;
  --band: #efe8da;
  --panel-top: rgba(255, 252, 246, 0.96);
  --panel-bottom: rgba(248, 243, 234, 0.96);
  --border: #e4dccd;
  --border-strong: #d6ccb9;
  --text: #1c1917;
  --text-soft: #292524;
  --text-2: #57534e;
  --text-3: #7c746a;
  --text-4: #a39b8f;
  --line-rgb: 28, 25, 23;

  --accent-rgb: 3, 105, 161;
  --accent-soft-rgb: 4, 120, 87;
  --accent-deep-rgb: 2, 132, 199;
  --orb-hi-rgb: 110, 231, 183;
  --orb-dark-rgb: 12, 74, 110;
  --accent-pale: #0f766e;
  --accent-paler: #0369a1;

  --agent: #0369a1;
  --user: #047857;
  --user-rgb: 4, 120, 87;
  --user-hi: #6ee7b7;
  --user-deep: #059669;
  --user-dark: #064e3b;
  --danger: #b91c1c;
  --danger-border: #dc2626;
  --danger-bg: #fef2f2;
  --dot-idle: #cbbfaa;
  color-scheme: light;
}

.mode-toggle {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  width: 58px;
  height: 30px;
  padding: 0 7px;
  justify-content: space-between;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-3);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.mode-toggle:hover { border-color: rgba(var(--accent-rgb), 0.5); }
.mode-toggle svg { position: relative; z-index: 1; transition: color 0.2s ease; }
.mode-toggle::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--orb-hi), var(--accent-deep) 58%, var(--orb-dark));
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
  transition: transform 0.25s ease;
}
.mode-toggle[aria-checked="true"]::before { transform: translateX(28px); }
.mode-toggle[aria-checked="true"] .icon-moon,
.mode-toggle[aria-checked="false"] .icon-sun { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .mode-toggle::before { transition: none; }
}
