/*
 * Shark AI — responsive match report
 *
 * Contract: analysis-report-shell markup in legacy.html.
 * Load after worldclass.css. All rules are scoped to the analysis surface.
 */

.match-analysis {
  --report-bg: oklch(0.055 0.024 254);
  --report-bg-soft: oklch(0.085 0.034 254);
  --report-surface: oklch(0.115 0.043 254);
  --report-surface-hover: oklch(0.15 0.055 254);
  --report-line: oklch(0.4 0.05 252 / 0.46);
  --report-line-soft: oklch(0.34 0.04 252 / 0.36);
  --report-ink: oklch(0.98 0.007 250);
  --report-copy: oklch(0.87 0.022 250);
  --report-muted: oklch(0.7 0.026 250);
  --report-faint: oklch(0.57 0.025 250);
  --report-blue: oklch(0.64 0.22 258);
  --report-blue-bright: oklch(0.77 0.15 243);
  --report-gold: oklch(0.82 0.17 82);
  --report-green: oklch(0.7 0.18 150);
  --report-red: oklch(0.66 0.21 28);
  --report-ease: cubic-bezier(0.16, 1, 0.3, 1);

  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--report-bg);
  box-shadow: none;
  color: var(--report-ink);
}

.analysis-launcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy score"
    "probabilities probabilities"
    "action icon";
  align-items: center;
  gap: 14px 18px;
  width: min(100%, 760px);
  margin: 10px auto 18px;
  padding: 18px 20px;
  border: 1px solid oklch(0.55 0.16 254 / 0.58);
  border-radius: 12px;
  background: oklch(0.11 0.045 254);
  color: oklch(0.96 0.01 250);
  text-align: start;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.analysis-launcher:hover,
.analysis-launcher:focus-visible {
  border-color: oklch(0.7 0.18 252);
  background: oklch(0.15 0.06 254);
}

.analysis-launcher:focus-visible {
  outline: 3px solid oklch(0.7 0.18 252 / 0.35);
  outline-offset: 3px;
}

.analysis-launcher svg {
  grid-area: icon;
  justify-self: end;
  width: 22px;
  height: 22px;
  color: oklch(0.72 0.18 252);
}

.analysis-launcher-copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.analysis-launcher-title {
  color: oklch(0.96 0.01 250);
  font-size: 0.98rem;
}

.analysis-launcher-match {
  min-width: 0;
  overflow: hidden;
  color: oklch(0.78 0.025 250);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-launcher-score {
  grid-area: score;
  color: oklch(0.84 0.16 82);
  font-size: 1.75rem;
  font-weight: 800;
}

.analysis-launcher-probabilities {
  grid-area: probabilities;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border-block: 1px solid oklch(0.4 0.05 252 / 0.32);
}

.analysis-launcher-probabilities > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
}

.analysis-launcher-probabilities > span + span {
  border-inline-start: 1px solid oklch(0.4 0.05 252 / 0.32);
}

.analysis-launcher-probabilities b {
  color: oklch(0.91 0.02 250);
  font-size: 1rem;
}

.analysis-launcher-probabilities small {
  overflow: hidden;
  color: oklch(0.7 0.026 250);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-launcher-action {
  grid-area: action;
  color: oklch(0.72 0.18 252);
  font-size: 0.78rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  .analysis-launcher {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy score"
      "probabilities probabilities"
      "action icon";
    gap: 12px;
    margin: 8px 0 14px;
    padding: 15px;
  }

  .analysis-launcher-score {
    font-size: 1.45rem;
  }

  .analysis-launcher-probabilities > span {
    flex-direction: column;
    gap: 3px;
    padding: 9px 5px;
  }

  .analysis-launcher-probabilities small {
    max-width: 100%;
  }
}

.analysis-report-shell,
.analysis-report-shell *,
.analysis-report-shell *::before,
.analysis-report-shell *::after {
  box-sizing: border-box;
}

.analysis-report-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  grid-template-areas: "main sidecar";
  width: 100%;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 14%, oklch(0.28 0.1 246 / 0.2), transparent 30rem),
    linear-gradient(135deg, var(--report-bg-soft), var(--report-bg) 58%);
  direction: ltr;
}

