:root {
  --ink: #0A0F1E; --ink-2: #3D4663; --ink-3: #8892A4; --ink-4: #C2C9D6;
  --surface: #F4F6FB; --white: #FFFFFF;
  --accent: #1A3FAD; --accent-dark: #15328A; --accent-glow: rgba(26,63,173,0.16);
  --green: #12A150; --red: #D92D20; --red-bg: rgba(217,45,32,0.05);
  --border: rgba(10,15,30,0.09); --border-focus: rgba(59,91,219,0.45);
  --r: 12px; --r-lg: 20px; --r-xl: 28px;
  --ease: cubic-bezier(0.4,0,0.2,1); --t: 160ms;
  --shadow: 0 0 0 1px rgba(10,15,30,0.055), 0 4px 8px rgba(10,15,30,0.04), 0 20px 56px rgba(10,15,30,0.11);
  --shadow-btn: 0 1px 3px rgba(10,15,30,0.15), 0 6px 20px rgba(26,63,173,0.38);
  --fd: 'DM Sans', sans-serif; --fb: 'Instrument Sans', sans-serif;
}

.tr-form-wrap, .tr-form-wrap * { box-sizing: border-box; }
.tr-form-wrap, .tr-form-wrap input, .tr-form-wrap button, .tr-form-wrap label, .tr-form-wrap span {
  font-family: var(--fb) !important;
}
.tr-form-title, .tr-badge-free, .tr-slider-label, .tr-slider-value,
.tr-monthly-value, .tr-submit-btn, .tr-slider-input {
  font-family: var(--fd) !important;
}

.tr-form-wrap {
  font-family: var(--fb);
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  animation: tr-up 0.45s var(--ease) both;
}

@keyframes tr-up { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }

.tr-form-wrap::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 35%, #4B7BF5 65%, transparent);
  z-index: 2;
}

.tr-form-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0;
}

.tr-form-title {
  font-family: var(--fd); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}

.tr-badge-free {
  font-family: var(--fd); font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); background: rgba(18,161,80,.1);
  border-radius: 100px; padding: 3px 10px;
}

.tr-form-body { padding: 16px 28px 36px; }

.tr-slider-block { padding: 14px 0; border-bottom: 1px solid var(--border); }

.tr-slider-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; min-height: 30px;
}

.tr-slider-label {
  font-family: var(--fd); font-size: 15px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}

.tr-slider-value-wrap {
  position: relative;
  display: flex; align-items: center; gap: 3px;
  cursor: text; height: 30px;
}

.tr-slider-value {
  font-family: var(--fd); font-size: 28px; font-weight: 800;
  color: var(--ink); letter-spacing: -.04em; line-height: 1;
  border-bottom: 1.5px dashed var(--ink-4); padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color var(--t), color var(--t);
}

.tr-slider-value em {
  font-style: normal; font-size: 15px; font-weight: 600;
  color: var(--ink-3); margin-left: 2px; letter-spacing: 0;
}

.tr-slider-value-wrap:hover .tr-slider-value { border-bottom-color: var(--accent); color: var(--accent); }

.tr-slider-input {
  position: absolute; top: 0; right: 0;
  width: 100%; height: 100%;
  font-family: var(--fd); font-size: 22px; font-weight: 800;
  color: var(--ink); letter-spacing: -.04em;
  background: transparent; border: none;
  border-bottom: 2px solid var(--accent);
  outline: none; padding: 0; line-height: 1;
  text-align: right; opacity: 0; pointer-events: none;
  -moz-appearance: textfield;
}
.tr-slider-input::-webkit-outer-spin-button,
.tr-slider-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.tr-slider-unit {
  display: none; font-style: normal; font-family: var(--fd);
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  padding-bottom: 2px; flex-shrink: 0;
}

.tr-slider-value-wrap.is-editing .tr-slider-value { opacity: 0; }
.tr-slider-value-wrap.is-editing .tr-slider-input { opacity: 1; pointer-events: auto; }
.tr-slider-value-wrap.is-editing .tr-slider-unit  { display: block; }

.tr-slider-limits {
  display: flex; justify-content: space-between;
  margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink-3);
}

