:root {
  --referral-paper: #f4f2eb;
  --referral-sheet: #fffefa;
  --referral-inset: #f1f0eb;
  --referral-ink: #17243d;
  --referral-text: #273249;
  --referral-secondary: #697386;
  --referral-muted: #8b929f;
  --referral-line: rgba(23, 36, 61, 0.11);
  --referral-line-strong: rgba(23, 36, 61, 0.19);
  --referral-green: #397c61;
  --referral-green-soft: #e8f1ec;
  --referral-gold: #b17a20;
  --referral-danger: #a84641;
  --referral-danger-soft: #fff0ef;
  --referral-focus: rgba(57, 124, 97, 0.24);
  color: var(--referral-text);
  background: var(--referral-paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; }
button, input, textarea { font: inherit; }
a { color: inherit; }

.referral-header {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.referral-brand { display: flex; align-items: center; gap: 10px; color: var(--referral-ink); text-decoration: none; }
.referral-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--referral-ink);
  color: white;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: -0.04em;
}
.referral-brand > span:last-child { display: grid; gap: 1px; }
.referral-brand strong { font-size: 13px; font-weight: 720; letter-spacing: -0.01em; }
.referral-brand small { color: var(--referral-secondary); font-size: 10px; font-weight: 600; }
.referral-header-link {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--referral-ink);
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.referral-header-link:hover { background: #243552; }
.referral-header-link:active { transform: scale(0.97); }

.referral-hero {
  display: grid;
  width: min(1120px, calc(100% - 48px));
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  align-items: center;
  gap: 72px;
  min-height: 620px;
  margin: 0 auto;
  padding: 72px 0 92px;
}
.referral-kicker { margin: 0; color: var(--referral-green); font-size: 10px; font-weight: 760; letter-spacing: 0.18em; }
.referral-hero h1 {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--referral-ink);
  font-size: clamp(42px, 5.5vw, 70px);
  font-weight: 730;
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-wrap: balance;
}
.referral-offer { max-width: 660px; margin: 28px 0 0; color: var(--referral-text); font-size: clamp(19px, 2.2vw, 27px); line-height: 1.55; }
.referral-offer strong { color: var(--referral-green); font-size: 1.13em; font-weight: 780; white-space: nowrap; }
.referral-recurring { margin: 8px 0 0; color: var(--referral-secondary); font-size: 15px; font-weight: 620; }
.referral-primary-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-top: 32px;
  padding: 15px 18px;
  border-radius: 11px;
  background: var(--referral-ink);
  color: white;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.referral-primary-action:hover { background: #243552; }
.referral-primary-action:active { transform: scale(0.97); }
.referral-hero-note { max-width: 550px; margin: 13px 0 0; color: var(--referral-muted); font-size: 11px; line-height: 1.6; }

.referral-connection {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(40px, 1fr) auto;
  align-items: center;
  min-height: 360px;
  padding: 44px;
  border-radius: 36px;
  background: var(--referral-sheet);
  box-shadow: 0 0 0 1px rgba(23, 36, 61, 0.05), 0 2px 5px rgba(23, 36, 61, 0.04), 0 24px 70px rgba(23, 36, 61, 0.07);
}
.connection-node { position: relative; z-index: 1; display: grid; width: 82px; height: 82px; place-items: center; border-radius: 24px; background: var(--referral-inset); color: var(--referral-secondary); }
.connection-node i, .connection-line i { font-size: 11px; font-style: normal; font-weight: 700; }
.connection-node-banana { width: 106px; height: 106px; border-radius: 30px; background: var(--referral-ink); color: white; box-shadow: 0 8px 28px rgba(23, 36, 61, 0.17); }
.connection-node-banana b { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: white; color: var(--referral-ink); font-size: 15px; }
.connection-node-banana i { margin-top: -18px; color: rgba(255, 255, 255, 0.76); font-size: 9px; }
.connection-node-client { position: absolute; right: 50%; bottom: 38px; width: 76px; height: 76px; transform: translateX(50%); }
.connection-line { position: relative; height: 2px; background: rgba(57, 124, 97, 0.26); }
.connection-line::after { position: absolute; top: 50%; right: -1px; width: 7px; height: 7px; border-top: 2px solid var(--referral-green); border-right: 2px solid var(--referral-green); content: ""; transform: translateY(-50%) rotate(45deg); }
.connection-line i { position: absolute; left: 50%; bottom: 10px; padding: 4px 7px; border-radius: 99px; background: var(--referral-green-soft); color: var(--referral-green); transform: translateX(-50%); white-space: nowrap; }
.connection-line-client { position: absolute; left: 50%; bottom: 109px; width: 2px; height: 52px; transform: translateX(-50%); }
.connection-line-client::after { top: auto; right: auto; bottom: -1px; left: 50%; transform: translateX(-50%) rotate(135deg); }
.connection-line-client i { bottom: auto; left: 12px; top: 50%; transform: translateY(-50%); }

.referral-services, .referral-process, .referral-conditions, .referral-registration {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0;
  border-top: 1px solid var(--referral-line);
}
.referral-section-heading { max-width: 620px; }
.referral-section-heading h2, .referral-form-intro h2 { margin: 10px 0 0; color: var(--referral-ink); font-size: clamp(28px, 3.6vw, 42px); font-weight: 720; letter-spacing: -0.045em; line-height: 1.18; }
.referral-section-heading > p:last-child, .referral-form-intro > p:last-child { margin: 12px 0 0; color: var(--referral-secondary); font-size: 14px; line-height: 1.65; }

.referral-service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 44px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--referral-line); border-radius: 18px; background: var(--referral-line); list-style: none; }
.referral-service-list li { display: flex; min-height: 92px; align-items: center; gap: 18px; padding: 24px; background: var(--referral-sheet); color: var(--referral-ink); font-size: 17px; font-weight: 660; }
.referral-service-list span { color: var(--referral-green); font-size: 10px; font-weight: 780; letter-spacing: 0.08em; }
.referral-reassurance { max-width: 880px; margin: 30px 0 0; padding-left: 20px; border-left: 3px solid var(--referral-green); color: var(--referral-text); font-size: 16px; font-weight: 550; line-height: 1.85; }

