:root {
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --teal: #14b8a6;
  --teal-glow: rgba(20, 184, 166, 0.4);
  --navy: #0f172a;
  --navy-light: #1e293b;
  --navy-card: #1a2236;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(124, 58, 237, 0.3);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--navy) 0%, #1a1040 100%);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }

.lang-switch {
  display: flex;
  gap: 0.25rem;
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem;
}

.lang-switch button {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.lang-switch button:hover { color: var(--text); }
.lang-switch button.active {
  background: var(--purple);
  color: #fff;
}

.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 800; }
.logo-icon { font-size: 1.75rem; }
.accent { color: var(--teal); }
.tagline { color: var(--text-muted); font-size: 0.875rem; }

.main { padding: 3rem 0; }

.layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .results-card { position: static !important; }
}

.calculator-panel h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.subtitle { color: var(--text-muted); margin-bottom: 1rem; font-size: 1.05rem; }

.terms-agreement {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
}

.terms-agreement input { margin-top: 0.2rem; accent-color: var(--teal); flex-shrink: 0; }
.terms-link { color: var(--teal); font-weight: 600; text-decoration: none; }
.terms-link:hover { text-decoration: underline; }

.results-card.results-blocked { opacity: 0.85; }
.results-card.results-blocked .results-range { color: var(--text-muted); font-size: 1.5rem; }

#terms { scroll-margin-top: 2rem; }

.field-group { margin-bottom: 1.75rem; }

.field-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.field-value {
  color: var(--teal);
  font-weight: 700;
  font-size: 1.1rem;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--navy-light);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  box-shadow: 0 0 12px var(--teal-glow);
  cursor: pointer;
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.severity-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .severity-cards { grid-template-columns: repeat(2, 1fr); }
}

.severity-card {
  background: var(--navy-light);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 1rem 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--text);
  font-family: inherit;
}

.severity-card:hover { border-color: var(--purple-light); }

.severity-card.active {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.1);
  box-shadow: 0 0 20px var(--teal-glow);
}

.severity-emoji { display: block; font-size: 1.5rem; margin-bottom: 0.25rem; }
.severity-name { display: block; font-weight: 700; font-size: 0.85rem; }
.severity-desc { display: block; font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

.results-card {
  position: sticky;
  top: 2rem;
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(124, 58, 237, 0.15);
}

.results-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--teal-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px transparent; }
}

.results-range {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1.2;
  transition: all 0.3s;
}

.results-label { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }

.breakdown { border-top: 1px solid var(--border); padding-top: 1rem; }

.breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breakdown-row span:last-child { color: var(--text); font-weight: 600; }
.fault-row span:last-child { color: #f87171; }

.cta-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.cta-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.cta-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--teal-glow);
}

.faq { margin-top: 4rem; }
.faq h2 { font-size: 1.5rem; margin-bottom: 1rem; }

.faq-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

#faq { scroll-margin-top: 2rem; }

details {
  background: var(--navy-light);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
}

summary { cursor: pointer; font-weight: 600; }
details p { margin-top: 0.75rem; color: var(--text-muted); font-size: 0.9rem; }

.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--navy-light);
}

.disclaimers p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.copyright { font-size: 0.75rem; color: var(--text-muted); margin-top: 1.5rem; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal h2 { margin-bottom: 0.5rem; }
.modal > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

.lead-form { display: flex; flex-direction: column; gap: 0.75rem; }

.lead-form input,
.lead-form textarea {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.modal-disclaimer { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.75rem; text-align: center; }