.noUi-target { background: var(--surface); border: none; box-shadow: none; border-radius: 99px; height: 4px; }
.noUi-connect { background: linear-gradient(90deg, var(--accent), #4B7BF5); border-radius: 99px; }
.noUi-horizontal .noUi-handle {
  width: 22px; height: 22px; top: -9px; right: -11px;
  border-radius: 50%; background: #fff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow), 0 2px 6px rgba(26,63,173,.2);
  cursor: grab;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.noUi-handle:active { cursor: grabbing; transform: scale(1.18); box-shadow: 0 0 0 7px var(--accent-glow); }
.noUi-handle::before, .noUi-handle::after { display: none; }

@media (hover: none) and (pointer: coarse) {
  .noUi-horizontal .noUi-handle { width: 36px !important; height: 36px !important; top: -16px !important; right: -18px !important; }
  .noUi-target { height: 6px; }
}

.tr-monthly-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 20px; border-bottom: 1px solid var(--border);
}

.tr-monthly-label { font-size: 15px; font-weight: 600; color: var(--ink-2); }

.tr-monthly-value {
  font-family: var(--fd); font-size: 32px; font-weight: 800;
  color: var(--accent); letter-spacing: -.05em; line-height: 1;
}

.tr-monthly-value em {
  font-style: normal; font-size: 16px; font-weight: 600;
  color: var(--accent); opacity: .7; margin-left: 3px; letter-spacing: 0;
}

.tr-fields-section { padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }

.tr-field { position: relative; }

.tr-input-wrap { position: relative; display: flex; align-items: center; }

.tr-input-wrap input {
  width: 100%; height: 50px; padding: 0 46px 0 15px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-family: var(--fb); font-size: 16px; font-weight: 500;
  color: var(--ink); background: var(--white);
  outline: none; -webkit-appearance: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.tr-input-wrap input::placeholder { color: #9BA5B4; font-weight: 400; }
.tr-input-wrap input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--accent-glow); }

.tr-icon-right {
  position: absolute; right: 0; top: 0; bottom: 0; width: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); pointer-events: none;
}

.tr-icon-right svg { display: block; width: 16px; height: 16px; }

.tr-field.is-valid .tr-input-wrap input { border-color: rgba(18,161,80,.35); color: var(--ink) !important; background: var(--white) !important; }
.tr-field.is-valid .tr-icon-right { color: var(--green); }
.tr-input-wrap input { color: var(--ink) !important; }
.tr-field.is-error .tr-input-wrap input { border-color: rgba(217,45,32,.4); background: var(--red-bg); box-shadow: 0 0 0 3px rgba(217,45,32,.08); }
.tr-field.is-error .tr-icon-right { color: var(--red); }

.tr-field-msg { font-size: 11.5px; font-weight: 500; color: var(--red); margin-top: 5px; display: none; padding-left: 2px; }
.tr-field.is-error .tr-field-msg { display: block; }

.tr-spin { animation: tr-rotate .75s linear infinite; transform-origin: center; }
@keyframes tr-rotate { to { transform: rotate(360deg); } }

.tr-checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.tr-checkbox-label input[type=checkbox] { position: absolute; opacity: 0; width: 0; height: 0; }

.tr-checkbox-box {
  flex-shrink: 0; width: 19px; height: 19px;
  border: 1.5px solid var(--ink-4); border-radius: 5px;
  background: var(--white); display: flex; align-items: center; justify-content: center;
  margin-top: 1px; transition: all var(--t) var(--ease);
}

.tr-checkbox-label input:checked ~ .tr-checkbox-box {
  background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}

.tr-checkbox-label input:checked ~ .tr-checkbox-box::after {
  content: ''; display: block; width: 4px; height: 8px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px,-1px);
}

.tr-checkbox-text { font-size: 12px; line-height: 1.6; color: #4A5568; }
.tr-field.is-error .tr-checkbox-box { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,45,32,.08); }

.tr-example {
  font-size: 11px; line-height: 1.7; color: #4A5568;
  background: #EEF1FA; border-radius: var(--r); padding: 11px 14px; border: none;
}

.tr-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 58px; margin-top: 18px;
  font-family: var(--fd); font-size: 19px; font-weight: 800; letter-spacing: .01em; text-transform: none;
  color: #fff; background: var(--accent); border: none; border-radius: var(--r);
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: var(--shadow-btn);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.tr-submit-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.13) 0%, transparent 55%);
  pointer-events: none;
}

.tr-submit-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.15) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}

.tr-submit-btn:hover::after { transform: translateX(120%); }
.tr-submit-btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 2px 6px rgba(10,15,30,.12), 0 10px 30px rgba(26,63,173,.5); }
.tr-submit-btn:active { transform: translateY(0); }
.tr-submit-btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  background: var(--accent-dark);
  transform: none !important;
  box-shadow: 0 1px 3px rgba(10,15,30,.15), 0 4px 12px rgba(59,91,219,.25) !important;
}

.tr-btn-arrow { transition: transform var(--t) var(--ease); display: inline-block; }
.tr-submit-btn:hover .tr-btn-arrow { transform: translateX(4px); }

