/* ==========================================================================
   ALDER COUNTY COLD CASE DIGITAL ARCHIVE — CASE #AS-04-0891
   Gritty 2004/2026 Forensic Archive UI | Zero External Dependencies
   ========================================================================== */

:root {
  --bg-base: #0b0e13;
  --bg-surface: #11161f;
  --bg-elevated: #161d28;
  --bg-inset: #0d1118;
  --bg-paper: #e9e2d0;
  --ink-paper: #1d1a15;

  --border-hairline: #232d3d;
  --border-strong: #324056;

  --text-primary: #e6ebf2;
  --text-secondary: #a7b4c6;
  --text-muted: #768499;

  --accent-amber: #d99b38;
  --accent-amber-soft: rgba(217, 155, 56, 0.14);
  --accent-amber-glow: rgba(217, 155, 56, 0.32);

  --accent-blue: #6aa3c8;
  --accent-blue-soft: rgba(106, 163, 200, 0.14);

  --status-sealed: #c75151;
  --status-sealed-soft: rgba(199, 81, 81, 0.13);

  --status-verified: #4ea877;
  --status-verified-soft: rgba(78, 168, 119, 0.14);

  --font-mono: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-base);
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at top, rgba(106, 163, 200, 0.07), transparent 55%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.62;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Subtle inline-SVG film grain (zero external network requests) */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 89;
  opacity: 0.14;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 2px,
    rgba(0, 0, 0, 0.25) 3px,
    rgba(0, 0, 0, 0.25) 4px
  );
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   STICKY TELEMETRY HEADER
   ========================================================================== */

.telemetry-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-hairline);
}

.telemetry-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.telemetry-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-verified);
  box-shadow: 0 0 8px rgba(78, 168, 119, 0.75);
  flex-shrink: 0;
  animation: pulseDot 2.8s ease-in-out infinite;
}

.status-pulse--amber {
  background: var(--accent-amber);
  box-shadow: 0 0 10px rgba(217, 155, 56, 0.85);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.telemetry-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.telemetry-agency {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telemetry-case {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
}

.lang-btn {
  min-width: 44px;
  min-height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

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

.lang-btn.is-active {
  background: var(--accent-amber);
  color: #0b0e13;
}

/* ==========================================================================
   MAIN CONTAINER & CASE HERO
   ========================================================================== */

.terminal-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  flex: 1 0 auto;
}

.case-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(11, 14, 19, 0.78) 0%, rgba(16, 22, 32, 0.56) 54%, rgba(11, 14, 19, 0.84) 100%),
    url("hero_bg.jpg") center / cover no-repeat;
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.hero-crest {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 96px;
  height: 96px;
  color: rgba(217, 155, 56, 0.14);
  pointer-events: none;
}

.gate-card.is-locked {
  opacity: 0.76;
  border-style: dashed;
  border-color: var(--border-strong);
}

.gate-card.is-locked .gate-title {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.meta-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  padding: 4px 8px;
  border-radius: 3px;
}

.meta-chip--blue {
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  border-color: rgba(106, 163, 200, 0.35);
}

.case-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 3.8vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.case-subtitle {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Clearance Progress Rail */
.clearance-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}

.rail-connector {
  display: none;
}

.rail-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.rail-node:hover {
  border-color: var(--accent-amber);
  background: rgba(217, 155, 56, 0.06);
}

.rail-node.is-unlocked {
  border-color: rgba(78, 168, 119, 0.48);
  background: rgba(78, 168, 119, 0.07);
}

.rail-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: 0.05em;
}

.rail-node.is-unlocked .rail-code {
  color: var(--status-verified);
}

.rail-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  flex: 1;
}

.stamp-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid var(--status-sealed);
  color: var(--status-sealed);
  background: var(--status-sealed-soft);
}

.rail-node.is-unlocked .stamp-pill {
  border-color: var(--status-verified);
  color: var(--status-verified);
  background: var(--status-verified-soft);
}

/* ==========================================================================
   GATE CARDS & ARCHIVAL STAMPS
   ========================================================================== */

