:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0e2339;
  background: #f2f5fa;
  line-height: 1.5;
  --blue: #015198;
  --blue-dark: #073968;
  --muted: #4e6176;
  --line: #d9e3ef;
  --focus: #0072c7;
  --akl-orange: #e56422;
  --wzkosz-gold: #f6e3ad;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}
h1,
h2,
h3,
p {
  margin: 0;
}

.wrap {
  width: min(100% - 3rem, 72rem);
  margin-inline: auto;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 760;
  line-height: 1.16;
  letter-spacing: -0.025em;
}
.help-link {
  font-size: 0.875rem;
  font-weight: 700;
}
.header-help,
.partner-link {
  flex: none;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
  color: var(--blue-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.header-help:hover,
.partner-link:hover {
  border-color: #a7c6e0;
  background: #edf5fc;
}

.calendar-icon {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  color: #fff;
  background: var(--blue);
}
.brand-icon {
  width: 2.45rem;
  height: 2.45rem;
  background: linear-gradient(145deg, #1674bc, #084477);
}
.calendar-icon::before {
  content: "";
  display: block;
  width: 1.1rem;
  height: 1rem;
  border: 1.5px solid;
  border-radius: 0.22rem;
  background: linear-gradient(currentcolor, currentcolor) 0 0.23rem / 100% 1px no-repeat;
}
.calendar-icon::after {
  content: "";
  position: absolute;
  width: 0.28rem;
  aspect-ratio: 1;
  border-radius: 0.05rem;
  background: currentcolor;
  transform: translateY(0.14rem);
}

.main {
  padding-block: 1.65rem 3rem;
}
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr);
  align-items: center;
  min-height: 19rem;
  overflow: hidden;
  border: 1px solid #224b73;
  border-radius: 1.5rem;
  color: #fff;
  background: linear-gradient(114deg, #071a31 8%, #0b2b4e 61%, #045a9d);
  box-shadow: 0 16px 36px #14365c20;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 85% 14%, #4fa9ec4d, transparent 54%);
  pointer-events: none;
}
.hero-copy {
  z-index: 1;
  padding: 3.15rem 0 3.15rem clamp(1.5rem, 5vw, 3.6rem);
}
.hero h1 {
  margin-bottom: 1.1rem;
  font-size: clamp(2.25rem, 5.6vw, 4.1rem);
  font-weight: 790;
  line-height: 1.015;
  letter-spacing: -0.059em;
}
.hero h1 span {
  color: var(--wzkosz-gold);
}
.hero-copy p {
  max-width: 31rem;
  color: #dbe9f8;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.55;
}
.hero-art {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 2rem 1.5rem;
}
.hero-art::before,
.hero-art::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}
.hero-art::before {
  inset: -2rem -2rem -2rem 0;
  background:
    repeating-radial-gradient(circle at 53% 50%, #bdddff33 0 1px, transparent 1px 2.75rem);
  mask-image: radial-gradient(ellipse at center, #000 28%, transparent 70%);
}
.hero-art::after {
  width: min(64%, 17.5rem);
  aspect-ratio: 1.4;
  border: 1px solid #e5f4ff55;
  border-radius: 1.25rem;
  background: #b1dbff20;
  transform: rotate(-12deg);
}
.source-card {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  width: min(72%, 15.25rem);
  padding: 1.125rem 1.4rem 0.95rem;
  border: 1px solid #dfe9f4;
  border-radius: 1.05rem;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 15px 36px #00193368;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
}
.source-card-mark {
  width: min(100%, 11rem);
}
.source-card img {
  display: block;
  width: 100%;
  height: auto;
}
.source-card-mark:focus-visible {
  outline-color: var(--wzkosz-gold);
}

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.2rem;
  margin-block: 1.35rem;
}
.panel {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  background: #fff;
  box-shadow: 0 4px 10px #17385a08;
}
.panel h2,
.instructions h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.selection-panel h2 {
  margin-bottom: 1.25rem;
}
.selection-panel label[for="club"],
legend,
.result > label {
  display: block;
  margin: 0 0 0.42rem;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 680;
}
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: calc(50% - 0.3rem);
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #3b5a77;
  border-bottom: 2px solid #3b5a77;
  transform: rotate(45deg);
  pointer-events: none;
}
select,
.link-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #b2c3d6;
  border-radius: 0.6rem;
  color: inherit;
  background: #fff;
}
select {
  appearance: none;
  padding-right: 2rem;
}
select:not(:disabled):hover {
  border-color: #658cab;
}
select:disabled {
  color: var(--muted);
  background: #f2f6fb;
}
fieldset {
  min-width: 0;
  margin: 1.2rem 0 0;
  padding: 0;
  border: 0;
}
.team-placeholder {
  padding: 0.9rem;
  border: 1px dashed #bacbe0;
  border-radius: 0.7rem;
  background: #f6f9fd;
  color: var(--muted);
}
.team-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin-bottom: 0.55rem;
}
.text-button {
  padding: 0.35rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 670;
}
.text-button:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.text-button:disabled {
  color: #5c6d80;
}
.retry {
  margin-top: 0.4rem;
}
.team-list {
  max-height: 21rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}
