/* moiree.eu — Design System
   Self-hosted fonts, CSS custom properties, light/dark mode
   Layout: 900px centered with 0.5px borders */

/* ============================================
   FONT FACES — Self-hosted WOFF2 (OFL license)
   ============================================ */

@font-face {
  font-family: 'Playfair Display';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/playfair-display-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/playfair-display-700.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-400.woff2') format('woff2');
}

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
  --bg: #ffffff;
  --bg2: #f8f7f4;
  --text: #1a1a18;
  --text2: #5f5e5a;
  --text3: #757470;
  --border: rgba(0, 0, 0, 0.12);
  --border2: rgba(0, 0, 0, 0.22);

  --primary: #8B6BC4;
  --primary-text: #6B4FA0;
  --primary-light: #F0EAFB;
  --primary-dark: #4A3080;
  --coral-text: #C04A20;
  --teal: #0F6E56;
  --teal-light: #E1F5EE;
  --coral: #D85A30;
  --coral-light: #FCEBEB;
  --purple: #534AB7;
  --purple-light: #EEEDFE;
  --blue: #185FA5;
  --blue-light: #E6F1FB;

  /* Font stacks */
  --font-headline: 'Playfair Display', serif;
  --font-body: 'Source Serif 4', serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-ui: system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width: 1080px;
  --border-width: 0.5px;
  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-badge: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a18;
    --bg2: #222220;
    --text: #f0ede6;
    --text2: #b4b2a9;
    --text3: #999891;
    --border: rgba(255, 255, 255, 0.12);
    --border2: rgba(255, 255, 255, 0.22);
    --primary-text: #B99EE0;
    --primary-light: #1e1535;
    --primary-dark: #D4BCFF;
    --coral-text: #E8734A;
    --teal-light: #0a2e24;
    --coral-light: #2e0f0f;
    --purple-light: #1a1840;
    --blue-light: #0a2844;
  }
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  padding: 0;
}

/* Skip to main content — accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  z-index: 200;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

/* Screen reader only — visually hidden, accessible to assistive tech */
.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;
}

/* ============================================
   LAYOUT — centered, no side borders, generous padding
   ============================================ */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
}

/* ============================================
   NAVIGATION — sticky with dropdown groups
   ============================================ */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 16px 48px;
  border-bottom: var(--border-width) solid var(--border);
  background: var(--bg);
  gap: 12px;
  transition: padding 0.2s ease;
}

nav.scrolled {
  padding: 10px 28px;
}

.logo {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--primary-text);
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.nav-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 9px;
  padding: 3px 7px;
  border-radius: var(--radius-badge);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Dropdown group container */
.nav-group {
  position: relative;
}

/* details/summary nav group — shared */

.nav-group-details summary.nav-group-label {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0;
  transition: color 0.15s;
  list-style: none;
}

.nav-group-details summary.nav-group-label::-webkit-details-marker {
  display: none;
}

.nav-group-details summary.nav-group-label::after {
  content: "";
  display: inline-block;
  border: solid var(--text3);
  border-width: 0 1.5px 1.5px 0;
  padding: 2px;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  transition: transform 0.15s ease;
}

.nav-group:hover .nav-group-label,
.nav-group:focus-within .nav-group-label {
  color: var(--text);
}

.nav-group.active .nav-group-label {
  color: var(--text);
  border-bottom: 2px solid var(--primary);
}

.nav-group:hover .nav-group-label::after,
.nav-group:focus-within .nav-group-label::after {
  transform: rotate(-135deg);
  margin-bottom: -1px;
}

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px 0;
  list-style: none;
  margin: 4px 0 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  transition-delay: 100ms;
  z-index: 101;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.nav-dropdown li a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.nav-dropdown li a:hover,
.nav-dropdown li a:focus-visible {
  background: var(--bg2);
  color: var(--text);
}

/* Hamburger menu — CSS only */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

#nav-toggle {
  display: none;
}

