:root {
  --paper: #e9efe0;
  --paper-hi: #f7faf0;
  --paper-lo: #d8e2cc;
  --ink: #0c1f16;
  --ink-2: #33483d;
  --ink-3: #566a5f;
  --green: #0b4f33;
  --green-hi: #12714a;
  --green-lo: #073523;
  --mint: #2fd886;
  --cream: #f2f7e6;
  --cream-2: #bfd6c4;
  --brass: #dcb650;
  --foil: #f6e7a6;
  --red: #b3261e;
  --line: rgba(12, 31, 22, 0.18);

  --font-display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --font-text: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --focus: var(--ink);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-back: cubic-bezier(0.2, 1.5, 0.4, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img,
svg {
  display: block;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper-hi);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

.field-green {
  --focus: var(--foil);
  color: var(--cream);
  background-color: var(--green);
  background-image:
    radial-gradient(120% 80% at 12% 0%, rgba(47, 216, 134, 0.2), transparent 58%),
    radial-gradient(90% 70% at 100% 100%, rgba(3, 30, 18, 0.55), transparent 60%),
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 7px);
}

.ico {
  width: 1.3em;
  height: 1.3em;
  flex: none;
}

.wordmark {
  margin: 0;
  font: 900 1.5rem/1 var(--font-display);
  letter-spacing: -0.04em;
  text-decoration: none;
  color: inherit;
}

.wordmark--xl {
  font-size: clamp(4rem, 12.5vw, 11rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.section-title {
  margin: 0 0 16px;
  font: 700 1.35rem/1.2 var(--font-display);
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 56px;
  padding: 0 1.6em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1.05rem/1.1 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.08s,
    background-color 0.15s,
    color 0.15s;
}

.btn:active {
  transform: translateY(2px);
}

.btn:disabled {
  cursor: progress;
  opacity: 0.7;
}

.btn--xl {
  min-height: 68px;
  padding: 0 2em;
  font-size: 1.2rem;
  font-weight: 700;
}

.btn--lg {
  min-height: 60px;
  font-size: 1.1rem;
}

.btn--sm {
  min-height: 44px;
  padding: 0 1.1em;
  font-size: 0.95rem;
}

.btn--ink {
  background: var(--ink);
  color: var(--paper-hi);
}

.btn--ink:hover {
  background: #1a3a2c;
}

.btn--paper {
  background: var(--paper-hi);
  color: var(--ink);
}

.btn--paper:hover {
  background: #fff;
}

.btn--ghost {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.btn--ghost:hover {
  background: rgba(12, 31, 22, 0.07);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(12, 31, 22, 0.08);
}

.input {
  display: block;
  width: 100%;
  height: 64px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper-hi);
  font: 500 1.15rem var(--font-text);
  color: var(--ink);
}

.input::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.input:hover {
  background: #fff;
}

.input[aria-invalid='true'] {
  border-color: var(--red);
  background: #fff5f3;
}

.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.sk {
  display: block;
  height: 1em;
  border-radius: 8px;
  background: var(--paper-lo);
  animation: breathe 1.3s ease-in-out infinite;
}

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 85;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.float-label {
  position: fixed;
  z-index: 86;
  pointer-events: none;
  font: 800 1.6rem/1 var(--font-display);
  white-space: nowrap;
  color: var(--foil);
  text-shadow: 0 2px 0 rgba(3, 30, 18, 0.55);
  animation: floatUp 0.95s var(--ease-out) forwards;
}

.float-label--minus {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffd2ca;
  font-size: 1.1rem;
  text-shadow: none;
  animation-name: floatDown;
  animation-duration: 1.6s;
}

#toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(92vw, 520px);
  transform: translateX(-50%);
  pointer-events: none;
}

body.has-ctabar #toasts {
  bottom: 150px;
}

.toast {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper-hi);
  font-size: 1.05rem;
  box-shadow: 0 14px 40px rgba(7, 53, 35, 0.35);
  animation: toastIn 0.25s var(--ease-out);
  transition:
    opacity 0.25s,
    transform 0.25s;
}

.toast--error {
  background: #6e1610;
}

.toast.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.demo-tag {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 110;
  padding: 3px 12px 4px;
  border-radius: 0 0 10px 10px;
  background: var(--foil);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.boot,
.fatal {
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 16px;
  min-height: 100dvh;
  padding: 32px;
}

.boot {
  justify-items: center;
}

.fatal h1 {
  margin: 0;
  font: 700 1.6rem/1.2 var(--font-display);
}

.fatal p {
  margin: 0;
  max-width: 44ch;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    opacity: 0.45;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.6) rotate(var(--rot, 0deg));
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -110%) scale(1.12) rotate(var(--rot, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), -300%) scale(1) rotate(var(--rot, 0deg));
  }
}

@keyframes floatDown {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.8);
  }
  14% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, 10px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 26px) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.3);
  }
  60% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

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