.analysis-report-main {
  grid-area: main;
  min-width: 0;
  padding: 18px clamp(24px, 3vw, 46px) 28px;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--report-ink);
  direction: rtl;
}

.analysis-report-main > * {
  width: min(100%, 1110px);
  margin-inline: auto;
}

.analysis-sidecar {
  grid-area: sidecar;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 22px 18px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  border-inline-start: 1px solid var(--report-line);
  background: oklch(0.07 0.031 254 / 0.97);
  color: var(--report-copy);
  direction: rtl;
}

.analysis-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  margin-bottom: 2px;
}

.analysis-utility-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.analysis-circle-action,
.analysis-back,
.analysis-sidecar-back,
.analysis-share-panel .share-analysis {
  border: 1px solid var(--report-line);
  background: transparent;
  color: var(--report-copy);
  box-shadow: none;
  transition:
    border-color 180ms var(--report-ease),
    background 180ms var(--report-ease),
    color 180ms var(--report-ease),
    transform 180ms var(--report-ease);
}

.analysis-circle-action {
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 750;
}

.analysis-circle-action svg {
  width: 20px;
  height: 20px;
}

.save-toggle-label {
  display: none;
}

.save-toggle[aria-busy="true"] {
  cursor: wait;
  opacity: 0.68;
}

.save-feedback {
  position: fixed;
  right: 50%;
  bottom: 22px;
  z-index: 80;
  max-width: min(88vw, 420px);
  margin: 0;
  padding: 11px 15px;
  border-radius: 10px;
  background: oklch(0.21 0.055 253);
  color: white;
  box-shadow: 0 4px 8px oklch(0 0 0 / 0.3);
  font-size: 0.8rem;
  font-weight: 720;
  text-align: center;
  transform: translateX(50%);
}

.save-feedback.is-error {
  background: oklch(0.42 0.15 28);
}

.analysis-circle-action:hover,
.analysis-circle-action.is-saved,
.analysis-back:hover,
.analysis-share-panel .share-analysis:hover {
  border-color: var(--report-blue);
  background: var(--report-surface);
  color: var(--report-ink);
}

.analysis-circle-action:active,
.analysis-back:active,
.analysis-share-panel .share-analysis:active {
  transform: scale(0.97);
}

.analysis-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.76rem;
}

.analysis-back svg {
  width: 18px;
  height: 18px;
}

.analysis-head {
  display: none;
}

.analysis-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.72fr) minmax(0, 1fr);
  grid-template-areas: "away score home";
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
  min-height: 196px;
  padding: 14px clamp(16px, 3vw, 38px) 24px;
  border-bottom: 1px solid var(--report-line);
  direction: ltr;
}

.analysis-team {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--report-ink);
  text-align: center;
  direction: rtl;
}

.analysis-team-home {
  grid-area: home;
}

.analysis-team-away {
  grid-area: away;
}

.analysis-team img {
  width: clamp(74px, 7vw, 104px);
  height: clamp(74px, 7vw, 104px);
  margin-bottom: 4px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px oklch(0 0 0 / 0.3));
}

.analysis-team img:not([src]),
.analysis-team img[src=""] {
  visibility: hidden;
}

