:root {
  --bg-primary: #0d1117;
  --bg-surface: #161b22;
  --bg-surface-elevated: #1f242c;
  --bg-card: rgba(22, 27, 34, 0.85);
  --border-color: #30363d;
  --border-subtle: #21262d;
  --border-glow: rgba(39, 241, 123, 0.3);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-green: #27f17b;
  --accent-green-glow: rgba(39, 241, 123, 0.15);
  --accent-green-hover: #1fd66b;
  --accent-teal: #00e5ff;
  --accent-cyan-glow: rgba(0, 229, 255, 0.15);
  --danger: #ff5c5c;
  --danger-bg: rgba(255, 92, 92, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Display", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-green: 0 0 24px rgba(39, 241, 123, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background atmospheric glow */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 450px;
  background: radial-gradient(circle, rgba(39, 241, 123, 0.08) 0%, rgba(0, 229, 255, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navigation Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(39, 241, 123, 0.2), rgba(0, 229, 255, 0.1));
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
}

.logo-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(39, 241, 123, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(39, 241, 123, 0.25);
  font-weight: 600;
}

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

.nav-item a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--accent-green);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-green);
  color: #051a0e;
  border-color: var(--accent-green);
  box-shadow: 0 0 18px rgba(39, 241, 123, 0.3);
}

.btn-primary:hover {
  background: var(--accent-green-hover);
  box-shadow: 0 0 24px rgba(39, 241, 123, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(39, 241, 123, 0.08);
  border: 1px solid rgba(39, 241, 123, 0.25);
  color: var(--accent-green);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 241, 123, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(39, 241, 123, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(39, 241, 123, 0); }
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 960px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 40%, #27f17b 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 820px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border-subtle);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: var(--border-glow);
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-val .unit {
  color: var(--accent-green);
  font-size: 1.1rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Sections */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 48px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 14px;
}

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

/* Grid & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-green);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(39, 241, 123, 0.1);
  border: 1px solid rgba(39, 241, 123, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-list {
  margin-top: 18px;
  list-style: none;
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.card-list li svg {
  color: var(--accent-green);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Callout Box / Crisis alert */
.alert-box {
  background: rgba(255, 92, 92, 0.05);
  border: 1px solid rgba(255, 92, 92, 0.25);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 36px;
  display: flex;
  gap: 16px;
}

.alert-icon {
  color: var(--danger);
  flex-shrink: 0;
}

.alert-title {
  font-weight: 700;
  color: #ff8585;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.alert-desc {
  font-size: 0.95rem;
  color: #c9d1d9;
}

/* Comparison Table */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-top: 24px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background: rgba(13, 17, 23, 0.6);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.comparison-table th.highlight-col {
  color: var(--accent-green);
  background: rgba(39, 241, 123, 0.05);
  border-bottom: 2px solid var(--accent-green);
}

.comparison-table td.highlight-col {
  background: rgba(39, 241, 123, 0.03);
  font-weight: 600;
}

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

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 92, 92, 0.3);
}

.badge-success {
  background: var(--accent-green-glow);
  color: var(--accent-green);
  border: 1px solid rgba(39, 241, 123, 0.3);
}

/* Live Operational Status Banner */
.status-bar {
  background: rgba(39, 241, 123, 0.04);
  border: 1px solid rgba(39, 241, 123, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Calculator specific styles */
.calc-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 980px) {
  .calc-wrapper {
    grid-template-columns: 1fr;
  }
}

.calc-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.calc-result-panel {
  background: linear-gradient(180deg, #161b22 0%, #11151c 100%);
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 32px rgba(39, 241, 123, 0.1);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: sticky;
  top: 100px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-value-display {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-green);
}

.input-range {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.input-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(39, 241, 123, 0.5);
  border: 2px solid #0d1117;
  transition: transform 0.1s ease;
}

.input-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.input-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(39, 241, 123, 0.5);
  border: 2px solid #0d1117;
}

.duration-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.duration-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 0;
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.duration-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.duration-btn.active {
  background: rgba(39, 241, 123, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 12px rgba(39, 241, 123, 0.2);
}

.result-hero {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.result-hero-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.result-hero-val {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.92rem;
}

.breakdown-label {
  color: var(--text-secondary);
}

.breakdown-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.cohort-bars {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.cohort-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.bar-fill-danger {
  background: var(--danger);
}

.bar-fill-warning {
  background: var(--warning);
}

/* Whitelisting SOP Steps */
.step-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  transition: border-color 0.2s ease;
}

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

.step-number {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: rgba(39, 241, 123, 0.1);
  border: 1px solid rgba(39, 241, 123, 0.3);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.code-snippet {
  background: #0d1117;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #7ee787;
  overflow-x: auto;
  margin-bottom: 16px;
}

.tag-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 6px;
}

.tag-google {
  background: rgba(66, 133, 244, 0.15);
  color: #8ab4f8;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.tag-meta {
  background: rgba(0, 129, 251, 0.15);
  color: #70b5ff;
  border: 1px solid rgba(0, 129, 251, 0.3);
}

.tag-legitscript {
  background: rgba(39, 241, 123, 0.15);
  color: #27f17b;
  border: 1px solid rgba(39, 241, 123, 0.3);
}

/* Sticky WhatsApp Drawer */
.whatsapp-drawer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  max-width: 420px;
  width: calc(100% - 48px);
  background: #161b22;
  border: 1px solid rgba(39, 241, 123, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(39, 241, 123, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.drawer-minimized {
  width: auto;
  max-width: none;
  padding: 12px 18px;
  border-radius: var(--radius-full);
}

.drawer-minimized .drawer-body,
.drawer-minimized .drawer-bubble {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-avatar-wrap {
  position: relative;
}

.drawer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f422b, #0e2a1b);
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-weight: 700;
  font-size: 1rem;
}

.drawer-avatar-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #27f17b;
  border: 2px solid #161b22;
  border-radius: 50%;
}

.drawer-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.drawer-role {
  font-size: 0.78rem;
  color: var(--accent-green);
  font-weight: 500;
}

.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

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

.drawer-bubble {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #c9d1d9;
  line-height: 1.45;
  position: relative;
}

.drawer-bubble::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 10px;
  height: 10px;
  background: #0d1117;
  border-left: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  transform: rotate(45deg);
}

.drawer-btn {
  background: #25d366;
  color: #03200d;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.drawer-btn:hover {
  background: #20ba59;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
  background: var(--bg-primary);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

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

.footer-col h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}
