/* Tilak Varma Fan Club — unified professional finish
   Loaded after the legacy feature sheets so shared layout and responsive fixes win. */
:root {
  --tv-ink: #071426;
  --tv-ink-soft: #0b1d35;
  --tv-blue: #0b4ca3;
  --tv-blue-bright: #1767c8;
  --tv-cyan: #72e2f1;
  --tv-orange: #ff744b;
  --tv-line: rgba(142, 190, 242, 0.2);
  --tv-muted: #a8bad1;
  --tv-card: rgba(13, 31, 54, 0.88);
  --tv-shadow: 0 16px 42px rgba(0, 7, 20, 0.2);
}
html {
  scroll-padding-top: 92px;
}
body {
  color: #edf4ff;
  background:
    radial-gradient(ellipse at 12% 4%, rgba(20, 83, 157, 0.2), transparent 34rem),
    radial-gradient(ellipse at 88% 30%, rgba(18, 67, 132, 0.12), transparent 40rem), var(--tv-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
main {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 25, 48, 0.94);
  border-bottom: 1px solid rgba(114, 226, 241, 0.22);
  box-shadow: 0 8px 28px rgba(0, 8, 25, 0.12);
  backdrop-filter: blur(18px);
}
.topbar nav a {
  border-radius: 9px;
  text-decoration: none;
  transition:
    color 160ms ease,
    background 160ms ease;
}
.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: #fff;
  background: rgba(82, 153, 226, 0.14);
}
.brand-mark {
  box-shadow:
    0 0 0 1px rgba(114, 226, 241, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.18);
}
.section {
  box-sizing: border-box;
  width: 100%;
  padding: clamp(42px, 5.8vw, 78px) clamp(16px, 4.5vw, 68px);
}
.section-heading {
  gap: clamp(16px, 3vw, 34px);
}
.section-heading > p {
  color: var(--tv-muted);
  line-height: 1.7;
}
.eyebrow {
  letter-spacing: 0.14em;
}
.section h2,
.section h3 {
  text-wrap: balance;
}
.button,
button,
select,
input,
textarea {
  font: inherit;
}
.button,
button {
  -webkit-tap-highlight-color: transparent;
}
.button,
.stats-subnav button,
.statsguru-format-tabs button,
.statsguru-category-grid button,
.player-analysis-actions button {
  border-radius: 12px;
}
.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--tv-cyan);
  outline-offset: 3px;
}
.stat-card,
.home-snapshot-block,
.home-bowling-card,
.match-history-summary,
.profile-teams-panel,
.icc-ranking-card,
.statsguru-panel,
.player-analysis-filter,
.fan-card,
.upcoming-match-card,
.home-format-card,
.format-card {
  border-color: var(--tv-line);
  box-shadow: var(--tv-shadow);
}
.stat-card,
.home-snapshot-block,
.home-bowling-card,
.match-history-summary,
.profile-teams-panel,
.icc-ranking-card,
.statsguru-panel,
.player-analysis-filter {
  background: linear-gradient(145deg, rgba(17, 42, 72, 0.92), rgba(8, 23, 42, 0.96));
}
.stat-card strong,
.home-mini-stat strong {
  font-variant-numeric: tabular-nums;
}
.stats-grid,
.home-quick-stats,
.home-bowling-stats,
.home-format-stats {
  align-items: stretch;
}
.data-line,
.home-snapshot-foot,
.statsguru-sourcebar {
  border-color: var(--tv-line);
}
#stats .statsguru-format-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch;
  gap: 8px !important;
  max-width: 100%;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  white-space: normal !important;
  scrollbar-width: none !important;
  overscroll-behavior-x: auto !important;
  background: linear-gradient(135deg, rgba(10, 33, 61, 0.9), rgba(12, 26, 47, 0.92));
  border: 1px solid var(--tv-line);
}
#stats .statsguru-format-tabs button {
  flex: 0 1 auto !important;
  min-width: 0;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
#stats .statsguru-format-tabs button.active {
  box-shadow:
    0 0 0 2px rgba(255, 116, 75, 0.16),
    0 8px 20px rgba(255, 116, 75, 0.18);
}
#stats .statsguru-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
#stats .statsguru-category-grid button {
  min-width: 0;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}
