/* The component layer the old web/tokens.css carried for public pages (clubs, events,
   players, posts, videos, standings, join, training, fantasy, legal), redrawn in
   NORTH_STAR's language and scoped to .ctx-public. The site header, footer and app banner
   are gone: the app layout draws the shell. Delete with public-aliases.css when the last
   public page is rebuilt. */

:where(.ctx-public) * { margin: 0; padding: 0; }
.ctx-public { color: var(--ink); font-size: var(--fs-body); line-height: 1.5; }
:where(.ctx-public) p { text-wrap: pretty; }
:where(.ctx-public) a { color: inherit; text-decoration: none; }
.ctx-public ::selection { background: var(--highlight); color: var(--on-highlight); }

/* type */
.ctx-public .text-display {
  font-family: var(--font); font-stretch: var(--wdth-name); font-weight: 800;
  font-size: var(--fs-display); line-height: 1; letter-spacing: -0.01em; color: var(--ink);
}
.ctx-public .text-h1 {
  font-family: var(--font); font-stretch: var(--wdth-name); font-weight: 800;
  font-size: var(--fs-display); line-height: 1; letter-spacing: -0.01em; color: var(--ink);
}
.ctx-public .text-h2, .ctx-public .text-h3 {
  font-family: var(--font); font-stretch: var(--wdth-name); font-weight: 700;
  font-size: var(--fs-headline); line-height: 1.1;
}
.ctx-public .text-h3 { font-size: 20px; }
.ctx-public .text-body { font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); }
.ctx-public .text-body-medium { font-size: var(--fs-body); font-weight: 500; line-height: 1.5; }
.ctx-public .text-caption { font-weight: 500; font-size: var(--fs-meta); line-height: 1.35; color: var(--ink-2); }
.ctx-public .text-small {
  font-stretch: var(--wdth-plate); font-weight: 700; font-size: var(--fs-plate); line-height: 1.2;
  letter-spacing: var(--track-plate); text-transform: uppercase;
}
.ctx-public .text-stat {
  font-family: var(--font); font-stretch: var(--wdth-live); font-weight: 800;
  font-size: var(--fs-stat); line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink);
}
.ctx-public .text-primary, .ctx-public .text-foreground { color: var(--ink); }
.ctx-public .text-muted { color: var(--ink-2); }
.ctx-public .text-destructive { color: var(--alert); }
.ctx-public .text-success { color: var(--win); }
.ctx-public .text-gradient { color: inherit; }
.ctx-public .bg-background { background-color: var(--surface-0); }
.ctx-public .bg-card { background-color: var(--surface-1); }
.ctx-public .bg-muted { background-color: var(--surface-2); }
.ctx-public .bg-primary { background-color: var(--ink); color: var(--on-ink); }

/* layout utilities */
.ctx-public .container { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--space-4); }
.ctx-public .container-narrow { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-4); }
.ctx-public .flex { display: flex; }
.ctx-public .flex-col { flex-direction: column; }
.ctx-public .flex-row { flex-direction: row; }
.ctx-public .items-center { align-items: center; }
.ctx-public .items-start { align-items: flex-start; }
.ctx-public .justify-center { justify-content: center; }
.ctx-public .justify-between { justify-content: space-between; }
.ctx-public .gap-xs { gap: var(--space-1); } .ctx-public .gap-sm { gap: var(--space-2); }
.ctx-public .gap-md { gap: var(--space-4); } .ctx-public .gap-lg { gap: var(--space-5); }
.ctx-public .gap-xl { gap: var(--space-6); }
.ctx-public .p-xs { padding: var(--space-1); } .ctx-public .p-sm { padding: var(--space-2); }
.ctx-public .p-md { padding: var(--space-4); } .ctx-public .p-lg { padding: var(--space-5); }
.ctx-public .p-xl { padding: var(--space-6); }
.ctx-public .py-xs { padding-block: var(--space-1); } .ctx-public .py-sm { padding-block: var(--space-2); }
.ctx-public .py-md { padding-block: var(--space-4); } .ctx-public .py-lg { padding-block: var(--space-5); }
.ctx-public .py-xl { padding-block: var(--space-6); }
.ctx-public .px-xs { padding-inline: var(--space-1); } .ctx-public .px-sm { padding-inline: var(--space-2); }
.ctx-public .px-md { padding-inline: var(--space-4); } .ctx-public .px-lg { padding-inline: var(--space-5); }
.ctx-public .px-xl { padding-inline: var(--space-6); }
.ctx-public .mb-xs { margin-bottom: var(--space-1); } .ctx-public .mb-sm { margin-bottom: var(--space-2); }
.ctx-public .mb-md { margin-bottom: var(--space-4); } .ctx-public .mb-lg { margin-bottom: var(--space-5); }
.ctx-public .mb-xl { margin-bottom: var(--space-6); }
.ctx-public .mt-xs { margin-top: var(--space-1); } .ctx-public .mt-sm { margin-top: var(--space-2); }
.ctx-public .mt-md { margin-top: var(--space-4); } .ctx-public .mt-lg { margin-top: var(--space-5); }
.ctx-public .mt-xl { margin-top: var(--space-6); }

/* cards: flat, no lift */
.ctx-public .card, .ctx-public .card-elevated {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: var(--space-5); box-shadow: none; margin-bottom: 0;
}
.ctx-public .card-glow { position: relative; }

