/* ============================================================================
   style.css  --  "What Can I Learn About You?"
   ----------------------------------------------------------------------------
   A deliberately old-web stylesheet. Target era: 1999-2005.
   Black CRT background, phosphor-grey text, cyan links, purple visited links.
   Borders, tables, horizontal rules, blinking cursors. No rounded corners,
   no shadows, no gradients, no modern anything.

   Palette
     background .... #000000
     text .......... #D0D0D0
     link .......... #00FFFF (cyan)
     visited ....... #B24BF3 (purple)
     success ....... #00FF00 (green)
     warning ....... #FFFF00 (yellow)
     danger ........ #FF0000 (red)
     dim border .... #333333 / #00AA00 (terminal green)

   Font: VT323, falling back to Courier New / Lucida Console / monospace.
   VT323 is loaded via header.php (Google Fonts). If offline, the monospace
   fallbacks keep the whole thing readable.
   ========================================================================== */

/* ----- Optional local VT323 face (only used if you drop a font file in
   assets/fonts/. Harmless if the file is absent; the Google Fonts <link>
   in header.php is the primary source). --------------------------------- */
@font-face {
  font-family: 'VT323Local';
  src: local('VT323'), local('VT323-Regular');
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   RESET-ISH BASE
   --------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background-color: #000000;
  color: #D0D0D0;
  font-family: 'VT323', 'VT323Local', 'Courier New', 'Lucida Console', monospace;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0.3px;
  padding: 8px;
  /* A faint scanline wash, always on but subtle. The heavier toggleable
     effect is .crt-on below. */
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 20, 0, 0.06) 3px,
      rgba(0, 0, 0, 0) 4px
    );
}

/* Everything sits in a fixed-ish old-school column. */
.wrap {
  max-width: 1000px;
  margin: 0 auto;
}

/* ---------------------------------------------------------------------------
   TYPOGRAPHY
   --------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: normal;
  color: #00FF00;
  letter-spacing: 1px;
  margin: 12px 0 6px 0;
}
h1 { font-size: 32px; }
h2 { font-size: 27px; color: #00FFFF; }
h3 { font-size: 23px; color: #FFFF00; }
h4 { font-size: 21px; color: #D0D0D0; }

p {
  margin: 6px 0;
}

pre {
  font-family: 'VT323', 'Courier New', 'Lucida Console', monospace;
  white-space: pre;
  overflow-x: auto;
}

small { font-size: 15px; }

b, strong { color: #FFFFFF; }

hr {
  border: 0;
  border-top: 1px dashed #00AA00;
  margin: 10px 0;
  height: 0;
  color: #00AA00;
  background: transparent;
}

hr.solid  { border-top: 1px solid #00AA00; }
hr.double { border-top: 3px double #00AA00; }
hr.thick  { border-top: 2px solid #333333; }

/* ---------------------------------------------------------------------------
   LINKS
   --------------------------------------------------------------------------- */
a {
  color: #00FFFF;
  text-decoration: underline;
}
a:visited {
  color: #B24BF3;
}
a:hover {
  color: #000000;
  background-color: #00FFFF;
  text-decoration: none;
}
a:active {
  color: #FF0000;
}

/* Skip-link / accessibility helper, visually old-school. */
a.skip {
  position: absolute;
  left: -9999px;
}
a.skip:focus {
  left: 8px;
  top: 8px;
  background: #00FF00;
  color: #000;
  padding: 2px 6px;
  z-index: 1000;
}

/* ---------------------------------------------------------------------------
   HEADER / LOGO
   --------------------------------------------------------------------------- */
.logo {
  color: #00FF00;
  font-size: 13px;
  line-height: 1.05;
  text-align: left;
  display: inline-block;
  /* subtle phosphor glow, no box-shadow on the element itself */
  text-shadow: 0 0 4px rgba(0, 255, 0, 0.45);
  margin: 4px 0;
}

@media (max-width: 640px) {
  .logo { font-size: 8px; }
  body  { font-size: 18px; }
}

