:root {
  --bg: #0a0a0a;
  --fg: #e8e4de;
  --accent: #ff3b30;
  --accent-dim: #ff3b3022;
  --muted: #8a857f;
  --card-bg: #141210;
  --card-border: #2a2622;
  --fact-bg: #0d1a0d;
  --fact-border: #1a3a1a;
  --fact-accent: #4ade60;
  --tag-bg: #1c1916;
  --focus-ring: #ff3b30;
}

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

@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;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  border-radius: 0 0 6px 6px;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 0; outline: none; }

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 140%;
  background: radial-gradient(ellipse at 50% 30%, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
  animation: pulse-bg 6s ease-in-out infinite alternate;
}

@keyframes pulse-bg { from { opacity: 0.4; } to { opacity: 1; } }

.neurodiversity-symbol {
  width: 36px;
  height: 18px;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  position: relative;
  animation: fade-in 0.8s ease-out 0.2s both;
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
  position: relative;
  animation: fade-in 0.8s ease-out 0.4s both;
}

.hero h1 .period { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--muted);
  max-width: 500px;
  margin-top: 1.5rem;
  position: relative;
  animation: fade-in 0.8s ease-out 0.7s both;
}

.hero-sub strong { color: var(--fg); font-weight: 500; }

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  animation: fade-in 0.8s ease-out 1.2s both, bob 2.5s ease-in-out infinite 2s;
}

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.myth-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--card-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  backdrop-filter: blur(12px);
  background: rgba(10,10,10,0.92);
}

.myth-nav::-webkit-scrollbar { display: none; }

.myth-nav a {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.myth-nav a:hover,
.myth-nav a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.myth-nav .nav-submit-link {
  margin-left: auto;
  color: var(--muted);
  border-color: transparent;
  opacity: 0.7;
}

.myth-nav .nav-submit-link:hover,
.myth-nav .nav-submit-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  opacity: 1;
}

.myths-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.myth-section {
  margin-bottom: 6rem;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.myth-section.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .myth-section { opacity: 1; transform: none; }
}

.myth-number {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.myth-number::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.myth-claim {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.myth-claim .qm { color: var(--accent); opacity: 0.4; }

.verdict {
  font-family: 'Space Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.fact-card {
  background: var(--fact-bg);
  border: 1px solid var(--fact-border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}

.fact-card p { font-size: 1.05rem; line-height: 1.8; color: var(--fg); }

.fact-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fact-accent);
  margin-bottom: 0.75rem;
  display: block;
}

.sources { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }

.source-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.context-block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-top: 1rem;
}

.context-block p { font-size: 1rem; line-height: 1.8; color: var(--muted); }
.context-block p strong { color: var(--fg); font-weight: 500; }

.myth-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.share-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: none;
  letter-spacing: 0.05em;
}

.share-link:hover, .share-link:focus-visible {
  color: var(--fg);
  border-color: var(--muted);
}

.share-link[data-copied="true"] {
  color: var(--fact-accent);
  border-color: var(--fact-accent);
}

.share-link .icon-link, .share-link .icon-check { width: 14px; height: 14px; flex-shrink: 0; }
.share-link .icon-check { display: none; }
.share-link[data-copied="true"] .icon-link { display: none; }
.share-link[data-copied="true"] .icon-check { display: block; }

.report-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.report-link:hover, .report-link:focus-visible {
  color: #c0392b;
  border-color: #c0392b;
}

html[data-contrast="high"] .report-link:hover,
html[data-contrast="high"] .report-link:focus-visible {
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--card-border);
}

.site-footer p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.site-footer .footer-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.disclaimer { margin-top: 1.5rem; font-size: 0.85rem; color: var(--muted); }

.footer-meta {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-legal {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--fg);
}

.footer-legal span {
  color: var(--card-border);
}

.footer-credit {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-credit a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--card-border);
  transition: border-color 0.15s ease;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* =============================================
   LEGAL PAGES (Impressum / Datenschutz)
   ============================================= */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10,10,10,0.92);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--fg);
  border-color: var(--muted);
}

.legal-site-name {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.legal-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  color: var(--fg);
}

.legal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--card-border);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.legal-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
}

.legal-section p + p {
  margin-top: 0.75rem;
}

.legal-section p strong {
  color: var(--fg);
  font-weight: 500;
}

