:root {
  --bg-deep: #060913;
  --bg-surface: rgba(13, 20, 36, 0.78);
  --bg-surface-elevated: rgba(20, 30, 52, 0.92);
  --bg-terminal: #04070e;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-highlight: rgba(16, 185, 129, 0.38);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --emerald: #10b981;
  --emerald-bright: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;

  --amber: #f59e0b;
  --amber-bright: #fbbf24;

  --crimson: #ef4444;
  --crimson-bright: #f87171;
  --crimson-deep: #991b1b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  padding-bottom: env(safe-area-inset-bottom, 24px);
}

body.modal-open {
  overflow: hidden;
}

/* Ambient Cyber Grid & Glows */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 41, 59, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 41, 59, 0.24) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 35%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  transition: opacity 0.5s ease;
}

.bg-glow-emerald {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35), transparent 70%);
  top: -120px;
  left: -80px;
}

.bg-glow-cyan {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 70%);
  top: 240px;
  right: -110px;
}

.bg-glow-crimson {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.42), transparent 70%);
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

body.panic-active .bg-glow-crimson {
  opacity: 0.75;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1100;
}

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.mono-text {
  font-family: var(--font-mono);
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(6, 9, 19, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: env(safe-area-inset-top, 0px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.shield-ring {
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  animation: pulseRing 2.6s infinite ease-out;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.96);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.16);
    opacity: 0;
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--emerald-bright);
  background: rgba(16, 185, 129, 0.14);
  padding: 1px 6px;
  border-radius: 6px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-bright);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot.emerald {
  background: var(--emerald-bright);
  box-shadow: 0 0 10px var(--emerald);
}

.pulse-dot.cyan {
  background: var(--cyan-bright);
  box-shadow: 0 0 10px var(--cyan);
}

/* Main Layout */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 22px;
  padding-bottom: 32px;
}

/* Card Base */
.card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow:
    0 20px 50px -15px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.hero-card {
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow:
    0 24px 60px -15px rgba(0, 0, 0, 0.7),
    0 0 40px -10px rgba(16, 185, 129, 0.18),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.card-scanner-line {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald-bright), var(--cyan-bright), transparent);
  animation: scanline 5s infinite linear;
}

@keyframes scanline {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.security-clearance-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.divider {
  opacity: 0.4;
}

.encryption-tag {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-bright);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
}

/* Hero Main Content */
.hero-main {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

/* Radar Widget */
.radar-widget {
  position: relative;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(6, 9, 19, 0.9) 75%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.22);
}

.radar-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(16, 185, 129, 0.28);
}

.radar-outer {
  width: 92px;
  height: 92px;
}

.radar-mid {
  width: 64px;
  height: 64px;
}

.radar-inner {
  width: 36px;
  height: 36px;
}

.radar-sweep {
  position: absolute;
  width: 50%;
  height: 50%;
  top: 0;
  left: 50%;
  transform-origin: bottom left;
  background: conic-gradient(from 0deg, rgba(16, 185, 129, 0.45), transparent 85deg);
  animation: radarSpin 3.4s infinite linear;
}

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

.radar-core {
  position: relative;
  z-index: 2;
  font-size: 1.75rem;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.5));
}

.radar-blip {
  position: absolute;
  top: 26px;
  right: 28px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-bright);
  animation: blipFlash 1.7s infinite ease-in-out;
}

@keyframes blipFlash {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--emerald-bright);
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-title {
  font-size: clamp(1.45rem, 4.2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.status-highlight {
  display: inline-block;
  color: var(--emerald-bright);
  text-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

/* Live Animated Status Banner */
.live-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.13) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  position: relative;
}

.status-indicator-wrap {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-ping {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.55);
  animation: statusPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes statusPing {
  75%, 100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 12px var(--emerald);
}

.status-banner-headline {
  font-size: 0.96rem;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 4px;
}

.mono-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.22);
  color: var(--emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.45);
  padding: 1px 7px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: middle;
}