.table-wrap,
.statsguru-table-wrap,
.match-history-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: separate;
  border-spacing: 0;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
}
#photos .cricinfo-gallery {
  border-color: var(--tv-line);
}
#photos .tv-album-card {
  box-shadow: 0 12px 28px rgba(0, 10, 28, 0.22);
}
#photos .tv-album-card:focus-visible {
  outline: 3px solid var(--tv-cyan);
  outline-offset: 3px;
}
footer {
  border-top-color: var(--tv-line);
}
:root[data-theme-resolved="light"] body {
  color: #102b4d;
  background:
    radial-gradient(ellipse at 12% 4%, rgba(36, 112, 203, 0.12), transparent 34rem), #f2f7ff;
}
:root[data-theme-resolved="light"] .topbar {
  background: rgba(7, 38, 76, 0.97);
  color: #f7fbff;
  border-bottom-color: rgba(255, 116, 75, 0.45);
}
:root[data-theme-resolved="light"] .section-heading > p {
  color: #526985;
}
:root[data-theme-resolved="light"] .stat-card,
:root[data-theme-resolved="light"] .home-snapshot-block,
:root[data-theme-resolved="light"] .home-bowling-card,
:root[data-theme-resolved="light"] .match-history-summary,
:root[data-theme-resolved="light"] .profile-teams-panel,
:root[data-theme-resolved="light"] .icc-ranking-card,
:root[data-theme-resolved="light"] .statsguru-panel,
:root[data-theme-resolved="light"] .player-analysis-filter {
  background: linear-gradient(145deg, #ffffff, #edf4ff);
  border-color: #d4e2f4;
  box-shadow: 0 12px 30px rgba(29, 71, 122, 0.08);
}
:root[data-theme-resolved="light"] #stats .statsguru-format-tabs {
  background: linear-gradient(135deg, #e9f2ff, #f8fbff);
  border-color: #c9dbf2;
}
@media (max-width: 900px) {
  .section {
    padding: 44px 22px;
  }
  .section-heading {
    align-items: flex-start;
  }
  #stats .statsguru-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  html {
    scroll-padding-top: 74px;
  }
  .topbar {
    padding-inline: 14px;
  }
  .section {
    padding: 34px 15px;
  }
  .section-heading {
    margin-bottom: 22px;
    gap: 12px;
  }
  .section h2 {
    font-size: clamp(30px, 9vw, 43px);
    line-height: 1.06;
  }
  .section-heading > p {
    max-width: none;
    font-size: 14px;
  }
  .stats-grid,
  .home-quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .stat-card {
    min-width: 0;
    padding: 15px 13px;
  }
  #stats .statsguru-format-tabs {
    gap: 7px !important;
    padding: 8px !important;
    margin-inline: 0 !important;
  }
  #stats .statsguru-format-tabs button {
    flex: 0 1 auto !important;
    min-height: 40px;
    padding: 9px 10px !important;
    font-size: 11px;
  }
  #stats .statsguru-format-tabs button[data-sg-format="T20"] {
    flex: 1 1 145px !important;
  }
  #stats .statsguru-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  #stats .statsguru-category-grid button {
    padding: 10px;
    font-size: 12px;
  }
  .home-snapshot-heading,
  .home-bowling-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .home-snapshot-foot {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  footer {
    gap: 12px;
  }
}
@media (max-width: 380px) {
  .section {
    padding-inline: 12px;
  }
  .stats-grid,
  .home-quick-stats {
    gap: 7px;
  }
  .stat-card {
    padding: 12px 10px;
  }
  #stats .statsguru-format-tabs button {
    padding-inline: 8px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Final responsive/accessibility pass — safe overrides, no data hooks changed. */
:root {
  color-scheme: dark;
  --tv-focus-ring: #80e8ff;
}
:root[data-theme-resolved="light"] {
  color-scheme: light;
}
img,
video,
iframe {
  max-width: 100%;
}
button,
.button,
select,
input,
textarea {
  touch-action: manipulation;
}
button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}
::selection {
  background: rgba(255, 116, 75, 0.32);
  color: #fff;
}
section[id],
main > section[id] {
  scroll-margin-top: 96px;
}
:where(
  .stat-card,
  .home-format-card,
  .format-card,
  .fan-card,
  .upcoming-match-card,
  .tv-album-card
) {
  min-width: 0;
}
:where(.stat-card, .home-format-card, .format-card, .fan-card, .upcoming-match-card)
  :where(h2, h3, p, small, strong, span) {
  overflow-wrap: anywhere;
}
:where(.table-wrap, .statsguru-table-wrap, .match-history-table-wrap) table {
  min-width: 100%;
}
:where(.table-wrap, .statsguru-table-wrap, .match-history-table-wrap) th,
:where(.table-wrap, .statsguru-table-wrap, .match-history-table-wrap) td {
  white-space: normal;
}
@media (max-width: 760px) {
  .topbar {
    gap: 10px;
  }
  .brand {
    min-width: 0;
    max-width: calc(100% - 58px);
  }
  .brand > span:last-child {
    overflow-wrap: anywhere;
  }
  .topbar nav {
    max-width: 100%;
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .topbar nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
  .profile-section {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-photo-wrap {
    width: min(100%, 360px);
  }
  .icc-ranking-card,
  .profile-facts {
    min-width: 0;
  }
  .settings-theme-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .settings-theme-options button {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 420px) {
  .settings-theme-options {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .icc-ranking-card {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto !important;
  }
}

/* Keep the settings panel visible whenever section navigation activates it. */
#settings:not([hidden]) {
  display: block;
}

#profile .photo-fallback.is-visible {
  display: grid !important;
  place-content: center;
}
#profile .photo-fallback:not(.is-visible) {
  visibility: hidden;
}

/* Profile section refresh — dedicated overrides after all legacy profile rules. */
#profile.profile-section {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  column-gap: clamp(24px, 4vw, 58px);
  row-gap: 24px;
  overflow: hidden;
  padding-block: clamp(32px, 4.4vw, 60px) !important;
  background:
    radial-gradient(ellipse at 5% 15%, rgba(29, 102, 180, 0.22), transparent 42%),
    radial-gradient(ellipse at 92% 8%, rgba(255, 116, 75, 0.09), transparent 32%),
    linear-gradient(125deg, #071629, #0a1b30 56%, #091426) !important;
  border-block: 1px solid rgba(126, 178, 229, 0.2);
}
#profile.profile-section:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12px;
  border: 1px solid rgba(145, 192, 239, 0.08);
  border-radius: 24px;
  pointer-events: none;
}
#profile.profile-section:after {
  content: "72";
  position: absolute;
  z-index: -1;
  right: 1%;
  bottom: -24%;
  color: rgba(255, 255, 255, 0.025);
  font:
    900 clamp(220px, 34vw, 520px) / 0.8 Impact,
    sans-serif;
  letter-spacing: -0.1em;
  pointer-events: none;
}
#profile .profile-photo-wrap {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  max-width: 430px;
  min-height: 0;
  max-height: none;
  aspect-ratio: 4/5.15;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(179, 216, 255, 0.28);
  border-radius: 22px;
  background: linear-gradient(150deg, #1a3c60, #091526 76%);
  box-shadow:
    0 28px 75px rgba(0, 0, 0, 0.34),
    0 0 0 5px rgba(255, 255, 255, 0.025);
}
#profile .profile-photo-wrap img {
  z-index: 2;
  object-fit: cover;
  object-position: center top;
  transition:
    transform 0.45s ease,
    opacity 0.25s ease;
}
#profile .profile-photo-wrap:hover img {
  transform: scale(1.025);
}
#profile .photo-fallback {
  z-index: 1;
  place-content: center;
  color: rgba(255, 255, 255, 0.86);
  font:
    800 clamp(36px, 5vw, 68px) / 1 Impact,
    sans-serif;
  letter-spacing: -0.04em;
}
#profile .photo-fallback span {
  display: block;
  margin-top: 8px;
  color: #ff8050;
  font-size: 1.5em;
}
#profile .photo-fallback.is-visible {
  display: grid !important;
}
#profile .photo-fallback:not(.is-visible) {
  visibility: hidden;
}
#profile .profile-jersey-mark {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 44px;
  display: grid;
  place-items: center;
  width: clamp(46px, 5vw, 66px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: linear-gradient(145deg, #ff8755, #e64f31);
  color: #fff;
  font:
    900 clamp(22px, 3vw, 34px) / 1 Impact,
    sans-serif;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
#profile .profile-photo-source {
  position: absolute;
  z-index: 5;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 12, 23, 0.78);
  color: #e5f3ff;
  font: 700 9px/1.2 var(--mono, monospace);
  letter-spacing: 0.1em;
  text-decoration: none;
  backdrop-filter: blur(10px);
}
#profile .profile-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  max-width: 860px;
}
#profile .profile-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
#profile .profile-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(114, 226, 241, 0.25);
  border-radius: 999px;
  background: rgba(28, 91, 128, 0.2);
  color: #a7f1ff;
  font: 800 10px/1 var(--mono, monospace);
  letter-spacing: 0.12em;
}
#profile .profile-status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ce5b2;
  box-shadow: 0 0 0 4px rgba(124, 229, 178, 0.12);
}
#profile .profile-team-label {
  color: #9eb4cf;
  font: 700 10px/1.4 var(--mono, monospace);
  letter-spacing: 0.1em;
}
#profile .profile-copy h2 {
  margin: 0 0 14px;
  color: #f5f8ff;
  font:
    900 clamp(42px, 6vw, 82px) / 0.92 "Barlow Condensed",
    Impact,
    sans-serif;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
