/* Shared styles for the archived pages. The original layouts used <font>, align and bgcolor
   attributes; those now map onto the classes below. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0 auto;
  padding: 12px;
  max-width: 1040px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #222;
  background: #fff;
}

a { color: #1a3d8f; }
a:visited { color: #5a3d8f; }

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
iframe { max-width: 100%; border: 0; }
iframe[src*="youtube"] { width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 9; }

/* the old editor wrapped whole tables in <h5>/<h6>; browsers would shrink them to 11-13px */
h5, h6 { font-size: 1em; }

hr { border: 0; border-top: 1px solid #bbb; margin: 1em 0; }

/* old <font size> steps that carried meaning (headings); size 1 and 2 are body text */
.f3 { font-size: 1.15em; }
.f4 { font-size: 1.35em; }
.f5 { font-size: 1.6em; line-height: 1.25; }

/* old align / valign attributes */
.al { text-align: left; }
.ac { text-align: center; }
.ar { text-align: right; }
.aj { text-align: justify; }
.ac table { margin-left: auto; margin-right: auto; }
.ar table { margin-left: auto; }
.al table { margin-left: 0; }
.vt { vertical-align: top; }
.vm { vertical-align: middle; }
.vb { vertical-align: bottom; }
.nw { white-space: nowrap; }
.fl { float: left; margin: 0 12px 8px 0; }
.fr { float: right; margin: 0 0 8px 12px; }

/* old table attributes */
table { border-collapse: separate; max-width: 100%; }
td, th { padding: 0; }
/* cells holding only images: no text line around them, as in the original layouts */
td.img, th.img { line-height: 0; }
.bordered, .bordered td, .bordered th { border: 1px solid #999; }
.p1 > tbody > tr > td { padding: 1px; }  .p2 > tbody > tr > td { padding: 2px; }
.p3 > tbody > tr > td { padding: 3px; }  .p4 > tbody > tr > td { padding: 4px; }
.p5 > tbody > tr > td { padding: 5px; }  .p6 > tbody > tr > td { padding: 6px; }
.p7 > tbody > tr > td { padding: 7px; }  .p8 > tbody > tr > td { padding: 8px; }
.p9 > tbody > tr > td { padding: 9px; }  .p10 > tbody > tr > td { padding: 10px; }

/* Phones and narrow windows: the layout tables become one column. */
@media (max-width: 760px) {
  body { padding: 12px 16px; font-size: 16px; }
  table, tbody, tr, td, th { display: block; width: auto !important; max-width: 100%; }
  table { border-spacing: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
  td:empty, tr:empty { display: none; }
  td + td { margin-top: 4px; }
  .fl, .fr { float: none; display: block; margin: 0 0 8px; }
  img[style*="float"] { float: none !important; display: block; margin: 8px auto !important; }
  .nw { white-space: normal; }
  body { overflow-wrap: anywhere; }
  /* background graphics were drawn for the fixed desktop columns */
  table[style*="background-image"], td[style*="background-image"] { background-image: none !important; }
  hr, div, p, [style*="width"] { max-width: 100%; }
  hr, div[style*="width"], p[style*="width"] { width: auto !important; }
}

/* Sidebar menus (tables of single links) wrap into a compact block on phones. */
@media (max-width: 760px) {
  table.menu, table.menu > tbody { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 0 10px; padding: 6px 4px; }
  table.menu tr { display: contents; }
  table.menu td { margin: 0 !important; font-size: 15px; }
  table.menu a { display: inline-block; padding: 10px 4px; }
  table.menu td br { display: none; }
}

/* Phones: menus fold behind the button menu.js adds. */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .menu-folds .menu-toggle {
    display: block; width: 100%; margin: 8px 0; padding: 12px 16px;
    font: bold 16px/1.2 Verdana, Geneva, Tahoma, sans-serif; color: #fff;
    background: #1a3d8f; border: 0; border-radius: 6px; cursor: pointer;
  }
  .menu-folds .menu-toggle::before { content: "\2630\00a0\00a0"; }
  .menu-folds:not(.menu-open) table.menu { display: none !important; }
}

/* One-time welcome notice (welcome.js) */
dialog.welcome {
  max-width: 34rem; width: calc(100% - 32px); padding: 28px 28px 22px;
  border: 0; border-radius: 10px; color: #222; background: #fff; text-align: left;
  font-size: 16px; line-height: 1.55; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
dialog.welcome::backdrop { background: rgba(30, 20, 60, 0.55); }
dialog.welcome h2 { margin: 0 0 12px; font-size: 1.3em; line-height: 1.3; color: #3b2a7a; }
dialog.welcome p { margin: 0 0 12px; }
dialog.welcome form { margin: 18px 0 0; text-align: right; }
dialog.welcome button {
  padding: 10px 20px; font: bold 16px/1.2 Verdana, Geneva, Tahoma, sans-serif;
  color: #fff; background: #6a4fc2; border: 0; border-radius: 6px; cursor: pointer;
}
dialog.welcome button:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
@media (max-width: 760px) {
  dialog.welcome { padding: 22px 20px 18px; max-height: calc(100% - 32px); overflow-y: auto; }
  dialog.welcome form { text-align: center; }
  dialog.welcome button { width: 100%; }
}

/* "About this archive" pages: a plain, modern reading layout */
.archive-page { max-width: 40rem; padding: 24px 20px 48px; font-size: 17px; line-height: 1.65; }
.archive-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 32px; font-size: 15px; }
.archive-nav a { padding: 6px 0; }
.archive-portrait { float: right; margin: 4px 0 12px 20px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.archive-page h1 { margin: 0 0 20px; font-size: 1.6em; line-height: 1.25; color: #3b2a7a; }
.archive-page p { margin: 0 0 16px; }
.archive-more a {
  display: inline-block; margin: 8px 0; padding: 10px 20px; border-radius: 6px;
  color: #fff; background: #6a4fc2; font-weight: bold; text-decoration: none;
}
.archive-contact { margin-top: 28px; padding-top: 16px; border-top: 1px solid #ddd; font-size: 15px; color: #555; }
