:root {
  --bg: #f7f8f4;
  --paper: #ffffff;
  --ink: #111815;
  --muted: #5d6861;
  --line: #dbe1d9;
  --green: #0c6b3d;
  --green-deep: #073f28;
  --red: #b93b32;
  --shadow: 0 22px 60px rgba(17, 24, 21, 0.12);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(247, 248, 244, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--green);
  border-radius: 50%;
  box-shadow: inset 8px 0 0 var(--green), inset -8px 0 0 transparent;
  transform: rotate(-25deg);
}

nav {
  display: flex;
  gap: 28px;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

nav a,
.text-link {
  text-decoration: none;
}

nav a:hover,
.text-link:hover {
  color: var(--green);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  background: var(--green-deep);
}

.button-small {
  justify-self: end;
  min-height: 38px;
  padding-inline: 15px;
}

.hero {
  display: flex;
  align-items: center;
  min-height: min(430px, calc(58vh - 76px));
  padding: 46px clamp(20px, 4vw, 56px) 50px;
  background:
    linear-gradient(90deg, rgba(7, 18, 13, 0.86) 0%, rgba(7, 18, 13, 0.58) 42%, rgba(7, 18, 13, 0.08) 100%),
    url("/assets/rugby-hero.png") center right / cover;
  color: #fff;
}

.hero-copy {
  width: min(100%, 640px);
  min-width: 0;
  max-width: 640px;
}

.dateline {
  margin: 0 0 24px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: clamp(52px, 6.7vw, 96px);
  font-weight: 700;
  line-height: 0.94;
}

.hero-summary {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
}

.text-link {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.section {
  padding: 70px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  background: var(--paper);
}

.section-heading {
  max-width: 320px;
}

.section-heading p {
  margin-bottom: 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading h2,
.digest-panel h2 {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.story-stack {
  border-top: 1px solid var(--ink);
}

.story {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 26px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.story-lead {
  padding-top: 34px;
  padding-bottom: 36px;
}

.story-index {
  color: var(--green);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.story-meta span + span::before {
  content: "/";
  margin-right: 10px;
  color: var(--line);
}

.story h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

.story p,
.tournament-group p,
.digest-panel p {
  color: var(--muted);
  font-size: 16px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(28px, 5vw, 72px);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.category-grid a {
  min-height: 82px;
  padding: 22px;
  background: var(--paper);
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
}

.category-grid a:hover {
  background: #eef5ee;
}

.digest-panel {
  align-self: start;
  padding: 34px;
  background: var(--green-deep);
  color: #fff;
}

.digest-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.digest-panel .button {
  margin-top: 14px;
  border-color: #fff;
  background: #fff;
  color: var(--green-deep);
}

.archive-section {
  background: var(--paper);
}

.contact-section {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  background: var(--paper);
}

.contact-form {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

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

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.contact-form input {
  min-height: 48px;
  padding: 0 14px;
}

.contact-form textarea {
  min-height: 160px;
  padding: 14px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(12, 107, 61, 0.24);
  border-color: var(--green);
}

.contact-form .button {
  width: fit-content;
  border-radius: 0;
  cursor: pointer;
}

.players-preview,
.player-hub-grid,
.player-stat-section,
.player-table-section {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  background: var(--paper);
}

.player-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.player-card-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.player-feature-card,
.watchlist-panel {
  display: grid;
  gap: 24px;
  align-content: start;
  min-height: 330px;
  padding: 30px;
  background: var(--paper);
}

.player-feature-card h3,
.watchlist-panel h3 {
  margin-bottom: 12px;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1;
}

.player-feature-card p,
.watchlist-panel span,
.data-note,
.player-hero p,
.player-profile-hero p {
  color: var(--muted);
}

.player-country {
  margin-bottom: 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-strip,
.player-bio-panel dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat-strip div,
.player-bio-panel div {
  min-width: 0;
  padding: 16px;
  background: #f8faf6;
}

.stat-strip dt,
.player-bio-panel dt,
.stat-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-strip dd,
.player-bio-panel dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
}

.watchlist-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.watchlist-list article {
  display: grid;
  gap: 4px;
  padding: 15px;
  background: #f8faf6;
}

.watchlist-list strong {
  font-family: var(--serif);
  font-size: 21px;
}

.player-hero p,
.player-profile-hero p {
  max-width: 760px;
  font-size: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.filter-grid a {
  display: grid;
  gap: 8px;
  min-height: 94px;
  padding: 22px;
  background: var(--paper);
  text-decoration: none;
}

.filter-grid strong {
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 25px;
}

.filter-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.player-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(28px, 5vw, 72px);
  padding: 80px clamp(20px, 4vw, 56px) 64px;
  background: var(--green-deep);
  color: #fff;
}

.player-profile-hero h1 {
  max-width: 820px;
}

.player-profile-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.player-bio-panel {
  align-self: start;
  padding: 0;
}

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

.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat-card {
  min-height: 118px;
  padding: 20px;
  background: var(--paper);
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.96;
}

.stats-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
}

.stats-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.stats-table th {
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-table td {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.fixtures-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.fixture-summary-section {
  background: var(--paper);
}

.fixture-summary-section .stat-card strong {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}

.fixture-section {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.fixture-tournament-list {
  display: grid;
  gap: 22px;
}

.fixture-tournament {
  border: 1px solid var(--line);
  background: var(--paper);
}

.fixture-tournament-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.fixture-tournament-header h3 {
  margin: 0;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

.fixture-tournament-header span,
.fixture-meta,
.fixture-card code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fixture-list {
  display: grid;
}

.fixture-card {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.fixture-card:last-child {
  border-bottom: 0;
}

.fixture-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.fixture-meta span:first-child {
  color: var(--red);
}

.fixture-meta span:not(:first-child) {
  padding: 3px 7px;
  background: #f1f4ef;
  color: var(--muted);
}

.fixture-completed .fixture-meta span:first-child {
  color: var(--green);
}

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

.fixture-teams strong {
  min-width: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.04;
}

.fixture-teams strong:last-child {
  text-align: right;
}

.fixture-score {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  align-items: center;
  min-width: 58px;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  text-align: center;
}

.fixture-v {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fixture-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.fixture-card code {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 6px 8px;
  overflow-wrap: anywhere;
  background: #f1f4ef;
  font-family: var(--sans);
  text-transform: none;
}

.data-note {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.tournament-section {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.tournament-section .section-heading {
  max-width: 360px;
}

.tournament-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tournament-group {
  min-height: 220px;
  padding: 26px;
  background: var(--paper);
}

.tournament-group h3 {
  margin-bottom: 18px;
  color: var(--green-deep);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.08;
}

.tournament-group article + article {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.tournament-group h4 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.12;
}

.archive-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.archive-strip a {
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 24px;
  background: var(--paper);
  text-decoration: none;
}

.archive-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.archive-hero {
  padding: 80px clamp(20px, 4vw, 56px) 42px;
}

.archive-hero h1 {
  max-width: 880px;
  font-size: clamp(44px, 6vw, 76px);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero {
    min-height: 520px;
    background:
      linear-gradient(90deg, rgba(7, 18, 13, 0.9) 0%, rgba(7, 18, 13, 0.76) 100%),
      url("/assets/rugby-hero.png") center right 24% / cover;
  }

  .section-grid,
  .split-section,
  .tournament-section,
  .players-preview,
  .player-hub-grid,
  .player-stat-section,
  .player-table-section,
  .contact-section,
  .fixture-section,
  .player-profile-hero {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 620px) {
  .site-header {
    position: static;
    padding-block: 16px;
  }

  .button-small {
    display: none;
  }

  h1 {
    max-width: 100%;
    font-size: 40px;
    line-height: 0.98;
    overflow-wrap: normal;
  }

  .hero-summary {
    max-width: 330px;
    font-size: 17px;
  }

  .hero-actions,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .story {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .tournament-list {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .stat-strip,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .stat-card-grid {
    grid-template-columns: 1fr;
  }

  .fixture-tournament-header,
  .fixture-teams {
    grid-template-columns: 1fr;
  }

  .fixture-tournament-header {
    display: grid;
  }

  .fixture-teams strong:last-child {
    text-align: left;
  }

  .digest-panel {
    padding: 26px;
  }
}
