@font-face { font-family: Poppins; src: url("/assets/fonts/google-fonts/poppins/pxiEyp8kv8JHgFVrFJA.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url("/assets/fonts/google-fonts/poppins/pxiByp8kv8JHgFVrLEj6V1s.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/assets/fonts/google-fonts/playfair-display/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKebukDQ.ttf") format("truetype"); font-weight: 500 800; font-display: swap; }

:root {
  --green: #4b7864;
  --deep: #3d6252;
  --forest: #244538;
  --ink: #203d34;
  --muted: #52675d;
  --gold: #e1c67f;
  --sage: #edf1e5;
  --paper: #f7f7f1;
  --line: #d9e1d7;
  --white: #ffffff;
  --shadow: 0 16px 44px #274a3510;
  --serif: "Playfair Display", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  font: 14px/1.55 Poppins, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.12; }
h2 { font-size: 31px; letter-spacing: -.55px; }
h3 { font-size: 15px; font-weight: 600; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #ab7c24; outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }

.site-header { background: #fcfcf8; border-bottom: 1px solid #ffffff18; }
@media screen {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .site-header { padding-top: env(safe-area-inset-top, 0px); }
}

.masthead { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { display: block; border-radius: 9px; width: 46px; height: 46px; object-fit: contain; }
.brand strong { display: block; font: 600 21px/1.05 var(--serif); white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.demo-nav { display: flex; padding: 3px; gap: 3px; border-radius: 11px; background: #f0f2eb; }
.demo-nav a { padding: 8px 13px; min-height: 42px; border-radius: 8px; display: flex; gap: 6px; align-items: center; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.demo-nav a:hover { color: var(--ink); background: #e5eadf; }
.demo-nav a[aria-current] { background: var(--white); box-shadow: 0 1px 4px #263d2720; color: var(--forest); }
.demo-nav { flex-wrap: wrap; }
.demo-nav button { border: 0; background: transparent; border-radius: 8px; padding-inline: 10px; min-height: 44px; color: var(--forest); font-weight: 600; }

.hero {
  background-color: var(--forest);
  background-image: linear-gradient(90deg, #264a3c 14%, #264a3c 37%, #264a3cf7 49%, #264a3c7a 76%, #264a3c76), url("/images/uploads/home-hero.webp");
  background-position: center, right 47%;
  background-size: cover, max(52%, 690px) auto;
  background-repeat: no-repeat;
  color: #fffdf6;
}
.hero-inner { padding-block: 32px 55px; }
.hero h1 { font-size: clamp(35px, 5.6vw, 57px); letter-spacing: -.035em; margin: 3px 0 10px; }
.hero-inner > p:last-child { color: #e8eee4; max-width: 54ch; font-size: 14px; }
.eyebrow { color: #70551e; font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { color: var(--gold); }
.admin-hero .hero-inner { padding-bottom: 55px; }

.card { border: 1px solid #dfe5da; border-radius: 19px; background: var(--white); box-shadow: var(--shadow); }
.intake-shell, .admin-shell { position: relative; margin-top: -26px; margin-bottom: 42px; }
.intake-shell { max-width: 958px; }
.steps { list-style: none; display: flex; padding: 16px 30px; margin: 0; background: #fcfdf9; border-bottom: 1px solid #e8ede4; border-radius: 19px 19px 0 0; }
.steps li { flex: 1; display: flex; align-items: center; position: relative; gap: 9px; color: var(--muted); font-size: 12px; }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; margin-inline: 13px; background: #dce4d8; }
.steps li:last-child { flex: 0 0 auto; }
.steps li span { border: 1px solid #d7e1d6; background: white; min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-weight: 600; }
.steps li[aria-current] { color: var(--ink); }
.steps li[aria-current] span { border-color: var(--deep); background: var(--deep); color: white; }
.steps li.is-complete span { border-color: #dce7d5; background: var(--sage); color: var(--forest); }
.form-step { padding: 25px 30px 24px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.section-heading p:not(.eyebrow), .health-section > p { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 15px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.full { grid-column: 1 / -1; }
label, legend { font-size: 12px; font-weight: 600; }
legend { padding: 0; margin: 0 0 7px; }
.required { color: #87561e; }
input:not([type="radio"], [type="checkbox"]), select, textarea {
  width: 100%; min-width: 0; min-height: 46px; display: block; border: 1px solid #d6ded3; border-radius: 8px;
  background: #fcfdfb; padding: 9px 11px; font-size: 16px; font-weight: 400;
}
label > input:not([type="radio"], [type="checkbox"]), label > textarea, label > select { margin-top: 5px; }
input::placeholder, textarea::placeholder { color: #66756c; font-size: 13px; }
input[type="date"] { appearance: none; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
textarea { resize: vertical; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--deep); margin: 0; width: 17px; height: 17px; flex: 0 0 auto; }
fieldset { padding: 0; min-width: 0; border: 0; margin: 0; }
.field-section { display: block; margin-top: 22px; }
.field-section > h3 { margin-bottom: 9px; }
.form-footer { padding: 15px 30px; border-top: 1px solid #e7ede3; background: #fafbf8; display: flex; align-items: center; gap: 12px; border-radius: 0 0 19px 19px; }
.form-footer p { color: var(--muted); font-size: 11px; flex: 1; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.button-primary { background: var(--deep); color: white; box-shadow: 0 2px 4px #253e3020; }
.button-primary:hover { background: var(--forest); }
.button-quiet { border-color: var(--line); background: #f9fbf6; color: var(--forest); }
.button-quiet:hover { background: var(--sage); border-color: #b9c9b9; }
.text-button { border: 0; padding: 4px 5px; background: transparent; color: var(--deep); font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.options, .marker-options { display: flex; flex-wrap: wrap; gap: 7px; }
.option, .marker-choice { display: inline-flex; min-height: 44px; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-weight: 400; cursor: pointer; }
.option:has(input:checked), .marker-choice:has(input:checked) { background: #eaf1e6; border-color: var(--green); color: var(--forest); }
.marker-choice span { font-size: 18px; line-height: 1; font-weight: 600; }
.marker-choice.pain span { color: #a74539; }
.marker-choice.avoid span { color: #745511; }
.body-map { display: grid; grid-template-columns: 1fr minmax(205px, 1fr); gap: 18px; padding: 18px; background: #f6f8f2; border: 1px solid #e3ebde; border-radius: 11px; }
.body-map p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.marker-options { margin: 13px 0; }
.body-map .map-status { margin-top: 9px; }
.body-diagrams { display: flex; justify-content: center; align-items: end; gap: clamp(10px, 4vw, 40px); }
.body-diagrams figure { margin: 0; text-align: center; width: min(108px, 48%); }
.body-diagrams figcaption { font-size: 11px; font-weight: 600; color: var(--muted); }
.body-figure { width: 100%; aspect-ratio: 108 / 198; position: relative; }
.body-figure canvas { display: block; width: 100%; height: 100%; }
.body-point {
  width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--deep);
  position: absolute; display: grid; place-items: center; transform: translate(-50%, -50%);
}
.body-point::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #9ab39f; border: 1px solid #557b65; }
.body-point:hover { background: #4b78642b; }
.body-point[data-mark]::before { content: "●"; width: auto; height: auto; background: none; border: 0; color: #a74539; font-size: 20px; line-height: 1; }
.body-point[data-mark="avoid"]::before { content: "×"; color: #745511; font-size: 25px; font-weight: 600; }
.body-point[data-mark="both"]::before { content: "●×"; color: #793f25; font-size: 15px; font-weight: 600; }
.health-section legend, .superbill legend, .insurance-fields legend { font-size: 15px; }
.health-section p { margin: 0 0 8px; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 14px; }
.check-grid label, .checkbox-line { display: flex; align-items: center; gap: 8px; padding-block: 7px; min-height: 39px; font-weight: 400; }
#pregnancy-field { max-width: 230px; }
.review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 11px 13px; margin: 0 0 17px; background: #f5f7f0; border: 1px solid #e3ebde; border-radius: 9px; }
.review-summary dt { color: var(--muted); font-size: 10px; font-weight: 600; }
.review-summary dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 12px; }
.insurance-fields { margin-top: 18px; }
.insurance-fields p { color: var(--muted); font-size: 12px; }
.consent { padding: 15px; border-radius: 10px; background: #f5f7f0; }
.consent p { font-size: 13px; }
.consent .checkbox-line { font-weight: 600; margin-top: 5px; }
.signatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.signature > div { display: flex; justify-content: space-between; align-items: center; }
.signature canvas {
  width: 100%; height: 125px; display: block; margin: 5px 0 8px; touch-action: none; user-select: none; cursor: crosshair;
  border: 1px solid var(--line); border-radius: 9px;
  background: linear-gradient(to bottom, transparent 76%, #dce5da 76%, #dce5da calc(76% + 1px), transparent calc(76% + 1px)), #fafcf8;
}
.signature label { display: block; }
.form-error { margin-top: 10px; color: #932c24; font-weight: 600; }
.completion { padding: 24px 30px; }
.completion .eyebrow, .detail-header .eyebrow { margin-bottom: 5px; }
.completion-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 16px; border-top: 1px solid #e5ece2; margin-top: 15px; }

.admin-shell { display: grid; grid-template-columns: minmax(295px, .78fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.records-card { padding: 20px 15px 10px; }
.panel-heading { padding: 0 6px 13px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.panel-heading h2 { font-size: 24px; }
.result-count { font-size: 11px; color: var(--muted); text-align: right; }
.filters { padding: 0 6px 14px; }
.filters > input { margin: 5px 0 10px; }
.filters .field-grid { gap: 7px; }
.filters input, .filters select { padding-inline: 7px; }
.record-list { list-style: none; padding: 0; margin: 0; }
.record-list li { margin-bottom: 4px; }
.record-row { display: flex; align-items: center; text-align: left; gap: 8px; width: 100%; min-height: 67px; padding: 8px; border: 1px solid transparent; background: white; border-radius: 9px; }
.record-row:hover { background: #f4f7ef; }
.record-row[aria-pressed="true"] { background: #edf3e8; border-color: #d8e5d6; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #e3e9de; color: var(--forest); font-size: 11px; font-weight: 600; }
.record-row[aria-pressed="true"] .avatar { background: #dce8d9; }
.row-person { flex: 1; min-width: 0; }
.row-person strong { display: block; font-size: 13px; }
.row-person small { color: var(--muted); font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 7px; font-size: 10px; font-weight: 600; line-height: 1.4; background: #e4eee2; color: #32563e; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.pending { background: #f8ecd0; color: #755617; }
.no-results, .empty-detail { padding: 24px 7px; color: var(--muted); font-size: 12px; }
.detail-card { padding: 21px 23px; }
.detail-header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 13px; }
.detail-header h2 { font-size: clamp(23px, 3.4vw, 32px); }
.detail-header p:last-child { color: var(--muted); font-size: 12px; margin-top: 4px; }
.detail-controls { display: grid; justify-items: end; gap: 6px; }
.detail-controls .button { padding-inline: 10px; }
.record-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.record-section { border: 1px solid #e3eae0; border-radius: 9px; background: #fcfdfb; padding: 11px; min-width: 0; }
.record-section h3 { margin-bottom: 7px; font-size: 13px; }
.record-section dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.record-section dt { font-size: 10px; color: var(--muted); font-weight: 600; }
.record-section dd { margin: 1px 0 0; font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.record-section p { font-size: 11px; }
.record-section .signature-read { display: block; width: 100%; height: 55px; object-fit: contain; object-position: left center; background: #f7f9f4; border-bottom: 1px solid #dce6da; margin-block: 3px; }
.record-signatures dl { gap: 13px; }
.record-signatures dd { color: var(--muted); }
.record-signatures .consent-copy { color: var(--muted); margin-bottom: 8px; }
.print-record { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 870px) {
  .shell { width: calc(100% - 40px); }
  .admin-shell { grid-template-columns: minmax(265px, .8fr) minmax(0, 1.15fr); gap: 12px; }
  .detail-card { padding-inline: 15px; }
  .record-preview { gap: 8px; }
}
@media (max-width: 660px) {
  .shell { width: calc(100% - 26px); }
  .masthead { min-height: 66px; gap: 6px; }
  .brand { gap: 5px; }
  .brand img { width: 33px; height: 33px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 9px; }
  .demo-nav a { font-size: 10px; padding: 5px 7px; min-height: 38px; }
  .hero-inner { padding-block: 24px 47px; }
  .hero-inner > p:last-child { font-size: 12px; }
  .hero { background-image: linear-gradient(90deg, #264a3c, #264a3cda 65%, #264a3c9e), url("/images/uploads/home-hero.webp"); }
  .steps { padding: 12px; }
  .steps li { font-size: 10px; gap: 4px; }
  .steps li:not(:last-child)::after { margin-inline: 5px; min-width: 3px; }
  .steps li span { min-width: 24px; height: 24px; }
  .form-step, .completion { padding: 18px 13px; }
  .form-footer { padding: 11px 13px; gap: 7px; }
  .form-footer .button { padding-inline: 9px; }
  .section-heading { flex-wrap: wrap; margin-bottom: 13px; }
  h2 { font-size: 26px; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .body-map { grid-template-columns: 1fr; padding: 12px; }
  .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signatures { gap: 8px; }
  .signature h3 { font-size: 12px; }
  .admin-shell { grid-template-columns: 1fr; }
  .records-card { padding-top: 14px; }
  .record-row { min-height: 54px; }
  .detail-header .status { white-space: normal; }
}
@media (max-width: 360px) {
  .brand img { display: none; }
  .steps li strong { max-width: 54px; }
  .record-preview { grid-template-columns: 1fr; }
}
@page { margin: 13mm; }
@media print {
  :root, body { color: #172820; background: white; font-size: 11pt; }
  body > :not(.print-record) { display: none !important; }
  .print-record { display: block; }
  .print-record h1 { font-size: 24pt; margin: 0 0 5pt; }
  .print-record header { padding-bottom: 9pt; margin-bottom: 11pt; border-bottom: 1pt solid #91a092; }
  .print-record .record-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 8pt; }
  .print-record .record-section { break-inside: avoid; border-radius: 0; border-color: #c6cfc6; padding: 7pt; background: white; }
  .print-record .record-section dd, .print-record .record-section p { font-size: 9pt; }
}

.header-link { font-size: 12px; color: var(--deep); font-weight: 600; text-decoration: none; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; min-height: 44px; }
.header-link:hover { background: var(--sage); }
a.button { text-decoration: none; }
.demo-note { font-size: 12px; margin-top: 13px; color: var(--muted); }


.provider-block { background: #f5f7f0; border: 1px solid #e3ebde; border-radius: 9px; padding: 10px 13px; }
.provider-block summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
.provider-block p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.provider-block dl, .bill-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.provider-block dt, .bill-totals dt, .paper-heading dt { color: var(--muted); font-weight: 600; font-size: 11px; }
.provider-block dd, .bill-totals dd, .paper-heading dd { margin: 0; }
.provider-block dd { font-size: 12px; overflow-wrap: anywhere; }
.superbill-section { border-top: 1px solid #e7ece2; padding-top: 17px; }
.superbill-section > h3 { margin-bottom: 10px; }
.service-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-line { background: #f9fbf6; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px 12px; margin-top: 9px; }
.service-line legend { padding-inline: 4px; }
.service-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.remove-service { margin: 6px 0 0; min-height: 32px; padding-inline: 0; }
.remove-service:disabled { display: none; }
.bill-totals { margin: 13px 0 0; padding: 10px 13px; border-radius: 9px; background: #f5f7f0; }
.bill-totals dd { font: 600 clamp(18px, 3vw, 26px)/1.2 var(--serif); margin-top: 3px; }

.superbill-paper { padding: 15px; border: 1px solid #e4ebe0; border-radius: 12px; background: #fdfefb; }
.paper-heading { display: flex; justify-content: space-between; gap: 10px; align-items: start; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.paper-heading h3 { font: 600 clamp(17px, 4vw, 23px)/1.2 var(--serif); margin-bottom: 4px; }
.paper-heading p { font-size: 12px; color: var(--muted); }
.paper-heading dl { margin: 0; display: flex; flex-wrap: wrap; gap: 5px 13px; font-size: 12px; }
.paper-heading dd { overflow-wrap: anywhere; }
.receipt-table { overflow: auto; }
.service-receipt table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.service-receipt th { padding: 5px; border-bottom: 1px solid var(--line); color: var(--muted); }
.service-receipt td { padding: 5px; vertical-align: top; overflow-wrap: anywhere; }
.service-receipt th:last-child, .service-receipt td:last-child { text-align: right; }
.paper-footer { margin-top: 11px; font-size: 11px; color: var(--muted); }
.paper-footer p + p { margin-top: 9px; }
.button:disabled { cursor: default; opacity: .65; }

@media (max-width: 920px) {
}
@media (max-width: 660px) {
  .masthead:has(.demo-nav) { flex-wrap: wrap; padding-block: 8px; }
  .demo-nav { gap: 1px; }
  .demo-nav a { min-height: 40px; }
  .header-link { font-size: 10px; padding-inline: 7px; gap: 4px; }
  .service-fields, .provider-block dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper-heading { flex-direction: column; }
}
@media print {
  .print-record .superbill-paper { padding: 0; border: 0; }
  .print-record .record-section.service-receipt { break-inside: auto; }
  .print-record .service-receipt h3 { break-after: avoid; }
  .print-record .receipt-table { overflow: visible; }
  .print-record .service-receipt th:nth-child(2),
  .print-record .service-receipt td:nth-child(2) { white-space: nowrap; }
  .print-record .service-receipt table { width: 100%; font-size: 9pt; }
  .print-record .service-receipt tr { break-inside: avoid; }
}

.office-shell {
  display: grid;
  grid-template-columns: minmax(290px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
  position: relative;
  margin-top: -26px;
  margin-bottom: 42px;
}

.signature-panel,
.superbill-picker,
.superbill-history {
  border: 1px solid #e3ebde;
  border-radius: 11px;
  padding: 16px;
  background: #f8faf5;
}

.signature-panel {
  margin-top: 14px;
}

.superbill-history {
  margin: 18px 0;
}

.form-message {
  color: var(--muted);
  font-size: 12px;
  margin-top: 9px;
}

.form-message[role="alert"],
.form-message.is-error {
  color: #932c24;
}

.delivery-dialog {
  width: min(480px, calc(100% - 28px));
  padding: 22px;
  color: var(--ink);
}

.delivery-dialog::backdrop {
  background: #1b382ccc;
}

.delivery-dialog dl,
.delivery-dialog pre {
  margin: 13px 0;
  padding: 11px;
  border-radius: 8px;
  background: #f5f7f0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font: inherit;
}

.delivery-dialog dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.delivery-dialog dd {
  margin: 0 0 5px;
}

@media (max-width: 900px) {
  .office-shell {
    grid-template-columns: 1fr;
  }
}

.signature-panel canvas {
  background: #fdfefb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  width: 100%;
  height: 125px;
  margin: 8px 0;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
}

.bill-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.picker-options,
.selected-client {
  margin-top: 8px;
}

#canonical-client {
  margin-block: 0;
  padding: 14px;
  border-radius: 8px;
  background: #f6f8f2;
}

#canonical-client div { min-width: 0; }
#canonical-client dt { color: var(--muted); font-size: 12px; }
#canonical-client dd { margin: 2px 0 0; overflow-wrap: anywhere; }

#delivery-text {
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.button:disabled {
  cursor: default;
}

.client-association {
  margin-block: 12px;
  padding: 12px;
  border-radius: 9px;
  background: var(--sage);
}

.client-association .completion-actions { margin-block-start: 7px; }
.client-history-sections { display: grid; gap: 14px; }
.client-tools, #duplicate-list, #duplicate-review { margin-block-start: 14px; }
.duplicate-review-group { display: grid; gap: 10px; margin-block-start: 8px; }
.duplicate-review-group h4 { margin: 0 0 3px; overflow-wrap: anywhere; }
.duplicate-review-group .history-list { margin-block-start: 8px; }
.history-list, .audit-list { margin: 0; padding: 0; }
.history-list { list-style: none; display: grid; gap: 6px; }
.history-list .record-row { text-decoration: none; }
.client-paper-form { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; overflow-wrap: anywhere; }
.client-paper-note { white-space: pre-wrap; }
.paper-file-selection { display: flex; justify-content: space-between; align-items: start; gap: 8px; overflow-wrap: anywhere; }
.history-count { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.audit-list { padding-inline-start: 25px; }
.audit-list li { padding-block: 5px; overflow-wrap: anywhere; }
.move-audit summary { cursor: pointer; padding-block: 10px; min-height: 44px; font-weight: 600; }
.archived-form-version { color: var(--muted); font-size: 12px; }
.move-dialog { border: 1px solid var(--line); border-radius: 12px; max-height: 90dvh; overflow: auto; }
.move-dialog form { display: grid; gap: 12px; }
.move-dialog .record-list { display: grid; gap: 6px; max-height: 22vh; overflow: auto; }
.move-dialog .record-list:empty { display: none; }
.move-dialog #move-target { padding: 10px; border-radius: 8px; background: var(--sage); overflow-wrap: anywhere; }
.move-dialog .completion-actions { margin-block-start: 0; }

@media screen and (max-width: 900px) {
  .office-shell .record-list,
  .picker-options {
    max-block-size: min(29vh, 19rem);
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  #detail-name,
  #client-detail-heading,
  #duplicates-heading,
  #duplicate-review-heading,
  #superbill-editor,
  #superbill-preview {
    scroll-margin-block-start: 14px;
  }
}

@media screen and (pointer: coarse) {
  .demo-nav a,
  .text-button,
  .option,
  .marker-choice,
  .check-grid label,
  .checkbox-line {
    min-height: 44px;
  }

  .form-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    box-shadow: 0 -5px 16px #203d3411;
  }

  .form-footer .button {
    min-height: 48px;
  }

  .signature canvas,
  .signature-panel canvas {
    height: 164px;
  }

  .body-point {
    width: 44px;
    height: 44px;
  }

  .body-diagrams {
    gap: 14px;
  }

  .body-diagrams figure {
    width: min(160px, 47%);
  }

  .row-person strong,
  .record-section dd {
    font-size: 14px;
  }

  .row-person small,
  .record-section dt {
    font-size: 12px;
  }
}

.birth-date-field { min-width: 0; }
.birth-date-entry { display: flex; align-items: stretch; gap: 6px; margin-top: 5px; }
.birth-date-entry .button { flex: 0 0 auto; min-height: 46px; padding-inline: 9px; }
.birth-date-field p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.birth-date-parts {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .75fr) minmax(0, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.birth-date-picker .completion-actions { justify-content: flex-end; }
@media (max-width: 640px) {
  .birth-date-field { grid-column: 1 / -1; }
}

#practitioner-list { margin-block: 12px; max-height: 44dvh; }
#practitioner-list .record-row { border-color: var(--line); min-height: 60px; padding: 9px 12px; }
#practitioner-list .row-person { overflow-wrap: anywhere; }
#practitioner-form { margin-top: 12px; }
