@charset "utf-8";

/* CSS reset for browsers that do not support HTML5. */
header, footer, main, nav, article, section { display: block; }

/* Simple colour scheme */
html, body {
  background-color: #fffff0;
  color: black;
}

@media print {
  /* White background when printing to save toner/ink. Many browsers will
   * force this when printing anyway. */
  html, body { background-color: white; }
}

h1, h2, h3, h4, h5, h6, dt, strong, .paralabel { color: #000055; }
a:link { color: blue; }
a:visited { color: purple; }
a:link:active, a:link:hover, a:visited:active, a:visited:hover { color: red; }
.good { color: green; }
.bad { color: red; }

/* Alternative colour scheme: dark mode */
@media only screen and (prefers-color-scheme: dark) {
  html, body {
    background-color: #202020;
    color: #ffffee;
  }

  h1, h2, h3, h4, h5, h6, dt, strong, .paralabel { color: #ffffaa; }
  a:link { color: #60a0ff; }
  a:visited { color: #cc44cc; }
  a:link:active, a:link:hover, a:visited:active, a:visited:hover {
    color: #ff7766;
  }
  .good { color: #44dd44; }
  .bad { color: #ff7766; }
}

/* Sans serif for most text... */
body, p { font-family: sans-serif; }

/* ...but serif for headings. And reduce space after. */
h1, h2, h3, h4, h5, h6 {
  font-family: serif;
  margin: 0.2in 0 0.4em 0;
  padding: 0;
}

/* Space before sections like a heading, after like a paragraph. */
article, section {
  margin: 0.2in 0 0.9em 0;
}

/* Only pad after paragraphs, not before.
 * Also add padding after list items (does not affect .hlist). */
ul, ol, p, li {
  margin-top: 0;
  margin-bottom: 0.9em;
  padding-top: 0;
  padding-bottom: 0;
}

/* Emphasise the main heading. */
h1 {
  margin-top: 0;         /* less space at top of page */
  border-bottom: 2px groove gray;
  font-style: italic;
  margin-bottom: 0.45em; /* slightly more than other headings */
}

/* Very minor margins for the main content. Just to keep it away from the page
 * edges, and to emphasise the heading a bit more. */
main {
  margin-left: 0.25em;
  margin-right: 0.25em;
}

/* Scale images to fit the screen when viewed on very small screens. */
img {
  max-width: 100%;
  height: auto;
}

/* Do not allow floats from one section to encroach on another. */
article, section, footer, section, .clear {
  clear: both;
}

/* Whatever follows .clear must align with it, regardless of what came before.
 * (I.e. do not allow overlapping margins.) */
.clear {
  overflow: auto;
}

/* Format the page footer to be even smaller, with a border above. */
footer {
  margin-top: 1.5em;    /* above the border */
  border-top: 2px groove gray;
  padding-top: 0.4em; /* below the border */
  font-size: 81%;
}
footer p {
  margin-bottom: 0.25em;
  font-style: italic;
}

/* Close lists: no spacing between items, but still add space at start and end
 * of list. */
.closelist li
{
  margin-top: 0;
  margin-bottom: 0;
}

/* Horizontal lists (used in footer). */
ul.hlist
{
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}
ul.hlist li {
  display: inline;
  margin: 0;
  padding: 0;
}
ul.hlist li::after {
  content: "\00A0• ";
  padding: 0 0.2em;
}
ul.hlist li:last-child::after {
  content: none;
  padding: 0;
}

/* Inline styles */
small {
  /* Slightly larger than browser defaults for accessibility reasons. */
  font-size: 90%;
}
.foreign { font-style: italic; }
.paralabel { font-weight: bold; }

/* Message boxes */
.mbox {
  position: relative; /* for positioning of image */
  overflow: auto;
  background-color: #f8f9fa;
  border: 1px solid #a2a9b1;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding: 0.9em 0.05in 0.05in 0.53in;
  min-height: 0.43in;
  font-size: 90%;
}
@media only screen and (prefers-color-scheme: dark) {
  .mbox {
    background-color: #2c2e30;
    border-color: #7d7266;
  }
}
.mbox::before {
  position: absolute;
  top: 0.1in;
  left: 0.1in;
  display: block;
  width: 0.33in;
  height: 0.33in;
  content: "";
  background-image: url(images/walnut-32px.png);
  background-image: image-set(
    url(images/walnut-32px.png) x1
    url(images/walnut-48px.png) x1.5
    url(images/walnut-64px.png) x2
    url(images/walnut-128px.png) x4
  );
  background-repeat: no-repeat;
}
.mbox ul, .mbox ol
{
  /* reduce indentation inside a message box */
  margin-left: 0.1in;
  padding-left: 0.1in;
}