.gate-section {
  margin-bottom: 22px;
  scroll-margin-top: 74px;
}

.gate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease;
}

.gate-card.is-unlocked {
  border-color: rgba(78, 168, 119, 0.42);
}

.gate-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gate-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.gate-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.3;
  color: var(--text-primary);
}

/* Tactile Inked Archival Rubber Stamp */
.archival-stamp {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 2px solid var(--status-sealed);
  outline: 1px solid rgba(199, 81, 81, 0.35);
  outline-offset: 2px;
  color: var(--status-sealed);
  background: var(--status-sealed-soft);
  border-radius: 3px;
  transform: rotate(-2.5deg);
  user-select: none;
}

.gate-card.is-unlocked .archival-stamp {
  border-color: var(--status-verified);
  outline-color: rgba(78, 168, 119, 0.35);
  color: var(--status-verified);
  background: var(--status-verified-soft);
  transform: rotate(-1.5deg);
}

.prereq-banner {
  margin-bottom: 12px;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.gate-directive {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ==========================================================================
   GATE INPUT & VERIFICATION FORM (MOBILE-FIRST >=48px)
   ========================================================================== */

.gate-form {
  margin-bottom: 16px;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terminal-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 16px; /* Prevents iOS Safari auto-zoom */
  letter-spacing: 0.04em;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.terminal-input::placeholder {
  color: var(--text-muted);
  font-size: 14px;
}

.terminal-input:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px var(--accent-amber-soft);
}

.btn-verify {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  background: var(--accent-amber);
  color: #0b0e13;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn-verify:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px var(--accent-amber-glow);
}

.btn-verify:active {
  transform: translateY(1px);
}

.gate-feedback {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  min-height: 0;
}

.gate-feedback:not(:empty) {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.gate-feedback.is-error {
  color: #f39c9c;
  background: var(--status-sealed-soft);
  border: 1px solid rgba(199, 81, 81, 0.45);
}

.gate-feedback.is-nudge {
  color: #f4cb7a;
  background: var(--accent-amber-soft);
  border: 1px solid rgba(217, 155, 56, 0.5);
}

.gate-feedback.is-success {
  color: #8ee0b1;
  background: var(--status-verified-soft);
  border: 1px solid rgba(78, 168, 119, 0.48);
}

.is-shaking {
  animation: shakeReject 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeReject {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* ==========================================================================
   DECLASSIFIED DOSSIER PANELS
   ========================================================================== */

.dossier-container {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-strong);
  animation: dossierReveal 0.42s ease-out;
}

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

.dossier-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(78, 168, 119, 0.12);
  border: 1px solid rgba(78, 168, 119, 0.42);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.dossier-banner-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9be7bc;
}

.evidence-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.evidence-block-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-strong);
}

.evidence-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-amber);
  letter-spacing: 0.08em;
}

.evidence-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.evidence-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.lab-finding {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--bg-inset);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  color: var(--text-primary);
}

.lab-finding:last-child {
  margin-bottom: 0;
}

.lab-finding strong {
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 13.5px;
}

/* ==========================================================================
   2004 MICROCASSETTE VOICEMAIL PLAYER (EX-04-AUD-03)
   ========================================================================== */

.tape-deck {
  background: linear-gradient(160deg, #141820 0%, #0d1016 100%);
  border: 1px solid #354155;
  border-top: 2px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tape-deck-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.tape-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  border: 1px solid rgba(217, 155, 56, 0.4);
  padding: 3px 8px;
  border-radius: 3px;
}

.tape-source-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  padding: 3px 7px;
  border-radius: 3px;
}

.tape-meta-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.cassette-housing {
  background: #090b0f;
  border: 1px solid #263142;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
}

