:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-subtle: #f1f5f9;
  --color-border: #cbd5e1;
  --color-border-dark: #94a3b8;
  --color-text-main: #0f172a;
  --color-text-muted: #334155;
  --color-primary: #1e3a8a;
  --color-primary-hover: #172554;
  --color-accent: #0284c7;
  --color-accent-soft: #e0f2fe;
  --color-focus: #0284c7;
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, p, span, li, dt, dd {
  overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
  color: var(--color-text-main);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(28px, 4vw, 36px); margin-bottom: var(--sp-16); }
h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: var(--sp-16); }
h3 { font-size: 20px; margin-bottom: var(--sp-12); }
h4 { font-size: 16px; margin-bottom: var(--sp-8); }
p { margin-bottom: var(--sp-16); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--color-primary-hover);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: var(--sp-8);
  left: var(--sp-8);
  background: var(--color-text-main);
  color: #ffffff;
  padding: var(--sp-8) var(--sp-16);
  z-index: 1000;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.15s ease;
  font-weight: 600;
}
.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  height: 64px;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}
.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  text-decoration: none;
  color: var(--color-text-main);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-icon {
  width: 24px;
  height: 24px;
  fill: var(--color-primary);
}

.nav-desktop {
  display: none;
}
.header-cta-desktop {
  display: none;
}
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: var(--sp-8);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  cursor: pointer;
}

.nav-mobile-overlay {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--sp-24) var(--sp-16);
  flex-direction: column;
  gap: var(--sp-16);
  z-index: 999;
  overflow-y: auto;
}
.nav-mobile-overlay.is-open {
  display: flex;
}
.nav-mobile-overlay a {
  font-size: 18px;
  padding: var(--sp-12) var(--sp-8);
  color: var(--color-text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--color-surface-subtle);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav-mobile-overlay a:hover {
  background: var(--color-surface-subtle);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--sp-12) var(--sp-24);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
}
.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text-main);
  border-color: var(--color-border-dark);
}
.btn-secondary:hover {
  background-color: var(--color-surface-subtle);
  color: var(--color-text-main);
}
.btn-block {
  width: 100%;
}

main {
  flex: 1 0 auto;
}
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-16);
}
.section {
  padding: var(--sp-64) 0;
}
.section-subtle {
  background-color: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.hero {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--sp-40) 0;
}
.hero-content {
  max-width: 800px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: var(--sp-8);
}
.hero-lead {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-24);
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stat-card-header {
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
  padding: var(--sp-16) var(--sp-24);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-16);
}
.stat-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
}
.stat-card-body {
  padding: var(--sp-24);
  flex: 1 0 auto;
}
.stat-card-body h3 {
  margin-bottom: var(--sp-12);
}
.stat-card-footer {
  padding: var(--sp-16) var(--sp-24);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.manual-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-24);
}
.manual-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--sp-24);
  min-width: 0;
}

ol.step-list {
  padding-left: var(--sp-24);
  margin-bottom: var(--sp-24);
}
ol.step-list li {
  margin-bottom: var(--sp-12);
  padding-left: var(--sp-8);
}
ol.step-list li:last-child {
  margin-bottom: 0;
}
ul.plain-list {
  list-style: square;
  padding-left: var(--sp-24);
  margin-bottom: var(--sp-24);
}
ul.plain-list li {
  margin-bottom: var(--sp-8);
}

.term-definition {
  background: var(--color-surface-subtle);
  border-left: 4px solid var(--color-accent);
  padding: var(--sp-16);
  margin-bottom: var(--sp-24);
}
.term-title {
  font-weight: 700;
  margin-bottom: var(--sp-4);
  display: block;
}

.data-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--sp-24);
  border: 1px solid var(--color-border);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
table.data-table th, table.data-table td {
  padding: var(--sp-12) var(--sp-16);
  border-bottom: 1px solid var(--color-border);
}
table.data-table th {
  background: var(--color-surface-subtle);
  font-weight: 700;
  color: var(--color-text-main);
}
table.data-table tr:last-child td {
  border-bottom: none;
}

.form-group {
  margin-bottom: var(--sp-24);
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-8);
  font-size: 14px;
}
.form-control {
  width: 100%;
  min-height: 48px;
  padding: var(--sp-12) var(--sp-16);
  border: 1px solid var(--color-border-dark);
  font-size: 16px;
  background: var(--color-surface);
  color: var(--color-text-main);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
.form-control.is-invalid {
  border-color: #b91c1c;
}
.form-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: var(--sp-4);
  display: none;
}
.form-error.is-open {
  display: block;
}
.form-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #14532d;
  padding: var(--sp-16);
  margin-bottom: var(--sp-24);
  display: none;
}
.form-success.is-open {
  display: block;
}

.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--sp-40) 0 var(--sp-24) 0;
  margin-top: auto;
  font-size: 14px;
  color: var(--color-text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-40);
  margin-bottom: var(--sp-40);
}
.footer-col h4 {
  color: var(--color-text-main);
  margin-bottom: var(--sp-16);
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: var(--sp-8);
}
.footer-col ul li a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-col ul li a:hover {
  text-decoration: underline;
  color: var(--color-primary);
}
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-24);
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}
.independence-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-top: 2px solid var(--color-primary);
  padding: var(--sp-16);
  z-index: 9999;
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}
.cookie-text {
  font-size: 14px;
  color: var(--color-text-muted);
}
.cookie-text p {
  margin-bottom: 0;
}
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

@media (min-width: 400px) {
  .cookie-actions {
    flex-direction: column;
  }
}

@media (min-width: 480px) {
  .cookie-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cookie-actions .btn {
    flex: 1 1 auto;
  }
}

@media (min-width: 768px) {
  .site-header {
    height: 64px;
  }
  .menu-toggle {
    display: none;
  }
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--sp-16);
  }
  .nav-desktop a {
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: var(--sp-8);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }
  .nav-desktop a:hover {
    color: var(--color-primary);
  }
  .header-cta-desktop {
    display: inline-flex;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .manual-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .cookie-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-actions {
    flex-shrink: 0;
    justify-content: flex-end;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}