/* Shared foundation for auth.html / dashboard.html / index.html.
   Phase 1 of the site cleanup: centralize the @font-face declarations and palette
   that were previously copy-pasted in each page's own <style> block. Each page's
   own inline styles/CSS still take precedence for now — later phases migrate them
   onto these custom properties instead of raw literals. */

@font-face {
  font-family: 'ToastSans';
  src: url('ToastSans-Book.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'ToastSans';
  src: url('ToastSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --toast-accent: #34a853;
  --toast-accent-hover: #2d9348;
  --toast-text: #111009;
  --toast-muted: #6b6560;
  --toast-faint: #b0a89f;
  --toast-bg: #ffffff;
  --toast-border: rgba(17, 16, 9, .07);
  --toast-border-strong: rgba(17, 16, 9, .12);
}

body { font-family: 'ToastSans', system-ui, sans-serif; font-synthesis: none; }

/* ── Topic chips (onboarding.html + dashboard Preferences; markup built by assets/topic-chips.js) ── */
.tchips .badge-icon {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(17, 16, 9, .06); color: var(--toast-muted, #6b6560);
}
/* Selected chips use the three brand colors in turn (green, red, yellow) — set by ToastTopicChips.paintSelected. */
.tchips [aria-pressed="true"] .badge-icon { background: rgba(255, 255, 255, .2); color: inherit; }
.tchips [aria-pressed="true"][data-c="0"] { background: #34a853; border-color: #34a853; color: #fff; }
.tchips [aria-pressed="true"][data-c="1"] { background: #ea4335; border-color: #ea4335; color: #fff; }
.tchips [aria-pressed="true"][data-c="2"] { background: #fbbc05; border-color: #fbbc05; color: #1c1813; }
.tchips [aria-pressed="true"][data-c="0"]:hover { background: #2d9348; border-color: #2d9348; }
.tchips [aria-pressed="true"][data-c="1"]:hover { background: #d93a2d; border-color: #d93a2d; }
.tchips [aria-pressed="true"][data-c="2"]:hover { background: #e5ab04; border-color: #e5ab04; }
/* At the ceiling (9 topics) the unselected chips are disabled; selected chips stay clickable. */
.badge[disabled], .pref-badge[disabled] { opacity: .42; cursor: not-allowed; }
.badge[disabled]:hover, .pref-badge[disabled]:hover { background: #f5f5f5; border-color: rgba(17, 16, 9, .12); }

/* Drag-to-reorder of the user's topics (assets/drag-sort.js): a chip that is on can be picked up and moved. */
.tchips .pref-badge[aria-pressed="true"] { cursor: grab; touch-action: none; user-select: none; }
.tchips.is-sorting, .tchips.is-sorting .pref-badge { cursor: grabbing; }
.tchips .pref-badge.is-dragging { position: relative; z-index: 5; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .4); transition: none; }
