.team-page { min-width: 0; font-size: max(1rem, 1rem); }
.team-page * { min-width: 0; }
.team-page p, .team-page h1, .team-page h2, .team-page h3, .team-page label, .team-page button { overflow-wrap: anywhere; }
.team-picker { margin-bottom: 24px; border: 1px solid var(--border); }
.team-page .team-picker > .team-search { max-width: 760px; }
.team-page .team-search > label { font-weight: 650; }
.team-page .team-search input { min-height: 52px; font-weight: 400; }
.team-page .team-browse-heading { margin: 24px 0 16px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 1.125rem; font-weight: 500; }
.team-browse-controls { display: grid; gap: 16px; }
.team-browse-controls label { max-width: 520px; }
.team-browse-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; }
.team-browse-shortcuts button { min-width: 64px; padding: 10px 16px; }
.team-browse-shortcuts button[aria-pressed=true] { background: var(--soft); color:var(--brand-orange); border-color:var(--brand-orange); }
.team-directory-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 16px; }
.team-directory-heading > div { display: grid; gap: 6px; }
.team-directory-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.team-directory-list { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0; }
.team-directory-list li { display: flex; }
.team-directory-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 16px; text-align: left; min-height: 132px; }
.team-directory-list button:hover, .team-directory-list button[aria-pressed=true] { background: var(--soft); border-color:var(--brand-orange); }
.team-directory-identity { display: flex; align-items: center; gap: 8px; }
.team-directory-list strong { font-size: 1.25rem; line-height: 1.4; }
.team-directory-english { color: var(--muted); overflow-wrap: anywhere; }
.team-directory-matches { margin-top: auto; padding-top: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.team-directory-pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.team-directory-pagination button { min-width: 100px; }
.team-directory-state { display: grid; justify-items: start; gap: 12px; padding: 24px 0 8px; color: var(--muted); }
.team-page .team-detail-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; }
.team-detail-nav .stats-back { margin: 0; }
.team-page .team-detail-nav button { padding: 10px 0; border: 0; background: transparent; color: var(--accent); }
.team-page .team-profile-controls { position: relative; }
.team-page .team-profile { min-height: 44px; margin-bottom: 16px; padding-inline-end: 7rem; }
.team-page .team-profile .team-selection-identity { gap: 14px; }
.team-page .team-profile h1 { font-size: 2rem; line-height: 1.25; }
.team-page .team-profile p { margin-top: 4px; color: var(--muted); }
.team-match-history h3 { scroll-margin-top: 88px; }
.team-page .team-filter-toolbar { margin-bottom: 12px; }
.team-page .team-filter-disclosure { margin: 0; padding: 0; border: 0; background: transparent; }
.team-page .team-filter-disclosure > summary { position: absolute; inset-block-start: 0; inset-inline-end: 0; display: inline-flex; width: fit-content; align-items: center; gap: 10px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--paper); list-style: none; white-space: nowrap; }
.team-page .team-filter-disclosure > summary::-webkit-details-marker { display: none; }
.team-page .team-filter-disclosure > summary > span:first-child { font-weight: 650; }
.team-page .team-filter-summary { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.team-page .team-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; margin: 0 0 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); }
.team-page .team-filters > .team-filter-fields { grid-column: 1; grid-row: 1; }
.team-page .team-filters > .team-filter-actions { grid-column: 2; grid-row: 1; }
.team-page .team-filters > .team-custom-dates, .team-page .team-filters > p, .team-page .team-filters > .filter-notice { grid-column: 1 / -1; }
.team-page .team-filters p { margin: 0; }
.team-search { display: grid; gap: 8px; }
.team-search-results:empty { display: none; }
.team-search-status { padding: 10px 0; color: var(--muted); }
.team-search-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.team-search-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; }
.team-search-identity { display: flex; align-items: center; gap: 10px; }
.team-search-copy { display: grid; gap: 2px; }
.team-search-list button:hover { border-color: var(--accent); background: var(--soft); }
.team-search-count { flex-shrink: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.team-filter-fields, .team-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.team-custom-dates { display: grid; gap: 10px; }
.team-custom-dates[hidden] { display: none; }
.team-filter-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.team-filter-actions button { min-width: 100px; }
.team-query { background: var(--orange); color: var(--paper); border-color: var(--orange); }
.team-query:hover { background: var(--accent); border-color: var(--accent); }
.team-page button, .team-page input, .team-page select, .team-page summary { min-height: 44px; font-size: max(1rem, 1rem); }
.team-selection-identity { display: flex; align-items: center; gap: 12px; }
.team-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-bottom: 16px; }
.team-comparison { margin-bottom: 12px; }
.team-page .team-comparison { border-top: 3px solid var(--orange); }
.team-comparison-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.team-metric-column { width: 40%; }
.team-comparison-table th, .team-comparison-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: middle; overflow-wrap: anywhere; }
.team-comparison-table th:first-child { text-align: left; padding-left: 0; }
.team-comparison-table th:last-child, .team-comparison-table td:last-child { padding-right: 0; }
.team-comparison-table thead th { color: var(--muted); font-weight: 500; padding-top: 4px; }
.team-comparison-table tbody th { font-weight: 500; }
.team-comparison-table tbody tr:nth-child(-n+3) td { font-size: 1.625rem; }
.team-comparison-table tbody tr:nth-child(3) > * { border-bottom: 2px solid var(--border); }
.team-primary-value { display: block; color: var(--ink); font-weight: 700; }
.team-sample-size { display: block; color: var(--muted); font-size: max(1rem, 1rem); font-weight: 400; }
.team-comparison-table tbody tr:first-child .team-count { font-size: 1rem; }
.team-count, .team-rate { display: block; }
.team-count { font-weight: 650; }
.team-rate { margin-top: 2px; color: var(--muted); }
.team-average { font-weight: 650; }
.team-unit { display: inline-block; margin-left: 6px; font-size: max(1rem, 1rem); font-weight: 400; color: var(--muted); }
.team-no-value { color: var(--muted); }
.team-distributions, .team-match-history { margin: 28px 0; }
.team-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.team-scores .team-section-heading, .team-records .team-section-heading { margin-bottom: 12px; }
.team-score-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 18px; }
.team-score-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.team-score-label { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.team-score-tally { display: flex; justify-content: flex-end; gap: 4px 12px; flex-wrap: wrap; text-align: right; font-variant-numeric: tabular-nums; }
.team-score-tally .team-rate { margin: 0; }
.team-score-bar { grid-column: 1 / -1; display: block; width: 100%; height: 7px; overflow: hidden; border-radius: 6px; background: var(--bg); }
.team-score-bar i { display: block; height: 100%; background: var(--orange); border-radius: inherit; }
.team-more-scores { margin-top: 20px; }
.team-more-scores summary { color: var(--accent); }
.team-side-empty { padding: 12px 0; }
.team-unknown { margin: -8px 0 28px; }
.team-record-list { list-style: none; padding: 0; margin: 0; }
.team-record-list li { display: grid; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.team-record-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); }
.team-record-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.team-record-score > span { overflow-wrap: anywhere; }
.team-record-score > span:last-child { text-align: right; }
.team-record-score > strong { font-size: 1.375rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-record-team { display: flex; align-items: center; gap: 6px; }
.team-record-team > span { min-width: 0; }
.team-record-team:last-child { flex-direction: row-reverse; }
@media (max-width: 480px) {
  .team-record-team { flex-direction: column; align-items: flex-start; align-self: start; }
  .team-record-team:last-child { flex-direction: column; align-items: flex-end; }
}
.team-selected-name { font-weight: 650; }
.team-record-result { color: var(--muted); }
.team-record-result strong { color: var(--ink); }
.team-record-pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.team-record-pagination button { min-width: 100px; }
@media (max-width: 700px) {
  .team-two-columns { grid-template-columns: 1fr; }
  .team-directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-page .team-filters { grid-template-columns: minmax(0, 1fr); }
  .team-page .team-filters > .team-filter-fields, .team-page .team-filters > .team-filter-actions { grid-column: 1; grid-row: auto; }
}
@media (max-width: 480px) {
  .team-filter-fields, .team-date-fields { grid-template-columns: 1fr; }
  .team-filter-actions button { flex: 1; min-width: 0; }
  .team-comparison-table th, .team-comparison-table td { padding: 12px 5px; }
  .team-metric-column { width: 36%; }
  .team-comparison-table td .team-unit { display: block; margin: 0; }
  .team-comparison-table tbody tr:nth-child(-n+3) td { font-size: 1.375rem; }
  .team-record-score { gap: 8px; }
  .team-search-list button { flex-wrap: wrap; gap: 4px 12px; }
  .team-directory-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .team-directory-list button { min-height: 132px; padding: 12px; }
  .team-directory-list strong { font-size: 1.125rem; }
  .team-browse-shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .team-browse-shortcuts button { min-width: 0; padding: 10px 4px; }
  .team-page .team-profile h1 { font-size: 1.75rem; }
}
