/* Section 72: Exploratory Technologies. Technology level: a few centuries behind.
   Late-90s homepage, built from system fonts and CSS. No images, no JavaScript. */

:root {
  --silver: #c0c0c0;
  --light: #ffffff;
  --shade: #808080;
  --dark: #000000;
  --navy: #000080;
  --link: #0000ee;
  --visited: #551a8b;
  --paper: #fffff0;
  --serif: "Times New Roman", Times, "Liberation Serif", serif;
  --mono: "Courier New", Courier, "Liberation Mono", monospace;
  --ui: Tahoma, Verdana, "DejaVu Sans", sans-serif;
}

* { box-sizing: border-box; }
html { background: #008080; } /* desktop teal */
body {
  margin: 0;
  padding: 1rem;
  color: var(--dark);
  font: 1.125rem/1.5 var(--serif);
  background: #008080;
}
a { color: var(--link); }
a:visited { color: var(--visited); }
a:focus-visible { outline: 2px dotted var(--dark); outline-offset: 2px; }

/* The page sits in a window, like everything did. */
.window {
  max-width: 46rem;
  margin: 0 auto;
  background: var(--silver);
  border: 2px solid;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset -1px -1px 0 var(--shade), inset 1px 1px 0 #dfdfdf;
  padding: 3px;
}
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0.4rem;
  color: var(--light);
  font: 700 0.9rem/1.2 var(--ui);
  background: linear-gradient(90deg, var(--navy), #1084d0);
}
.titlebar .buttons { display: flex; gap: 2px; }
.titlebar .buttons span, .titlebar .buttons a {
  width: 1.1rem; height: 0.95rem;
  background: var(--silver);
  border: 1px solid; border-color: var(--light) var(--dark) var(--dark) var(--light);
  color: var(--dark); font: 700 0.65rem/0.8rem var(--ui); text-align: center;
}
.page {
  margin-top: 3px;
  padding: 1rem 1.25rem 1.5rem;
  background: var(--paper);
  border: 2px solid;
  border-color: var(--shade) var(--light) var(--light) var(--shade);
}

h1 { margin: 0.25rem 0 0.25rem; font: 700 2.25rem/1.1 var(--serif); text-align: center; }
h2 { margin: 1.5rem 0 0.5rem; font: 700 1.4rem/1.2 var(--serif); }
.sub { margin: 0; text-align: center; font-style: italic; }
hr {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--shade);
  border-bottom: 1px solid var(--light);
}
p { margin: 0 0 0.85rem; }
ul { margin: 0 0 0.85rem; padding-left: 1.5rem; }
code, .mono { font: 0.95em var(--mono); }

