/* =============================================================================
   site.css — Global stylesheet for POKEPRO.CO
   Single source of truth for all Django site styles.
   React app styles are in frontend/src/styles.css (scoped to #root).
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=JetBrains+Mono:wght@400;500&display=swap');


/* ── 1. Design tokens ───────────────────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:        #0f0f13;
  --surface:   #1a1a22;
  --surface-2: #252530;
  --border:    #2e2e3a;
  --text:      #e8e8f0;
  --muted:     #7a7a90;
  --accent:    #6b3fa0;
  --accent-h:  #7d4db8;
  --link:      #a07de0;

  /* Layout */
  --header-h:  52px;

  /* Fonts */
  --font-display: 'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Typography scale (React parity) */
  --text-small:  12px;
  --text-medium: 14px;
  --text-large:  16px;

  /* Status colours */
  --danger:        #e05050;
  --danger-h:      #c83030;
  --danger-dim:    rgba(224, 80, 80, 0.12);
  --success:       #4a9830;
  --success-dim:   rgba(74, 152, 48, 0.12);
  --warn:          #c9a030;
  --warn-dim:      rgba(201, 160, 48, 0.12);

  /* Pokemon type colours (shared with React, RGB channels) */
  --type-normal:   130 130 130;
  --type-fire:     228  97  62;
  --type-water:     99 144 240;
  --type-electric: 247 208  44;
  --type-grass:     67 152  52;
  --type-ice:       71 200 200;
  --type-fighting: 228 114  33;
  --type-poison:   163  62 161;
  --type-ground:   164 115  60;
  --type-flying:   169 143 243;
  --type-psychic:  249  85 135;
  --type-bug:      166 185  26;
  --type-rock:     169 164 129;
  --type-ghost:    115  87 151;
  --type-dragon:   111  53 252;
  --type-dark:      79  71  71;
  --type-steel:    183 183 206;
  --type-fairy:    225 140 225;
  --type-stellar:  255 200 100;

  /* Move category colours (shared with React) */
  --cat-physical-color:  #f97316;
  --cat-physical-bg:     rgba(249, 115, 22, 0.10);
  --cat-physical-border: rgba(249, 115, 22, 0.45);

  --cat-special-color:   #0375a7;
  --cat-special-bg:      rgba(56, 189, 248, 0.10);
  --cat-special-border:  rgba(56, 189, 248, 0.45);

  --cat-status-color:    #9ca3af;
  --cat-status-bg:       rgba(156, 163, 175, 0.07);
  --cat-status-border:   rgba(156, 163, 175, 0.35);

  /* Backwards-compatible aliases used by existing Django templates/classes */
  --cat-physical:     var(--cat-physical-color);
  --cat-physical-dim: var(--cat-physical-bg);
  --cat-special:      var(--cat-special-color);
  --cat-special-dim:  var(--cat-special-bg);
  --cat-status:       var(--cat-status-color);
  --cat-status-dim:   var(--cat-status-bg);

  --radius: 4px;

  /* Transitions */
  --transition-fast: 0.15s;

  /* Page layout */
  --page-max-width: 1200px;
  --page-gutter:    24px;

  --page-wide-width: 1400px;
}


/* ── 2. Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }


/* ── 3. Site layout ─────────────────────────────────────────────────────────── */

