/* Fourth Stitch birth form only. Existing JS/display state and local fonts retained.
   Every selector is gated to #form or its visible state: no landing/result restyle. */
body.stitch3-hepan:has(#form[style*="block"]) > .wrap { max-width:430px; padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
body.stitch3-hepan:has(#form[style*="block"]) .body { padding:14px 16px 20px!important; }
body.stitch3-hepan:has(#form[style*="block"]) .topbar { height:64px; padding:8px 16px 0; background:#f6f8faed; backdrop-filter:blur(12px); border-bottom-color:#e2e8f099; }
body.stitch3-hepan:has(#form[style*="block"]) .stitch3-form-header { display:grid; grid-template-columns:1fr auto 1fr; gap:6px; }
body.stitch3-hepan:has(#form[style*="block"]) #stitch3-back { justify-self:start; font-size:15px; font-weight:500; white-space:nowrap; }
body.stitch3-hepan:has(#form[style*="block"]) .stitch3-form-header strong { font-size:16px; letter-spacing:.05em; }
body.stitch3-hepan:has(#form[style*="block"]) #stitch3-records { justify-self:end; color:#64748b; font-size:12px; white-space:nowrap; }
body.stitch3-hepan:has(#form[style*="block"]) .tab-nav { max-width:430px; background:#fffffff2; }
body.stitch3-hepan:has(#form[style*="block"]) .tab-nav a[aria-current=page] { color:#243a4b; }
#form .stitch4-intro { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 10px; margin:0 4px 16px; color:#64748b; font-size:12px; line-height:18px; }
#form .stitch4-intro > span::before { content:''; display:inline-block; width:6px; height:6px; background:#243a4b; border-radius:50%; margin-right:6px; vertical-align:1px; }
#form #formtitle { margin:0; font-family:inherit; font-weight:400; font-size:11px; line-height:18px; color:#94a3b8; }
#form #formtitle::before { content:none; }
/* Relation-specific guidance stays available to assistive technology without a second intro row. */
#form #formsub { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#form #card_a, #form #card_b { padding:16px; margin-bottom:16px; border:1px solid #f1f5f9; border-radius:16px; box-shadow:0 2px 12px #00000008; }
#form .card h3 { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; padding-bottom:12px; margin-bottom:4px; border-bottom:1px solid #f1f5f9; }
#form .stitch4-party { min-width:0; }
#form .card h3 small { margin-left:3px; }
#form .pick { float:none; flex:none; padding:3px 6px; line-height:16px; font-size:12px; border-color:#e2e8f0cc; }
#form:has(#invbanner[style*="block"]) #card_b h3 small { display:none; }
#form .row { min-height:48px; padding:12px 0; gap:8px; border-bottom:1px solid #f1f5f9e6; }
#form .row label { width:64px; font-size:14px; }
#form .row input, #form .row select { min-width:0; max-width:100%; font-size:14px; text-align:right; text-align-last:right; background:transparent; }
#form .row input:focus-visible, #form .row select:focus-visible { outline:2px solid #63798d; outline-offset:3px; border-radius:3px; }
#form .row input[type=checkbox] { width:18px; height:18px; flex:none; margin-left:auto; accent-color:#243a4b; }
#form .seg { padding:2px; border-color:#e2e8f099; }
#form .seg b { padding:6px 16px; line-height:16px; }
#form .stitch3-exact { margin-top:0; border-top:0; }
#form .stitch3-exact summary { padding:8px 0 0; font-size:11px; line-height:17px; color:#7e8f9e; cursor:pointer; }
#form .stitch3-exact[open] summary { padding-bottom:6px; }
#form .stitch3-exact .row:last-child { border-bottom:0; }
#form #record-notice:empty { display:none; }
#form #go { margin-top:8px; min-height:50px; padding:14px 20px; background:#243a4b; font-size:16px; font-weight:500; letter-spacing:.38em; box-shadow:0 8px 20px -4px #243a4b59; }
#form #invrow { margin-top:16px; padding:0 2px; }
#form #doInvite { appearance:none; padding:0; border:0; background:none; color:#64748b; font-family:inherit; font-weight:400; font-size:12px; line-height:1.7; cursor:pointer; }
#form #doInvite b { color:#243a4b; font-weight:600; text-decoration:underline; text-decoration-color:#cbd5e1; text-underline-offset:2px; }
#form > .disc { margin-top:16px!important; padding:0 8px; font-size:11px; line-height:1.5; }
@media(max-width:350px) {
  #form .row select { font-size:12px; }
  #form .stitch4-intro { column-gap:6px; font-size:11px; }
  #form .pick { font-size:11px; }
}