/* Desktop: force details open so CSS hover/focus controls dropdown visibility */
@media (min-width: 601px) {
  .nav-group-details {
    /* Force open attribute via CSS so children are in the DOM */
    /* The open attribute is set by JS on load for desktop */
  }

  .nav-group-details summary.nav-group-label {
    pointer-events: auto;
  }
}

@media (max-width: 600px) {
  nav {
    grid-template-columns: 1fr auto;
    padding: 12px 20px;
    gap: 0;
  }

  nav.scrolled {
    padding: 10px 20px;
  }

  .hamburger {
    display: flex;
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    grid-column: 2;
    grid-row: 1;
    z-index: 2;
  }

  .nav-right {
    display: none;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 16px 0 8px;
    border-top: var(--border-width) solid var(--border);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-group-details summary.nav-group-label {
    font-weight: 600;
    color: var(--text3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0 4px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
  }

  .nav-group-details summary.nav-group-label::-webkit-details-marker {
    display: none;
  }

  .nav-group-details summary.nav-group-label::after {
    content: "";
    border: solid var(--text3);
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
  }

  .nav-group-details[open] summary.nav-group-label::after {
    transform: rotate(45deg);
  }

  .nav-group .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    min-width: auto;
    transition: none;
    transition-delay: 0s;
  }

  .nav-dropdown li a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
  }

  .nav-cta {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    width: 100%;
    text-align: center;
  }

  /* Mobile lang toggle inside menu */
  .nav-links .mobile-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 0 4px;
    border-top: var(--border-width) solid var(--border);
    margin-top: 8px;
  }

  #nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  #nav-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  #nav-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }

  #nav-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  .nav-badge {
    display: none;
  }

}

/* Mobile backdrop overlay */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.nav-backdrop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Hide mobile-only lang toggle on desktop */
.mobile-lang {
  display: none;
}

/* Desktop: summary styled as inline label */
@media (min-width: 601px) {
  .nav-group-details summary.nav-group-label {
    display: inline-flex;
  }
}

/* Nav scroll collapse — desktop only: hide dropdown groups, keep CTA */
@media (min-width: 601px) {
  nav.scrolled .nav-group {
    display: none;
  }

  nav.scrolled .lang-toggle {
    display: none;
  }

  nav.scrolled .nav-links {
    gap: 12px;
  }
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  color: var(--text3);
  font-family: system-ui, -apple-system, sans-serif;
}

.lang-btn.active {
  color: var(--text);
  font-weight: 700;
}

.lang-sep {
  color: var(--text3);
  font-size: 0.85rem;
  user-select: none;
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  border-bottom: none !important;
}

.nav-cta:hover {
  opacity: 0.88;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 64px 48px 52px;
  border-bottom: var(--border-width) solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-visual {
  position: absolute;
  right: 15px;
  top: 27%;
  transform: translateY(-60%);
  z-index: 0;
}

.hero-silhouette {
  width: 222px;
  height: auto;
  opacity: 0.6;
  filter: drop-shadow(0 0 15px rgba(107, 79, 160, 0.2));
  pointer-events: none;
  user-select: none;
}

@media (max-width: 768px) {
  .hero-visual {
    display: none;
  }
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary-text);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-headline);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.12;
  max-width: 700px;
  margin: 0 auto 18px;
}

.hero h1 em {
  color: var(--primary-text);
  font-style: normal;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scroll-triggered entrance animation */
.hero-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: opacity 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: var(--border-width) solid var(--border2);
  padding: 11px 22px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--bg2);
}

/* ============================================
   STATS BAR
   ============================================ */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: var(--border-width) solid var(--border);
}

.stat-cell {
  padding: 22px 24px;
  border-right: var(--border-width) solid var(--border);
}

