:root {
  --tsv-green: #006b50;
  --tsv-green-dark: #064b3b;
  --tsv-red: #e2001a;
  --tsv-ink: #20342d;
  --tsv-accent: #00a77f;
  --tsv-border: #d6e5df;
  --tsv-muted: #52665d;
  --tsv-surface: #f4f8f6;
  --tsv-surface-hover: #e0eee7;
  --tsv-tint: #eef7f2;
}

body {
  background: #f1f5f3;
  color: var(--tsv-ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
}

.email-link-icon,
.pdf-link-icon,
.external-link-icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
}

.link-icon-space {
  display: inline-block;
  text-decoration: none;
}

.email-link-icon svg,
.pdf-link-icon svg,
.external-link-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.phone-number-mobile {
  display: none;
}

@media (max-width: 767px) {
  .phone-number-desktop {
    display: none;
  }

  .phone-number-mobile {
    display: inline;
  }
}

.site-shell {
  display: flex;
  flex-direction: column;
  max-width: 1150px;
  margin-inline: auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 40px rgb(22 57 44 / 8%);
}

.site-header {
  position: relative;
  z-index: 10;
  background: #fff;
}

.site-brand {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.site-brand img {
  display: block;
  width: 100%;
  min-width: 1024px;
  max-width: 1105px;
  height: auto;
}

.club-navigation {
  position: relative;
  border-top: 1px solid rgb(255 255 255 / 65%);
  background:
    linear-gradient(110deg, rgb(0 167 127 / 40%), rgb(0 167 127 / 20%) 70%, rgb(226 0 26 / 22%)),
    rgb(255 255 255 / 45%);
  backdrop-filter: blur(3px);
}

.site-navigation {
  position: relative;
  z-index: 11;
  margin-top: -3.55rem;
}

.club-navigation > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: .25rem;
  margin: 0;
  padding: .5rem .75rem;
  list-style: none;
}

.club-navigation a,
.site-support-action {
  display: block;
  padding: .5rem .75rem;
  border-radius: .375rem;
  color: var(--tsv-ink);
  background: transparent;
  font-size: .9rem;
  text-decoration: none;
}

.club-navigation a,
.site-support-action {
  font-weight: 500;
}

.club-navigation a:hover,
.club-navigation a:focus-visible,
.site-support-action:hover,
.site-support-action:focus-visible {
  color: var(--tsv-ink);
  background: rgb(0 167 127 / 14%);
}

.club-navigation a {
  position: relative;
}

.club-navigation a[aria-current="page"],
.site-support-action[aria-current="page"] {
  color: var(--tsv-green-dark);
  background: rgb(255 255 255 / 78%);
  font-weight: 600;
}

.club-navigation a[aria-current="page"]::after,
.site-support-action[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto .75rem .2rem;
  height: 3px;
  border-radius: 2px;
  background: var(--tsv-red);
}

.site-support-action[aria-current="page"]::after {
  bottom: 0;
}

.department-context {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-top: 1px solid rgb(255 255 255 / 65%);
  background:
    linear-gradient(110deg, rgb(0 167 127 / 40%), rgb(0 167 127 / 20%) 70%, rgb(226 0 26 / 22%)),
    rgb(255 255 255 / 45%);
  backdrop-filter: blur(3px);
}

.department-context-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  padding: .6rem;
}

.department-home-link {
  position: fixed;
  top: .75rem;
  right: max(1rem, calc((100vw - 1150px) / 2 + 1rem));
  z-index: 1032;
  padding: .35rem .65rem;
  border-radius: .375rem;
  color: var(--tsv-green-dark);
  background: rgb(255 255 255 / 78%);
  font-size: .9rem;
  font-weight: 600;
  text-underline-offset: .2em;
}

.department-home-link.is-sticky {
  top: var(--department-home-link-sticky-top);
}

.department-home-link:hover,
.department-home-link:focus-visible {
  color: var(--tsv-green-dark);
  background: #fff;
}

.department-welcome {
  color: var(--tsv-green-dark);
  font-weight: 600;
}

.department-context .department-menu {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: .5rem 1rem .5rem .75rem;
  border-top: 1px solid rgb(255 255 255 / 65%);
  border-bottom: 1px solid rgb(0 167 127 / 22%);
  border-left: 0;
  background:
    linear-gradient(120deg, rgb(0 167 127 / 10%), transparent 70%, rgb(226 0 26 / 5%)),
    rgb(255 255 255 / 94%);
}

