:root {
  --bg-dark: #090d16;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --bg-input: rgba(15, 23, 42, 0.6);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(59, 130, 246, 0.4);
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);
  
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.2);
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.2);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(245, 158, 11, 0.08), transparent);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-badge {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 12px var(--accent-red-glow);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-main);
}

.btn-portal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
}

.btn-portal:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Alert Banner */
.banner-urgent {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.15));
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px 0;
  font-size: 13px;
  color: #fecaca;
  text-align: center;
}

.banner-urgent strong {
  color: #ffffff;
  font-weight: 600;
}

/* Hero Section */
.hero {
  padding: 72px 0 48px;
  text-align: center;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span.gradient-text {
  background: linear-gradient(135deg, #f8fafc 30%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 span.highlight {
  color: #f87171;
}

.hero p.lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 860px;
  margin: 0 auto 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-value.red { color: #f87171; }
.stat-value.amber { color: #fbbf24; }
.stat-value.blue { color: #60a5fa; }

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--accent-red-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Main Grid Layout */
.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin-bottom: 64px;
}

@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Containers */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  position: relative;
}

.panel-header {
  margin-bottom: 28px;
}

.panel-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.panel-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Form Styles */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-label .required {
  color: #f87171;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Modern Accessible User Valid & Invalid styling */
.form-input:user-invalid, .form-select:user-invalid, .form-textarea:user-invalid {
  border-color: #ef4444;
}

.form-input:user-valid:not(:placeholder-shown) {
  border-color: #10b981;
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
}

.checkbox-label {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Evidence Checklist Box */
.checklist-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Step Guides Sidebar */
.guide-step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.guide-step:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.step-num.warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.step-body h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.step-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.step-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.step-links a:hover {
  text-decoration: underline;
  color: #93c5fd;
}

/* Submission feedback notification */
.notification-box {
  display: none;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  color: #a7f3d0;
  font-size: 14px;
}

.notification-box.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Demand Letter Generator Modal / Card */
.tool-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 64px;
}

.pre-box {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-family: monospace;
  font-size: 13px;
  color: #e2e8f0;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
  margin: 16px 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  background: rgba(9, 13, 22, 0.95);
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   PIN Splash Gate & Protection
   ========================================================================== */

body.content-locked {
  overflow: hidden !important;
}

.pin-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 30%, #0f172a, #050811 80%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}

.pin-gate-overlay.unlocked {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

.pin-card {
  width: 100%;
  max-width: 450px;
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(59, 130, 246, 0.18);
  backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

.pin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #ef4444, #f59e0b, #3b82f6);
  background-size: 200% 100%;
  animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.pin-shield-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}

.pin-card-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.pin-card-title {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.pin-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 28px;
}

.pin-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.pin-code-input {
  width: 100%;
  height: 60px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  color: #ffffff;
  outline: none;
  padding: 0 48px 0 20px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-code-input:focus {
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 4px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-pin-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-pin-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pin-error-msg {
  min-height: 22px;
  font-size: 13px;
  color: #f87171;
  margin-bottom: 16px;
  font-weight: 500;
  transition: var(--transition);
}

.pin-card.shake {
  animation: shakeCard 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeCard {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

.pin-card.unlock-success {
  border-color: #10b981;
  box-shadow: 0 0 35px var(--accent-emerald-glow);
}

.pin-card.unlock-success .pin-digit-box {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.pin-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.pin-hint-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  color: var(--text-muted);
}

.btn-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-lock:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