.stat-cell:last-child {
  border-right: none;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  color: var(--primary-text);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 5px;
  line-height: 1.4;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: 36px 48px;
  border-bottom: var(--border-width) solid var(--border);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

/* ============================================
   CASE CARDS
   ============================================ */

.cases-carousel-wrap {
  position: relative;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.case-card {
  background: var(--bg2);
  border-radius: var(--radius-card);
  padding: 18px;
  border: var(--border-width) solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
}

/* Fixed height slot so content below never shifts */
.cases-grid .case-slot {
  overflow: hidden;
  position: relative;
}

.cases-grid .case-slot .case-card {
  opacity: 1;
  transform: translateX(0);
  height: 100%;
  box-sizing: border-box;
}

.cases-grid .case-slot .case-card.card-animate {
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Make case-text fill remaining space so cards are equal height */
.case-card .case-text {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Overlay arrow buttons on left/right edges */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: var(--bg2);
  border: var(--border-width) solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, border-color 0.15s;
}

.cases-carousel-wrap:hover .carousel-btn {
  opacity: 0.85;
}

.carousel-btn:hover {
  opacity: 1 !important;
  border-color: var(--border2);
}

.carousel-btn--prev { left: -44px; }
.carousel-btn--next { right: -44px; }

.carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--text2);
}

.case-card:hover {
  border-color: var(--border2);
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.case-type {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-badge);
  font-weight: 500;
  display: inline-block;
}

.type-gatekeeping {
  background: rgba(107, 79, 160, 0.12);
  color: #4A3080;
}

.type-paygap {
  background: rgba(8, 80, 65, 0.1);
  color: #085041;
}

.type-tokenism {
  background: rgba(38, 33, 92, 0.1);
  color: #26215C;
}

.type-harassment {
  background: rgba(80, 19, 19, 0.1);
  color: #501313;
}

.type-invisiblelabor {
  background: rgba(12, 68, 124, 0.1);
  color: #0C447C;
}

.type-genderexclusion {
  background: rgba(124, 75, 10, 0.1);
  color: #7C4B0A;
}

@media (prefers-color-scheme: dark) {
  .type-gatekeeping {
    background: rgba(212, 188, 255, 0.1);
    color: #D4BCFF;
  }

  .type-paygap {
    background: rgba(93, 202, 165, 0.1);
    color: #5DCAA5;
  }

  .type-tokenism {
    background: rgba(175, 169, 236, 0.1);
    color: #AFA9EC;
  }

  .type-harassment {
    background: rgba(240, 153, 123, 0.1);
    color: #F0997B;
  }

  .type-invisiblelabor {
    background: rgba(123, 187, 240, 0.1);
    color: #7BBBF0;
  }

  .type-genderexclusion {
    background: rgba(232, 181, 90, 0.1);
    color: #E8B55A;
  }
}

.case-region {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.case-text {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
  font-family: var(--font-body);
  margin-bottom: 12px;
}

.case-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 11px;
  color: var(--text3);
  border: var(--border-width) solid var(--border);
  border-radius: 12px;
  padding: 2px 8px;
}

/* ============================================
   DASHBOARD SECTION
   ============================================ */

.dashboard-section {
  padding: 36px 48px;
  border-bottom: var(--border-width) solid var(--border);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 11px;
  padding: 5px 11px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-badge);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.15s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.filter-select {
  font-size: 12px;
  padding: 5px 11px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-badge);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-ui);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chart-box {
  background: var(--bg2);
  border-radius: var(--radius-card);
  padding: 18px;
  border: var(--border-width) solid var(--border);
}

