/* Keep browsers from assigning a different reading size to each table cell. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-size: 1rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}
td, th {
  font-size: inherit;
  line-height: inherit;
}
h1, h2, h3, h4, h5, h6 { line-height: 1.22; }
img { max-width: 100%; height: auto; }
img[height="0"], img[width="0"] { display: none; }
input, select, textarea { max-width: 100%; }
pre { max-width: 100%; overflow: auto; }
font[size="-1"], font[size="2"] { font-size: .9375rem; }
font[size="-3"] { font-size: .8125rem; }

[data-voree-layout="gallery"] table {
  width: 100%;
  max-width: 62rem;
  border-spacing: 0;
  font: 1rem/1.5 Arial, Helvetica, sans-serif;
}
[data-voree-layout="gallery"] td {
  padding: .65rem .75rem;
  vertical-align: top;
  font: inherit;
}
[data-voree-layout="gallery"] td:first-child {
  width: 11rem;
  text-align: left;
}
[data-voree-layout="gallery"] td img { display: block; }
[data-voree-layout="gallery"] td p { margin: .4em 0 0; }
[data-voree-layout="gallery"] td center { margin: .5em 0; }

@media (max-width: 45rem) {
  body { margin: .75rem; overflow-wrap: anywhere; }
  blockquote, dd { margin-inline: 1rem; }
  ul, ol { padding-inline-start: 1.5rem; }
  img[align="RIGHT" i], img[align="LEFT" i] { max-width: 45%; }
  /* Wide charts and character tables can pan without widening the whole page. */
  table:not(table table) { display: block; max-width: 100%; overflow-x: auto; }
  table[align] { float: none; }
  :is(input, select, textarea) { font-size: 1rem; }

  [data-voree-layout="gallery"] table { display: table; table-layout: fixed; }
  [data-voree-layout="gallery"] td { padding: .7rem .25rem; }
  [data-voree-layout="gallery"] td:first-child { width: 28%; padding-right: .75rem; }

  [data-voree-layout="home"] table:first-of-type:not(table table) > tbody > tr,
  [data-voree-layout="home"] table:first-of-type:not(table table) > tbody > tr > td {
    display: block;
    width: auto;
    padding-inline: 0;
  }
  [data-voree-layout="home"] table:first-of-type:not(table table) > tbody { display: block; }
  [data-voree-layout="home"] table[bgcolor] { margin-inline: auto; max-width: 100%; }
  [data-voree-layout="home"] table[bgcolor] > tbody > tr > td { padding: .8rem; }
  [data-voree-layout="home"] td[rowspan="5"] { display: none; }
  [data-voree-layout="home"] center:first-of-type img[width="318"] { max-width: 63%; }
  [data-voree-layout="home"] center:first-of-type img[width="150"] { max-width: 31%; }

  [data-voree-layout="resume"] table { display: table; }
  [data-voree-layout="resume"] table td:first-child { display: none; }
  [data-voree-layout="resume"] table td { width: auto; }
  [data-voree-layout="resume"] table img { max-width: 100%; float: none; }
}

@media (max-width: 64rem) {
  [data-voree-layout="calendar"] table[cellpadding="5"] { display: block; width: 100%; }
  [data-voree-layout="calendar"] table[cellpadding="5"] > tbody,
  [data-voree-layout="calendar"] table[cellpadding="5"] > tbody > tr,
  [data-voree-layout="calendar"] table[cellpadding="5"] > tbody > tr > td { display: block; }
  [data-voree-layout="calendar"] table[cellpadding="5"] > tbody > tr > td { padding: 0; }
  [data-voree-layout="calendar"] table[width="30%"] {
    width: 100%;
    max-width: 27rem;
    margin: 0 auto 1rem;
    table-layout: fixed;
    font-family: Arial, Helvetica, sans-serif;
    overflow-wrap: normal;
  }
  [data-voree-layout="calendar"] table[width="30%"] td,
  [data-voree-layout="calendar"] table[width="30%"] th { padding: .2rem .05rem; }
  [data-voree-layout="calendar"] font[size="+2"] { font-size: 1.25rem; }
}

@media (max-width: 45rem) {
  /* The original animation menu puts the heading in a cell spanning five rows. */
  table[background="bgtextur.jpg"] {
    display: table;
    width: 100%;
    height: auto;
    padding: .6rem 0;
  }
  table[background="bgtextur.jpg"] table,
  table[background="bgtextur.jpg"] table > tbody { display: block; }
  table[background="bgtextur.jpg"] table > tbody {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  table[background="bgtextur.jpg"] table tr { display: contents; }
  table[background="bgtextur.jpg"] table td { display: block; }
  table[background="bgtextur.jpg"] td[rowspan]:has(h1) { order: -1; text-align: center; }
  table[background="bgtextur.jpg"] td[rowspan]:has(img[src$="blank.gif"]) { display: none; }
  table[background="bgtextur.jpg"] table img { display: block; }
  table:has(img[src="15puzzle.gif"]) > tbody > tr { display: grid; }
  table:has(img[src="15puzzle.gif"]) img { float: none; max-width: 100%; }
  div[name="Marquee"] table { display: table; width: 100%; table-layout: fixed; }
  div[name="Marquee"] input { box-sizing: border-box; }
}
