:root {
  --bg:       #0a0f0a;
  --surface:  #0d140d;
  --text:     #a8ff84;
  --bright:   #ccff99;
  --muted:    #4a7a3a;
  --dim:      #2a4a1a;
  --border:   #2a4a1a;
  --glow:     #a8ff84;
  --red:      #ff4444;
  --amber:    #ffcc00;
  --link:     #a8ff84;
  --tag-bg:   #0d1a0d;
  --scanline: rgba(0,0,0,0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ── FALLOUT MONITOR SHELL ── */
html {
  background: #020302;
  background-image:
    radial-gradient(ellipse at 50% 40%, #080c08 0%, #020302 60%);
  min-height: 100vh;
}

/* CRT SCANLINES */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    var(--scanline) 0px,
    var(--scanline) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* CRT FLICKER */
@keyframes flicker {
  0%,100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.96; }
  94% { opacity: 1; }
  96% { opacity: 0.98; }
}

@keyframes phosphor-pulse {
  0%,100% { box-shadow:
    0 0 2px #1a3a10,
    0 0 30px rgba(168, 255, 132, 0.05),
    0 0 80px rgba(168, 255, 132, 0.03),
    0 0 160px rgba(168, 255, 132, 0.015),
    inset 0 0 100px rgba(0, 0, 0, 0.5);
  }
  50% { box-shadow:
    0 0 3px #1a3a10,
    0 0 40px rgba(168, 255, 132, 0.07),
    0 0 100px rgba(168, 255, 132, 0.04),
    0 0 180px rgba(168, 255, 132, 0.02),
    inset 0 0 100px rgba(0, 0, 0, 0.5);
  }
}

@keyframes blink-cursor {
  0%,100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes boot {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  padding: 48px 32px 80px;
  max-width: 720px;
  margin: 28px auto;
  animation: flicker 8s infinite, phosphor-pulse 6s ease-in-out infinite;
  text-shadow: none;

  /* CRT SCREEN */
  position: relative;
  border: 2px solid #1a3a10;
  border-radius: 18px;
  box-shadow:
    0 0 2px #1a3a10,
    0 0 30px rgba(168, 255, 132, 0.05),
    0 0 80px rgba(168, 255, 132, 0.03),
    0 0 160px rgba(168, 255, 132, 0.015),
    inset 0 0 100px rgba(0, 0, 0, 0.5);
}

/* CRT VIGNETTE — dark rounded edges */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.55) 80%,
    rgba(0, 0, 0, 0.85) 100%
  );
  pointer-events: none;
  z-index: 9998;
}

