/* IMO intake forms, on the same cream as the site.
   Variable NAMES are unchanged from the dark version on purpose: agent.html and
   form.html reference them inline, and engine.js renders these exact classes.
   Only the values moved. Sized for a phone at a kitchen table: 17px floor so
   iOS never zooms on focus, 46px targets, no horizontal scroll at 320px. */

:root{
  --bg:#F7F3EA; --navy:#FDFBF6; --card:#FFFFFF; --ink:#1F2A25;
  --faint:#6B776F; --dim:#46534C;
  --line:rgba(31,42,37,.16); --accent:#2F5440; --season:#3F6B52;
  --warn:#8A5A12; --good:#2F7A4F; --bad:#9B3B3B;
  --wash:rgba(63,107,82,.10);
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);color:var(--ink);min-height:100svh;
  font:400 17px/1.6 "Atkinson Hyperlegible",-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  padding:0 0 7rem;
}
.wrap{max-width:78rem;margin:0 auto;padding:0 1.15rem}


/* header + progress */
header{position:sticky;top:0;z-index:20;background:rgba(247,243,234,.94);
  backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.hrow{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.95rem 0 .8rem}
.wm{font-size:.7rem;letter-spacing:.2em;text-transform:uppercase;color:var(--dim);font-weight:700}
/* The always-available exit. Sized as a real tap target so it is usable one-handed on a
   call, and given its own colour so it does not read as part of the form title. */
.formback{text-decoration:none;color:var(--accent);white-space:nowrap;
  display:inline-flex;align-items:center;min-height:44px;padding-right:.9rem}
.formback:hover{text-decoration:underline}
.hrow #ftitle{margin-right:auto}
#agentflag{color:var(--warn)}
.bar{height:3px;background:rgba(31,42,37,.08)}
.barfill{height:100%;background:var(--season);width:0;transition:width .3s ease}

/* steps */
.step{display:none;padding:2.2rem 0 1rem}
.step.on{display:block;animation:in .28s ease both}
@keyframes in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.eyebrow{font-size:.7rem;letter-spacing:.2em;text-transform:uppercase;color:var(--season);margin-bottom:.7rem;font-weight:700}
h1{font-family:Fraunces,Georgia,serif;font-size:1.55rem;line-height:1.22;font-weight:600;letter-spacing:-.01em}
.sub{color:var(--dim);margin:.55rem 0 1.6rem;font-size:1rem}

/* questions */
.q{margin:0 0 1.35rem}
.qlabel{display:block;font-size:1rem;margin-bottom:.5rem;color:var(--ink);font-weight:700}
.opt{color:var(--faint);font-size:.78rem;margin-left:.5rem;letter-spacing:.04em;font-weight:400}
.hint{display:block;color:var(--faint);font-size:.85rem;margin:-.25rem 0 .5rem}

input[type=text],input[type=email],input[type=tel],input[type=date],
input[type=number],select,textarea{
  width:100%;background:var(--card);color:var(--ink);
  border:1.5px solid var(--line);border-radius:.7rem;
  padding:.8rem .85rem;font:inherit;font-size:17px;min-height:46px;
}
textarea{min-height:6.5rem;resize:vertical;line-height:1.5}
input:focus,select:focus,textarea:focus{outline:3px solid var(--season);outline-offset:2px;border-color:var(--season)}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%);
  background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:2.2rem}

/* money gets a $ so a number field reads as currency without a masking lib */
.ifield{position:relative}
.pre{position:absolute;left:.85rem;top:50%;transform:translateY(-50%);color:var(--faint);pointer-events:none}
input.money{padding-left:1.7rem}

/* chips */
.chips{display:flex;flex-wrap:wrap;gap:.5rem}
.chip{position:relative}
.chip input{position:absolute;opacity:0;width:0;height:0}
.chip span{display:flex;align-items:center;padding:.62rem .95rem;min-height:46px;
  background:var(--card);border:1.5px solid var(--line);border-radius:2rem;
  font-size:.95rem;cursor:pointer;transition:border-color .15s,background .15s}
.chip input:checked+span{border-color:var(--accent);background:var(--wash);color:var(--accent);font-weight:700}
.chip input:focus-visible+span{outline:3px solid var(--season);outline-offset:2px}

/* repeating groups */
.group{margin:0 0 1.5rem}
.grow{background:var(--navy);border:1px solid var(--line);border-radius:.85rem;padding:1rem .9rem .25rem;margin:.7rem 0}
.ghead{display:flex;align-items:center;justify-content:space-between;margin-bottom:.85rem}
.ghead span{font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--season);font-weight:700}
.grm{background:none;border:0;color:var(--dim);font:inherit;font-size:.85rem;cursor:pointer;padding:.35rem .2rem;min-height:auto;text-decoration:underline}
.grm:hover{color:var(--bad)}
.gadd{width:100%;background:none;border:1.5px dashed var(--season);color:var(--accent);
  border-radius:.7rem;padding:.75rem;font:inherit;font-size:.95rem;font-weight:700;cursor:pointer;min-height:46px}
