:root {
  --bg: #000;
  --ink: #e8e8e8;
  --dim: #a8a8a8;
  --muted: #6e6e6e;
  --line: #232323;

  /* Triage Ward Accents */
  --g: #39ff14;           /* Nursery */
  --r: #ff2a2a;           /* Psych Ward */
  --y: #ffd400;           /* High Security */
  --p: #b554ff;           /* Corporate Quarantine */
  --m: #7b7b7b;           /* Morgue */

  --card: #050505;
  --shadow: 0 0 14px rgba(0,0,0,.55);
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body.bg {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace; }
.dim { color: var(--dim); }
.ok { color: var(--g); }
.warn { color: var(--y); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 85vh; /* Showcase the artwork */
  display: flex;
  align-items: flex-end; /* Keeps nav/text at the bottom of the skull artwork */
  border-bottom: 1px solid #101010;
  
  /* Artwork Implementation from images folder */
  background-image: 
    linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.7) 100%),
    url('../images/hero-skull.png'); 
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-crt {
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.02) 0px,
      rgba(255,255,255,.02) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 4px
  );
  opacity: 0.5;
  mix-blend-mode: screen;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 16px 60px;
  position: relative;
  z-index: 5;
  width: 100%;
}

.hero-title {
  margin: 18px 0 10px;
  font-size: clamp(34px, 4vw, 64px);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
}

.hero-sub {
  margin: 0;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--dim);
  max-width: 58ch;
}

.hero-quote {
  margin: 18px 0 0;
  color: #bfbfbf;
  max-width: 70ch;
  opacity: .95;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid #2a2a2a;
  background: #070707;
  color: var(--ink);
  border-radius: 4px; /* Harder edges for clinical look */
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  border-color: rgba(57,255,20,.55);
  box-shadow: 0 0 10px rgba(57,255,20,.2);
}

.btn-primary:hover {
  background: var(--g);
  color: #000;
  box-shadow: 0 0 20px rgba(57,255,20,0.4);
}

.btn-ghost { background: transparent; border-color: #2b2b2b; }
.btn-small { padding: 8px 10px; font-size: 11px; }

/* --- TOOLBAR --- */
.toolbar {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 30px 0;
}

.prompt {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #1f1f1f;
  padding: 10px;
  background: #040404;
}

.prompt-input, select, #searchBox {
  background: #000;
  border: 1px solid #1f1f1f;
  color: var(--ink);
  padding: 10px;
  outline: none;
}

/* --- GRID & CARDS --- */
.grid {
  column-count: 3;
  column-gap: 14px;
}
@media (max-width: 1020px) { .grid { column-count: 2; } }
@media (max-width: 640px) { .grid { column-count: 1; } }

.icu-card {
  break-inside: avoid;
  margin: 0 0 14px;
  background: var(--card);
  border: 1px solid #2a2a2a;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 12px;
  text-transform: uppercase;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  height: 36px;
}

.case-id {
  background: rgba(255, 255, 255, 0.05);
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: bold;
}

/* High Security Triage Box */
.ward-HighSecurity .case-id {
  background: var(--y);
  color: #000;
}

.case-title {
  padding: 14px 12px 6px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 16px;
}

/* --- VIDEO FEED & STATIC --- */
.video-player {
  position: relative;
  margin: 0 12px 12px;
  background: #000;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111;
}

.video-player::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom,
      rgba(255,255,255,.03) 0px,
      rgba(255,255,255,.03) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 4px
  );
  pointer-events: none;
  opacity: .3;
}

.video-static {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.08;
  mix-blend-mode: overlay;
}

/* --- INTAKE & TAGS --- */
.intake-notes { padding: 12px; border-top: 1px solid #111; }
.intake-notes h4 { color: var(--g); font-size: 11px; text-transform: uppercase; margin: 0 0 8px; }
.tag {
  border: 1px solid #222;
  color: var(--dim);
  padding: 4px 8px;
  font-size: 11px;
  background: #0a0a0a;
}

/* --- WARD DYNAMICS --- */
.dot { width: 10px; height: 10px; border-radius: 50%; }

.ward-Nursery { border-top: 3px solid var(--g); }
.dot-Nursery { background: var(--g); box-shadow: 0 0 8px var(--g); }
.strip-Nursery { background: rgba(57,255,20,0.08); }

.ward-PsychWard { border-top: 3px solid var(--r); }
.dot-PsychWard { background: var(--r); box-shadow: 0 0 8px var(--r); }
.strip-PsychWard { background: rgba(255,42,42,0.08); }

.ward-HighSecurity { border-top: 3px solid var(--y); }
.dot-HighSecurity { background: var(--y); box-shadow: 0 0 8px var(--y); }

.ward-Morgue { border: 1px dashed var(--m); opacity: 0.7; }
.dot-Morgue { background: var(--m); }

/* --- CASE PAGE --- */
.case-top { background: #000; padding: 10px 0; border-bottom: 1px solid #111; }
