:root {
  color-scheme: light;
  --ink: #101820;
  --muted: #5e6a72;
  --line: #d8dee2;
  --surface: #ffffff;
  --band: #f2f6f4;
  --green: #006b54;
  --red: #9e1b32;
  --gold: #c89b3c;
  --blue: #144c7c;
  --shadow: 0 18px 45px rgba(16, 24, 32, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #fbfcfb;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 360px;
  padding: 42px clamp(18px, 5vw, 72px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 22, 29, 0.94), rgba(10, 22, 29, 0.72)),
    url("https://digitalhub.fifa.com/transform/0383ac25-2424-4a64-baf3-8c54acfb2328/FIFA-World-Cup-2026-Brand-Launch");
  background-size: cover;
  background-position: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #d8c08a;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--green);
}

h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 850;
}

.subtitle {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.6;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: min(420px, 38vw);
}

.hero-next {
  width: 100%;
  max-width: 420px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.hero-next p {
  margin: 0 0 8px;
  color: #d8c08a;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-next strong {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.hero-next em {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-style: normal;
}

.hero-next span,
.hero-next small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
}

.hero-next small {
  color: rgba(255, 255, 255, 0.68);
}

.button,
.icon-button,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  border-color: #d8c08a;
  background: #d8c08a;
}

main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.summary-band > div {
  min-height: 92px;
  padding: 18px;
  background: var(--surface);
}

.metric {
  display: block;
  font-size: 28px;
  font-weight: 850;
  white-space: nowrap;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.7fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 22px 0 12px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(4, 1fr);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.segment {
  min-width: 66px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: var(--green);
  color: #fff;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0 20px;
  padding: 12px 14px;
  border: 1px solid #d7e4dd;
  border-radius: 8px;
  background: var(--band);
  color: #21342d;
}

code {
  overflow-wrap: anywhere;
  color: var(--green);
}

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  font-weight: 700;
}

.match-list {
  display: grid;
  gap: 12px;
  padding-bottom: 42px;
}

.team-detail {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.team-hero {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 20px;
  background: linear-gradient(90deg, #f4f8f5, #ffffff);
}

.team-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 38px;
}

.team-hero h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.team-hero h2 span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
}

.team-hero p {
  max-width: 760px;
  margin: 0;
  color: #38444c;
  line-height: 1.65;
}

.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.team-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d7e4dd;
  border-radius: 999px;
  background: #ffffff;
  color: #21342d;
  font-size: 12px;
  font-weight: 800;
}

.team-tags span:first-child {
  border-color: rgba(158, 27, 50, 0.22);
  background: #fff5f6;
  color: var(--red);
}

.close-detail {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.team-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: 1px;
  background: var(--line);
}

.team-info-grid > div {
  padding: 18px;
  background: var(--surface);
}

.team-info-grid h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.story-list,
.team-schedule {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-list li {
  padding-left: 12px;
  border-left: 3px solid var(--gold);
  color: #344047;
  line-height: 1.55;
}

.fact-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.fact-list div {
  display: grid;
  gap: 3px;
}

.fact-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fact-list dd {
  margin: 0;
  line-height: 1.5;
}

.team-schedule li {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f1;
}

.team-schedule li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.team-schedule span,
.team-schedule small {
  color: var(--muted);
  font-size: 12px;
}

.team-schedule strong {
  font-size: 14px;
}

.date-group {
  margin-top: 10px;
}

.date-title {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 2px;
  background: rgba(251, 252, 251, 0.94);
  backdrop-filter: blur(8px);
}

.date-title h2 {
  margin: 0;
  font-size: 22px;
}

.date-title span {
  color: var(--muted);
  font-size: 13px;
}

.match-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 64px 220px;
  gap: 18px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.time-block {
  color: var(--muted);
}

.time-block strong {
  display: block;
  color: var(--ink);
  font-size: 26px;
}

.teams {
  display: grid;
  gap: 10px;
}

.team-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.team-link {
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.team-link:hover,
.team-link:focus-visible {
  outline: 2px solid rgba(0, 107, 84, 0.18);
  background: #f3f8f5;
}

.team-link.disabled {
  pointer-events: none;
}

.flag {
  width: 44px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f7f9f8;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 26px;
  line-height: 1;
}

.team-name {
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
}

.team-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.score-stack,
.score-button {
  display: grid;
  align-self: stretch;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  min-width: 54px;
  justify-items: center;
  align-items: center;
  color: var(--ink);
  font-size: 24px;
  font-weight: 850;
}

.score-button {
  width: 54px;
  min-height: 68px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.score-button:hover,
.score-button:focus-visible {
  border-color: rgba(0, 107, 84, 0.28);
  background: #f3f8f5;
  outline: 0;
}

.goal-details {
  margin: -4px 0 8px 130px;
  padding: 14px 16px;
  border: 1px solid #d7e4dd;
  border-radius: 8px;
  background: #f8fbf9;
}

.goal-details h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.goal-details ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-details li {
  display: grid;
  grid-template-columns: 58px 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.goal-details time {
  color: var(--green);
  font-weight: 850;
}

.goal-details small {
  grid-column: 3;
  color: var(--muted);
}

.goal-empty {
  margin: 0;
  color: var(--muted);
}

.meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.pill {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f4f6;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.calendar-link {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #d7e4dd;
  border-radius: 8px;
  background: #f3f8f5;
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.calendar-link:hover,
.calendar-link:focus-visible {
  border-color: rgba(0, 107, 84, 0.32);
  background: #e8f2ed;
  outline: 0;
}

.empty {
  padding: 40px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .site-header,
  .toolbar,
  .team-info-grid {
    grid-template-columns: 1fr;
  }

  .match-card {
    grid-template-columns: 88px minmax(0, 1fr) 54px;
  }

  .match-card .meta {
    grid-column: 2 / 4;
  }

  .site-header {
    align-items: start;
    min-height: 0;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .header-side {
    justify-items: start;
    min-width: 0;
  }

  .hero-next {
    max-width: none;
  }

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

  .goal-details {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .subtitle {
    font-size: 16px;
  }

  .summary-band {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
  }

  .notice,
  .team-hero,
  footer {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .match-card {
    gap: 12px;
  }
}