#profile .profile-copy h2 em {
  display: block;
  color: #ff8050 !important;
  font-style: normal;
}
#profile .profile-intro {
  max-width: 620px;
  margin: 0 0 13px;
  color: #c4d3e6;
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.65;
}
#profile .profile-location-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: #93abc6;
  font-size: 12px;
}
#profile .profile-location-line > span:first-child {
  color: #ff8050;
  font-size: 19px;
}
#profile .profile-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
#profile .profile-quick-actions .button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 15px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
#profile .profile-quick-actions .button:hover {
  transform: translateY(-2px);
}
#profile .profile-data-grid {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 14px;
  min-width: 0;
}
#profile .profile-facts {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}
#profile .profile-facts > div {
  min-width: 0;
  padding: 15px 13px;
  border: 1px solid rgba(125, 169, 211, 0.18);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(18, 39, 65, 0.9), rgba(9, 23, 41, 0.94));
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}
#profile .profile-facts > div:hover {
  transform: translateY(-2px);
  border-color: rgba(114, 226, 241, 0.4);
}
#profile .profile-facts small,
#profile .profile-ranking-values small {
  display: block;
  margin-bottom: 7px;
  color: #8fa9c7;
  font: 700 9px/1.4 var(--mono, monospace);
  letter-spacing: 0.08em;
}
#profile .profile-facts strong {
  display: block;
  color: #f4f7ff;
  font-size: clamp(12px, 1.05vw, 15px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
#profile .profile-ranking-card {
  grid-column: 2;
  display: block;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(114, 226, 241, 0.18);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(16, 38, 64, 0.96), rgba(8, 20, 36, 0.96));
  box-shadow:
    inset 3px 0 0 rgba(114, 226, 241, 0.62),
    0 14px 32px rgba(0, 0, 0, 0.16);
}
#profile .profile-ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
}
#profile .profile-ranking-heading .eyebrow {
  color: #83e6f3;
  font-size: 9px;
}
#profile .profile-ranking-heading h3,
#profile .profile-teams-heading h3 {
  margin: 4px 0 0;
  color: #f3f7ff;
  font:
    800 19px/1.1 "Barlow Condensed",
    Impact,
    sans-serif;
  letter-spacing: 0.025em;
}
#profile .profile-ranking-heading h3 em,
#profile .profile-teams-heading h3 em {
  color: #ff8050;
  font-style: normal;
}
#profile .profile-ranking-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
#profile .profile-ranking-values > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(131, 170, 212, 0.16);
  border-radius: 10px;
  background: rgba(4, 14, 27, 0.35);
}
#profile .profile-ranking-values strong {
  display: block;
  color: #fff;
  font:
    800 clamp(18px, 2vw, 26px) / 1.1 "Barlow Condensed",
    Impact,
    sans-serif;
  overflow-wrap: anywhere;
}
#profile .profile-ranking-updated {
  margin: 11px 0 0;
  color: #91a9c3;
  font-size: 10px;
  line-height: 1.5;
}
#profile .profile-teams-panel {
  grid-column: 1;
  min-width: 0;
  margin: 0;
  padding: 17px;
  border: 1px solid rgba(125, 169, 211, 0.18);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(16, 37, 62, 0.94), rgba(8, 21, 38, 0.97));
}
#profile .profile-teams-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
#profile .profile-teams-heading .eyebrow,
#profile .profile-source-panel > .eyebrow {
  color: #8fa9c7;
  font-size: 9px;
}
#profile .profile-teams-count {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(114, 226, 241, 0.1);
  color: #9deaf4;
  font: 700 9px/1 var(--mono, monospace);
}
#profile .profile-team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
#profile .profile-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid rgba(131, 170, 212, 0.2);
  border-radius: 999px;
  background: rgba(5, 17, 31, 0.58);
  color: #d8e6f7;
  font: 700 10px/1.2 var(--mono, monospace);
  letter-spacing: 0.02em;
}
#profile .profile-team-chip.team-india {
  border-color: rgba(255, 128, 80, 0.4);
  background: linear-gradient(120deg, rgba(255, 128, 80, 0.16), rgba(114, 226, 241, 0.08));
  color: #fff;
}
#profile .profile-team-chip.team-mi {
  border-color: rgba(72, 139, 255, 0.36);
  color: #b8d5ff;
}
#profile .profile-team-chip.team-medak {
  border-color: rgba(114, 226, 241, 0.3);
  color: #9deaf4;
}
#profile .profile-teams-note {
  margin: 13px 0 0;
  color: #8ca5c1;
  font-size: 10px;
  line-height: 1.5;
}
#profile .profile-source-panel {
  grid-column: 2;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(125, 169, 211, 0.18);
  border-radius: 15px;
  background: rgba(6, 18, 33, 0.66);
}
#profile .profile-source-links {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
#profile .profile-source-links a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(131, 170, 212, 0.14);
  border-radius: 9px;
  color: #d9e7f8;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}