.legal-section a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--card-border);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.legal-section a:hover,
.legal-section a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.legal-section code {
  font-family: 'Space Mono', monospace;
  font-size: 0.82em;
  background: var(--tag-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--fg);
}

/* API page */
.api-endpoint-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
}

.api-schema {
  overflow-x: auto;
  margin-top: 1rem;
}

.schema-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.schema-table th {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--card-border);
}

.schema-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--muted);
  vertical-align: top;
  line-height: 1.5;
}

.schema-table tr:last-child td { border-bottom: none; }
.schema-table td:first-child { color: var(--fg); }

.api-code {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-top: 1rem;
}

.api-code code {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  background: none;
  padding: 0;
  color: var(--fg);
  line-height: 1.8;
  white-space: pre;
}

.api-ideas {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.api-ideas li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  padding-left: 1.25rem;
  border-left: 2px solid var(--card-border);
}

.api-ideas li strong {
  color: var(--fg);
  font-weight: 500;
}

@media (max-width: 600px) {
  .myths-container { padding: 2.5rem 1rem 4rem; }
  .myth-section { margin-bottom: 4rem; }
  .fact-card, .context-block { padding: 1.25rem; }
  .myth-nav { padding: 0.6rem 1rem; }
}

/* =============================================
   FONT SIZE STEPS
   ============================================= */
html { font-size: 18px; }
html[data-size="lg"] { font-size: 21px; }
html[data-size="xl"] { font-size: 24px; }
html[data-size="sm"] { font-size: 16px; }

/* =============================================
   DYSLEXIA FONT
   ============================================= */
html[data-font="dyslexia"] body {
  font-family: 'Lexend', sans-serif;
  letter-spacing: 0.04em;
  word-spacing: 0.12em;
  line-height: 1.9;
}

html[data-font="dyslexia"] .fact-card p,
html[data-font="dyslexia"] .context-block p {
  font-family: 'Lexend', sans-serif;
  line-height: 1.9;
}

/* =============================================
   HIGH CONTRAST
   ============================================= */
html[data-contrast="high"] {
  --bg: #000000;
  --fg: #ffffff;
  --accent: #ffff00;
  --accent-dim: #ffff0030;
  --muted: #dddddd;
  --card-bg: #111111;
  --card-border: #666666;
  --fact-bg: #001800;
  --fact-border: #00cc00;
  --fact-accent: #00ff00;
  --tag-bg: #222222;
  --focus-ring: #ffff00;
}

html[data-contrast="high"] .myth-nav {
  background: rgba(0,0,0,0.98);
}

html[data-contrast="high"] ::selection {
  background: #ffff00;
  color: #000000;
}

/* =============================================
   SKIP LINKS
   ============================================= */
.skip-link + .skip-link {
  left: calc(1rem + 220px);
}

/* =============================================
   ACCESSIBILITY TRIGGER BUTTON
   ============================================= */
.a11y-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  color: var(--fg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.a11y-trigger:hover,
.a11y-trigger:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.a11y-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

@media (max-width: 600px) {
  .a11y-trigger-label { display: none; }
  .a11y-trigger { padding: 0.7rem; }
}

/* =============================================
   ACCESSIBILITY PANEL
   ============================================= */
.a11y-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0,0,0,0.5);
}

.a11y-panel {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 220;
  width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.a11y-panel:not([hidden]) {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.a11y-panel[hidden] {
  display: block !important; /* override hidden for animation */
  pointer-events: none;
}

.a11y-panel-inner {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a11y-panel-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.a11y-close {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.35rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.a11y-close:hover,
.a11y-close:focus-visible {
  color: var(--fg);
  border-color: var(--muted);
}

.a11y-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.a11y-group-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.a11y-option-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--tag-bg);
  color: var(--fg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.a11y-option-btn:hover,
.a11y-option-btn:focus-visible {
  border-color: var(--muted);
  color: var(--fg);
}

.a11y-option-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.a11y-size-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.a11y-size-btn {
  background: var(--tag-bg);
  color: var(--fg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.a11y-size-btn:hover,
.a11y-size-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.a11y-size-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.a11y-size-display {
  flex: 1;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--fg);
  letter-spacing: 0.05em;
}

.a11y-reset-btn {
  background: none;
  color: var(--muted);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.55rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.a11y-reset-btn:hover,
.a11y-reset-btn:focus-visible {
  color: var(--fg);
  border-color: var(--muted);
}

@media (max-width: 600px) {
  .a11y-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 4.5rem;
  }
}