.referral-step-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 44px 0 0; padding: 0; list-style: none; }
.referral-step-list li { min-height: 190px; padding: 24px; border-radius: 18px; background: var(--referral-sheet); box-shadow: 0 0 0 1px rgba(23, 36, 61, 0.06), 0 2px 5px rgba(23, 36, 61, 0.035); }
.referral-step-list li > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--referral-green-soft); color: var(--referral-green); font-size: 12px; font-weight: 800; }
.referral-step-list div { margin-top: 26px; }
.referral-step-list strong { color: var(--referral-ink); font-size: 16px; }
.referral-step-list p { margin: 8px 0 0; color: var(--referral-secondary); font-size: 13px; line-height: 1.65; }

.referral-conditions { display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr); gap: 80px; }
.referral-conditions ul { margin: 0; padding: 26px 28px 26px 50px; border-radius: 18px; background: var(--referral-inset); color: var(--referral-text); }
.referral-conditions li { padding: 7px 0 7px 3px; font-size: 12px; line-height: 1.65; }
.referral-conditions li::marker { color: var(--referral-green); }
.referral-policy-links { display: flex; grid-column: 2; gap: 20px; margin: -56px 28px 0; font-size: 11px; font-weight: 650; }
.referral-policy-links a { color: var(--referral-green); text-underline-offset: 3px; }

.referral-registration { padding-bottom: 120px; }
.referral-form-intro { max-width: 700px; margin-bottom: 38px; }
.referral-form { display: grid; gap: 28px; }
.referral-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 28px; border: 0; border-radius: 20px; background: var(--referral-sheet); box-shadow: 0 0 0 1px rgba(23, 36, 61, 0.055), 0 2px 6px rgba(23, 36, 61, 0.035); }
.referral-form legend { display: flex; align-items: center; gap: 10px; padding: 0 0 4px; color: var(--referral-ink); font-size: 15px; font-weight: 740; }
.referral-form legend span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--referral-green-soft); color: var(--referral-green); font-size: 10px; font-weight: 800; }
.referral-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.referral-field-wide { grid-column: 1 / -1; }
.referral-label { color: var(--referral-text); font-size: 12px; font-weight: 680; }
.referral-label em, .referral-check em { margin-left: 5px; color: var(--referral-green); font-size: 9px; font-style: normal; font-weight: 760; }
.referral-label i { margin-left: 5px; color: var(--referral-muted); font-size: 9px; font-style: normal; font-weight: 600; }
.referral-field input, .referral-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: 0;
  background: var(--referral-inset);
  color: var(--referral-ink);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.referral-field input { min-height: 50px; padding: 0 14px; }