.chart-title {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Bar chart rows */
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.bar-label {
  font-size: 11px;
  color: var(--text2);
  width: 72px;
  flex-shrink: 0;
  text-align: right;
}

.bar-track {
  flex: 1;
  background: var(--bg);
  border-radius: 2px;
  height: 8px;
  border: var(--border-width) solid var(--border);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-box.in-view .bar-fill {
  transform: scaleX(1);
}

/* Bar rows fade in staggered */
.chart-box .bar-row {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.chart-box.in-view .bar-row {
  opacity: 1;
}

/* Donut segments animate from zero via JS */
.chart-box svg circle {
  transition: stroke-dasharray 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Legend items fade in staggered */
.chart-box .legend-item {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chart-box.in-view .legend-item {
  opacity: 1;
  transform: translateY(0);
}

.bar-pct {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary-text);
  width: 30px;
  flex-shrink: 0;
}

/* Donut chart */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.donut-legend {
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-text {
  font-size: 12px;
  color: var(--text2);
  flex: 1;
}

.legend-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}

/* ============================================
   HOW IT WORKS
   ============================================ */

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.step-card {
  padding: 16px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-card);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary-text);
  margin-bottom: 8px;
}

.step-title {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 8px;
}

.step-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
}

/* ============================================
   SUBMIT SECTION
   ============================================ */

.submit-section {
  padding: 40px 48px;
  background: var(--bg2);
  border-bottom: var(--border-width) solid var(--border);
}

.submit-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.submit-section h3 {
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 10px;
}

.submit-section p {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 22px;
}

.anon-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 16px;
}

.anon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* ============================================
   PARTNERS
   ============================================ */

.partners-row {
  display: flex;
  gap: 12px;
  padding: 20px 48px;
  align-items: center;
  justify-content: center;
  border-bottom: var(--border-width) solid var(--border);
  flex-wrap: wrap;
}

.partner-label {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  white-space: nowrap;
  margin-right: 4px;
}

.partner-tag {
  font-size: 12px;
  padding: 4px 11px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-badge);
  color: var(--text2);
}

/* ============================================
   FOOTER — 4-column grid with bottom bar
   ============================================ */

footer {
  border-top: var(--border-width) solid var(--border);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px 48px 24px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-col {
  min-width: 0;
  text-align: center;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  margin-bottom: 12px;
  font-weight: 600;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  border-top: var(--border-width) solid var(--border);
  max-width: 900px;
  margin: 0 auto;
}

.footer-text {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.doi-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blue);
  border: var(--border-width) solid #B5D4F4;
  border-radius: var(--radius-badge);
  padding: 4px 9px;
  background: var(--blue-light);
}

/* Desktop: force footer columns always open */
@media (min-width: 601px) {
  .footer-collapse summary {
    pointer-events: none;
    list-style: none;
  }

  .footer-collapse summary::after {
    display: none;
  }

  .footer-collapse>.footer-links {
    display: block !important;
  }
}

/* Mobile footer: 2x2 collapsible grid */
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px 20px 16px;
    gap: 24px;
  }

  .footer-collapse summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
  }

  .footer-collapse summary::-webkit-details-marker {
    display: none;
  }

  .footer-collapse summary::after {
    content: "";
    border: solid var(--text3);
    border-width: 0 2px 2px 0;
    padding: 3px;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
  }

  .footer-collapse[open] summary::after {
    transform: rotate(45deg);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    text-align: center;
  }
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  background: var(--bg);
  border-radius: 12px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  border: var(--border-width) solid var(--border);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text3);
  margin-top: -4px;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.cite-block {
  background: var(--bg2);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-badge);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.cite-block button {
  background: none;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-badge);
  padding: 3px 8px;
  font-size: 10px;
  color: var(--text2);
  cursor: pointer;
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: all 0.15s;
}

.cite-block button:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.cite-block button.copied {
  background: var(--teal-light);
  color: var(--teal);
  border-color: var(--teal);
}

/* Beispieldaten disclaimer */
.beispieldaten {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  background: var(--bg2);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-badge);
  padding: 4px 9px;
  display: inline-block;
  margin-top: 12px;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.form-row select {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ui);
}

