:root {
  --navy: #333366;
  --link-blue: #333366;
  --visited-purple: #333366;
  --light-blue: #f0f4ff;
  --hover-red: #cc0000;
  --active-red: #ff0000;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-y: scroll; 
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #111111;
  background-color: #ffffff;
  font-family: "Times New Roman", Times, serif;
  line-height: 1.25;
}

/* Same behaviour for all ordinary links, including navigation links. */
a {
  color: var(--link-blue);
  text-decoration: none;
}

a:visited {
  color: var(--visited-purple);
}

a:hover,
a:focus-visible {
  color: var(--hover-red);
  text-decoration: none;
}

a:active {
  color: var(--active-red);
}

/* Top logo row */
.site-header {
  display: flex;
  align-items: center;
  min-height: 62px;
  background: var(--navy) url("img/topbg.gif") repeat-x top left;
}

.site-logo {
  display: block;
  flex: 0 0 295px;
  width: 295px;
  height: 62px;
}

.site-logo img {
  display: block;
  width: 295px;
  height: 62px;
  border: 0;
}

.site-header-title {
  flex: 1;
  padding: 0 24px;
  color: #f0f4ff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.15rem;
  font-weight: bold;
  text-align: right;
}

/* Navigation: only layout; link colours come from the global a rules. */
.site-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 28px;
  padding: 4px 24px 4px 132px;
  overflow-x: auto;
  background: var(--light-blue) url("img/menubg.gif") repeat-x top left;
  border-bottom: 1px solid #d6d9e5;
  font-family: Geneva, Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  white-space: nowrap;
}

.site-nav a {
  display: inline-block;
  padding: 0 11px;
}

.site-nav a + a {
  padding-left: 34px;
  background: url("img/menubar.gif") no-repeat left center;
}

/* Main layout; content grows naturally beyond the old 470px minimum. */
.page-layout {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: stretch;
  min-height: 470px;
  background-color: #ffffff;
}

.left-strip {
  background: var(--light-blue) url("img/menubg.gif") repeat top left;
}

.page-content {
  min-width: 0;
  padding: 4px 20px 20px;
}

/* Keep listings reasonably compact. */
.page-content p {
  margin: 0.3em 0;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  margin: 0.5em 0 0.3em;
  line-height: 1.15;
}

.page-content ol,
.page-content ul {
  margin: 0.35em 0;
}

.page-content li {
  margin: 0.15em 0;
}

.page-content img {
  max-width: 100%;
  height: auto;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 5px 12px;
  color: #ffffff;
  background-color: var(--navy);
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9rem;
}

/* Expand/collapse sections */
details > summary {
  cursor: pointer;
  font-size: 0.9em;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  display: inline-block;
  width: 0.8em;
  margin-right: 0.4em;
  content: "+";
}

details[open] > summary::before {
  content: "\2212";
}

/* Expand/collapse sections */
details {
  margin-top: 2px;
  margin-bottom: 4px;
  margin-left: 1.8em;
}

details > div {
  padding: 8px;
  margin-top: 4px;
  background-color: #f9f9f9;
  border-left: 3px solid #0066cc;
}

details > div p {
  margin: 0 0 8px 0;
}

/* Text-like + / - publication controls */
button.btn-text,
button.btn-text:hover,
button.btn-text:focus,
button.btn-text:focus-visible,
button.btn-text:active {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline;
  margin: 0 4px 0 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--link-blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.9em;
  font-weight: bold;
  line-height: inherit;
  text-decoration: none;
}

button.btn-text:hover,
button.btn-text:focus,
button.btn-text:focus-visible {
  color: var(--hover-red);
  text-decoration: none;
}

button.btn-text:active {
  color: var(--active-red);
}

/* Narrow screens */
@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    min-height: auto;
    overflow: hidden;
  }

  .site-header-title {
    display: none;
  }

  .site-logo {
    flex: 0 1 auto;
    width: 100%;
    max-width: 295px;
    height: auto;
  }

  .site-logo img {
    width: 100%;
    max-width: 295px;
    height: auto;
  }

  /* Keep top menu in one horizontal scrolling row */
  .site-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 5px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav a {
    flex: 0 0 auto;
    padding: 4px 10px;
  }

  .site-nav a + a {
    padding-left: 28px;
  }

  /* Main page layout becomes single column */
  .page-layout {
    display: block;
    min-height: 0;
    width: 100%;
    max-width: 100%;
  }

  .left-strip {
    display: none;
  }

  .page-content {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px 22px;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: 16px;
    line-height: 1.35;
  }

  .page-content p {
    margin: 0.45em 0;
  }

  .page-content ol,
  .page-content ul {
    padding-left: 1.3em;
    margin: 0.45em 0;
  }

  .page-content li {
    margin: 0.25em 0;
  }

  .page-content img,
  .page-content iframe,
  .page-content object,
  .page-content embed {
    max-width: 100%;
    height: auto;
  }

  .page-content td img {
  max-width: 220px;
}

  /*
    Important:
    This changes old two-column content tables into stacked
    one-column blocks on mobile.
  */
  .page-content table,
  .page-content tbody,
  .page-content tr,
  .page-content td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-content td {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .site-footer {
    flex-direction: column;
    gap: 2px;
  }
}