/* Evidence-led match analysis: neutral season, lime observations, purple opponent. */
.pair-analysis,
.analysis-form-section {
  margin: 36px 0;
  scroll-margin-top: 100px;
}
.serve-matchups,
.analysis-trend-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.serve-matchup,
.trend-panel {
  min-width: 0;
  padding: 26px;
  background: #17191f;
}
.matchup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.matchup-head span {
  color: var(--muted);
  font-size: 12px;
}
.matchup-head h3,
.trend-heading h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.35;
}
.matchup-row {
  padding-top: 18px;
}
.matchup-row h4 {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--muted);
}
.matchup-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.matchup-values strong {
  display: block;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}
.matchup-values > div:first-child strong {
  color: var(--lime);
}
.matchup-values > div:last-child strong {
  color: var(--wine);
}
.matchup-values small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0 9px;
}
.matchup-bar {
  display: block;
  height: 4px;
  background: #30333e;
  border-radius: 4px;
  overflow: hidden;
}
.matchup-bar i {
  display: block;
  height: 100%;
  background: var(--lime);
}
.matchup-bar.receiving i {
  background: var(--wine);
}
.trend-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.trend-heading .p-eyebrow {
  font-size: 10px;
}
.analysis-count {
  font-size: 28px;
  color: var(--lime);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.analysis-count small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}
