/* Brymon Design Tokens */
:root {
  --background: #0e1117;
  --background-deep: #080b10;
  --surface: #171b24;
  --surface-light: #202633;
  --surface-dark: #10141c;
  --text: #f5f7fa;
  --text-muted: #aab2c0;
  --text-subtle: #778195;
  --accent: #f4c542;
  --accent-dark: #d9aa23;
  --accent-light: #ffda69;
  --blue: #2869df;
  --blue-light: #5b8ff3;
  --blue-dark: #153c8d;
  --border: #303848;
  --border-light: rgba(255, 255, 255, 0.08);
  --success: #52c77a;
  --warning: #ffbd59;
  --danger: #ff7474;
  --max-width: 1120px;
  --radius-small: 0.5rem;
  --radius-medium: 0.75rem;
  --radius-large: 1rem;
  --radius-extra-large: 1.5rem;
  --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.18);
  --shadow-medium: 0 18px 45px rgba(0, 0, 0, 0.28);
  --shadow-large: 0 30px 80px rgba(0, 0, 0, 0.42);
  --app-background: #07162f;
  --app-header: #08172f;
  --app-panel: #0d1e3d;
  --app-panel-dark: #0a1933;
  --app-input: #091a36;
  --app-border: #29466f;
  --app-border-strong: #315783;
  --app-blue: #1484f5;
  --app-muted: #94a3b8;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  max-width: 800px;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
h3 {
  line-height: 1.2;
}
.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

/* Visible keyboard focus (WCAG 2.4.7).
   !important is deliberate: it has to win over the scattered
   `outline: none` declarations on custom-styled inputs. */
*:focus-visible {
  outline: 3px solid var(--accent) !important;
  outline-offset: 2px !important;
}
*:focus:not(:focus-visible) {
  outline: none;
}

/* Skip link — hidden until focused, then pinned to the top-left */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #171717;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-medium) 0;
  transform: translateY(-120%);
  transition: transform 150ms ease;
}
.skip-link:focus {
  transform: translateY(0);
}

/* Respect reduced-motion preferences (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Trainer avatar (shared: nav, cards, banners, profile header) */
.avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  object-fit: contain;
  vertical-align: middle;
}
.avatar--placeholder {
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
}
.avatar--nav {
  width: 26px;
  height: 26px;
  font-size: 0.78rem;
}
.avatar--card {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}
.avatar--banner {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}
.avatar--profile {
  width: 76px;
  height: 76px;
  font-size: 2rem;
}

/* Accessibility Helpers */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 620px) {
    .toast-container {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}
@media (max-width: 420px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }
}
