:root {
  color-scheme: light;
  --page: #f4f7f6;
  --panel: #ffffff;
  --panel-soft: #eef4f1;
  --text: #17211d;
  --muted: #65736e;
  --muted-strong: #43514c;
  --line: #d8e3df;
  --line-strong: #bdcbc6;
  --accent: #147a64;
  --accent-strong: #0d5f4d;
  --warning: #9b6b18;
  --played: #8a918e;
  --radius: 8px;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(20, 122, 100, 0.08), rgba(20, 122, 100, 0) 280px),
    var(--page);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 10;
  transform: translateY(-160%);
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--accent-strong);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.home-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 4px 0 26px;
  border-bottom: 1px solid var(--line);
}

.home-hero__copy {
  min-width: 0;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.home-kicker {
  margin: 0 0 9px;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 760;
}

h1,
h2,
h3,
h4,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.04;
}

.home-subtitle {
  max-width: 42rem;
  margin: 12px 0 0;
  color: var(--muted-strong);
  font-size: 1.04rem;
  line-height: 1.65;
}

.pro-entry,
.detail-link,
.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-weight: 720;
  white-space: nowrap;
}

.pro-entry:hover,
.detail-link:hover,
.checkout-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: #ffffff;
}

.checkout-button {
  width: 100%;
  margin-top: 14px;
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
}

.checkout-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.schedule-section,
.detail-section,
.track-record-section,
.pro-section {
  padding-top: 28px;
}

.section-heading {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.round-list {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.round-group {
  display: grid;
  gap: 10px;
}

.round-title {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.3;
}

.round-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  min-width: 0;
}

.match-card {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
}

button.match-card {
  cursor: pointer;
}

button.match-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

button.match-card:active {
  transform: translateY(0);
}

button.match-card:focus-visible,
.pro-entry:focus-visible,
.detail-link:focus-visible,
.checkout-button:focus-visible,
.recover-input:focus-visible,
.recover-line a:focus-visible {
  outline: 3px solid rgba(20, 122, 100, 0.3);
  outline-offset: 3px;
}

.match-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(20, 122, 100, 0.14);
}

.match-card--played,
.match-card--tbd,
.match-card--pending {
  color: var(--muted);
  background: rgba(238, 244, 241, 0.72);
}

.match-card--played .team-name,
.match-card--tbd .team-name,
.match-card--pending .team-name {
  color: var(--muted-strong);
}

.card-topline,
.detail-meta,
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 740;
}

.status-pill--ready {
  color: #ffffff;
  border-color: var(--accent);
  background: var(--accent);
}

.status-pill--played {
  color: #ffffff;
  border-color: var(--played);
  background: var(--played);
}

.status-pill--pending {
  color: #61430e;
  border-color: rgba(155, 107, 24, 0.32);
  background: rgba(155, 107, 24, 0.13);
}

.card-meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.team-pair + .card-meta {
  margin-top: 12px;
}

.team-pair {
  display: grid;
  gap: 9px;
  min-width: 0;
}

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

.team-name {
  min-width: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.versus-text {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
}

.flag-strip {
  display: inline-grid;
  grid-template-columns: repeat(var(--flag-count), minmax(0, 1fr));
  width: 46px;
  height: 11px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.2);
  border-radius: 999px;
  background: #ffffff;
}

.flag-strip span {
  display: block;
}

.card-note {
  margin: 12px 0 0;
  color: var(--muted-strong);
  font-size: 0.95rem;
  line-height: 1.55;
}

.favorite-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.favorite-preview span {
  color: var(--muted);
  font-size: 0.88rem;
}

.favorite-preview strong {
  color: var(--accent-strong);
  font-size: 1.08rem;
}

.detail-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(28, 45, 38, 0.09);
}

.empty-detail,
.home-error {
  padding: 22px;
  color: var(--muted-strong);
  line-height: 1.65;
}

.home-error {
  color: #9a2f24;
}

