/* Bauer Verlag website.
   Targets: WCAG 2.2 AA and "Information for all" (Inclusion Europe).
   One font: Arial. Running text in one size; headings larger and bold.
   No italics, capitals, justified text, hyphenation, columns or animation. */

/* One high-contrast theme for everybody: black and white, yellow frames around the boxes.
   Straight edges, no shadows. Contrast on black (checked): text, headings, lines, links and focus 21:1 |
   yellow frames 14.7:1 | visited links (light grey) 11.5:1 | buttons: black on white 21:1.
   Links are always underlined. */
:root {
  --bg: #000000; --text: #ffffff; --link: #ffffff; --visited: #c0c0c0;
  --button: #ffffff; --frame: #ffd400; --tab: #262626; --focus: #ffffff;
  --nav-height: 3.6rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Phones: 118.75% is 19 px in a default browser, the same size as Arial 14 point or larger. */
html { font-size: 118.75%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Larger screens: bigger text, 30 px in a default browser (187.5%) */
@media (min-width: 48rem) { html { font-size: 187.5%; } }

body {
  margin: 0 auto; max-width: 60rem; padding: 0 clamp(1rem, 4vw, 2rem);
  background: var(--bg); color: var(--text);
  font-family: Arial, Helvetica, sans-serif; font-size: 1rem; line-height: 1.55;
  text-align: left; hyphens: manual; overflow-wrap: break-word;
}
h1, h2, h3, h4, button, input { font: inherit; }
h1, h2, h3, h4 { font-weight: 700; margin: 0; line-height: 1.15; }
em, i, cite { font-style: normal; }
p { margin: 0 0 1em; max-width: 34em; }
ul { margin: 0 0 1em; padding-left: 1.25em; max-width: 34em; }
li { margin-bottom: 0.35em; }
img { display: block; max-width: 100%; height: auto; }

/* Links: underlined, white before the first visit and pink after it */
a { color: var(--link); text-underline-offset: 0.18em; }
a:visited { color: var(--visited); }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus, [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: 0.5rem; z-index: 40; padding: 0.6rem 1rem;
  background: var(--bg); color: var(--link); border: 3px solid var(--focus); transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* Tabs: switch between Bauer Verlag and Program – 23 */
.site-switch { padding-top: 1rem; }
.site-switch ul {
  display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; max-width: none;
  border-bottom: 3px solid var(--text);
}
.site-switch li { margin: 0 0 -3px; }
.site-switch a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.3rem 0.9rem;
  color: var(--text); text-decoration: none; background: var(--tab);
  border: 3px solid var(--text);
}
.site-switch a:hover { text-decoration: underline; }
/* The current tab is open at the bottom: no bottom line (a black line would meet the side lines at a slant),
   the side lines run straight down to the line under the tabs, giving square corners */
.site-switch a[aria-current] { font-weight: 700; background: var(--bg); border-bottom: 0; padding-bottom: calc(0.3rem + 3px); }
.site-switch a[aria-current]:hover { text-decoration: none; }

/* ---------- Menu (like the tab bar of cortege.neru.tv) ----------
   Always fixed at the bottom of the screen. The current page is marked by a bar, bold text and pink colour.
   Phones: symbols only, in one line (the words stay for screen readers). Larger screens: symbol and word. */
.site-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--bg); border-top: 3px solid var(--text); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.site-nav ul { display: flex; flex-wrap: nowrap; justify-content: center; list-style: none; margin: 0 auto; padding: 0; max-width: none; }
.site-nav li { flex: 1 1 0; margin: 0; }
.site-nav a, .site-nav button {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%;
  min-height: 3rem; padding: 0.25rem 0; text-align: center; cursor: pointer;
  color: var(--text); background: none; text-decoration: none;
  border: 0; border-top: 3px solid transparent; border-radius: 0;
}
.site-nav a:hover .label, .site-nav button:hover .label { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 700; border-top-color: var(--text); }
.site-nav .emoji { font-size: 1.5rem; line-height: 1; }
/* Flowers switched off: the flower is crossed out (shape, not only colour) */
.site-nav .is-off .emoji { position: relative; opacity: 0.6; }
.site-nav .is-off .emoji::after {
  content: ""; position: absolute; left: -0.1em; right: -0.1em; top: 50%; border-top: 0.12em solid var(--text); transform: rotate(-45deg);
}
body { padding-bottom: var(--nav-height); }
html { scroll-padding-bottom: var(--nav-height); }

/* Symbols only, unless the screen is wide enough for all words in one line (from 1344 px) */
@media (max-width: 83.99rem) {
  .site-nav .label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
@media (min-width: 48rem) {
  .site-nav a, .site-nav button { min-height: 2.5rem; padding: 0.15rem 0.5rem; }
  .site-nav .emoji { font-size: 1.35rem; }
}
@media (min-width: 84rem) {
  .site-nav li { flex: 0 1 auto; }
  .site-nav .label { font-size: 0.9rem; white-space: nowrap; }
  /* Every word keeps the width it has in bold, so the menu does not move when another page is chosen.
     Only here, where the words are shown: on phones and smaller screens the menu has symbols only. */
  .site-nav .label[data-text] { display: inline-flex; flex-direction: column; align-items: center; }
  .site-nav .label[data-text]::after { content: attr(data-text); font-weight: 700; height: 0; overflow: hidden; visibility: hidden; }
  .site-nav a, .site-nav button { gap: 0.3rem; }
}

/* ---------- Buttons ----------
   White with bold black text. Hover: the text is underlined.
   Open (descriptions, older publications): black with a white frame, and the opened text shows below. */
.pager, .jump ul { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; margin: 0; padding: 0; max-width: none; }
.pager li, .jump li { margin: 0; }
.button, .jump a, .search button, .search-dialog__head button,
details.older > summary, details.desc > summary {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.3rem 0.8rem;
  color: #000000; background: var(--button); font-weight: 700; text-decoration: none; cursor: pointer;
  border: 3px solid var(--button);
}
.button:visited, .jump a:visited { color: #000000; }
.button:hover, .jump a:hover, .search button:hover, .search-dialog__head button:hover,
details.older > summary:hover, details.desc > summary:hover { text-decoration: underline; text-underline-offset: 0.18em; }
details.older[open] > summary, details.desc[open] > summary {
  color: var(--text); background: var(--bg); border-color: var(--text);
}
.search button:disabled { color: #4d4d4d; background: #b3b3b3; border-color: #b3b3b3; cursor: default; }

/* ---------- Page content ---------- */
main { padding: 2.5rem 0 3rem; }
h1 { font-size: clamp(1.4rem, 1rem + 3vw, 2.6rem); margin-bottom: 1.5rem; }
main h2 { font-size: clamp(1.3rem, 1rem + 2vw, 2rem); }
h3 { margin-bottom: 0.5rem; }
.note h2, .intro-block h2 { font-size: 1.3rem; }
section { margin-top: 3rem; padding-top: 1rem; border-top: 3px solid var(--text); }
/* Headings of a part of a page (h2): the same space everywhere – 2.5rem before a new part,
   0.75rem between the heading and its text. Titles of publications and editions stay closer to their facts. */
main > h2 { margin: 2.5rem 0 0.75rem; }
section > h2 { margin-bottom: 0.75rem; }
.year { margin-top: 2.5rem; }
.year > h2 { margin-bottom: 0.75rem; }
.event h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.lines p { margin-bottom: 0.4em; }
.lines { margin-bottom: 1.25em; }
.top-link { margin: 1.5rem 0 0; }
.jump { margin-bottom: 1rem; }
.jump h2 { margin-bottom: 0.5rem; }

/* ---------- Boxes ----------
   Yellow frame = one item (a publication or an edition) or a note (Beta version, News).
   Explanations (intro texts, the short explanation at the top of each page) have no frame. */
.note, .book {
  border: 3px solid var(--frame); padding: clamp(1rem, 3vw, 1.5rem);
}
.note, .intro-block { max-width: 40em; margin-bottom: 1.75rem; }
.intro-block { margin-top: 2.5rem; }
.note h2, .intro-block h2 { margin-bottom: 0.75rem; }
.note > :last-child, .note .lines:last-child, .note .lines:last-child p:last-child { margin-bottom: 0; }
.page-intro { max-width: 40em; margin-bottom: 2.5rem; }
.page-intro ul { margin-bottom: 0; }
.access { margin-top: 0.5rem; }
/* Colophon: the postal addresses side by side when there is room; on phones one below the other */
.addresses { display: flex; flex-wrap: wrap; gap: 1.25em 3rem; margin-bottom: 1.25em; }
address { font-style: normal; }
.addresses .lines { margin-bottom: 0; }
.access h4 { margin-bottom: 0.2rem; }

/* Publication: cover next to the text. The cover moves above the text when the screen is narrow. */
.book { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.book .cover { flex: 0 0 auto; width: 10rem; align-self: flex-start; }
.book > div { flex: 1 1 15rem; min-width: 0; max-width: 36em; }
.book p { margin-bottom: 0.4em; }
.book .out-of-print { margin-top: 1.25rem; }
.book h2, .book h3, .edition h2 { font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); margin-bottom: 0.4rem; }
.book-list .book + .book { margin-top: 2.5rem; }

/* Older publications: folded away with <details>, the line to press looks like a button */
details.older { margin-top: 3rem; }
details.older > .book-list { margin-top: 2.5rem; }
details.older > summary { list-style: none; }
details.older > summary::-webkit-details-marker { display: none; }
details.older > summary .when-open, details.older[open] > summary .when-closed { display: none; }
details.older[open] > summary .when-open { display: inline; }
/* Short descriptions of a publication: the same kind of button, open text below it */
details.desc { margin-top: 0.75rem; }
details.desc > summary { list-style: none; }
details.desc > summary::-webkit-details-marker { display: none; }
details.desc > .lines, details.desc > p { margin-top: 0.75rem; }

/* Photographs of an edition: as many side by side as fit, each with its caption */
.gallery { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; }
.gallery figure { margin: 0; flex: 1 1 11rem; max-width: 16rem; }
.gallery figcaption { margin-top: 0.25rem; }

/* Facts: label and value */
.facts { margin: 0 0 1.25em; padding: 0; max-width: 36em; }
.facts div { display: flex; column-gap: 0.75rem; padding: 0.1rem 0; }
.facts dt { font-weight: 700; flex: 0 0 5.5rem; }
.facts dd { margin: 0; flex: 1 1 0; min-width: 0; }

.event { margin-bottom: 1.5rem; }
.event p { margin: 0; }

.pager { margin-top: 2.5rem; }
.pager .button { height: 100%; }

/* Publications: dropdowns to filter by category and person */
.filter { margin-bottom: 2.5rem; max-width: 40em; }
.filter__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.filter__field { flex: 1 1 12rem; min-width: 0; }
.filter label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
/* The same look on every device (phones otherwise draw their own small, rounded dropdown):
   a large white arrow at the right, inside the frame */
.filter select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 2.75rem; padding: 0.3rem 2.75rem 0.3rem 0.6rem; font: inherit;
  color: var(--text); background-color: var(--bg); border: 3px solid var(--text); border-radius: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='square'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 1.3rem;
}
.filter select::-ms-expand { display: none; }
.filter button {
  min-height: 2.75rem; padding: 0.3rem 0.8rem; font: inherit; font-weight: 700; cursor: pointer;
  color: #000000; background: var(--button); border: 3px solid var(--button);
}
.filter button:hover { text-decoration: underline; text-underline-offset: 0.18em; }
/* Count line first, the Reset button always underneath it, on the left (never jumping next to the line) */
.filter__result { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-top: 1.25rem; }
.filter__result:has(#filter-status:empty) { margin-top: 0; }
#filter-status { font-weight: 700; margin: 0; }
#filter-status:empty { display: none; }
body.filtering details.older > summary { display: none; }
body.filtering details.older { margin-top: 0; }
body.filtering details.older > .book-list { margin-top: 2.5rem; }

/* Search: pop-up window from the menu (and the Search page without JavaScript) */
.search-dialog {
  width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 1.25rem;
  color: var(--text); background: var(--bg); border: 3px solid var(--text);
}
.search-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.search-dialog__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.search-dialog__head h2 { font-size: 1.3rem; }
.search-dialog .results { padding-left: 1.25em; }
.search label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.search__row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.search input {
  flex: 1 1 12rem; min-width: 0; min-height: 2.75rem; padding: 0.3rem 0.6rem;
  color: var(--text); background: var(--bg); border: 3px solid var(--text);
}
#search-status { font-weight: 700; }


/* Flowers: above the page, but clicks pass through them. Nothing here makes the page wider. */
.flower-layer { position: fixed; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; }
.flower { position: absolute; left: 0; top: 0; max-width: 420px; height: auto; }

/* Large screens: wider page. Running text keeps its short line length. */
@media (min-width: 64rem) {
  body { max-width: 90rem; }
}

/* Phones: the buttons stacked at full width */
@media (max-width: 40rem) {
  .pager { flex-direction: column; }
  .pager .button { width: 100%; justify-content: center; }
  details.older > summary { display: flex; justify-content: center; }
}

@media (forced-colors: active) {
  .button, .jump a, .search button, .search-dialog, .search-dialog__head button,
  details.older > summary, details.desc > summary, .note, .book { border-color: CanvasText; }
  .site-nav a[aria-current="page"] { border-color: Highlight; }
  :focus-visible { outline-color: Highlight; }
}
@media print {
  .skip-link, .site-switch, .site-nav, .flower-layer, .pager, .top-link, .search-dialog, details.buy { display: none !important; }
  section, .book { break-inside: avoid; }
}
