:root {
  /* Colors - Swiss Minimalist (High Contrast) */
  --c-black: #0a0a0a;
  --c-white: #ffffff;
  --c-grey-light: #f4f4f4;
  --c-grey-mid: #cccccc;
  --c-grey-dark: #555555;
  --c-accent: #e32619; /* Stark red */

  /* Spacing Scale */
  --s-4: 0.25rem;
  --s-8: 0.5rem;
  --s-16: 1rem;
  --s-24: 1.5rem;
  --s-40: 2.5rem;
  --s-64: 4rem;

  /* Typography */
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --fw-regular: 400;
  --fw-bold: 700;
  
  /* Layout */
  --max-width: 1200px;
  --header-height-desk: 64px;
  --header-height-mob: 52px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--c-black);
  background-color: var(--c-white);
  line-height: 1.5;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-name, .nav-links a {
  overflow-wrap: anywhere;
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: var(--s-24); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--s-24); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--s-16); }
p { margin-bottom: var(--s-16); max-width: 70ch; color: var(--c-grey-dark); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--c-black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--c-accent);
}

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

ul, ol {
  margin-bottom: var(--s-16);
  padding-left: var(--s-24);
  color: var(--c-grey-dark);
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--s-24);
}

.section {
  padding: var(--s-64) 0;
}

.grid {
  display: grid;
  gap: var(--s-40);
  min-width: 0;
}

/* Header */
.site-header {
  height: var(--header-height-mob);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--c-black);
  background: var(--c-white);
}

@media (min-width: 768px) {
  .site-header {
    height: var(--header-height-desk);
  }
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  text-decoration: none;
  font-weight: var(--fw-bold);
  font-size: 1.25rem;
}

.brand svg {
  width: 24px;
  height: 24px;
}

.nav-main {
  display: none;
}

@media (min-width: 768px) {
  .nav-main {
    display: flex;
    gap: var(--s-24);
    align-items: center;
  }
  .nav-main a {
    text-decoration: none;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .header-cta {
    display: inline-block;
    padding: var(--s-8) var(--s-16);
    background: var(--c-black);
    color: var(--c-white);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: var(--fw-bold);
  }
  .header-cta:hover {
    background: var(--c-accent);
    color: var(--c-white);
  }
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-4);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  display: none;
  position: absolute;
  top: var(--header-height-mob);
  left: 0;
  width: 100%;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-black);
  padding: var(--s-24);
  z-index: 100;
}

.mobile-nav-overlay.is-visible {
  display: block;
}

.mobile-nav-overlay a {
  display: block;
  padding: var(--s-16) 0;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  border-bottom: 1px solid var(--c-grey-light);
}

/* Hero */
.hero {
  padding: var(--s-64) 0;
  border-bottom: 1px solid var(--c-black);
}

.hero-content {
  max-width: 900px;
}

/* Cards (Data Grid Style - Swiss Minimalist) */
.card-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-black);
  min-width: 0;
}

.card-data-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--c-black);
  background: var(--c-grey-light);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-cell {
  padding: var(--s-8) var(--s-16);
  border-right: 1px solid var(--c-black);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.data-cell:last-child {
  border-right: none;
}

.data-label {
  color: var(--c-grey-dark);
}

.data-value {
  font-weight: var(--fw-bold);
  color: var(--c-black);
}

.card-media {
  aspect-ratio: 4/3;
  border-bottom: 1px solid var(--c-black);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-content {
  padding: var(--s-24);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  margin-bottom: var(--s-8);
}

.card-content .card-link {
  margin-top: auto;
  padding-top: var(--s-24);
  font-weight: var(--fw-bold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
}

.card-content .card-link::after {
  content: '→';
}

/* Article Styling */
.article-header {
  padding: var(--s-64) 0 var(--s-40);
  border-bottom: 1px solid var(--c-black);
  margin-bottom: var(--s-40);
}

.article-meta {
  display: flex;
  gap: var(--s-24);
  margin-bottom: var(--s-24);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-grey-dark);
}

.article-body {
  max-width: 800px;
}

.article-body h2 {
  margin-top: var(--s-64);
  padding-top: var(--s-24);
  border-top: 1px solid var(--c-black);
}

/* Stat Blocks inside articles */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: 12px; /* Fixed spacing requirement */
  margin-bottom: var(--s-16);
  padding: var(--s-16);
  background: var(--c-grey-light);
  border-left: 4px solid var(--c-accent);
}

.stat-value {
  font-size: 2rem;
  font-weight: var(--fw-bold);
  color: var(--c-black);
}

.stat-label {
  font-size: 1rem;
  color: var(--c-grey-dark);
}

/* Forms */
.form-group {
  margin-bottom: var(--s-24);
}

.form-label {
  display: block;
  font-weight: var(--fw-bold);
  margin-bottom: var(--s-8);
}

.form-control {
  width: 100%;
  padding: var(--s-16);
  border: 1px solid var(--c-black);
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--c-white);
  color: var(--c-black);
}

