:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #00a562;
  --green-dark: #087a4d;
  --blue: #1976d2;
  --red: #e53935;
  --yellow: #f5c542;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 18px;
}

:root.dark {
  --bg: #111827;
  --card: #182235;
  --text: #f9fafb;
  --muted: #aab4c3;
  --line: #2d3748;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-weight: 900;
  color: var(--green);
  font-size: 21px;
}
.topnav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
  flex: 1;
}
.topnav a:hover { color: var(--green); }
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
  padding: 26px 0 70px;
}

.sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.profile-card, .side-card, .headline-card, .panel, .info-grid article, .mini-widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 22px;
  position: sticky;
  top: 86px;
}
.avatar-wrap {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f9fafb, #e6f7ef);
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #e7f7ef;
}
.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-card h1 {
  text-align: center;
  font-size: 34px;
  line-height: 1;
  margin: 0 0 6px;
}
.latin {
  text-align: center;
  color: var(--muted);
  margin: 0 0 18px;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 14px;
}
.quick-stats div {
  padding: 13px 8px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.quick-stats div:last-child { border-right: 0; }
.quick-stats strong {
  display: block;
  font-size: 26px;
  color: var(--green);
}
.quick-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.season-link, .refresh-link {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 12px;
  padding: 12px;
  font-weight: 900;
}
.season-link { background: var(--green); color: white; }
.refresh-link {
  margin-top: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.source-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  margin: 12px 0 0;
}
.bio-list {
  margin: 18px 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.bio-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.bio-list dt {
  color: var(--muted);
  font-size: 13px;
}
.bio-list dd {
  margin: 0;
  font-weight: 700;
}

.side-card {
  padding: 18px;
}
.side-card h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
.teammates {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.teammates li {
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
}
.teammates li:nth-child(7) {
  color: var(--green);
  background: rgba(0,165,98,.1);
}

.content {
  display: grid;
  gap: 18px;
}

.headline-card {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 24px;
  align-items: center;
  padding: 28px;
}
.crumbs {
  margin: 0 0 10px;
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}
.headline-card h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: .96;
  letter-spacing: -.05em;
}
.lead {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 760px;
}
.total-box {
  border-radius: 18px;
  background: linear-gradient(145deg, var(--green), var(--green-dark));
  color: white;
  padding: 18px;
  text-align: center;
}
.total-box span {
  font-size: 13px;
  opacity: .85;
}
.total-box strong {
  display: block;
  font-size: 44px;
}

.profile-tabs {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.profile-tabs a {
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}
.profile-tabs a.active, .profile-tabs a:hover {
  background: rgba(0,165,98,.12);
  color: var(--green);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.info-grid article {
  padding: 18px;
}
.info-grid span, .info-grid small {
  display: block;
  color: var(--muted);
}
.info-grid strong {
  display: block;
  font-size: 34px;
  color: var(--text);
  margin: 6px 0;
}

.panel {
  padding: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}
.panel p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tools input {
  min-width: 240px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
}
.tools button, .competition-tabs button, .mini-widget button {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
}
.competition-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.competition-tabs button.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.table-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.table-summary span {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 800;
}
.table-summary b { color: var(--text); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.career-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  font-size: 14px;
}
.career-table th {
  text-align: left;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.career-table th, .career-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}
.career-table tr:hover td {
  background: rgba(0,165,98,.06);
}
.career-table td:nth-child(n+4), .career-table th:nth-child(n+4) {
  text-align: center;
}
.team-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
}
.team-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}
.num-strong {
  color: var(--green);
  font-weight: 900;
}
.yellow-card, .red-card {
  display: inline-block;
  width: 11px;
  height: 15px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 5px;
}
.yellow-card { background: var(--yellow); }
.red-card { background: var(--red); }

.interactive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mini-widget {
  padding: 18px;
  box-shadow: none;
}
.mini-widget h3 {
  margin: 0 0 12px;
}
.mini-widget label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  margin-bottom: 12px;
}
.mini-widget select {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 10px;
}
.compare-result {
  display: grid;
  gap: 8px;
}
.compare-row {
  display: grid;
  grid-template-columns: 80px 1fr 54px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}
.bar {
  height: 9px;
  border-radius: 99px;
  background: var(--bg);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--green);
}
.quiz-options, .poll-buttons, .poll-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.quiz-options button, .poll-buttons button {
  text-align: left;
}
.quiz-result {
  min-height: 26px;
  color: var(--green) !important;
  font-weight: 900;
  margin-top: 10px !important;
}
.poll-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  color: var(--muted);
}
.poll-bar {
  margin-top: 5px;
  height: 8px;
  border-radius: 99px;
  background: var(--bg);
  overflow: hidden;
}
.poll-bar i {
  display: block;
  height: 100%;
  background: var(--green);
}
details {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
summary {
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .info-grid, .interactive-grid { grid-template-columns: repeat(2, 1fr); }
  .headline-card { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topnav { display: none; }
  .info-grid, .interactive-grid { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; }
  .tools input { min-width: 100%; }
  .bio-list div { grid-template-columns: 1fr; gap: 4px; }
}


.current-season {
  overflow: hidden;
}
.season-status {
  min-width: 150px;
  text-align: center;
  border-radius: 16px;
  background: rgba(0,165,98,.1);
  border: 1px solid rgba(0,165,98,.2);
  padding: 14px;
}
.season-status span,
.season-hero span,
.season-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.season-status strong {
  display: block;
  color: var(--green);
  font-size: 24px;
}
.season-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.season-hero article,
.season-grid article,
.season-insights article,
.answer-grid article,
.moments article {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 16px;
  padding: 16px;
}
.season-hero strong {
  display: block;
  font-size: 28px;
  margin: 6px 0;
}
.season-main-stat {
  background: linear-gradient(145deg, rgba(0,165,98,.16), rgba(0,165,98,.04)) !important;
}
.season-main-stat strong {
  font-size: 56px !important;
  color: var(--green);
  line-height: .9;
}
.season-hero small,
.season-grid small {
  color: var(--muted);
}
.season-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.season-grid strong {
  display: block;
  font-size: 25px;
  margin: 6px 0 3px;
}
.season-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.season-insights h3,
.answer-grid h3,
.moments h3 {
  margin: 0 0 8px;
}
.season-insights ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.answer-grid p,
.moments p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.search-intents .topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.topic-tags a {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.topic-tags a:hover {
  color: var(--green);
  border-color: rgba(0,165,98,.35);
}
.moments {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.moments article span {
  display: inline-flex;
  margin-bottom: 10px;
  color: white;
  background: var(--green);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 900;
}
.faq-list {
  display: grid;
  gap: 0;
}
.refresh-link {
  display: none !important;
}
@media (max-width: 980px) {
  .season-hero,
  .season-insights,
  .answer-grid,
  .moments {
    grid-template-columns: 1fr;
  }
  .season-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .season-grid {
    grid-template-columns: 1fr;
  }
}


.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 980px;
  margin: 0 auto;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}
.cookie-banner.is-visible {
  display: flex;
}
.cookie-banner strong {
  display: block;
  margin-bottom: 4px;
}
.cookie-banner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.cookie-banner button {
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-banner button:hover {
  filter: brightness(.95);
}
@media (max-width: 760px) {
  .update-grid {
    grid-template-columns: 1fr;
  }
  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .cookie-banner button {
    width: 100%;
  }
}


/* Mobile polish */
@media (max-width: 760px) {
  .container {
    width: min(100% - 20px, 1200px);
  }

  .topbar__inner {
    min-height: auto;
    padding: 10px 0;
    gap: 10px;
  }

  .logo {
    font-size: 19px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .layout {
    padding: 14px 0 44px;
    gap: 14px;
  }

  .profile-card,
  .side-card,
  .headline-card,
  .panel {
    border-radius: 14px;
  }

  .profile-card {
    padding: 16px;
  }

  .avatar-wrap {
    width: 124px;
    height: 124px;
    margin-bottom: 12px;
  }

  .profile-card h1 {
    font-size: 30px;
  }

  .latin {
    font-size: 14px;
  }

  .headline-card {
    padding: 18px;
  }

  .headline-card h2 {
    font-size: 34px;
    letter-spacing: -0.04em;
  }

  .lead {
    font-size: 15px;
    line-height: 1.6;
  }

  .total-box {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
    padding: 14px 16px;
  }

  .total-box strong {
    font-size: 34px;
  }

  .profile-tabs {
    position: sticky;
    top: 59px;
    z-index: 12;
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .profile-tabs a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .panel {
    padding: 16px;
  }

  .panel-head {
    gap: 12px;
    margin-bottom: 14px;
  }

  .panel h2 {
    font-size: 24px;
  }

  .panel p {
    font-size: 15px;
  }

  .season-status {
    width: 100%;
    text-align: left;
  }

  .season-hero article,
  .season-grid article,
  .answer-grid article,
  .moments article {
    padding: 14px;
  }

  .season-main-stat strong {
    font-size: 44px !important;
  }

  .season-hero strong {
    font-size: 22px;
  }

  .season-grid strong {
    font-size: 23px;
  }

  .answer-grid h3,
  .moments h3 {
    font-size: 18px;
  }

  .tools {
    width: 100%;
  }

  .tools input,
  .tools button {
    width: 100%;
  }

  .competition-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .competition-tabs button {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .table-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-summary span {
    text-align: center;
    padding: 8px;
  }

  .table-wrap {
    margin-left: 0;
    margin-right: 0;
    border-radius: 12px;
  }

  .career-table {
    min-width: 820px;
    font-size: 13px;
  }

  .career-table th,
  .career-table td {
    padding: 11px 9px;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 14px;
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .quick-stats strong {
    font-size: 22px;
  }

  .quick-stats span {
    font-size: 12px;
  }

  .headline-card h2 {
    font-size: 30px;
  }

  .season-grid {
    gap: 8px;
  }

  .table-summary {
    grid-template-columns: 1fr;
  }

  .topic-tags a {
    font-size: 12px;
  }
}


/* Strict mobile overflow fix: horizontal scroll only inside .table-wrap */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

.content,
.sidebar,
.panel,
.profile-card,
.side-card,
.headline-card,
.profile-tabs,
.season-hero,
.season-grid,
.answer-grid,
.moments,
.interactive-grid {
  min-width: 0;
  max-width: 100%;
}

.lead,
.panel p,
.answer-grid p,
.moments p,
.bio-list dd,
.topic-tags a,
.career-table td,
.career-table th {
  overflow-wrap: anywhere;
  word-break: normal;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: auto;
    margin-right: auto;
  }

  .topbar__inner {
    width: 100%;
  }

  .layout {
    display: block;
    width: 100%;
    max-width: 100%;
    padding-top: 12px;
  }

  .sidebar,
  .content {
    width: 100%;
    max-width: 100%;
    display: grid;
    gap: 12px;
  }

  .content {
    margin-top: 12px;
  }

  .profile-card,
  .side-card,
  .headline-card,
  .panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .headline-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .total-box {
    width: 100%;
    min-width: 0;
  }

  .profile-tabs {
    position: relative;
    top: auto;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    gap: 6px;
  }

  .profile-tabs a {
    min-width: 0;
    width: 100%;
    text-align: center;
    white-space: normal;
    font-size: 13px;
    line-height: 1.2;
    padding: 9px 6px;
  }

  .season-hero,
  .season-grid,
  .season-insights,
  .answer-grid,
  .moments,
  .interactive-grid,
  .info-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;
  }

  .season-hero article,
  .season-grid article,
  .season-insights article,
  .answer-grid article,
  .moments article,
  .info-grid article {
    width: 100%;
    max-width: 100%;
  }

  .topic-tags {
    width: 100%;
    max-width: 100%;
  }

  .topic-tags a {
    max-width: 100%;
    white-space: normal;
  }

  .tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .competition-tabs {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: visible;
    gap: 6px;
  }

  .competition-tabs button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    padding: 10px 8px;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto;
  }

  .career-table {
    width: max-content;
    min-width: 760px;
    max-width: none;
  }

  .cookie-banner {
    width: auto;
    max-width: calc(100vw - 20px);
    left: 10px;
    right: 10px;
    box-sizing: border-box;
  }
}

@media (max-width: 420px) {
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }

  .profile-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .competition-tabs {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-stats div {
    min-width: 0;
    padding-left: 4px;
    padding-right: 4px;
  }

  .bio-list div {
    width: 100%;
    min-width: 0;
  }

  .career-table {
    min-width: 720px;
  }
}