#profile .profile-source-links a:hover {
  border-color: rgba(114, 226, 241, 0.42);
  background: rgba(114, 226, 241, 0.06);
}
#profile .profile-source-links a[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}
#profile .profile-source-links a span {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 29px;
  border-radius: 7px;
  background: rgba(114, 226, 241, 0.1);
  color: #a2edf7;
  font: 800 10px/1 var(--mono, monospace);
}
#profile .profile-source-links a b {
  min-width: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
#profile .profile-data-stamp {
  margin: 11px 0 0;
  color: #819bb7;
  font-size: 9px;
  line-height: 1.5;
}
:root[data-theme-resolved="light"] #profile.profile-section {
  background:
    radial-gradient(ellipse at 5% 15%, rgba(29, 102, 180, 0.08), transparent 42%),
    linear-gradient(125deg, #f6f9ff, #eaf2fc 56%, #f7faff) !important;
  border-color: #d3e2f4;
}
:root[data-theme-resolved="light"] #profile .profile-copy h2,
:root[data-theme-resolved="light"] #profile .profile-ranking-heading h3,
:root[data-theme-resolved="light"] #profile .profile-teams-heading h3,
:root[data-theme-resolved="light"] #profile .profile-facts strong,
:root[data-theme-resolved="light"] #profile .profile-ranking-values strong {
  color: #102d50;
}
:root[data-theme-resolved="light"] #profile .profile-intro {
  color: #4f6680;
}
:root[data-theme-resolved="light"] #profile .profile-location-line,
:root[data-theme-resolved="light"] #profile .profile-ranking-updated,
:root[data-theme-resolved="light"] #profile .profile-teams-note,
:root[data-theme-resolved="light"] #profile .profile-data-stamp {
  color: #637d99;
}
:root[data-theme-resolved="light"] #profile .profile-facts > div,
:root[data-theme-resolved="light"] #profile .profile-ranking-card,
:root[data-theme-resolved="light"] #profile .profile-teams-panel,
:root[data-theme-resolved="light"] #profile .profile-source-panel {
  background: linear-gradient(145deg, #fff, #f0f6ff);
  border-color: #d3e2f4;
  box-shadow: 0 10px 26px rgba(29, 71, 122, 0.07);
}
:root[data-theme-resolved="light"] #profile .profile-facts small,
:root[data-theme-resolved="light"] #profile .profile-ranking-values small,
:root[data-theme-resolved="light"] #profile .profile-source-panel > .eyebrow {
  color: #637d99;
}
:root[data-theme-resolved="light"] #profile .profile-team-chip {
  background: #f5f9ff;
  border-color: #d5e3f5;
  color: #234464;
}
:root[data-theme-resolved="light"] #profile .profile-source-links a {
  color: #234464;
  border-color: #d5e3f5;
}
@media (max-width: 850px) {
  #profile.profile-section {
    grid-template-columns: minmax(160px, 0.68fr) minmax(0, 1.32fr);
    column-gap: 18px;
    row-gap: 18px;
  }
  #profile .profile-data-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  #profile .profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  #profile.profile-section {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 15px 28px !important;
    row-gap: 17px;
  }
  #profile .profile-photo-wrap {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 240px);
    aspect-ratio: 4/4.8;
    border-radius: 18px;
  }
  #profile .profile-copy {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
    text-align: left;
  }
  #profile .profile-eyebrow-row {
    gap: 7px;
    margin-bottom: 10px;
  }
  #profile .profile-status-pill {
    font-size: 9px;
    padding: 7px 9px;
  }
  #profile .profile-team-label {
    font-size: 9px;
  }
  #profile .profile-copy h2 {
    font-size: clamp(42px, 12vw, 64px);
  }
  #profile .profile-intro {
    font-size: 14px;
  }
  #profile .profile-data-grid {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  #profile .profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  #profile .profile-facts > div {
    padding: 12px 10px;
  }
  #profile .profile-ranking-card,
  #profile .profile-teams-panel,
  #profile .profile-source-panel {
    grid-column: 1;
  }
  #profile .profile-ranking-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #profile .profile-quick-actions {
    gap: 7px;
  }
  #profile .profile-quick-actions .button {
    flex: 1 1 auto;
    padding: 10px 11px;
    font-size: 11px;
  }
}
@media (max-width: 360px) {
  #profile .profile-copy h2 {
    font-size: 39px;
  }
  #profile .profile-facts > div {
    padding: 10px 8px;
  }
  #profile .profile-facts strong {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #profile * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Profile polish pass — sharper hierarchy, richer surfaces, and calm micro-interactions. */
