:root {
  --panel-width: 900px;
  color-scheme: light;
  font-family: system-ui, "Times New Roman", serif;
  color: #202c43;
  background: #abc3f7;
}

* { box-sizing: border-box; }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 16px;
  font-size: 16px;
  line-height: 1.6;
  background-color: #abc3f7;
  background-image: url("pureblue.png");
  background-repeat: repeat;
  background-size: 54px 20px;
}

.emblem-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  width: max(0px, calc((100% - var(--panel-width)) / 2));
  container: emblem-gutter / inline-size;
  pointer-events: none;
  z-index: -1;
}

.emblem-gutter--left { left: 0; }
.emblem-gutter--right { right: 0; }

.hide-background-graphics .emblem-gutter { display: none; }

.appearance-controls { text-align: right; margin-bottom: 12px; }
#background-toggle {
  padding: 6px 10px;
  border: 1px solid #a4b7d8;
  border-radius: 4px;
  background: #edf2ff;
  color: #244fa3;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
#background-toggle:hover { background: #dfe8fc; }
#background-toggle:focus-visible {
  outline: 2px solid #244fa3;
  outline-offset: 3px;
}

.emblem-gutter::before {
  content: "";
  display: none;
  width: 180px;
  height: 100%;
  margin: 0 auto;
  /* This slice of blue5 contains the complete first emblem. */
  background-image: url("blue5.png");
  background-size: 540px 200px;
  background-position: -48px top;
  background-repeat: no-repeat space;
}

/* Allow a complete emblem plus breathing room beside the panel. */
@container emblem-gutter (min-width: 204px) {
  .emblem-gutter::before { display: block; }
}

main {
  max-width: var(--panel-width);
  margin: 0 auto;
  padding: 20px 32px;
  background: #fcfdff;
  border: 3px ridge #bccae5;
  box-shadow: 0 4px 20px rgb(35 58 105 / 16%);
  overflow-wrap: break-word;
}

header, footer { text-align: center; }

h1 {
  margin: 12px 0;
  font-size: 32px;
  line-height: 1.2;
}

h1, h2, h3 { color: #294775; }

h2 { font-size: 24px; }

h3 { line-height: 1.4; }

p { margin: 1em 0; }

a {
  color: #244fa3;
  text-underline-offset: 0.15em;
}

a:visited { color: #715080; }
a:hover { color: #17356e; }

a:focus-visible {
  outline: 2px solid #244fa3;
  outline-offset: 3px;
}

nav {
  margin: 24px 0;
  padding: 12px 16px;
  background: #edf2ff;
  border: 1px solid #c5d3ee;
}

nav p { margin: 0; }

#table-of-contents h2 { margin: 0 0 8px; font-size: 20px; }
#table-of-contents ul { padding-left: 24px; }
#table-of-contents > ul { margin: 0; }

section, article :is(h1, h2, h3, h4, h5, h6) { scroll-margin-top: 24px; }

hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #a4b7d8;
  border-bottom: 1px solid #e8eef9;
}

footer {
  margin: 16px 0 4px;
  font-size: 14px;
}

@media (max-width: 600px) {
  body { padding: 16px 12px; }
  main { padding: 16px 20px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

@media (max-width: 360px) {
  main { padding: 12px 16px; }
  h1 { font-size: 26px; }
}