.status-banner-sub {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.8);
  color: var(--amber-bright);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.metric-box {
  background: rgba(9, 14, 26, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-lg);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.metric-badge.amber {
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber-bright);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.metric-badge.emerald {
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.metric-badge.cyan {
  background: rgba(6, 182, 212, 0.16);
  color: var(--cyan-bright);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-unit {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
}

.amber-fill {
  background: linear-gradient(90deg, var(--amber), var(--amber-bright));
}

.emerald-fill {
  background: linear-gradient(90deg, var(--emerald), var(--emerald-bright));
}

.cyan-fill {
  background: linear-gradient(90deg, var(--cyan), var(--cyan-bright));
}

.metric-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Activity Ticker */
.activity-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(4, 7, 14, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.76rem;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan-bright);
  font-weight: 700;
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.ticker-content {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.ticker-next-btn {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.ticker-next-btn:hover,
.ticker-next-btn:active {
  background: rgba(6, 182, 212, 0.2);
  color: var(--cyan-bright);
  border-color: rgba(6, 182, 212, 0.45);
}

/* 2. Panic Card */
.panic-card {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(180deg, rgba(18, 16, 30, 0.86) 0%, rgba(13, 20, 36, 0.86) 100%);
}

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

.section-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.crimson-text {
  color: var(--crimson-bright);
}

.section-title {
  font-size: clamp(1.25rem, 3.2vw, 1.65rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.section-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 620px;
}

.threat-meter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(9, 14, 26, 0.8);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.threat-label {
  font-size: 0.64rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.threat-state {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--crimson-bright);
}

.threat-state.safe {
  color: var(--emerald-bright);
}

/* Big Red Panic Button */
.panic-button-zone {
  margin: 10px 0 6px;
}

.panic-btn {
  position: relative;
  width: 100%;
  border: none;
  border-radius: var(--radius-lg);
  padding: 4px;
  background: linear-gradient(135deg, #f87171 0%, #dc2626 50%, #7f1d1d 100%);
  cursor: pointer;
  box-shadow:
    0 14px 36px -6px rgba(239, 68, 68, 0.55),
    0 0 0 1px rgba(248, 113, 113, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.35);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  overflow: hidden;
}

.panic-btn:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow:
    0 18px 44px -6px rgba(239, 68, 68, 0.72),
    0 0 0 2px rgba(248, 113, 113, 0.55);
}

.panic-btn:active {
  transform: translateY(2px) scale(0.99);
}

.panic-btn:disabled {
  cursor: wait;
  opacity: 0.9;
}

.panic-btn-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.3), transparent 65%);
  pointer-events: none;
}

.panic-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: calc(var(--radius-lg) - 3px);
  background: linear-gradient(180deg, rgba(185, 28, 28, 0.92) 0%, rgba(127, 29, 29, 0.98) 100%);
  border: 1px dashed rgba(254, 202, 202, 0.35);
  text-align: left;
}

.panic-icon {
  font-size: 2.3rem;
  flex-shrink: 0;
  animation: sirenBounce 1.4s infinite ease-in-out;
}

@keyframes sirenBounce {
  0%, 100% {
    transform: scale(1) rotate(-4deg);
  }
  50% {
    transform: scale(1.12) rotate(4deg);
  }
}

.panic-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panic-main-label {
  font-size: clamp(1.08rem, 2.8vw, 1.4rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.panic-sub-label {
  font-size: 0.72rem;
  color: #fecaca;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

/* Terminal & Matrix Animation Window */
.terminal-wrapper {
  margin-top: 20px;
  animation: slideDownFade 0.35s ease-out;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal-window {
  position: relative;
  background: var(--bg-terminal);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8);
}

.matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
  z-index: 1;
}

.terminal-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red {
  background: #ef4444;
}

.dot.yellow {
  background: #f59e0b;
}

.dot.green {
  background: #10b981;
}

.terminal-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-status {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--emerald-bright);
}

.terminal-progress-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 4px;
  background: rgba(15, 23, 42, 0.9);
}

.terminal-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson), var(--amber), var(--emerald-bright));
  transition: width 0.25s ease;
}

.terminal-body {
  position: relative;
  z-index: 2;
  padding: 16px;
  min-height: 230px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.65;
  color: #d1fae5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.term-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  word-break: break-word;
  animation: termFadeIn 0.15s ease-out;
}

@keyframes termFadeIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.term-prefix {
  color: var(--emerald-bright);
  font-weight: 700;
  flex-shrink: 0;
}

.term-tag-warn {
  color: var(--amber-bright);
  font-weight: 700;
}

.term-tag-danger {
  color: var(--crimson-bright);
  font-weight: 700;
}

.term-tag-ok {
  color: var(--emerald-bright);
  font-weight: 700;
}

/* Neutralized Finale Badge Card */
.neutralized-panel {
  position: relative;
  z-index: 3;
  padding: 20px 16px 22px;
  background: linear-gradient(180deg, rgba(4, 7, 14, 0.86) 0%, rgba(6, 24, 20, 0.96) 100%);
  border-top: 1px solid rgba(16, 185, 129, 0.4);
  animation: popInBadge 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popInBadge {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.neutralized-badge-card {
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}

.neutralized-shield-icon {
  font-size: 3rem;
  margin-bottom: 6px;
  display: inline-block;
  filter: drop-shadow(0 0 18px rgba(16, 185, 129, 0.6));
}

.neutralized-kicker {
  font-size: 0.7rem;
  color: var(--emerald-bright);
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 6px;
}

.neutralized-title {
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 900;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: inline-block;
  margin-bottom: 10px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.neutralized-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.excuse-box {
  background: rgba(6, 9, 19, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
}

.excuse-label {
  font-size: 0.7rem;
  color: var(--cyan-bright);
  font-weight: 700;
  margin-bottom: 6px;
}

.excuse-quote {
  font-size: 0.86rem;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.5;
}

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

.btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-secondary:hover,
.btn-secondary:active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--emerald-bright);
}

/* 3. Maintenance Fee / Coffee Deal Card */
.deal-card {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.88) 0%, rgba(19, 16, 28, 0.9) 100%);
}

.deal-header {
  margin-bottom: 18px;
}

