:root {
  --blue: #1e40af;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --slate: #475569;
  --slate-light: #94a3b8;
  --slate-dark: #334155;
  --white: #ffffff;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --green: #059669;
  --red: #dc2626;
}

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

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--bg);
  color: var(--slate-dark);
  line-height: 1.6;
}

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

.header {
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  padding: 1.25rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

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

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

.lang-switch button {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
}

.lang-switch button.active {
  background: var(--blue);
  color: var(--white);
}

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-name { display: block; font-family: 'Source Serif 4', Georgia, serif; font-size: 1.25rem; font-weight: 700; color: var(--blue); }
.logo-sub { display: block; font-size: 0.75rem; color: var(--slate-light); letter-spacing: 0.02em; }

.hero { padding: 2.5rem 0 1.5rem; text-align: center; }

.hero h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 2.25rem;
  color: var(--slate-dark);
  max-width: 720px;
  margin: 0 auto 1rem;
  line-height: 1.3;
}

.hero-text {
  color: var(--slate);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

.input-panel, .results-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.input-panel h2, .results-panel h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--blue-pale);
}

.panel-desc { color: var(--slate); font-size: 0.9rem; margin-bottom: 1.5rem; }

.form-row { margin-bottom: 1.25rem; }

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--slate-dark);
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}

.input-prefix {
  padding: 0.65rem 0.75rem;
  background: var(--blue-pale);
  color: var(--blue);
  font-weight: 600;
  border-right: 1px solid var(--border);
}

.input-wrap input {
  flex: 1;
  border: none;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.fault-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  max-width: 120px;
}

.fault-input input {
  flex: 1;
  border: none;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  width: 80px;
}

.fault-suffix {
  padding: 0.65rem 0.75rem;
  background: var(--blue-pale);
  color: var(--blue);
  font-weight: 600;
}

select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--slate-dark);
}

.field-hint { display: block; font-size: 0.8rem; color: var(--slate-light); margin-top: 0.3rem; }

.terms-agreement {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin: 1rem 0 1.25rem;
  padding: 0.875rem 1rem;
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
}

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

.calc-btn:disabled {
  background: var(--slate-light);
  cursor: not-allowed;
}

.calc-btn:disabled:hover { background: var(--slate-light); }

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

.calc-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

.calc-btn:hover { background: var(--blue-light); }

.range-banner {
  background: var(--blue-pale);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.range-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.range-value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--slate-dark);
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.breakdown-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
}

.breakdown-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.breakdown-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.section-header td {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--slate-dark);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subtotal td { font-weight: 700; background: #fafbfc; }
.deduction td:last-child { color: var(--red); }
.total td { font-weight: 700; font-size: 1rem; background: var(--blue-pale); }

.chart-block { margin-bottom: 1.5rem; }
.chart-block h3 { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--slate-dark); }

.bar-chart {
  display: flex;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
}

.bar-segment { transition: width 0.5s ease; height: 100%; }
.bar-segment.medical { background: var(--blue); }
.bar-segment.wages { background: #6366f1; }
.bar-segment.property { background: #8b5cf6; }
.bar-segment.pain { background: var(--green); }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--slate);
}

.chart-legend span { display: flex; align-items: center; gap: 0.35rem; }
.dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dot.medical { background: var(--blue); }
.dot.wages { background: #6366f1; }
.dot.property { background: #8b5cf6; }
.dot.pain { background: var(--green); }

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

.cta-section h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cta-section p { font-size: 0.9rem; color: var(--slate); margin-bottom: 1rem; }

.cta-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.cta-btn:hover { background: #047857; }

.info-section { padding: 3rem 0; }
.info-section h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--slate-dark);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.faq-item h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  color: var(--blue);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.65;
}

.faq-footer {
  font-size: 0.8rem;
  color: var(--slate-light);
  text-align: center;
  margin-top: 2rem;
  font-style: italic;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

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

.footer {
  background: var(--slate-dark);
  color: #cbd5e1;
  padding: 2rem 0;
  margin-top: 2rem;
}

.disclaimers p { font-size: 0.8rem; margin-bottom: 0.5rem; line-height: 1.5; }
.copyright { font-size: 0.75rem; margin-top: 1.5rem; color: var(--slate-light); }

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

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

.modal {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

.modal h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

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

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

.lead-form input,
.lead-form textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
}

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