:root {
  --font-primary: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  
  --color-bg: #fdfbfb;
  --color-surface: #ffffff;
  --color-primary: #ff8fa3;
  --color-primary-hover: #ff748c;
  --color-secondary: #a2d2ff;
  --color-text: #2b2d42;
  --color-text-muted: #6c757d;
  --color-border: #f1f3f5;
  --color-error: #ef233c;
  
  --shadow-sm: 0 4px 16px rgba(43, 45, 66, 0.04);
  --shadow-md: 0 8px 24px rgba(43, 45, 66, 0.06);
  --shadow-hover: 0 12px 32px rgba(43, 45, 66, 0.1);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;

  --header-height-desk: 64px;
  --header-height-mob: 52px;
  --content-max: 1024px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
}

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

h1, h2, h3, h4, h5, h6, .brand-name, nav, .wrap-text {
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--color-text);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-24); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: var(--space-16); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-8); }
p { margin-bottom: var(--space-16); }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-primary-hover); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

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

ul, ol { margin-bottom: var(--space-16); padding-left: var(--space-24); }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-24);
  min-width: 0;
}

/* Header */
.site-header {
  height: var(--header-height-desk);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

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

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

.brand svg {
  width: 24px;
  height: 24px;
  fill: var(--color-primary);
}

.main-nav {
  display: flex;
  gap: var(--space-24);
  align-items: center;
}

.nav-links {
  display: flex;
  gap: var(--space-24);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.header-cta .btn {
  padding: 6px 16px;
  font-size: 0.875rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-4);
  color: var(--color-text);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-primary);
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text-muted);
}

/* Main Content Area */
main {
  flex: 1;
  padding: var(--space-64) 0;
}

section {
  margin-bottom: var(--space-64);
}

section:last-child {
  margin-bottom: 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--space-64) var(--space-24);
  background: linear-gradient(135deg, rgba(255, 143, 163, 0.1) 0%, rgba(162, 210, 255, 0.1) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-64);
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-24) auto;
}

/* Horizontal Split Cards */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}

.card {
  display: flex;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  min-width: 0;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-media {
  flex: 0 0 40%;
  position: relative;
  min-height: 200px;
}

.card-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  flex: 1;
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.card-meta span {
  display: inline-flex;
  align-items: center;
}

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

.card-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-24);
  flex: 1;
}

.card-actions {
  margin-top: auto;
}

/* Supporting Section */
.supporting-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-40) var(--space-24);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-24);
  margin-top: var(--space-40);
}

.stat-item {
  padding: var(--space-24);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.stat-value {
  font-size: 2rem;
  font-family: var(--font-serif);
  color: var(--color-primary);
  margin-bottom: var(--space-12);
  font-weight: bold;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Article / Page Content */
.page-header {
  text-align: center;
  margin-bottom: var(--space-40);
  padding-bottom: var(--space-24);
  border-bottom: 1px solid var(--color-border);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.125rem;
}

.article-content h2 { margin-top: var(--space-40); }
.article-content h3 { margin-top: var(--space-24); }
.article-content img {
  border-radius: var(--radius-md);
  margin: var(--space-24) 0;
  box-shadow: var(--shadow-sm);
}

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-24) 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  text-align: left;
  min-width: 600px;
}

th, td {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg);
  font-weight: 600;
}

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

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(162, 210, 255, 0.3);
}

.form-control.is-invalid {
  border-color: var(--color-error);
}

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

.error-msg.is-visible {
  display: block;
}

/* Map Block */
.static-map {
  background: #e9ecef;
  border-radius: var(--radius-md);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-24);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.05);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-64) 0 var(--space-24);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-40);
  margin-bottom: var(--space-40);
}

.footer-col h4 {
  margin-bottom: var(--space-16);
  font-family: var(--font-primary);
}

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

.footer-col ul li {
  margin-bottom: var(--space-8);
}

.footer-col ul li a {
  color: var(--color-text-muted);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-24);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) var(--space-24);
  box-shadow: 0 -4px 16px rgba(43, 45, 66, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 1000;
}

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

.cookie-text {
  flex: 1 1 300px;
  font-size: 0.875rem;
  margin: 0;
}

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

/* Responsive */
@media (max-width: 767px) {
  .site-header {
    height: var(--header-height-mob);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: absolute;
    top: var(--header-height-mob);
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: var(--space-24);
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
    display: none;
    z-index: 100;
  }
  
  .main-nav.is-visible {
    display: flex;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .header-cta {
    width: 100%;
    text-align: center;
  }
  
  .card {
    flex-direction: column;
  }
  
  .card-media {
    flex: none;
    height: 240px;
  }
  
  .card-media img {
    position: relative;
    height: 100%;
  }
}

@media (max-width: 399px) {
  :root {
    --space-64: 40px;
    --space-40: 24px;
    --space-24: 16px;
  }
  .cookie-actions {
    width: 100%;
    flex-direction: column;
  }
  .cookie-actions .btn {
    width: 100%;
  }
}

/* Accessibility / Motion */
@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;
  }
}