.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ui);
  resize: vertical;
  margin-bottom: 12px;
  line-height: 1.65;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 32px;
    word-break: break-word;
    hyphens: auto;
  }

  .hero {
    padding: 36px 20px 32px;
  }

  .section {
    padding: 24px 20px;
  }

  .modal {
    padding: 20px;
    margin: 10px;
    max-width: calc(100vw - 20px);
  }

  .btn-primary,
  .btn-outline {
    min-height: 44px;
    padding: 12px 22px;
  }

  .wrap {
    overflow-x: hidden;
  }

  .cite-block {
    flex-wrap: wrap;
    gap: 8px;
  }

  .cite-block button {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 11px;
  }

  .stat-label {
    word-break: break-word;
    hyphens: auto;
  }

  .submission-summary dd {
    word-break: break-word;
  }

  nav {
    padding: 12px 16px;
    gap: 8px;
  }

  nav.scrolled {
    padding: 8px 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    text-align: center;
  }

  .hero-sub {
    font-size: 16px;
  }

  .partners-row {
    padding: 16px 20px;
    gap: 8px;
  }

  .dashboard-section {
    padding: 24px 20px;
  }

  .submit-section {
    padding: 28px 20px;
  }

  .contact-form input,
  .contact-form textarea {
    min-height: 44px;
    padding: 10px 12px;
  }

  .form-nav {
    flex-wrap: wrap;
  }

  .form-nav .btn-primary,
  .form-nav .btn-outline {
    flex: 1;
    min-width: 0;
  }

  .stat-num {
    font-size: 22px;
  }

  .stat-cell {
    padding: 14px 12px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .btn-primary,
  .modal-actions .btn-outline {
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   CONTENT PAGES — shared styles for legal,
   methodology, and about pages
   ============================================ */

/* Page header (for content pages without hero) */
.page-header {
  padding: 40px 48px 28px;
  border-bottom: var(--border-width) solid var(--border);
}

.page-header h1 {
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
  text-align: center;
}

.page-header .page-sub {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.65;
  text-align: center;
}

/* Long-form content sections */
.content-section {
  padding: 32px 48px;
  border-bottom: var(--border-width) solid var(--border);
}

.content-section h2 {
  font-family: var(--font-headline);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 14px;
}

.content-section h3 {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
}

.content-section p {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 14px;
}

.content-section ul,
.content-section ol {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
  padding-left: 20px;
  margin-bottom: 14px;
}

.content-section a {
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-section a:hover {
  opacity: 0.8;
}

/* Collapsible details/summary sections */
details.content-section summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  margin-bottom: 0;
  user-select: none;
  position: relative;
}

details.content-section summary::-webkit-details-marker {
  display: none;
}

details.content-section summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  border: solid var(--text3);
  border-width: 0 2px 2px 0;
  padding: 4px;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

details[open].content-section summary::after {
  transform: rotate(45deg);
}

details[open].content-section summary {
  margin-bottom: 14px;
}

details.content-section summary h2 {
  margin-bottom: 0;
  width: 100%;
  text-align: center;
  padding-right: 24px;
}

details.content-section summary .section-label {
  margin-bottom: 8px;
}

/* Serif override for methodik page — editorial academic content */
.page-methodik .content-section p,
.page-methodik .content-section ul,
.page-methodik .content-section ol {
  font-family: var(--font-body);
}

/* Reference list (hanging indent for academic citations) */
.reference-list {
  list-style: none;
  padding: 0;
}

.reference-list li {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  padding-left: 24px;
  text-indent: -24px;
  margin-bottom: 10px;
}

/* Category definition badge layout */
.type-definition {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg2);
  border-radius: var(--radius-card);
  border: var(--border-width) solid var(--border);
}

.type-definition h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.type-definition p {
  margin-bottom: 0;
}

.type-definition .definition-citation {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* Contact form (ueber-uns) */
.contact-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.contact-form label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-bottom: 4px;
  margin-top: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ui);
}

.contact-form textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-status {
  margin-top: 12px;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-badge);
}

