* {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color:rgba(0,0,0,0);
}

html {
  box-sizing: border-box;
  font-family: "Noto Serif", Helvetica, sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
	font-size: 125%;
	color: #000;
	line-height: 1;
  scroll-behavior: smooth;
}

figcaption,
.head nav,
dialog .text,
.space-grotesk {
  font-family: "Space Grotesk", Helvetica, sans-serif;
  font-size: 80% !important;
}

@media (min-width: 800px) {
  html {
    font-size: 200%;
  }

  figcaption,
  .head nav,
  dialog .text,
  .space-grotesk {
    font-size: 60% !important;
  }
}

body {
  margin-left: 3%;
  margin-right: 3%;
  margin-top: 2%;
  margin-bottom: 2%;
	background-color: lightyellow;
}

img,
video {
  display: block;
}

figure {
  margin-left: 0;
}

figcaption {
  font-size: .6em;
  margin-top: .25em;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

button {
  appearance: none;
  background-color: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  user-select: none;
}

summary {
  list-style-type: "▸ ";
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

details[open] > summary {
  list-style-type: "▾ ";
}

/* summary::-webkit-details-marker {
  display: none;
} */

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: none;
}

a {
  color: Goldenrod;
  text-decoration: none;
}

hr {
  height: 10;
  margin-top: 1em;
  margin-bottom: 1em;
  border: 0;
  border-top: 1px solid black;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  color: white;
  background: black;
}

.no-emoji {
  font-family: Georgia, sans-serif;
}

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

.white-text {
  color: #fff;
}

.text {
  max-width: 900px;
  margin-top: 1em;
  margin-bottom: 1em;
	line-height: 1.5;
}

.text:first-child {
  margin-top: 0;
}

.text:last-child {
  margin-bottom: 0;
}

.text > *:not(:first-child) {
  margin-top: 1em;
}

.text h2,
.text h3 {
  font-weight: bold;
}

.text h2 {
  font-size: 1.2em;
}

.text h3 {
  font-size: 1.1em;
}

.text ul {
  list-style: disc inside;
}

.text ol {
  list-style: decimal inside;
}

.text strong,
.text b {
  font-weight: bold;
}

.text i,
.text em {
  font-style: italic;
}

/* .text details > *:not(summary) {
  padding-left: 1em;
} */

.head {
  display: flex;
  justify-content: space-between;
  gap: .5em 1em;
  margin-bottom: 2em;

  scroll-margin-top: 2em;

  line-height: 1.5;
}

.head h1,
.head p {
  font-size: 1em;
  font-weight: normal;
  margin: 0;
}

.head nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1em;
}

@media (min-width: 800px) {
  .head nav ul {
    gap: 0 2em;
  }
}

.head nav li {
  display: inline-block;
}

.head nav a {
  display: block;
}

.foot {
  margin-top: 2em;
}

.portrait img {
  max-width: 220px;
}

.library {
  margin-top: 1em;
  margin-bottom: 1em;

  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  align-items: end;
  justify-content: start;
  grid-gap: 1em;
  grid-gap: min(1em, 3vw);
  gap: min(1em, 3vw);
}

@media (min-width: 800px) {
  .library {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.library img {
  width: 100%;
}

.slideshow {
  position: relative;
  overflow: hidden;
}

.slideshow-container {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  overflow: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  scrollbar-width: none;
}

.slideshow-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  margin: 0 auto;
  width: 100%;
}

.slideshow-item img {
  display: block;
  object-fit: contain;
  margin: 0 auto;
  width: 100%;
  height: 100%;
}

.slideshow button {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0;
  transform: translateY(-50%);

  width: 44px;
  padding-left: 2%;
  padding-right: 2%;

  text-align: left;
  font-size: 1.5rem;

  opacity: .5;
  transition: opacity 200ms ease-in-out, top 200ms ease-out 150ms;

  touch-action: manipulation;
}

@media (hover: hover) {
  .slideshow button {
    width: max(44px, 33%);
    height: 100%;
  }
}

.slideshow button:hover {
  opacity: 1;
}

.slideshow button[value="next"] {
  right: 0;
  left: auto;
  text-align: right;
}

.slideshow button[value="next"] svg {
  transform: rotate(180deg);
}

.check {
  display: flex;
  align-items: center;
  gap: .5em;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.check input {
  position: relative;
  margin: 0;
  width: 1.75em;
  height: 1.75em;
  background-color: transparent;
  border: 1px solid;
  border-radius: 0 !important;
  appearance: none;
  pointer-events: none;
}

.check input::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: '✓';
  font-size: 1.3em;
  /* content: '✕';
  font-size: 1.4em; */
  visibility: hidden;
}

.check input:checked::after {
  visibility: visible;
}

/* Dialoger */

dialog {
  background-color: #fff;
  padding: 1em;
  width: min(90vw, 950px);
  margin: auto;
  border: 0;
  overscroll-behavior: contain;
}

dialog > button {
  float: right;
  margin-left: 1em;
}

dialog::backdrop {
  overscroll-behavior: contain;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.15);
}

dialog:focus-visible {
  outline: none;
}

/* Library filtrering */

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1em;
  margin-bottom: 1em;
}

.snow {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  overflow: hidden;
  contain: paint;
}

.indented {
  text-indent: -1em;
  padding-left: 1em;
}