/* buttons (NORTH_STAR §4 Controls) */
.ctx-public .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); min-height: 0; padding: 0 20px; border-radius: var(--radius-control);
  font-family: var(--font); font-stretch: var(--wdth-read); font-weight: 600; font-size: 16px; line-height: 1;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink);
  cursor: pointer; white-space: nowrap; text-decoration: none; box-shadow: none;
  transition: transform var(--dur-press) ease-out;
}
.ctx-public .btn:active { transform: scale(0.97); }
.ctx-public .btn-primary, .ctx-public .btn--primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.ctx-public .btn-secondary, .ctx-public .btn-outline, .ctx-public .btn--secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.ctx-public .btn-ghost, .ctx-public .btn--tertiary {
  height: auto; min-height: var(--tap); padding: 0; border: 0; border-radius: 0; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.ctx-public .btn-sm { height: var(--tap); padding: 0 16px; font-size: 15px; }
.ctx-public .btn-lg, .ctx-public .btn--lg { height: var(--btn-h-lg); }
.ctx-public .btn--block { display: flex; width: 100%; }

/* badges become Plates */
.ctx-public .badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  border-radius: var(--radius-plate); background: var(--surface-2); color: var(--ink);
  font-stretch: var(--wdth-plate); font-weight: 700; font-size: var(--fs-plate); line-height: 1;
  letter-spacing: var(--track-plate); text-transform: uppercase; white-space: nowrap;
}
.ctx-public .badge-primary { color: var(--ink); }
.ctx-public .badge-success { color: var(--win); }
.ctx-public .badge-live { color: var(--live); animation: none; }

/* avatars (§2.5) */
.ctx-public .avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2); border: 0; box-shadow: inset 0 0 0 1px var(--line);
}
.ctx-public .avatar-sm { width: 32px; height: 32px; }
.ctx-public .avatar-lg { width: 64px; height: 64px; }
.ctx-public .avatar-xl { width: 96px; height: 96px; }
.ctx-public .avatar-ring { outline: 2px solid var(--highlight); outline-offset: 2px; box-shadow: none; }

/* hero photo: 3:2, radius 12, 1px inner line. Text never sits on a photo (§2.5). */
.ctx-public .hero {
  position: relative; width: 100%; aspect-ratio: 3 / 2; max-height: 420px; overflow: hidden;
  border-radius: var(--radius-card); box-shadow: inset 0 0 0 1px var(--line);
}
.ctx-public .hero__image { width: 100%; height: 100%; object-fit: cover; }
.ctx-public .hero__overlay { display: none; }
.ctx-public .hero__content { position: static; padding: var(--space-4) 0 0; }

/* club and player headers */
.ctx-public .club-header { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5) 0; }
.ctx-public .club-title {
  font-family: var(--font); font-stretch: var(--wdth-name); font-weight: 800;
  font-size: var(--fs-display); line-height: 1; letter-spacing: -0.01em; color: var(--ink);
}
.ctx-public .club-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  color: var(--ink-2); font-weight: 500; font-size: var(--fs-meta); line-height: 1.35;
}
.ctx-public .club-meta__item { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ctx-public .club-meta__item svg { color: var(--ink-2); opacity: 1; width: 20px; height: 20px; }
.ctx-public .club-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-3); }

/* schedule rows */
.ctx-public .schedule-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.ctx-public .schedule-item {
  display: flex; align-items: center; gap: var(--space-4); min-height: var(--row-h); padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}
.ctx-public .schedule-day {
  min-width: 100px; color: var(--ink);
  font-stretch: var(--wdth-plate); font-weight: 700; font-size: var(--fs-plate);
  letter-spacing: var(--track-plate); text-transform: uppercase;
}
.ctx-public .schedule-time { min-width: 80px; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ctx-public .schedule-description { flex: 1; color: var(--ink-2); font-size: var(--fs-meta); }

/* stat tiles */
.ctx-public .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-3); }
.ctx-public .stat-card {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: var(--space-4); text-align: left;
}
.ctx-public .stat-value {
  font-family: var(--font); font-stretch: var(--wdth-live); font-weight: 800; font-size: var(--fs-stat);
  line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); margin-bottom: var(--space-1);
}
.ctx-public .stat-label {
  color: var(--ink-2); font-stretch: var(--wdth-plate); font-weight: 700; font-size: var(--fs-plate);
  letter-spacing: var(--track-plate); text-transform: uppercase;
}

/* FAQ */
.ctx-public .faq-item { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.ctx-public .faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.ctx-public .faq-item h3 {
  color: var(--ink); margin-bottom: var(--space-2);
  font-stretch: var(--wdth-name); font-weight: 700; font-size: var(--fs-name); line-height: 1.2;
}
.ctx-public .faq-item p { color: var(--ink-2); }

/* no staggered page-load fades (kill list #11) */
.ctx-public .animate-fade-in, .ctx-public .animate-slide-up, .ctx-public .stagger-children > * { animation: none; opacity: 1; }

.ctx-public .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;
}
.ctx-public .mobile-only { display: none; }
.ctx-public .desktop-only { display: block; }
@media (max-width: 768px) {
  .ctx-public .mobile-only { display: block; }
  .ctx-public .mobile-only.flex, .ctx-public .mobile-only.inline-flex { display: flex; }
  .ctx-public .mobile-only.inline { display: inline; }
  .ctx-public .desktop-only { display: none !important; }
}
@media (max-width: 480px) {
  .ctx-public .card { padding: var(--space-4); }
  .ctx-public .club-actions { flex-direction: column; }
  .ctx-public .club-actions .btn { width: 100%; }
  .ctx-public .schedule-item { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .ctx-public .schedule-day { min-width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ctx-public .btn:active { transform: none; }
}
