/* Direction: Afterspoke — a quiet call-desk, cool paper, deep teal, grotesque display */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f3f5f2;
  --surface: #fafbf9;
  --surface-2: #e7eae7;
  --border: #d1d5d2;
  --border-strong: #abb1ae;
  --ink: #13201d;
  --muted: #5c6361;
  --accent: #0f766e;
  --accent-hover: #0d645e;
  --accent-ink: #ffffff;
  --accent-text: #0b5f58;
  --accent-strong: #0e6d65;
  --accent-soft: #d3e3e0;
  --accent-border: #8cbcb7;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #d8e7dc;
  --success-strong: #116d34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #ebe2d6;
  --warning-strong: #994607;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #ecdbd8;
  --danger-strong: #b91c1c;
  --chart-1: #0f766e;
  --chart-2: #3186c9;
  --chart-3: #623887;
  --chart-4: #b9566e;
  --chart-5: #6f4101;
  --chart-6: #6a8b29;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --display-weight: 700;
  --display-tracking: -0.02em;
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-input: 10px;
  --font-sans: "Inter", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #02110f;
  --surface: #1b2927;
  --surface-2: #0f1d1b;
  --border: #253231;
  --border-strong: #4e5857;
  --ink: #f3f5f2;
  --muted: #939a97;
  --accent: #0f766e;
  --accent-hover: #338b84;
  --accent-ink: #ffffff;
  --accent-text: #539d98;
  --accent-strong: #539d98;
  --accent-soft: #052724;
  --accent-border: #083e3a;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #062919;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #29200e;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #2a1312;
  --danger-strong: #d16969;
  --chart-1: #23827a;
  --chart-2: #4092d7;
  --chart-3: #9469bd;
  --chart-4: #c66279;
  --chart-5: #b36e0b;
  --chart-6: #759737;
}

/* Long error text must wrap inside its box, never push a button off-screen. */
.alert, .fail-box, #call-list > li { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.fail-box { display: block; width: 100%; }
.fail-box .btn { max-width: 100%; white-space: normal; }
#call-list > li { overflow-x: clip; }

.rtab {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rtab:hover { color: var(--ink); background: var(--surface-2); }
.rtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rtab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.rpanel[hidden] { display: none; }

.pulse-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); animation: pulse-dot 1.2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: 0.45; } }

.bubble-tele { border-left: 3px solid var(--accent); }
.bubble-buyer { border-left: 3px solid var(--warning); }

.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transform-origin: left; animation: meter-in 0.7s ease-out; }
@keyframes meter-in { from { transform: scaleX(0.1); } to { transform: scaleX(1); } }

html.reduced-motion .pulse-dot, html.reduced-motion .meter > i { animation: none; }
