/* Agilex+ components. Plain CSS over the system's tokens (tokens.css):
   every colour, size and radius is a token, so both themes (Light, Navy)
   follow from [data-theme]. Class prefix: axp-. */

/* ---- Button ------------------------------------------------------------ */
.axp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-3);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: 1;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}
.axp-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.axp-btn[disabled], .axp-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.axp-btn--primary { background: var(--accent); color: var(--on-accent); }
.axp-btn--primary:hover { filter: brightness(1.06); }
.axp-btn--secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--border-control); }
.axp-btn--secondary:hover { background: var(--surface); }
.axp-btn--ghost { background: transparent; color: var(--ink-muted); }
.axp-btn--ghost:hover { background: var(--surface-raised); color: var(--ink); }
.axp-btn--danger { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
.axp-btn--danger:hover { filter: brightness(0.97); }
.axp-btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* ---- StatusChip -------------------------------------------------------- */
.axp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: var(--space-1) 10px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 11px; font-weight: 600; line-height: 1.3;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent;
}
.axp-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.axp-chip--success { background: var(--success-tint); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.axp-chip--danger  { background: var(--danger-tint);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.axp-chip--warning { background: var(--warning-tint); color: var(--warning); border-color: color-mix(in srgb, var(--brand-amber) 45%, transparent); }
.axp-chip--info    { background: var(--info-tint);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.axp-chip--neutral { background: var(--surface); color: var(--ink-muted); border-color: var(--border); }

/* ---- StatTile ---------------------------------------------------------- */
.axp-stat {
  display: grid; align-content: center; justify-items: center; gap: var(--space-1);
  min-width: 140px; padding: var(--space-3) var(--space-4);
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); text-align: center;
}
.axp-stat__value {
  font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.15;
  color: var(--ink-heading); font-variant-numeric: tabular-nums;
}
.axp-stat__value--key { color: var(--ink-heading); box-shadow: inset 0 -3px 0 var(--accent); padding-bottom: 2px; }
.axp-stat__value--note { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink-muted); }
.axp-stat__label {
  font-family: var(--font-body); font-size: 11px; font-weight: 600; line-height: 1.4;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted);
}

/* ---- TabBar ------------------------------------------------------------ */
.axp-tabs {
  display: flex; align-items: stretch; justify-content: space-between;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.axp-tabs__list { display: flex; align-items: stretch; overflow-x: auto; }
.axp-tab {
  height: 48px; padding: 0 18px; border: none; background: transparent;
  border-bottom: 3px solid transparent;
  font-family: var(--font-display); font-size: 13px; font-weight: 500;
  color: var(--ink-muted); cursor: pointer; white-space: nowrap;
  transition: color 150ms ease-out, border-color 150ms ease-out;
}
.axp-tab:hover { color: var(--ink); }
.axp-tab[aria-selected="true"] { color: var(--link); border-bottom-color: var(--accent); }
.axp-tab:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -4px; }
.axp-tabs__slot { display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3); }

/* ---- Citation ---------------------------------------------------------- */
.axp-cite {
  font-family: var(--font-mono); font-size: .875em; font-weight: 400;
  color: var(--ink-heading); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1px 6px; white-space: nowrap;
}

/* ---- Icon -------------------------------------------------------------- */
.axp-icon { flex: none; vertical-align: -0.125em; }