.form-control:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(227, 38, 25, 0.2);
}

.form-control.is-invalid {
  border-color: var(--c-accent);
  background-color: #fffafa;
}

.error-msg {
  display: none;
  color: var(--c-accent);
  font-size: 0.875rem;
  margin-top: var(--s-4);
}

.is-invalid + .error-msg {
  display: block;
}

button[type="submit"], .btn {
  display: inline-block;
  padding: var(--s-16) var(--s-40);
  background: var(--c-black);
  color: var(--c-white);
  border: none;
  font-size: 1rem;
  font-weight: var(--fw-bold);
  cursor: pointer;
  text-decoration: none;
}

button[type="submit"]:hover, .btn:hover {
  background: var(--c-accent);
  color: var(--c-white);
}

/* Tables (Cookie Policy) */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--s-24);
  border: 1px solid var(--c-black);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Ensure content is readable, wrap allows scrolling */
}

th, td {
  padding: var(--s-16);
  border-bottom: 1px solid var(--c-black);
  border-right: 1px solid var(--c-black);
  text-align: left;
}

th {
  background: var(--c-grey-light);
  font-weight: var(--fw-bold);
}

/* Map Block */
.map-block {
  width: 100%;
  height: 400px;
  background: var(--c-grey-light);
  border: 1px solid var(--c-black);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-40);
}

.map-block::after {
  content: "Map Data Unavailable";
  color: var(--c-grey-dark);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--c-black);
  padding: var(--s-64) 0;
  background: var(--c-black);
  color: var(--c-white);
}

.site-footer a {
  color: var(--c-white);
  text-decoration-color: var(--c-grey-dark);
}

.site-footer a:hover {
  color: var(--c-accent);
}

.footer-grid {
  display: grid;
  gap: var(--s-40);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-info h4 {
  color: var(--c-white);
  margin-bottom: var(--s-16);
}

.footer-info p {
  color: var(--c-grey-mid);
  margin-bottom: var(--s-8);
  font-size: 0.875rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--s-8);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--c-white);
  border-top: 1px solid var(--c-black);
  padding: var(--s-24);
  z-index: 1000;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
}

@media (min-width: 768px) {
  .cookie-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.cookie-text p {
  margin: 0;
  color: var(--c-black);
  font-size: 0.875rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
}

.btn-sm {
  padding: var(--s-8) var(--s-16);
  font-size: 0.875rem;
  border: 1px solid var(--c-black);
  background: transparent;
  color: var(--c-black);
  cursor: pointer;
  font-weight: var(--fw-bold);
}

.btn-sm:hover {
  background: var(--c-grey-light);
}

.btn-primary {
  background: var(--c-black);
  color: var(--c-white);
}

.btn-primary:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-white);
}

/* Breakpoint for very small screens */
@media (max-width: 399px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .card-data-header {
    grid-template-columns: 1fr;
  }
  .data-cell {
    border-right: none;
    border-bottom: 1px solid var(--c-black);
  }
  .data-cell:last-child {
    border-bottom: none;
  }
}