:root {
  --midnight-ink: #17232B;
  --deep-nordic: #21333A;
  --graphite-blue: #33464D;
  --cool-slate: #62757A;
  --nordic-mist: #DDE6E5;
  --ice-grey: #EAF0EF;
  --soft-snow: #F5F8F6;
  --paper-white: #FBFCFA;
  --arctic-mint: #78B9A8;
  --digital-teal: #4D9E9B;
  --frost-blue: #7FA9C1;
  --signal-blue: #527DA8;
  --warm-amber: #C79B5B;
  --muted-coral: #C77A72;
  --soft-violet: #817B9A;

  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-40: 40px;
  --sp-64: 64px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-subtle: 0 4px 20px rgba(23, 35, 43, 0.04);
  --shadow-hover: 0 8px 30px rgba(23, 35, 43, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: var(--font-sans);
  background-color: var(--soft-snow);
  color: var(--midnight-ink);
  line-height: 1.6;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

h1, h2, h3, h4 { color: var(--midnight-ink); line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); letter-spacing: -0.02em; margin-bottom: var(--sp-24); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: var(--sp-24); }
h3 { font-size: 1.5rem; margin-bottom: var(--sp-16); }
p { margin-bottom: var(--sp-16); color: var(--graphite-blue); font-size: 1.125rem; }
a { color: var(--digital-teal); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--arctic-mint); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--warm-amber);
  outline-offset: 2px;
}
img { max-width: 100%; height: auto; display: block; object-fit: cover; border-radius: var(--radius-md); }
ul, ol { margin: 0 0 var(--sp-24) var(--sp-24); color: var(--graphite-blue); font-size: 1.125rem; }
li { margin-bottom: var(--sp-8); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-24); min-width: 0; }
.section { padding: var(--sp-64) 0; }
.bg-dark { background-color: var(--deep-nordic); color: var(--paper-white); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark p { color: var(--paper-white); }
.bg-dark p { opacity: 0.9; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600;
  text-align: center; cursor: pointer; border: none; transition: all 0.2s ease;
  font-size: 1rem;
}
.btn-primary { background-color: var(--digital-teal); color: var(--paper-white); }
.btn-primary:hover { background-color: var(--midnight-ink); transform: translateY(-2px); shadow: var(--shadow-hover); color: var(--paper-white); }
.btn-secondary { background-color: var(--nordic-mist); color: var(--midnight-ink); }
.btn-secondary:hover { background-color: var(--ice-grey); }
.btn-outline { border: 2px solid var(--paper-white); color: var(--paper-white); background: transparent; }
.btn-outline:hover { background: var(--paper-white); color: var(--midnight-ink); }

/* Header */
.site-header { background: var(--paper-white); box-shadow: var(--shadow-subtle); position: sticky; top: 0; z-index: 100; padding: var(--sp-16) 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: var(--sp-12); font-weight: 700; font-size: 1.25rem; color: var(--midnight-ink); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; fill: var(--digital-teal); }
.desktop-nav { display: none; }
.desktop-nav ul { display: flex; gap: var(--sp-24); list-style: none; margin: 0; padding: 0; }
.desktop-nav a { color: var(--graphite-blue); font-weight: 600; font-size: 1rem; }
.desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--digital-teal); }
.header-cta { display: none; }
.menu-toggle { display: block; background: none; border: none; cursor: pointer; padding: var(--sp-8); color: var(--midnight-ink); }
.menu-toggle svg { width: 24px; height: 24px; fill: currentColor; }

/* Mobile Menu */
.mobile-menu { background: var(--paper-white); position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 99; padding: var(--sp-32) var(--sp-24); overflow-y: auto; }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; margin: 0 0 var(--sp-32) 0; padding: 0; }
.mobile-menu li { margin-bottom: var(--sp-16); }
.mobile-menu a { display: block; font-size: 1.5rem; font-weight: 700; color: var(--midnight-ink); }