.cassette-window {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.tape-reel {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #48566d;
  background: radial-gradient(circle, #0b0e13 24%, #253042 25%, #253042 52%, #131924 53%);
  position: relative;
  flex-shrink: 0;
}

.tape-reel::before,
.tape-reel::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  background: #677791;
  transform: translate(-50%, -50%);
}

.tape-reel::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.tape-deck.is-playing .tape-reel {
  animation: spinReel 2.2s linear infinite;
  border-color: var(--accent-amber);
}

@keyframes spinReel {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.waveform-bars {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  padding: 4px 8px;
  background: rgba(217, 155, 56, 0.04);
  border: 1px solid rgba(217, 155, 56, 0.16);
  border-radius: 3px;
  overflow: hidden;
}

.wave-bar {
  flex: 1;
  min-width: 2px;
  height: 16%;
  background: rgba(217, 155, 56, 0.35);
  border-radius: 2px;
  transition: height 0.14s ease, background-color 0.2s ease;
}

.tape-deck.is-playing .wave-bar {
  background: var(--accent-amber);
  box-shadow: 0 0 6px rgba(217, 155, 56, 0.45);
}

.tape-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-tape {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-sm);
  background: rgba(217, 155, 56, 0.14);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.btn-tape:hover {
  background: var(--accent-amber);
  color: #0b0e13;
}

.tape-deck.is-playing .btn-tape {
  background: var(--status-sealed);
  border-color: var(--status-sealed);
  color: #ffffff;
}

.tape-counter-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
}

.tape-led {
  padding: 6px 10px;
  background: #06080b;
  border: 1px solid #2b3545;
  border-radius: 3px;
  color: var(--accent-amber);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(217, 155, 56, 0.45);
}

.tape-progress-track {
  width: 100%;
  height: 4px;
  background: #1d2532;
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}

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

.transcript-toggle {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.transcript-toggle:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.transcript-body {
  margin-top: 10px;
  padding: 14px 16px;
  background: var(--bg-inset);
  border-left: 3px solid var(--accent-amber);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-style: italic;
  line-height: 1.68;
  color: #e9dfd0;
}

/* ==========================================================================
   FORENSIC DATA TABLES (MOBILE HORIZONTAL SCROLL SAFE)
   ========================================================================== */

.table-scroll-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
}

.forensic-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12.5px;
  min-width: 560px;
}

.forensic-table th,
.forensic-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-hairline);
  vertical-align: top;
}

.forensic-table thead th {
  background: #141b26;
  color: var(--accent-blue);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.forensic-table tbody tr:hover {
  background: rgba(106, 163, 200, 0.06);
}

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

.table-footer-note {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(217, 155, 56, 0.08);
  border: 1px solid rgba(217, 155, 56, 0.28);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #efd49f;
}

/* ==========================================================================
   FILE_3A: ALIBI AUDIT CARDS & THERMAL FUEL RECEIPT
   ========================================================================== */

.alibi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.alibi-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.alibi-card--unresolved {
  border-left: 3px solid var(--accent-amber);
}

.alibi-card--cleared {
  border-left: 3px solid var(--status-verified);
}

.alibi-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.alibi-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.alibi-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 3px;
}

.alibi-badge--cleared {
  color: var(--status-verified);
  background: var(--status-verified-soft);
  border: 1px solid rgba(78, 168, 119, 0.4);
}

.alibi-badge--unresolved {
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  border: 1px solid rgba(217, 155, 56, 0.45);
}

.alibi-notes {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* Authentic 2004 Thermal / Dot-Matrix Paper Receipt */
.thermal-receipt-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.thermal-receipt {
  width: 100%;
  max-width: 490px;
  background: var(--bg-paper);
  color: var(--ink-paper);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.48;
  padding: 18px 16px;
  border-radius: 2px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  border-top: 4px dashed #9f9680;
  border-bottom: 4px dashed #9f9680;
  overflow-x: auto;
  white-space: pre;
}

/* ==========================================================================
   CASE_CLOSED: WARRANT HEADER & FORENSIC TIMELINE
   ========================================================================== */

.warrant-banner {
  background: linear-gradient(135deg, rgba(78, 168, 119, 0.16), rgba(217, 155, 56, 0.12));
  border: 1px solid rgba(78, 168, 119, 0.5);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.warrant-stamp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.warrant-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: #8ee0b1;
  border: 2px solid #4ea877;
  padding: 4px 10px;
  border-radius: 3px;
}

.court-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.55;
}

