/* Haze Analytics, oeffentliche Seiten (Seiten R4). Eine Datei, kein Skript, keine Webfonts, keine externen Adressen.
   Dunkel ist der Standard; hell nur per prefers-color-scheme. Tokens und Kontraste: Design-Spec Seiten R4, Abschnitt 4. */

:root {
  color-scheme: dark light;
  --bg-primary: #0f1114;
  --bg-secondary: #1a1d23;
  --card-bg: #1a1d23;
  --border-default: #2a2f38;
  --text-primary: #e4e6eb;
  --text-secondary: #9ca3af;
  --text-link: #f76c1b;
  --focus-ring: #f76c1b;
  --accent-deco: #f76c1b;
  --font-primary: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 2.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --card-bg: #ffffff;
    --border-default: #d1d5db;
    --text-primary: #1a1d23;
    --text-secondary: #4b5563;
    --text-link: #be500d;
    --focus-ring: #be500d;
    --accent-deco: #f76c1b;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-wrap: break-word;
}

/* Seitenrahmen */
.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 30em) {
  .wrap {
    padding-inline: 1.25rem;
  }
}

@media (min-width: 48em) {
  .wrap {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 64em) {
  .wrap {
    padding-inline: 2rem;
  }
}

/* Links */
a {
  color: var(--text-link);
  text-decoration: underline;
}

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

/* Sprunglink */
.skip-link {
  position: fixed;
  top: 8px;
  left: -9999px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  text-decoration: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Kopf (Unterseiten und 404) */
.site-header {
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--border-default);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-link);
  text-decoration: none;
}

.site-header__brand:hover {
  text-decoration: underline;
}

/* Inhalt */
main {
  flex: 1;
  padding-bottom: var(--space-md);
}

main p,
main ul,
main address,
main h1,
main h2 {
  max-width: 70ch;
}

main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-block: var(--space-xl) var(--space-md);
}

main h1,
main h2 {
  -webkit-hyphens: auto;
  hyphens: auto;
}

@media (max-width: 29.999em) {
  main h1 {
    font-size: 1.5rem;
  }
}

main h2 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
}

main p,
main ul,
main address {
  margin-block: 0 var(--space-md);
}

main ul {
  padding-left: 1.25rem;
}

main li {
  margin-bottom: var(--space-xs);
}

address {
  font-style: normal;
}

.meta {
  color: var(--text-secondary);
}

@media (min-width: 48em) {
  main h1 {
    font-size: 2rem;
  }
}

/* Fusszeile */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--space-2xl);
  padding-block: var(--space-md);
  border-top: 1px solid var(--border-default);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.site-footer nav {
  flex-basis: 100%;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li::before {
  content: "\00B7";
  content: "\00B7" / "";
  color: var(--text-secondary);
  margin-inline: var(--space-sm);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-xs);
  color: var(--text-link);
  text-decoration: underline;
}

.site-footer a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
}

.site-footer__copy {
  margin: 0;
  padding-inline: var(--space-xs);
}

@media (min-width: 30em) {
  .site-footer nav {
    flex-basis: auto;
  }

  .site-footer__copy::before {
    content: "\00B7";
    content: "\00B7" / "";
    color: var(--text-secondary);
    margin-inline-end: var(--space-sm);
  }
}

/* Startseite */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-head {
  padding-block: var(--space-xl) 0;
  border-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.home-head > *,
.home-main > * {
  max-width: 40rem;
}

.wordmark {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-link);
}

.lead {
  margin: var(--space-md) 0 0;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.home-main {
  flex: none;
  padding-bottom: 0;
}

.home-main::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent-deco);
  margin-block: var(--space-xl) var(--space-lg);
}

.home-main .contact {
  margin-top: var(--space-md);
  color: var(--text-secondary);
}

@media (min-width: 30em) {
  .lead {
    font-size: 1.25rem;
  }
}

@media (min-width: 48em) {
  .wordmark {
    font-size: 2.75rem;
  }
}

/* Tabelle: schmal als Kartenliste, ab 48em als Tabelle */
.table-wrap {
  margin-block: var(--space-md);
}

table,
thead,
tbody,
tr,
th,
td {
  display: block;
}

thead {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

tbody tr {
  background: var(--card-bg);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

tbody th {
  margin-bottom: var(--space-sm);
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  color: var(--text-primary);
}

tbody td {
  margin-top: var(--space-sm);
  color: var(--text-primary);
}

tbody td::before {
  content: attr(data-label);
  content: attr(data-label) / "";
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

@media (min-width: 48em) {
  table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    display: table-header-group;
  }

  tbody {
    display: table-row-group;
  }

  tr {
    display: table-row;
  }

  th,
  td {
    display: table-cell;
    padding: var(--space-sm) var(--space-md);
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
    hyphens: auto;
  }

  thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
  }

  thead th:nth-child(1) {
    width: 16%;
  }

  thead th:nth-child(2) {
    width: 36%;
  }

  thead th:nth-child(3) {
    width: 16%;
  }

  thead th:nth-child(4) {
    width: 14%;
  }

  thead th:nth-child(5) {
    width: 18%;
  }

  tbody tr {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
  }

  tbody th {
    margin-bottom: 0;
    font-size: inherit;
    font-weight: 600;
  }

  tbody td {
    margin-top: 0;
  }

  tbody td::before {
    content: none;
  }
}

@media (forced-colors: active) {
  .home-main::before {
    display: none;
  }
}

@media print {
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;
    --border-default: #d1d5db;
    --text-primary: #1a1d23;
    --text-secondary: #1a1d23;
    --text-link: #1a1d23;
  }

  .skip-link {
    display: none;
  }

  table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
  }

  thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    display: table-header-group;
  }

  tbody {
    display: table-row-group;
  }

  tr {
    display: table-row;
    break-inside: avoid;
  }

  th,
  td {
    display: table-cell;
    padding: 0.25rem 0.5rem;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid var(--border-default);
  }

  tbody tr {
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
  }

  tbody th {
    margin-bottom: 0;
    font-size: inherit;
  }

  tbody td {
    margin-top: 0;
  }

  tbody td::before {
    content: none;
  }
}