#profile.profile-section {
  --profile-cyan: #72e2f1;
  --profile-orange: #ff8050;
  --profile-line: rgba(137, 190, 239, 0.2);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}
#profile.profile-section:before {
  inset: 10px;
  border-radius: 18px;
  border-color: rgba(164, 205, 244, 0.11);
}
#profile.profile-section:after {
  right: 2%;
  bottom: -19%;
  color: rgba(112, 190, 255, 0.035);
  text-shadow: 0 0 80px rgba(70, 174, 255, 0.06);
}
#profile .profile-photo-wrap {
  border: 1px solid rgba(132, 219, 255, 0.42);
  border-radius: 24px;
  background: #08172a;
  box-shadow:
    0 30px 65px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 128, 80, 0.1),
    0 0 42px rgba(47, 158, 220, 0.12);
}
#profile .profile-photo-wrap:after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 45% 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 10, 21, 0.5));
}
#profile .profile-photo-wrap img {
  filter: saturate(1.04) contrast(1.025);
  transform: translateZ(0);
}
#profile .profile-photo-wrap:hover img {
  transform: scale(1.035);
}
#profile .profile-jersey-mark {
  right: 14px;
  bottom: 48px;
  border-radius: 15px;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 9px 26px rgba(230, 79, 49, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
#profile .profile-photo-source {
  left: 13px;
  bottom: 13px;
  border-color: rgba(164, 222, 255, 0.26);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
#profile .profile-status-pill {
  border-color: rgba(114, 226, 241, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
#profile .profile-copy h2 {
  margin-bottom: 16px;
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-shadow: 0 8px 35px rgba(0, 0, 0, 0.16);
}
#profile .profile-copy h2 em {
  text-shadow: 0 8px 28px rgba(255, 128, 80, 0.12);
}
#profile .profile-intro {
  max-width: 580px;
  line-height: 1.7;
}
#profile .profile-location-line {
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(137, 190, 239, 0.13);
  border-radius: 10px;
  background: rgba(10, 29, 49, 0.44);
}
#profile .profile-quick-actions .button {
  min-height: 45px;
  border-radius: 12px;
}
#profile .profile-quick-actions .button.primary {
  border: 1px solid rgba(255, 156, 113, 0.65);
  background: linear-gradient(115deg, #ff8b58, #f15f3e 62%, #d94737);
  color: #fff;
  box-shadow:
    0 8px 22px rgba(235, 83, 54, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
#profile .profile-quick-actions .button.primary:hover {
  box-shadow: 0 12px 27px rgba(235, 83, 54, 0.25);
}
#profile .profile-quick-actions .button.outline {
  border: 1px solid rgba(114, 226, 241, 0.28);
  background: rgba(10, 31, 52, 0.62);
}
#profile .profile-facts > div,
#profile .profile-ranking-card,
#profile .profile-teams-panel,
#profile .profile-source-panel {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}
#profile .profile-facts > div:before,
#profile .profile-ranking-card:before,
#profile .profile-teams-panel:before,
#profile .profile-source-panel:before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(114, 226, 241, 0.34), transparent);
  pointer-events: none;
}
#profile .profile-facts > div:hover,
#profile .profile-ranking-card:hover,
#profile .profile-teams-panel:hover,
#profile .profile-source-panel:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 226, 241, 0.36);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
#profile .profile-facts small,
#profile .profile-ranking-values small {
  letter-spacing: 0.1em;
}
#profile .profile-facts strong {
  letter-spacing: -0.015em;
}
#profile .profile-ranking-card {
  box-shadow:
    inset 3px 0 0 rgba(114, 226, 241, 0.62),
    0 14px 32px rgba(0, 0, 0, 0.16);
}
#profile .profile-ranking-values > div {
  background: linear-gradient(145deg, rgba(6, 21, 37, 0.72), rgba(15, 37, 59, 0.58));
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
#profile .profile-ranking-values > div:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 128, 80, 0.4);
}
#profile .profile-ranking-values strong {
  color: #f8fbff;
  font-variant-numeric: tabular-nums;
}
#profile .profile-teams-count {
  border: 1px solid rgba(114, 226, 241, 0.16);
}
#profile .profile-team-chip {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}
#profile .profile-team-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(114, 226, 241, 0.45);
}
#profile .profile-source-links a {
  min-height: 48px;
  border-radius: 11px;
  background: rgba(8, 25, 43, 0.28);
}
#profile .profile-source-links a > span {
  border: 1px solid rgba(114, 226, 241, 0.12);
}
#profile .profile-source-links a b {
  line-height: 1.4;
}
#profile :is(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--profile-cyan);
  outline-offset: 3px;
}
:root[data-theme-resolved="light"] #profile .profile-location-line {
  background: rgba(255, 255, 255, 0.72);
  border-color: #d6e4f5;
}
:root[data-theme-resolved="light"] #profile .profile-quick-actions .button.outline {
  background: #fff;
  border-color: #cfdeef;
  color: #173a5e;
}
:root[data-theme-resolved="light"] #profile .profile-facts > div,
:root[data-theme-resolved="light"] #profile .profile-ranking-card,
:root[data-theme-resolved="light"] #profile .profile-teams-panel,
:root[data-theme-resolved="light"] #profile .profile-source-panel {
  box-shadow:
    0 12px 30px rgba(31, 69, 113, 0.075),
    inset 0 1px 0 #fff;
}
:root[data-theme-resolved="light"] #profile .profile-ranking-values > div {
  background: linear-gradient(145deg, #f8fbff, #edf5ff);
  border-color: #d9e7f7;
}
:root[data-theme-resolved="light"] #profile .profile-ranking-values strong {
  color: #102d50;
}
:root[data-theme-resolved="light"] #profile .profile-source-links a {
  background: rgba(255, 255, 255, 0.76);
}
@media (min-width: 1100px) {
  #profile.profile-section {
    column-gap: clamp(36px, 5vw, 76px);
    padding-inline: clamp(28px, 4vw, 64px) !important;
  }
  #profile .profile-data-grid {
    gap: 16px;
  }
}
@media (max-width: 850px) {
  #profile .profile-photo-wrap {
    border-radius: 19px;
  }
  #profile .profile-facts > div:hover,
  #profile .profile-ranking-card:hover,
  #profile .profile-teams-panel:hover,
  #profile .profile-source-panel:hover {
    transform: none;
  }
}
@media (max-width: 620px) {
  #profile.profile-section {
    border-radius: 18px;
    padding: 22px 13px 24px !important;
    background:
      radial-gradient(ellipse at 100% 0%, rgba(255, 116, 75, 0.09), transparent 36%),
      radial-gradient(ellipse at 0% 12%, rgba(29, 102, 180, 0.2), transparent 45%),
      linear-gradient(145deg, #071629, #0a1b30 56%, #091426) !important;
  }
  #profile.profile-section:before {
    inset: 7px;
    border-radius: 13px;
  }
  #profile .profile-photo-wrap {
    width: min(100%, 218px);
    aspect-ratio: 4/4.7;
    margin-inline: auto;
    border-radius: 18px;
  }
  #profile .profile-copy {
    text-align: center;
  }
  #profile .profile-eyebrow-row,
  #profile .profile-quick-actions {
    justify-content: center;
  }
  #profile .profile-copy h2 {
    margin-bottom: 12px;
    font-size: clamp(44px, 13vw, 62px);
  }
  #profile .profile-intro {
    max-width: 440px;
    margin-inline: auto;
  }
  #profile .profile-location-line {
    margin: 0 auto 16px;
    justify-content: center;
    font-size: 11px;
  }
  #profile .profile-quick-actions .button {
    flex: 1 1 135px;
    min-height: 43px;
  }
  #profile .profile-facts > div,
  #profile .profile-ranking-card,
  #profile .profile-teams-panel,
  #profile .profile-source-panel {
    border-radius: 13px;
  }
  #profile .profile-ranking-card,
  #profile .profile-teams-panel,
  #profile .profile-source-panel {
    padding: 14px;
  }
  #profile .profile-ranking-values > div {
    padding: 10px;
  }
  #profile .profile-team-chip {
    min-height: 29px;
    padding: 7px 9px;
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  #profile .profile-photo-wrap,
  #profile .profile-ranking-card,
  #profile .profile-teams-panel,
  #profile .profile-source-panel {
    animation: profile-rise-in 0.55s cubic-bezier(0.2, 0.7, 0.25, 1) both;
  }
  #profile .profile-ranking-card {
    animation-delay: 0.06s;
  }
  #profile .profile-teams-panel {
    animation-delay: 0.1s;
  }
  #profile .profile-source-panel {
    animation-delay: 0.14s;
  }
}
@keyframes profile-rise-in {
  from {
    opacity: 0.72;
    translate: 0 9px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #profile .profile-photo-wrap,
  #profile .profile-ranking-card,
  #profile .profile-teams-panel,
  #profile .profile-source-panel {
    animation: none !important;
  }
}