.detail-content {
  --side-a: #147a64;
  --side-b: #cf5f37;
}

.detail-header {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f7faf9);
}

.detail-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.detail-team {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.detail-team:last-child {
  justify-items: end;
  text-align: right;
}

.detail-team strong {
  min-width: 0;
  font-size: 1.65rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.detail-vs {
  color: var(--muted);
  font-weight: 760;
}

.detail-body {
  display: grid;
  gap: 0;
}

.detail-block {
  min-width: 0;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-block:last-child {
  border-bottom: 0;
}

.detail-block h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.plain-callout {
  margin: 0 0 14px;
  color: var(--muted-strong);
  font-size: 1.08rem;
  line-height: 1.6;
}

.plain-callout strong {
  color: var(--accent-strong);
}

.split-bar,
.three-bar {
  display: flex;
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.bar-piece {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  color: #ffffff;
  font-weight: 820;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.bar-piece--a {
  background: var(--side-a);
}

.bar-piece--b {
  justify-content: flex-end;
  background: var(--side-b);
}

.bar-piece--draw {
  justify-content: center;
  color: #17211d;
  text-shadow: none;
  background: #d9c768;
}

.bar-legend,
.market-legend {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

.legend-item {
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.legend-item strong {
  display: block;
  color: var(--text);
  font-size: 1.04rem;
}

.score-list {
  display: grid;
  gap: 10px;
}

.score-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.score-label {
  color: var(--text);
  font-weight: 780;
}

.score-track,
.compare-track {
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}

.score-track {
  height: 12px;
}

.score-fill,
.compare-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fill);
}

.score-row--locked {
  color: var(--muted);
}

.score-row--locked .score-label,
.locked-text {
  color: transparent;
  user-select: none;
}

.score-track--locked {
  background: repeating-linear-gradient(135deg, #e2ebe8 0 8px, #f6faf8 8px 16px);
}

.score-fill--locked {
  background: repeating-linear-gradient(135deg, #aebfba 0 8px, #d6e2de 8px 16px);
  opacity: 0.72;
}

.unlock-note {
  margin: 10px 0 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.55;
}

.market-note {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

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

.market-box {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.market-box h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.market-box--locked {
  background: linear-gradient(180deg, #fbfdfc, #f1f6f4);
}

.locked-market {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.locked-market-label,
.locked-market-track,
.locked-market-fill {
  display: block;
  border-radius: 999px;
}

.locked-market-label {
  height: 14px;
  background: #dce8e4;
}

.locked-market-track {
  height: 12px;
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #e3ece9 0 8px, #f7faf9 8px 16px);
}

.locked-market-fill {
  height: 100%;
  background: repeating-linear-gradient(135deg, #aebfba 0 8px, #d6e2de 8px 16px);
  opacity: 0.74;
}

.compare-list {
  display: grid;
  gap: 14px;
}

.compare-row {
  display: grid;
  gap: 8px;
}

.compare-name {
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 760;
}

.compare-pair {
  display: grid;
  gap: 7px;
}

.compare-line {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.compare-track {
  height: 10px;
}

.compare-fill--public {
  background: #73817d;
}

.compare-fill--calculated {
  background: var(--fill);
}

.detail-more {
  padding: 18px 22px 22px;
  background: #fbfdfc;
}

.detail-more summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 760;
}

.detail-more summary:focus-visible {
  outline: 3px solid rgba(20, 122, 100, 0.3);
  outline-offset: 3px;
  border-radius: 4px;
}

.detail-more .detail-link {
  margin-top: 12px;
}

.track-record-section[hidden] {
  display: none;
}

.track-record-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(28, 45, 38, 0.08);
}

.track-record-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.track-stat-card {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.track-stat-card span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.track-stat-card strong {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.35;
}

.track-honesty {
  margin: 0;
  padding: 14px 15px;
  border-left: 4px solid var(--warning);
  color: var(--muted-strong);
  background: rgba(155, 107, 24, 0.1);
  line-height: 1.65;
}

.track-bars-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.track-bars-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
}

.track-bars-heading h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.track-bars-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.track-bars-key span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.track-key {
  display: inline-block;
  width: 14px;
  height: 8px;
  border-radius: 999px;
}

.track-key--predicted,
.track-bar-fill--predicted {
  background: var(--accent);
}

.track-key--actual,
.track-bar-fill--actual {
  background: #6d7780;
}

.track-bars {
  display: grid;
  gap: 12px;
}

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

.pricing-card {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(28, 45, 38, 0.06);
}

.pricing-card--pro {
  border-color: rgba(20, 122, 100, 0.42);
  background: #fbfdfc;
}

.pricing-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pricing-card__head strong {
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.25;
}

.price-lockup {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.price-original {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: line-through;
}

.pricing-note,
.checkout-status {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.checkout-status {
  min-height: 1.45em;
  margin-top: 10px;
  color: var(--warning);
  font-size: 0.9rem;
}

.recover-line {
  margin: 12px 0 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.recover-line a {
  color: var(--accent-strong);
  font-weight: 720;
}

.recover-line a:hover {
  color: var(--accent);
}

.feature-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pricing-note + .feature-list {
  margin-top: 12px;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.home-footer {
  width: min(1120px, calc(100% - 32px));
  margin: -24px auto 38px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.home-footer a {
  color: var(--muted-strong);
}

.home-footer a:hover {
  color: var(--accent-strong);
}

.terms-shell {
  max-width: 860px;
}

.terms-header {
  padding: 4px 0 24px;
  border-bottom: 1px solid var(--line);
}

.terms-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.terms-panel h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.terms-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.recover-shell {
  max-width: 760px;
}

.recover-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.recover-panel h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.recover-form {
  display: grid;
  gap: 10px;
}

.recover-form label {
  color: var(--muted-strong);
  font-weight: 720;
}

.recover-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: #ffffff;
}

.recover-form .checkout-button {
  width: fit-content;
  min-width: 160px;
  margin-top: 4px;
}

.recover-message {
  min-height: 1.55em;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.terms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.track-bar-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.track-bar-row p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
  line-height: 1.55;
}

.track-bar-pair {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.track-bar-line {
  display: block;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}

.track-bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
}

.home-loading {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.home-loading span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dde8e4, #f8fbfa, #dde8e4);
}

.home-loading span:nth-child(1) {
  width: 78%;
}

.home-loading span:nth-child(2) {
  width: 54%;
}

.home-loading span:nth-child(3) {
  width: 36%;
}

@media (max-width: 760px) {
  .home-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 18px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-hero__actions {
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  .home-subtitle {
    font-size: 1rem;
  }

	  .pro-entry,
	  .detail-link,
	  .checkout-button {
	    width: 100%;
	  }

  .detail-teams {
    grid-template-columns: 1fr;
  }

  .detail-team:last-child {
    justify-items: start;
    text-align: left;
  }

  .detail-vs {
    display: none;
  }

  .detail-team strong {
    font-size: 1.42rem;
  }

	  .bar-legend,
	  .market-grid,
	  .pricing-grid,
	  .track-record-cards,
	  .track-bar-row {
	    grid-template-columns: 1fr;
	  }

  .favorite-preview {
    grid-template-columns: 1fr;
  }

  .compare-line {
    grid-template-columns: 88px minmax(0, 1fr) 40px;
  }
}

@media (max-width: 420px) {
  .home-shell {
    width: min(100% - 20px, 1120px);
  }

  .match-card,
  .detail-header,
  .detail-block,
  .detail-more,
  .empty-detail,
  .home-error {
    padding-left: 14px;
    padding-right: 14px;
  }

  .score-row {
    grid-template-columns: 48px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .bar-piece {
    padding: 0 7px;
    font-size: 0.88rem;
  }
}