.analysis-team strong {
  width: 100%;
  overflow: hidden;
  color: var(--report-ink);
  font-size: 1rem;
  font-weight: 820;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-team small {
  color: var(--report-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.analysis-score-center {
  grid-area: score;
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
  color: var(--report-muted);
  text-align: center;
  direction: rtl;
}

.analysis-score-center > span {
  color: var(--report-copy);
  font-size: 0.8rem;
  font-weight: 730;
}

.analysis-score-center > small {
  margin-top: 2px;
  color: var(--report-muted);
  font-size: 0.7rem;
}

.forecast-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: 9px;
}

.forecast-copy strong,
.forecast-copy strong.ordered-result {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.13em;
  margin: 0;
  color: var(--report-gold);
  font-size: clamp(3.7rem, 5.2vw, 5rem);
  font-weight: 880;
  font-variant-numeric: tabular-nums;
  line-height: 0.96;
  letter-spacing: -0.025em;
  text-shadow: 0 0 22px oklch(0.82 0.17 82 / 0.16);
  direction: ltr;
  unicode-bidi: isolate;
}

.forecast-copy .ordered-result i,
.ordered-result i {
  color: currentColor;
  font-style: normal;
}

.forecast-copy span {
  color: var(--report-gold);
  font-size: 0.76rem;
  font-weight: 760;
}

.forecast-copy em {
  color: var(--report-muted);
  font-size: 0.68rem;
  font-style: normal;
}

.probability-chart {
  display: grid;
  gap: 12px;
  padding: 17px 12px 19px;
  border-bottom: 1px solid var(--report-line-soft);
}

.probability-chart h3 {
  margin: 0;
  color: var(--report-copy);
  font-size: 0.82rem;
  font-weight: 720;
  text-align: start;
}

.probability-bar {
  display: flex;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: var(--report-surface);
  direction: rtl;
}

.probability-bar i {
  display: block;
  height: 100%;
  min-width: 0;
}

.probability-bar i:first-child,
.probability-bar .p-barca {
  background: var(--report-blue);
}

.probability-bar i:nth-child(2),
.probability-bar .p-draw {
  background: oklch(0.66 0.016 250);
}

.probability-bar i:last-child,
.probability-bar .p-real {
  background: var(--report-blue-bright);
}

.probability-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.probability-labels span {
  display: grid;
  gap: 1px;
  min-width: 0;
  color: var(--report-muted);
  font-size: 0.69rem;
  line-height: 1.5;
  text-align: center;
}

.probability-labels b {
  color: var(--report-ink);
  font-size: 1.14rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.probability-labels span:first-child b {
  color: var(--report-blue-bright);
}

.probability-labels span:last-child b {
  color: var(--report-blue);
}

.visual-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.visual-section-heading h3 {
  margin: 0;
  color: var(--report-ink);
  font-size: 0.96rem;
  font-weight: 790;
  line-height: 1.45;
}

.visual-section-heading span {
  color: var(--report-muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.form-visual,
.comparison-panel,
.trend-panel {
  padding: 20px 12px 22px;
  border-bottom: 1px solid var(--report-line-soft);
}

.form-team-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 46px;
}

.form-team-row + .form-team-row {
  border-top: 1px solid var(--report-line-soft);
}

.form-team-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.form-team-identity img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
}

.form-team-identity img:not([src]),
.form-team-identity img[src=""] {
  visibility: hidden;
}

.form-team-identity strong {
  overflow: hidden;
  color: var(--report-copy);
  font-size: 0.78rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-dots {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(12px, 2vw, 26px);
  min-width: 0;
}

.form-empty,
.trend-empty {
  margin: 0;
  padding: 16px 0;
  color: var(--report-muted);
  font-size: 0.72rem;
  line-height: 1.7;
  text-align: center;
}

.form-dot {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border: 1px solid oklch(1 0 0 / 0.09);
  border-radius: 50%;
  color: white;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
}

.form-dot.is-win {
  background: var(--report-green);
}

.form-dot.is-draw {
  background: oklch(0.49 0.025 250);
}

.form-dot.is-loss {
  background: var(--report-red);
}

.comparison-head,
.comparison-row {
  display: grid;
  grid-template-columns: 48px minmax(70px, 1fr) minmax(105px, 0.55fr) minmax(70px, 1fr) 48px;
  align-items: center;
  gap: 14px;
  direction: ltr;
}

.comparison-head {
  min-height: 36px;
  color: var(--report-muted);
  font-size: 0.68rem;
  text-align: center;
}

.comparison-head strong:first-child {
  grid-column: 1 / 3;
}

.comparison-head > span {
  grid-column: 3;
}

.comparison-head strong:last-child {
  grid-column: 4 / 6;
}

.comparison-head strong {
  overflow: hidden;
  color: var(--report-copy);
  font-size: 0.72rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-row {
  min-height: 38px;
  color: var(--report-muted);
}

.comparison-row + .comparison-row {
  border-top: 1px solid var(--report-line-soft);
}

.comparison-row > b {
  color: var(--report-ink);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.comparison-row > span {
  color: var(--report-muted);
  font-size: 0.67rem;
  line-height: 1.35;
  text-align: center;
  direction: rtl;
}

.comparison-row > i {
  display: block;
  height: 7px;
  overflow: hidden;
  background: var(--report-surface);
}

.comparison-row > i span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--report-blue);
  transform: scaleX(var(--comparison-progress, 0));
  transition: transform 520ms var(--report-ease);
}

.comparison-row > i:nth-of-type(1) span {
  background: var(--report-blue);
  transform-origin: right center;
}

.comparison-row > i:nth-of-type(2) span {
  background: var(--report-blue-bright);
  transform-origin: left center;
}

.trend-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 180px;
  overflow: hidden;
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 180px;
  max-height: 230px;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 8px;
  color: var(--report-muted);
  font-size: 0.67rem;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trend-legend i {
  width: 18px;
  height: 3px;
  background: var(--report-blue);
}

.trend-legend i.away {
  background: var(--report-blue-bright);
}

.analysis-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(190px, 0.72fr) minmax(0, 1.08fr);
  gap: 0;
  border-bottom: 1px solid var(--report-line-soft);
}

.analysis-lower-grid > section {
  min-width: 0;
  padding: 22px 18px;
}

.analysis-lower-grid > section + section {
  border-inline-start: 1px solid var(--report-line-soft);
}

.injury-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.injury-columns > div {
  min-width: 0;
}

.injury-columns > div + div {
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--report-line-soft);
}

.injury-columns strong {
  display: block;
  overflow: hidden;
  margin-bottom: 9px;
  color: var(--report-copy);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.injury-columns ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.injury-columns li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  color: var(--report-copy);
  font-size: 0.68rem;
  line-height: 1.45;
}

.injury-columns li span {
  color: var(--report-muted);
}

.injury-columns .injury-empty {
  display: block;
  color: var(--report-muted);
}

.h2h-summary {
  display: grid;
  align-content: start;
  justify-items: center;
}

.h2h-summary .visual-section-heading {
  width: 100%;
}

.h2h-donut {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 7px auto 12px;
  border-radius: 50%;
  background: conic-gradient(
    var(--report-blue) 0 var(--h2h-home, 120deg),
    oklch(0.64 0.018 250) var(--h2h-home, 120deg) var(--h2h-draw, 240deg),
    var(--report-blue-bright) var(--h2h-draw, 240deg) 360deg
  );
}

.h2h-donut > div {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--report-bg-soft);
}

.h2h-donut strong {
  color: var(--report-ink);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.h2h-donut span {
  color: var(--report-muted);
  font-size: 0.62rem;
}

.h2h-outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.h2h-outcomes > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.h2h-outcomes b {
  color: var(--report-blue-bright);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.h2h-outcomes small {
  overflow: hidden;
  color: var(--report-muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h2h-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h2h-list li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border-bottom: 1px solid var(--report-line-soft);
  color: var(--report-copy);
  font-size: 0.65rem;
}

.h2h-list time {
  color: var(--report-muted);
  font-variant-numeric: tabular-nums;
}

.h2h-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h2h-list bdi {
  color: var(--report-ink);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.h2h-list .h2h-empty {
  display: block;
  padding-block: 12px;
  color: var(--report-muted);
  line-height: 1.6;
}

.analysis-strip {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 0;
  border-bottom: 1px solid var(--report-line-soft);
  background: transparent;
}

.analysis-strip > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 90px;
  padding: 15px 18px;
}

.analysis-strip > div + div {
  border-inline-start: 1px solid var(--report-line-soft);
}

.analysis-strip span,
.analysis-strip small {
  color: var(--report-muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.analysis-strip strong {
  color: var(--report-ink);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.5;
}

.analysis-disclaimer {
  max-width: 72ch;
  margin: 18px auto 0;
  color: var(--report-faint);
  font-size: 0.68rem;
  line-height: 1.75;
  text-align: center;
  text-wrap: pretty;
}

.analysis-sidecar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--report-ink);
  font-size: 1.3rem;
  font-weight: 880;
}

.analysis-sidecar-brand b {
  color: var(--report-blue-bright);
}

.analysis-sidecar-brand .shark-sail {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  background: none;
  clip-path: none;
}

.analysis-sidecar-back {
  justify-content: flex-start;
  width: 100%;
  margin-top: 22px;
  border: 0;
  border-radius: 0;
  color: var(--report-copy);
}

.analysis-compact-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 10px;
  border: 1px solid var(--report-line);
  border-radius: 10px;
  background: var(--report-surface);
}

.analysis-compact-match > span {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.analysis-compact-match img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.analysis-compact-match b {
  width: 100%;
  overflow: hidden;
  color: var(--report-copy);
  font-size: 0.66rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-compact-match > i {
  color: var(--report-muted);
  font-size: 0.65rem;
  font-style: normal;
}

.analysis-report-nav {
  display: grid;
  gap: 2px;
  margin-top: 16px;
}

.analysis-report-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--report-muted);
  font-size: 0.76rem;
  text-decoration: none;
  transition:
    background 180ms var(--report-ease),
    color 180ms var(--report-ease);
}

.analysis-report-nav a:hover,
.analysis-report-nav a.is-active {
  background: var(--report-surface);
  color: var(--report-blue-bright);
}

.analysis-report-nav a.is-active::after {
  position: absolute;
  inset-block: 9px;
  inset-inline-start: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--report-blue);
  content: "";
}

.analysis-sidecar .reason-list {
  margin-top: 18px;
  overflow: clip;
  border: 1px solid var(--report-line);
  border-radius: 10px;
  background: var(--report-surface);
}

.analysis-sidecar .reason-list h3 {
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--report-line-soft);
  color: var(--report-ink);
  font-size: 0.84rem;
  font-weight: 790;
}

.analysis-sidecar .reason-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--report-line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--report-copy);
  text-align: start;
}

