:root {
  color: #333;
  background: #fff url("images/body-bgrnd.jpg") repeat-x;
  font-family: Calibri, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; --accent: #fff8dc; --active-text: #222; }
body.theme-seminare {
  background: url("images/body-bgrnd-blau.jpg") repeat-x;
  --accent: #35477e;
  --active-text: #fff;
}
body.theme-johanna { background: url("images/body-bgrnd-gruen.jpg") repeat-x; --accent: #d6eac5; }
body.theme-werner { background: url("images/body-bgrnd-orange.jpg") repeat-x; --accent: #ffdfac; }
a { color: inherit; text-underline-offset: .17em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #135ea4; outline-offset: 3px; }
.skip { position: absolute; top: 0; left: 0; padding: .75rem; background: white; transform: translateY(-105%); z-index: 5; }
.skip:focus { transform: none; }

.frame {
  width: min(928px, calc(100% - 24px));
  margin: 25px auto 0;
  padding-top: 2px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 1px 12px #0003;
  border-radius: 5px;
}
.masthead { position: relative; margin: 0 14px; }
.hero { position: relative; aspect-ratio: 896 / 514; background: #ddd; }
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left bottom; }
.identity {
  position: absolute;
  inset: 0;
  background: url("images/head-content.png") center / 100% 100% no-repeat;
}
.tagline {
  position: absolute;
  top: 70.6%;
  left: 3.9%;
  right: 4%;
  margin: 0;
  font-size: clamp(.78rem, 2vw, 1.19rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 2px 2px 4px #999;
  pointer-events: none;
}
nav { position: absolute; z-index: 2; left: 2%; bottom: 3%; right: 1%; }
.menu, .submenu ul { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; gap: 2px; }
.menu > li { position: relative; display: flex; align-items: stretch; }
.menu > li:has(.submenu[open]) { z-index: 3; }
.menu > li > a, .submenu summary {
  display: block;
  background: #ffffffdb;
  padding: .3rem .75rem;
  text-decoration: none;
  font-size: 1.0625rem;
}
.menu [aria-current], .menu > .current-group > a, .menu a:hover, .submenu[open] summary {
  background: var(--accent);
  color: var(--active-text);
}
.submenu summary { cursor: pointer; list-style: none; padding-inline: .34rem; }
.submenu summary::-webkit-details-marker { display: none; }
.submenu ul {
  position: absolute;
  z-index: 2;
  width: max-content;
  max-width: min(26rem, 75vw);
  left: 0;
  top: 100%;
  background: white;
  box-shadow: 0 2px 9px #0005;
}
.submenu a { display: block; padding: .45rem .8rem; text-decoration: none; }

main { padding: 24px clamp(16px, 5.4vw, 50px) 42px; overflow-wrap: anywhere; }
.page-title { margin: 0 0 .9rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.content-block { display: flow-root; margin-bottom: 1rem; }
.content-block h2, .extras h2 { margin: 0 0 .7em; font-size: 1.37rem; line-height: 1.25; }
.content-block p { margin: .35em 0 .65em; }
.content-block blockquote { margin: 1em clamp(.25rem, 3vw, 2rem); }
.content-block table { max-width: 100%; }
.content-block td { padding: var(--cell-padding, .25em); }
.photo { margin: 0 0 1rem; max-width: 100%; }
.photo img { display: block; width: auto; max-width: 100%; height: auto; }
.photo a { display: inline-block; vertical-align: top; }
.photo--left, .photo--right { max-width: min(45%, 28rem); }
.photo--left { float: left; margin-right: 1.25rem; }
.photo--right { float: right; margin-left: 1.25rem; }
.photo--center { text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem; align-items: start; }
audio { display: block; max-width: 100%; width: 22rem; margin: .6rem 0; }
.subpages, .archive ul, .extras ul { padding-inline-start: 1.5em; }
.subpages li, .archive li, .extras li { margin: .3em 0; }
.archive summary { cursor: pointer; font-weight: 700; }
.footer { width: min(905px, calc(100% - 36px)); margin: 20px auto 30px; display: flex; gap: 5px; }
.footer a { display: block; width: 32px; height: 32px; background: url("images/socials.png") no-repeat; }
.footer .twitter { background-position: 0 -50px; }
dialog { border: 0; border-radius: .35rem; padding: .75rem; max-width: min(96vw, 76rem); color: #333; }
dialog::backdrop { background: #000b; }
dialog img { display: block; width: auto; max-width: 100%; max-height: 78vh; object-fit: contain; margin: auto; }
.gallery-controls { display: flex; justify-content: center; gap: .5rem; margin-bottom: .5rem; }
.gallery-controls button { font: inherit; min-width: 44px; min-height: 44px; cursor: pointer; }

@media (max-width: 850px) {
  nav { position: relative; inset: auto; padding: .45rem 0 0; }
  .menu > li > a, .submenu summary { min-height: 44px; display: flex; align-items: center; padding-block: .45rem; background-color: #f5f3ed; }
  .submenu ul { width: min(24rem, calc(100vw - 44px)); }
}
@media (max-width: 560px) {
  .frame { width: calc(100% - 12px); margin-top: 8px; }
  .masthead { margin: 0 5px; }
  .tagline { top: 71%; }
  .menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu > li > a { flex: 1; padding-inline: .55rem; }
  .submenu summary { min-width: 42px; justify-content: center; }
  .menu > li:nth-child(even) .submenu ul { left: auto; right: 0; }
  .photo--left, .photo--right { float: none; max-width: 100%; margin-inline: 0; }
  main { padding-top: 1rem; }
}
@media (min-width: 561px) and (max-width: 850px) {
  .submenu ul { width: max-content; max-width: min(21rem, 44vw); }
}