.reconstruction-para {
  margin: 0 0 14px;
  font-size: 15.5px;
  color: var(--text-primary);
}

.reconstruction-para:last-child {
  margin-bottom: 0;
}

.timeline-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--accent-amber);
}

.timeline-item {
  position: relative;
  padding: 0 0 14px 14px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-amber);
  border: 2px solid var(--bg-elevated);
}

.timeline-time {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-amber);
  margin-right: 8px;
}

.timeline-text {
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   3-TIER SPOILER-GUARDED HINT DRAWERS
   ========================================================================== */

.hint-drawer {
  margin-top: 14px;
  border-top: 1px dashed var(--border-hairline);
  padding-top: 12px;
}

.hint-drawer-toggle {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.hint-drawer-toggle:hover {
  border-color: var(--accent-amber);
  color: var(--text-primary);
}

.hint-panel {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hint-tier-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hint-tier-btn:hover:not(:disabled) {
  border-color: var(--accent-amber);
  background: rgba(217, 155, 56, 0.08);
}

.hint-tier-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hint-spoiler-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  border: 1px solid rgba(217, 155, 56, 0.4);
}

.hint-revealed-card {
  padding: 12px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.5px;
  color: var(--text-primary);
}

.hint-revealed-card--tier3 {
  border-left-color: var(--accent-amber);
}

.hint-tier-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.hint-revealed-card--tier3 .hint-tier-label {
  color: var(--accent-amber);
}

/* ==========================================================================
   DECRYPTION PROGRESS OVERLAY (1.2s MICRO-INTERACTION)
   ========================================================================== */

.decrypt-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(7, 10, 14, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.decrypt-modal {
  width: 100%;
  max-width: 440px;
  background: #10151e;
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 24px rgba(217, 155, 56, 0.16);
}

.decrypt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.decrypt-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-amber);
}

.decrypt-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.decrypt-hex {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-blue);
  background: var(--bg-inset);
  border: 1px solid var(--border-hairline);
  padding: 7px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.decrypt-track {
  width: 100%;
  height: 8px;
  background: #1a2230;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.decrypt-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-amber), #f0c26b);
  transition: width 0.09s linear;
}

.decrypt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   UTILITY BAR & PERMANENT COMPLIANCE FOOTER
   ========================================================================== */

.utility-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.mono-dim {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.reset-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn-reset,
.btn-reset-yes,
.btn-reset-cancel {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
}

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

.btn-reset:hover {
  border-color: var(--status-sealed);
  color: #f39c9c;
}

.reset-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reset-confirm-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #f39c9c;
}

.btn-reset-yes {
  background: var(--status-sealed);
  border: 1px solid var(--status-sealed);
  color: #ffffff;
}

.btn-reset-cancel {
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}

.compliance-footer {
  margin-top: auto;
  background: #080a0e;
  border-top: 1px solid var(--border-hairline);
  padding: 20px 16px 28px;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.footer-disclaimer {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.footer-disclaimer-en-permanent {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: #5b6778;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #556173;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (TABLET & DESKTOP)
   ========================================================================== */

@media (min-width: 640px) {
  .telemetry-inner {
    padding: 12px 24px;
  }

  .terminal-shell {
    padding: 28px 24px 48px;
  }

  .case-hero,
  .gate-card {
    padding: 24px 24px;
  }

  .input-row {
    flex-direction: row;
    align-items: stretch;
  }

  .terminal-input {
    flex: 1;
  }

  .btn-verify {
    flex-shrink: 0;
    padding: 12px 22px;
  }

  .clearance-rail {
    grid-template-columns: 1fr 22px 1fr 22px 1fr;
    align-items: center;
    gap: 0;
  }

  .rail-connector {
    display: block;
    height: 1px;
    background: var(--border-strong);
  }

  .rail-node {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .alibi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