.analysis-sidecar .reason-row:hover {
  background: var(--report-surface-hover);
}

.analysis-sidecar .reason-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.analysis-sidecar .reason-row b {
  color: var(--report-ink);
  font-size: 0.72rem;
  font-weight: 760;
}

.analysis-sidecar .reason-row small {
  color: var(--report-muted);
  font-size: 0.63rem;
  line-height: 1.45;
}

.analysis-sidecar .reason-row svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--report-blue-bright);
  transition: transform 180ms var(--report-ease);
}

.analysis-sidecar .reason-row[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.analysis-sidecar .reason-detail {
  max-height: 0;
  padding: 0 12px;
  overflow: hidden;
  background: oklch(0.08 0.033 254);
  color: var(--report-copy);
  font-size: 0.66rem;
  line-height: 1.75;
  opacity: 0;
  transition:
    max-height 220ms var(--report-ease),
    padding 220ms var(--report-ease),
    opacity 160ms ease;
}

.analysis-sidecar .reason-detail.is-open {
  max-height: 190px;
  padding: 11px 12px 13px;
  border-bottom: 1px solid var(--report-line-soft);
  opacity: 1;
}

.analysis-share-panel {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}

.analysis-share-panel strong {
  color: var(--report-ink);
  font-size: 0.76rem;
}

.analysis-share-panel .share-analysis {
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 760;
}

.analysis-share-panel small {
  color: var(--report-faint);
  font-size: 0.62rem;
}

@media (min-width: 961px) {
  body.analysis-report-open {
    overflow: hidden;
  }

  .match-analysis:not(.is-expanded) {
    position: relative;
    inset: auto;
    height: auto;
    overflow: visible;
  }

  .match-analysis:not(.is-expanded) .analysis-report-shell {
    display: block;
    height: auto;
  }

  .match-analysis:not(.is-expanded) .analysis-report-main {
    padding-block: 22px 28px;
    overflow: visible;
  }

  .match-analysis:not(.is-expanded) .analysis-utility,
  .match-analysis:not(.is-expanded) .analysis-sidecar {
    display: none;
  }

  .match-analysis.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 70;
    height: 100dvh;
    overflow: hidden;
  }

  .match-analysis.is-expanded .analysis-report-shell {
    height: 100dvh;
  }

  .analysis-utility {
    min-height: 42px;
  }

  .analysis-scoreboard {
    min-height: 188px;
    padding-block: 8px 18px;
  }

  .probability-chart {
    gap: 9px;
    padding-block: 13px 15px;
  }

  .form-visual,
  .comparison-panel,
  .trend-panel {
    padding-block: 14px 16px;
  }

  .visual-section-heading {
    margin-bottom: 11px;
  }

  .form-team-row {
    min-height: 38px;
  }

  .comparison-head {
    min-height: 28px;
  }

  .comparison-row {
    min-height: 31px;
  }

  .trend-chart-wrap,
  .trend-chart {
    min-height: 128px;
    height: 128px;
    max-height: 128px;
  }

  .analysis-lower-grid > section {
    padding-block: 16px;
  }

  .h2h-donut {
    width: 98px;
    height: 98px;
    margin-block: 3px 9px;
  }

  .h2h-donut > div {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .analysis-report-shell {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .analysis-scoreboard {
    grid-template-columns: minmax(0, 1fr) minmax(176px, 0.68fr) minmax(0, 1fr);
    gap: 22px;
  }

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

  .analysis-lower-grid > section:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--report-line-soft);
    border-inline-start: 0;
  }
}