.referral-field textarea { min-height: 104px; resize: vertical; padding: 13px 14px; line-height: 1.6; }
.referral-field input::placeholder, .referral-field textarea::placeholder { color: #9a9fa8; }
.referral-field input:focus, .referral-field textarea:focus { border-color: var(--referral-green); background: #fff; box-shadow: 0 0 0 3px var(--referral-focus); }
.referral-field input[aria-invalid="true"], .referral-field textarea[aria-invalid="true"] { border-color: var(--referral-danger); background: var(--referral-danger-soft); }
.referral-hint { min-height: 15px; color: var(--referral-muted); font-size: 10px; line-height: 1.5; }
.referral-error { min-height: 0; color: var(--referral-danger); font-size: 10px; font-weight: 620; line-height: 1.45; }
.referral-error:empty { display: none; }

.referral-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 11px; background: var(--referral-inset); }
.referral-segmented label { position: relative; }
.referral-segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.referral-segmented span { display: grid; min-height: 44px; place-items: center; border-radius: 8px; color: var(--referral-secondary); font-size: 12px; font-weight: 650; cursor: pointer; }
.referral-segmented input:checked + span { background: var(--referral-sheet); color: var(--referral-ink); box-shadow: 0 1px 4px rgba(23, 36, 61, 0.1); }
.referral-segmented input:focus-visible + span { outline: 3px solid var(--referral-focus); outline-offset: 1px; }
.referral-segmented[aria-invalid="true"] { box-shadow: 0 0 0 1px var(--referral-danger); }

.referral-consents { display: grid; gap: 6px; padding: 24px 28px; border-radius: 18px; background: var(--referral-sheet); box-shadow: 0 0 0 1px rgba(23, 36, 61, 0.055); }
.referral-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--referral-text); font-size: 12px; line-height: 1.65; cursor: pointer; }
.referral-check + .referral-error { margin: -2px 0 8px 32px; }
.referral-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--referral-green); }
.referral-check input:focus-visible { outline: 3px solid var(--referral-focus); outline-offset: 2px; }
.referral-check a { color: var(--referral-green); font-weight: 680; text-underline-offset: 3px; }
.referral-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.referral-turnstile { min-height: 0; }
.referral-service-message, .referral-form-error { padding: 13px 15px; border-radius: 11px; background: var(--referral-danger-soft); color: var(--referral-danger); font-size: 12px; font-weight: 620; line-height: 1.55; }
.referral-service-message { margin-bottom: 20px; }
.referral-form-error { margin: 0; }
.referral-submit { display: flex; width: 100%; min-height: 58px; align-items: center; justify-content: space-between; border: 0; border-radius: 12px; padding: 0 20px; background: var(--referral-ink); color: white; font-size: 14px; font-weight: 720; cursor: pointer; transition: background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease; }
.referral-submit:hover { background: #243552; }
.referral-submit:active { transform: scale(0.99); }
.referral-submit:focus-visible, .referral-primary-action:focus-visible, .referral-header-link:focus-visible, .referral-brand:focus-visible, a:focus-visible { outline: 3px solid var(--referral-focus); outline-offset: 3px; }
.referral-submit:disabled { cursor: wait; opacity: 0.65; }
.referral-submit i { font-size: 20px; font-style: normal; font-weight: 400; }
.referral-submit-note { margin: -16px 0 0; color: var(--referral-muted); font-size: 10px; line-height: 1.6; text-align: center; }

.referral-success { padding: 64px 28px; border-radius: 22px; background: var(--referral-sheet); box-shadow: 0 0 0 1px rgba(23, 36, 61, 0.055), 0 12px 40px rgba(23, 36, 61, 0.06); text-align: center; }
.referral-success-mark { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 22px; border-radius: 17px; background: var(--referral-green-soft); color: var(--referral-green); font-size: 20px; font-weight: 800; }
.referral-success h2 { margin: 10px 0 0; color: var(--referral-ink); font-size: 32px; letter-spacing: -0.04em; }
.referral-success > p:not(.referral-kicker) { max-width: 600px; margin: 14px auto 0; color: var(--referral-secondary); font-size: 13px; line-height: 1.7; }
.referral-success dl { width: min(420px, 100%); margin: 30px auto 0; padding: 20px; border-radius: 14px; background: var(--referral-inset); }
.referral-success dt { color: var(--referral-muted); font-size: 10px; font-weight: 700; }
.referral-success dd { margin: 7px 0 0; color: var(--referral-ink); font-size: 20px; font-weight: 760; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.referral-success .referral-success-note { font-size: 10px; }

.referral-footer { display: flex; width: min(1120px, calc(100% - 48px)); align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; padding: 30px 0 max(30px, env(safe-area-inset-bottom)); border-top: 1px solid var(--referral-line); color: var(--referral-muted); }
.referral-footer div { display: grid; gap: 2px; }
.referral-footer strong { color: var(--referral-text); font-size: 11px; }
.referral-footer span { font-size: 9px; }
.referral-footer nav { display: flex; gap: 18px; font-size: 10px; }
.referral-footer a { text-underline-offset: 3px; }

.referral-legal-main { width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 74px 0 110px; }
.referral-legal-heading { padding-bottom: 48px; }
.referral-legal-heading h1 { margin: 14px 0 0; color: var(--referral-ink); font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.05em; }
.referral-legal-heading > p:last-child { margin: 13px 0 0; color: var(--referral-muted); font-size: 12px; }
.referral-legal-document { padding: 36px 44px; border-radius: 22px; background: var(--referral-sheet); box-shadow: 0 0 0 1px rgba(23, 36, 61, 0.055), 0 8px 32px rgba(23, 36, 61, 0.045); }
.referral-legal-document section + section { margin-top: 34px; padding-top: 34px; border-top: 1px solid var(--referral-line); }
.referral-legal-document h2 { margin: 0; color: var(--referral-ink); font-size: 18px; letter-spacing: -0.02em; }
.referral-legal-document h3 { margin: 25px 0 0; color: var(--referral-text); font-size: 14px; }
.referral-legal-document p { margin: 10px 0 0; color: var(--referral-secondary); font-size: 13px; line-height: 1.9; }
.referral-legal-document a { color: var(--referral-green); }
.referral-privacy-section { scroll-margin-top: 24px; }
.referral-privacy-section > .referral-kicker { margin-bottom: 10px; color: var(--referral-green); font-size: 10px; }

@media (max-width: 800px) {
  .referral-header { width: min(100% - 32px, 680px); min-height: 68px; }
  .referral-header-link { padding-inline: 13px; }
  .referral-hero { width: min(100% - 32px, 680px); grid-template-columns: 1fr; gap: 52px; min-height: 0; padding: 62px 0 76px; }
  .referral-hero h1 { font-size: clamp(38px, 10vw, 58px); }
  .referral-connection { min-height: 300px; padding: 32px; }
  .referral-services, .referral-process, .referral-conditions, .referral-registration { width: min(100% - 32px, 680px); padding: 72px 0; }
  .referral-conditions { grid-template-columns: 1fr; gap: 30px; }
  .referral-policy-links { grid-column: 1; margin: -16px 22px 0; }
  .referral-step-list { grid-template-columns: 1fr; gap: 12px; }
  .referral-step-list li { display: grid; min-height: 0; grid-template-columns: 34px 1fr; gap: 16px; padding: 20px; }
  .referral-step-list div { margin: 0; }
  .referral-form fieldset { grid-template-columns: 1fr; padding: 22px; }
  .referral-field-wide { grid-column: auto; }
  .referral-footer { width: min(100% - 32px, 680px); }
  .referral-legal-main { width: min(100% - 32px, 680px); padding-top: 54px; }
}

@media (max-width: 520px) {
  html { scroll-behavior: auto; }
  .referral-header { min-height: 62px; }
  .referral-brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .referral-brand small { display: none; }
  .referral-header-link { min-height: 40px; padding: 10px 12px; font-size: 11px; }
  .referral-hero { gap: 40px; padding: 48px 0 64px; }
  .referral-hero h1 { margin-top: 14px; font-size: 39px; line-height: 1.12; }
  .referral-offer { margin-top: 24px; font-size: 19px; }
  .referral-recurring { font-size: 13px; line-height: 1.6; }
  .referral-primary-action { width: 100%; }
  .referral-connection { min-height: 250px; padding: 22px; border-radius: 24px; }
  .connection-node { width: 62px; height: 62px; border-radius: 18px; }
  .connection-node-banana { width: 82px; height: 82px; border-radius: 23px; }
  .connection-node-client { bottom: 26px; width: 58px; height: 58px; }
  .connection-line-client { bottom: 82px; height: 38px; }
  .referral-services, .referral-process, .referral-conditions, .referral-registration { padding: 58px 0; }
  .referral-section-heading h2, .referral-form-intro h2 { font-size: 31px; }
  .referral-service-list { grid-template-columns: 1fr; margin-top: 32px; border-radius: 15px; }
  .referral-service-list li { min-height: 70px; padding: 18px; font-size: 15px; }
  .referral-reassurance { font-size: 14px; }
  .referral-step-list { margin-top: 32px; }
  .referral-conditions ul { padding: 20px 20px 20px 38px; }
  .referral-policy-links { flex-direction: column; gap: 8px; }
  .referral-registration { padding-bottom: 84px; }
  .referral-form { gap: 20px; }
  .referral-form fieldset { gap: 18px; padding: 19px 16px; border-radius: 16px; }
  .referral-form legend { font-size: 14px; }
  .referral-segmented span { font-size: 11px; }
  .referral-consents { padding: 20px 16px; }
  .referral-submit { min-height: 56px; }
  .referral-success { padding: 48px 18px; }
  .referral-success h2 { font-size: 27px; }
  .referral-footer { align-items: flex-start; flex-direction: column; }
  .referral-legal-main { padding: 48px 0 84px; }
  .referral-legal-heading { padding-bottom: 30px; }
  .referral-legal-document { padding: 26px 18px; border-radius: 18px; }
  .referral-legal-document section + section { margin-top: 28px; padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
