/* mode97.css · the site in 1997 manners (test-1997.html only).
   Default browser type and link colours, one centred column, <hr> between
   sections. The only pictures made here are the pixel sprites js/mode97.js
   draws; everything else is the site's own work, untouched. */

html { background: #56636b; }
body {
  margin: 0;
  background-color: #56636b; /* the ground behind the window; js adds a faint pixel dither */
  color: #000;
  font-family: Times, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.3;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-wrap: break-word;
}
a:link { color: #0000ee; }
a:visited { color: #551a8b; }
a:active { color: #ee0000; }
a { text-decoration: underline; }

#m97 {
  background-color: #c3c3c3; /* js adds a soft pixel tile on top */
  padding: 10px 12px 28px;
  text-align: left;
  box-sizing: border-box;
}
#m97-top, #m97-page, #m97-foot { max-width: 640px; margin-left: auto; margin-right: auto; }
#m97-page [id] { scroll-margin-top: 130px; }
#m97-top, #m97-foot .m97-c { text-align: center; }
.m97-name { font-size: 2em; margin: 0.4em 0 0.2em; }
.m97-nav { margin: 0.3em 0 0.6em; }
#m97-wait { text-align: center; }

#m97-page h1 { text-align: center; }
#m97-page h1, #m97-page h2, #m97-page h3, #m97-page h4 { line-height: 1.15; }
#m97-page table { border-collapse: separate; max-width: 100%; }
#m97-page td, #m97-page th { vertical-align: top; text-align: left; }
#m97-page li p { margin: 0.25em 0; }
#m97-page blockquote { margin: 1em 1.5em; }
#m97-page blockquote.m97-note { margin: 0.4em 0 1em 1.5em; }
#m97-page dt { font-weight: bold; }
#m97-page dd { margin-left: 1.5em; }
#m97-page pre { white-space: pre-wrap; }
.m97-cap, .m97-fig p { margin: 0.2em 0 1em; }
.m97-sum { font-weight: bold; }
.m97-anchor { display: block; height: 0; }

/* A picture: the full column, nothing around it. While it loads it is a plain
   box with its alt text, the way a browser used to hold the place. */
.m97-fig { margin: 1em 0; }
.m97-pic {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: default;
}
.m97-pic.wait { box-shadow: inset 0 0 0 1px #808080; cursor: pointer; }
.m97-pic .m97-alt {
  position: absolute; left: 6px; top: 5px; right: 6px;
  font-size: 0.8em; color: #333; text-decoration: none;
}
.m97-pic canvas {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  display: block;
}
.m97-pic img { display: block; width: 100%; height: auto; border: 0; }
.m97-pic.done { aspect-ratio: auto; box-shadow: none; }
a.m97-piclink { display: block; text-decoration: none; }
td .m97-pic { width: 84px; }
td .m97-fig { margin: 0; }
td.m97-thumb { width: 84px; }

/* Grown-up words barred (PG16 and Kids), as the site does it */
.m97-bar { background: #000; color: #000; -webkit-user-select: none; user-select: none; }

/* Period furniture. Sprites are drawn in code and stay pixelated. */
.m97-px { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: middle; }
hr.m97-rule {
  border: 0; height: 8px; margin: 1.4em 0;
  background-repeat: repeat-x; background-position: center;
  image-rendering: pixelated;
}
#m97-foot h3 { margin: 1.2em 0 0.4em; }
#m97-foot ul { margin: 0.4em 0; padding-left: 1.6em; }
#m97-foot table { margin: 0.8em auto; }
#m97-foot td { text-align: center; padding: 6px 10px; }
#m97-count { display: block; margin: 0 auto 4px; }
#m97-build { display: block; margin: 0 auto; }

/* The way out: a small fixed link. It stays above everything, the dial-up box included. */
#m97-leave {
  position: fixed; right: 6px; bottom: 4px; z-index: 90;
  background: #c3c3c3; color: #0000ee;
  border: 2px solid; border-color: #f4f4f4 #5a5a5a #5a5a5a #f4f4f4;
  padding: 1px 8px;
  font: 13px/1.3 Arial, Helvetica, sans-serif;
}
#m97-leave:visited { color: #0000ee; }

/* One short tear when a page connects after the visitor follows a link.
   Two steps in under a third of a second, then still. */
@keyframes m97-tear {
  0% { transform: translateX(7px) skewX(-1.5deg); }
  50% { transform: translateX(-4px); }
  100% { transform: none; }
}
#m97-page.m97-tear { animation: m97-tear 0.3s steps(1, end) 1; }
#m97-scan {
  position: fixed; left: 0; right: 0; height: 5px; z-index: 40;
  background: #000; opacity: 0.25; pointer-events: none;
}

@media (max-width: 480px) {
  #m97 { padding: 8px 10px 24px; }
  .m97-name { font-size: 1.7em; }
  #m97-page blockquote { margin: 1em 0.9em; }
  td .m97-pic, td.m97-thumb { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  #m97-page.m97-tear { animation: none; }
  #m97-scan { display: none; }
}

/* ── The window: a plain grey bevel frame of this page's own design ── */
#m97-win {
  max-width: 720px; margin: 10px auto 14px;
  background: #c3c3c3;
  border: 2px solid; border-color: #f4f4f4 #4a4a4a #4a4a4a #f4f4f4;
  box-shadow: 1px 1px 0 #2e363b;
}
#m97-bar {
  position: sticky; top: 0; z-index: 30;
  background: #c3c3c3; border-bottom: 2px solid #8a8a8a;
  font: 13px/1.3 Arial, Helvetica, sans-serif; color: #000;
}
.m97-title {
  display: flex; align-items: center; gap: 8px;
  background: #6d2317; color: #fff; padding: 3px 4px 3px 8px; font-weight: bold;
}
.m97-ttl { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#m97-bar button, .m97-dbox button {
  font: 13px/1.2 Arial, Helvetica, sans-serif; color: #000;
  background: #c3c3c3; border: 2px solid; border-color: #f4f4f4 #4a4a4a #4a4a4a #f4f4f4;
  border-radius: 0; padding: 3px 10px; margin: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
#m97-bar button:active, .m97-dbox button:active { border-color: #4a4a4a #f4f4f4 #f4f4f4 #4a4a4a; }
#m97-bar button:disabled, .m97-dbox button:disabled { color: #7a7a7a; cursor: default; }
#m97-bar button:focus-visible, .m97-dbox button:focus-visible, .m97-dbox a:focus-visible, #m97-url:focus-visible, #m97-leave:focus-visible {
  outline: 2px dotted #000; outline-offset: 1px;
}
.m97-title button.m97-hang { padding: 1px 8px; font-size: 12px; flex: none; }
.m97-title button.m97-hang:focus-visible { outline-color: #fff; }
.m97-tools { display: flex; gap: 4px; padding: 5px 6px 2px; }
.m97-loc { display: flex; align-items: center; gap: 6px; padding: 4px 6px 5px; }
.m97-loc label { flex: none; }
#m97-url {
  flex: 1 1 auto; min-width: 0; box-sizing: border-box;
  font: 13px/1.2 "Courier New", Courier, monospace; color: #000; background: #fff;
  border: 2px solid; border-color: #4a4a4a #f4f4f4 #f4f4f4 #4a4a4a; border-radius: 0;
  padding: 2px 4px; margin: 0;
}
#m97-act { flex: none; width: 30px; height: 18px; }
#m97-status {
  position: sticky; bottom: 0; z-index: 30;
  background: #c3c3c3; border-top: 2px solid; border-color: #f4f4f4;
  box-shadow: 0 -1px 0 #8a8a8a;
  font: 12px/1.3 Arial, Helvetica, sans-serif; color: #000;
  padding: 3px 110px 3px 8px; min-height: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* the line is down: the page stays where it is, dimmed by the box's ground */
#m97-win.m97-off #m97 a { cursor: default; }

/* ── The dial-up box ── */
#m97-dial {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; box-sizing: border-box;
  font: 14px/1.35 Arial, Helvetica, sans-serif; color: #000;
}
#m97-dial.ground { background-color: #56636b; }
#m97-dial.lost { background: rgba(20, 24, 27, 0.55); }
.m97-dbox {
  width: 340px; max-width: 100%;
  background: #c3c3c3;
  border: 2px solid; border-color: #f4f4f4 #4a4a4a #4a4a4a #f4f4f4;
  box-shadow: 2px 2px 0 #2e363b;
}
.m97-dtitle { background: #6d2317; color: #fff; font-weight: bold; padding: 4px 8px; }
.m97-dbody { padding: 12px 14px 14px; }
.m97-drow { margin: 0 0 6px; }
.m97-lights { display: flex; gap: 6px; margin: 12px 0 8px; }
.m97-lights i {
  display: block; width: 14px; height: 10px; background: #8a8a8a;
  border: 2px solid; border-color: #4a4a4a #f4f4f4 #f4f4f4 #4a4a4a;
}
.m97-lights i.on { background: #2fb36b; }
.m97-lights i.bad { background: #e03a1f; }
.m97-dstatus { margin: 0 0 14px; min-height: 2.7em; }
.m97-dacts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.m97-dbox button.m97-dgo { font-weight: bold; padding: 5px 16px; }
.m97-dbox button.m97-dsound { margin-left: auto; font-size: 12px; padding: 3px 8px; }
.m97-dskip { color: #0000ee; }

@media (max-width: 600px) {
  /* phones: a thin title bar and the location field; the page keeps the width */
  #m97-win { margin: 0; border: 0; box-shadow: none; max-width: none; }
  .m97-tools { display: none; }
  .m97-title { padding: 2px 4px 2px 6px; font-size: 12px; }
  .m97-title button.m97-hang { font-size: 11px; padding: 0 6px; }
  .m97-loc { padding: 3px 4px; gap: 4px; }
  .m97-loc label { display: none; }
  #m97-url { font-size: 16px; padding: 1px 4px; } /* 16px: a phone does not zoom the page when the field is touched */
  #m97-status { font-size: 11px; padding-right: 96px; }
  #m97-leave { font-size: 11px; bottom: 2px; right: 3px; padding: 0 6px; }
  #m97-page [id] { scroll-margin-top: 70px; }
}
@media print {
  #m97-leave, #m97-build, #m97-bar, #m97-status, #m97-dial { display: none; }
}