@media (max-width: 760px) {
  .save-feedback {
    bottom: calc(var(--mobile-nav-height, 66px) + 12px);
  }

  .match-analysis {
    position: static;
    width: 100%;
    margin-top: 4px;
    overflow: visible;
    background: transparent;
  }

  .analysis-report-shell {
    display: block;
    min-height: 0;
    overflow: visible;
    background:
      radial-gradient(circle at 82% 9%, oklch(0.3 0.12 249 / 0.18), transparent 22rem),
      linear-gradient(180deg, var(--report-bg-soft), var(--report-bg));
    direction: rtl;
  }

  .analysis-report-main {
    padding: 0 0 24px;
    overflow: visible;
  }

  .analysis-head {
    display: none;
  }

  .analysis-utility {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    min-height: 64px;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--report-line-soft);
    background: oklch(0.075 0.03 254 / 0.97);
  }

  .analysis-utility-actions {
    gap: 7px;
  }

  .analysis-utility .analysis-circle-action,
  .analysis-utility .analysis-back {
    min-height: 44px;
  }

  .analysis-utility .save-toggle {
    display: inline-flex;
    width: auto;
    min-width: 84px;
    gap: 7px;
    padding-inline: 12px;
  }

  .analysis-utility .save-toggle-label {
    display: inline;
    white-space: nowrap;
  }

  .analysis-scoreboard {
    grid-template-columns: minmax(0, 1fr) minmax(108px, 0.66fr) minmax(0, 1fr);
    gap: 10px;
    min-height: 190px;
    padding: 22px 12px 24px;
  }

  .analysis-team {
    gap: 5px;
  }

  .analysis-team img {
    width: 54px;
    height: 54px;
    margin-bottom: 2px;
  }

  .analysis-team strong {
    font-size: 0.82rem;
  }

  .analysis-team small {
    display: none;
  }

  .analysis-score-center > span {
    max-width: 15ch;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .analysis-score-center > small {
    font-size: 0.62rem;
  }

  .forecast-copy {
    margin-top: 8px;
  }

  .forecast-copy strong,
  .forecast-copy strong.ordered-result {
    font-size: 3rem;
  }

  .forecast-copy span {
    font-size: 0.68rem;
  }

  .forecast-copy em {
    font-size: 0.61rem;
  }

  .probability-chart {
    gap: 13px;
    padding: 20px 14px 22px;
  }

  .probability-chart h3 {
    font-size: 1rem;
    font-weight: 800;
  }

  .probability-bar {
    height: 8px;
  }

  .probability-labels {
    gap: 6px;
  }

  .probability-labels span {
    font-size: 0.67rem;
  }

  .probability-labels b {
    font-size: 1.08rem;
  }

  .visual-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .visual-section-heading h3 {
    font-size: 0.94rem;
  }

  .form-visual {
    padding: 20px 14px 22px;
  }

  .form-team-row {
    grid-template-columns: minmax(106px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    min-height: 54px;
  }

  .form-team-identity {
    gap: 8px;
  }

  .form-team-identity img {
    width: 27px;
    height: 27px;
  }

  .form-team-identity strong {
    font-size: 0.73rem;
  }

  .form-dots {
    justify-content: space-between;
    gap: 5px;
  }

  .form-dot {
    width: 26px;
    height: 26px;
    font-size: 0.59rem;
  }

  .comparison-panel,
  .trend-panel,
  .analysis-lower-grid,
  .analysis-strip {
    display: none;
  }

  .analysis-disclaimer {
    margin: 20px 14px 0;
    font-size: 0.68rem;
  }

  .analysis-sidecar {
    display: block;
    height: auto;
    padding: 0 14px 24px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .analysis-sidecar-brand,
  .analysis-sidecar-back,
  .analysis-compact-match,
  .analysis-report-nav,
  .analysis-share-panel {
    display: none;
  }

  .analysis-sidecar .reason-list {
    margin: 0;
    border-radius: 12px;
    background: oklch(0.095 0.038 254 / 0.92);
  }

  .analysis-sidecar .reason-list h3 {
    padding: 15px 16px;
    font-size: 0.96rem;
  }

  .analysis-sidecar .reason-row {
    min-height: 60px;
    padding: 12px 15px;
  }

  .analysis-sidecar .reason-row b {
    font-size: 0.78rem;
  }

  .analysis-sidecar .reason-row small {
    font-size: 0.68rem;
  }

  .analysis-sidecar .reason-detail.is-open {
    max-height: 250px;
    padding: 13px 15px 15px;
    font-size: 0.72rem;
    line-height: 1.8;
  }
}

@media (max-width: 430px) {
  .analysis-scoreboard {
    grid-template-columns: minmax(0, 1fr) 98px minmax(0, 1fr);
    gap: 7px;
    min-height: 176px;
    padding-inline: 8px;
  }

  .analysis-team img {
    width: 48px;
    height: 48px;
  }

  .analysis-team strong {
    font-size: 0.76rem;
  }

  .forecast-copy strong,
  .forecast-copy strong.ordered-result {
    font-size: 2.75rem;
  }

  .form-team-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-block: 9px;
  }

  .form-dots {
    justify-content: flex-start;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-report-shell *,
  .analysis-report-shell *::before,
  .analysis-report-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .analysis-report-shell,
  .analysis-sidecar,
  .analysis-compact-match,
  .analysis-sidecar .reason-list,
  .analysis-circle-action,
  .analysis-back,
  .analysis-share-panel .share-analysis {
    border-color: CanvasText;
  }

  .probability-bar i,
  .form-dot,
  .comparison-row > i span,
  .trend-legend i,
  .h2h-donut,
  .shark-sail {
    forced-color-adjust: none;
  }
}
