/* Township Records Access helper chat. Sits bottom-LEFT because Netlify's free-plan badge is fixed bottom-right. Colors reuse the site palette (all text 4.5:1 or better). */
.tra-chat{font-family:"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:1rem;line-height:1.5;color:#1b1b1b}
.tra-chat *{box-sizing:border-box}
.tra-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tra-chat [hidden]{display:none!important}
.tra-launch{position:fixed;left:1rem;bottom:1rem;z-index:1000;display:inline-flex;align-items:center;gap:.6rem;min-height:3.25rem;padding:.7rem 1.25rem;background:#1f3a5f;color:#fff;border:3px solid #fff;border-radius:2rem;font:700 1.1rem "Segoe UI",Roboto,Helvetica,Arial,sans-serif;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.45)}
.tra-launch:hover{background:#142946}
.tra-launch-icon{display:inline-flex;align-items:center;justify-content:center;width:1.7rem;height:1.7rem;border-radius:50%;background:#fff;color:#1f3a5f;font-weight:700}
.tra-chat button:focus-visible,.tra-chat a:focus-visible,.tra-chat input:focus-visible,.tra-chat textarea:focus-visible{outline:3px solid #b35c00;outline-offset:2px}
.tra-launch:focus-visible{outline:3px solid #ffbf47;outline-offset:3px}
.tra-chat h2:focus,.tra-chat h3:focus{outline:none}
.tra-chat h2:focus-visible,.tra-chat h3:focus-visible{outline:3px solid #b35c00;outline-offset:2px}
.tra-panel{position:fixed;left:1rem;bottom:1rem;z-index:1001;width:min(27rem,calc(100vw - 2rem));max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);display:flex;flex-direction:column;background:#fff;border:3px solid #1f3a5f;border-radius:10px;box-shadow:0 6px 24px rgba(0,0,0,.4);overflow:hidden}
.tra-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:#1f3a5f;color:#fff;padding:.6rem .9rem}
.tra-head h2{margin:0;font-size:1.2rem;color:#fff;line-height:1.3}
.tra-close{min-height:2.75rem;padding:.4rem .9rem;background:#fff;color:#142946;border:2px solid #fff;border-radius:6px;font:700 1rem "Segoe UI",Roboto,Helvetica,Arial,sans-serif;cursor:pointer}
.tra-close:hover{background:#eef3f8}
.tra-head .tra-close:focus-visible{outline:3px solid #ffbf47;outline-offset:2px}
.tra-head h2:focus-visible{outline:3px solid #ffbf47}
.tra-body{flex:1 1 auto;overflow-y:auto;padding:.75rem .9rem;background:#fff;min-height:6rem}
.tra-msg{margin:0 0 .75rem;padding:.65rem .85rem;border-radius:8px;max-width:100%;overflow-wrap:anywhere}
.tra-bot{background:#eef3f8;border:1px solid #b9c6d6}
.tra-user{background:#1f3a5f;color:#fff;margin-left:2rem}
.tra-answer p{margin:.5rem 0 0}
.tra-answer ul,.tra-answer ol{margin:.5rem 0;padding-left:1.3rem}
.tra-answer li{margin:.3rem 0}
.tra-answer a,.tra-foot a,.tra-small a,.tra-error a{color:#0b4a8f;text-decoration:underline}
.tra-ask,.tra-send,.tra-back{display:inline-block;margin-top:.6rem;min-height:2.9rem;padding:.55rem 1.1rem;background:#1f3a5f;color:#fff;border:2px solid #1f3a5f;border-radius:6px;font:700 1rem "Segoe UI",Roboto,Helvetica,Arial,sans-serif;cursor:pointer}
.tra-ask:hover,.tra-send:hover{background:#142946}
.tra-send:disabled{background:#4a5a6e;border-color:#4a5a6e;cursor:wait}
.tra-back{background:#fff;color:#142946}
.tra-back:hover{background:#eef3f8}
.tra-topics-label{margin:.25rem 0 .4rem;font-weight:700}
.tra-topic-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.tra-topic{width:100%;min-height:3.4rem;padding:.5rem .6rem;background:#fff;color:#142946;border:2px solid #1f3a5f;border-radius:8px;font:700 1rem/1.25 "Segoe UI",Roboto,Helvetica,Arial,sans-serif;text-align:center;cursor:pointer}
.tra-topic:hover{background:#eef3f8}
.tra-input{padding:.6rem .9rem .3rem;border-top:2px solid #b9c6d6;background:#fff}
.tra-input label,.tra-field label{display:block;font-weight:700;margin-bottom:.25rem}
.tra-input-row{display:flex;gap:.5rem}
.tra-input-row input{flex:1 1 auto;min-width:0}
.tra-input .tra-send{margin-top:0}
.tra-chat input[type=text],.tra-chat input[type=email],.tra-chat textarea{width:100%;font:inherit;font-size:1rem;padding:.55rem .65rem;border:2px solid #4a5a6e;border-radius:4px;background:#fff;color:#1b1b1b}
.tra-chat input[aria-invalid=true],.tra-chat textarea[aria-invalid=true]{border-color:#a30000;border-width:3px}
.tra-foot{margin:0;padding:.3rem .9rem .7rem;font-size:.9rem;background:#fff}
.tra-form h3{margin:.25rem 0 .4rem;font-size:1.15rem;color:#142946}
.tra-form p{margin:.3rem 0}
.tra-field{margin:.7rem 0}
.tra-hp{position:absolute;left:-9999px;height:0;overflow:hidden}
.tra-error{color:#a30000;font-weight:700;min-height:0}
.tra-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.tra-small{font-size:.9rem}
.site-footer{padding-bottom:5.5rem}
@media (max-width:30rem){
  /* Netlify's free-plan "Powered by Netlify" badge sits fixed at the bottom right (192 x 64px), so on narrow screens lift the widget above it */
  .tra-panel{right:.5rem;left:.5rem;bottom:4.75rem;width:auto;max-height:calc(100vh - 5.25rem);max-height:calc(100dvh - 5.25rem)}
  .tra-topic-list{grid-template-columns:1fr}
  .tra-user{margin-left:.75rem}
  .tra-launch{left:.5rem;bottom:4.75rem}
}
@media (max-height:32rem){.tra-panel{overflow-y:auto}.tra-body{flex:none;overflow:visible}.tra-head{position:sticky;top:0;z-index:1}}
@media print{.tra-chat{display:none}}