.team-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}
.team-row + .team-row {
  border-top: 1px solid var(--line);
}
.team-row:hover,
.team-row:has(:checked) {
  background: #e9f3fe;
}
.team-row input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--blue);
}
.team-row span {
  display: block;
  overflow-wrap: anywhere;
}
.team-name {
  font-weight: 680;
}
.team-league {
  color: var(--muted);
  font-size: 0.875rem;
}

.subscription-panel {
  background: linear-gradient(155deg, #fff, #edf5ff);
  border-color: #cddfee;
}
.panel-icon {
  margin-bottom: 0.85rem;
  background: #dceefe;
  color: var(--blue-dark);
}
#selection-summary {
  margin-top: 0.5rem;
  color: var(--muted);
}
.primary-button,
.secondary-button,
.apple-link {
  display: block;
  min-height: 2.75rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  font-weight: 680;
  text-align: center;
}
.primary-button {
  width: 100%;
  margin-top: 1.2rem;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 6px #01519825;
}
.primary-button:hover:not(:disabled) {
  background: var(--blue-dark);
}
.primary-button:disabled {
  border-color: #c7d7e8;
  background: #dfeaf6;
  color: #4e637a;
  box-shadow: none;
}
.error {
  margin-top: 0.65rem;
  color: #922b20;
}
.result {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #c5d8eb;
}
.link-field {
  display: flex;
  gap: 0.45rem;
}
.link-field input {
  font-size: 0.875rem;
}
.secondary-button,
.apple-link {
  border-color: #a9c4dd;
  background: #fff;
  color: var(--blue-dark);
}
.secondary-button:hover,
.apple-link:hover {
  background: #eaf4ff;
}
.apple-link {
  margin-block: 0.8rem 0.6rem;
  text-decoration: none;
}
.copy-status {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.partner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem 1.15rem;
  padding: 1rem clamp(1rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--akl-orange);
  border-radius: 1rem;
  background: #fff;
}
.partner-logo {
  width: 4rem;
  height: 4.5rem;
}
.partner-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.partner h2 {
  color: #14293f;
  font-size: 1.0625rem;
  letter-spacing: -0.018em;
}
.partner p {
  margin-top: 0.2rem;
  color: var(--muted);
}
.instructions {
  margin-top: 1.9rem;
  padding: 0.25rem 0.15rem 0;
  scroll-margin-top: 1rem;
}
.instruction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
  margin-top: 1rem;
}
.instruction-grid > div {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #ffffffa8;
}
.instruction-grid h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.instruction-grid p {
  color: var(--muted);
}
.refresh-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 48rem) {
  .wrap {
    width: calc(100% - 2rem);
  }
  .main {
    padding-top: 1rem;
  }
  .hero {
    grid-template-columns: minmax(0, 1.55fr) minmax(12rem, 1fr);
    min-height: 16rem;
  }
  .hero-copy {
    padding-block: 2.4rem;
  }
  .hero-art {
    padding-inline: 0.8rem;
  }
  .source-card {
    width: min(88%, 12rem);
    padding-inline: 0.9rem;
  }
  .builder {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
    margin-block: 0.9rem;
  }
}

@media (max-width: 36rem) {
  .header-inner {
    min-height: 4rem;
    gap: 0.6rem;
    padding-block: 0.45rem;
  }
  .brand {
    font-size: 0.9375rem;
    gap: 0.55rem;
  }
  .header-help {
    flex: initial;
    max-width: 8rem;
    padding: 0.42rem 0.6rem;
    line-height: 1.25;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero h1 {
    font-size: clamp(1.8rem, 7.8vw, 3rem);
    margin-bottom: 0.8rem;
  }
  .hero-copy {
    padding: 1.65rem 1.2rem 0;
  }
  .hero-art {
    justify-items: start;
    padding: 1.1rem 1.2rem 1.35rem;
  }
  .hero-art::before {
    inset: -4rem -15% -5rem 30%;
  }
  .hero-art::after {
    display: none;
  }
  .source-card {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.65rem;
    width: fit-content;
    padding: 0.46rem 0.75rem;
    border-radius: 0.7rem;
    text-align: left;
  }
  .source-card-mark {
    width: 4rem;
  }
  .partner {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .partner-logo {
    width: 3rem;
    height: 3.75rem;
  }
  .partner-link {
    grid-column: 2;
    justify-self: start;
  }
  .instruction-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