/* Meta ticker */
.metaTicker {
  display: flex;
  align-items: center;
  background: var(--surface-1, #0e0e16);
  border-bottom: 1px solid var(--border);
  height: 30px;
  overflow: hidden;
  position: relative;
  z-index: 101;
}
.metaTickerLive {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 3px;
  line-height: 1.6;
}
.metaTickerOuter {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.metaTickerTrack {
  display: flex;
  gap: 0;
  white-space: nowrap;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
}
.metaTickerTrack:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.metaTickerItem {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.metaTickerItem:hover { color: var(--text); text-decoration: none; }
.metaTickerItem--reg { cursor: default; }
.metaTickerRegIcon { font-size: 11px; }
.metaTickerRegLabel { font-size: 11px; font-weight: 600; color: var(--white); letter-spacing: 0.02em; }
.metaTickerSep { color: var(--border); font-size: 12px; padding: 0 16px; flex-shrink: 0; }
.metaTickerSprite { width: 28px; height: 28px; flex-shrink: 0; }
.metaTickerName { font-weight: 500; color: var(--text); }
.metaTickerDelta--up   { color: #4caf50; font-size: 11px; }
.metaTickerDelta--down { color: #e05c5c; font-size: 11px; }
.metaTickerUsage { color: var(--muted); font-size: 11px; }

.siteHeader {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.siteHeaderInner {
  height: 100%;
  width: min(100%, var(--page-wide-width));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  min-width: 0;
}

.siteHeaderLogo {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 28px;
  flex-shrink: 0;
}
.siteHeaderLogo:hover { text-decoration: none; color: var(--text); }

.logoPokeball {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg 180deg, var(--surface-2) 180deg 360deg);
  border: 1.5px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.logoPokeball::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background: var(--surface);
  border-radius: 50%;
  border: 1.5px solid var(--border);
}

#siteNavWrapper {
  flex: 1;
  min-width: 0;
}

.siteHeaderRight {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.siteMain { flex: 1; }

/* ── Large footer ─────────────────────────────────────────────────────────── */
.siteFooterLarge {
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.siteFooterBody {
  display: grid;
  grid-template-columns: 220px repeat(auto-fit, minmax(120px, 1fr));
  gap: 40px 48px;
  padding: 48px 24px 36px;
  max-width: 1200px;
  margin: 0 auto;
}

.siteFooterLogo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 10px;
}
.siteFooterLogo:hover { color: var(--text); text-decoration: none; }
.siteFooterLogo .logoPokeball { width: 20px; height: 20px; }

.siteFooterTagline {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.siteFooterColumn h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 0 0 12px;
}

.siteFooterColumn ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.siteFooterColumn li { margin-bottom: 8px; }

.siteFooterColumn a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color .15s;
}
.siteFooterColumn a:hover { color: var(--text); }

.siteFooterBottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.siteFooterDisclaimer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
}
.siteFooterDisclaimer p { margin: 0 0 6px; }
.siteFooterDisclaimer p:last-child { margin-bottom: 0; }


.siteFooterContainer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
}
.siteFooterCopy {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}


/* Bottom bar legal strip */
.siteFooterLegal {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.siteFooterLegal a { color: var(--muted); text-decoration: none; transition: color .15s; }
.siteFooterLegal a:hover { color: var(--text); }
.siteFooterLegal span { opacity: .45; }

/* Support Us in footer brand area */
.siteFooterSupport { margin: 12px 0 0; }

/* Footer CTA column */
.siteFooterCTAs h4 { margin-bottom: 14px; }
.siteFooterCTAs ul { display: none; } /* no list items in this column */

.siteFooterCreateBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
  margin-bottom: 8px;
}
.siteFooterCreateBtn:hover { background: var(--accent-h); color: #fff; text-decoration: none; }

.siteFooterSignIn {
  display: block;
  color: var(--muted);
  font-size: 13px;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color .15s;
  margin-bottom: 4px;
}
.siteFooterSignIn:hover { color: var(--text); }

.siteFooterRegisterBtn {
  display: block;
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color .15s;
}
.siteFooterRegisterBtn:hover { color: #fff; }

@media (max-width: 640px) {
  .siteFooterBody {
    grid-template-columns: 1fr 1fr;
    gap: 24px 32px;
    padding: 32px 16px 24px;
  }
}
@media (max-width: 480px) {
  .siteFooterBody {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 16px 20px;
  }
  .siteFooterBottom {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Legal page ──────────────────────────────────────────────────────────── */
.legalPage {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 24px 64px;
}
.legalPage h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text);
}
.legalPage .richtext { color: var(--muted); line-height: 1.8; font-size: 14px; }


/* ── 4. Navigation ──────────────────────────────────────────────────────────── */
.siteNav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.siteNavList {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.siteNavItem { position: relative; }

/* Flat nav links */
.siteNavLink {
  color: var(--muted);
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: block;
  white-space: nowrap;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.siteNavLink:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.siteNavLink.active { color: var(--text); background: var(--surface-2); }

/* Dropdown trigger */
.siteNavDropdownTrigger {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.siteNavDropdownTrigger:hover { color: var(--text); background: var(--surface-2); }
.siteNavDropdownTrigger.active { color: var(--text); background: var(--surface-2); }
.siteNavDropdownTrigger[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }

.siteNavCaret {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.siteNavDropdownTrigger[aria-expanded="true"] .siteNavCaret {
  transform: rotate(180deg);
}

/* Dropdown panel */
.siteNavDropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  list-style: none;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 200;
}
.siteNavDropdownTrigger[aria-expanded="true"] + .siteNavDropdown {
  display: block;
}

.siteNavDropdownItem {
  display: block;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
}
.siteNavDropdownItem:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.siteNavDropdownItem.active { color: var(--text); }

.siteNavDropdownItem--disabled {
  opacity: 0.4;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.siteNavDropdownItem--disabled:hover { background: none; color: var(--muted); }

.siteNavComingSoon {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--muted);
  flex-shrink: 0;
}

.siteNavSeparator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 6px;
}

/* Search bar */
.siteNavSearch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  flex: 1;
  min-width: 0;
  max-width: 260px;
  transition: border-color 0.15s;
}
.siteNavSearch:focus-within { border-color: var(--accent); }

.siteNavSearchIcon { color: var(--muted); flex-shrink: 0; }

.siteNavSearchInput {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}
.siteNavSearchInput::placeholder { color: var(--muted); }

.siteNavQuickLinks {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0 4px 0 2px;
  flex-shrink: 0;
}

.siteNavQuickLinks .siteNavLink {
  color: var(--link);
}

/* Right section */
.siteNavRight {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}

/* + Create Team button */
.siteNavCreate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
  margin: 0 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.siteNavCreate:hover { background: var(--accent-h); text-decoration: none; color: #fff; }

/* Profile dropdown */
.siteNavProfile {
  margin-left: 4px;
}

.siteNavProfileTrigger {
  padding-left: 6px;
  gap: 7px;
}

.siteNavAvatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-h), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.siteNavProfileLabel {
  font-size: 14px;
}

.siteNavProfileMenu {
  right: 0;
  left: auto;
  min-width: 190px;
}

.siteNavDropdownButton {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.siteNavRegister {
  color: var(--link);
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.siteNavRegister:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }


/* Divider spacer before auth area */
.siteNavSpacer {
  display: block;
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Support Us button */
.siteNavSupport {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #c0368a 0%, #6b3fa0 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  white-space: nowrap;
  text-decoration: none;
  transition: filter 0.15s, opacity 0.15s;
  margin: 0 4px;
  flex-shrink: 0;
}
.siteNavSupport:hover { filter: brightness(1.12); text-decoration: none; color: #fff; }


/* Reusable BEM button system (phase 1) */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s, color 0.15s, border-color 0.15s, filter 0.15s;
}

.c-btn--sm { padding: 5px 12px; font-size: 12px; }
.c-btn--lg { padding: 10px 20px; font-size: 15px; }
.c-btn--pill { border-radius: 999px; }

.c-btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.c-btn--primary:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
  color: #fff;
  text-decoration: none;
}

.c-btn--secondary {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.c-btn--secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--muted);
  text-decoration: none;
}

.c-btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.c-btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.c-btn--danger {
  background: transparent;
  color: #f87171;
  border-color: #f87171;
}
.c-btn--danger:hover {
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  text-decoration: none;
}

.c-btn--support {
  background: linear-gradient(135deg, #c0368a 0%, #6b3fa0 100%);
  color: #fff;
  border-color: transparent;
}
.c-btn--support:hover {
  filter: brightness(1.12);
  color: #fff;
  text-decoration: none;
}


/* ── 6. Page content utilities ──────────────────────────────────────────────── */
.pageContent {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 48px var(--page-gutter) 80px;
}
.pageContent h1 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; line-height: 1.2; }
.pageContent h2 { font-size: 1.4rem; font-weight: 600; margin: 32px 0 12px; }
.pageContent p  { margin-bottom: 16px; }
.pageContent .intro { font-size: 1.1rem; color: var(--muted); margin-bottom: 32px; }

.richtext p          { margin-bottom: 14px; }
.richtext h2         { font-size: 1.3rem; font-weight: 600; margin: 28px 0 10px; }
.richtext ul,
.richtext ol         { padding-left: 24px; margin-bottom: 14px; }
.richtext li         { margin-bottom: 6px; }
.richtext a          { color: var(--link); }

.backLink {
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 28px;
}
.backLink:hover { color: var(--text); text-decoration: none; }


/* ── 7. Type badge system ───────────────────────────────────────────────────── */
.typeBadge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px 2px 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  border: 1px solid transparent;
}

.typeBadge::before {
  content: "";
  width: 22px;
  height: 22px;
  position: absolute;
  left: 0;
  display: inline-block;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask-image: var(--type-badge-icon);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: var(--type-badge-icon);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

a.typeBadge { text-decoration: none; transition: all var(--transition-fast); }

a.typeBadge:hover {
  filter: brightness(0.8);
  text-decoration: none;
}

.typeBadge.typeBadgeSmall {
  width: 24px;
  height: 24px;
  padding: 0;
}

.typeBadge.typeBadgeTiny {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
}

.typeBadge.typeBadgeTiny::before {
  width: 18px;
  height: 18px;
  left: 0;
}

.typeIcon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--type-color, rgba(255, 255, 255, 1));
}

/* Type colours — used by both .typeBadge and .typeChip */
.type-normal,   [data-type="normal"]   { background: rgb(var(--type-normal)); --type-badge-icon: url('/static/assets/type-icons/mono/normal.svg'); }
.type-fire,     [data-type="fire"]     { background: rgb(var(--type-fire)); --type-badge-icon: url('/static/assets/type-icons/mono/fire.svg'); }
.type-water,    [data-type="water"]    { background: rgb(var(--type-water)); --type-badge-icon: url('/static/assets/type-icons/mono/water.svg'); }
.type-grass,    [data-type="grass"]    { background: rgb(var(--type-grass)); --type-badge-icon: url('/static/assets/type-icons/mono/grass.svg'); }
.type-electric, [data-type="electric"] { background: rgb(var(--type-electric)); --type-badge-icon: url('/static/assets/type-icons/mono/electric.svg'); }
.type-ice,      [data-type="ice"]      { background: rgb(var(--type-ice)); --type-badge-icon: url('/static/assets/type-icons/mono/ice.svg'); }
.type-fighting, [data-type="fighting"] { background: rgb(var(--type-fighting)); --type-badge-icon: url('/static/assets/type-icons/mono/fighting.svg'); }
.type-poison,   [data-type="poison"]   { background: rgb(var(--type-poison)); --type-badge-icon: url('/static/assets/type-icons/mono/poison.svg'); }
.type-ground,   [data-type="ground"]   { background: rgb(var(--type-ground)); --type-badge-icon: url('/static/assets/type-icons/mono/ground.svg'); }
.type-flying,   [data-type="flying"]   { background: rgb(var(--type-flying)); --type-badge-icon: url('/static/assets/type-icons/mono/flying.svg'); }
.type-psychic,  [data-type="psychic"]  { background: rgb(var(--type-psychic)); --type-badge-icon: url('/static/assets/type-icons/mono/psychic.svg'); }
.type-bug,      [data-type="bug"]      { background: rgb(var(--type-bug)); --type-badge-icon: url('/static/assets/type-icons/mono/bug.svg'); }
.type-rock,     [data-type="rock"]     { background: rgb(var(--type-rock)); --type-badge-icon: url('/static/assets/type-icons/mono/rock.svg'); }
.type-ghost,    [data-type="ghost"]    { background: rgb(var(--type-ghost)); --type-badge-icon: url('/static/assets/type-icons/mono/ghost.svg'); }
.type-dragon,   [data-type="dragon"]   { background: rgb(var(--type-dragon)); --type-badge-icon: url('/static/assets/type-icons/mono/dragon.svg'); }
.type-dark,     [data-type="dark"]     { background: rgb(var(--type-dark)); --type-badge-icon: url('/static/assets/type-icons/mono/dark.svg'); }
.type-steel,    [data-type="steel"]    { background: rgb(var(--type-steel)); --type-badge-icon: url('/static/assets/type-icons/mono/steel.svg'); }
.type-fairy,    [data-type="fairy"]    { background: rgb(var(--type-fairy)); --type-badge-icon: url('/static/assets/type-icons/mono/fairy.svg'); }
.type-stellar,  [data-type="stellar"]  { background: rgb(var(--type-stellar)); color: #1a1a22; text-shadow: none; }


/* typeChip — pill shape used on dex index filter */
.typeChip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity 0.15s;
  color: #fff;
  opacity: 0.7;
  display: inline-block;
}
.typeChip:hover { opacity: 1; text-decoration: none; }
.typeChip.active { opacity: 1; outline: 2px solid rgba(255,255,255,0.5); }

.typeChipAll {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
  opacity: 0.8;
}
.typeChipAll:hover, .typeChipAll.active { opacity: 1; color: var(--text); }


/* ── 7b. Global Item Display ───────────────────────────────────────────────── */
.itemDisplay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
}
.itemDisplay:hover {
  color: var(--link);
  text-decoration: none;
}
.itemIcon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}


/* ── 7c. Global Move Display ──────────────────────────────────────────────── */
.moveDisplay {
  display: inline-flex;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
  font-size: 13px;
}
.moveDisplay:hover {
  color: var(--link);
  text-decoration: none;
}
.moveTypeIcon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}