.form-status--success {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.form-status--error {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive for content pages */
@media (max-width: 600px) {
  .page-header {
    padding: 28px 20px 20px;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .content-section {
    padding: 20px 20px;
  }

  .type-definition {
    padding: 18px;
  }
}

/* ============================================
   FILTER BAR — sticky below nav, database page
   ============================================ */

.filter-bar {
  position: sticky;
  top: 48px;
  z-index: 90;
  background: var(--bg);
  border-bottom: var(--border-width) solid var(--border);
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-bar-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 1;
}

.filter-bar select,
.filter-bar input[type="search"] {
  padding: 7px 10px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ui);
  width: 100%;
}

.filter-bar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.result-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

/* Empty state — shown when filters produce zero results */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-state-text {
  font-family: var(--font-headline);
  font-size: 18px;
  color: var(--text2);
  margin-bottom: 8px;
}

.empty-state-hint {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 16px;
}

/* Responsive filter bar */
@media (max-width: 600px) {
  .filter-bar {
    top: 42px;
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar-inner {
    grid-template-columns: 1fr;
  }

  .filter-bar select,
  .filter-bar input[type="search"] {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .filter-bar-actions {
    justify-content: space-between;
  }
}

/* ============================================
   SUBMISSION FORM — einreichen.html
   Multi-step form, content warning, thank-you
   ============================================ */

/* Form step visibility */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* Form progress bar */
.form-progress {
  padding: 20px 48px;
  border-bottom: var(--border-width) solid var(--border);
}

.progress-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
  display: block;
}

.progress-bar {
  height: 4px;
  background: var(--bg2);
  border-radius: 2px;
  overflow: hidden;
  border: var(--border-width) solid var(--border);
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Content warning gate */
.content-warning {
  padding: 36px 48px;
  border-bottom: var(--border-width) solid var(--border);
  text-align: center;
}

.content-warning h2 {
  font-family: var(--font-headline);
  font-size: 22px;
  margin-bottom: 14px;
}

.content-warning p {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 20px;
}

.content-warning .btn-primary {
  margin-top: 24px;
}

/* Crisis resources box */
.crisis-resources {
  background: var(--bg2);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 20px 0;
  text-align: left;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.8;
}

.crisis-resources .crisis-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.crisis-resources a {
  color: var(--teal);
  font-weight: 500;
  text-decoration: none;
}

/* Fieldset (Erfahrungstyp checkbox group) */
.field-group fieldset,
fieldset.field-group {
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-card, 8px);
  padding: 12px 16px 8px;
  margin: 0 0 14px;
}

.field-group fieldset legend,
fieldset.field-group legend {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  padding: 0 6px;
}

/* Two-column row for paired dropdowns */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Field group and validation */
.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.field-group select {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ui);
}

.field-error {
  font-size: 12px;
  color: var(--primary-text);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.field-group select.invalid,
.field-group textarea.invalid {
  border-color: var(--primary);
}

/* Checkbox grid for multi-select fields */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card, 8px);
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}

.checkbox-grid label:hover {
  border-color: var(--primary);
}

.checkbox-grid input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.checkbox-grid input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-grid input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-grid input[type="checkbox"]:checked+span {
  font-weight: 600;
}

.checkbox-grid label.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 600px) {
  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field-hint {
  font-size: 12px;
  color: var(--text3);
  margin: 4px 0 0;
}

/* Character counter */
.char-counter {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
  text-align: right;
}

/* Form navigation */
.form-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 10px;
}

.form-nav .btn-primary,
.form-nav .btn-outline {
  min-width: 120px;
  text-align: center;
}

/* Submission summary */
.submission-summary {
  background: var(--bg2);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.submission-summary dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-top: 10px;
}

.submission-summary dt:first-child {
  margin-top: 0;
}

.submission-summary dd {
  margin-left: 0;
  margin-top: 2px;
}