.construction {
  margin: 1rem 0;
  padding: 0.5rem 0.75rem;
  font: 700 0.95rem/1.3 var(--ui);
  text-align: center;
  background: repeating-linear-gradient(-45deg, #ffd800 0 14px, #000 14px 28px);
}
.construction span { display: inline-block; padding: 0.15rem 0.5rem; background: #ffd800; }

/* Navigation as a bevelled button row */
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 1rem 0; padding: 0; list-style: none; }
.nav a, .button {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  color: var(--dark);
  font: 0.95rem/1.3 var(--ui);
  text-decoration: none;
  background: var(--silver);
  border: 2px solid;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
}
.nav a:active, .button:active { border-color: var(--dark) var(--light) var(--light) var(--dark); }
.nav a[aria-current="page"] { font-weight: 700; border-color: var(--dark) var(--light) var(--light) var(--dark); }

/* A dialog box */
.dialog {
  margin: 1rem 0;
  background: var(--silver);
  border: 2px solid;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  font: 0.95rem/1.4 var(--ui);
}
.dialog .titlebar { font-size: 0.85rem; }
.dialog .body { padding: 0.75rem 1rem; }
.dialog .log { margin: 0; padding: 0.5rem; font: 0.9rem/1.4 var(--mono); background: var(--light); border: 2px solid; border-color: var(--shade) var(--light) var(--light) var(--shade); white-space: pre-wrap; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }

/* Out of character: plainly marked */
.ooc {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  font: 1rem/1.5 var(--ui);
  background: var(--light);
  border: 1px dashed var(--dark);
}
.ooc h2 { margin-top: 0; font: 700 1rem/1.3 var(--ui); text-transform: uppercase; letter-spacing: 0.05em; }

/* Personnel file */
.file { width: 100%; margin: 0.5rem 0 1rem; border-collapse: collapse; font: 0.95rem/1.4 var(--mono); }
.file th, .file td { padding: 0.35rem 0.5rem; text-align: left; vertical-align: top; border: 1px solid var(--shade); }
.file th { width: 40%; background: #e8e8e8; font-weight: 700; }
.redacted { background: var(--dark); color: var(--dark); }

blockquote { margin: 0 0 0.85rem; padding-left: 1rem; border-left: 4px solid var(--shade); font-style: italic; }

/* 88x31 buttons, made of CSS */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 1rem 0 0.5rem; }
.badge {
  display: inline-flex; flex-direction: column; justify-content: center;
  width: 88px; height: 31px; overflow: hidden;
  font: 700 9px/1.05 var(--ui); text-align: center; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--dark);
}
.badge.b1 { background: var(--navy); color: #fff; }
.badge.b2 { background: #ffd800; color: #000; }
.badge.b3 { background: #000; color: #0f0; font-family: var(--mono); }
a.badge:visited { color: inherit; }
.badge-img { display: block; width: 88px; height: 31px; }
.badge-img img { display: block; image-rendering: pixelated; }

/* Link to us! */
.linkus { margin: 1rem 0; padding: 0.75rem 1rem; text-align: center; font: 0.95rem/1.5 var(--ui); background: var(--silver);
          border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); }
.linkus p { margin: 0 0 0.5rem; }
.linkus img { display: inline-block; image-rendering: pixelated; vertical-align: middle; }
.linkus pre { margin: 0; padding: 0.5rem; overflow-x: auto; text-align: left; font: 0.8rem/1.4 var(--mono); background: var(--light);
              border: 2px solid; border-color: var(--shade) var(--light) var(--light) var(--shade); }

/* Links round the TIMDA ring */
.ring { margin: 0.25rem 0 0.75rem; text-align: center; font: 700 0.9rem/1.5 var(--ui); }

.counter { text-align: center; font: 0.9rem/1.4 var(--ui); }
.counter .digits { display: inline-block; padding: 0 0.35rem; background: #000; color: #0f0; font: 700 1rem/1.4 var(--mono); letter-spacing: 0.15em; }
footer { margin-top: 1.25rem; font: 0.85rem/1.5 var(--ui); text-align: center; color: #333; }

@media (max-width: 30rem) {
  body { padding: 0.4rem; font-size: 1.0625rem; }
  .page { padding: 0.75rem 0.85rem 1.25rem; }
  h1 { font-size: 1.75rem; }
  .file th { width: 45%; }
}

/* Staging and preview copies only (added by functions/_middleware.js) */
.env-bar {
  margin: -1rem -1rem 1rem;
  padding: 0.2rem 1rem;
  font: 700 0.85rem/1.5 var(--ui); text-transform: uppercase; letter-spacing: 0.08em; text-align: center;
  color: var(--dark);
  background: #ffd800;
  border-bottom: 6px solid;
  border-image: repeating-linear-gradient(-45deg, var(--dark) 0 8px, #ffd800 8px 16px) 6;
}

/* The minimize button is a door (to /lab). It looks like the others. */
.titlebar .buttons a { display: block; text-decoration: none; line-height: calc(0.8rem - 4px); } /* lifts the _ off the bottom edge, like Win95's */
.titlebar .buttons a:visited { color: var(--dark); }
.titlebar .buttons span { cursor: default; }  /* maximize and close: they press, but go nowhere */
.titlebar .buttons a:active, .titlebar .buttons span:active { border-color: var(--dark) var(--light) var(--light) var(--dark); }

/* Redactions give themselves away when highlighted */
.redacted::selection { color: var(--dark); background: #ffd800; }

/* The laboratory logon */
.logon .body p { margin: 0 0 0.6rem; }
.logon label { display: inline-block; min-width: 6.5rem; }
.logon input {
  width: min(16rem, 100%); padding: 0.15rem 0.3rem; font: 0.95rem var(--mono); background: var(--light);
  border: 2px solid; border-color: var(--shade) var(--light) var(--light) var(--shade);
}
.logon .actions { margin: 0.9rem 0 0; }
.logon button, .logon .btn {
  display: inline-block; min-width: 5rem; padding: 0.2rem 0.75rem; font: 0.95rem var(--ui); color: var(--dark);
  text-align: center; text-decoration: none; background: var(--silver); cursor: pointer;
  border: 2px solid; border-color: var(--light) var(--dark) var(--dark) var(--light);
}
.logon button:active, .logon .btn:active { border-color: var(--dark) var(--light) var(--light) var(--dark); }
.denied .body p { margin: 0 0 0.4rem; }
.outside { margin: 0.75rem 0; font: 700 1rem var(--ui); }

/* The logon's padlock, made of CSS (the page still has no images). It sits beside
   the instructions and fields, centred on them, above the buttons. */
.logon .body { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; }
.logon .fields { display: contents; }
.logon .fields > p { grid-column: 2; }
.logon .fields > .actions { grid-column: 2; }
.lock { grid-column: 1; grid-row: 1 / span 3; position: relative; width: 36px; height: 46px; }
.lock::before { /* shackle: grey, outlined in black */
  content: ""; position: absolute; left: 9px; top: 2px; width: 18px; height: 22px; box-sizing: border-box;
  border: 5px solid var(--shade); border-bottom: 0; border-radius: 10px 10px 0 0;
  box-shadow: 0 0 0 2px var(--dark), inset 0 0 0 2px var(--dark);
}
.lock::after { /* body: brass, lit top-left, shadowed bottom-right */
  content: ""; position: absolute; left: 2px; top: 20px; width: 32px; height: 26px; box-sizing: border-box;
  background: #ffd800; border: 2px solid var(--dark);
  box-shadow: inset 3px 3px 0 #fff08a, inset -3px -3px 0 #c8a000;
}
.lock .keyhole { /* cut into the brass: a grey edge below and right */
  position: absolute; z-index: 1; left: 15px; top: 27px; width: 6px; height: 6px; background: var(--dark); border-radius: 50%;
  box-shadow: 1px 1px 0 var(--shade);
}
.lock .corners { /* where the lit faces meet the shadowed ones (top right, bottom left): plain brass */
  position: absolute; z-index: 1; left: 4px; top: 22px; width: 28px; height: 22px;
  --c: linear-gradient(#ffd800, #ffd800);
  background: var(--c) right top / 3px 3px no-repeat, var(--c) left bottom / 3px 3px no-repeat;
}
.lock .keyhole::after { content: ""; position: absolute; left: 2px; top: 4px; width: 2px; height: 6px; background: var(--dark); box-shadow: 1px 1px 0 var(--shade); }
.titlebar .buttons .help { cursor: help; }
.digits[title] { cursor: help; }
@media (max-width: 30rem) {
  .lock { display: none; }
  .logon .body { grid-template-columns: 1fr; }
  .logon .fields > p, .logon .fields > .actions { grid-column: 1; }
}

.dialog .log + p { margin-top: 0.6rem; }
