:root {
  --ink: #171717;
  --muted: #5f625d;
  --paper: #f7f8f6;
  --surface: #ffffff;
  --line: #d8dbd4;
  --carbon: #23211d;
  --green: #18a058;
  --green-dark: #0d6f42;
  --red: #d84a3a;
  --red-dark: #a93325;
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid rgba(24, 160, 88, 0.55); outline-offset: 2px; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 40;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s ease;
}
.skip-link:focus-visible { transform: none; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--carbon);
  color: #f4f5f2;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.app-brand span {
  padding-left: 12px;
  border-left: 1px solid rgba(244, 245, 242, 0.35);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-call {
  padding: 9px 16px;
  border: 1px solid rgba(244, 245, 242, 0.4);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.header-call:hover { background: rgba(244, 245, 242, 0.12); }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  font-weight: 800;
}

.intro-copy { margin: 0; max-width: 62ch; color: var(--muted); }

.assurances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.assurances li {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}
.assurances b { font-size: 14px; }
.assurances span { color: var(--muted); }
.assurances a { font-weight: 650; color: var(--green-dark); }

.credit-form { display: grid; gap: 20px; margin-top: 28px; }

.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.form-card {
  padding: clamp(20px, 3.5vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.card-index {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 15px;
  font-weight: 800;
}

.card-head h2 { margin: 2px 0 4px; font-size: 21px; line-height: 1.2; }
.card-head p { margin: 0; color: var(--muted); font-size: 14px; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

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

.field-grid label, .control-group {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.field-grid label > span, .control-group > span {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.field-grid input, .field-grid select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #cbd3cd;
  border-radius: 6px;
  background: white;
  outline: 0;
}

.field-grid input:focus, .field-grid select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.14);
}

.field-grid .invalid, .consent-row.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 74, 58, 0.12);
}

.field-grid small, .consent-error {
  min-height: 14px;
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 600;
}

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #cbd3cd;
  border-radius: 6px;
  overflow: hidden;
}

.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }

.segmented span {
  display: grid;
  place-items: center;
  min-height: 46px;
  font-size: 14px;
  font-weight: 650;
  background: white;
  cursor: pointer;
}

.segmented input:checked + span { background: var(--green); color: white; }
.segmented input:focus-visible + span { outline: 3px solid rgba(24, 160, 88, 0.55); outline-offset: -3px; }

.field-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  background: #f2f7f3;
  border: 1px solid #cfe3d6;
  border-radius: 6px;
  color: #2c4a38;
  font-size: 13px;
  line-height: 1.55;
}

.consent-text {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #3d403c;
  font-size: 13px;
  line-height: 1.6;
}

.consent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #cbd3cd;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.consent-row input { width: 20px; height: 20px; accent-color: var(--green); }

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.button-submit {
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: 16px;
  font-weight: 750;
  transition: background 0.15s ease;
}
.button-submit:hover { background: var(--green-dark); }
.button-submit:disabled { background: #9fb3a7; cursor: progress; }

.form-status { margin: 0; font-size: 13px; font-weight: 650; }
.form-status.error { color: var(--red-dark); }

.privacy-line { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.privacy-line a { color: var(--green-dark); font-weight: 650; }

.app-footer {
  padding: 22px 16px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.app-footer p { margin: 4px 0; }
.app-footer b { color: var(--ink); }

.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 23, 23, 0.55);
  backdrop-filter: blur(3px);
}

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

.success-panel {
  max-width: 460px;
  padding: 34px 30px;
  background: var(--surface);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 18px 60px rgba(23, 23, 23, 0.3);
}

.success-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 27px;
  font-weight: 800;
}

.success-panel h2 { margin: 0 0 8px; font-size: 24px; }
.success-panel p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.success-reference b { color: var(--ink); letter-spacing: 0.03em; }

.button-quiet {
  display: inline-block;
  margin-top: 6px;
  padding: 11px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.button-quiet:hover { border-color: var(--green-dark); color: var(--green-dark); }

@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .assurances { grid-template-columns: 1fr; }
  .app-brand img { width: 128px; height: auto; }
  .app-brand span { display: none; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .button-submit { width: 100%; }
}
