:root {
  --bg: #0a0a0b;
  --bg-elevated: #131315;
  --bg-card: #17171a;
  --bg-inset: #0c0c0d;
  --border: #2a2a2e;
  --border-strong: #3d3d42;
  --text: #e9e7e2;
  --text-muted: #96938f;
  --text-dim: #6b6968;
  --accent: #c4222c;
  --accent-hover: #e13540;
  --accent-dim: #7a1a20;
  --warn: #f0c419;
  --success: #4cae7d;
  --danger: #c4222c;
  --danger-hover: #e13540;
  --radius: 6px;
  --max-width: 1120px;
  --font-mono: Consolas, 'SFMono-Regular', 'Cascadia Mono', 'Courier New', monospace;
  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.012) 0px,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: var(--accent-dim);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

a {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--warn);
}

h1,
h2,
h3 {
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* ---------------- Hazard stripe ---------------- */

.hazard-stripe {
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    #17171a,
    #17171a 14px,
    var(--warn) 14px,
    var(--warn) 28px
  );
}

/* ---------------- Header / nav ---------------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 11, 0.9);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.2s, border-color 0.2s;
}

header.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-bottom-color: var(--border-strong);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--text);
}

.brand span {
  color: var(--accent-hover);
}

.brand-mark {
  flex-shrink: 0;
  display: block;
}

nav.site-nav {
  display: flex;
  align-items: center;
}

nav.site-nav a {
  color: var(--text-muted);
  margin-left: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 3px;
}

nav.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent-hover);
  transition: right 0.2s ease;
}

nav.site-nav a:hover {
  color: var(--text);
}

nav.site-nav a:hover::after {
  right: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  nav.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  nav.site-nav.open {
    max-height: 320px;
  }

  nav.site-nav a {
    margin: 0;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  header.site-header {
    position: relative;
  }
}

/* ---------------- Layout ---------------- */

main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 40px 24px 80px;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-hover);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  animation: flicker 6s infinite;
}

.hero .tagline {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 1rem;
  min-height: 1.6em;
}

.typewriter-active::after,
.typewriter-done::after {
  content: '▌';
  color: var(--accent-hover);
  animation: blink 1s step-end infinite;
}

.typewriter-done::after {
  animation: blink 1s step-end infinite;
}

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

@keyframes flicker {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(196, 34, 44, 0.35);
  }
  92% {
    text-shadow: 0 0 18px rgba(196, 34, 44, 0.35);
  }
  93% {
    text-shadow: none;
    opacity: 0.85;
  }
  94% {
    text-shadow: 0 0 24px rgba(196, 34, 44, 0.5);
    opacity: 1;
  }
  95% {
    text-shadow: none;
    opacity: 0.9;
  }
  96% {
    text-shadow: 0 0 18px rgba(196, 34, 44, 0.35);
    opacity: 1;
  }
}

/* ---------------- Stamp ---------------- */

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--accent);
  color: var(--accent-hover);
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 3px;
  transform: rotate(-2deg);
  margin: 18px 0;
}

.stamp.warn {
  border-color: var(--warn);
  color: var(--warn);
}

/* ---------------- Buttons ---------------- */

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 34, 44, 0.35);
}