.department-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .5rem;
  padding: .5rem 1rem .5rem .75rem;
  border-bottom: 1px solid rgb(0 167 127 / 22%);
  background:
    linear-gradient(110deg, rgb(0 167 127 / 10%), rgb(0 167 127 / 3%) 70%, rgb(226 0 26 / 4%)),
    rgb(255 255 255 / 94%);
}

.department-navigation-summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .85rem;
  border: 1px solid rgb(0 107 80 / 28%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(6 75 59 / 10%);
  color: var(--tsv-green-dark);
  font-size: .9rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.department-navigation-summary:hover {
  border-color: var(--tsv-green);
  background: #e8f4ee;
}

.site-support-action {
  position: absolute;
  top: .5rem;
  right: .75rem;
  display: none;
  justify-content: flex-end;
  align-items: center;
  width: 8rem;
  min-height: 2.5rem;
  padding: .35rem .5rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-support-action:focus-visible {
  outline: 2px solid var(--tsv-green-dark);
  outline-offset: 2px;
}

.department-navigation-grid-icon {
  flex: 0 0 auto;
}

.club-navigation a:focus-visible,
.department-navigation a:focus-visible,
.department-home-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Small screens: keep the department home link in the page header. */
@media (max-width: 767.98px) {
  .department-home-link {
    position: absolute;
  }
}

main.container-fluid {
  flex: 1;
  max-width: 1320px;
}

.legal-footer {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem 1.5rem;
  border-top: 2px solid var(--tsv-green-dark);
  background: #f4f9f7;
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.legal-footer a {
  color: var(--tsv-green-dark);
  font-size: .9rem;
}

.legal-footer a:hover,
.legal-footer a:focus-visible,
.legal-footer a[aria-current="page"] {
  color: #a80014;
  text-decoration: underline;
  text-underline-offset: .2em;
}

/* Pin navigation and footer only when the viewport has enough vertical space. */
@media (min-width: 768px) and (min-height: 800px) {
  .site-navigation {
    position: sticky;
    top: 0;
    z-index: 1031;
  }

  .legal-footer {
    position: sticky;
    bottom: 0;
    z-index: 1030;
  }
}

@media (min-width: 768px) {
  .legal-footer {
    display: flex;
    align-items: center;
    height: 2rem;
    padding-block: 0;
  }
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e3ebe7;
}

.page-header h1 {
  margin: 0;
  color: var(--tsv-green-dark);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.department-page .page-header h1 {
  font-size: clamp(1.4rem, 2.3vw, 2.125rem);
}

.article-body {
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
}

.article-body:has(.department-offers--groups, .department-offers--weekly) {
  overflow: visible;
}

.article-body img {
  max-width: 100%;
  height: auto;
}

.privacy-policy {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.senior-group-photos {
  font-size: 10pt;
  line-height: normal;
}

.senior-group-photos img {
  box-sizing: content-box;
  max-width: calc(100% - 12px);
  padding: 6px;
  vertical-align: baseline;
}

.article-media {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.article-media__images {
  display: grid;
  gap: 8px;
}

.article-media__images img {
  display: block;
  width: 100%;
}

.article-media__text > :first-child {
  margin-top: 0;
}

/* Narrow screens: stack article media vertically. */
@media (max-width: 600px) {
  .article-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-media__images {
    max-width: 200px;
  }
}

.item-page > .article-body > :is(h2, h3, h4, h5, h6) {
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.item-page > .article-body > :is(h2, h3, h4, h5, h6):first-child {
  margin-top: 0;
}

.item-page > .article-body > :is(h2, h3, h4) {
  color: var(--tsv-green-dark);
  font-weight: 700;
  line-height: 1.3;
}

.item-page > .article-body > h2 {
  padding-left: .75rem;
  border-left: 4px solid var(--tsv-red);
  font-size: 1.5rem;
}

.item-page > .article-body > h3 {
  font-size: 1.2rem;
}

.item-page > .article-body > h4 {
  font-size: 1.05rem;
}

.article-body {
  line-height: 1.65;
}

.article-body > :is(p, ul, ol) {
  max-width: 100%;
}

.article-body > :is(ul, ol) {
  padding-left: 1.4rem;
}

.article-body li::marker {
  color: var(--tsv-green);
}

.article-body table {
  max-width: 100%;
}

.content-card a {
  color: var(--tsv-green);
  text-underline-offset: .18em;
}

.content-card a:hover {
  color: var(--tsv-red);
}

.table-grid {
  overflow-x: auto;
}

.table-grid table {
  border: 1px solid #b9b9b5;
  border-collapse: collapse;
}

.table-grid td,
.table-grid th {
  border: 1px solid #b9b9b5;
  padding: .4rem;
}

.department-offers {
  width: 100%;
  margin: 1.5em 0;
  overflow: hidden;
  overflow-wrap: normal;
  border: 1px solid #d6e5df;
  border-radius: .5rem;
  box-shadow: 0 3px 12px rgb(0 70 50 / 6%);
}

.department-offers:focus-visible,
.department-offers a:focus-visible {
  outline: 2px solid var(--tsv-green);
  outline-offset: 3px;
}

.department-offers table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.department-offers th,
.department-offers td {
  padding: .75rem 1rem;
  text-align: left;
  vertical-align: top;
}

.department-offers th {
  color: #fff;
  background: var(--tsv-green);
}

.department-offers th:nth-child(1) {
  width: 28%;
}

.department-offers th:nth-child(2) {
  width: 27%;
}

.department-offers th:nth-child(3) {
  width: 45%;
}

.department-offers--groups table,
.department-offers--weekly table {
  min-width: 0;
  table-layout: auto;
}

.department-offers--weekly table {
  table-layout: fixed;
}

.department-offers--groups th:nth-child(n) {
  width: auto;
}

.department-offers--tu1 table {
  table-layout: fixed;
}

.department-offers--groups,
.department-offers--weekly {
  overflow: clip;
}

.department-offers--groups th,
.department-offers--weekly th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.department-offers--tu1 th:nth-child(1) {
  width: 34%;
}

.department-offers--tu1 th:nth-child(2) {
  width: 36%;
}

.department-offers--tu1 th:nth-child(3) {
  width: 30%;
}

/* Medium screens and up: offset sticky offer-table headings below navigation. */
@media (min-width: 768px) and (min-height: 800px) {
  .department-offers--groups th,
  .department-offers--weekly th {
    top: calc(var(--department-sticky-navigation-height, 6.5rem) + .25rem);
  }
}

.department-offers--weekly th:nth-child(n) {
  width: 20%;
}

.department-offers--groups :is(th, td),
.department-offers--weekly :is(th, td) {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.department-offers--hall-numbers th {
  overflow-wrap: normal;
}

/* Narrow screens: tighten offer-table spacing and typography. */
@media (max-width: 600px) {
  .department-offers.department-offers--groups :is(th, td),
  .department-offers.department-offers--weekly :is(th, td) {
    padding: .5rem .3125rem;
    font-size: .75rem;
  }
}

.department-offers td {
  border-bottom: 1px solid #e1ebe6;
}

.department-offers td:first-child {
  font-weight: bold;
}

.department-offers--weekly td:first-child {
  font-weight: normal;
}

.department-offers--groups th + th,
.department-offers--weekly th + th {
  border-left: 1px solid rgb(255 255 255 / 25%);
}

.department-offers--groups td + td,
.department-offers--weekly td + td {
  border-left: 1px solid #e1ebe6;
}

.department-offers tbody tr:nth-child(even) {
  background: #f4f9f7;
}

.department-offers tbody tr:hover,
.department-offers tbody tr:focus-within {
  background: #e8f4ee;
}

.department-offers tbody tr:last-child td {
  border-bottom: 0;
}

.department-menu {
  display: flex;
  flex: 1 1 24rem;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  margin-left: .5rem;
  padding-left: 1rem;
  border-left: 1px solid rgb(0 107 80 / 25%);
  font-size: .9rem;
}

.page-header + .department-menu {
  margin: -0.5rem 0 1.5rem;
  padding: 0;
  border-left: 0;
}

.department-menu[data-menu-variant="overview"] {
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  gap: .5rem 1rem;
  margin: 0 0 var(--content-section-gap);
  padding: .85rem 1rem;
  border: 1px solid rgb(0 107 80 / 24%);
  border-left: 4px solid var(--tsv-green);
  border-radius: .5rem;
  background:
    linear-gradient(110deg, rgb(0 167 127 / 10%), rgb(226 0 26 / 4%)),
    #fff;
}

.department-menu-contact-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .75rem;
  padding: .4rem .75rem;
  border-radius: .375rem;
  color: var(--tsv-green-dark);
  font-size: .9rem;
  font-weight: 700;
  background: rgb(0 167 127 / 10%);
  text-underline-offset: .15em;
}

.department-menu-contact-link[hidden] {
  display: none;
}

.department-menu-contact-link::after {
  content: "↓";
  text-decoration: none;
}

.department-menu-contact-link:hover,
.department-menu-contact-link:focus-visible {
  color: var(--tsv-green-dark);
  background: rgb(0 167 127 / 18%);
}

.department-menu-label {
  flex: 0 0 auto;
  color: var(--tsv-green-dark);
  font-size: .85rem;
  font-weight: 700;
}

.department-menu[data-menu-variant="overview"] ul {
  gap: .35rem;
}

.department-menu[data-menu-variant="overview"] a {
  border: 1px solid rgb(0 107 80 / 20%);
  background: rgb(255 255 255 / 85%);
}

.department-menu[data-menu-variant="overview"] a:hover,
.department-menu[data-menu-variant="overview"] a:focus-visible {
  border-color: var(--tsv-green);
  background: rgb(0 167 127 / 12%);
}

.department-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: .125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.department-menu a {
  position: relative;
  display: block;
  padding: .4rem .8rem;
  border-radius: .375rem;
  color: var(--tsv-ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s;
}

.department-menu a:hover,
.department-menu a:focus-visible {
  color: var(--tsv-green-dark);
  background: rgb(0 167 127 / 12%);
}

.department-menu a[aria-current="page"] {
  color: var(--tsv-green-dark);
  font-weight: 700;
}

.department-menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto .8rem .1rem;
  height: 3px;
  border-radius: 2px;
  background: var(--tsv-red);
}

/* Small screens: let department menus use the full navigation width. */
@media (max-width: 767.98px) {
  .department-menu {
    flex-basis: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

.blog h2 {
  color: var(--tsv-green-dark);
}

.blog > div {
  padding-block: 1rem;
  border-bottom: 1px dashed #d8e2dc;
}

.blog div > h2 {
  font-size: 1.25rem;
}

.blog .page-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

/* Extra-small screens: reduce offer-table cell padding. */
@media (max-width: 575.98px) {
  .department-offers th,
  .department-offers td {
    padding: .625rem .75rem;
  }
}

@media (width < 680px),
  (width < 899px) and (height > 500px),
  (width < 899px) and (orientation: portrait) {
  body:not(.no-navigation-page) .site-brand {
    height: 168px;
  }

  .club-navigation > ul {
    gap: .125rem;
  }

  .club-navigation a {
    display: flex;
    align-items: center;
    min-height: 2.5rem;
    padding: .35rem .5rem;
  }

  .club-navigation a[aria-current="page"]::after {
    inset-inline: .5rem;
  }
}

@media (width < 680px) {
  .site-support-action {
    display: inline-flex;
  }

  .club-navigation li:has(> a[href^="/spendenkonto.html"]) {
    display: none;
  }

  .site-navigation:not(.has-club-support):has(> .department-compact > .site-support-action) .club-navigation > ul {
    justify-content: space-between;
  }

  .site-navigation.has-club-support .club-navigation li:has(> a[href^="/spendenkonto.html"]) {
    display: block;
  }

  .site-navigation.has-club-support .site-support-action {
    display: none;
  }
}

.department-compact {
  position: relative;
  display: block;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--tsv-border);
  background: var(--tsv-surface);
}

.department-popup-toggle,
.department-popup-trigger,
.department-popup-close {
  display: none;
}

@media (width < 680px) {
  .department-popup-toggle.visually-hidden {
    display: block;
  }

  .department-popup-trigger {
    display: inline-flex;
    margin: 0;
  }

  .department-popup-toggle:focus-visible + .department-popup-trigger {
    outline: 2px solid var(--tsv-green-dark);
    outline-offset: 2px;
  }

  .department-popup {
    position: absolute;
    z-index: 1020;
    top: .5rem;
    left: .75rem;
    display: none;
    width: min(366px, calc(100vw - 1.5rem));
    max-height: min(80vh, 30rem);
    overflow-y: auto;
    padding: .75rem;
    border: 1px solid var(--tsv-border);
    border-radius: .75rem;
    background: var(--tsv-surface);
    box-shadow: 0 12px 32px rgb(6 75 59 / 18%);
  }

  .department-popup-toggle:checked ~ .department-popup {
    display: block;
  }

  .department-popup-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    border: 1px solid var(--tsv-border);
    border-radius: .3rem;
    color: var(--tsv-green-dark);
    background: var(--tsv-surface);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
  }

  .department-popup .department-compact-heading {
    flex-wrap: wrap;
    min-height: 2rem;
    margin-bottom: .5rem;
    padding-right: 2.5rem;
    font-size: 1rem;
  }

  .department-popup:has(.department-compact-submenu[open]) .department-compact-heading {
    min-height: 2rem;
    padding-right: 7rem;
  }

  .department-popup .department-compact-list,
  .department-popup .department-compact-panel > .turn-departments--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
  }

  .department-popup .department-compact-item > .department-navigation-link,
  .department-popup .department-compact-submenu:not([open]) > summary,
  .department-popup .department-compact-panel a.department-navigation-link {
    min-height: 4.5rem;
    height: 100%;
    aspect-ratio: auto;
    gap: .25rem;
    padding: .5rem 0;
  }

  .department-popup .department-navigation-icon {
    height: 36px;
  }

  .department-popup .department-navigation-icon img {
    max-width: 100%;
    max-height: 36px;
  }

  .department-popup .department-navigation-link small,
  .department-popup .turn-departments--compact a.department-navigation-link small {
    font-size: clamp(.55rem, 3vw, .72rem);
    line-height: 1.3;
  }

  .department-popup .turn-departments--compact .turn-departments-icon {
    width: 36px;
    height: 36px;
    background-size: auto;
  }

  .department-popup .department-compact-submenu[open] summary {
    top: .75rem;
    right: 3.25rem;
  }
}

.department-navigation-summary-link,
.department-navigation:not(:has(.department-menu)),
.department-navigation-current {
  display: none;
}

.department-compact-heading {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 1.75rem;
  margin-bottom: 0;
  padding: 0;
  color: var(--tsv-green-dark);
  font-weight: 600;
  font-size: .85rem;
}

.department-compact-context {
  display: none;
}

.department-compact:has(.department-compact-submenu[open]) .department-compact-context {
  display: inline;
}

.department-compact:has(.department-compact-submenu[open]) .department-compact-heading {
  min-height: 2.25rem;
}

.department-compact-context a {
  color: inherit;
}

.department-compact-item {
  display: grid;
  min-width: 0;
}

.department-compact-submenu,
.department-compact-item > .department-navigation-link {
  min-width: 0;
}

.department-compact-submenu summary {
  cursor: pointer;
  list-style: none;
}

.department-compact-submenu .department-navigation-icon {
  position: relative;
}

.department-compact-submenu summary::-webkit-details-marker {
  display: none;
}

@media (hover: none) {
  .department-compact-submenu:not([open]) summary:not(.is-current):not(:focus-visible):hover {
    border-color: var(--tsv-border);
    background: var(--department-tile-background);
  }

  .department-compact-submenu:not([open]) summary:not(.is-current):not(:focus-visible):hover .department-navigation-icon img:not(.department-navigation-icon-hover) {
    visibility: visible;
  }

  .department-compact-submenu:not([open]) summary:not(.is-current):not(:focus-visible):hover .department-navigation-icon-hover {
    visibility: hidden;
  }
}

.department-compact-back {
  display: none;
}

.department-compact-list:has(.department-compact-submenu[open]) > .department-compact-item:not(:has(.department-compact-submenu[open])) {
  display: none;
}

.department-compact-item:has(.department-compact-submenu[open]) {
  grid-column: 1 / -1;
}

.department-compact-submenu[open] summary {
  position: absolute;
  z-index: 3;
  top: .75rem;
  right: .3rem;
  justify-content: center;
  min-height: 2rem;
  padding: .125rem .5rem;
  border: 1px solid var(--tsv-border);
  border-radius: .3rem;
  background: var(--tsv-surface);
  font-size: .8rem;
  line-height: 1.2;
  text-align: center;
}

.department-compact-submenu[open] summary .department-navigation-icon,
.department-compact-submenu[open] summary small,
.department-compact-submenu[open] .department-compact-expand {
  display: none;
}

.department-compact-submenu[open] .department-compact-back {
  display: inline;
}

.department-compact-panel {
  background: var(--tsv-surface);
}