/* Anonymity notice */
.anonymity-notice {
  background: var(--teal-light);
  border: var(--border-width) solid var(--teal);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.anonymity-notice p {
  margin: 0;
}

/* Consent row */
.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.consent-row input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.consent-row label {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

.consent-row a {
  color: var(--primary-text);
  text-underline-offset: 2px;
}

/* Safe exit button */
.safe-exit {
  position: sticky;
  top: 56px;
  float: right;
  z-index: 80;
  background: var(--bg2);
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  padding: 7px 14px;
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s;
}

.safe-exit:hover {
  background: var(--teal-light);
  color: var(--teal);
  border-color: var(--teal);
}

/* Thank-you screen */
.thank-you {
  padding: 48px 48px;
  text-align: center;
}

.thank-you h2 {
  font-family: var(--font-headline);
  font-size: 28px;
  margin-bottom: 12px;
}

.thank-you p {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.case-id {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--teal);
  background: var(--teal-light);
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-badge);
  margin-bottom: 20px;
}

/* Details element (experience type explanations) */
.form-step details {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

.form-step summary {
  cursor: pointer;
  color: var(--primary-text);
  font-size: 13px;
  margin-bottom: 8px;
}

/* Responsive — submission form */
@media (max-width: 600px) {

  .content-warning,
  .thank-you {
    padding-left: 20px;
    padding-right: 20px;
  }

  .form-progress {
    padding: 16px 20px;
  }

  .safe-exit {
    top: 48px;
    font-size: 11px;
    padding: 10px 14px;
    min-height: 44px;
  }

  .consent-row input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
    margin-top: 2px;
  }

  .consent-row {
    min-height: 44px;
    padding: 10px 0;
  }

  .field-group select {
    min-height: 44px;
    padding: 10px 12px;
  }
}

/* ============================================
   DASHBOARD PAGE
   ============================================ */

.dashboard-filter {
  padding: 20px 48px;
  border-bottom: var(--border-width) solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-filter-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 60px;
}

.dashboard-disclaimer {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  margin: 8px 0;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 48px;
}

.chart-box-wide {
  grid-column: 1 / -1;
}

.dashboard-charts .chart-box {
  min-height: 260px;
  overflow: hidden;
}

/* Plotly charts must respect container */
.dashboard-charts .chart-box .js-plotly-plot,
.dashboard-charts .chart-box .plotly {
  width: 100% !important;
}

.dashboard-charts .chart-box .svg-container {
  width: 100% !important;
}

/* Chart container divs — Plotly needs explicit width to calculate */
.dashboard-charts .chart-box>div[id^="chart-"] {
  width: 100%;
  min-height: 300px;
}

/* Responsive — dashboard page */
@media (max-width: 600px) {
  .dashboard-filter {
    padding: 16px 20px;
  }

  .dashboard-charts {
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }

  .dashboard-charts .chart-box {
    min-height: 200px;
  }

  .filter-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* ============================================
   STUDY ENTRIES — studien.html evidence library
   ============================================ */

.study-entry {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: var(--border-width) solid var(--border);
}

.study-entry:last-child {
  border-bottom: none;
}

.study-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
  min-width: 40px;
  padding-top: 2px;
}

.study-citation {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 6px;
}

.study-relevance {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  margin-bottom: 6px;
}

.study-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary-text);
  text-decoration: none;
}

.study-link:hover {
  text-decoration: underline;
}

.study-cases-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  text-decoration: none;
  margin-left: 12px;
}

/* "Supported by" badge on case cards */
.study-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--teal);
  background: var(--teal-light);
  padding: 2px 8px;
  border-radius: var(--radius-badge);
  text-decoration: none;
  margin-top: 6px;
}

.study-badge-more {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  padding: 2px 6px;
  margin-top: 6px;
}

.studie-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: var(--teal-light);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text1);
}

.studie-filter-clear {
  background: none;
  border: 1px solid var(--teal);
  border-radius: var(--radius-badge);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--teal);
  cursor: pointer;
  white-space: nowrap;
}

.studie-filter-clear:hover {
  background: var(--teal);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .study-badge {
    background: #0a2e24;
    color: #5DCAA5;
  }

  .studie-filter-banner {
    background: #0a2e24;
    border-color: #5DCAA5;
  }

  .studie-filter-clear {
    border-color: #5DCAA5;
    color: #5DCAA5;
  }

  .studie-filter-clear:hover {
    background: #5DCAA5;
    color: #0a2e24;
  }
}