/* Profile cleanup: remove source panel and let team journey use the full row. */
#profile .profile-teams-panel {
  grid-column: 1 / -1;
}
@media (max-width: 620px) {
  #profile .profile-teams-panel {
    grid-column: 1;
  }
}

/* Profile finish: compact player-highlight pills and clearer section rhythm. */
#profile .profile-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 4px;
}
#profile .profile-highlights > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid rgba(127, 185, 229, 0.2);
  border-radius: 999px;
  background: rgba(11, 32, 53, 0.58);
  color: #c4d8ee;
  font: 700 9px/1.2 var(--mono, monospace);
  letter-spacing: 0.045em;
}
#profile .profile-highlights i {
  color: #ff8b58;
  font-size: 12px;
  font-style: normal;
}
#profile .profile-highlights > span:last-child i {
  color: #fff;
  font-weight: 900;
}
#profile .profile-data-grid {
  align-items: start;
}
#profile .profile-facts {
  align-content: start;
}
#profile .profile-teams-panel {
  grid-column: 1 / -1;
}
#profile .profile-teams-note {
  font-size: 10px;
}
:root[data-theme-resolved="light"] #profile .profile-highlights > span {
  background: rgba(255, 255, 255, 0.78);
  border-color: #d6e4f5;
  color: #31516f;
}
@media (max-width: 620px) {
  #profile .profile-highlights {
    justify-content: center;
    gap: 6px;
    margin-bottom: 3px;
  }
  #profile .profile-highlights > span {
    min-height: 29px;
    padding: 7px 8px;
    font-size: 8px;
  }
  #profile .profile-data-grid {
    gap: 11px;
  }
}
