:root { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #c0c0c0;
  color: #000;
  font: 15px/1.45 Tahoma, Verdana, "Trebuchet MS", sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: #0000ee; }
a:visited { color: #551a8b; }
:focus-visible { outline: 1px dotted #000; outline-offset: 2px; }
code { font-family: "Courier New", Courier, monospace; color: #000; }

.sr, .skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  background: #fff;
  padding: 6px 10px;
  z-index: 20;
}

.site {
  width: min(980px, calc(100% - 16px));
  margin: 10px auto 24px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  padding: 3px;
}

.banner {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #000066;
  color: #fff;
  padding: 10px 12px;
}
.seal {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #000;
  border: 2px solid #fff;
  flex: none;
}
.banner-copy { min-width: 0; flex: 1; }
.eyebrow, .tag, .clock, .signed, .fine, .crumb, .nav-kicker {
  margin: 0;
}
.eyebrow {
  color: #ffcc66;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.banner h1 {
  margin: 1px 0;
  font-size: clamp(20px, 3.4vw, 30px);
  letter-spacing: .04em;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
}
.tag { color: #d0d8ff; font-size: 13px; }
.banner-side {
  text-align: right;
  font-size: 12px;
  flex: none;
}
.clock { color: #ffcc66; font-family: "Courier New", Courier, monospace; margin: 2px 0 6px; }
.signed { font-weight: bold; }

.bevel, .line-btn {
  font: 13px Tahoma, Verdana, sans-serif;
  color: #000;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  padding: 4px 10px;
  text-decoration: none;
  cursor: pointer;
}
.bevel:visited { color: #000; }
.bevel:hover, .line-btn:hover { color: #000; }
.bevel:active, .line-btn:active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}
.bevel.is-wait { color: #666; }
.alarm {
  background: #ff6600;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 16px;
  margin-top: 4px;
}

.tape {
  overflow: hidden;
  background: #ffffcc;
  border-bottom: 1px solid #808080;
  color: #000;
}
.tape-track {
  display: flex;
  width: max-content;
  animation: tape 28s linear infinite;
}
.tape-track span {
  padding: 4px 0;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .04em;
  white-space: nowrap;
}
@keyframes tape { to { transform: translateX(-50%); } }

.shell {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 8px;
  padding: 8px;
}
.sidenav {
  background: #ffffcc;
  border: 1px solid #808080;
  padding: 8px 10px 12px;
  align-self: start;
}
.sidenav a { display: block; margin: 3px 0; }
.nav-kicker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #000066;
  font-weight: bold;
  margin: 10px 0 4px;
}
.sidenav > .nav-kicker:first-child { margin-top: 0; }
.sidebox {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px dashed #808080;
}
.depts { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.depts li { display: block; margin: 7px 0; }
.depts b { display: block; }
.depts span { display: block; color: #333; text-align: left; font-size: 12px; }
.struck { text-decoration: line-through; color: #666; }
.badge-no {
  margin: 4px 0;
  font: bold 16px "Courier New", Courier, monospace;
  color: #000066;
}

.crumb { color: #333; font-size: 12px; margin: 0 0 8px; }
.win { margin: 0 0 10px; background: #d4d0c8; padding: 2px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
}
.win-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  padding: 3px 6px;
}
.win-body { background: #fff; margin: 2px; padding: 12px 14px 14px; }
.win-body h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #000066;
}
.win-body article { margin: 0 0 12px; }
.win-body article:last-child { margin-bottom: 0; }
.win-body p { margin: 0 0 10px; }
.lead { font-size: 16px; }

.new {
  background: #cc0000;
  color: #fff;
  font-size: 10px;
  letter-spacing: .08em;
  padding: 0 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.stats, .form { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.stats th, .stats td, .form th, .form td {
  border: 1px solid #808080;
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.stats th, .form th { background: #ece9d8; font-weight: bold; }
.form th { width: 34%; }
.stats td { font: bold 22px "Courier New", Courier, monospace; background: #f7f7f2; }
.status { color: #993300; font-size: 14px; }

.letterhead {
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  color: #000066;
  letter-spacing: .04em;
}
.memo p, .sign { font-family: "Times New Roman", Times, serif; font-size: 17px; }
.sign { margin-bottom: 12px; }
.fine { color: #333; font-size: 12px; margin: 8px 0 0; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form td { word-break: break-word; }

.break { background: #fffdf6; }
.mug-wrap { text-align: center; }
.mug-stage {
  position: relative;
  width: min(220px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto;
  touch-action: manipulation;
}
.mug {
  display: block;
  width: 100%;
  height: 100%;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50%;
  border: 3px solid #808080;
  background:
    radial-gradient(circle at 50% 45%, #fff 0 18%, transparent 19%),
    #f3e6d4;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mug.hit { box-shadow: inset 0 0 0 4px #228b22; }
.mug.miss { box-shadow: inset 0 0 0 4px #993300; }
.target, .pulse {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.target {
  left: 18%;
  top: 18%;
  width: 64%;
  height: 64%;
  border: 3px solid #cc5200;
}
.pulse {
  left: 46%;
  top: 46%;
  width: 8%;
  height: 8%;
  background: #e07020;
  opacity: 1;
}
.call {
  font-weight: bold;
  letter-spacing: .08em;
  color: #000066;
  margin: 8px 0 0;
}
.meta { color: #333; font-size: 13px; }
.construct {
  margin: 12px 0 0;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  color: #000;
  background: #ffe14d;
  border: 3px dashed #000;
}

.dos {
  min-height: 150px;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  color: #000;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  padding: 8px;
  font: 13px/1.45 "Courier New", Courier, monospace;
}
.dos div { margin: 0 0 4px; white-space: pre-wrap; }
.dos .ok { color: #000066; }
.dos .warn { color: #993300; }
#termForm {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  font: 13px "Courier New", Courier, monospace;
}
.prompt { color: #000066; font-weight: bold; }
#termIn {
  flex: 1;
  min-width: 0;
  font: 13px "Courier New", Courier, monospace;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  padding: 4px;
}

.line-list { display: flex; flex-direction: column; gap: 6px; }
.line-btn {
  text-align: left;
  padding: 8px 10px;
  font-family: "Courier New", Courier, monospace;
}
.line-btn.copied { background: #ffff99; font-weight: bold; }
.copy-status { margin: 0; min-height: 0; }
.copy-status:not(:empty) {
  margin-top: 8px;
  padding: 6px 8px;
  background: #ffff99;
  border: 1px solid #000;
  font-weight: bold;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px 10px;
  font-size: 12px;
  color: #222;
}
.foot p { margin: 4px 0 0; }
.odo {
  display: inline-flex;
  background: #000;
  padding: 2px;
}
.odo i {
  font-style: normal;
  font: bold 16px "Courier New", Courier, monospace;
  color: #ff3300;
  background: #1a0000;
  margin: 0 1px;
  padding: 0 3px;
}

.drill {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #ff6600;
  color: #000;
  opacity: 0;
  pointer-events: none;
}
.drill.on { opacity: 1; pointer-events: auto; }
.drill-card {
  width: min(640px, calc(100% - 32px));
  background: #fff;
  border: 4px solid #000;
  text-align: center;
  padding: 22px 16px 16px;
}
.drill-kicker {
  margin: 0;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: bold;
}
.drill-card h2 {
  margin: 6px 0;
  font-size: clamp(32px, 7vw, 54px);
  line-height: .95;
  letter-spacing: .02em;
}
.drill-id {
  font: bold 18px "Courier New", Courier, monospace;
  margin: 0 0 8px;
}
.drill-hint { font-size: 12px; letter-spacing: .12em; font-weight: bold; }

.noscript {
  width: min(980px, calc(100% - 16px));
  margin: 8px auto;
  background: #fff;
  padding: 8px;
}

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .banner { flex-wrap: wrap; }
  .banner-side { text-align: left; width: 100%; }
  .sidenav a { display: inline-block; margin: 2px 10px 2px 0; }
  .stats td { font-size: 16px; }
  .foot { flex-direction: column; }
  .form th { width: 38%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track { animation: none; }
  .new { animation: none; }
  .pulse { left: 18%; top: 18%; width: 64%; height: 64%; opacity: .9; }
}
