/* The "Explore" section on the dashboard (assets/js/spotlight.js): pick a team or a player. Delete the <link> to this file and the
   <script> for spotlight.js to remove the feature. */
.explore { padding: 20px 22px 22px; margin-bottom: 18px; }
.ex-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.ex-top h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.05; }
.ex-top p { margin: 4px 0 0; color: var(--dim); font-size: 14px; }
.ex-seg { margin-top: 0; }
.ex-lead { margin: 0 0 12px; color: var(--dim); font-size: 15px; }
.ex-note { margin: 14px 0 0; color: var(--faint); font-size: 12px; font-family: var(--mono); max-width: 820px; }
.ex-empty { margin: 8px 0 0; color: var(--dim); }
.ex-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; min-height: 40px; cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.ex-btn:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-1px); }
.ex-btn:focus-visible, .ex-logo:focus-visible, .sp-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* the 32 logos, AFC and NFC side by side, one column per division */
.ex-confs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin: 6px 0 4px; }
.ex-conf h3 { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; font-weight: 500; }
.ex-logos { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 8px; justify-items: center; }
.ex-logo {
  position: relative; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 70%, #fff); transition: transform 0.2s var(--ease, ease), box-shadow 0.25s;
}
.ex-logo img { width: 78%; height: 78%; object-fit: contain; pointer-events: none; }
.ex-logo i { font: 700 11px/1 var(--mono); font-style: normal; color: #111; }
.ex-logo:hover { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 26px 3px var(--c); z-index: 1; }
.ex-logo[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 22px 4px var(--c); }

/* the team header: the team is the focus once chosen */
.ex-team-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 14px 16px; margin-bottom: 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line));
  background: linear-gradient(100deg, color-mix(in srgb, var(--c) 26%, transparent), transparent 72%);
}
.ex-team-logo { width: 68px; height: 68px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); object-fit: contain; box-shadow: 0 0 0 3px var(--c), 0 10px 22px -10px var(--c); }
.ex-team-text { flex: 1 1 220px; }
.ex-team-text h3, .ex-profile-text h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.6vw, 38px); line-height: 1.05; }
.ex-team-text h3:focus, .ex-profile-text h3:focus { outline: none; }
.ex-team-text p { margin: 2px 0 0; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ex-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* cards */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.sp-card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%;
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; text-align: center; cursor: pointer;
  font-family: var(--sans); color: var(--fg); border-radius: 16px; border: 1px solid var(--line); min-height: 44px;
  background: linear-gradient(180deg, var(--surface2), var(--surface) 70%);
  transition: transform 0.3s var(--ease, ease), box-shadow 0.3s var(--ease, ease), border-color 0.25s;
}
.sp-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(220px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 34%, transparent), transparent 70%);
}
.sp-card:hover { border-color: var(--c); box-shadow: 0 18px 34px -18px var(--c); }
.sp-card:hover::before, .sp-card:focus-visible::before { opacity: 1; }
.sp-card:active { transform: scale(0.98); }
.sp-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); line-height: 1.3; min-height: 2.6em; display: grid; place-items: center; }
.sp-avatar { position: relative; display: block; width: 120px; height: 130px; margin: 4px 0 4px; }
.sp-figure { width: 100%; height: 100%; overflow: visible; user-select: none; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35)); }
.sp-logo { position: absolute; right: -8px; bottom: 0; width: 34px; height: 34px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); object-fit: contain; box-shadow: 0 0 0 2px var(--c), 0 4px 10px rgba(0, 0, 0, 0.35); }
.sp-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.sp-meta { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.sp-stat { margin-top: 6px; font-size: 13px; color: var(--dim); }
.sp-stat b { display: block; font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--fg); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sp-sub { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* the player profile */
.ex-profile { display: grid; grid-template-columns: auto 1fr; gap: 22px 30px; align-items: center; padding: 16px 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: linear-gradient(100deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
.ex-profile-avatar.sp-avatar { width: 168px; height: 182px; margin: 0; }
.ex-profile-avatar .sp-logo { width: 46px; height: 46px; right: -12px; }
.ex-sub { margin: 2px 0 12px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.ex-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0 0 14px; }
.ex-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.ex-facts dd { margin: 2px 0 0; font-family: var(--mono); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-teams-label { margin: 0 0 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.ex-teams { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; padding: 0; list-style: none; }
.ex-teams li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); font-family: var(--mono); font-size: 12px; }
.ex-teams em { font-style: normal; color: var(--faint); }
.ex-mini { width: 24px; height: 24px; padding: 2px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); object-fit: contain; }
.ex-profile .ex-btn { margin-top: 14px; }
.ex-prompt .ex-btn { margin-bottom: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .sp-card:hover { transform: perspective(700px) translateY(-4px) rotateX(var(--rx)) rotateY(var(--ry)); }
  .sp-card { animation: sp-in 0.6s var(--ease, ease) calc(var(--i, 0) * 70ms) backwards; }
  .sp-card:nth-child(2) { animation-delay: 70ms; } .sp-card:nth-child(3) { animation-delay: 140ms; }
  .sp-card:nth-child(4) { animation-delay: 210ms; } .sp-card:nth-child(5) { animation-delay: 280ms; }
  .ex-team-head, .ex-profile { animation: sp-in 0.6s var(--ease, ease) backwards; }
  .sp-figure { transform-origin: 50% 0%; }
  .sp-card:hover .sp-figure, .ex-profile:hover .sp-figure { animation: sp-sway 1.2s ease-in-out infinite; }
}
@keyframes sp-in { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
@keyframes sp-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

@media (max-width: 700px) {
  .ex-confs { grid-template-columns: 1fr; }
  .sp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sp-avatar { width: 96px; height: 104px; }
  .ex-profile { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ex-facts, .ex-teams { justify-content: center; }
  .ex-profile-avatar.sp-avatar { width: 140px; height: 152px; }
}
@media (max-width: 600px) {
  .ex-logo { width: 44px; height: 44px; }
  .ex-btn { min-height: 44px; }
  .ex-seg button { min-height: 44px; }
}

/* "How this player compares": the best season as a bar against the position's best season, with a tick at the 10th best */
.ex-compare { margin: 4px 0 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); max-width: 720px; }
.ex-compare h4 { margin: 0; font-size: 15px; font-weight: 600; }
.ex-compare-sub { margin: 2px 0 12px; color: var(--dim); font-size: 12.5px; }
.ex-bar { position: relative; height: 12px; border-radius: 999px; background: var(--line); overflow: visible; }
.ex-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c)); box-shadow: 0 0 14px -2px var(--c); transform-origin: left; }
.ex-bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--fg); opacity: 0.8; }
.ex-compare-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--dim); }
.ex-compare-main b { font-size: 17px; color: var(--fg); font-variant-numeric: tabular-nums; }
.ex-compare-tick { color: var(--faint); }
.ex-compare-lead { margin-top: 8px; }
.ex-lead-chip { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--fg); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.2s; }
.ex-lead-chip:hover { border-color: var(--c); color: var(--accent-text); transform: translateY(-1px); }
.ex-lead-chip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ex-lead-self { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) { .ex-bar-fill { animation: ex-grow 0.9s var(--ease, ease) 0.15s backwards; } }
@keyframes ex-grow { from { transform: scaleX(0); } }
@media (max-width: 600px) { .ex-lead-chip { min-height: 44px; } }

/* no backdrop behind the jersey; a very dark jersey gets a thin light edge and a soft glow so it still reads on the dark card */
.sp-figure.sp-dark { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.75)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.2)); }
:root[data-theme="light"] .sp-figure.sp-dark { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3)); }
