:root {
  color-scheme: light;
  --bg: #f8faf7;
  --paper: #fff;
  --ink: #253129;
  --muted: #546354;
  --accent: #31513e;
  --line: #d8dfd0;
  --soft: #e8ede1;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--bg); color: var(--ink); line-height: 1.55; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
button, textarea, input { font: inherit; }
button, input[type=file] { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, textarea:focus-visible, summary:focus-visible, .attachment-field:focus-within { outline: 3px solid #75874b; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 2; background: var(--paper); padding: 8px 12px; }
.top { border-bottom: 1px solid var(--line); }
.bar { min-height: 60px; margin-inline: auto; width: min(1400px, calc(100% - 44px)); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 740; letter-spacing: -.02em; text-decoration: none; color: var(--ink); }
.mark { display: grid; width: 33px; height: 33px; place-items: center; color: white; background: var(--accent); border-radius: 10px; flex-shrink: 0; }
.mark i { width: 13px; height: 12px; border: 1.5px solid; border-top: 0; position: relative; margin-top: 5px; }
.mark i::before { content: ""; position: absolute; width: 10px; height: 10px; border: solid; border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); left: 0; top: -6px; }
.mark i::after { content: ""; position: absolute; left: 4px; bottom: 0; width: 3px; height: 5px; background: currentColor; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.donate-link, .text-button { font-size: .86rem; font-weight: 680; white-space: nowrap; }
.donate-link { text-decoration: none; }
.donate-link:hover, .text-button:hover { text-decoration: underline; }
.text-button { background: none; border: 0; color: var(--accent); min-height: 42px; padding-inline: 4px; }
.chat-shell { width: min(760px, calc(100% - 44px)); min-height: 0; margin-inline: auto; display: flex; flex-direction: column; }
.chat-shell:not(.has-conversation) { overflow-y: auto; padding: 12vh 0 20px; }
.welcome { max-width: 650px; margin: auto auto 24px; text-align: center; }
.welcome h1 { font-size: clamp(1.65rem, 4vw, 2.25rem); line-height: 1.18; letter-spacing: -.035em; margin: 0 0 12px; }
.welcome p { max-width: 520px; margin: 0 auto; color: var(--muted); }
.compose-area { flex: none; background: var(--bg); padding: 8px 2px max(8px, env(safe-area-inset-bottom)); }
.chat-shell:not(.has-conversation) .compose-area { margin-bottom: auto; }
.chat-form { border: 1px solid #bac8b8; border-radius: 23px; background: var(--paper); box-shadow: 0 3px 18px rgb(37 49 41 / 7%); }
.chat-form:focus-within { border-color: #6d886f; }
.chat-form textarea { display: block; width: calc(100% - 30px); border: 0; background: transparent; resize: none; min-height: 40px; max-height: min(32dvh, 220px); padding: 6px 4px; margin: 10px 15px 0; color: var(--ink); overflow-y: auto; }
.chat-form textarea:focus-visible { outline: none; }
.chat-form textarea::placeholder { color: var(--muted); }
.composer-controls, .attachment-control, .chat-examples, .dialog-actions { display: flex; gap: 10px; align-items: center; }
.composer-controls { justify-content: space-between; padding: 4px 10px 9px; }
.attachment-control { min-width: 0; flex-wrap: wrap; gap: 5px 10px; }
.attachment-field { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 42px; padding: 7px 10px; border: 1px solid transparent; border-radius: 999px; color: var(--accent); cursor: pointer; white-space: nowrap; font-weight: 670; font-size: .88rem; }
.attachment-field:hover { background: var(--soft); }
.attachment-field:has(input:disabled) { opacity: .55; cursor: default; }
.attachment-field input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.primary { display: inline-flex; align-items: center; gap: 7px; min-height: 43px; padding: 7px 13px; color: #fff; background: var(--accent); border: 1px solid var(--accent); border-radius: 10px; font-size: .9rem; font-weight: 700; white-space: nowrap; }
.composer-controls .primary { border-radius: 999px; }
.primary:not(:disabled):hover { background: #223c2d; }
.chat-status { margin: 7px 0; font-size: .84rem; color: var(--muted); }
.chat-status:empty { display: none; }
.chat-examples { justify-content: center; flex-wrap: wrap; margin: 13px 0 0; }
.chat-examples button { min-height: 42px; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; color: var(--accent); font-size: .82rem; font-weight: 630; }
.chat-examples button:hover { border-color: #789078; background: var(--soft); }
.chat-messages:empty { display: none; }
.chat-messages:not(:empty) { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 22px; overflow-y: auto; padding: 26px 4px 14px; scrollbar-width: thin; }
.message { max-width: 100%; overflow-wrap: anywhere; }
.message-visitor { background: var(--soft); border-radius: 19px 19px 5px 19px; max-width: min(85%, 590px); padding: 9px 14px; align-self: flex-end; }
.message-visitor p { white-space: pre-wrap; }
.message-agent { padding: 4px 2px 8px; }
.message h2 { font-size: .81rem; font-weight: 740; color: var(--accent); margin: 0 0 5px; }
.message p { margin: 0 0 9px; }
.message p:last-child { margin-bottom: 0; }
.message .source-note, .message .message-files { color: var(--muted); font-size: .82rem; }
.message .source-note { background: #f1eddf; padding: 7px 10px; border-radius: 7px; }
.message details { font-size: .86rem; }
.message summary { color: var(--accent); font-weight: 680; cursor: pointer; }
.message ol { margin: 5px 0 0 8px; padding-left: 1.35em; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; padding: 0; margin: 6px 12px; }
.attachment-list li { display: flex; align-items: center; gap: 5px; background: var(--soft); border-radius: 8px; padding-left: 9px; max-width: 100%; font-size: .8rem; }
.attachment-list li span { overflow-wrap: anywhere; }
.attachment-list button { border: 0; min-width: 39px; min-height: 39px; background: transparent; color: var(--accent); font-weight: 760; }
dialog { width: min(440px, calc(100% - 36px)); background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 23px; }
dialog::backdrop { background: rgb(29 41 32 / 49%); }
dialog h2 { font-size: 1.4rem; margin: 0 0 12px; }
dialog p { font-size: .91rem; margin: 0 0 12px; }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; }
#email-form label { display: block; font-size: .86rem; font-weight: 680; margin-bottom: 4px; }
#email-form input, #email-preview { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 12px; color: var(--ink); background: var(--paper); }
#email-preview { resize: vertical; font-size: .86rem; }
#email-open { text-decoration: none; }
@media (max-width: 570px) {
  .bar, .chat-shell { width: calc(100% - 28px); }
  .bar { min-height: 61px; }
  .brand { font-size: .82rem; gap: 6px; }
  .top-actions { gap: 7px; }
  .donate-link, .text-button { font-size: .72rem; }
  .mark { width: 28px; height: 28px; border-radius: 8px; }
  .welcome p { max-width: 360px; }
}
@media (max-width: 335px) {
  .top-actions { flex-direction: column; align-items: flex-end; gap: 2px; }
  .top-actions .text-button { min-height: 24px; }
}

.next-action { border-left: 3px solid #9eb39e; margin: 12px 0; padding: 3px 0 3px 11px; }
.next-action h3 { font-size: .83rem; margin: 0 0 3px; color: var(--accent); }
.next-action p { font-weight: 670; margin-bottom: 5px; }
.next-action blockquote { margin: 6px 0; color: var(--muted); }
.next-action a, .lookup-result-link { display: inline-block; font-size: .85rem; }
.office-phone { margin-inline-start: 10px; }
.lookup-button { border: 1px solid #9caf99; border-radius: 8px; background: var(--paper); color: var(--accent); padding: 6px 10px; min-height: 42px; font-weight: 670; font-size: .86rem; margin-top: 10px; }
.lookup-button:hover { background: var(--soft); }
.lookup-result-link { display: block; width: fit-content; margin: 4px 0; }
.case-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 6px; }
.case-summary { overflow-wrap: anywhere; }
.case-summary[open] { flex: 1 1 100%; padding-top: 4px; }
.case-summary summary { cursor: pointer; font-size: .86rem; font-weight: 700; color: var(--accent); }
.case-summary h2 { font-size: .86rem; margin: 13px 0 3px; }
.case-summary ul { padding-left: 18px; margin: 0; font-size: .84rem; color: var(--muted); }
.case-summary li + li { margin-top: 3px; }
.case-summary a { display: block; margin: 7px 0 0; font-size: .81rem; }
.query-details { background: var(--soft); border-radius: 9px; padding: 10px; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 5px; font-size: .85rem; }
.query-details dt { font-weight: 670; }
.query-details dd { margin: 0; overflow-wrap: anywhere; }
.privacy-note { font-size: .76rem; color: var(--muted); padding: 5px 1px 0; }
.privacy-note summary { width: fit-content; margin: 0 auto; cursor: pointer; }
.privacy-note p { margin: 6px 0; }
.privacy-note input { accent-color: var(--accent); }
.case-summary .located-county { font-weight: 670; margin: 10px 0 0; font-size: .86rem; }