@media (min-width: 768px) {
  .site-header { padding: var(--sp-12) 0; }
  .menu-toggle { display: none; }
  .desktop-nav { display: block; }
  .header-cta { display: inline-flex; }
  .mobile-menu { display: none !important; }
}

/* Hero Section */
.hero { padding: var(--sp-64) 0; }
.hero-content { display: flex; flex-direction: column; gap: var(--sp-40); align-items: center; }
.hero-text { max-width: 800px; text-align: center; }
.hero-text .eyebrow { display: inline-block; background: var(--nordic-mist); color: var(--midnight-ink); padding: 4px 12px; border-radius: 20px; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; margin-bottom: var(--sp-16); }
.hero-actions { display: flex; gap: var(--sp-16); justify-content: center; margin-top: var(--sp-24); }
.hero-image-container { width: 100%; max-width: 1000px; margin: 0 auto; box-shadow: var(--shadow-hover); border-radius: var(--radius-lg); overflow: hidden; background: var(--ice-grey); }

/* Split Index Layout */
.split-index-section { background: var(--deep-nordic); padding: var(--sp-64) 0; color: var(--paper-white); }
.split-index-header { margin-bottom: var(--sp-40); text-align: center; }
.split-index { display: flex; flex-direction: column; gap: var(--sp-24); }
.split-item { display: flex; flex-direction: column; gap: var(--sp-16); background: var(--graphite-blue); border-radius: var(--radius-md); padding: var(--sp-24); }
.split-nav { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: var(--sp-12); cursor: pointer; color: var(--nordic-mist); }
.split-nav-num { color: var(--digital-teal); font-family: monospace; font-size: 1.1rem; }
.split-content { display: flex; flex-direction: column; gap: var(--sp-16); }
.split-content h3 { color: var(--paper-white); font-size: 1.75rem; margin: 0; }
.split-content p { color: var(--ice-grey); font-size: 1rem; }

@media (min-width: 768px) {
  .split-index { display: grid; grid-template-columns: 320px 1fr; gap: var(--sp-40); position: relative; align-items: start; }
  .split-item { display: contents; }
  .split-nav {
    grid-column: 1; padding: var(--sp-24); background: var(--graphite-blue); border-radius: var(--radius-sm);
    transition: all 0.2s ease; margin-bottom: var(--sp-12); color: var(--nordic-mist);
  }
  .split-nav:hover { background: var(--cool-slate); color: var(--paper-white); }
  .split-item.active .split-nav { background: var(--paper-white); color: var(--midnight-ink); }
  .split-content {
    grid-column: 2; grid-row: 1 / 6; opacity: 0; pointer-events: none; visibility: hidden;
    background: var(--paper-white); padding: var(--sp-40); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover); position: absolute; inset: 0; transition: opacity 0.3s ease;
  }
  .split-content h3 { color: var(--midnight-ink); }
  .split-content p { color: var(--graphite-blue); }
  .split-item.active .split-content { opacity: 1; pointer-events: auto; visibility: visible; position: relative; }
}

/* Editorial Content */
.editorial-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-40); }
@media (min-width: 768px) {
  .editorial-grid { grid-template-columns: repeat(2, 1fr); }
}
.editorial-card { background: var(--paper-white); padding: var(--sp-32); border-radius: var(--radius-md); box-shadow: var(--shadow-subtle); }

/* Content Images */
.content-inline-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-24);
  box-shadow: var(--shadow-subtle);
  object-fit: cover;
}
.editorial-card img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-16);
  height: auto;
  object-fit: cover;
}