.statusbar {
  border: 1px solid #00AA00;
  padding: 4px 8px;
  margin: 6px 0;
  font-size: 17px;
  color: #00FF00;
  background: #050805;
}
.statusbar span.sep { color: #333; padding: 0 4px; }
.statusbar b { color: #FFFF00; }

/* Marquee text ticker. */
marquee, .marquee {
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  padding: 3px 0;
  color: #FFFF00;
  font-size: 18px;
  background: #0a0a0a;
}

/* ---------------------------------------------------------------------------
   NAVIGATION
   --------------------------------------------------------------------------- */
.nav {
  margin: 8px 0;
  padding: 6px 4px;
  border-top: 3px double #00AA00;
  border-bottom: 3px double #00AA00;
  text-align: center;
  line-height: 1.8;
}
.nav a {
  color: #00FFFF;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 2px;
}
.nav a:hover {
  background: #00FFFF;
  color: #000;
}
.nav a.current {
  color: #00FF00;
  font-weight: bold;
}
.nav .brackets { color: #555; }

/* ---------------------------------------------------------------------------
   BORDERED PANELS (the +----+ "dashboard" look)
   --------------------------------------------------------------------------- */
.panel {
  border: 1px solid #00AA00;
  margin: 12px 0;
  background: #030303;
}
.panel > .panel-title {
  background: #001100;
  color: #00FF00;
  border-bottom: 1px solid #00AA00;
  padding: 3px 8px;
  font-size: 21px;
  letter-spacing: 1px;
}
.panel > .panel-title .ico { margin-right: 6px; }
.panel > .panel-body {
  padding: 8px 10px;
}

/* A tighter "ASCII box" variant with a green frame that mimics +--+ corners. */
.asciibox {
  border: 1px solid #00AA00;
  padding: 8px 10px;
  margin: 10px 0;
  background: #030303;
}

/* Inset / sunken Win2000-ish field. */
.inset {
  border: 2px solid;
  border-color: #000 #444 #444 #000;
  background: #0a0a0a;
  padding: 6px 8px;
}

/* Callout boxes. */
.note   { border: 1px solid #00AAAA; background:#001414; padding:6px 8px; margin:8px 0; }
.good   { border: 1px solid #00FF00; background:#001400; padding:6px 8px; margin:8px 0; color:#00FF00; }
.warnbx { border: 1px solid #FFFF00; background:#141400; padding:6px 8px; margin:8px 0; color:#FFFF00; }
.badbx  { border: 1px solid #FF0000; background:#140000; padding:6px 8px; margin:8px 0; color:#FF6666; }

/* ---------------------------------------------------------------------------
   TABLES  (the primary layout & data device, as nature intended)
   --------------------------------------------------------------------------- */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 6px 0;
}
table.data,
table.grid {
  border: 1px solid #00AA00;
}
table.data th, table.data td,
table.grid th, table.grid td {
  border: 1px solid #1c3a1c;
  padding: 3px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 18px;
}
table.data th, table.grid th {
  background: #001100;
  color: #00FF00;
  letter-spacing: 1px;
}
/* Classic zebra striping. */
table.data tr:nth-child(even) td,
table.grid tr:nth-child(even) td {
  background: #060906;
}
table.data tr:hover td {
  background: #0d160d;
}

/* Key/value two-column report table. */
table.kv td.k {
  color: #00FFAA;
  white-space: nowrap;
  width: 34%;
  border-right: 1px solid #1c3a1c;
}
table.kv td.v {
  color: #D0D0D0;
  word-break: break-word;
}

/* Layout tables should show no borders. */
table.layout, table.layout td { border: 0; }

/* ---------------------------------------------------------------------------
   RISK BADGES
   --------------------------------------------------------------------------- */
.risk {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid;
  font-size: 15px;
  letter-spacing: 1px;
  line-height: 1.4;
  vertical-align: middle;
}
.risk-low    { color: #00FF00; border-color: #00FF00; background:#001400; }
.risk-medium { color: #FFFF00; border-color: #FFFF00; background:#141400; }
.risk-high   { color: #FF3030; border-color: #FF0000; background:#140000; }
.risk-info   { color: #00FFFF; border-color: #00AAAA; background:#001414; }

/* Yes / No / Unknown value chips. */
.val-yes { color: #00FF00; }
.val-no  { color: #FF5555; }
.val-unk { color: #888; }

/* ---------------------------------------------------------------------------
   PROGRESS BARS  (old HTML-table style, not a modern gauge)
   --------------------------------------------------------------------------- */
.bar {
  border: 1px solid #00AA00;
  background: #050505;
  height: 18px;
  width: 100%;
  padding: 1px;
  position: relative;
}
.bar > .bar-fill {
  height: 100%;
  background: #00FF00;
  /* Chunky segmented look via a repeating gradient (still 'flat'). */
  background-image: repeating-linear-gradient(
    to right,
    #00FF00 0px, #00FF00 8px,
    #000000 8px, #000000 10px
  );
}
.bar.warn > .bar-fill {
  background-image: repeating-linear-gradient(
    to right, #FFFF00 0px,#FFFF00 8px,#000 8px,#000 10px);
}
.bar.bad > .bar-fill {
  background-image: repeating-linear-gradient(
    to right, #FF0000 0px,#FF0000 8px,#000 8px,#000 10px);
}
.bar > .bar-label {
  position: absolute;
  top: 0; left: 6px;
  font-size: 14px;
  color: #D0D0D0;
  mix-blend-mode: difference;
}

/* ASCII-style bar built from block characters, e.g. [#####-----] */
.asciibar { color: #00FF00; font-size: 20px; letter-spacing: 0; }
.asciibar .empty { color: #224422; }

/* ---------------------------------------------------------------------------
   TERMINAL / SCAN OUTPUT
   --------------------------------------------------------------------------- */
.terminal {
  border: 1px solid #00AA00;
  background: #000;
  color: #00FF00;
  padding: 8px 10px;
  min-height: 220px;
  font-size: 19px;
  line-height: 1.3;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal .ok    { color: #00FF00; }
.terminal .warn  { color: #FFFF00; }
.terminal .err   { color: #FF3030; }
.terminal .dim   { color: #559955; }
.terminal .cyan  { color: #00FFFF; }
.terminal .prompt{ color: #00FFAA; }
.terminal a { color: #00FFFF; }

/* Interactive terminal input line. */
.term-inputline {
  display: flex;
  align-items: center;
  border-top: 1px solid #113311;
  margin-top: 4px;
  padding-top: 4px;
}
.term-inputline .ps1 { color: #00FFAA; margin-right: 6px; white-space: nowrap; }
.term-input {
  flex: 1;
  background: #000;
  border: 0;
  outline: 0;
  color: #00FF00;
  font-family: inherit;
  font-size: 19px;
  caret-color: #00FF00;
}

/* Blinking block cursor. */
.cursor {
  display: inline-block;
  width: 10px;
  height: 1.05em;
  background: #00FF00;
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  0%, 50%   { opacity: 1; }
  50.01%,100%{ opacity: 0; }
}

/* Typing-caret used by the boot animation lines. */
.typing::after {
  content: '_';
  animation: blink 1s steps(1) infinite;
  color: #00FF00;
}

/* ---------------------------------------------------------------------------
   NEW! marker  (static -- flicker removed per request; only the terminal
   typing caret and cursor still blink, as those are core to the CRT feel)
   --------------------------------------------------------------------------- */
.blink {
  /* Intentionally no animation. Kept as a no-op so any legacy markup that
     still references it simply renders static instead of flickering. */
}
.new-gif {
  color: #FF0000;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #FF0000;
  padding: 0 3px;
  margin-left: 4px;
  background: #200;
}

/* ---------------------------------------------------------------------------
   88x31 BUTTON ROW
   --------------------------------------------------------------------------- */
.buttons88 {
  text-align: center;
  margin: 10px 0;
  line-height: 2.2;
}
.btn88 { cursor: default; }

/* ---------------------------------------------------------------------------
   FUN FACTS / LISTS
   --------------------------------------------------------------------------- */
ul.retro, ol.retro {
  margin: 6px 0 6px 22px;
}
ul.retro li { list-style: none; margin: 3px 0; }
ul.retro li::before { content: '> '; color: #00FF00; }

ul.facts li {
  list-style: none;
  margin: 4px 0;
  padding-left: 20px;
  position: relative;
}
ul.facts li::before {
  content: '[*]';
  color: #FFFF00;
  position: absolute;
  left: 0;
}

/* ---------------------------------------------------------------------------
   COLLAPSIBLE  (native <details>, styled retro)
   --------------------------------------------------------------------------- */
details {
  border: 1px solid #1c3a1c;
  margin: 4px 0;
  background: #040604;
}
details > summary {
  cursor: pointer;
  padding: 3px 8px;
  color: #00FFFF;
  list-style: none;
  outline: none;
  user-select: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: '[+] ';
  color: #00FF00;
}
details[open] > summary::before {
  content: '[-] ';
  color: #FFFF00;
}
details > summary:hover { background: #0d160d; }
details > .details-body {
  padding: 6px 10px;
  border-top: 1px dashed #1c3a1c;
  color: #B8B8B8;
  font-size: 17px;
}
details .impact { color:#FFAA00; }
details .fix    { color:#00FF00; }

/* ---------------------------------------------------------------------------
   FORMS  (guestbook etc.)
   --------------------------------------------------------------------------- */
input[type="text"],
input[type="url"],
textarea,
select {
  background: #000;
  color: #00FF00;
  border: 2px solid;
  border-color: #000 #444 #444 #000;
  font-family: inherit;
  font-size: 18px;
  padding: 3px 6px;
}
input[type="text"]:focus,
textarea:focus {
  border-color: #00AA00;
  outline: none;
}
textarea { width: 100%; }

button,
input[type="submit"],
input[type="button"],
.btn {
  background: #001100;
  color: #00FF00;
  border: 2px solid;
  border-color: #00FF00 #004400 #004400 #00FF00;
  font-family: inherit;
  font-size: 18px;
  padding: 3px 12px;
  cursor: pointer;
  letter-spacing: 1px;
}
button:hover,
input[type="submit"]:hover,
.btn:hover {
  background: #00FF00;
  color: #000;
}
button:active,
input[type="submit"]:active {
  border-color: #004400 #00FF00 #00FF00 #004400;
}

label { color: #00FFAA; }

/* ---------------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------------- */
.footer {
  border-top: 3px double #00AA00;
  margin-top: 16px;
  padding: 10px 0;
  text-align: center;
  font-size: 16px;
  color: #999;
}
.footer .promise { color: #00FF00; }
.footer a { color: #00FFFF; }

/* ---------------------------------------------------------------------------
   TWO-COLUMN OLD LAYOUT HELPERS
   --------------------------------------------------------------------------- */
.cols { width: 100%; }
.cols td { vertical-align: top; padding: 0 6px; }
.col-side { width: 220px; }

/* Right-hand "sidebar" boxes. */
.sidebox {
  border: 1px solid #333;
  margin: 8px 0;
  padding: 6px;
  font-size: 16px;
}
.sidebox .sidebox-title {
  color: #FFFF00;
  border-bottom: 1px solid #333;
  margin-bottom: 4px;
}

/* ---------------------------------------------------------------------------
   MISC UTILITIES
   --------------------------------------------------------------------------- */
.center { text-align: center; }
.right  { text-align: right; }
.mono   { font-family: 'Courier New', monospace; }
.dim    { color: #777; }
.green  { color: #00FF00; }
.cyan   { color: #00FFFF; }
.yellow { color: #FFFF00; }
.red    { color: #FF3030; }
.white  { color: #FFFFFF; }
.nowrap { white-space: nowrap; }
.hidden { display: none; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }

.tag {
  font-size: 14px;
  border: 1px solid #444;
  padding: 0 4px;
  color: #aaa;
}

/* Small screenshot-frame around ASCII neofetch etc. */
.screen {
  border: 1px solid #00AA00;
  padding: 8px;
  background: #000;
  overflow-x: auto;
}

/* ---------------------------------------------------------------------------
   CRT SCANLINE EFFECT  (toggleable -- body gets .crt-on via JS)
   Heavier scanlines + a faint vignette + a very slow flicker. When off, only
   the subtle always-on wash in `body` remains.
   --------------------------------------------------------------------------- */
body.crt-on::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0)   0px,
    rgba(0,0,0,0)   2px,
    rgba(0,0,0,0.35) 3px,
    rgba(0,0,0,0)   4px
  );
}
body.crt-on::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,0.55) 100%
  );
  animation: crtflicker 6s infinite steps(60);
}
@keyframes crtflicker {
  0%   { opacity: 0.92; }
  3%   { opacity: 0.85; }
  6%   { opacity: 0.95; }
  9%   { opacity: 0.88; }
  100% { opacity: 0.92; }
}

/* Respect reduced-motion: kill the flicker/blink for those who ask. */
@media (prefers-reduced-motion: reduce) {
  .cursor, .typing::after, .blink,
  body.crt-on::after {
    animation: none;
  }
  .cursor { opacity: 1; }
}

/* CRT toggle control in the corner. */
.crt-toggle {
  font-size: 15px;
  color: #00FFAA;
  cursor: pointer;
  border: 1px solid #00AA00;
  padding: 1px 6px;
  background: #001100;
  user-select: none;
}
.crt-toggle:hover { background:#00FF00; color:#000; }

/* Under-construction easter-egg banner (hidden until revealed by JS/anchor). */
.under-construction {
  border: 2px dashed #FFFF00;
  background: #141400;
  color: #FFFF00;
  padding: 8px;
  text-align: center;
  margin: 10px 0;
}
.under-construction .digger { font-size: 28px; letter-spacing: 2px; }

/* ---------------------------------------------------------------------------
   DONATION / AUTHOR LINKS  (footer)
   --------------------------------------------------------------------------- */
.author-links {
  border-top: 1px dashed #00AA00;
  border-bottom: 1px dashed #00AA00;
  margin: 12px 0;
  padding: 10px 6px;
  text-align: center;
}
.author-links .al-links {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 2;
}
.author-links .al-links a { white-space: nowrap; }
.author-links img.coindrop {
  border-radius: 10px;
  height: 57px;
  width: 229px;
  max-width: 100%;
  border: 0;
  vertical-align: middle;
}
.author-links .al-donate { margin-top: 4px; }

/* ---------------------------------------------------------------------------
   RESPONSIVE  --  the retro look, but usable on a phone.
   Classic layout tables are stacked; wide data tables get their own scroll;
   key/value tables collapse to label-over-value on the smallest screens.
   --------------------------------------------------------------------------- */
@media (max-width: 760px) {
  body { font-size: 18px; padding: 5px; }
  .wrap { max-width: 100%; }

  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 20px; }
  h4 { font-size: 18px; }

  .logo { font-size: 7px; }
  .statusbar { font-size: 15px; }
  .marquee, marquee { font-size: 16px; }

  /* Header: stack logo above the CRT toggle; keep the wide ASCII logo from
     forcing horizontal page scroll by letting it scroll inside a full-width
     block instead. */
  .hdr-top, .hdr-top > tbody, .hdr-top > tbody > tr,
  .hdr-top > tbody > tr > td { display: block; width: 100% !important; }
  .hdr-logo { max-width: 100%; overflow-x: auto; }
  .hdr-logo .logo { display: block; }
  .hdr-toggle { width: 100% !important; text-align: left !important; margin-top: 4px; }

  /* Stack the classic two-column layout tables (index, source, guestbook). */
  .cols,
  .cols > tbody,
  .cols > tbody > tr,
  .cols > tbody > tr > td {
    display: block;
    width: 100% !important;
  }
  .cols > tbody > tr > td { padding: 0; }
  .col-side { width: 100% !important; }

  /* Roomier tap targets in the nav. */
  .nav { line-height: 2.3; }
  .nav a { display: inline-block; padding: 2px 5px; }
  .nav .navitem { display: inline-block; }

  /* Panels + tables tighten up and let text wrap. */
  .panel-body { padding: 6px 7px; }
  table.data th, table.data td,
  table.grid th, table.grid td { font-size: 16px; padding: 3px 5px; }
  table.kv td.k { width: 42%; white-space: normal; }

  /* Any table that still overflows can scroll horizontally on its own. */
  .screen, .terminal { -webkit-overflow-scrolling: touch; }
  .terminal { font-size: 16px; min-height: 200px; }
  .term-input { font-size: 16px; }
  .ps1, .term-inputline .ps1 { font-size: 15px; }

  /* Export buttons wrap and stay tappable. */
  button, input[type="submit"], .btn { padding: 5px 12px; }
  .buttons88 { line-height: 2; }
}

@media (max-width: 480px) {
  body { font-size: 17px; padding: 4px; }
  .logo { font-size: 5px; line-height: 1; }
  .statusbar { font-size: 14px; }
  .statusbar .sep { display: none; }
  .statusbar span { display: block; }

  h1 { font-size: 23px; }
  h2 { font-size: 20px; }

  .nav a { font-size: 18px; padding: 3px 6px; }

  /* Key/value tables collapse: label on its own line, value beneath. */
  table.kv,
  table.kv tbody,
  table.kv tr,
  table.kv td {
    display: block;
    width: 100% !important;
  }
  table.kv td.k {
    border-right: 0;
    border-bottom: 0;
    padding-bottom: 0;
    color: #00FFAA;
    width: 100%;
  }
  table.kv td.v {
    padding-top: 0;
    padding-bottom: 6px;
    border-top: 0;
  }
  table.kv tr { border-bottom: 1px solid #1c3a1c; }

  /* Forms go full width and stack. */
  form table.layout,
  form table.layout tbody,
  form table.layout tr,
  form table.layout td {
    display: block;
    width: 100%;
  }
  input[type="text"], input[type="url"] { width: 100%; }

  .footer { font-size: 15px; }
  .author-links img.coindrop { height: auto; }
}

/* Print: drop the CRT nonsense so exports/print look clean. */
@media print {
  body { background:#fff; color:#000; }
  a { color:#000; }
  .nav, .marquee, marquee, .crt-toggle, .buttons88 { display:none; }
  body.crt-on::before, body.crt-on::after { display:none; }
}