a {
  color: var(--bright);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
a:hover {
  color: #ffffff;
  text-decoration-color: var(--bright);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* TERMINAL HEADER */
.site-label {
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}

.site-label::before { content: '> '; }

.boot-line {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  animation: boot 0.5s ease both;
}

h1 {
  font-family: 'VT323', monospace;
  font-size: 42px;
  font-weight: normal;
  color: var(--bright);
  text-shadow: none;
  margin-bottom: 2px;
  letter-spacing: 0.05em;
}

.tagline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.tagline::before { content: '// '; }

.story {
  font-size: 14px;
  line-height: 1.85;
  margin-bottom: 20px;
  max-width: 580px;
  color: var(--text);
}

.aside {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
  margin-top: 10px;
}
.aside::before { content: '> '; }

/* SECTION LABEL */
.section-label {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 2px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-label::before { content: '[ '; }
.section-label::after  { content: ' ]'; }

h2 {
  font-family: 'VT323', monospace;
  font-size: 24px;
  font-weight: normal;
  color: var(--bright);
  text-shadow: none;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

/* SOCIAL */
.social-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.social-row a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 3px 10px;
}
.social-row a::after { content: ' ↗'; color: var(--muted); font-size: 11px; }
.social-row a:hover { border-color: var(--text); color: var(--bright); }

/* ITEM LIST */
.item-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.item-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: baseline;
  padding-left: 0;
}

.item-list li::before { content: none; }

.ico { font-size: 13px; line-height: 1.7; filter: none; }

.entry strong {
  font-weight: normal;
  color: var(--bright);
  text-shadow: none;
}

.sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* BADGES */
.badge {
  font-family: 'VT323', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  border: 1px solid;
}

.b-live     { border-color: var(--text); color: var(--text); }
.b-building { border-color: var(--amber); color: var(--amber); text-shadow: none; }
.b-ongoing  { border-color: var(--muted); color: var(--muted); }

/* WRITING LIST */
.writing-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.writing-list li::before { content: '> '; color: var(--muted); }

/* MANIFESTO */
.manifesto-line {
  font-size: 15px;
  color: var(--bright);
  border-left: 2px solid var(--text);
  padding-left: 12px;
  text-shadow: none;
  line-height: 1.5;
}

.manifesto-line span {
  color: var(--muted);
  text-shadow: none;
  font-size: 13px;
}

/* CHAT */
.chatbox {
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 10px;
}

.chat-history {
  padding: 14px;
  min-height: 90px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
}

.chat-msg { display: flex; flex-direction: column; gap: 2px; }

.chat-author {
  font-family: 'VT323', monospace;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.chat-text { font-size: 13px; line-height: 1.6; }

.chat-input-row { display: flex; border-top: 1px solid var(--border); }

#chat-input {
  flex: 1; padding: 10px 14px; border: none;
  background: var(--surface); color: var(--text);
  font-size: 13px; font-family: 'Share Tech Mono', monospace;
  outline: none;
}
#chat-input::placeholder { color: var(--dim); }

#chat-send {
  padding: 10px 16px; border: none;
  border-left: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-size: 13px; cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  transition: color 0.15s;
}
#chat-send:hover { color: var(--bright); }

footer {
  margin-top: 48px;
  font-size: 12px;
  color: var(--muted);
}

/* ASSESS BUTTON */
.assess-btn {
  background: none;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  padding: 10px 18px;
  cursor: pointer;
  letter-spacing: 0.05em;
  margin: 4px auto 0;
  display: block;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.assess-btn:hover {
  background: var(--dim);
  color: var(--bright);
  box-shadow: 0 0 12px rgba(168, 255, 132, 0.1);
}

/* ── MODAL (FALLOUT TERMINAL) ── */
@keyframes modal-boot {
  0%   { opacity: 0; transform: scale(0.95) translateY(10px); }
  60%  { opacity: 1; transform: scale(1.01) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modal-scanline-sweep {
  0%   { top: -4px; }
  100% { top: 100%; }
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-screen {
  background: var(--bg);
  border: 2px solid var(--muted);
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: 28px 24px;
  position: relative;
  animation: modal-boot 0.4s ease-out;
  box-shadow:
    0 0 2px var(--muted),
    0 0 20px rgba(168, 255, 132, 0.08),
    0 0 60px rgba(168, 255, 132, 0.04),
    inset 0 0 60px rgba(0, 0, 0, 0.4);
}

/* bright sweep line on open */
.modal-screen::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 4px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(168, 255, 132, 0.3),
    transparent
  );
  animation: modal-scanline-sweep 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 1;
}

/* repeating scanlines inside modal */
.modal-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--bright); }

/* ── GAME ── */
.game-wrap { margin-top: 8px; }
.question-block { display: none; }
.question-block.active { display: block; }

.q-counter {
  font-family: 'VT323', monospace;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.q-text {
  font-size: 15px;
  color: var(--bright);
  margin-bottom: 16px;
  line-height: 1.5;
  text-shadow: none;
}

.q-options { display: flex; flex-direction: column; gap: 6px; }

.q-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'Share Tech Mono', monospace;
  text-align: left;
  cursor: pointer;
  line-height: 1.5;
  transition: border-color 0.1s, color 0.1s;
}

.q-btn::before { content: '  '; }
.q-btn:hover { color: var(--bright); }

.q-btn.selected {
  border-color: var(--text);
  color: var(--bright);
  background: var(--dim);
}
.q-btn.selected::before { content: '> '; }

.progress-bar {
  height: 3px;
  background: var(--dim);
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--text);
  transition: width 0.3s ease;
}

.result-block { display: none; }
.result-block.visible { display: block; }

.score-display {
  font-family: 'VT323', monospace;
  font-size: 64px;
  color: var(--bright);
  text-shadow: none;
  line-height: 1;
  margin-bottom: 6px;
}

.score-label { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.score-verdict { font-size: 15px; color: var(--bright); line-height: 1.7; margin-bottom: 12px;  }
.score-detail { font-size: 12px; color: var(--muted); margin-bottom: 20px; line-height: 1.7; }

.restart-btn {
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  transition: color 0.15s, border-color 0.15s;
}
.restart-btn:hover { border-color: var(--text); color: var(--text); }

/* LOGO + TITLE ROW */
header {
  margin-bottom: 16px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-row .logo-img {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 0;
  object-fit: contain;
  display: block;
  margin: 0;
  border: 1px solid var(--border);
  filter: none;
}

.logo-row h1 {
  margin-bottom: 0;
  line-height: 1.2;
}

.os-line {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 4px 0;
  line-height: 1.4;
}

/* CURSOR BLINK on h1 */
h1::after {
  content: '_';
  animation: blink-cursor 1s step-end infinite;
  color: var(--bright);
}