.btn.secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn.secondary:hover {
  border-color: var(--accent-hover);
  color: var(--text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn.danger {
  background: var(--danger);
}

.btn.danger:hover {
  background: var(--danger-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------------- Sections ---------------- */

.section {
  margin-top: 72px;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 24px;
}

.section-header .eyebrow {
  margin-bottom: 0;
}

.section-header h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.section-lede {
  color: var(--text-muted);
  max-width: 720px;
  margin: -10px 0 24px;
}

.prose {
  white-space: pre-wrap;
  color: var(--text-muted);
}

/* ---------------- Reveal on scroll ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero h1 {
    animation: none;
  }
}

/* ---------------- Job / role cards ---------------- */

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.job-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.job-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.job-card .clearance {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--warn);
  border: 1px solid var(--border-strong);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.job-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.job-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------------- Feature grid ---------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.feature-card h3 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------------- Redacted gallery ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.redacted-tile {
  position: relative;
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, #131315, #131315 8px, #0c0c0d 8px, #0c0c0d 16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  overflow: hidden;
}

.redacted-tile span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.redacted-tile::before {
  content: '';
  position: absolute;
  top: 10px;
  right: -32px;
  width: 130px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-align: center;
  padding: 3px 0;
  transform: rotate(40deg);
  letter-spacing: 0.05em;
}

/* ---------------- Steps (how to join) ---------------- */

.steps {
  display: grid;
  gap: 18px;
}

.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  color: var(--accent-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
}

.step-body h3 {
  margin: 4px 0 4px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.step-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------------- FAQ accordion ---------------- */

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 18px 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  color: var(--accent-hover);
  font-size: 1.2rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 240px;
}

.faq-answer p {
  margin: 0 4px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------------- Terminal window ---------------- */

.terminal {
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.terminal-bar {
  background: #1c1c1f;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.terminal-dot.red {
  background: #e05a5a;
}

.terminal-dot.yellow {
  background: var(--warn);
}

.terminal-dot.green {
  background: var(--success);
}

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.terminal-body {
  padding: 32px 28px;
}

/* ---------------- Release card ---------------- */

.release-card {
  text-align: center;
}

.release-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.release-card .meta {
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.history-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

/* ---------------- Spec table ---------------- */

table.spec-table {
  width: 100%;
  border-collapse: collapse;
}

table.spec-table th,
table.spec-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

table.spec-table th {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

table.spec-table td:first-child {
  color: var(--text-muted);
  width: 160px;
}

/* ---------------- Empty state ---------------- */

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--text-muted);
}

/* ---------------- Forms / admin ---------------- */

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 420px;
  margin: 64px auto;
}

.admin-card h1 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input[type='text'],
.field input[type='password'],
.field textarea,
.field input[type='file'] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 3px rgba(196, 34, 44, 0.15);
}

.error-text {
  color: var(--danger-hover);
  font-size: 0.88rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.success-text {
  color: var(--success);
  font-size: 0.88rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-topbar h1 {
  text-transform: uppercase;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
}

.upload-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}

.upload-form h2 {
  margin-top: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin-top: 12px;
  display: none;
}

.progress-bar .fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

table.admin-table th,
table.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: top;
}

table.admin-table th {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  background: var(--bg-elevated);
}

table.admin-table tr:last-child td {
  border-bottom: none;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.row-actions .btn {
  padding: 6px 12px;
  font-size: 0.78rem;
}

/* ---------------- Footer ---------------- */

footer.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
}

footer.site-footer p {
  margin: 4px 0;
}

footer.site-footer .disclaimer {
  max-width: 640px;
  margin: 10px auto 0;
  font-size: 0.75rem;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* ---------------- Feedback form ---------------- */

.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.radio-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(196, 34, 44, 0.08);
}

.radio-option input {
  accent-color: var(--accent);
}

/* ---------------- Staff dashboard tabs ---------------- */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------------- Badges ---------------- */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-new {
  background: rgba(196, 34, 44, 0.16);
  color: var(--accent-hover);
}

.badge-reviewed {
  background: rgba(240, 196, 25, 0.15);
  color: var(--warn);
}

.badge-resolved {
  background: rgba(76, 174, 125, 0.15);
  color: var(--success);
}

.badge-admin {
  background: rgba(196, 34, 44, 0.16);
  color: var(--accent-hover);
}

.badge-staff {
  background: rgba(150, 147, 143, 0.15);
  color: var(--text-muted);
}

.badge-published {
  background: rgba(76, 174, 125, 0.15);
  color: var(--success);
}

select.status-select {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text);
  padding: 6px 8px;
  font-size: 0.85rem;
  font-family: inherit;
}
