:root {
  --bg: #0a0d0a;
  --panel: #10140f;
  --panel-border: #1e2b1e;
  --green: #3ef07c;
  --green-dim: #1f6b3a;
  --amber: #ffb000;
  --red: #ff3b30;
  --text: #cfe9d6;
  --text-dim: #6f8a76;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse at top, rgba(62,240,124,0.06), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px);
}

a { color: var(--green); }
::selection { background: var(--green-dim); color: #eafff0; }

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,0.12) 3px);
  mix-blend-mode: overlay;
}

.crt-flicker { animation: flicker 6s infinite; }
@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.94; }
  98% { opacity: 1; }
  99% { opacity: 0.97; }
}

@media (prefers-reduced-motion: reduce) {
  .crt-flicker { animation: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.wrap { max-width: 880px; margin: 0 auto; padding: 48px 24px 96px; }

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--panel-border);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
header.topbar .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  margin-right: 8px;
  vertical-align: middle;
}
header.topbar a.home {
  color: var(--text-dim);
  text-decoration: none;
}
header.topbar a.home:hover { color: var(--green); }
header.topbar .crumb { color: var(--text-dim); }

.terminal {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 28px 26px 34px;
  margin-top: 40px;
  box-shadow: 0 0 40px rgba(62,240,124,0.05), inset 0 0 60px rgba(0,0,0,0.4);
  min-height: 260px;
}
.terminal .line { white-space: pre-wrap; line-height: 1.7; font-size: 14px; }
.terminal .line .ok { color: var(--green); }
.terminal .line .warn { color: var(--amber); }
.terminal .line .bad { color: var(--red); }
.terminal .prompt { color: var(--text-dim); }

.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

h1.title {
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.02em;
  margin: 28px 0 6px;
  color: #eafff0;
  text-shadow: 0 0 18px rgba(62,240,124,0.35);
}
.subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 40px; }

.panel-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin: 56px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title::after { content: ""; flex: 1; height: 1px; background: var(--panel-border); }
.panel-title:first-of-type { margin-top: 40px; }

.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .status-grid { grid-template-columns: 1fr; } }

.stat {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 16px 18px;
}
.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.stat-value { font-size: 22px; color: var(--green); }
.bar-track {
  height: 6px;
  background: #0e120e;
  border: 1px solid var(--panel-border);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--green-dim), var(--green)); }

.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .modules { grid-template-columns: 1fr; } }

.module {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.module:hover, .module:focus-visible {
  border-color: var(--green-dim);
  box-shadow: 0 0 22px rgba(62,240,124,0.12);
  transform: translateY(-1px);
  outline: none;
}
.module .tag { font-size: 10px; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; }
.module h3 { margin: 8px 0 4px; font-size: 16px; color: #eafff0; }
.module p { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

/* list entries used on log/lab/links pages */
.entry-list { display: flex; flex-direction: column; gap: 12px; }
.entry {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 2px solid var(--green-dim);
  border-radius: 4px;
  padding: 16px 20px;
}
.entry .meta {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  gap: 12px;
}
.entry h3 { margin: 0 0 6px; font-size: 16px; color: #eafff0; }
.entry p { margin: 0; font-size: 13px; color: var(--text); line-height: 1.6; }
.entry .status-ok { color: var(--green); }
.entry .status-warn { color: var(--amber); }

.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--green-dim);
  border-radius: 20px;
  color: var(--green);
  letter-spacing: 0.05em;
}

/* contact form */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-field input, .form-field textarea {
  width: 100%;
  background: #0c100c;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 12px;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--green-dim);
  box-shadow: 0 0 0 2px rgba(62,240,124,0.15);
}
.btn {
  background: var(--green-dim);
  color: #eafff0;
  border: 1px solid var(--green);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--green); color: #06120a; box-shadow: 0 0 20px rgba(62,240,124,0.3); }

/* judgment day countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 36px 0;
}
.countdown .cell {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 20px 8px;
  text-align: center;
}
.countdown .num {
  font-size: clamp(24px, 5vw, 38px);
  color: var(--green);
  text-shadow: 0 0 16px rgba(62,240,124,0.4);
}
.countdown .unit {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 6px;
}

footer {
  margin-top: 64px;
  border-top: 1px solid var(--panel-border);
  padding-top: 20px;
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
footer a { color: var(--text-dim); text-decoration: underline dotted; }
footer a:hover { color: var(--green); }