.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 8px;
  font-size: 11px;
  color: #c7cbd6;
}
.trend-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trend-legend i {
  display: inline-block;
  width: 13px;
  height: 3px;
  background: var(--lime);
}
.trend-legend .season-key {
  height: 0;
  background: none;
  border-top: 2px dashed #9b93bb;
}
.trend-metric-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}
.trend-metric-label select,
.finder-form input,
.finder-form select {
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #424650;
  border-radius: 8px;
  background: #101217;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.trend-metric-label select:focus,
.finder-form input:focus,
.finder-form select:focus {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.trend-explorer {
  margin-top: 18px;
}
.trend-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.trend-summary span,
.trend-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.trend-summary strong {
  display: block;
  font-size: 32px;
  line-height: 1.5;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.trend-summary > div:last-child strong {
  color: #b9b0d6;
}
.trend-plot {
  min-height: 210px;
  margin-top: 12px;
}
.trend-plot svg {
  display: block;
  width: 100%;
  height: 210px;
  overflow: visible;
}
.trend-plot .trend-grid {
  stroke: #303440;
  stroke-width: 1;
}
.trend-plot .trend-axis {
  fill: #a6aab7;
  font: 11px var(--body);
}
.trend-plot .trend-line {
  stroke: var(--lime);
  stroke-width: 2;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.trend-plot .trend-baseline {
  stroke: #aaa1ca;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.trend-plot .trend-dot {
  fill: var(--lime);
  stroke: #17191f;
  stroke-width: 2;
}
.trend-plot .trend-hit {
  fill: transparent;
  cursor: pointer;
}
.trend-plot .trend-hit:focus {
  stroke: var(--wine);
  stroke-width: 2;
  outline: none;
}
.trend-caption {
  min-height: 44px;
  font-size: 12px;
  color: #c6cad5;
  margin: 8px 0 10px;
}
.trend-evidence summary,
.trend-more summary {
  min-height: 44px;
  display: list-item;
  padding: 12px 0;
  cursor: pointer;
  color: var(--wine);
  font-size: 12px;
}
.trend-evidence table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.trend-evidence td,
.trend-evidence th {
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}
.trend-evidence td {
  text-align: right;
  white-space: nowrap;
}
.trend-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.trend-metric-card {
  padding: 14px;
  border: 1px solid #333742;
  border-radius: 10px;
  min-width: 0;
  background: #13151b;
}
.trend-metric-card h4 {
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
}
.metric-unit {
  font-size: 10px;
  color: var(--muted);
}
.trend-values {
  display: flex;
  align-items: start;
  gap: 12px;
  justify-content: space-between;
  margin-top: 8px;
}
.trend-values > div {
  flex: 1;
  min-width: 0;
}
.trend-values strong {
  font-size: 26px;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.trend-values b {
  display: block;
  padding-top: 7px;
  font-size: 18px;
  color: #b9b0d6;
  font-variant-numeric: tabular-nums;
}
.trend-values small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.trend-delta {
  font-size: 10px;
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #dce0ea;
}
.trend-delta span {
  display: block;
  color: #cbbd9d;
  font-size: 9px;
}
.analysis-empty {
  padding: 26px 0;
  color: var(--muted);
}
.analysis-empty strong {
  color: var(--ink);
}
.finder-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.finder-heading h1 {
  max-width: 800px;
}
.finder-heading p {
  max-width: 650px;
}
.finder-form {
  padding: 26px;
}
.finder-calendar,
.finder-sample {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.finder-sample {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.finder-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: #c9ccd6;
  min-width: 0;
}
.finder-form label small {
  color: var(--muted);
  font-size: 10px;
}
.finder-conditions {
  padding: 0;
  margin: 30px 0 0;
  border: 0;
  min-width: 0;
}
.finder-conditions legend {
  font-size: 20px;
  font-weight: 700;
}
.finder-conditions p {
  margin: 5px 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.finder-condition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.finder-submit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 24px;
}
.finder-submit > a {
  color: var(--muted);
  font-size: 12px;
}
.finder-submit > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.finder-results {
  margin: 38px 0;
  scroll-margin-top: 100px;
}
.finder-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.finder-result {
  padding: 24px;
  min-width: 0;
}
.finder-event-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.finder-tournament {
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 5px;
}
.finder-result h3 {
  font-size: 21px;
  line-height: 1.4;
  margin: 0 0 20px;
}
.finder-result h3 span {
  color: var(--muted);
}
.finder-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.finder-player {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}
.finder-player.is-qualified {
  border-color: #66794c;
  background: #d4f87805;
}
.finder-player h4 {
  font-size: 12px;
  margin: 0;
}
.finder-player h4 small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  margin: 6px 0;
}
.finder-player.is-qualified h4 small {
  color: var(--lime);
}
.finder-player p {
  font-size: 11px;
  color: var(--muted);
}
.finder-check {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.finder-check > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.finder-check > strong {
  display: block;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.finder-check small {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
}
.finder-result > .p-button {
  width: 100%;
  justify-content: center;
}
.finder-empty {
  grid-column: 1/-1;
  padding: 35px;
}
.finder-empty h3 {
  font-size: 24px;
  margin-top: 0;
}
.finder-notice {
  padding: 14px 18px;
  border-left: 2px solid var(--wine);
  color: var(--muted);
  background: #ac94ff08;
}
.finder-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin: 24px 0;
}
.finder-pagination a {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: var(--lime);
}
.profile-analysis-new {
  margin: 32px 0;
}
.profile-analysis-new .trend-panel {
  max-width: 850px;
}
.history-period-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (max-width: 1050px) {
  .analysis-trend-pair,
  .serve-matchups {
    grid-template-columns: 1fr;
  }
  .finder-calendar,
  .finder-sample {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finder-condition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finder-results-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .finder-heading {
    display: block;
  }
  .finder-heading > a {
    display: inline-flex;
    margin-top: 14px;
  }
  .finder-form,
  .finder-result,
  .serve-matchup,
  .trend-panel {
    padding: 18px;
  }
  .finder-calendar,
  .finder-sample,
  .finder-condition-grid {
    gap: 14px 10px;
  }
  .finder-form input,
  .finder-form select,
  .trend-metric-label select {
    font-size: 16px;
    padding: 10px 8px;
  }
  .finder-submit .p-button {
    width: 100%;
    justify-content: center;
  }
  .finder-submit > span {
    margin-left: 0;
  }
  .trend-metric-grid {
    grid-template-columns: 1fr;
  }
  .trend-metric-card {
    padding: 14px 16px;
  }
  .trend-values small {
    font-size: 11px;
  }
  .trend-delta,
  .trend-delta span,
  .metric-unit {
    font-size: 11px;
  }
  .trend-metric-card h4 {
    font-size: 14px;
  }
  .trend-values strong {
    font-size: 30px;
  }
  .trend-values b {
    font-size: 22px;
  }
  .finder-players {
    grid-template-columns: 1fr;
  }
  .finder-player h4 {
    font-size: 14px;
  }
  .finder-player h4 small,
  .finder-check > span,
  .finder-check small {
    font-size: 11px;
  }
  .matchup-head h3,
  .trend-heading h3 {
    font-size: 18px;
  }
  .matchup-values small {
    font-size: 10px;
  }
  .comparison-filters label {
    width: 100%;
  }
  .finder-conditions legend {
    font-size: 19px;
  }
  .finder-condition-grid {
    grid-template-columns: 1fr;
  }
  .history-period-form {
    align-items: end;
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .trend-plot svg {
    animation: analysis-appear 0.18s ease-out;
  }
  @keyframes analysis-appear {
    from {
      opacity: 0.5;
    }
    to {
      opacity: 1;
    }
  }
}

.normalized-heading {
  margin: 24px 0 0;
  font-size: 16px;
}

.analysis-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.analysis-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--wine);
  font-size: 12px;
}
#pair-statistics {
  scroll-margin-top: 100px;
}
@media (max-width: 600px) {
  .pair-analysis > .section-heading {
    display: block;
  }
  .pair-analysis > .section-heading > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 8px;
  }
}
