/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 1;
  overflow: hidden; /* body never scrolls — §A20 */
}
/* Height chain — main, body, app must all flex to viewport */
.app, .app-body, .main { height: 100%; min-height: 0; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; font-size: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* skip link */
.skip-link {
  position: absolute; top: -40px; left: 8px; z-index: 9999;
  background: var(--asana-coral); color: var(--on-coral);
  padding: 8px 16px; border-radius: var(--r-6);
  font-size: var(--t-base); font-weight: 500;
}
.skip-link:focus { top: 8px; outline: none; }

/* visually-hidden */
.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}

/* type utilities */
.t-xs         { font-size: var(--t-xs);         line-height: var(--lh-xs);         font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.t-sm         { font-size: var(--t-sm);         line-height: var(--lh-sm);         font-weight: 400; }
.t-sm-medium  { font-size: var(--t-sm);         line-height: var(--lh-sm);         font-weight: 500; }
.t-base       { font-size: var(--t-base);       line-height: var(--lh-base);       font-weight: 400; }
.t-base-medium{ font-size: var(--t-base);       line-height: var(--lh-base);       font-weight: 500; }
.t-md         { font-size: var(--t-md);         line-height: var(--lh-md);         font-weight: 400; }
.t-md-semibold{ font-size: var(--t-md);         line-height: var(--lh-md);         font-weight: 600; }
.t-lg         { font-size: var(--t-lg);         line-height: var(--lh-lg);         font-weight: 500; }
.t-lg-semibold{ font-size: var(--t-lg);         line-height: var(--lh-lg);         font-weight: 600; }
.t-xl         { font-size: var(--t-xl);         line-height: var(--lh-xl);         font-weight: 600; letter-spacing: -0.01em; }
.t-2xl        { font-size: var(--t-2xl);        line-height: var(--lh-2xl);        font-weight: 600; letter-spacing: -0.01em; }
.t-3xl        { font-size: var(--t-3xl);        line-height: var(--lh-3xl);        font-weight: 700; letter-spacing: -0.01em; }
.t-display    { font-size: var(--t-display);    line-height: var(--lh-display);    font-weight: 700; letter-spacing: -0.01em; }
.t-display-lg { font-size: var(--t-display-lg); line-height: var(--lh-display-lg); font-weight: 700; letter-spacing: -0.01em; }
.t-secondary  { color: var(--text-secondary); }
.t-muted      { color: var(--text-muted); }

/* ── Eyebrow — canonical mini-label (section heads, eyebrows, captions).
      Use this everywhere instead of bespoke 10/11px uppercase rules. */
.eyebrow {
  font-size: var(--t-eyebrow);
  line-height: var(--lh-eyebrow);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--asana-coral);
}

/* ── Canonical pill — single source of truth for ALL pill/chip variants.
      24px height, currentColor dot rendered by ::before in components.css for
      status variants; chip-style variants opt out via .pill.cat / no ::before.
      Per-variant rules may override colour and decoration only — never height
      or padding. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.pill:hover { background: var(--bg-hover); border-color: var(--border-medium); }
.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.pill-icon svg { width: 14px; height: 14px; display: block; }

/* ── 5-STATE INTERACTION MATRIX (canonical) ──
   Every interactive element follows the same rest → hover → focus-visible →
   active → disabled cycle. Behaviours below are GLOBAL defaults; components
   should only override colour/decoration, never the structural state model.
     · rest          — element-specific default
     · hover         — set per-component (typically `background: var(--bg-hover)`)
     · focus-visible — coral ring via box-shadow (set globally below)
     · active        — set per-component (typically `background: var(--bg-active)`)
     · disabled      — opacity 0.5, no pointer events (set globally below)

   The global focus rule below intentionally does NOT set border-radius — that
   would override per-component radii (.btn = r-6, .pill = r-pill, .pcard =
   r-8). Each component keeps its own corner. */
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); }
button:active, a:active { transform: translateY(0); }
button[disabled], button:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* scrollbars (subtle) */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--r-pill); }
*::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
