/* PrayerAxis handbook forms (add-place, edit-place, verify-place, submit-story): every form is a handbook record.
   Numbered chapters with ruled label+field rows (.hb-rec from handbook.css), marginal notes, no wizard and no side card.
   Loaded after forms.css (field look, map picker, chips). Tokens only. */
.hbf .hb-main > form.hb-main{display:grid;gap:16px;min-width:0}
.hbf-d{margin:-4px 0 16px;color:var(--muted);font-size:14px;line-height:1.7;max-width:70ch}

/* record rows: the label is the row key, the field and its help/error sit in the value column */
/* forms.css resets .fm-field padding and border after handbook.css loads, so the ruled row is restated here */
.hbf .hb-rec-row.fm-field{margin:0;padding:14px 4px;border:0;border-bottom:1px solid var(--line)}
.hbf label.hb-rec-k,.hbf span.hb-rec-k{display:block;margin:0;overflow-wrap:anywhere}
.hbf .hb-rec-k .fm-req{color:var(--red)}
.hbf .fm-field.has-error > .hb-rec-k{color:var(--red)}
.hbf .hb-rec-row > .fm-error{grid-column:2}
.hbf .hb-rec .fm-input{min-height:46px;padding:10px 14px;font-size:15px;border-radius:8px}
.hbf .hb-rec textarea.fm-input{min-height:120px}
.hbf .hbf-short{max-width:320px}
.hbf .hbf-num{max-width:240px;font-variant-numeric:tabular-nums}
.hbf .hb-rec .fm-help{margin-top:6px}
.hbf .hb-rec .fm-map{height:280px;margin-top:10px}
.hbf .hb-rec .fm-maptools .btn{flex:0 1 auto;height:40px;font-size:14px;border:1px solid var(--line)}
.hbf .hb-rec .fm-chips{padding-top:4px}
.hbf .hb-rec-act{padding-top:20px}
.hbf .hb-rec-act .btn{height:46px;padding:0 24px;border-radius:999px;font-size:15px;justify-content:center;text-decoration:none}
.hbf .hb-rec-act .btn-tonal{background:transparent;border:1px solid var(--line)}
.hbf .hb-rec-act .btn-fill{margin-inline-start:auto}
.hbf .fm-note{margin:12px 0 0}
.hbf .fm-alert{margin:0}

/* a locked value in the record (edit-place type and city) */
.hbf .hbf-locked{display:flex;align-items:center;gap:8px;padding-top:10px;color:var(--muted);font-size:15px;overflow-wrap:anywhere}
.hbf .hbf-locked svg{flex:0 0 16px}

/* folded extra fields inside a row */
.hbf-more{margin-top:10px}
.hbf-more summary{display:inline-flex;align-items:center;gap:6px;min-height:40px;cursor:pointer;list-style:none;font-size:14px;font-weight:500;color:var(--primary)}
.hbf-more summary::-webkit-details-marker{display:none}
.hbf-more[open] summary svg{transform:rotate(180deg)}
.hbf-more summary:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:8px}
.hbf-sub{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:12px 0 4px;border-top:1px dashed var(--line)}
.hbf-sub .fm-label{font-size:13px;font-weight:500;color:var(--muted)}

/* marginal notes: the live entry preview, the next steps */
.hbf-prev{display:grid;gap:4px;justify-items:start}
.hbf-prev > b{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);font-weight:500}
.hbf-prev-ic{width:40px;height:40px;margin:6px 0 2px;border-radius:50%;display:grid;place-items:center;background:var(--soft,var(--bg));color:var(--c,var(--primary))}
.hbf-prev strong{font-size:16px;font-weight:500;color:var(--text);line-height:1.4;overflow-wrap:anywhere}
.hbf-prev strong.is-empty{color:var(--muted);font-weight:400}
.hbf-prev-type{font-size:13px;color:var(--c,var(--muted))}
.hbf-prev-loc{font-size:13px;overflow-wrap:anywhere}
.hbf-prev-type:empty,.hbf-prev-loc:empty{display:none}
.hbf-how ol,.hbf-note-ol{margin:6px 0 0;padding:0;list-style:none;counter-reset:hbf;display:grid;gap:8px}
.hbf-how li,.hbf-note-ol li{counter-increment:hbf;display:grid;grid-template-columns:20px minmax(0,1fr);gap:8px}
.hbf-how li::before,.hbf-note-ol li::before{content:counter(hbf);font:500 12px/1.9 "Roboto",var(--font);color:var(--primary)}

/* guidance chapter (submit-story) and benefits (verify-place) reuse the numbered paragraph and index styles */
.hbf .hb-np:last-child{margin-bottom:0}
.hbf .hb-idx > li{grid-template-columns:48px minmax(0,1fr)}
.hbf .hb-ch h3.hb-idx-t{margin:0}

/* role choice (verify-place): ruled radio rows instead of tiles */
.hbf-roles{display:grid;gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.hbf-role{position:relative;display:block;margin:0;cursor:pointer}
.hbf-role + .hbf-role{border-top:1px solid var(--line)}
.hbf-role input{position:absolute;inset-inline-start:14px;top:16px;width:18px;height:18px;margin:0;accent-color:var(--primary)}
.hbf-role > span{display:block;padding:12px 14px;padding-inline-start:44px}
.hbf-role b{display:block;font-size:15px;font-weight:500;color:var(--text)}
.hbf-role small{display:block;margin-top:2px;font-size:13px;color:var(--muted);line-height:1.5}
.hbf-role:hover{background:var(--surface)}
.hbf-role:has(input:checked){background:var(--primary-soft)}
.hbf-role:has(input:checked) b{color:var(--on-soft)}
.hbf-role input:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

/* states (done, pending, blocked) inside a chapter */
.hbf-done{margin-top:24px}
.hbf .hb-layout[hidden],.hbf .hb-ch[hidden]{display:none}
.hbf-done .fm-done{padding:20px 8px 8px}
.hbf .hb-toc-foot .fm-link{display:inline-block;margin-top:6px}

@media (max-width:640px){
  .hbf .hb-rec-row > .fm-error{grid-column:1}
  .hbf-sub{grid-template-columns:minmax(0,1fr)}
  .hbf .hbf-short,.hbf .hbf-num{max-width:none}
  .hbf .hb-rec .fm-map{height:240px}
  .hbf .hb-rec-act .btn{flex:1 1 100%}
  .hbf .hb-rec-act .btn-fill{margin-inline-start:0}
  .hbf .hbf-locked{padding-top:0}
}
@media (prefers-reduced-motion:reduce){.hbf-more summary svg{transition:none}}
