:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-elevated: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-fg: #ffffff;
  --shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow-lg: 0 10px 25px rgba(15,23,42,.1), 0 4px 10px rgba(15,23,42,.05);
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-elevated: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --accent-fg: #0f172a;
    --shadow: 0 1px 3px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.4);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 650; margin-top: 2em; }
h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5em; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.5em; }
li { margin-bottom: .35em; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  background: var(--accent); color: var(--accent-fg);
  padding: .5rem 1rem; border-radius: var(--radius-sm); z-index: 100;
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); font-weight: 700; font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--accent-fg);
  font-weight: 700; font-size: .82rem; letter-spacing: -.02em;
}
.primary-nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 4px; align-items: center;
}
.primary-nav a {
  display: inline-block; padding: .55rem .9rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-weight: 500; font-size: .95rem;
}
.primary-nav a:hover { background: var(--bg-alt); color: var(--text); text-decoration: none; }
.primary-nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }

.nav-toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 5px 0; transition: transform .2s, opacity .2s;
  border-radius: 2px;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column; align-items: stretch; padding: 12px;
  }
  .primary-nav a { padding: .9rem 1rem; }
}

/* Hero */
.hero {
  padding: 64px 0 32px;
  text-align: center;
}
.hero h1 { margin-bottom: .3em; }
.hero .lead {
  font-size: 1.2rem; color: var(--text-muted);
  max-width: 640px; margin: 0 auto 2em;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: .95rem;
  cursor: pointer; text-decoration: none;
  transition: all .15s;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-fg); text-decoration: none; }
.btn-secondary {
  background: var(--bg-alt); color: var(--text); border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-elevated); color: var(--text); text-decoration: none; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 2em 0;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Page */
.page { padding: 32px 0 64px; }
.page > .container { max-width: 800px; }
.page h1 { margin-bottom: .5em; }
.page-lead { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2em; }
main { min-height: 60vh; }

.notice {
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5em 0;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 64px;
  font-size: .9rem;
  color: var(--text-muted);
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: center; margin-bottom: 20px;
}
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--text); }
.footer-partners {
  text-align: center; font-size: .82rem; opacity: .8;
  line-height: 1.8;
}
.footer-partners a { color: var(--text-muted); }
.footer-copy {
  text-align: center; font-size: .82rem; margin-top: 16px;
  opacity: .7;
}

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 560px; margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-size: .92rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { padding: 20px; }
.cookie-banner h2 { margin: 0 0 .5em; font-size: 1.05rem; }
.cookie-banner p { margin: 0 0 1em; color: var(--text-muted); font-size: .88rem; }
.cookie-options {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0 0 1em; padding: 12px;
  background: var(--bg-alt); border-radius: var(--radius-sm);
}
.cookie-options label { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.cookie-options small { color: var(--text-muted); }
.cookie-actions {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.cookie-actions .btn { padding: .5rem 1rem; font-size: .88rem; }
@media (max-width: 480px) {
  .cookie-actions { flex-direction: column-reverse; }
  .cookie-actions .btn { width: 100%; }
}
