@font-face {
  font-family: Andada;
  src: url("../fonts/andada/Andada-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Andada;
  src: url("../fonts/andada/Andada-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Andada;
  src: url("../fonts/andada/Andada-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Andada;
  src: url("../fonts/andada/Andada-BoldItalic.woff2") format("woff2");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

* { box-sizing: border-box; }
:root { color-scheme: dark; }
body {
  margin: 0;
  background: #080f20 url("../crest-tile.png") repeat 0 0 / 160px 144px;
  color: #e9e3d8;
  font: 1.05rem/1.5 Andada, Georgia, "Times New Roman", serif;
}
button, input, select, textarea, font[face] { font-family: inherit; }
a { color: light-dark(#114b77, #9fcfff); }
a:visited { color: light-dark(#6a2855, #d6b9f5); }
body:has(.masthead) { color: yellow; }
body:has(.masthead) main a { color: aqua; }
body:has(.masthead) main a:visited { color: #ff8585; }

/* Archived tables and documents contain their own light and dark panels. */
article [bgcolor]:not([bgcolor=""]), .MsoNormal[style*="background:white"] {
  color-scheme: light;
  color: #221e1a;
}
article :is([bgcolor="#000000"], [bgcolor="000000"], [bgcolor="black" i], [bgcolor="#330000"]) {
  color-scheme: dark;
  color: #e9e3d8;
}
font:is([color="black" i], [color="#000000"], [color="000000"]) { color: inherit; }
.MsoNormal [style*="color:black"] { color: inherit !important; }
font[color="#0000ff" i] { color: light-dark(#114b77, #9fcfff); }
font:is([color="#ff0000" i], [color="red" i]) { color: light-dark(#a52626, #ff8585); }
font:is([color="#004000"], [color="#800080"], [color="8e236b" i]) { color: inherit; }
header {
  background: #080f20;
  border-bottom: 2px solid #a88042;
}
nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem 1.2rem;
  max-width: 64rem;
  margin: auto;
  padding: .65rem 1rem;
}
nav a, nav a:visited { color: #f1e0bd; }
.site-name { margin-right: auto; font-weight: bold; }
.skip { position: absolute; top: -5rem; }
.skip:focus { top: 0; padding: .5rem; background: white; color: black; }
main { max-width: 64rem; margin: auto; padding: 1rem clamp(.75rem, 3vw, 2rem) 3rem; }
article { overflow-x: auto; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
.dragons-flying-right { transform: scaleX(-1); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
fieldset { min-width: 0; }
aside { margin-bottom: 1rem; padding: .5rem .8rem; border: 1px solid currentColor; }
.directory, #collections ul { columns: 2 18rem; padding-left: 1.5rem; }
.directory li, #collections li { break-inside: avoid; margin: .3rem 1rem .3rem 0; }
.masthead {
  position: relative;
  padding: 1.25rem .5rem;
  text-align: center;
}
.masthead::before, .masthead::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 5px;
  border-radius: 3px;
  /* Each half of the background is one complete rainbow. */
  background: repeating-linear-gradient(90deg,
    #ff445e 0%, #ef59dd 7%, #925aff 14%, #4394ff 21%, #36dfd4 28%,
    #84e860 35%, #ffdc53 42%, #ff9545 46%, #ff445e 50%) 0 0 / 200% 100%;
  box-shadow: inset 0 1px rgb(255 255 255 / 55%), inset 0 -1px rgb(0 0 0 / 35%);
}
.masthead::before { top: 0; }
.masthead::after { bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .masthead::before, .masthead::after { animation: rainbow-scroll 8s linear infinite; }
  .masthead::after { animation-direction: reverse; }
}
@keyframes rainbow-scroll {
  to { background-position: 100% 0; }
}
.masthead img { vertical-align: middle; }
.home-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 2px;
  padding: 2px;
  list-style: none;
  border: 1px solid currentColor;
}
.home-links li { border: 1px solid currentColor; }
.home-links a {
  display: grid;
  height: 100%;
  min-height: 2.75rem;
  place-items: center;
  padding: .4rem;
  text-align: center;
}
@media (max-width: 36rem) {
  .site-name { width: 100%; }
}
