/*
 * HAS+ design tokens, formalised from the design reference
 * (design-reference/design_handoff_has_portal_dashboard/README.md, concept 7a:
 * the has verb identity). That README is the token source of truth; the mark
 * itself has moved on to brand v1 (design-reference/brand-v1/), which changed
 * no token but added --dark-accent below. Components use these variables only,
 * never raw hex (AGENTS.md § Coding standards). The accent is themeable:
 * alternates explored in the reference are fir #0E5C4F, navy #1B3A6B,
 * clay #B05B3C; default is indigo.
 */

:root {
  /* Accent */
  --accent: #544ae0;
  --accent-faint: #544ae014; /* 8% alpha: sparkline area fill */
  --accent-button-shadow: 0 1px 2px rgba(84, 74, 224, 0.35);
  /* The accent on ink surfaces, where #544ae0 loses its chroma against
   * --dark-card-bg. Brand v1 § 2, carried by Wordmark's `reversed` prop.
   *
   * Honest exception to the add-on-first-need rule above: nothing renders a
   * reversed mark yet, so this is ahead of need rather than at it, and the
   * pairing with --dark-card-emphasis has never been checked for contrast on a
   * real surface. It is here because brand v1 specifies lockup 4 and the prop
   * cannot exist without it. Recorded in DESIGN_SYSTEM.md § 6; the first
   * surface that genuinely needs reversed should verify the pair. */
  --dark-accent: #6b62f0;
  --avatar-gradient-end: #8a7ff0; /* contact-card avatar: accent -> this (onboarding handoff) */

  /* Text */
  --ink: #1a1b25;
  --text-secondary: #565b78;
  --text-muted: #8a8fae;
  --text-faint: #b3b7cc;

  /* Status */
  --settled-green: #2bb673;
  --needs-you-dot-border: #c9cce0;
  --status-inactive: #c9cce0;

  /* Categorical type pills (admin redesign reference § Tokens): full-color
   * text over the same color at 10% alpha. Group and hospital reuse the navy
   * and clay accent alternates. */
  --type-practice: #544ae0;
  --type-practice-bg: rgba(84, 74, 224, 0.1);
  --type-group: #1b3a6b;
  --type-group-bg: rgba(27, 58, 107, 0.1);
  --type-hospital: #b05b3c;
  --type-hospital-bg: rgba(176, 91, 60, 0.1);
  /* Neutral kind tint (style guide § 19: palette Action pills): text-secondary
   * over the same color at 10% alpha. Added on first need (issue #39). */
  --type-neutral-bg: rgba(86, 91, 120, 0.1);

  /* Progress pair (style guide § 08 / § 20 bar tracks and fills), added on
   * first need (S10 team-activity breakdown bars). */
  --progress-track: var(--border-hairline);
  --progress-fill: var(--accent);

  /* Auth / sign-in experience (design handoff "Sign-in loading + modernized
   * form"), added on first need. The handoff's non-token values live here as
   * tokens rather than raw hex (golden rule 1): a softer auth-card radius and
   * a deeper lift than the flat --card-shadow, a faintly tinted input fill
   * with an accent focus ring, and the breath animation's accent dot tint,
   * anchor glow and radial-wash edge. */
  --auth-input-fill: #fafbff; /* page-bg tint, one step lighter than --page-bg */
  --auth-focus-ring: rgba(84, 74, 224, 0.14); /* 4px accent ring on focus */
  --auth-card-shadow: 0 1px 3px rgba(26, 27, 37, 0.06),
    0 28px 56px -28px rgba(26, 27, 37, 0.3);
  --auth-breath-accent: rgba(84, 74, 224, 0.55); /* every 6th breath dot */
  --auth-anchor-shadow: 0 2px 10px rgba(84, 74, 224, 0.45); /* anchor dot glow */
  --auth-wash-edge: #eef1f8; /* outer stop of the sign-in radial wash */
  --radius-auth-card: 16px;
  --radius-auth-control: 10px;

  /* Warning trio (derived from the clay alternate): destructive review notes */
  --warning-bg: rgba(176, 91, 60, 0.08);
  --warning-border: rgba(176, 91, 60, 0.28);
  --warning-text: #8f4227;

  /* Checkout + toast surfaces (admin redesign reference § Checkout, § Toast) */
  --scrim: rgba(26, 27, 37, 0.32);
  --panel-shadow: -12px 0 40px rgba(26, 27, 37, 0.12);
  --success-disc-bg: rgba(43, 182, 115, 0.12);
  --toast-shadow: 0 10px 30px rgba(26, 27, 37, 0.25);

  /* Command palette glass (admin redesign reference § ⌘K) */
  --palette-scrim: rgba(26, 27, 37, 0.22);
  --palette-bg: rgba(255, 255, 255, 0.78);
  --palette-border: rgba(228, 230, 240, 0.9);
  --palette-shadow: 0 24px 64px rgba(26, 27, 37, 0.22);
  --palette-highlight: rgba(26, 27, 37, 0.06);
  --palette-footer-bg: rgba(246, 247, 252, 0.6);

  /* Surfaces */
  --page-bg: #f6f7fc;
  --card-bg: #ffffff;
  --border: #e4e6f0;
  --border-strong: #c9cce0; /* hover/emphasis border (admin redesign) */
  --border-hairline: #eef0f6;
  --row-divider: #f3f4f9;
  --pill-selected-bg: #eef0fb;
  --pill-hover-bg: #f3f4fa;
  --row-hover-bg: #f8f9fd;
  --row-selected-bg: #fbfbfe; /* selected access-picker row (checkout) */

  /* Dark card */
  --dark-card-bg: #1a1b25;
  --dark-card-text: #a9adc7;
  --dark-card-emphasis: #ffffff;

  /* Typography */
  --font-ui: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --text-page-title: 700 24px/1.2 var(--font-ui);
  --text-hero-stat: 800 30px/1.15 var(--font-ui);
  --text-card-stat: 800 24px/1.15 var(--font-ui);
  --text-card-title: 700 13.5px/1.3 var(--font-ui);
  --text-body: 400 13px/1.45 var(--font-ui);
  --text-secondary-size: 12.5px;
  --text-label: 600 11.5px/1.3 var(--font-ui);
  --text-logo: 800 22px/1 var(--font-ui);

  --tracking-tight: -0.03em;
  --tracking-logo: -0.04em;

  /* Spacing & shape */
  --content-max-width: 1120px;
  --content-pad-x: 32px;
  --nav-height: 60px;
  --radius-card: 12px;
  --radius-control: 8px;
  --radius-pill: 7px;
  --card-pad: 20px;
  --grid-gap: 14px;
  --card-shadow: 0 1px 3px rgba(26, 27, 37, 0.04);

  /* Queried amber (guide § 02 dot system), added on first need: the O9
   * document checklist's rejected state (issue #83). The handoff README's
   * #e0a83c yields to the guide token per DESIGN_SYSTEM precedence. */
  --queried-amber: #e2a33c;
  --queried-amber-text: #9a6b1f;
  --queried-amber-bg: #fdf8ee;
  --queried-amber-border: #ecd9b6;
}
