/* mrothery.co.uk restore: pure-CSS replacements for the original JavaScript/applets + small-screen reflow */
html { -webkit-text-size-adjust: 100%; }
img { border: 0; max-width: 100%; height: auto; }
body { overflow-wrap: break-word; }

/* "Answer" buttons (were JavaScript toggles) */
.mr-ans { display: inline-block; margin: 2px 0; }
.mr-ans summary { display: inline-block; cursor: pointer; list-style: none; font: 13px Arial, sans-serif; padding: 2px 10px;
  border: 1px solid #7a7a7a; border-radius: 3px; background: linear-gradient(#fdfdfd, #dedede); color: #000; }
.mr-ans summary::-webkit-details-marker { display: none; }
.mr-ans[open] summary { background: #d0d0d0; }
.mr-ans-text { color: red; font-weight: bold; margin-left: 6px; }
.mr-ans-text font { color: red; }

/* blank answer lines (were text boxes) */
.mr-line { display: inline-block; width: min(26em, 90%); border-bottom: 1px solid #888; height: 1.2em; vertical-align: bottom; }
.mr-box { height: 4em; border: 1px solid #aaa; }

/* hover buttons (were FrontPage fphover Java applets) */
.mr-btn { display: inline-block; min-width: 120px; height: 24px; line-height: 24px; margin: 1px 2px; padding: 0 8px; box-sizing: border-box;
  text-align: center; font: bold 14px Helvetica, Arial, sans-serif; text-decoration: none; border: 2px outset #8080c0; }
.mr-btn:hover, .mr-btn:focus { filter: brightness(1.45); border-style: inset; }

.mr-inline { border: 1px solid #ccc; padding: 6px; max-width: 100%; overflow: auto; }

@media (max-width: 640px) {
  table[width], td[width], th[width] { width: auto !important; }
  table { max-width: 100% !important; height: auto !important; }
  img[width] { height: auto !important; }
  pre { white-space: pre-wrap; }
  /* wide data tables scroll inside their own box instead of widening the page */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  td, th { white-space: normal !important; }
  td[style*="width"], th[style*="width"] { width: auto !important; }
  /* Word-generated indents and fixed widths */
  [style*="margin-left"] { margin-left: 0 !important; }
  [style*="width:"] { max-width: 100% !important; }
  p, h1, h2, h3, li { overflow-wrap: break-word; }
}
