/* ============================================================
   THEME — change these few values to restyle everything.
   Try --fg: #ffb000 for amber, or #66ccff for blue.
   ============================================================ */
:root {
  --bg:     #000000;
  --fg:     #33ff77;
  --fg-dim: rgba(51, 255, 119, .45);
  --glow:   rgba(51, 255, 119, .55);
  --font:   'Courier New', 'DejaVu Sans Mono', monospace;
  --size:   16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #000;
  display: flex;
  align-items: flex-start;     /* anchored top-left */
  justify-content: flex-start;
  font-family: var(--font);
}

/* Fullscreen CRT "monitor" */
.crt {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--bg);
  padding: 24px 30px 28px;
  overflow: hidden;
  color: var(--fg);
  font-size: var(--size);
  line-height: 1.5;
  text-shadow: 0 0 6px var(--glow);
}

/* Scanlines */
.crt::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom, transparent 0 2px, rgba(0, 0, 0, .25) 2px 3px);
}

/* Search bar */
.searchbar {
  position: relative; z-index: 1;
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--fg-dim);
}
.searchbar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--fg); font: inherit;
  text-shadow: 0 0 6px var(--glow); caret-color: transparent; padding: 0;
}
.searchbar input::placeholder { color: var(--fg-dim); }

/* Scrolling text area */
.screen {
  position: relative; z-index: 1;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
}
.screen::-webkit-scrollbar { width: 0; }

.prompt { color: var(--fg); }
.dim    { color: var(--fg-dim); }
.prompt-line { margin: 0; }
.hit { background: var(--fg); color: var(--bg); text-shadow: none; }

/* Clickable links / menu items */
.link {
  color: var(--fg); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.link:hover, .link:active { background: var(--fg); color: var(--bg); text-shadow: none; }

/* ===== Article content ===== */
.doc h1 { font-size: 1.2em; text-decoration: underline; text-underline-offset: 4px; margin: 6px 0 12px; }
.doc h2 { font-size: 1.1em; text-decoration: underline; margin: 16px 0 8px; }
.doc h3 { font-size: 1em; font-weight: bold; margin: 12px 0 6px; }
.doc p  { margin: 0 0 10px; }
.doc ul, .doc ol { margin: 8px 0 12px; padding-left: 1.8em; }
.doc li { margin: 2px 0; }
.doc a  { color: var(--fg); }
.doc code { background: rgba(51,255,119,.12); padding: 0 3px; }

/* Media sits neatly inside the terminal */
.doc img, .doc video, .doc iframe {
  max-width: 100%;
  display: block;
  margin: 12px 0;
  border: 1px solid var(--fg-dim);
}
.doc img, .doc video { height: auto; }
.doc iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* Search-result snippets */
.snippet { margin: 0 0 12px; padding-left: 1em; }

@media (prefers-reduced-motion: reduce) {
  .crt::before { background: none; }
}

.field { position: relative; flex: 1; display: inline-flex; overflow: hidden; } .cursor { position: absolute; top: 50%; transform: translateY(-50%); width: .6ch; height: 1.1em; background: var(--fg); box-shadow: 0 0 6px var(--glow); pointer-events: none; animation: blink 1s steps(1) infinite; } .cursor.typing { animation: none; } /* solid while you're typing, blinks when idle */ @keyframes blink { 50% { opacity: 0; } }