/* ── 8. Shared dex/meta components ─────────────────────────────────────────── */

/* Page wrapper used by all dex list & detail pages */
.dexPage {
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.mainHeading {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--link);
}

/* Page headings */
.pageHeading {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.pageSubheading {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.pageIntro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 20px;
}

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--link); }

/* Filter bar */
.filterBar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
/* .filterBar > .chipGroupStack,
.filterBar > .typeFilters { flex: 0 0 100%; } */
.filterFormatWrap {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.filterFormatLabel, .filterLabel {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.filterSearch {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 12px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 220px;
  width: 100%;
  max-width: 360px;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.filterSearch:focus { border-color: var(--accent); }
.filterSearch::placeholder { color: var(--muted); }
.filterSearch::-webkit-search-cancel-button { display: none; }

.filterChip {
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
  display: inline-block;
}
.filterChip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.filterChip.active { border-color: var(--accent); color: var(--text); background: rgba(107,63,160,0.12); }

.chipGroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chipLabel {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.chipGroupStack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.filterGroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.typeFilterRow, .rankFilterRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #000;
}

.rankBtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  border: 1px solid transparent;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.rankBtn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); background: var(--surface-2); }
.rankBtn.active { color: var(--text); background: var(--surface-2); }
.rankBtn:disabled { opacity: 0.35; cursor: not-allowed; }
.rankBtnImg { width: 22px; height: 22px; display: block; }

button.typeBadge {
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.12s, outline-color 0.12s;
  justify-content: center;
}

/* button.typeBadge:not(.active) {
  background-color: transparent;
} */

button.typeBadge:hover,
button.typeBadge.active {
  opacity: 1;
}

button.typeBadge.active {
  outline: 1px solid rgba(255, 255, 255, 0.3);
}

.typeBadgeAll {
  background: var(--surface);
  color: #FFFFFF;
  text-shadow: none;
  /* border: 1px solid var(--text); */
  width: 32px;
  padding: 0;
}

.typeBadgeAll::before {
  display: none;
}

.catFilterRow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catBadgeAll {
  background: var(--surface-2);
  color: var(--muted);
  text-shadow: none;
  border-color: var(--border);
  padding-left: 8px;
}
.catBadgeAll:hover,
.catBadgeAll.active {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

.catBadgeAll::before {
  display: none;
}

.catFilterRow .catBadge {
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.12s, outline-color 0.12s;
}

.catFilterRow .catBadge:hover,
.catFilterRow .catBadge.active {
  opacity: 1;
}

.catFilterRow .catBadge.active {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 1px;
}

.typeFilterChip { opacity: 0.72; }
.typeFilterChip.active { opacity: 1; }

.toolbarRow { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.formatSelect { min-width: 180px; }

.categoryFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.categoryBtn {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.categoryBtn:hover { background: var(--surface-3, #2e2e3a); color: var(--text); }

.categoryBtn.active {
  background: var(--accent, #6b3fa0);
  border-color: var(--accent, #6b3fa0);
  color: #fff;
}

.dexTableWrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dexTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13.5px;
}

.dexTable th,
.dexTable td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.dexTable td:has(.pokeSprite) {
  padding: 0;
}

.dexTable tr:last-child td { border-bottom: none; }

.dexTable th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.dexTable tbody tr:hover td { background: var(--surface); }

.sortHeader {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s;
}

.sortHeader:hover,
.sortHeader.active { color: var(--text); }

.sortLabel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sortArrow {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.numCell { text-align: right; color: var(--muted); }
.numCell.has-value { color: var(--text); font-weight: 600; }

.spriteHeader { width: 40px; }
.spriteCell { width: 40px; }

.dexItemIcon {
  width: 28px;
  height: 28px;
  display: block;
}

.dexItemIconPlaceholder { width: 28px; height: 28px; }

.moveNameLink,
.itemNameLink,
.abilityNameLink {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.moveNameLink:hover,
.itemNameLink:hover,
.abilityNameLink:hover {
  color: var(--link);
}

.itemDescription {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 520px;
}

.abilityDescription {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 640px;
}

.priBadge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.priBadge-pos { background: rgba(74,152,48,0.2); color: #7ed060; }
.priBadge-neg { background: rgba(200,48,64,0.2); color: #f07080; }

.usageSprites {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.usageSprite {
  width: 32px;
  height: 32px;
}

td.no-padding {
  padding: 0;
}

.cellPlaceholder {
  color: var(--muted);
  font-size: 12px;
}

/* Empty state */
.emptyState {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.listPager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.listPagerMeta {
  font-size: 12px;
  color: var(--muted);
}

.listPagerBtn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.listPagerBtn:hover {
  background: var(--surface-3, #2e2e3a);
  border-color: var(--accent);
}

/* Section card */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.sectionTitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* Monospace section heading — matches screenshot mono-font section labels */
.monoHeading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  opacity: 0.65;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Monospace inline label — "ITEM", "NATURE", "TERA", etc. */
.monoLabel {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
}

/* Full-bleed heading strip at the top of a section card or segment */
.sectionHeading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sectionHeading:not(:first-child) {
  border-top: 1px solid var(--border);
}

/* Padded body below a sectionHeading */
.sectionContent {
  padding: 16px;
}

/* Profile page: sections use sectionHeading/sectionContent pattern — zero out section padding */
.profilePage .section {
  padding: 0;
  overflow: hidden;
}

/* dex detail pages use the same heading/content structure as profilePage */
.dexPage .section {
  padding: 0;
  overflow: hidden;
}

/* Single merged card spanning a profile body column */
.profileBodyCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.profileCardSegment {
  padding: 16px;
}

.profileCardSegment + .profileCardSegment {
  border-top: 1px solid var(--border);
}

/* Ability cards within profile */
.abilityCardStack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.abilityCard {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.abilityCardHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.abilityCard:has(.abilityCardDesc) .abilityCardHeader {
  margin-bottom: 5px;
}

.abilityCardName {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  flex: 1;
}

.abilityCardName:hover { color: var(--link); }

.suggestedPill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}

.abilityCardUsage {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.abilityCardDesc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}

/* BST total in base stats heading */
.bstAccent {
  color: var(--accent);
  opacity: 1;
}

/* Pokemon profile summary / SEO description visible text */
.profileSummary {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 760px;
}

/* Two-column layout */
.twoCol { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .twoCol { grid-template-columns: 1fr; } }

/* Usage bars */
.usageBar { width: 70px; height: 5px; background: var(--surface-2); border-radius: 3px; flex-shrink: 0; }
.usageBarFill { height: 100%; background: var(--accent); border-radius: 3px; }
.usagePct { font-size: 11px; color: var(--muted); width: 38px; text-align: right; flex-shrink: 0; }

/* Usage list */
.usageList { list-style: none; margin: 0; padding: 0; }
.usageItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.usageItem:last-child { border-bottom: none; }
.usageItemLabel { flex: 1; }

/* Carry-rate card grid (move/ability/item detail pages) */
.c-carry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.c-carry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.c-carry-card:hover {
  border-color: var(--accent);
  background: #1e1e28;
  text-decoration: none;
  transform: translateY(-2px);
}
.c-carry-card__sprite {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.c-carry-card__name {
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-carry-card__pct {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.c-carry-card__sub {
  font-size: 11px;
  color: var(--muted);
}
.c-carry-card__bar {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.c-carry-card__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0;
}
.c-detail-description--inline {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Tag list */
.tagList { display: flex; flex-wrap: wrap; gap: 4px; }
.tagChip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  color: var(--muted);
}

/* Move category badge */
.catBadge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 32px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.catBadge::before {
  content: "";
  width: 20px;
  height: 20px;
  position: absolute;
  left: 6px;
  display: inline-block;
  flex-shrink: 0;
  background: #fff;
  -webkit-mask-image: var(--cat-badge-icon);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: var(--cat-badge-icon);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.catBadge-physical {
  --cat-badge-icon: url('/static/assets/ui/move-physical-mono.svg');
  background: var(--cat-physical-color);
  border-color: color-mix(in srgb, var(--cat-physical-color) 78%, #000 22%);
}
.catBadge-special {
  --cat-badge-icon: url('/static/assets/ui/move-special-mono.svg');
  background: var(--cat-special-color);
  border-color: color-mix(in srgb, var(--cat-special-color) 78%, #000 22%);
}
.catBadge-status {
  --cat-badge-icon: url('/static/assets/ui/move-status-mono.svg');
  background: #6f7687;
  border-color: #4e5563;
}

/* No data inline message */
.noData { color: var(--muted); font-size: 13px; font-style: italic; }

/* Muted text utility */
.muted { color: var(--muted); }


/* ── 8. Reusable component classes (extracted from page templates) ──────────── */

/* Tab navigation bar */
.formatTabBar {
  display: flex;
  gap: 0;
}
.formatTab {
  display: flex;
  align-items: center;
  position: relative;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-top: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}

.formatTab:has(.miniPokeSprite) { padding: 10px 20px 10px 40px }

.formatTab .miniPokeSprite {
  position: absolute;
  left: 5px;
}
.formatTab:hover { color: var(--text); text-decoration: none; }
.formatTab.active { color: var(--text); border-top-color: var(--accent); background-color: var(--surface); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }

/* Surface card wrapping a table */
.tableWrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}


/* Sprite + name table cell patterns */
.pokeSpriteCell { position: relative;width: 44px; padding-right: 0 !important; }
.pokeSprite {
  width: 48px;
  height: 48px;
  display: block;
  filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.4));
  transition: all 0.15s ease-in-out;
}
a > .pokeSprite:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.8));
}

.pokeSpriteLarge {
  width: 96px;
  height: 96px;
  margin: auto;
}

.pokeNameCell { white-space: nowrap; }
.pokeNameInner { display: flex; align-items: center; gap: 8px; }
.pokeNameLink { color: var(--text); font-weight: 600; text-decoration: none; }
.pokeNameLink:hover { color: var(--link); }
.pokeTypesRow { display: flex; gap: 3px; }

/* Sprite strip rows */
.miniSprites { display: flex; gap: 4px; align-items: center; }
.miniItemSprite {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  background: var(--surface-2);
}
.miniPokeSprite {
  width: 32px;
  height: 32px;
}

/* Tier badge system */
.tierBadge {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #fff;
}
.tier-s     { background-color: #8e0fc0; }
.tier-a     { background-color: #0181cc; }
.tier-b     { background-color: #00954a; }
.tier-c     { background-color: #e07c01; }
.tier-d     { background-color: #d30248; }
.tier-e     { background-color: #700000; }
.tier-u     { background-color: #555; }

.profileTierBadge {
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  font-weight: 800;
  border-radius: 8px;
  letter-spacing: 0;
}

/* Empty / coming-soon states */
.comingSoonBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comingSoonTitle { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.comingSoonSub   { font-size: 13px; color: var(--muted); }
.emptyFilterState { padding: 40px; text-align: center; color: var(--muted); font-size: 14px; }

/* Small metadata label line */
/* Generic form filter row */
.filterFieldGroup { display: flex; flex-direction: column; gap: 6px; }
.filterFieldLabel {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.filterSelect {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 28px 6px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.12s;
  min-width: 12rem;
  min-height: 38px;
}
.filterSelect:focus { outline: none; border-color: var(--accent); }
.filterSelect:disabled { opacity: 0.45; cursor: not-allowed; }

/* Team icon (inline SVG from template tags) */
.teamIcon { display: inline-block; vertical-align: middle; flex-shrink: 0; }


/* ── 9. Global auth modal (.sam*) ───────────────────────────────────────────── */
#siteAuthModal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#siteAuthModal[hidden] { display: none; }

.siteNoticeRoot {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2100;
  width: min(92vw, 520px);
  pointer-events: none;
}

.siteNoticeCard {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 18, 24, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  color: var(--text);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.siteNoticeCard--show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.siteNoticeCard--success {
  border-color: rgba(34, 197, 94, 0.34);
  background: linear-gradient(180deg, rgba(9, 28, 18, 0.98), rgba(15, 18, 24, 0.98));
}

.siteNoticeCard--error {
  border-color: rgba(240, 128, 128, 0.34);
  background: linear-gradient(180deg, rgba(42, 18, 20, 0.98), rgba(15, 18, 24, 0.98));
}

.siteNoticeCard--info {
  border-color: rgba(96, 165, 250, 0.34);
  background: linear-gradient(180deg, rgba(17, 27, 44, 0.98), rgba(15, 18, 24, 0.98));
}

.siteNoticeBody {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.siteNoticeTitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.siteNoticeMessage {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.siteNoticeActions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.siteNoticeAction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  color: #f6d365;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.siteNoticeAction::after {
  content: '→';
  font-size: 14px;
}

.siteNoticeAction:hover {
  color: #ffe39a;
  text-decoration: none;
}

.siteNoticeClose {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  line-height: 1;
}

.siteNoticeClose:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .siteNoticeRoot {
    top: 60px;
    width: calc(100vw - 24px);
  }

  .siteNoticeCard {
    padding: 12px 14px;
    border-radius: var(--radius);
  }
}

.samOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.samBox {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 400px;
  margin: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.samHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.samTitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.samClose {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.samClose:hover { color: var(--text); background: var(--surface-2); }

.samBox .tabBar { margin-bottom: 0; }


.samWarning {
  color: #fbbf24;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
}
.samWarning[hidden] { display: none; }

.samError {
  color: #f08080;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(240, 128, 128, 0.08);
  border: 1px solid rgba(240, 128, 128, 0.2);
  border-radius: 6px;
}
.samError[hidden] { display: none; }

.samForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.samForm[hidden],
.samVerifyNotice[hidden] {
  display: none;
}

.samLabel {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.samOptional { font-weight: 400; color: var(--muted); }

.samInput {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.samInput:focus { border-color: var(--accent); }

.samBtnPrimary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  margin-top: 4px;
}
.samBtnPrimary:hover:not(:disabled) { background: var(--accent-h); }
.samBtnPrimary:disabled { opacity: 0.5; cursor: default; }

.samForgotLink {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  margin-top: -8px;
  margin-bottom: 12px;
  text-decoration: none;
}
.samForgotLink:hover { color: var(--text); text-decoration: underline; }

.samCheckLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  cursor: pointer;
}
.samCheckLabel input[type="checkbox"] { flex-shrink: 0; }

.samVerifyNotice {
  padding: 16px 0 8px;
  text-align: center;
}
.samVerifyNotice p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
}


/* ── 10. Create Team modal (.ctm*) ──────────────────────────────────────────── */
#createTeamModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#createTeamModal[hidden] { display: none; }

.ctmOverlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.ctmBox {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  margin: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ctmHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ctmTitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.ctmClose {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.ctmClose:hover { color: var(--text); background: var(--surface-2); }

.ctmGuestWarning {
  background: rgba(180, 120, 0, 0.12);
  border: 1px solid rgba(180, 120, 0, 0.3);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c9a030;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ctmGuestWarning[hidden] { display: none; }

.ctmGuestActions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ctmGuestSep { color: var(--muted); }

.ctmGuestLink {
  color: var(--link);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.ctmGuestLink:hover { text-decoration: underline; }

.ctmForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctmLabel {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.ctmOptional { font-weight: 400; color: var(--muted); }

.ctmSelect,
.ctmInput,
.ctmTextarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ctmSelect:focus,
.ctmInput:focus,
.ctmTextarea:focus { border-color: var(--accent); }
.ctmTextarea { resize: vertical; }

.ctmError {
  color: #f08080;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(240, 128, 128, 0.08);
  border: 1px solid rgba(240, 128, 128, 0.2);
  border-radius: 6px;
}
.ctmError[hidden] { display: none; }

.ctmActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.ctmBtnPrimary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.ctmBtnPrimary:hover:not(:disabled) { background: var(--accent-h); }
.ctmBtnPrimary:disabled { opacity: 0.5; cursor: default; }

.ctmBtnSecondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.ctmBtnSecondary:hover { color: var(--text); border-color: var(--muted); }

/* ── Utilities ───────────────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Rich Dropdown (.rd) ─────────────────────────────────────────────────── */
.rd { position: relative; display: inline-block; }

.rd__trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 13px; cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap; width: 100%; font-family: inherit;
  min-width: 200px;
}
.rd__trigger:hover,
.rd__trigger:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 4px var(--link); }
.rd__trigger[aria-expanded="true"] { border-color: var(--accent); }

.rd__caret { margin-left: auto; font-size: 10px; color: var(--muted); transition: transform 0.15s; flex-shrink: 0; }
.rd__trigger[aria-expanded="true"] .rd__caret { transform: rotate(180deg); }

.rd__panel {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); z-index: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-height: 300px; overflow-y: auto;
}
.rd--flip .rd__panel { top: auto; bottom: calc(100% + 4px); }

.rd__search {
  display: block; width: 100%; padding: 8px 12px; box-sizing: border-box;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 13px; outline: none; font-family: inherit;
}
.rd__search::placeholder { color: var(--muted); }

.rd__options { padding: 4px 0; }

.rd__option {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; padding: 8px 12px; text-align: left;
  background: transparent; border: none; cursor: pointer;
  color: var(--text); font-size: 13px; font-family: inherit;
  transition: background var(--transition-fast);
}
.rd__option:hover,
.rd__option.is-focused  { background: var(--surface-2); }
.rd__option.is-selected {
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.rd__option__label { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.rd__option__desc  { font-size: 11px; color: var(--muted); }

.rd__divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.rd__tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.6;
  background: color-mix(in srgb, var(--accent) 80%, transparent);
  color: var(--white);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  vertical-align: middle; flex-shrink: 0;
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.nowrap { white-space: nowrap; }

/* ── Meta champions page ──────────────────────────────────────────────────── */
.metaChampPage {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.metaHeroLayout {
  display: grid;
  grid-template-columns: 580px auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.metaHeroFilters {
  min-width: 0;
}

.metaFeaturedStack {
  display: grid;
  gap: 14px;
  display: none;
}

.metaFeaturedCard {
  position: relative;
  overflow: visible;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 24px 22px 18px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.metaFeaturedCard--curated {
  border-color: rgba(56, 189, 248, 0.3);
  background:
    radial-gradient(circle at top right, rgba(45,212,191,0.12), transparent 36%),
    linear-gradient(145deg, rgba(22, 28, 36, 0.98), rgba(12, 17, 24, 0.98));
}

.metaFeaturedCard.is-empty {
  min-height: 170px;
}

.metaFeaturedLayout,
.metaFeaturedArtCol,
.metaFeaturedInfoCol,
.metaFeaturedEmpty {
  position: relative;
  z-index: 1;
}

.metaFeaturedTags {
  position: absolute;
  top: 0;
  right: 16px;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metaFeaturedTag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.metaFeaturedLayout {
  display: flex;
  gap: 18px;
}

.metaFeaturedArtCol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.metaFeaturedArtworkLink {
  --sprite-size: 10vw;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: var(--sprite-size);
  min-height: var(--sprite-size);
  text-decoration: none;
}

.metaFeaturedArtwork {
  width: var(--sprite-size);
  height: var(--sprite-size);
  object-fit: contain;
}

.metaFeaturedInfoCol {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metaFeaturedHeaderRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.metaFeaturedEyebrow {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.62);
  margin-bottom: 6px;
}

.metaFeaturedTitle {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.metaFeaturedMetaLine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.metaFeaturedMetaLine span + span::before {
  content: "•";
  margin-right: 12px;
  color: rgba(255,255,255,0.28);
}

.metaFeaturedTypes {
  display: flex;
  gap: 4px;
  align-items: center;
}

.metaFeaturedBuild {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metaFeaturedBuildRow {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.metaFeaturedBuildLabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  min-width: 52px;
  flex-shrink: 0;
}

.metaFeaturedEvSpread {
  color: var(--muted);
  font-size: 12px;
}

.metaFeaturedMovesList {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metaFeaturedMovesList li {
  display: flex;
  align-items: center;
}

.metaFeaturedActions {
  position: absolute;
  right: 16px;
  bottom: 0;
  transform: translateY(50%);
  z-index: 3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.metaFeaturedActionBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  background: var(--accent);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.metaFeaturedActionBtn:hover:not(:disabled) {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 56%, white 10%);
  background: color-mix(in srgb, var(--surface-2) 72%, var(--accent) 28%);
}

.metaFeaturedActionBtn:disabled {
  cursor: default;
  opacity: 0.55;
}

.metaFeaturedEmpty {
  padding: 28px 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.pageHeading { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.pageSubheading { font-size: 13px; color: var(--muted); margin-bottom: 28px; }

.metaTableWrap {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.metaTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.metaTable th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.metaTable th:hover { color: var(--text); }
.metaTable th.active { color: var(--text); }
.metaTable td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.metaTable tbody tr:last-child td { border-bottom: none; }
.metaTable tbody tr:hover td { background: var(--surface-2); }

.tierCell { white-space: nowrap; }
.tierChevron { font-size: 11px; margin-left: 4px; }
.tierChevron.up   { color: #22c55e; }
.tierChevron.down { color: #ef4444; }

.usageBar {
  width: 80px;
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.usageBarFill { display: block; height: 100%; background: #22c55e; border-radius: 3px; }
.usageBarFill--muted { background: var(--muted); }
.usagePct { font-weight: 600; }

.pickChangePos  { color: #22c55e; font-size: 12px; font-weight: 600; }
.pickChangeNeg  { color: #ef4444; font-size: 12px; font-weight: 600; }
.pickChangeNull { color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .metaHeroLayout {
    grid-template-columns: 1fr;
  }

  .metaFeaturedStack {
    order: -1;
  }

  .metaFeaturedLayout {
    flex-direction: column;
  }

  .metaFeaturedArtwork {
    width: 128px;
    height: 128px;
  }

  .metaTable th:nth-child(7),
  .metaTable td:nth-child(7) { display: none; }
  .usageBar { display: none; }
}
@media (max-width: 560px) {
  .metaFeaturedTags {
    right: 12px;
    left: 12px;
  }

  .metaFeaturedActions {
    left: 12px;
  }

  .metaTable th:nth-child(5),
  .metaTable td:nth-child(5),
  .metaTable th:nth-child(6),
  .metaTable td:nth-child(6) { display: none; }
}

/* ── Speed Tiers page ─────────────────────────────────────────────────────── */
.speedTierSprites {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  min-width: 200px;
}

.metaTable th.sortable:hover { color: var(--text); }
.sortArrow { font-size: 10px; opacity: 0.5; margin-left: 3px; }

@media (max-width: 640px) {
  .speedTierPage .metaTable th:nth-child(6),
  .speedTierPage .metaTable td:nth-child(6),
  .speedTierPage .metaTable th:nth-child(7),
  .speedTierPage .metaTable td:nth-child(7) { display: none; }
}

/* ── 11. BEM component aliases (phase 1 baseline) ───────────────────────── */

/* Layout shell */
.c-page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Filters */
.c-filters,
.metaFilterBar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.c-filters__group,
.filterGroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c-filters__label,
.chipLabel {
  font-size: 0.65rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.c-filters__select,
.filterSelect {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 28px 6px 12px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.12s;
  min-width: 12rem;
  min-height: 38px;
}

.c-filters__select:focus,
.filterSelect:focus {
  outline: none;
  border-color: var(--accent);
}

.c-filters__select:disabled,
.filterSelect:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.c-filters__row--framed,
.typeFilterRow,
.rankFilterRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #000;
}

/* Table */
.c-table-wrap,
.metaTableWrap {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.c-table,
.metaTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.c-table--dense th,
.metaTable th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.c-table--dense th:hover,
.metaTable th:hover,
.c-table--dense th.active,
.metaTable th.active {
  color: var(--text);
}

.c-table--dense td,
.metaTable td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.c-table tbody tr:last-child td,
.metaTable tbody tr:last-child td {
  border-bottom: none;
}

.c-table tbody tr:hover td,
.metaTable tbody tr:hover td {
  background: var(--surface-2);
}

.c-sort-arrow,
.sortArrow {
  font-size: 10px;
  opacity: 0.5;
  margin-left: 3px;
}

/* Usage metrics */
.c-usage-bar,
.usageBar {
  width: 80px;
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.c-usage-bar__fill,
.usageBarFill {
  display: block;
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
}

.c-usage-bar__fill--muted,
.usageBarFill--muted { background: var(--muted); }

.c-usage-pct,
.usagePct { font-weight: 600; }

.siteNavSupport,
.siteFooterRegisterBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Reusable detail-page components */
.c-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}

.c-detail-hero--wide {
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.c-detail-hero--stack {
  display: block;
  margin-bottom: 36px;
}

.c-detail-hero__content {
  flex: 1;
  min-width: 200px;
}

.c-detail-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
}

.c-detail-icon-box--padded {
  padding: 8px;
}

.c-detail-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}

.c-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  align-items: center;
}

.c-detail-target {
  font-size: 12px;
  color: var(--muted);
}

.c-detail-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.c-detail-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  text-align: center;
  min-width: 72px;
}

.c-detail-stat__value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.c-detail-stat__label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.c-detail-description {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.c-detail-copy {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.5;
}

.c-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.c-chip-link {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px 3px 3px;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  transition: border-color 0.12s, color 0.12s;
}

.c-chip-link:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}

.c-chip-link__sprite {
  width: 28px;
  height: 28px;
}

.c-usage-name { flex: 1; }

.c-usage-name a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.c-usage-name a:hover { color: var(--link); }

.c-mega-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #2f2414;
  color: #ffd48a;
  border: 1px solid #5d4521;
}

.c-type-badge-hero {
  font-size: 13px;
  padding: 6px 10px;
}

.c-detail-actions {
  margin-top: 28px;
}

/* Search results page */
.searchPage {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.searchHeader { margin-bottom: 32px; }
.searchHeading {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
.searchForm {
  display: flex;
  gap: 8px;
  max-width: 500px;
}
.searchInput {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.searchInput:focus { border-color: var(--accent); }

.searchCount {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

.searchSection { margin-bottom: 36px; }
.searchSectionTitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.searchPokemonGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.searchPokemonCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s, background 0.12s;
}
.searchPokemonCard:hover { border-color: var(--accent); background: #1e1e28; text-decoration: none; }
.searchPokemonSprite { width: 64px; height: 64px; }
.searchPokemonName { font-size: 13px; font-weight: 600; margin-top: 4px; margin-bottom: 6px; }
.searchPokemonTypes { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }

.megaMiniBadge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #2f2414;
  color: #ffd48a;
  border: 1px solid #5d4521;
}

.searchList { display: flex; flex-direction: column; gap: 0; }
.searchListItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  transition: background 0.12s;
}
.searchListItem:first-child { border-top: 1px solid var(--border); }
.searchListItem:hover { background: var(--surface); }
.searchListItem a { color: var(--text); font-weight: 500; text-decoration: none; }
.searchListItem a:hover { color: var(--link); }
.searchListMeta { font-size: 12px; color: var(--muted); }

.searchTeamList { display: flex; flex-direction: column; gap: 10px; }
.searchTeamCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s, background 0.12s;
}
.searchTeamCard:hover { border-color: var(--accent); background: #1e1e28; text-decoration: none; }
.searchTeamName { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.searchTeamMeta { font-size: 12px; color: var(--muted); }

.searchEmpty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.searchEmpty p { margin-bottom: 8px; font-size: 15px; }

/* Meta format page */
.metaPage {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.pageHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.pageDataMeta { font-size: 13px; color: var(--muted); margin-bottom: 32px; }

.formatSwitcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}

.formatChip {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}

.formatChip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.formatChip.active { border-color: var(--accent); color: var(--text); background: rgba(107,63,160,0.12); }

.tabBar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tabBtn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s, border-color 0.12s;
  margin-bottom: -1px;
}

.tabBtn:hover { color: var(--text); }
.tabBtn.active { color: var(--text); border-bottom-color: var(--accent); }

.tabPanel { display: none; }
.tabPanel.active { display: block; }

.usageTable,
.speedTable {
  width: 100%;
  border-collapse: collapse;
}

.usageTable { font-size: 13.5px; }
.speedTable { font-size: 13px; }

.usageTable th,
.speedTable th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.usageTable td,
.speedTable td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.speedTable td { padding: 8px 10px; }

.usageTable tr:last-child td,
.speedTable tr:last-child td { border-bottom: none; }

.usageTable tr:hover td,
.speedTable tr:hover td { background: var(--surface-2); }

.rankCell { color: var(--muted); font-size: 12px; width: 36px; }

.nameCell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nameCell a { color: var(--text); font-weight: 600; text-decoration: none; }
.nameCell a:hover { color: var(--link); }

.spriteSmall {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.movesList {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.moveChip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.speedVal {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.speedAlt { color: var(--muted); font-size: 12px; }

.natureChip {
  background: rgba(107,63,160,0.12);
  border: 1px solid rgba(107,63,160,0.3);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11.5px;
  color: #c4a0f0;
}

.speedNote {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  font-style: italic;
}

.formatSpriteCell {
  width: 44px;
  padding-right: 0;
}

.formatTagChip {
  margin-left: 6px;
  padding: 1px 6px;
}

.formatTypeRow {
  margin-top: 3px;
  display: flex;
  gap: 3px;
}

.formatUsageCell {
  white-space: nowrap;
}

.formatItemTeraCell {
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.formatSpeedNameLink {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.formatSpeedNameText {
  font-weight: 600;
}

.formatSpeedEv {
  margin-left: 5px;
}

.speedTierSubheading {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 13px;
}

.speedTierSortableTh {
  cursor: pointer;
  user-select: none;
}

.speedTierScarfIcon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 3px;
}

.speedTierBaseCell {
  font-weight: 700;
  white-space: nowrap;
}

.speedTierNumCell {
  white-space: nowrap;
}

.speedTierNumCellMuted {
  color: var(--muted);
}

.speedTierScarfMaxCell {
  font-weight: 600;
  color: var(--link);
}

@media (max-width: 700px) {
  .usageTable th:nth-child(5),
  .usageTable td:nth-child(5),
  .usageTable th:nth-child(6),
  .usageTable td:nth-child(6) { display: none; }

  .speedTable th:nth-child(5),
  .speedTable td:nth-child(5),
  .speedTable th:nth-child(6),
  .speedTable td:nth-child(6) { display: none; }
}

/* Pokemon cards (shared across index/type pages) */
.pokemonGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

.pokemonCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  display: block;
}

.pokemonCard:hover {
  border-color: var(--accent);
  background: #1e1e28;
  text-decoration: none;
  transform: translateY(-2px);
}

.pokemonCardName {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.typeBadges {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.dexNum { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.formBadge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  color: var(--muted);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Type detail page */
.typeDetailPage { max-width: 1200px; margin: 0 auto; padding: 34px 22px 80px; }
.typeNavRow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.typeNavLink { text-decoration: none; }
.typeNavLink .typeBadge { opacity: 0.85; }
.typeNavLink.is-active .typeBadge { opacity: 1; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset; }

.typePageHeader { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.typePageHeader .pageHeading { margin-bottom: 0; }

.matchupGrid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 12px; margin-bottom: 20px; }
.matchupCard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.matchupCard h2 { margin: 0 0 8px; font-size: 14px; }
.matchupLine { margin-bottom: 8px; }
.matchupLabel { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.badgeRow { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; }

.sectionCard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.sectionHead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sectionHead h2 { margin: 0; font-size: 1.05rem; }

@media (max-width: 880px) {
  .matchupGrid { grid-template-columns: 1fr; }
}

/* Pokemon profile page */
.profilePage {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.profileHero {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) minmax(280px, 320px);
  gap: 32px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .profileHero {
    grid-template-columns: 1fr;
  }
}

.profileSprite {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.profileInfo { flex: 1; min-width: 200px; }

.formTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.formTab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.formTab.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(107,63,160,0.16);
}

.formTabSprite {
  width: 18px;
  height: 18px;
}

.profileName {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.profileDexBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.profileTypes {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.heroAbilities {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.heroAbilitiesTitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.heroAbilityList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heroAbilityRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.heroAbilityName {
  color: var(--text);
  font-weight: 600;
}

.heroAbilityPct {
  color: var(--muted);
  font-size: 12px;
}

.heroStatsCol {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heroUsageCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.heroUsageLabel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 8px;
}

.heroUsageValue {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 6px;
}

.heroUsagePct {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}

.heroUsageGrade {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 84%, #0e0e12 16%);
  border: 1px solid color-mix(in srgb, var(--accent) 64%, #fff 36%);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.3;
}

.heroUsageMeta {
  color: var(--muted);
  font-size: 12px;
}

.heroBaseStats {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-width: 280px;
}

@media (max-width: 768px) {
  .heroBaseStats {
    grid-column: 1;
  }
}

/* ── Redesigned profile header ──────────────────────────────────────────────── */

.profileFormTabBar {
  border: none;
  border-radius: 14px 14px 0 0;
  margin-bottom: 0;
  display: flex;
  gap: 0;
  background: var(--bg);
}

.profileTabRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profileTabRowLeft {
  display: flex;
}

.profileTabRowRight {
  display: flex;
  align-items: center;
}

.profileHeroCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 16px;
}

.profileHeroCard--tabbed {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.profileHeroGrid {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 24px;
  align-items: start;
}

.profileArtworkCol {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.profileArtwork {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}

.profileIdentityCol {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.profileEyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.profileMetaStatsCol {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.profileMetaStatItem {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profileMetaStatLabel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.profileMetaStatValue {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.profileMetaStatValue--grade {
  font-size: 2.4rem;
  color: var(--accent);
}

.profileRankChange {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 7px;
  width: fit-content;
}

.profileRankChange--up {
  color: #4a9830;
  background: rgba(74, 152, 48, 0.12);
}

.profileRankChange--down {
  color: #e05050;
  background: rgba(224, 80, 80, 0.12);
}

.profileRankChange--neutral {
  color: var(--muted);
}

/* ── Lower body 3-column grid ───────────────────────────────────────────────── */

.profileBodyGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.typeEffRow {
  margin-bottom: 14px;
}

.typeEffLabel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 7px;
}

.typeEffChips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ── Responsive profile ─────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .profileHeroGrid {
    grid-template-columns: 180px 1fr;
    grid-template-areas:
      "artwork identity"
      "meta    meta";
  }
  .profileArtworkCol    { grid-area: artwork; min-height: 160px; }
  .profileIdentityCol   { grid-area: identity; }
  .profileMetaStatsCol  { grid-area: meta; flex-direction: row; flex-wrap: wrap; gap: 20px; }

  .profileBodyGrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .profileHeroGrid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "artwork"
      "identity"
      "meta";
  }
  .profileArtwork { width: 160px; height: 160px; }
  .profileArtworkCol { min-height: 140px; }
  .profileMetaStatsCol { flex-direction: column; }

  .profileBodyGrid {
    grid-template-columns: 1fr;
  }
}

.buildGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.buildStack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.buildCard {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.buildHeader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.buildTitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.buildUsage {
  font-size: 11px;
  color: var(--muted);
}

.buildMetaLine {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.buildMetaLine strong {
  color: var(--text);
  font-weight: 600;
}

.buildMoves {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.buildMoveChip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,0.03);
}

.buildMoveChip:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.movesetGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.movesetRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 7px 9px;
}

.movesetMeta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

.moveCatChip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 6px;
}

.evoTree {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evoTier {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.evoNode {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-decoration: none;
}

.evoNode:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.evoNode.current {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2) 84%);
}

.evoSprite {
  width: 44px;
  height: 44px;
}

.evoName {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.evoArrow {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.statRow {
  display: grid;
  grid-template-columns: 46px 1fr 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.statRow:last-child { margin-bottom: 0; }

.statLabel { font-size: 12px; color: var(--muted); font-weight: 600; }
.statVal { font-size: 13px; font-weight: 700; color: var(--text); text-align: right; }

stat {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.statBstVal { font-size: 12px; color: var(--muted); text-align: right; }

.statBar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.statBarFill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.statBarFill.low    { background: #c04040; }
.statBarFill.mid    { background: #c09020; }
.statBarFill.good   { background: #4a9830; }
.statBarFill.great  { background: #3870d8; }

.bstRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.bstRow strong { color: var(--text); font-size: 1rem; }

.usageGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 640px) { .usageGrid { grid-template-columns: 1fr; } }

.usageItemPct {
  font-size: 12px;
  color: var(--muted);
  min-width: 38px;
  text-align: right;
  flex-shrink: 0;
}

.spreadCard {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.spreadCard:last-child { margin-bottom: 0; }

.spreadNature {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.spreadEvs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evChip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--muted);
}

.evChip.nonzero { color: var(--text); border-color: rgba(107,63,160,0.4); }

.noMeta {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 14px;
}

/* Account profile page */
.accountProfilePage {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.accountProfilePage .userHero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.accountProfilePage .userAvatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #3870d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.accountProfilePage .userInfo { flex: 1; min-width: 160px; }

.accountProfilePage .userUsername {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.accountProfilePage .userMeta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.accountProfilePage .userMeta span { display: flex; align-items: center; gap: 5px; }
.accountProfilePage .userActions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.accountProfilePage .sectionHeader {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 18px;
}

.accountProfilePage .teamGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

@media (max-width: 480px) {
  .accountProfilePage .teamGrid { grid-template-columns: 1fr; }
}

.accountProfilePage .teamCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.accountProfilePage .teamCard:hover {
  border-color: var(--accent);
  background: #1e1e28;
  text-decoration: none;
  transform: translateY(-2px);
}

.accountProfilePage .teamCardName {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accountProfilePage .teamCardMeta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.accountProfilePage .teamCardMeta .ruleset {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  margin-right: 8px;
}

.accountProfilePage .slotStrip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.accountProfilePage .slotChip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px 4px 4px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}

.accountProfilePage .slotChip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }

.accountProfilePage .slotSprite {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.accountProfilePage .slotTypes {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.accountProfilePage .emptyState {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.accountProfilePage .emptyState p { margin-bottom: 16px; }

/* Team owner/manage page */
.ownerPage { max-width: 840px; }

.ownerAlert {
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.ownerAlert--success { background: #1a3a20; border-color: #2a6a30; color: #6abf7b; }
.ownerAlert--error   { background: #3a1a1a; border-color: #6a2a2a; color: #e07070; }

.ownerSection {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.ownerSectionHeading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 0 0 16px;
}

.ownerNote {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.ownerNoteTop {
  margin-top: 10px;
}

.ownerRow { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ownerRow--spread { justify-content: space-between; }
.ownerVisibilityForm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.ownerToggleStatus { display: flex; align-items: center; gap: 10px; }

.ownerBadge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ownerBadge--public  { background: #1a3a20; color: #6abf7b; }
.ownerBadge--private { background: var(--surface-2); color: var(--muted); }
.ownerBadge--unlisted { background: #352a17; color: #e2bf72; }

.ownerShareBox { margin-top: 14px; }

.ownerShareRow {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ownerShareInput {
  flex: 1;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: monospace;
}

.ownerForm { display: flex; flex-direction: column; gap: 0; }
.ownerField { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }

.ownerLabel {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.ownerInput {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s;
}

.ownerInput:focus { outline: none; border-color: var(--accent); }
.ownerInputNarrow { max-width: 180px; }
.ownerInputSm { font-size: 13px; padding: 6px 10px; }

.ownerTextarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  width: 100%;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.15s;
}

.ownerTextarea:focus { outline: none; border-color: var(--accent); }
.ownerTextareaLg { min-height: 200px; }


/* ── FlexPage blocks ─────────────────────────────────────────────────────────
   Shared styles for all StreamField block templates (hero, feature_grid,
   cta_band, rich_content, two_column, divider, auth_inline).
   Also used by home_page.html which renders the same blocks.
   ─────────────────────────────────────────────────────────────────────────── */

/* Hero block */
.hero {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(107,63,160,0.22) 0%, transparent 65%),
    linear-gradient(180deg, #1a1a22 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 88px 24px 76px;
  text-align: center;
}
.hero--glow {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(107,63,160,0.28) 0%, transparent 70%),
    linear-gradient(180deg, #1a1a22 0%, var(--bg) 100%);
}
.heroEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(107,63,160,0.15);
  border: 1px solid rgba(107,63,160,0.35);
  border-radius: 999px;
  padding: 4px 12px 4px 9px;
  font-size: 12px;
  font-weight: 500;
  color: #c4a0f0;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.heroEyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.heroTitle {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e8e8f0 30%, #a07de0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.heroSub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.heroCta {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.heroStats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.heroStat { text-align: center; }
.heroStat .val {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.heroStat .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Feature grid block */
.featuresSection {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 24px 64px;
}
.sectionLabel {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a07de0;
  margin-top: 4px;
}
.sectionTitle {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.sectionSub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 40px;
}
.featuresGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}
.featureCard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.2s, background 0.2s;
}
.featureCard:hover { border-color: rgba(107,63,160,0.45); background: #1e1e28; }
.featureIcon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: rgba(107,63,160,0.14);
  border: 1px solid rgba(107,63,160,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 17px;
  line-height: 1;
}
.featureCard h3 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.featureCard p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}

/* CTA band block */
.ctaBand {
  background: linear-gradient(135deg, rgba(107,63,160,0.10) 0%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px;
  text-align: center;
}
.ctaBand--subtle {
  background: linear-gradient(135deg, rgba(30,30,40,0.8) 0%, transparent 100%);
}
.ctaBand h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
.ctaBand p  { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.ctaBandButtons { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Rich content block */
.flxRichContent {
  padding: 56px 24px 80px;
}
.flxRichContent--narrow {
  max-width: 720px;
  margin: 0 auto;
}

/* Two-column block */
.flxTwoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px;
}
@media (max-width: 680px) {
  .flxTwoCol { grid-template-columns: 1fr; }
  .flxTwoCol--revMobile > *:last-child { order: -1; }
}

/* Section divider block */
.flxDivider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px;
  max-width: 980px;
  margin: 0 auto;
}
.flxDivider::before,
.flxDivider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.flxDividerLabel {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

/* Inline auth block */
.flxAuthPage {
  padding: 40px 24px 80px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flxAuthCard {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 40px;
}
.flxAuthHeading {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  text-align: center;
}
.flxAuthTabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}
.flxAuthTab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.flxAuthTab:hover { background: var(--surface-2); color: var(--text); }
.flxAuthTab--active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}
.flxAuthError {
  background: rgba(224,80,80,0.12);
  border: 1px solid rgba(224,80,80,0.3);
  border-radius: 8px;
  color: #f08080;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}
.flxAuthForm { display: flex; flex-direction: column; gap: 14px; }
.flxAuthLabel {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}
.flxAuthInput {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.flxAuthInput:focus { outline: none; border-color: var(--accent); }
.flxAuthCheckLabel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.4;
}
.flxAuthCheckLabel input { flex-shrink: 0; margin-top: 2px; accent-color: var(--accent); }
.flxAuthCheckLabel a { color: var(--link); }
.flxAuthForgot { font-size: 12.5px; color: var(--muted); text-align: right; }
.flxAuthForgot a { color: var(--link); }
.flxAuthBtn { width: 100%; margin-top: 4px; }
.flxAuthVerify {
  text-align: center;
  padding: 16px 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.flxAuthVerify p { margin-bottom: 20px; }
.ownerFieldHint { font-size: 12px; color: var(--muted); }

.ownerFormActions { display: flex; gap: 10px; margin-top: 4px; }

.ownerPokemonGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.ownerPokemonCard {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ownerPokemonCard--empty {
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  font-size: 13px;
}

.ownerPokemonCardHeader {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ownerPokemonName { font-weight: 600; font-size: 14px; }
.ownerCardForm { display: flex; flex-direction: column; gap: 8px; }
.ownerCardSaveBtn { font-size: 12px; padding: 5px 12px; align-self: flex-start; }

/* Team public page */
.teamPublic {
  --page-max-width: 1600px;
  --page-gutter: 40px;
  max-width: var(--page-wide-width);
}

.teamPublic .teamHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.teamPublic .teamHeaderLeft {
  flex: 1;
  min-width: 0;
}

.teamPublic .teamHeader h1 {
  margin: 0 0 8px;
}

.teamPublic .teamMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.teamPublic .teamMetaTag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.teamPublic .teamMetaRental { color: var(--accent); border-color: var(--accent); }

.teamPublic .teamMetaRental strong {
  font-weight: 700;
  color: var(--text);
}

.teamPublic .teamPublicIconNoShrink {
  flex-shrink: 0;
}

.teamPublic .teamHeaderActions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: flex-start;
}

.teamPublic .teamHeaderActions .c-btn--secondary,
.teamPublic .teamHeaderActions a {
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.teamPublic .btnDisabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.teamPublic .btnDisabled:hover {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}

.teamPublic .teamPrimer {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.teamPublic .teamPrimer p:first-child { margin-top: 0; }
.teamPublic .teamPrimer p:last-child { margin-bottom: 0; }

.teamPublic .sectionHeading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 20px;
}

.teamPublic .teamPartyGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

.teamPublic .teamPartyCard {
  /* background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); */
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.teamPublic .teamPartyCard--empty { opacity: 0.4; }

.teamPublic .cardFlipContainer {
  display: grid;
  perspective: 1000px;
  margin-bottom: 12px;
}

.teamPublic .cardFace {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.4s ease;
  width: 100%;
}

.teamPublic .cardFaceFront { transform: rotateY(0deg); }

.teamPublic .cardFaceBack {
  transform: rotateY(180deg);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.teamPublic .cardFlipContainer.flipped .cardFaceFront { transform: rotateY(-180deg); }
.teamPublic .cardFlipContainer.flipped .cardFaceBack { transform: rotateY(0deg); }

.teamPublic .cardLayout {
  display: flex;
  gap: 14px;
}

.teamPublic .cardLeft {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.teamPublic .cardRight {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.teamPublic .teamPartySprite { display: flex; justify-content: center; }
.teamPublic .teamPartySprite img { 
  width: 10vw;
  height: 10vw;
  min-width: 100px;
  min-height: 100px;
  object-fit: contain; 
}

.teamPublic .teamPartyTypes {
  display: flex;
  gap: 4px;
  align-items: center;
}

.teamPublic .typeBadge { text-transform: uppercase; }

.teamPublic .cardNameRow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.teamPublic .megaNameRow { display: flex; align-items: center; gap: 6px; }
.teamPublic .teamPartyName { font-weight: 600; font-size: 1.25rem; line-height: 1.3; }
.teamPublic .teamPartyPrimerName { display: block; }
.teamPublic .teamPartySpecies { font-size: 12px; display: block; }

.megaOrbBtn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, filter 0.15s;
  flex-shrink: 0;
  line-height: 0;
}
.megaOrbBtn:hover { opacity: 0.85; }
.megaOrbBtn--active { opacity: 1; filter: drop-shadow(0 0 4px #b06ee8); }
.megaOrbIcon { width: 22px; height: 22px; object-fit: contain; }

.teamPublic .roleTagBadge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.teamPublic .teamPartyBuild {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.teamPublic .buildRow { display: flex; gap: 6px; align-items: baseline; }

.teamPublic .buildLabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  min-width: 52px;
  flex-shrink: 0;
}

.itemLink {
  position: relative;
  margin-right: 25px;

}

.itemLink > img {
  position: absolute;
  right: -24px;
}

.teamPublic .buildLink { color: var(--link); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.teamPublic .buildLink:hover { text-decoration: underline; }
.teamPublic .buildRowEvs .evSpread { color: var(--muted); font-size: 12px; }

.teamPublic .buildMoves {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.teamPublic .buildMoves li { display: flex; align-items: center; }

.teamPublic .teamPartyCardNote {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
  line-height: 1.5;
}

.teamPublic .cardBackHeader {
  display: flex;
  align-items: center;
  gap: 10px;
}

.teamPublic .cardFooterActions {
  display: none;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.teamPublic .cardActionBtn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.teamPublic .cardActionBtn:hover { color: var(--text); border-color: var(--accent); }

.teamPublic .cardCopiedNote {
  font-size: 12px;
  color: var(--success);
  text-align: center;
  padding-top: 6px;
}

.teamPublic .teamPublicEmptySlot {
  padding: 24px;
  text-align: center;
}

.teamPublic .cardFlipBtn,
.teamPublic .cardCopyBtn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.teamPublic .cardFlipBtn:hover {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}

.teamPublic .teamPublicActions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.teamPublic .exportCodeTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
  text-align: center;
}

.teamPublic .exportCodeBlock {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
}

.teamPublicToast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  max-width: 300px;
}

.teamPublicToast--show {
  opacity: 1;
  transform: translateY(0);
}

.teamPublicToast--success {
  border-color: #2a5a3a;
  background: color-mix(in srgb, #0d2418 60%, var(--surface));
}

.teamPublicToast--error {
  border-color: #5b242a;
  background: color-mix(in srgb, #2a1013 60%, var(--surface));
}

.teamPublicToast--info {
  border-color: var(--accent);
}

.teamPublic .modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.teamPublic .modalOverlay[hidden] {
  display: none !important;
}

.teamPublic .modalBox {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.teamPublic .modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.teamPublic .modalTitle {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.teamPublic .modalCloseBtn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.teamPublic .modalCloseBtn:hover {
  color: var(--text);
}

.teamPublic .modalBody {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.teamPublic .exportTextarea {
  width: 100%;
  min-height: 300px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
}

.teamPublic .modalFooter {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.teamPublic .teamPublicActionIcon {
  margin-right: 8px;
}

.teamPublic .c-btn--secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}

.teamPublic .c-btn--secondary:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .teamPublic .teamHeader {
    flex-direction: column;
    align-items: stretch;
  }

  .teamPublic .teamHeaderActions {
    justify-content: flex-start;
  }

  .teamPublic .teamPartyGrid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .teamPublic {
    --page-gutter: 16px;
  }
}

/* ── Global gutter reduction ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --page-gutter: 16px; }
}

/* ── Mobile nav hamburger + create button ──────────────────────────────────── */
.siteNavMobileToggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}
.siteNavMobileToggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.siteNavMobileToggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.siteNavMobileToggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.siteNavMobileToggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.siteNavMobileCreate {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.siteNavMobileCreate:hover { background: var(--accent-h, #8b51c4); }

@media (max-width: 768px) {
  /* Show hamburger + create CTA; push them to the right with auto margin on create */
  .siteNavMobileCreate { display: inline-flex; margin-left: auto; margin-right: 6px; }
  .siteNavMobileToggle { display: flex; }
  .siteHeaderRight { display: none; }

  /* Nav panel hidden by default; shown when .is-open */
  #siteNavWrapper {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    padding: 12px 16px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  #siteNavWrapper.is-open { display: block; }

  /* Stack nav vertically */
  .siteNav { flex-direction: column; align-items: stretch; gap: 4px; }
  .siteNavList { flex-direction: column; gap: 2px; }

  /* Fix 1: full-width nav items */
  .siteNavItem { width: 100%; }
  .siteNavLink {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 9px 10px;
    font-size: 14px;
    box-sizing: border-box;
  }
  .siteNavDropdownTrigger {
    width: 100%;
    padding: 9px 10px;
    font-size: 14px;
    justify-content: space-between;
    box-sizing: border-box;
  }

  /* Dropdowns become inline accordions */
  .siteNavDropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-left: 2px solid var(--border);
    margin-left: 12px;
    padding: 4px 0;
    background: transparent;
    min-width: unset;
  }
  .siteNavDropdownItem { padding: 7px 12px; border-radius: 4px; }

  /* Fix 3: full-width search */
  .siteNavSearch { display: flex; width: 100%; margin: 8px 0; box-sizing: border-box; }
  .siteNavSearchInput { flex: 1; width: 100%; min-width: 0; box-sizing: border-box; }

  /* Fix 4: account actions in a row */
  .siteNavRight {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  /* Quick links and profile span full width */
  .siteNavQuickLinks {
    width: 100%;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .siteNavProfile { width: 100%; }
  /* Auth pair shares one row, equal width */
  .siteNavLink.c-btn { flex: 1; justify-content: center; text-align: center; min-width: 0; }
  .siteNavRegister { flex: 1; justify-content: center; min-width: 0; }
  /* Create Team spans full row */
  .siteNavCreate { width: 100%; justify-content: center; text-align: center; }
}