.deal-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber-bright);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.fee-highlight-box {
  background: rgba(6, 9, 19, 0.78);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
}

.fee-invoice-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.waived {
  color: var(--emerald-bright);
  font-weight: 600;
  white-space: nowrap;
}

.invoice-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.16);
  margin: 4px 0;
}

.total-row {
  font-weight: 700;
  color: var(--text-primary);
}

.fee-due-tag {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-bright);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
}

.fee-main-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.coffee-icon {
  font-size: 2.1rem;
  flex-shrink: 0;
}

.fee-title {
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  font-weight: 800;
  color: #ffffff;
}

.fee-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Deal Arena & Bounded Runaway Decline Sandbox */
.deal-arena {
  position: relative;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: rgba(9, 14, 26, 0.65);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.accept-zone {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 3;
}

.btn-accept {
  position: relative;
  width: 100%;
  max-width: 340px;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px 28px;
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 800;
  color: #04130e;
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  cursor: pointer;
  box-shadow:
    0 10px 28px -4px rgba(16, 185, 129, 0.55),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  overflow: hidden;
}

.btn-accept:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 34px -4px rgba(16, 185, 129, 0.72);
}

.btn-accept:active {
  transform: translateY(1px) scale(0.98);
}

.btn-accept-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shineSweep 3.2s infinite;
}

@keyframes shineSweep {
  0% {
    left: -100%;
  }
  45%, 100% {
    left: 160%;
  }
}

/* Dedicated Bounded Dodge Container: Overflow Hidden, Separate from Accept Button */
.decline-sandbox {
  position: relative;
  width: 100%;
  height: 112px;
  border-radius: var(--radius-md);
  background: rgba(4, 7, 14, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.btn-decline {
  position: absolute;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(30, 41, 59, 0.9);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  white-space: nowrap;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    left 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.2s ease,
    border-color 0.2s ease;
  z-index: 2;
}

.btn-decline.dodging {
  border-color: rgba(245, 158, 11, 0.65);
  color: var(--amber-bright);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.btn-decline.retired {
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--emerald-bright);
  background: rgba(6, 28, 22, 0.9);
  opacity: 0.85;
  cursor: not-allowed;
}

.dodge-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* INTERACTIVE DEAL MODAL (Mobile-First Sheet / Dialog) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: backdropFade 0.22s ease-out;
}

.modal-backdrop[hidden] {
  display: none !important;
}

@keyframes backdropFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.deal-modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90dvh;
  overflow-y: auto;
  background: linear-gradient(165deg, rgba(14, 25, 45, 0.98) 0%, rgba(7, 13, 25, 0.99) 100%);
  border: 1px solid rgba(16, 185, 129, 0.48);
  border-radius: 24px;
  padding: 22px 20px 24px;
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(16, 185, 129, 0.2);
  animation: modalSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-pill-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  margin: 0 auto 14px;
}

.modal-top {
  margin-bottom: 18px;
}

.modal-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.modal-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--emerald-bright);
  letter-spacing: 0.08em;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.45);
}

.modal-title {
  font-size: 1.32rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.picker-group {
  margin-bottom: 16px;
}

.picker-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cyan-bright);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.choice-chip {
  background: rgba(15, 23, 42, 0.88);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 11px 12px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}

.choice-chip-wide {
  grid-column: span 2;
}

.choice-chip:hover {
  border-color: rgba(16, 185, 129, 0.5);
  color: #ffffff;
}

.choice-chip.active {
  background: rgba(16, 185, 129, 0.22);
  color: #ffffff;
  border-color: var(--emerald-bright);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
  font-weight: 700;
}

.message-preview-box {
  background: rgba(4, 7, 14, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.message-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.ready-tag {
  color: var(--emerald-bright);
  font-weight: 700;
}

.message-preview-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.48;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-lock-deal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #04130e;
  font-size: 1.02rem;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 10px 26px -4px rgba(16, 185, 129, 0.55);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.btn-lock-deal:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-lock-deal:active {
  transform: translateY(0);
}

.modal-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-secondary-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.85);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-secondary-modal:hover {
  background: rgba(30, 41, 59, 1);
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.45);
}

/* Footer */
.footer {
  padding-top: 8px;
  padding-bottom: 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-sep {
  opacity: 0.4;
}

/* Responsive Design for iPhone & Mobile */
@media (max-width: 720px) {
  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .hero-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .radar-widget {
    width: 88px;
    height: 88px;
  }

  .radar-outer {
    width: 72px;
    height: 72px;
  }

  .radar-mid {
    width: 50px;
    height: 50px;
  }

  .radar-inner {
    width: 28px;
    height: 28px;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .activity-ticker {
    flex-wrap: wrap;
    gap: 8px;
  }

  .ticker-content {
    white-space: normal;
    order: 3;
    width: 100%;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .threat-meter {
    align-items: flex-start;
    width: 100%;
  }

  .panic-btn-inner {
    padding: 16px;
    gap: 12px;
  }

  .panic-icon {
    font-size: 1.9rem;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .deal-modal {
    max-width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 16px 16px calc(22px + env(safe-area-inset-bottom, 12px));
  }
}
