:root {
  --ink: #2f2a1f;
  --muted: #6d6046;
  --paper: #fffdf4;
  --paper-deep: #f7edca;
  --sun: #f2a900;
  --sun-dark: #a95300;
  --leaf: #69712b;
  --line: #d8b14f;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: #dcc273;
  font-size: 17px;
}

body {
  margin: 0;
  color: var(--ink);
  background: #669966;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.65;
}

a {
  color: #8b3f00;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:visited {
  color: #6c503b;
}

a:hover,
a:focus-visible {
  color: #c65700;
  text-decoration-thickness: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.65rem 0.85rem;
  color: #fff;
  background: #442300;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  position: relative;
  width: min(1120px, calc(100% - 2rem));
  min-height: 100vh;
  margin-inline: auto;
  background: var(--paper);
  border-inline: 1px solid #b69037;
  box-shadow: 0 0 24px rgb(93 67 12 / 22%);
}

.site-shell::before,
.site-shell::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15px;
  background-color: #f4e6a8;
  background-image: url("/theme/sunbul1D.gif");
  content: "";
  pointer-events: none;
}

.site-shell::before {
  right: 100%;
}

.site-shell::after {
  left: 100%;
}

.site-banner {
  min-height: 132px;
  padding: 1.1rem clamp(1rem, 5vw, 3.5rem) 1.25rem;
  text-align: center;
  background-color: #f6c967;
  background-image: url("/theme/sunbanna-abstract.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto 100%;
  border-bottom: 1px solid #a77b1c;
}

.site-name {
  display: inline-block;
  color: #653300;
  font-family: "Trebuchet MS", Verdana, Geneva, sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-name:visited {
  color: #653300;
}

.site-era {
  margin: 0.15rem 0 0.4rem;
  color: #624418;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-banner h1 {
  margin: 0;
  color: #fff;
  font-family: "Trebuchet MS", Verdana, Geneva, sans-serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 600;
  line-height: 1.05;
  text-shadow: 1px 1px 0 #8d5d00, 2px 2px 3px rgb(58 33 0 / 35%);
}

.sunflower-rule {
  height: 12px;
  margin: 0.65rem clamp(1rem, 5vw, 3rem) 0;
  background: url("/theme/sunsepa.gif") center / 600px 10px repeat-x;
}

.site-grid {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  padding: 1.5rem clamp(1rem, 4vw, 3rem) 2.5rem;
}

.site-nav {
  align-self: start;
  position: sticky;
  top: 1rem;
}

.nav-heading {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-style: italic;
}

.nav-link {
  display: block;
  margin: 0 0 0.42rem;
  padding: 0.62rem 0.7rem;
  color: #4b3000;
  background: #f2c768;
  border: 1px solid #b87910;
  box-shadow: inset 1px 1px 0 #ffebac, 2px 2px 0 #d5bd77;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.nav-link:visited {
  color: #4b3000;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] {
  color: #fff;
  background: #a85400;
  border-color: #713700;
}

.page-content {
  min-width: 0;
  max-width: 76ch;
}

.page-content > :first-child {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: #5f3200;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  line-height: 1.2;
}

.page-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
}

.page-content h2 {
  margin-top: 1.8em;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.page-content h3 {
  font-size: 1.2rem;
}

hr {
  height: 10px;
  margin: 2rem 0;
  background: url("/theme/sunsepa.gif") center / 600px 10px repeat-x;
  border: 0;
}

ul,
ol {
  padding-left: 1.6rem;
}

li::marker {
  color: var(--sun-dark);
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

img {
  image-rendering: auto;
}

table {
  width: auto !important;
  max-width: 100%;
  border-collapse: collapse;
}

td,
th {
  padding: 0.35rem;
  vertical-align: top;
}

pre,
code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

.contact-panel {
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--paper-deep);
  border: 2px dotted #b47714;
}

.email-button {
  display: inline-block;
  padding: 0.75rem 1rem;
  color: #fff;
  background: #975000;
  border: 2px outset #d7983d;
  font-weight: 700;
  text-decoration: none;
}

.email-button:visited,
.email-button:hover {
  color: #fff;
}

.site-footer {
  padding: 1.25rem 1rem 2rem;
  color: #66563a;
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer .posterity-note {
  max-width: 68ch;
  margin: 1rem auto 0;
  padding-top: 0.75rem;
  border-top: 1px dotted #b99343;
  font-style: italic;
}

@media (max-width: 760px) {
  html {
    font-size: 16px;
  }

  .site-shell {
    width: 100%;
    border: 0;
  }

  .site-shell::before,
  .site-shell::after {
    display: none;
  }

  .site-banner {
    min-height: 116px;
  }

  .site-grid {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }

  .site-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    padding-bottom: 1rem;
    border-bottom: 2px dotted #c4912d;
  }

  .nav-heading {
    grid-column: 1 / -1;
    margin-bottom: 0.15rem;
  }

  .nav-link {
    margin: 0;
  }

  .page-content {
    max-width: none;
  }

  .page-content table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 420px) {
  .site-nav {
    grid-template-columns: 1fr;
  }

  .nav-heading {
    grid-column: auto;
  }
}

@media print {
  body,
  .site-shell {
    background: #fff;
    box-shadow: none;
  }

  .site-nav,
  .skip-link,
  .site-era {
    display: none;
  }

  .site-grid {
    display: block;
  }
}
