/* TARGET Intake — V03 Loose Doodle system: cream-led, charcoal text,
   blue only as a supporting accent, logo unchanged. */
:root {
  --cream: #EDE3D8;
  --paper: #FBF7F1;
  --charcoal: #2B2B29;
  --blue: #0054C5;
  --line: #d8cbbd;
  --err: #b3261e;
  --ok: #1d6b3c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}
#app { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }
.brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 2px 4px;
}
.brand .logo { height: 66px; }
.brand .doodle { height: 112px; }
.card {
  background: var(--paper);
  border: 1.5px solid var(--charcoal);
  border-radius: 14px;
  padding: 22px 20px 26px;
  margin-top: 14px;
  box-shadow: 3px 3px 0 rgba(43,43,41,.18);
}
h1 { font-size: 1.45rem; margin: 0 0 6px; }
.intro { margin: 0 0 18px; line-height: 1.45; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
label .req { color: var(--blue); }
.help { font-weight: 400; font-size: .85rem; opacity: .75; display: block; margin-top: 2px; }
input, select, textarea {
  width: 100%; padding: 13px 14px; font-size: 1rem; min-height: 52px;
  border: 1.5px solid var(--charcoal); border-radius: 12px;
  background: #fff; color: var(--charcoal);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
textarea { min-height: 84px; resize: vertical; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label {
  position: relative; display: inline-flex; align-items: center;
  min-height: 50px; font-weight: 600; font-size: 1rem;
  border: 1.5px solid var(--charcoal); border-radius: 999px;
  padding: 10px 20px; cursor: pointer; background: #fff; margin: 0;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.radio-row label:has(input:checked) {
  background: var(--charcoal); color: var(--cream); border-color: var(--charcoal);
}
.radio-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.collapse-toggle {
  display: block; width: 100%; text-align: left; margin: 2px 0 16px;
  padding: 13px 14px; min-height: 50px; cursor: pointer;
  background: transparent; color: var(--blue); font: inherit; font-weight: 600;
  border: 1.5px dashed var(--line); border-radius: 12px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.verify { font-size: .92rem; margin-top: 6px; min-height: 1.2em; }
.verify.ok { color: var(--ok); font-weight: 600; }
.verify.err { color: var(--err); font-weight: 600; }
button.submit {
  width: 100%; padding: 16px; min-height: 56px; font-size: 1.05rem; font-weight: 700;
  background: var(--blue); color: #fff; border: 1.5px solid var(--charcoal); border-radius: 12px; cursor: pointer;
  touch-action: manipulation;
}
button.submit:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 700px) {
  /* The send button rides along at the bottom of the screen on phones. */
  button.submit { position: sticky; bottom: 10px; box-shadow: 0 4px 14px rgba(43,43,41,.35); }
  .card { padding: 20px 16px 22px; }
}
@media (min-width: 701px) {
  .card { padding: 30px 32px 34px; }
  h1 { font-size: 1.6rem; }
}
.form-error { color: var(--err); font-weight: 600; margin: 10px 0; }
.foot { text-align: center; font-size: .85rem; opacity: .7; margin-top: 22px; }
.pick-list { list-style: none; padding: 0; margin: 0; }
.pick-list a {
  display: block; padding: 14px 16px; margin-bottom: 10px;
  background: var(--paper); border: 1.5px solid var(--charcoal); border-radius: 12px;
  color: var(--charcoal); text-decoration: none; font-weight: 600;
}
.pick-list a:hover { border-color: var(--blue); }
.success h1 { margin-bottom: 10px; }
.success p { line-height: 1.5; }

/* ——— v4: Typeform-style wizard ——— */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 5px;
  background: rgba(43,43,41,.12); z-index: 50;
}
.progress-bar {
  height: 100%; width: 0; background: var(--blue);
  transition: width .45s ease;
}
.card.wiz { padding-top: 30px; }
.step { animation: stepIn .38s ease both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.step.shake { animation: shake .3s ease both; }
@keyframes shake {
  20% { transform: translateX(-7px); } 45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); } 100% { transform: translateX(0); }
}
.welcome h1 { font-size: 2.15rem; line-height: 1.2; }
.welcome .intro { font-size: 1.12rem; }
.step label { font-size: 1.32rem; font-weight: 650; line-height: 1.35; margin-bottom: 14px; }
.step label .help { font-size: .95rem; margin-top: 6px; }
.qnum { color: var(--blue); font-size: 1rem; font-weight: 700; }
.step input, .step select, .step textarea { font-size: 1.18rem; min-height: 60px; padding: 15px 16px; }
.step input[type="file"] { font-size: 1rem; padding-top: 18px; }
/* iOS Safari ignores width on native date/time controls and sizes them
   to the formatted value, blowing out the card (seen live 2026-11-04).
   Resetting appearance makes the control obey the layout; the picker
   still opens on tap. */
input[type="datetime-local"], input[type="date"], input[type="time"] {
  -webkit-appearance: none; appearance: none;
  display: block; min-width: 0; max-width: 100%;
}
input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.step .radio-row label { min-height: 54px; padding: 12px 22px; font-size: 1.05rem; }
.nav-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.btn-continue {
  background: var(--blue); color: #fff; border: 1.5px solid var(--charcoal); border-radius: 999px;
  padding: 15px 30px; min-height: 56px; font: inherit; font-size: 1.08rem; font-weight: 700;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn-continue:active { transform: scale(.98); }
.btn-start { font-size: 1.15rem; padding: 17px 34px; }
.btn-skip {
  background: none; border: none; color: var(--blue); font: inherit; font-weight: 600;
  cursor: pointer; padding: 10px 4px; text-decoration: underline; text-underline-offset: 3px;
}
.enter-hint { opacity: .55; font-size: .88rem; }
.back-link {
  background: none; border: none; font: inherit; font-weight: 600;
  opacity: .6; cursor: pointer; margin-top: 22px; padding: 8px 2px;
}
.summary-line {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 1.02rem;
}
.ref-chip {
  display: inline-block; margin-top: 14px; padding: 9px 14px;
  border: 1.5px solid var(--charcoal); border-radius: 999px;
  background: #fff; font-weight: 600; font-size: .95rem;
}
.summary-line span { opacity: .65; }
.summary-line b { text-align: right; }
.btn-send { margin: 0; }
.bigcheck { font-size: 2.8rem; color: var(--ok); line-height: 1; margin-bottom: 8px; }
@media (max-width: 700px) {
  .enter-hint { display: none; }
  .step label { font-size: 1.24rem; }
  .welcome h1 { font-size: 1.8rem; }
  .brand .logo { height: 54px; }
  .brand .doodle { height: 90px; }
}

/* Referral page */
.ref-sep { border: none; border-top: 2px dashed #c9bba7; margin: 28px 0 20px; }
.ref-h2 { font-size: 1.35rem; margin: 0 0 8px; color: #2B2B29; }
.ref-banner { background: #0054C5; color: #fff; border: 1.5px solid #2B2B29; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 0.95rem; line-height: 1.45; }
.ref-share { margin-top: 20px; background: #EDE3D8; border: 1.5px solid #2B2B29; border-radius: 14px; padding: 16px; }
.ref-share-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ref-qr { border-radius: 8px; display: block; }
.ref-share-cap { font-size: 0.88rem; color: #2B2B29; margin: 10px 0 0; }

/* Post-signup celebration — doodle bounce + hour stamps, V03 palette */
.celebrate {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.celeb-doodle {
  width: 150px; animation: celeb-bounce 0.9s ease-in-out 3;
  filter: drop-shadow(0 6px 14px rgba(43,43,41,0.18));
}
@keyframes celeb-bounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  30% { transform: translateY(-26px) rotate(2deg); }
  60% { transform: translateY(0) rotate(-1deg); }
}
.celeb-pill {
  position: absolute; left: 50%; top: 42%;
  background: #0054C5; color: #fff; border: 2px solid #2B2B29;
  font-weight: 800; letter-spacing: 0.04em; font-size: 15px;
  padding: 8px 14px; border-radius: 999px; opacity: 0;
  animation: celeb-pop 3.4s cubic-bezier(.2,1.4,.4,1) forwards;
}
.celeb-pill.p1 { animation-delay: 0.15s; --dx: -120px; --dy: -90px; --rot: -9deg; }
.celeb-pill.p2 { animation-delay: 0.45s; --dx: 110px; --dy: -70px; --rot: 7deg; background: #2B2B29; }
.celeb-pill.p3 { animation-delay: 0.75s; --dx: 0px; --dy: -140px; --rot: -3deg; background: #EDE3D8; color: #2B2B29; }
@keyframes celeb-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); }
  18% { opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.08) rotate(var(--rot)); }
  30% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot)); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 26px)) scale(1) rotate(var(--rot)); }
}
.celeb-dot {
  position: absolute; left: 50%; top: 46%; width: 10px; height: 10px;
  border-radius: 50%; opacity: 0; animation: celeb-dot 2.8s ease-out forwards;
}
.celeb-dot.d1 { background: #0054C5; --dx: -170px; --dy: -40px; animation-delay: 0.2s; }
.celeb-dot.d2 { background: #2B2B29; --dx: 160px; --dy: -120px; animation-delay: 0.35s; }
.celeb-dot.d3 { background: #b4552d; --dx: -90px; --dy: -170px; animation-delay: 0.5s; }
.celeb-dot.d4 { background: #0054C5; --dx: 90px; --dy: 30px; animation-delay: 0.3s; }
.celeb-dot.d5 { background: #b4552d; --dx: 190px; --dy: 10px; animation-delay: 0.55s; }
.celeb-dot.d6 { background: #2B2B29; --dx: -190px; --dy: -130px; animation-delay: 0.65s; }
@keyframes celeb-dot {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .celeb-doodle, .celeb-pill, .celeb-dot { animation-duration: 0.01s; }
}
