/* 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; }
}
