:root {
  --color-parchment: #F5F1E8;
  --color-ink: #1B2D3A;
  --color-petrol: #0F5C63;
  --color-rust: #C96B4B;
  --color-white: #FFFFFF;
  --color-muted-grey: #6D7779;
  
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-condensed: "Arial Narrow", "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-parchment);
  color: var(--color-ink);
  font-family: var(--font-serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: normal;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  color: var(--color-petrol);
}

p {
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

a {
  color: var(--color-petrol);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover, a:focus {
  color: var(--color-rust);
  text-decoration: underline;
}

/* Focus States */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-rust);
  outline-offset: 2px;
}

/* Header & Nav */
.masthead {
  background-color: var(--color-ink);
  color: var(--color-white);
  padding: 4rem 5%;
  text-align: center;
  border-bottom: 4px solid var(--color-rust);
}

.masthead h1 {
  margin-bottom: 0.5rem;
}

.masthead .timestamp {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: #B0B8B9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-muted-grey);
  padding: 0 5%;
}

.nav-list {
  display: flex;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-list li a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.nav-list li a:hover,
.nav-list li a.active {
  background-color: var(--color-parchment);
  color: var(--color-petrol);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-ink);
  font-size: 1.5rem;
  padding: 1rem;
  cursor: pointer;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5%;
}

.desk-layout {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 2rem;
}

.content-section {
  background-color: var(--color-white);
  padding: 1.5rem;
  border: 1px solid var(--color-muted-grey);
  margin-bottom: 2rem;
}

/* Featured Tomorrow Fixtures */
.detailed-fixture {
  border: 1px solid var(--color-muted-grey);
  margin-bottom: 1.5rem;
  background-color: var(--color-white);
}

.df-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-petrol);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: bold;
}

.df-status {
  background-color: var(--color-rust);
  color: var(--color-white);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.df-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.5rem;
  gap: 1.5rem;
}

.df-team {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-ink);
}

.df-team.right {
  text-align: right;
}

.df-stats {
  font-size: 0.85rem;
  color: var(--color-muted-grey);
  font-weight: normal;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.df-vs {
  font-family: var(--font-sans);
  color: var(--color-muted-grey);
  font-size: 0.875rem;
  text-align: center;
  background-color: var(--color-parchment);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--color-muted-grey);
}

/* Team Flags */
.team-flag {
  width: 24px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid var(--color-muted-grey);
  border-radius: 2px;
  object-fit: cover;
}

.df-team.right .team-flag {
  margin-right: 0;
  margin-left: 8px;
}

/* Standings Table */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-condensed);
  margin-bottom: 1.5rem;
  background-color: rgba(255, 255, 255, 0.8);
}

.standings-table th,
.standings-table td {
  padding: 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-muted-grey);
}

.standings-table th {
  background-color: var(--color-ink);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: normal;
}

.standings-table td.team-name {
  text-align: left;
  font-weight: bold;
  font-family: var(--font-sans);
}

.standings-table tr:nth-child(even) td {
  background-color: rgba(250, 250, 250, 0.9);
}

/* Pressure Lines */
.pressure-line {
  background-color: var(--color-petrol);
  color: var(--color-white);
  padding: 1rem;
  border-left: 4px solid var(--color-rust);
  font-style: italic;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Explainer / Notes Panel */
.notes-panel {
  background-color: var(--color-white);
  border: 1px solid var(--color-muted-grey);
  padding: 1.5rem;
}

.notes-panel h3 {
  border-bottom: 1px solid var(--color-muted-grey);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.explainer-list {
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.explainer-list li {
  margin-bottom: 0.5rem;
  display: flex;
}

.explainer-list strong {
  width: 40px;
  color: var(--color-petrol);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-muted-grey);
  font-family: var(--font-sans);
  font-size: 1rem;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.btn {
  display: inline-block;
  background-color: var(--color-petrol);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--color-ink);
  text-decoration: none;
}

/* Footer */
.site-footer {
  background-color: var(--color-ink);
  color: var(--color-white);
  padding: 4rem 5%;
  margin-top: 3rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--color-rust);
  font-family: var(--font-sans);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-white);
}

.footer-links a:hover {
  color: var(--color-rust);
}

.disclaimer {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-muted-grey);
  color: #B0B8B9;
  font-size: 0.75rem;
  text-align: center;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-white);
  border-top: 2px solid var(--color-rust);
  padding: 1.5rem 5%;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  font-family: var(--font-sans);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-text {
  flex: 1;
  margin-right: 2rem;
  font-size: 0.875rem;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-secondary {
  background-color: var(--color-muted-grey);
}

.btn-secondary:hover {
  background-color: var(--color-ink);
}

/* Group Navigator Panel */
.group-nav {
  list-style: none;
}

.group-nav li a {
  display: block;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-muted-grey);
  font-family: var(--font-sans);
  font-weight: bold;
}

.group-nav li a:hover, .group-nav li a.active {
  background-color: var(--color-petrol);
  color: var(--color-white);
  text-decoration: none;
}

/* Fixtures List */
.fixture-list {
  list-style: none;
}

.fixture-item {
  padding: 1rem;
  border-bottom: 1px solid var(--color-muted-grey);
  font-family: var(--font-sans);
}

.fixture-item.tomorrow {
  background-color: var(--color-parchment);
  border-left: 4px solid var(--color-rust);
}

.fixture-date {
  font-size: 0.75rem;
  color: var(--color-muted-grey);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.fixture-match {
  font-size: 1.125rem;
  font-weight: bold;
}

/* Selector */
.group-selector {
  margin-bottom: 2rem;
}

.group-selector select {
  padding: 0.75rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--color-ink);
  background-color: var(--color-white);
  min-width: 200px;
}

/* Responsive */
@media (max-width: 1024px) {
  .desk-layout {
    grid-template-columns: 1fr 300px;
  }
  .left-col {
    display: none; /* Hide side nav on tablet, use top nav */
  }
}

@media (max-width: 768px) {
  .desk-layout {
    grid-template-columns: 1fr;
  }
  
  .mobile-menu-btn {
    display: block;
    margin: 0 auto;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .nav-list.show {
    display: flex;
  }
  
  .df-body {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .df-team.right {
    text-align: center;
  }

  .df-vs {
    width: fit-content;
    margin: 0 auto;
  }
  
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-text {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .cookie-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .masthead h1 {
    font-size: 1.75rem;
  }
  
  .standings-table {
    font-size: 0.75rem;
  }
  
  .standings-table th,
  .standings-table td {
    padding: 0.25rem;
  }
}