/* Intake form: simple, calm, thumb-friendly */
[hidden] { display: none !important; }
.form-page { background: var(--mist); }
.form-header { display: flex; align-items: center; justify-content: space-between; max-width: 720px; margin: 0 auto; padding: 18px 20px 0; }
.form-logo img { height: 70px; width: auto; }
.form-saved { font-size: .88rem; color: var(--muted); }

.form-wrap { max-width: 720px; margin: 0 auto; padding: 10px 20px 60px; }
.form-intro h1, div.done h1, section.done h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: .6rem; }
.form-intro p { color: var(--ink); }
.form-small { font-size: .92rem; color: var(--muted); margin-top: .6rem; }

/* Progress */
.progress { list-style: none; display: flex; gap: 6px; margin: 1.8rem 0 1.4rem; }
.progress li { flex: 1; text-align: center; font-size: .78rem; color: var(--muted); }
.progress span { display: block; height: 6px; border-radius: 6px; background: #d6e6e2; font-size: 0; margin-bottom: 6px; transition: background .3s; }
.progress li.on span, .progress li.done span { background: var(--deep); }
.progress li.on em { color: var(--deep); font-weight: 500; }
.progress em { font-style: normal; }

/* Card */
#intake, #feedback { background: var(--white); border-radius: 22px; padding: 30px 28px; box-shadow: 0 20px 50px -34px rgba(22, 67, 74, .45); }
.step { border: 0; display: none; }
.step.on { display: block; animation: stepin .35s ease; }
@keyframes stepin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
legend { font-family: "Libre Caslon Display", serif; font-size: 1.9rem; color: var(--deep); margin-bottom: 1.2rem; padding: 0; }
.sub-legend { margin-top: 1.6rem; margin-bottom: .2rem; }
.step-note { color: var(--muted); margin-bottom: 1.2rem; }

/* Fields */
.field { display: block; margin-bottom: 1.4rem; font-weight: 500; color: var(--deep); }
.field b, .tick b { color: var(--rose); font-weight: 500; }
.field-label { display: block; margin-bottom: .6rem; }
.hint { display: block; font-weight: 400; font-size: .9rem; color: var(--muted); }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field input[type="password"], .field textarea, .other {
  display: block; width: 100%; margin-top: .45rem; padding: 14px 16px; font: 400 1.05rem/1.5 "Jost", sans-serif; color: var(--ink);
  background: #fbfdfc; border: 1.5px solid #cfe0dc; border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .other:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(95, 158, 156, .18); }
.field.invalid input, .field.invalid textarea, .field.invalid .chips { border-color: #c0573f; }
.field-error { display: block; margin-top: .4rem; font-weight: 400; font-size: .92rem; color: #b04a33; }
.other { margin-top: .7rem; font-size: .98rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Tap-to-choose chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border-radius: 12px; }
.chips button { font: 400 1rem "Jost", sans-serif; color: var(--deep); background: var(--white); border: 1.5px solid #cfe0dc; border-radius: 999px; padding: 10px 16px; min-height: 44px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.chips button:hover { border-color: var(--aqua); }
.chips button[aria-pressed="true"] { background: var(--deep); border-color: var(--deep); color: var(--white); }

/* Safety note */
.safety { background: #fff4ee; border: 1px solid #efcfc2; border-radius: 14px; padding: 16px 18px; margin: -0.4rem 0 1.4rem; }
.safety strong { color: var(--deep); }
.safety p { margin-top: .3rem; font-size: .98rem; }
.safety a { font-weight: 500; }

/* Agreements */
.agree { border: 1.5px solid #dbe9e5; border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; }
.agree h3 { margin-bottom: .3rem; }
.agree p { font-size: .96rem; color: var(--muted); }
.agree > a { display: inline-block; margin-top: .5rem; font-size: .95rem; }
.agree.invalid { border-color: #c0573f; }
.tick { display: flex; gap: 12px; align-items: flex-start; margin-top: .9rem; font-weight: 500; font-size: 1rem; line-height: 1.45; color: var(--deep); cursor: pointer; }
.tick input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--deep); }

/* Small text-style buttons */
.link-btn { background: none; border: 0; color: var(--deep); font: 400 .95rem "Jost", sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }

/* 1 to 10 rating buttons */
.chips.rating { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.chips.rating button { padding: 10px 0; min-width: 0; }
@media (max-width: 560px) { .chips.rating { grid-template-columns: repeat(5, 1fr); } }

/* Signature boxes */
.sigpad { margin-top: 1.1rem; }
.sigpad .field-label { font-weight: 500; color: var(--deep); }
.sigpad canvas { display: block; width: 100%; height: 150px; background: #fbfdfc; border: 1.5px dashed #b9d3cd; border-radius: 12px; touch-action: none; cursor: crosshair; }
.sigpad.signed canvas { border-style: solid; border-color: var(--aqua); }
.sigpad.invalid canvas { border-color: #c0573f; }
.sig-row { display: flex; justify-content: space-between; align-items: center; margin-top: .3rem; }
.sig-row .hint { font-size: .85rem; }

/* Navigation */
.form-error { margin-top: .6rem; padding: 12px 16px; background: #fbeae5; color: #8d3a26; border-radius: 10px; font-size: .96rem; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 1.6rem; }
.form-nav .btn { min-height: 52px; padding-left: 30px; padding-right: 30px; }
.form-nav #next, .form-nav #submit { margin-left: auto; }
.form-nav .btn[disabled] { opacity: .6; cursor: wait; }

div.done, section.done { background: var(--white); border-radius: 22px; padding: 40px 30px; text-align: center; box-shadow: 0 20px 50px -34px rgba(22, 67, 74, .45); }
div.done p, section.done p { margin: 0 auto 1rem; }
div.done .btn, section.done .btn { margin-top: .8rem; }
.form-crisis { margin-top: 2rem; text-align: center; font-size: .92rem; color: var(--muted); }

@media (max-width: 560px) {
  #intake, #feedback { padding: 24px 18px; border-radius: 18px; }
  .progress em { display: none; }
  .form-logo img { height: 58px; }
  .form-nav .btn { flex: 1; justify-content: center; padding-left: 16px; padding-right: 16px; }
}