/* Topic Pages Layout */
.topic-header { text-align: center; max-width: 800px; margin: 0 auto var(--sp-40) auto; }
.topic-lead-img { margin: var(--sp-40) auto; max-width: 1000px; border-radius: var(--radius-lg); box-shadow: var(--shadow-subtle); overflow: hidden; }
.topic-content { max-width: 800px; margin: 0 auto; background: var(--paper-white); padding: var(--sp-40); border-radius: var(--radius-lg); box-shadow: var(--shadow-subtle); }
.topic-content h2 { margin-top: var(--sp-40); color: var(--deep-nordic); }
.topic-content ul { background: var(--soft-snow); padding: var(--sp-24) var(--sp-24) var(--sp-24) var(--sp-40); border-radius: var(--radius-sm); border-left: 4px solid var(--digital-teal); }
.topic-meta { display: flex; gap: var(--sp-16); justify-content: center; font-size: 0.875rem; color: var(--cool-slate); margin-bottom: var(--sp-24); text-transform: uppercase; font-weight: 600; }

/* Contact Form */
.form-group { margin-bottom: var(--sp-24); }
.form-label { display: block; font-weight: 600; margin-bottom: var(--sp-8); color: var(--midnight-ink); }
.form-control { width: 100%; padding: 12px 16px; border: 2px solid var(--nordic-mist); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; transition: border-color 0.2s; background: var(--paper-white); }
.form-control:focus { outline: none; border-color: var(--digital-teal); }
textarea.form-control { resize: vertical; min-height: 150px; }
.form-error { display: none; color: var(--muted-coral); font-size: 0.875rem; margin-top: var(--sp-4); }
.is-invalid .form-control { border-color: var(--muted-coral); }
.is-invalid .form-error { display: block; }
.form-success { display: none; background: var(--arctic-mint); color: var(--deep-nordic); padding: var(--sp-24); border-radius: var(--radius-sm); margin-bottom: var(--sp-24); font-weight: 600; }
.form-success.is-visible { display: block; }

/* Footer */
.site-footer { background: var(--ice-grey); color: var(--graphite-blue); padding: var(--sp-64) 0 var(--sp-24) 0; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-40); margin-bottom: var(--sp-64); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand { display: flex; align-items: center; gap: var(--sp-12); font-size: 1.5rem; font-weight: 700; color: var(--midnight-ink); text-decoration: none; margin-bottom: var(--sp-16); }
.footer-brand svg { width: 32px; height: 32px; fill: var(--digital-teal); }
.footer-brand svg circle, .footer-brand svg rect[width="12"] { fill: var(--paper-white) !important; }
.footer-col h4 { color: var(--midnight-ink); margin-bottom: var(--sp-16); font-size: 1.125rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: var(--sp-12); }
.footer-col a { color: var(--graphite-blue); }
.footer-col a:hover { color: var(--digital-teal); }
.footer-bottom { border-top: 1px solid rgba(23, 35, 43, 0.1); padding-top: var(--sp-24); display: flex; flex-direction: column; gap: var(--sp-16); text-align: center; font-size: 0.875rem; color: var(--cool-slate); }
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-bottom a { color: var(--cool-slate); margin-left: var(--sp-16); }
.footer-bottom a:hover { color: var(--midnight-ink); }

/* Cookie Banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--paper-white); box-shadow: 0 -4px 30px rgba(0,0,0,0.1); padding: var(--sp-24); z-index: 1000; transform: translateY(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; gap: var(--sp-16); }
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-content h3 { margin-bottom: var(--sp-8); }
.cookie-content p { font-size: 0.875rem; margin-bottom: 0; }
.cookie-actions { display: flex; gap: var(--sp-12); flex-wrap: wrap; }
.cookie-prefs { display: none; background: var(--soft-snow); padding: var(--sp-16); border-radius: var(--radius-sm); margin-top: var(--sp-16); }
.cookie-prefs.is-visible { display: block; }
@media (min-width: 768px) {
  .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-content { max-width: 60%; }
}

/* Reduced 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; }
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-24); background: var(--paper-white); box-shadow: var(--shadow-subtle); border-radius: var(--radius-sm); overflow: hidden; }
th, td { padding: var(--sp-16); text-align: left; border-bottom: 1px solid var(--nordic-mist); }
th { background: var(--deep-nordic); color: var(--paper-white); font-weight: 600; }
tr:last-child td { border-bottom: none; }