/* The Sublapse Archive. Old style on purpose: 2003 layout, Verdana, bevelled buttons.
   Liminal tape colours: dull charcoal and washed-out off-white, faint colour fringes, scanlines. */

:root {
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --toner: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='t'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .18 0'/></filter><rect width='100%' height='100%' filter='url(%23t)'/></svg>");
  --tape: #4a4a46;
  --tape-dark: #1c1c1a;
  --text: #c4c2b8;
  --bright: #ecebe4;
  --dim: #7f7d74;
  --line: #34342f;
  --panel: #151514;
  --osd: #f2f2f2;
  --fringe: -1px 0 rgba(255, 60, 60, .22), 1px 0 rgba(60, 220, 230, .22);
}

body {
  margin: 0;
  padding: 12px 0 24px;
  background-color: #0b0b0a;
  background-image:
    var(--noise),
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(220,218,200,.04), transparent 70%);
  font-family: Verdana, Tahoma, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}

/* Scanlines and a vignette over the whole screen, like a CRT */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 60%, rgba(0,0,0,.55));
}

a { color: #e4dfc2; }
a:visited { color: #a5a397; }
a:hover { color: #ffffff; }

#page {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto;
  background: #121211;
  border: 1px solid #000;
  box-shadow: 0 0 0 1px #262624, 0 0 40px rgba(0, 0, 0, 0), 6px 6px 18px rgba(0,0,0,.8);
}

/* Header: tape blue, logo, VCR on-screen readout */
#header {
  background: radial-gradient(ellipse 70% 140% at 35% 50%, #33332f, var(--tape-dark));
  color: #fff;
  border-bottom: 3px solid #000;
  display: table;
  width: 100%;
}
#header .cell { display: table-cell; vertical-align: middle; padding: 12px 16px; }
#header .logo-cell { width: 116px; padding-right: 4px; }
.mark { display: block; border: 2px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,.5); }
#logo {
  font-family: "Arial Black", Impact, Arial, sans-serif;
  font-size: 34px;
  letter-spacing: 3px;
  color: #d2d0c6;
  text-decoration: none;
  text-shadow: -2px 0 rgba(255, 60, 60, .25), 2px 0 rgba(60, 220, 230, .25), 0 0 6px rgba(0, 0, 0, .7);
}
#logo:visited { color: #d2d0c6; }
#tagline { font-size: 12px; color: #b9b7ad; letter-spacing: 2px; margin-top: 4px; text-shadow: var(--fringe); }
#division { font-size: 11px; color: #8a887f; margin-top: 2px; }
.osd {
  text-align: right;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.35;
  color: var(--osd);
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #000, var(--fringe);
}
.osd .play { font-size: 22px; }

/* Stripe under the header: tracking noise at the bottom of the tape */
#grille {
  height: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 2px, transparent 2px 7px, rgba(255,255,255,.12) 7px 9px, transparent 9px 17px),
    #000;
  border-bottom: 1px solid #000;
}

/* Top button bar */
#topnav {
  background: #1a1a18;
  border-bottom: 1px solid #000;
  padding: 5px 8px;
}
#topnav a {
  display: inline-block;
  margin: 1px 1px;
  padding: 3px 12px;
  background: #262624;
  border: 2px outset #4a4a45;
  color: #d6d4ca;
  text-decoration: none;
  font-size: 13px;
}
#topnav a:hover { color: #fff; background: #30302d; }
#topnav a:active, #topnav a.on { border-style: inset; background: var(--tape); color: #fff; text-shadow: var(--fringe); }

/* Two columns */
#cols { display: table; width: 100%; table-layout: fixed; }
#side, #main { display: table-cell; vertical-align: top; }
#side {
  width: 230px;
  background: #0e0e0d;
  border-right: 1px solid #000;
  padding: 10px 8px;
  font-size: 12.5px;
}
#main {
  padding: 18px 26px 30px;
  line-height: 1.6;
  background-color: #141413;
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 255, 240, .03), transparent 70%);
}

.box { border: 1px solid var(--line); background: var(--panel); margin-bottom: 12px; }
.box .t {
  background: linear-gradient(180deg, #3d3d39, #232321);
  color: #fff;
  font-weight: bold;
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 6px;
  border-bottom: 1px solid #000;
  text-shadow: var(--fringe);
}
.box .b { padding: 6px; }
.box ul { margin: 0; padding-left: 14px; }
.box li { margin: 2px 0; }

#find input[type=text] {
  width: 70px; font-size: 12px; font-family: "Courier New", monospace;
  background: #000; color: #fff; border: 2px inset #4a4a45;
}
#find button { font-size: 12px; background: #262624; color: #d6d4ca; border: 2px outset #4a4a45; }
#find .msg { color: #ffffff; margin-top: 4px; }

.counter {
  display: inline-block;
  background: #000;
  color: #f2f2f2;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 2px;
  padding: 1px 5px;
  border: 2px inset #4a4a45;
  text-shadow: var(--fringe);
}

