:root {
  --brand: #0080ce;
  --brand-deep: #0f1830;
  --brand-muted: #94a5c2;
  --brand-soft: #edf4ff;
  --text: #14203a;
  --text-soft: #5a6780;
  --line: #dce5f2;
  --white: #ffffff;
  --page: #f7fbff;
  --shadow: 0 18px 48px rgba(15, 24, 48, 0.08);
  --shadow-soft: 0 10px 28px rgba(15, 24, 48, 0.06);
  --radius-xl: 42px;
  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 16px;
  --container: 1740px;
  --font-display: "Product Sans", "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(0, 128, 206, 0.08), transparent 28%),
    linear-gradient(180deg, #f9fbfe 0%, #f3f7fc 100%);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(var(--container), calc(100% - 7rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(220, 229, 242, 0.85);
  backdrop-filter: blur(10px);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: auto;
  padding: 0.35rem 0;
}

.brand img {
  width: clamp(118px, 10vw, 170px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.45rem;
}

.nav__links a {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #313c4d;
  font-weight: 500;
}

.nav__links a:hover {
  color: var(--brand);
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
  cursor: pointer;
}

.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
  content: "";
}

.nav__toggle-bars::before {
  transform: translateY(-6px);
}

.nav__toggle-bars::after {
  transform: translateY(4px);
}

.nav.is-open .nav__toggle-bars {
  background: transparent;
}

.nav.is-open .nav__toggle-bars::before {
  transform: translateY(0) rotate(45deg);
}

.nav.is-open .nav__toggle-bars::after {
  transform: translateY(-2px) rotate(-45deg);
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.button--primary {
  background: var(--brand);
  color: white;
  box-shadow: var(--shadow-soft);
}

.button--secondary {
  background: white;
  color: var(--brand);
  border-color: var(--brand);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  filter: saturate(0.7);
  cursor: not-allowed;
  box-shadow: none;
}

.hero {
  padding: 2.1rem 0 1.15rem;
}

.hero-marquee,
.calculator-layout,
.stats-grid,
.details-grid,
.grid-4,
.grid-3,
.grid-2,
.decision-grid {
  display: grid;
  gap: 1.75rem;
}

.hero-marquee {
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  align-items: center;
  gap: 2.5rem;
}

.calculator-layout {
  grid-template-columns: 1.12fr 0.88fr;
}

.stats-grid {
  grid-template-columns: 0.92fr 1fr 1fr;
}

.details-grid {
  grid-template-columns: 0.94fr 1.06fr;
}

.grid-4 {
  grid-template-columns: 1.12fr 1fr 1fr 1fr;
}

.grid-3,
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.decision-grid {
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
}

.panel,
.feature-card,
.stat-card,
.detail-card,
.cta-card,
.empty-state,
.calculator-form,
.preview-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 229, 242, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero__copy,
.hero-stage,
.decision-panel,
.feature-card,
.stat-card,
.detail-card,
.cta-card,
.empty-state,
.calculator-form,
.preview-card {
  padding: clamp(1.5rem, 2vw, 2.35rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.5rem;
  margin-bottom: 1.05rem;
  border-radius: 999px;
  background: #eaf1fc;
  color: var(--brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero h1,
.section-heading h2,
.results-header h1 {
  margin: 1rem 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.hero h1 {
  font-size: clamp(2.5rem, 3.8vw, 4rem);
}

.section-heading h2,
.results-header h1 {
  font-size: clamp(1.8rem, 2.5vw, 2.7rem);
}

.hero h1 span,
.accent {
  color: var(--brand);
}

.hero__copy {
  display: grid;
  align-content: center;
  gap: 0.35rem;
  min-height: 100%;
  padding: 0;
}

.hero-lead {
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.75;
}

.hero p,
.section-heading p,
.results-header p,
.muted,
.preview-note,
.stat-card p,
.detail-card p,
.cta-card p {
  color: var(--text-soft);
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.15rem;
}

#jdcCalculator .hero-actions .button {
  min-width: 220px;
}

.hero-inline-stats,
.detail-list,
.preview-panel {
  display: grid;
  gap: 1rem;
}

.hero-inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.hero-inline-stats div {
  display: grid;
  gap: 0.2rem;
}

.hero-inline-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}

.hero-inline-stats span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.hero-point,
.feature-item {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
}

.hero-point__icon,
.feature-icon {
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: linear-gradient(180deg, #1b8ad5, #0069b0);
  color: white;
  font-size: 1.15rem;
  font-weight: 900;
}

.hero-stage {
  display: grid;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-stage__media {
  position: relative;
  overflow: hidden;
  border-radius: 46px;
  background: #edf4ff;
  border: 1px solid rgba(220, 229, 242, 0.95);
  box-shadow: var(--shadow);
}

.hero-stage__media img {
  width: 100%;
  aspect-ratio: 1.1 / 0.92;
  object-fit: cover;
  border-radius: 46px;
}

.hero-stage__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  min-height: 34px;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 24, 48, 0.82);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-stage__caption {
  max-width: 34rem;
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.7;
}

.section--compact {
  padding-top: 0.4rem;
}

.decision-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 229, 242, 0.95);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.decision-panel--dark {
  color: white;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 20%),
    var(--brand-deep);
  border-color: transparent;
}

.decision-panel--dark .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: #cbe7ff;
}

.decision-panel--dark p {
  color: rgba(255, 255, 255, 0.76);
}

.decision-panel--dark h2 {
  margin: 1rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.section,
.results-header {
  padding: 1.9rem 0 3.5rem;
}

.section-heading {
  max-width: 58rem;
  margin-bottom: 1.9rem;
}

.feature-card h3,
.stat-card h3,
.detail-card h3,
.cta-card h3,
.calculator-form h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.feature-card h3,
.detail-card h3,
.cta-card h3 {
  font-size: 1.4rem;
}

.feature-card {
  min-height: 310px;
}

.feature-card--dark,
.stat-card--spotlight {
  background: var(--brand-deep);
  border-color: transparent;
  color: white;
}

.feature-card--dark p,
.feature-card--dark .muted,
.stat-card--spotlight .kicker,
.stat-card--spotlight .stat-subtle {
  color: rgba(255, 255, 255, 0.72);
}

.calculator-form {
  padding: 2.4rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #2d3950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input,
.select,
.input-group {
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input,
.select {
  padding: 0 1.1rem;
  font-size: 1.02rem;
  line-height: 1.25;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.85rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #5b6a82 50%),
    linear-gradient(135deg, #5b6a82 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% + 1px),
    calc(100% - 14px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.select option {
  font-size: 0.98rem;
}

.select option[disabled] {
  color: #7f8ba0;
}

.input:focus,
.select:focus,
.input-group input:focus {
  outline: none;
}

.field:focus-within label,
.field.is-focused label {
  color: var(--brand);
}

.field:focus-within .input,
.field:focus-within .select,
.field:focus-within .input-group,
.field.is-focused .input,
.field.is-focused .select,
.field.is-focused .input-group {
  border-color: rgba(0, 128, 206, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 128, 206, 0.12);
}

.input--invalid {
  border-color: #dc2626 !important;
}

.field-error {
  font-size: 0.78rem;
  color: #dc2626;
  font-weight: 700;
}

.input-group {
  display: grid;
  grid-template-columns: 104px 1fr;
  overflow: hidden;
}

.input-group span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  background: #f5f8fc;
  color: #5d6980;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  padding: 0 0.45rem;
  white-space: nowrap;
}

.input-group input {
  border: 0;
  padding: 0 1rem;
  background: transparent;
  color: inherit;
}

.range-row {
  display: grid;
  gap: 0.8rem;
}

.range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.alert {
  padding: 0.9rem 1rem;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.alert-danger {
  color: #7f1d1d;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.18);
}

.d-none {
  display: none !important;
}

.preview-card {
  min-height: 205px;
}

.preview-card h3,
.kicker {
  margin: 0 0 0.65rem;
  color: var(--brand-muted);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-value,
.stat-value {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.preview-value {
  font-size: clamp(1.55rem, 2.2vw, 2.3rem);
}

.stat-value {
  font-size: clamp(1.9rem, 2.7vw, 2.9rem);
}

.stat-card {
  min-height: 265px;
}

.stat-subtle {
  margin-top: 0.8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.15rem;
  border-radius: 999px;
  background: #e8f8f3;
  color: #00a476;
  font-weight: 800;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-row span:first-child {
  color: var(--text-soft);
}

.detail-row span:last-child {
  text-align: right;
  font-weight: 800;
}

.empty-state {
  text-align: center;
  padding: 2.4rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.lead-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.lead-table th,
.lead-table td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.lead-table th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-muted);
}

@media (max-width: 1200px) {

  .hero-marquee,
  .calculator-layout,
  .stats-grid,
  .details-grid,
  .grid-4,
  .grid-3,
  .grid-2,
  .decision-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .site-header__row {
    align-items: center;
    min-height: auto;
    padding: 0.3rem 0;
  }

  .container {
    width: min(var(--container), calc(100% - 2rem));
  }

  #jdcCalculator .hero-actions .button {
    width: 100%;
    min-width: 0;
  }

  .nav {
    margin-left: auto;
    width: auto;
    gap: 0.75rem;
  }

  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav__panel {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    display: none;
    width: min(320px, calc(100vw - 2rem));
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .nav.is-open .nav__panel {
    display: flex;
  }

  .nav__links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .nav__links a {
    font-size: 0.92rem;
  }

  .button {
    min-height: 42px;
    padding: 0 0.9rem;
  }

  .nav__panel .button {
    width: 100%;
  }

  .hero h1,
  .section-heading h2,
  .results-header h1 {
    font-size: clamp(1.8rem, 7vw, 2.35rem);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .hero-inline-stats {
    display: grid;
    gap: 0.85rem;
  }

  .hero,
  .section,
  .results-header {
    padding: 0.85rem 0 1.85rem;
  }

  .hero__copy,
  .hero-stage,
  .decision-panel,
  .feature-card,
  .stat-card,
  .detail-card,
  .cta-card,
  .empty-state,
  .calculator-form,
  .preview-card {
    padding: 1.15rem;
  }

  .hero-stage__media,
  .hero-stage__media img {
    border-radius: 32px;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .input,
  .select,
  .input-group {
    min-height: 56px;
  }

  .input-group {
    grid-template-columns: 82px 1fr;
  }

  .preview-value,
  .stat-value {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }

  .feature-card {
    min-height: auto;
  }

  .detail-row {
    flex-direction: column;
  }

  .preview-card,
  .stat-card,
  .detail-card,
  .cta-card {
    min-height: auto;
  }

  .lead-table th,
  .lead-table td {
    white-space: normal;
    vertical-align: top;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--container), calc(100% - 1rem));
  }

  .site-header {
    position: sticky;
  }

  .brand img {
    width: 102px;
  }

  .eyebrow {
    min-height: 36px;
    padding: 0 0.9rem;
    font-size: 0.74rem;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 9.5vw, 2.05rem);
  }

  .section-heading h2,
  .results-header h1 {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

  .hero p,
  .section-heading p,
  .results-header p,
  .muted,
  .preview-note,
  .stat-card p,
  .detail-card p,
  .cta-card p {
    font-size: 0.98rem;
  }

  .hero__copy,
  .hero-stage,
  .decision-panel,
  .feature-card,
  .stat-card,
  .detail-card,
  .cta-card,
  .empty-state,
  .calculator-form,
  .preview-card {
    padding: 1rem;
  }

  .form-grid {
    gap: 1rem;
  }

  .field label {
    font-size: 0.74rem;
  }

  .input,
  .select,
  .input-group {
    min-height: 52px;
  }

  .nav__panel {
    width: min(280px, calc(100vw - 1rem));
  }

  .nav__links a {
    font-size: 0.86rem;
  }

  .preview-value,
  .stat-value {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

}
