* {
  box-sizing: border-box;
}

:root {
  /* Color system */
  --kornhaus-color: oklch(15% 0.02 240);
  --kornhaus-color-light: oklch(from var(--kornhaus-color) calc(l + 0.08) c h);
  --text-color: oklch(98% 0.02 240);
  --link-color: oklch(95% 0.15 60);
  --link-hover: oklch(40% 0.15 120);

  /* Typography */
  font-size: 20px;
  font-family: Helvetica, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background-color: var(--kornhaus-color-light);
  color: var(--text-color);
}

header img, main, footer {
  width: 88vw;
  min-width: 25ch;
  max-width: 77ch;
}

header {
  position: relative;
}

header > img {
  background-color: white;
  object-fit: contain;
  display: block;
  height: auto;
  min-height: 9rem;
  max-height: 50vh;
  margin: 30px auto 0 auto;
  border-top: solid 20px var(--kornhaus-color);
  border-left: solid 20px var(--kornhaus-color);
  border-right: solid 20px var(--kornhaus-color);
}

main {
  background-color: var(--kornhaus-color);
  display: grid;
  row-gap: 2ch;
  column-gap: 0.6rem;
  margin: 0 auto;
  padding: 2rem 20px;
}

.icon {
  width: 1.2rem;
}

@media (width < 73ch) {
  main {
    grid-template-columns: 1.2rem minmax(min-content, max-content) 2ch;
  }
  #legal-business-details dd {
    padding-left: 2ch;
  }
}

@media (min-width: 73ch) and (width < calc(77ch / 0.88 * 1.4)) {
  main {
    grid-template-columns: repeat(2, 1.2rem minmax(min-content, max-content) 2ch);
  }
  #legal-business-details {
    grid-template-columns: repeat(2, minmax(min-content, max-content));
  }
}

@media (min-width: calc(77ch / 0.88 * 1.4)) {
  main {
    grid-template-columns: repeat(3, 1.2rem minmax(min-content, max-content) 2ch);
  }
  .span-two-rows {
    grid-row: 1 / 3
  }
  #legal-business-details {
    grid-template-columns: repeat(2, minmax(min-content, max-content));
  }
}

main > section {
  display: contents;
}

address {
  font-style: normal;
}

a:link {
  color: var(--link-color);
  text-decoration: none;
}

a:visited {
  color: var(--link-color);
}

a:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Remove focus styles for mouse users */
a:focus:not(:focus-visible) {
  outline: none;
}

a:hover {
  color: var(--link-hover);
}

#kornhaus-address {
  display: grid;
  row-gap: 0.4rem;
}

#kornhaus-opening-hours {
  display: grid;
  column-gap: 2ch;
  row-gap: 0.4rem;
  grid-template-columns: max-content minmax(min-content, max-content);
  grid-template-rows: max-content max-content;
}

.main-content {
  margin-top: 0.1rem;
}

.no-wrap {
  text-wrap: nowrap;
}

footer {
  font-size: 0.8rem;
  min-width: calc(25ch * 1.25);
  max-width: calc(77ch * 1.25);
  margin: 0 auto;
  padding: 1.6rem 20px;
  filter: brightness(80%);
  display: grid;
  row-gap: 1.2em;
}

summary {
  font-size: 1.2em;
  font-weight: 500;
  width: max-content;
}

summary + div {
  padding: 1em 0 1em 1ch;
}

summary:hover {
  cursor: pointer;
}

footer a:link {
  color: var(--text-color);
}

#legal-business-details {
  display: grid;
  column-gap: 3ch;
  row-gap: 0.4rem;
  line-height: 1.3;
}

#legal-business-details dt {
  font-weight: 450;
}

#legal-business-details dd {
  padding-bottom: 0.2rem;
  font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