/* Content */
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 30px;
  color: var(--bright);
  margin: 0 0 4px;
  border-bottom: 1px solid var(--line);
  text-shadow: -2px 0 rgba(255, 60, 60, .25), 2px 0 rgba(60, 220, 230, .25);
}
.sub { color: var(--dim); font-size: 12.5px; margin-bottom: 14px; }
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: normal;
  font-size: 22px;
  color: #e0ded4;
  border-bottom: 1px solid #2a2a27;
  margin: 20px 0 8px;
  text-shadow: var(--fringe);
}
h3 { font-size: 15px; margin: 14px 0 4px; color: #e0ded4; }
b { color: var(--bright); }
p { margin: 0 0 10px; }
hr { border: 0; border-top: 1px dashed var(--line); margin: 16px 0; }

blockquote {
  margin: 10px 0 14px;
  padding: 10px 14px;
  background: #0e0e0d;
  border-left: 4px solid var(--tape);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: #d8d6cc;
}

table.grid { border-collapse: collapse; width: 100%; margin: 6px 0 14px; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 4px 6px; vertical-align: top; text-align: left; }
table.grid th { background: #222220; color: #e0ded4; font-size: 12.5px; }
table.grid tr:nth-child(even) td { background: #181817; }
table.grid td:first-child, table.grid th:first-child { white-space: nowrap; }

/* Record infobox */
.infobox {
  float: right;
  width: 330px;
  margin: 0 0 12px 14px;
  border: 1px solid #000;
  border-collapse: collapse;
  background: #121211;
  font-size: 12.5px;
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.infobox th, .infobox td { border: 1px solid var(--line); padding: 4px 6px; vertical-align: top; text-align: left; }
.infobox th { width: 88px; background: #222220; color: #e0ded4; }
.infobox .head { background: #000; color: #fff; text-align: center; font-family: "Courier New", monospace; font-size: 15px; font-weight: bold; letter-spacing: 3px; text-shadow: var(--fringe); }
.infobox .stat { text-align: center; color: #fff; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; }
.nf { color: #66645c; font-style: italic; }

.status-monitoring { background: #3e4a52; }
.status-active { background: #7a6a2a; }
.status-terminal { background: #6e2222; }
.status-sealed { background: #2a2a28; outline: 1px solid #55554f; outline-offset: -1px; }
.status-unsurveyed { background: #4a4a46; }
.tag { display: inline-block; color: #fff; font-size: 11px; font-weight: bold; padding: 0 5px; letter-spacing: 1px; text-transform: uppercase; }

/* Surveyor's note: a tired photocopy, grey under the screen */
.note {
  clear: both;
  margin: 16px 4px 10px 2px;
  padding: 14px 16px 14px 42px;
  background-color: #cfcdc4;
  background-image:
    var(--toner),
    radial-gradient(ellipse 40% 30% at 95% 8%, rgba(40,40,30,.35), transparent 70%),
    radial-gradient(ellipse 25% 40% at 2% 95%, rgba(30,30,25,.3), transparent 70%),
    repeating-linear-gradient(180deg, transparent 0 24px, rgba(70,70,70,.25) 24px 25px);
  background-position: 0 0, 0 0, 0 0, 0 14px;
  border-left: 3px double rgba(140,30,50,.55);
  color: #1a1a18;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 25px;
  transform: rotate(-.4deg);
  box-shadow: inset 0 0 28px rgba(0,0,0,.35), 3px 4px 10px rgba(0,0,0,.6);
}
.note b { color: #000; }
.note a { color: #333333; }

.notice {
  border: 1px solid #000;
  border-left: 10px solid transparent;
  border-image: repeating-linear-gradient(135deg, #a8913a 0 6px, #000 6px 12px) 0 0 0 10;
  background: #1a1a17;
  color: #d8d6cc;
  padding: 6px 10px;
  margin: 0 0 14px;
  font-size: 13px;
}
.notice b { color: #e3cf8a; }
.stamp {
  display: inline-block;
  border: 2px solid #8e2a2a;
  color: #b04040;
  padding: 1px 6px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 2px;
  transform: rotate(-3deg);
  opacity: .9;
}
.open { margin-top: 18px; color: var(--dim); font-size: 12.5px; border-top: 1px solid #2a2a27; padding-top: 6px; }

/* Footer */
#footer {
  border-top: 1px solid #000;
  background: #0c0c0b;
  font-size: 12px;
  color: #66645c;
  text-align: center;
  padding: 6px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  body { padding: 0; }
  #page { border: 0; box-shadow: none; }
  #side, #main, #header, #header .cell { display: block; width: auto; }
  #cols { display: flex; flex-direction: column-reverse; }
  #side { border-right: 0; border-top: 1px solid #000; }
  #header .logo-cell { float: left; width: 72px; }
  .mark { width: 72px; height: 72px; }
  #logo { font-size: 22px; }
  .osd { display: none; }
  .infobox { float: none; width: 100%; margin: 0 0 12px; }
  .note { transform: none; }
  #main { padding: 12px 16px 20px; }
}

/* Theme switch and logo swap */
.mark-light { display: none !important; }
[data-theme="light"] .mark-dark { display: none !important; }
[data-theme="light"] .mark-light { display: block !important; }
#lights button { font-size: 12px; padding: 1px 10px; background: #262624; color: #d6d4ca; border: 2px outset #4a4a45; cursor: pointer; }
#lights button.on { border-style: inset; background: #3d3d39; color: #fff; }

/* Light mode: the same tape, lights on. Fluorescent office greys. */
[data-theme="light"] body { background-color: #8f8d85; color: #232320; }
[data-theme="light"] body::after {
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.08) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 75% 70% at 50% 50%, transparent 60%, rgba(0,0,0,.28));
}
[data-theme="light"] a { color: #2d4660; }
[data-theme="light"] a:visited { color: #5b4d68; }
[data-theme="light"] a:hover { color: #000; }
[data-theme="light"] #page { background: #e6e4db; border-color: #5f5d57; box-shadow: 6px 6px 18px rgba(0,0,0,.35); }
[data-theme="light"] #header { background: radial-gradient(ellipse 70% 140% at 35% 50%, #e2e0d7, #a8a69d); border-bottom-color: #3a3a37; }
[data-theme="light"] .mark { border-color: #3a3a37; }
[data-theme="light"] #logo, [data-theme="light"] #logo:visited { color: #1b1b1a; text-shadow: -1px 0 rgba(255,60,60,.25), 1px 0 rgba(60,200,220,.25), 0 0 6px rgba(255,255,255,.6); }
[data-theme="light"] #tagline { color: #3f3e3a; }
[data-theme="light"] #division { color: #5f5d57; }
[data-theme="light"] .osd { color: #1b1b1a; text-shadow: 1px 1px 0 rgba(255,255,255,.7), -1px 0 rgba(255,60,60,.25), 1px 0 rgba(60,200,220,.25); }
[data-theme="light"] #grille { background-color: #2a2a28; }
[data-theme="light"] #topnav { background: #cfcdc3; border-bottom-color: #7a786f; }
[data-theme="light"] #topnav a, [data-theme="light"] #lights button, [data-theme="light"] #find button { background: #dedcd2; color: #1b1b1a; border-color: #f4f3ee; }
[data-theme="light"] #topnav a:hover { background: #e9e7de; }
[data-theme="light"] #topnav a.on, [data-theme="light"] #lights button.on { background: #b5b3a9; color: #000; text-shadow: none; }
[data-theme="light"] #side { background: #d6d4ca; border-right-color: #9e9c93; }
[data-theme="light"] #main { background-color: #ebe9e0; background-image: none; }
[data-theme="light"] .box { background: #eeece4; border-color: #9e9c93; }
[data-theme="light"] .box .t { background: linear-gradient(180deg, #6b6a64, #4a4945); }
[data-theme="light"] #find input[type=text] { background: #fff; color: #000; border-color: #9e9c93; }
[data-theme="light"] h1 { color: #111; border-bottom-color: #b3b1a8; text-shadow: -1px 0 rgba(255,60,60,.2), 1px 0 rgba(60,200,220,.2); }
[data-theme="light"] h2 { color: #1b1b1a; border-bottom-color: #c9c7be; text-shadow: none; }
[data-theme="light"] h3, [data-theme="light"] b { color: #111; }
[data-theme="light"] .sub, [data-theme="light"] .open { color: #66645c; }
[data-theme="light"] .open { border-top-color: #c9c7be; }
[data-theme="light"] hr { border-top-color: #b3b1a8; }
[data-theme="light"] blockquote { background: #dcdad0; border-left-color: #4a4a46; color: #232320; }
[data-theme="light"] table.grid th, [data-theme="light"] table.grid td,
[data-theme="light"] .infobox th, [data-theme="light"] .infobox td { border-color: #b3b1a8; }
[data-theme="light"] table.grid th, [data-theme="light"] .infobox th { background: #d3d1c7; color: #1b1b1a; }
[data-theme="light"] table.grid tr:nth-child(even) td { background: #e0ded5; }
[data-theme="light"] .infobox { background: #eeece4; border-color: #5f5d57; box-shadow: 3px 3px 0 rgba(0,0,0,.15); }
[data-theme="light"] .nf { color: #8a887f; }
[data-theme="light"] .notice { background: #efe8cc; color: #2a2a26; }
[data-theme="light"] .notice b { color: #5e4f12; }
[data-theme="light"] .stamp { border-color: #8e2a2a; color: #8e2a2a; }
[data-theme="light"] #footer { background: #cfcdc3; color: #55534c; border-top-color: #7a786f; }