/* ============================================
   NEWSLETTER BANNER
   ============================================ */

/* --- Newsletter Banner --- */
.newsletter-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 60px;
  background: var(--bg2);
  border-top: 0.5px solid var(--border);
  padding: 12px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.newsletter-banner[hidden] {
  display: none;
}

.newsletter-banner-text {
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
}

.newsletter-banner-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: center;
  max-width: 400px;
}

.newsletter-banner-form input[type="email"] {
  flex: 1;
  padding: 6px 10px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  min-width: 0;
}

.newsletter-banner-submit {
  white-space: nowrap;
  font-size: 13px;
  padding: 6px 14px;
}

.newsletter-banner-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.newsletter-banner-close:hover {
  color: var(--text);
}

.newsletter-banner-success {
  color: var(--teal, #5DCAA5);
  font-size: 13px;
}

.newsletter-banner-error {
  color: var(--coral, #F0997B);
  font-size: 13px;
}

@media (max-width: 600px) {
  .newsletter-banner {
    flex-direction: column;
    max-height: none;
    padding: 12px 16px;
    gap: 8px;
    position: relative;
  }

  .newsletter-banner-form {
    width: 100%;
    max-width: none;
  }

  .newsletter-banner-form input[type="email"] {
    min-width: 0;
  }

  .newsletter-banner-close {
    position: absolute;
    top: 8px;
    right: 8px;
  }
}

/* ============================================
   NEWSLETTER SECTION (page-level signup cards)
   ============================================ */

.newsletter-section {
  margin: 32px 0;
}

.newsletter-card {
  background: var(--bg2);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 16px;
  line-height: 1.5;
}

.newsletter-form {
  margin-bottom: 12px;
}

.newsletter-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-input-row input[type="email"] {
  flex: 1;
  padding: 8px 12px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-ui);
  min-width: 0;
}

.newsletter-btn {
  white-space: nowrap;
  font-size: 14px;
  padding: 8px 16px;
}

.newsletter-consent {
  font-size: 12px;
  color: var(--text3);
  margin-top: 12px;
  line-height: 1.5;
}

.newsletter-consent a {
  color: var(--primary);
}

@media (max-width: 600px) {
  .newsletter-input-row {
    flex-direction: column;
  }

  .newsletter-input-row input[type="email"] {
    width: 100%;
  }

  .newsletter-btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ============================================
   PRESS KIT PAGE
   ============================================ */

.press-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.press-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.press-stat-card {
  width: 1200px;
  height: 630px;
  background: linear-gradient(135deg, #1a1a1a 0%, #232328 50%, #1a1a1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: var(--radius-card);
  transform-origin: top center;
  transform: scale(0.4);
  margin-bottom: -378px;
  position: relative;
  overflow: hidden;
  /* compensate for scale: 630 * (1 - 0.4) */
}

.press-download-btn {
  display: inline-block;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 8px 20px;
  border: var(--border-width) solid var(--border2);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background 0.15s;
}

.press-download-btn:hover {
  background: var(--bg2);
}

.press-quote {
  border-left: 3px solid var(--primary);
  padding: 16px 24px;
  margin: 20px 0;
  font-style: italic;
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text2);
  line-height: 1.6;
}

.press-quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 14px;
  color: var(--text3);
}

.press-contact {
  text-align: center;
}

@media (max-width: 600px) {
  .press-cards-grid {
    grid-template-columns: 1fr;
  }

  .press-stat-card {
    transform: scale(0.28);
    margin-bottom: -454px;
    /* 630 * (1 - 0.28) */
  }

  .press-download-btn {
    min-height: 44px;
    padding: 12px 22px;
  }
}

/* ============================================
   ACCESSIBILITY — Focus Styles
   ============================================ */

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

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-color-scheme: dark) {
  :focus-visible {
    outline-color: var(--primary-dark);
  }
}