.tr-btn-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  flex-shrink: 0;
}
.tr-btn-spinner::after {
  content: '';
  display: block;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-right-color: rgba(255,255,255,.6);
  animation: tr-spin .7s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes tr-spin {
  to { transform: rotate(360deg); }
}
.tr-loading-status {
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  color: rgba(255,255,255,.92);
  transition: opacity .25s ease;
}
.tr-submit-btn:disabled {
  opacity: 1; cursor: not-allowed;
  background: var(--accent-dark); transform: none !important;
  box-shadow: 0 1px 3px rgba(10,15,30,.15), 0 4px 12px rgba(26,63,173,.25) !important;
}

.tr-trust-strip { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 14px; }
.tr-trust-item { font-size: 11px; font-weight: 600; color: #4F5B6E; }
.tr-trust-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }

.tr-form-error {
  padding: 11px 14px; background: var(--red-bg);
  border: 1px solid rgba(217,45,32,.18); border-radius: var(--r);
  font-size: 13px; font-weight: 500; color: var(--red); margin-top: 10px;
}

.tr-salus-wrap iframe { border: none; width: 100%; min-height: 600px; display: block; }

@media (max-width: 480px) {
  .tr-form-header { padding: 20px 20px 0; }
  .tr-form-body { padding: 14px 20px 24px; }
  .tr-form-wrap { border-radius: var(--r-lg); }
  .tr-monthly-value { font-size: 28px; font-weight: 800; }
  .tr-submit-btn { font-size: 16px; font-weight: 800; letter-spacing: .01em; height: 56px; }
  .tr-slider-value { font-size: 20px; font-weight: 800; }
  .tr-monthly-label { font-size: 13px; font-weight: 600; }
  .tr-slider-label { font-size: 11px; font-weight: 700; }
}

@supports (-webkit-touch-callout: none) {
  .tr-input-wrap input { font-size: 16px; }
}

/* ── SVG Icons via inline data URI ───────────────────────────────────────── */
.tr-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tr-ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ── Improved slider handle ───────────────────────────────────────────────── */
.noUi-horizontal .noUi-handle {
  width: 24px !important;
  height: 24px !important;
  top: -10px !important;
  right: -12px !important;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f0f4ff);
  border: 2.5px solid var(--accent) !important;
  box-shadow: 0 0 0 4px var(--accent-glow), 0 2px 8px rgba(26,63,173,0.25) !important;
  cursor: grab;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.noUi-handle:active {
  cursor: grabbing;
  transform: scale(1.2) !important;
  box-shadow: 0 0 0 8px var(--accent-glow), 0 4px 16px rgba(26,63,173,0.35) !important;
}

/* ── Loading state steps ──────────────────────────────────────────────────── */
.tr-loading-status {
  font-family: var(--fd) !important;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  margin-top: 4px;
  min-height: 18px;
  animation: tr-fade-in 0.3s var(--ease);
}

@keyframes tr-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ── Reject page ──────────────────────────────────────────────────────────── */
.tr-reject-wrap {
  max-width: 480px;
  margin: 60px auto;
  padding: 48px 40px;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  text-align: center;
  font-family: var(--fb);
  -webkit-font-smoothing: antialiased;
}

.tr-reject-icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: block;
}

.tr-reject-title {
  font-family: var(--fd) !important;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.tr-reject-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 28px;
}

.tr-reject-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.tr-reject-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 14px 16px;
  text-align: left;
}

.tr-reject-option-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.tr-reject-option-text { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.tr-reject-option-text strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

.tr-reject-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  height: 52px;
  background: var(--accent);
  color: #fff !important;
  font-family: var(--fd) !important;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r);
  text-decoration: none !important;
  box-shadow: var(--shadow-btn);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.tr-reject-btn:hover { background: var(--accent-dark); transform: translateY(-2px); }

/* ── Analytics data layer ─────────────────────────────────────────────────── */
/* No CSS needed - handled in JS */

/* ── Social proof strip ──────────────────────────────────────────────────── */
.tr-proof-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 12px 16px;
}

.tr-proof-avatars { display: flex; }

.tr-proof-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--white);
  margin-left: -10px;
  flex-shrink: 0;
  background: var(--surface);
  object-fit: cover;
}
.tr-proof-av:first-child { margin-left: 0; }

.tr-proof-info { display: flex; flex-direction: column; gap: 2px; }

.tr-proof-stars { color: #F5A623; font-size: 13px; letter-spacing: 1px; line-height: 1; }

.tr-proof-text { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.tr-proof-text strong { font-weight: 700; color: var(--ink); }
