:root {
  --paper: #f3f0ea;
  --ink: #161412;
  --muted: #675f56;
  --red: #d71920;
  --blue: #15566f;
  --green: #4f7646;
  --gold: #aa7627;
  --charcoal: #25211e;
  --soft: #fffaf3;
  --line: rgba(23, 23, 23, 0.14);
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 47%, rgba(215, 25, 32, 0.04) 47% 48%, transparent 48% 100%),
    linear-gradient(90deg, rgba(215, 25, 32, 0.05) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(22, 20, 18, 0.04) 0 1px, transparent 1px 100%);
  background-size: 72px 72px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  padding: 8px 12px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-140%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 234, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-family: "DIN Condensed", "Avenir Next Condensed", "PingFang SC", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  width: 10px;
  height: 32px;
  background: var(--red);
}

.site-header nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-header nav a:hover {
  color: var(--red);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: 72px 7vw 56px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.86), rgba(243, 240, 234, 0.96)),
    linear-gradient(128deg, transparent 0 58%, rgba(215, 25, 32, 0.08) 58% 59%, transparent 59% 100%),
    radial-gradient(circle at 18% 18%, rgba(215, 25, 32, 0.08), transparent 28%);
  overflow: hidden;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-family: "DIN Condensed", "Avenir Next Condensed", "PingFang SC", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-family: "Bodoni 72", "Didot", Georgia, "Songti SC", serif;
  font-size: clamp(42px, 6.8vw, 86px);
  line-height: 1.02;
  font-weight: 700;
  animation: rise-in 600ms ease both;
}

h2 {
  margin-bottom: 16px;
  font-family: "Bodoni 72", "Didot", Georgia, "Songti SC", serif;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.25;
}

.lead {
  max-width: 720px;
  color: #3f3b37;
  font-size: 20px;
  animation: rise-in 700ms ease 80ms both;
}

.hero-actions,
.hero-insight,
.group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-insight {
  margin: 28px 0;
}

.hero-insight span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
  animation: rise-in 650ms ease 150ms both;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(35, 31, 28, 0.12);
}

.button.primary {
  color: var(--white);
  background: var(--ink);
}

.button.ghost {
  color: var(--ink);
  background: transparent;
}

.hero-board {
  position: relative;
  justify-self: center;
  width: min(420px, 100%);
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 24px 60px rgba(35, 31, 28, 0.14);
  transform: rotate(1.2deg);
  animation: board-in 700ms ease 120ms both;
}

.hero-board-card {
  position: absolute;
  right: 18px;
  bottom: 28px;
  width: min(240px, 70%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: var(--white);
  background: rgba(22, 20, 18, 0.92);
  box-shadow: 0 18px 36px rgba(22, 20, 18, 0.24);
  transform: rotate(-1.2deg);
}

.hero-board-card span {
  color: #f5b2b5;
  font-size: 11px;
  font-weight: 900;
}

.hero-board-card strong {
  display: block;
  margin: 4px 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1;
}

.hero-board-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.45;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}

.metric-strip article {
  min-height: 132px;
  padding: 26px 32px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.34);
}

.metric-strip article:nth-child(even) {
  background: rgba(255, 255, 255, 0.58);
}

.metric-strip article:last-child {
  border-right: 0;
}

.metric-strip strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.metric-strip span {
  color: var(--muted);
  font-weight: 800;
}

.section-intro,
.takeaways,
.split-section,
.groups-section,
.germany-section,
.matches-section,
.environment-section,
.upset-section,
.report-section {
  padding: 84px 7vw;
  border-bottom: 1px solid var(--line);
}

.section-intro {
  max-width: 980px;
}

.section-intro p:not(.eyebrow),
.split-section p,
.section-heading-row p,
.report-copy p {
  color: var(--muted);
  font-size: 18px;
}

.section-intro.compact {
  padding: 0;
  border: 0;
}

.feature-grid,
.takeaways,
.risk-grid,
.upset-list {
  display: grid;
  gap: 18px;
}

.takeaways {
  grid-template-columns: 1.1fr repeat(3, 1fr);
  padding: 74px 7vw;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.takeaways article:not(.takeaway-main) {
  padding: 22px;
  border-left: 4px solid var(--red);
  background: var(--white);
}

.takeaways span {
  display: block;
  margin-bottom: 24px;
  color: var(--red);
  font-weight: 900;
}

.takeaways p {
  color: var(--muted);
}

.feature-grid {
  grid-template-columns: repeat(4, 1fr);
  padding: 0 7vw 84px;
  border-bottom: 1px solid var(--line);
}

.flow-section {
  position: relative;
  overflow: hidden;
  padding: 64px 7vw;
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
}

.flow-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(130deg, transparent 0 34%, rgba(215, 25, 32, 0.22) 34% 35%, transparent 35% 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 100%);
  background-size: auto, 64px 64px;
}

.flow-section .eyebrow {
  color: #f5b2b5;
}

.flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.flow-steps article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  transform: skewX(-2deg);
}

.flow-steps article > * {
  transform: skewX(2deg);
}

.flow-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 32px;
  border-radius: 50%;
  color: var(--charcoal);
  background: var(--white);
  font-weight: 900;
}

