:root {
  color-scheme: light;
  background: #faf9f6;
  color: #282622;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  width: min(100% - 3rem, 45rem);
  margin-inline: auto;
  padding-block: 6.5rem 5rem;
}

.language-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
}

.language-switcher summary {
  padding: 0.65rem 1rem;
  border: 1px solid #d7d2c8;
  border-radius: 1.5rem;
  background: #faf9f6;
  box-shadow: 0 2px 12px #2826220a;
  cursor: pointer;
  user-select: none;
}

.language-options {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem;
  border: 1px solid #d7d2c8;
  border-radius: 0.75rem;
  background: #faf9f6;
  box-shadow: 0 4px 18px #28262212;
}

.language-options a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 0.4rem;
  color: inherit;
  text-decoration: none;
}

.language-options a:hover,
.language-options a[aria-current="page"] {
  background: #ece8e0;
}

.language-switcher summary:focus-visible,
.language-options a:focus-visible {
  outline: 2px solid #70624d;
  outline-offset: 3px;
}

html[dir="rtl"] article {
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Times New Roman", serif;
  font-size: 1.375rem;
  line-height: 2;
}

html[dir="rtl"] :is(h1, h2, h3, h4) {
  letter-spacing: normal;
  line-height: 1.6;
}

.campus-map {
  margin: 2rem 0 2.5rem;
}

.campus-map img {
  display: block;
  width: 100%;
  height: auto;
}

article {
  font-size: 1.25rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  text-wrap: pretty;
  line-height: 1.25;
}

h1 {
  margin: 0 0 3.5rem;
  font-size: clamp(2.15rem, 5vw, 3rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: clamp(1.7rem, 3.5vw, 2rem);
  letter-spacing: -0.025em;
}

h3 {
  margin: 2.75rem 0 1rem;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

h4 {
  margin: 2.25rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin: 0 0 1.35em;
}

strong {
  font-weight: 700;
}

.passage {
  margin-block: 1.5rem 2rem;
}

.passage p {
  margin-bottom: 0.65rem;
}

.passage p + p[lang] {
  margin-top: 1.75rem;
}

.passage p[dir="rtl"] {
  font-family: "Times New Roman", "Noto Serif Hebrew", serif;
  font-size: 1.35em;
  line-height: 1.9;
}

.passage .literal {
  color: #56514a;
  font-size: 0.9em;
  line-height: 1.75;
}

::selection {
  background: #e6ddcc;
  color: #282622;
}

@media (max-width: 480px) {
  main {
    width: calc(100% - 2.5rem);
  }

  article {
    font-size: 1.125rem;
    line-height: 1.8;
  }

  html[dir="rtl"] article {
    font-size: 1.25rem;
  }

  h1 {
    margin-bottom: 2.5rem;
  }
}

@media print {
  .language-switcher {
    display: none;
  }
  :root {
    background: white;
    color: black;
  }

  main {
    width: 100%;
    padding: 0;
  }

  article {
    font-size: 11pt;
    line-height: 1.6;
  }

  h1 {
    font-size: 24pt;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }
}
