/* Eliqua.CX Loyalty Revenue Potential Calculator — scoped to .ld-calc for WordPress */
.ld-calc {
  --color-navy: #012f6b;
  --color-blue: #0056a7;
  --color-cyan: #00aeef;
  --brand-gradient: linear-gradient(90deg, var(--color-navy) 0%, var(--color-blue) 50%, var(--color-cyan) 100%);

  --color-text: #212121;
  --color-text-muted: #3b3950;
  --color-text-subtle: #585866;
  --color-bg: #f5f5f5;
  --color-surface: #ffffff;
  --color-panel: #f7f9fc;
  --color-border: #e3e6ea;
  --color-track: #dbe8f5;
  --color-blue-soft: #e8f1fa;
  --color-error: #b00020;
  --color-orange: #ff6d2c; 
  --color-orange-text: #c2410c; 
  --color-orange-soft: #fff1ea;

  --font-heading: 'Geologica', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(1, 47, 107, 0.08);
}
.ld-calc *,
.ld-calc *::before,
.ld-calc *::after {
  box-sizing: border-box;
}
.ld-calc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
}
.ld-calc h1,
.ld-calc h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}
.ld-calc [hidden] {
  display: none !important;
}
.ld-calc .container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.ld-calc .site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.ld-calc .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.ld-calc .logo {
  height: 36px;
  width: auto;
}
.ld-calc .header-tag {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-text-muted);
}
.ld-calc .hero {
  text-align: center;
  padding-block: 18px 16px;
}
.ld-calc .hero h1 {
  max-width: 1100px;
  margin: 0 auto 4px;
  font-size: clamp(22px, 2.6vw, 28px);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ld-calc .lead {
  margin: 0;
  font-size: 14.5px;
  color: var(--color-text-muted);
}
.ld-calc .site-footer {
  padding-block: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-subtle);
}
.ld-calc .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.ld-calc .inputs,
.ld-calc .results {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ld-calc .panel {
  background: var(--color-panel);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.ld-calc .panel-title {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--color-navy);
}
.ld-calc .control {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.ld-calc .panel > .control:last-child {
  margin-bottom: 0;
}
.ld-calc .control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.ld-calc .control label,
.ld-calc .control legend {
  font-weight: 600;
  font-size: 14px;
}
.ld-calc .control legend {
  margin-bottom: 8px;
}
.ld-calc .control label .optional {
  font-weight: 400;
  color: var(--color-text-subtle);
}
.ld-calc .value-display {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-navy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ld-calc .value-display.is-invalid {
  color: var(--color-error);
}
.ld-calc .slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 6px 0 4px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--color-blue) 0 var(--fill, 0%), var(--color-track) var(--fill, 0%) 100%);
  cursor: pointer;
}
.ld-calc .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.ld-calc .slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-blue);
}
.ld-calc .slider:focus-visible {
  outline: 3px solid rgba(0, 86, 167, 0.3);
  outline-offset: 4px;
}
.ld-calc .control-note {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--color-text-subtle);
}
.ld-calc .control-note:empty {
  display: none;
}
.ld-calc .field-error {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-error);
}
.ld-calc .field-error:empty {
  display: none;
}
.ld-calc .business-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.ld-calc .business-stats.is-empty {
  opacity: 0.5;
}
.ld-calc .stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  background: var(--color-blue-soft);
  border-radius: var(--radius-sm);
}
.ld-calc .stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.ld-calc .stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--color-blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ld-calc .stat-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
}
.ld-calc .stat-label {
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--color-text-muted);
}
.ld-calc .stat-risk {
  background: var(--color-orange-soft);
}
.ld-calc .stat-risk .stat-value {
  color: var(--color-orange-text);
}
.ld-calc .stat-source {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--color-text-subtle);
}
.ld-calc .stat-source a {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ld-calc .program-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.ld-calc .program-text strong {
  color: var(--color-blue);
  font-variant-numeric: tabular-nums;
}
.ld-calc .subsection-title {
  margin: 16px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-navy);
}
.ld-calc .segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #e9eef4;
  border-radius: var(--radius-md);
}
.ld-calc .segmented label {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.ld-calc .segmented input {
  position: absolute;
  opacity: 0;
}
.ld-calc .segmented span {
  display: block;
  padding: 8px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.ld-calc .segmented input:checked + span {
  background: var(--color-blue);
  color: #fff;
}
.ld-calc .segmented input:focus-visible + span {
  outline: 3px solid rgba(0, 86, 167, 0.35);
  outline-offset: 1px;
}
.ld-calc .segmented-sm span {
  padding: 6px 10px;
  font-size: 13px;
}
.ld-calc .panel-results {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}
.ld-calc .results-intro {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}
.ld-calc .headline {
  margin: 4px 0 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(34px, 4vw, 46px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ld-calc .headline-unit {
  font-size: 0.4em;
  font-weight: 600;
}
.ld-calc .headline-annual {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin: 4px 0 0;
  padding: 2px 14px;
  background: var(--color-blue-soft);
  border-radius: 999px;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
}
.ld-calc .headline-annual strong {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
}
.ld-calc .headline-annual-unit {
  font-size: 14px;
  font-weight: 600;
}
.ld-calc .headline-annual:has(strong:empty) {
  display: none;
}
.ld-calc .trust-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}
.ld-calc .trust-note a,
.ld-calc .cta-secondary {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ld-calc .cta-secondary {
  font-size: 13.5px;
}
.ld-calc .cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 14px;
}
.ld-calc .headline-sub {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--color-text-muted);
}
.ld-calc .results-invalid {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #fdecee;
  color: var(--color-error);
  font-size: 14px;
}
.ld-calc .sources-title {
  margin: 16px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-navy);
}
.ld-calc .general-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--color-border);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-muted);
}
.ld-calc #resultsBody > .general-label:first-child {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}
.ld-calc .general-label span {
  padding: 2px 8px;
  font-weight: 400;
  font-size: 12px;
  background: var(--color-blue-soft);
  color: var(--color-navy);
  border-radius: 999px;
}
.ld-calc .panel-intro {
  margin: -2px 0 10px;
}
.ld-calc .range-note {
  margin: 12px 0 0;
}
.ld-calc .source {
  margin-bottom: 10px;
}
.ld-calc .source:last-child {
  margin-bottom: 0;
}
.ld-calc .sources-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text-subtle);
}
.ld-calc .source-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
}
.ld-calc .source-value {
  font-variant-numeric: tabular-nums;
}
.ld-calc .source-track {
  height: 6px;
  margin: 5px 0 0;
  background: var(--color-track);
  border-radius: 5px;
  overflow: hidden;
}
.ld-calc .source-fill {
  height: 100%;
  background: color-mix(in srgb, #00aeef 30%, transparent);
  border-radius: 5px;
  transition: width 0.3s ease;
}
.ld-calc .source-fill-core {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 5px;
  transition: width 0.3s ease;
}
.ld-calc .source-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--color-text-subtle);
}
.ld-calc .kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.ld-calc .kpi {
  padding: 12px;
  background: var(--color-panel);
  border-radius: var(--radius-sm);
}
.ld-calc .kpi-label {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
}
.ld-calc .kpi strong {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
}
.ld-calc .campaign-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  cursor: pointer;
}
.ld-calc .campaign-question:first-child {
  padding-top: 0;
  border-top: 0;
}
.ld-calc .campaign-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ld-calc .campaign-name {
  font-weight: 600;
  font-size: 14px;
}
.ld-calc .campaign-question .control-note {
  margin: 2px 0 0;
  font-size: 12.5px;
}
.ld-calc #programDetails > .control:last-child {
  margin-bottom: 0;
}
.ld-calc .switch {
  position: relative;
  flex-shrink: 0;
}
.ld-calc .switch-input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.ld-calc .switch-track {
  position: relative;
  display: block;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: var(--color-border);
  transition: background 0.2s ease;
}
.ld-calc .switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(1, 47, 107, 0.25);
  transition: transform 0.2s ease;
}
.ld-calc .switch-icon {
  position: absolute;
  top: 6px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ld-calc .switch-icon-on {
  left: 7px;
  opacity: 0;
}
.ld-calc .switch-icon-off {
  right: 7px;
  stroke: var(--color-text-subtle);
}
.ld-calc .switch-input:checked + .switch-track {
  background: var(--color-blue);
}
.ld-calc .switch-input:checked + .switch-track .switch-thumb {
  transform: translateX(24px);
}
.ld-calc .switch-input:checked + .switch-track .switch-icon-on {
  opacity: 1;
}
.ld-calc .switch-input:checked + .switch-track .switch-icon-off {
  opacity: 0;
}
.ld-calc .switch-input:focus-visible + .switch-track {
  outline: 3px solid rgba(0, 86, 167, 0.35);
  outline-offset: 2px;
}
.ld-calc .campaign-tip {
  margin: 4px 0 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: var(--color-blue-soft);
  border-radius: var(--radius-sm);
  color: var(--color-navy);
}
.ld-calc .campaign-tip:empty {
  display: none;
}
.ld-calc .source.is-muted .source-head {
  color: var(--color-text-subtle);
}
.ld-calc .breakdown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 16px 24px;
}
.ld-calc .breakdown summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-navy);
}
.ld-calc .breakdown table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 13px;
}
.ld-calc .breakdown td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--color-border);
}
.ld-calc .breakdown td:last-child {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ld-calc .breakdown tr.is-total td {
  border-top: 2px solid var(--color-navy);
  color: var(--color-navy);
}
.ld-calc .breakdown tr.is-section td {
  padding-top: 14px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-navy);
  text-align: left;
}
.ld-calc .disclaimer {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--color-text-subtle);
}
.ld-calc .campaign-value {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-blue);
  font-variant-numeric: tabular-nums;
}
.ld-calc .campaign-value:empty {
  display: none;
}
.ld-calc .cta-panel .panel-title {
  margin-bottom: 4px;
  font-size: 16px;
}
.ld-calc .cta-button {
  display: inline-block;
  padding: 10px 18px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  background: var(--brand-gradient);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0, 86, 167, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ld-calc .cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 86, 167, 0.32);
}
.ld-calc .cta-button:focus-visible {
  outline: 3px solid rgba(0, 86, 167, 0.35);
  outline-offset: 3px;
}
.ld-calc .methodology {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.ld-calc .methodology p {
  margin: 0 0 10px;
}
.ld-calc .methodology h3 {
  margin: 18px 0 6px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-navy);
}
.ld-calc .methodology h4 {
  margin: 12px 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy);
}
.ld-calc .methodology ul {
  margin: 0 0 10px;
  padding-left: 18px;
}
.ld-calc .methodology li {
  margin-bottom: 4px;
}
.ld-calc .methodology strong {
  color: var(--color-text);
}
.ld-calc .methodology a {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ld-calc .churn-pictogram {
  display: flex;
  gap: 1px;
  height: 22px;
  align-items: center;
}
.ld-calc .person {
  position: relative;
  display: block;
  width: 12px;
  height: 14px;
}
.ld-calc .person svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #f6c7b1;
}
.ld-calc .person-lost {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc((1 - var(--share, 0)) * 100%) 0 0);
}
.ld-calc .person-lost svg {
  fill: var(--color-orange);
}
.ld-calc .explain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-blue-soft);
}
.ld-calc .explain-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--color-blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ld-calc .explain-icon-retention {
  width: 34px;
  height: 34px;
  background: var(--brand-gradient);
}
.ld-calc .explain-icon-retention svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}
.ld-calc .explain-retention {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-panel);
  border-left: 4px solid var(--color-cyan);
  border-radius: var(--radius-md);
}
.ld-calc .explain-main {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.ld-calc .explain-main strong {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ld-calc .explain-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.ld-calc .explain-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-panel);
  border-radius: var(--radius-md);
}
.ld-calc .explain-value {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--color-text-muted);
}
.ld-calc .explain-value strong {
  font-family: var(--font-heading);
  font-size: 19px;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 860px) {
.ld-calc .layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
.ld-calc .header-tag {
    display: none;
  }
.ld-calc .panel {
    padding: 18px;
  }
.ld-calc .kpi-row,
.ld-calc .explain-row,
.ld-calc .business-stats {
    grid-template-columns: 1fr;
  }
.ld-calc .stat {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
.ld-calc .stat-label {
    flex: 1;
  }
.ld-calc .stat-risk {
    flex-wrap: wrap;
  }
.ld-calc .stat-risk .churn-pictogram {
    flex-basis: 100%;
  }
}

/* ---- WordPress/Astra isolation: undo the theme's global range-input styles ---- */
.ld-calc .slider { margin: 6px 0 4px; padding: 0; border: 0; }
.ld-calc .slider::-webkit-slider-runnable-track { height: auto; box-shadow: none; background: transparent; border: 0; border-radius: 0; }
.ld-calc .slider:focus::-webkit-slider-runnable-track { background: transparent; }
.ld-calc .slider::-webkit-slider-thumb { margin-top: 0; }
.ld-calc .slider::-moz-range-track { height: auto; box-shadow: none; background: transparent; border: 0; border-radius: 0; }
.ld-calc .slider::-moz-range-thumb { box-shadow: none; }