.flow-steps p {
  color: rgba(255, 255, 255, 0.68);
}

.feature-grid article,
.risk-card,
.upset-list article,
.model-note,
.germany-metrics article,
.match-card,
.group-panel,
.chart {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.feature-grid article,
.match-card,
.risk-card {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.feature-grid article:hover,
.match-card:hover,
.risk-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(35, 31, 28, 0.08);
}

.feature-grid article,
.upset-list article {
  padding: 24px;
}

.feature-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--red);
  font-weight: 900;
}

.feature-grid p,
.upset-list p,
.risk-card p {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1.3fr);
  gap: 44px;
  align-items: start;
}

.model-note {
  margin-top: 28px;
  padding: 18px;
  background: var(--white);
}

.model-note strong {
  display: block;
  margin-bottom: 8px;
}

.model-note p {
  margin: 0;
  font-size: 15px;
}

.chart {
  padding: 22px;
}

.bar-row {
  display: grid;
  grid-template-columns: 90px minmax(160px, 1fr) 58px;
  gap: 14px;
  align-items: center;
  min-height: 48px;
}

.team-name {
  font-weight: 900;
}

.bar-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--red);
  animation: fill-bar 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: left;
}

.bar-note {
  color: var(--muted);
  font-size: 12px;
}

.germany-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(320px, 1.3fr);
  gap: 44px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(79, 118, 70, 0.12), transparent 52%),
    #f1f3f1;
}

.germany-section p {
  color: var(--muted);
  font-size: 18px;
}

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

.germany-metrics article {
  min-height: 150px;
  padding: 22px;
  background: var(--white);
}

.germany-metrics strong {
  display: block;
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.germany-metrics span {
  color: var(--muted);
  font-weight: 900;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading-row p {
  max-width: 430px;
}

.group-tabs {
  margin-bottom: 18px;
}

.group-tabs button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.group-tabs button[aria-selected="true"] {
  color: var(--white);
  border-color: var(--red);
  background: var(--red);
}

.group-panel {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 24px;
  min-height: 300px;
  padding: 28px;
}

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

.team-pill {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  background: var(--white);
  font-weight: 900;
}

.team-pill span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.group-panel dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 18px;
  margin: 0;
}

.group-panel dt {
  color: var(--muted);
  font-weight: 900;
}

.group-panel dd {
  margin: 0;
}

.environment-section {
  background:
    linear-gradient(90deg, rgba(21, 86, 111, 0.1), transparent 54%),
    #eef2ed;
}

.match-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.match-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-tools button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.match-tools button.active {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.match-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  font-weight: 900;
}

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

.match-search input {
  width: min(260px, 52vw);
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.match-count {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.match-card {
  display: grid;
  gap: 14px;
  min-height: 236px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
  font-weight: 900;
}

.match-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.match-teams {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 24px;
  line-height: 1.16;
}

.match-prediction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.match-prediction strong {
  font-size: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.tag.high {
  background: var(--green);
}

.tag.medium {
  background: var(--blue);
}

.tag.low {
  background: var(--gold);
}

.tag.upset {
  background: var(--red);
}

.risk-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 30px;
}

.risk-card {
  padding: 20px;
  background: var(--white);
}

.risk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.risk-badge {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.risk-badge.extreme {
  background: var(--red);
}

.risk-badge.high {
  background: var(--gold);
}

.risk-badge.medium {
  background: var(--blue);
}

.risk-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  line-height: 1;
}

.upset-section {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 40px;
}

.upset-list {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.report-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 48px;
  align-items: center;
}

.page-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.page-gallery img {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 16px 36px rgba(35, 31, 28, 0.12);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 7vw;
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes board-in {
  from {
    opacity: 0;
    transform: translateY(20px) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(1.2deg);
  }
}

@keyframes fill-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 20px;
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .split-section,
  .germany-section,
  .group-panel,
  .upset-section,
  .report-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .metric-strip,
  .takeaways,
  .feature-grid,
  .flow-steps,
  .germany-metrics,
  .match-grid,
  .risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    padding-top: 0;
  }

  .takeaways {
    grid-template-columns: repeat(2, 1fr);
  }

  .takeaway-main {
    grid-column: 1 / -1;
  }

  .upset-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  h1,
  .lead,
  .hero-insight span,
  .hero-board {
    animation: none;
  }

  .hero,
  .section-intro,
  .takeaways,
  .split-section,
  .groups-section,
  .germany-section,
  .matches-section,
  .environment-section,
  .upset-section,
  .report-section {
    padding: 54px 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    padding: 0 20px 54px;
  }

  .metric-strip,
  .takeaways,
  .flow-steps,
  .germany-metrics,
  .match-grid,
  .risk-grid,
  .upset-list,
  .page-gallery {
    grid-template-columns: 1fr;
  }

  .metric-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-heading-row,
  .match-tools,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .match-search,
  .match-search input {
    width: 100%;
  }

  .bar-row {
    grid-template-columns: 74px minmax(90px, 1fr) 48px;
    gap: 10px;
  }

  .group-panel dl {
    grid-template-columns: 1fr;
  }
}