.gadd:hover{background:var(--wash)}
.gsum{display:flex;flex-wrap:wrap;gap:.75rem;margin:.5rem 0 .8rem;font-size:.88rem;font-weight:700}
.gsum .ok{color:var(--good)}
.gsum .bad{color:var(--warn)}

/* consent */
.consent{display:flex;gap:.7rem;align-items:flex-start;cursor:pointer;
  background:var(--card);border:1.5px solid var(--line);border-radius:.7rem;padding:.9rem}
.consent input{margin-top:.25rem;width:22px;height:22px;flex:0 0 auto;accent-color:var(--accent)}
.consent p{font-size:.88rem;color:var(--dim);line-height:1.55}

.err{color:var(--warn);font-size:.92rem;min-height:1.3rem;margin:.2rem 0 0;font-weight:700}
.done h1{color:var(--accent)}

/* Download-your-copy, on the done screen. The bottom nav is hidden by then, so this button
   carries its own weight instead of borrowing nav's. */
.dlrow{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1rem;margin-top:1.4rem}
.dlbtn{background:var(--accent);border:1.5px solid var(--accent);color:var(--bg);
  border-radius:.7rem;padding:.75rem 1.3rem;font:inherit;font-size:.95rem;font-weight:700;
  cursor:pointer;min-height:46px}
.dlbtn:hover{background:var(--season);border-color:var(--season)}
.dlbtn:disabled{opacity:.55;cursor:default}
.dlbtn:focus-visible{outline:3px solid var(--season);outline-offset:2px}
.dlnote{color:var(--faint);font-size:.85rem;max-width:32rem}

/* bottom nav */
nav{position:fixed;bottom:0;left:0;right:0;z-index:20;
  background:rgba(247,243,234,.96);backdrop-filter:blur(10px);border-top:1px solid var(--line)}
.nrow{display:flex;align-items:center;gap:.8rem;padding:.8rem 1.15rem;
  padding-bottom:calc(.8rem + env(safe-area-inset-bottom))}
nav button{background:var(--card);color:var(--accent);border:1.5px solid var(--season);
  border-radius:.7rem;padding:.7rem 1.1rem;font:inherit;font-size:.95rem;font-weight:700;cursor:pointer;min-height:46px}
nav button.primary{background:var(--accent);border-color:var(--accent);color:var(--bg);margin-left:.6rem}
nav button.primary:disabled{opacity:.55;cursor:default}
.count{font-size:.78rem;color:var(--dim);letter-spacing:.06em;font-weight:700}
.saved{font-size:.74rem;color:var(--good);letter-spacing:.05em;margin-left:auto;font-weight:700}

/* ghl-user picker: same shell as a plain select, plus a quiet loading/error state */
.uhint{display:block;font-size:.78rem;color:var(--faint);margin-top:.35rem}
.uhint.err{color:var(--warn)}

@media (max-width:380px){
  .nrow{gap:.5rem;padding-left:.9rem;padding-right:.9rem}
  .saved{display:none}
  h1{font-size:1.35rem}
}
@media (prefers-reduced-motion:reduce){
  .step.on{animation:none}
  .barfill{transition:none}
}

/* LANDSCAPE from tablet up (client call 2026-08-25: John found the form "too narrow and
   long"). Two questions per row on a wide screen roughly halves the scroll of every page
   without dropping a single question. Phones keep the single column — side-by-side inputs
   at 375px is how you get a form nobody can fill in on a call.

   THIS BLOCK MUST STAY BELOW `.step.on{display:block}`. It sets display:grid at the same
   specificity (.step.on), so whichever is written last wins — a media query adds no
   weight of its own. It originally sat near the top of this file, above that rule, and
   the two-column layout silently never applied on any screen size. */
@media (min-width: 760px){
  .step.on{display:grid;grid-template-columns:1fr 1fr;column-gap:2rem;align-items:start}
  /* Tighter vertically than the phone layout. On a phone the generous spacing is what makes
     a form thumb-friendly; on a laptop it is just scroll, and scroll is the whole complaint. */
  .step{padding:1.6rem 0 .75rem}
  .q{margin-bottom:.9rem}
  .group{margin-bottom:1rem}
  .grow{padding:.8rem .8rem .1rem;margin:.5rem 0}
  /* The page's own heading block always spans the full width. */
  .step .eyebrow,.step h1,.step .sub{grid-column:1 / -1}
  /* So does anything that needs the room: prose answers, repeating groups (children,
     policies, beneficiaries), and the consent box. A beneficiary row squeezed into half a
     screen is worse than the long form was. */
  .step .group,.step .q:has(textarea),.step .q:has(.consent){grid-column:1 / -1}
}
