/* Shared contact access for the local public-site preview. */
.lead-accessbar,
.lead-desktop-trigger {
  display: none;
}

body.lead-sheet-open {
  overflow: hidden;
}

.lead-sheet {
  position: fixed;
  inset: 0;
  width: min(35rem, calc(100% - 2.5rem));
  max-width: none;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line, #d8cdb8);
  border-top: 3px solid var(--gold, #c79b67);
  border-radius: .75rem;
  background: var(--paper, #fbf8f2);
  color: var(--ink, #1f1b16);
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 1.5rem 5rem rgba(5, 11, 21, .3);
  color-scheme: inherit;
}

.lead-sheet[open] {
  display: flex;
  flex-direction: column;
}

.lead-sheet::backdrop {
  background: rgba(5, 11, 21, .66);
  backdrop-filter: blur(3px);
}

.lead-sheet [hidden],
.lead-accessbar [hidden] {
  display: none !important;
}

.lead-sheet :where(button, a, input, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus, #0e1e36);
  outline-offset: 3px;
}

.lead-sheet__header {
  position: relative;
  flex: 0 0 auto;
  padding: 1.25rem 4.5rem 1rem 1.5rem;
  border-bottom: 1px solid var(--line, #d8cdb8);
  background: var(--paper, #fbf8f2);
}

.lead-sheet__eyebrow {
  margin: 0 0 .35rem;
  color: var(--gold-ink, #775728);
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.lead-sheet__title,
.lead-sheet__header h2 {
  margin: 0;
  color: var(--ink, #1f1b16);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.lead-sheet__close {
  position: absolute;
  top: .875rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line, #d8cdb8);
  border-radius: 50%;
  background: var(--paper, #fbf8f2);
  color: var(--ink, #1f1b16);
  font: 400 1.75rem/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
}

.lead-sheet__close svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.lead-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem 1.5rem 1.25rem;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: 1rem;
}

.lead-sheet__intro {
  margin: 0 0 1rem;
  color: var(--muted, #5a5245);
  font-size: .9375rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.lead-sheet__paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .625rem;
  margin: 0 0 1.125rem;
}

.lead-sheet__path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .2rem;
  min-width: 0;
  min-height: 3.5rem;
  padding: .75rem;
  border: 1px solid var(--line, #d8cdb8);
  border-radius: .375rem;
  background: var(--ivory, #f6f1e7);
  color: var(--ink, #1f1b16);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}

.lead-sheet__path svg {
  width: 1.125rem;
  height: 1.125rem;
  margin-bottom: .1rem;
  fill: var(--gold-ink, #775728);
}

.lead-sheet__path-label {
  font-size: .9375rem;
  font-weight: 600;
}

.lead-sheet__path-value,
.lead-sheet__path small {
  color: var(--muted, #5a5245);
  font-size: .75rem;
  font-weight: 400;
}

.lead-sheet__divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
  color: var(--muted, #5a5245);
  font-size: .8125rem;
  line-height: 1.35;
  text-align: center;
}

.lead-sheet__divider::before,
.lead-sheet__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line, #d8cdb8);
}

.lead-sheet__form {
  display: grid;
  gap: .875rem;
  min-width: 0;
  margin: 0;
}

.lead-sheet__field {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.lead-sheet__label {
  display: block;
  color: var(--ink, #1f1b16);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}

.lead-sheet__label small {
  color: var(--muted, #5a5245);
  font-size: .8125rem;
  font-weight: 400;
}

.lead-sheet__input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  margin: 0;
  padding: .7rem .875rem;
  border: 1px solid var(--line-2, #c9bca3);
  border-radius: .375rem;
  background: var(--paper, #fbf8f2);
  color: var(--ink, #1f1b16);
  font: 400 1rem/1.5 var(--sans, system-ui, sans-serif);
  letter-spacing: normal;
  box-shadow: none;
  scroll-margin-block: 1rem;
}

.lead-sheet__input::placeholder {
  color: var(--muted, #5a5245);
  opacity: .85;
}

textarea.lead-sheet__input {
  min-height: 6rem;
  max-height: 18rem;
  resize: vertical;
}

.lead-sheet__input:focus {
  border-color: var(--focus, #0e1e36);
}

.lead-sheet__input[aria-invalid="true"] {
  border-color: var(--err, #9a2b2b);
  box-shadow: inset 3px 0 0 var(--err, #9a2b2b);
}

.lead-sheet__hint {
  margin: 0;
  color: var(--muted, #5a5245);
  font-size: .8125rem;
  line-height: 1.45;
}

.lead-sheet__error {
  margin: 0;
  color: var(--err, #9a2b2b);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.45;
}

.lead-sheet__error-summary {
  padding: .75rem .875rem;
  border: 1px solid var(--err, #9a2b2b);
  border-left-width: 3px;
  border-radius: .375rem;
  background: var(--err-bg, #fbeade);
  color: var(--err, #9a2b2b);
  font-size: .875rem;
  line-height: 1.45;
  scroll-margin-block: 1rem;
}

.lead-sheet__error-summary a {
  color: inherit;
  font-weight: 600;
}

.lead-sheet__details {
  min-width: 0;
  border-top: 1px solid var(--line, #d8cdb8);
  border-bottom: 1px solid var(--line, #d8cdb8);
}

.lead-sheet__details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  padding: .625rem .125rem;
  color: var(--link, #0e1e36);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
}

.lead-sheet__details > summary::-webkit-details-marker {
  display: none;
}

.lead-sheet__details > summary::after {
  content: "+";
  flex: 0 0 1.5rem;
  color: var(--gold-ink, #775728);
  font-size: 1.25rem;
  font-weight: 400;
  text-align: center;
}

.lead-sheet__details[open] > summary::after {
  content: "−";
}

.lead-sheet__details > :not(summary) {
  margin-bottom: .875rem;
}

.lead-sheet__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  min-height: 3rem;
  padding: .75rem 1rem;
  border: 1px solid var(--btn-bg, #0e1e36);
  border-radius: .375rem;
  background: var(--btn-bg, #0e1e36);
  color: var(--btn-fg, #fbf8f2);
  font: 600 .9375rem/1.35 var(--sans, system-ui, sans-serif);
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.lead-sheet__submit:disabled,
.lead-sheet__submit[aria-disabled="true"] {
  opacity: .72;
  cursor: wait;
}

.lead-sheet__form[aria-busy="true"] .lead-sheet__submit::before {
  content: "";
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lead-access-spin .7s linear infinite;
}

.lead-sheet__legal,
.lead-sheet__preview-note {
  margin: 0;
  color: var(--muted, #5a5245);
  font-size: .75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.lead-sheet__legal a,
.lead-sheet__preview-note a {
  color: var(--link, #0e1e36);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.lead-sheet__preview-note {
  padding: .625rem .75rem;
  border: 1px solid var(--line, #d8cdb8);
  border-radius: .375rem;
  background: var(--ivory, #f6f1e7);
}

.lead-sheet__status:not(:empty) {
  padding: .75rem .875rem;
  border-left: 3px solid var(--ok, #2f6b45);
  background: var(--ivory, #f6f1e7);
  color: var(--ink, #1f1b16);
  font-size: .875rem;
  line-height: 1.5;
}

.lead-sheet__success {
  padding-block: .5rem;
}

.lead-sheet__success-title {
  margin: 0 0 .75rem;
  color: var(--ink, #1f1b16);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
}

.lead-sheet__success p + p {
  margin-top: .75rem;
}

.lead-sheet__success-actions {
  display: grid;
  gap: .625rem;
  margin-top: 1.25rem;
}

.lead-contact-note {
  margin: .625rem 0 1rem;
  color: var(--muted, #5a5245);
  font-size: .9375rem;
  line-height: 1.5;
}

.lead-contact-details {
  margin-block: .75rem 1rem;
  padding-block: .25rem;
  border-block: 1px solid var(--line, #d8cdb8);
}

.lead-contact-details > summary {
  min-height: 2.75rem;
  padding-block: .625rem;
  color: var(--link, #0e1e36);
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
}

.lead-contact-details[open] > summary {
  margin-bottom: .625rem;
}

@media (min-width: 64rem) {
  .lead-desktop-trigger {
    position: fixed;
    z-index: 79;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 2.75rem;
    min-height: 2.75rem;
    padding: .875rem .65rem;
    border: 1px solid var(--gold, #c79b67);
    border-right: 0;
    border-radius: .375rem 0 0 .375rem;
    background: var(--navy, #0e1e36);
    color: var(--on-dark, #f1ebdd);
    font: 500 .8125rem/1.35 var(--sans, system-ui, sans-serif);
    box-shadow: 0 .25rem 1.125rem rgba(5, 11, 21, .12);
    text-decoration: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: translateY(-50%);
    cursor: pointer;
    touch-action: manipulation;
  }

  .lead-desktop-trigger svg {
    width: 1rem;
    height: 1rem;
    fill: var(--gold-light, #dbc08e);
  }

  .lead-desktop-trigger:focus-visible {
    outline: 3px solid var(--gold-light, #dbc08e);
    outline-offset: 3px;
  }
}

@media (max-width: 63.99rem) {
  body.lead-access-ready {
    padding-bottom: var(--lead-access-height, calc(4.5rem + env(safe-area-inset-bottom, 0px)));
  }

  body.lead-access-ready :is(.callbar, .assist-l) {
    display: none !important;
  }

  /* Visitors can contact the firm before making an analytics choice. */
  body.lead-access-ready .da-privacy {
    bottom: calc(var(--lead-access-height, 4.5rem) + .75rem);
    max-height: calc(100dvh - var(--lead-access-height, 4.5rem) - 2rem);
  }

  .lead-accessbar {
    position: fixed;
    z-index: 81;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: .5rem;
    min-height: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    padding: .625rem max(1rem, env(safe-area-inset-left, 0px)) calc(.625rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-right, 0px));
    border-top: 1px solid rgba(219, 192, 142, .3);
    background: var(--navy-2, #0a1626);
    box-shadow: 0 -.25rem 1.25rem rgba(5, 11, 21, .15);
  }

  .lead-accessbar > :is(a, button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-width: 0;
    min-height: 3rem;
    padding: .625rem .75rem;
    border: 1px solid var(--gold-light, #dbc08e);
    border-radius: .375rem;
    background: transparent;
    color: var(--on-dark, #f1ebdd);
    font: 600 .9375rem/1.3 var(--sans, system-ui, sans-serif);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
  }

  .lead-accessbar > :last-child {
    border-color: var(--gold, #c79b67);
    background: var(--gold, #c79b67);
    color: #0a1626;
  }

  .lead-accessbar svg {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    fill: currentColor;
  }

  .lead-accessbar > :focus-visible {
    outline: 3px solid var(--gold-light, #dbc08e);
    outline-offset: 3px;
  }

  body.lead-sheet-open .lead-accessbar,
  body.m-nav-open .lead-accessbar,
  body.m-input-active:not(.lead-sheet-open) .lead-accessbar {
    visibility: hidden;
    pointer-events: none;
  }

  .lead-sheet {
    inset: auto 0 0;
    width: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 1rem 1rem 0 0;
  }

  .lead-sheet__header {
    padding: 1rem 4.125rem .875rem max(1.125rem, env(safe-area-inset-left, 0px));
  }

  .lead-sheet__title,
  .lead-sheet__header h2 {
    font-size: 1.5rem;
  }

  .lead-sheet__close {
    top: .75rem;
    right: max(.75rem, env(safe-area-inset-right, 0px));
  }

  .lead-sheet__body {
    padding: .875rem max(1.125rem, env(safe-area-inset-right, 0px)) calc(1.125rem + env(safe-area-inset-bottom, 0px)) max(1.125rem, env(safe-area-inset-left, 0px));
  }

  .lead-sheet__intro {
    margin-bottom: .875rem;
  }
}

@media (max-width: 22rem) {
  .lead-accessbar {
    padding-inline: .75rem;
  }

  .lead-accessbar > :is(a, button) {
    gap: .375rem;
    padding-inline: .5rem;
    font-size: .875rem;
  }

  .lead-sheet__paths {
    gap: .5rem;
  }

  .lead-sheet__path {
    padding: .625rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .lead-sheet__path:hover,
  .lead-sheet__close:hover {
    border-color: var(--gold-ink, #775728);
    background: var(--ivory-2, #ede5d5);
  }

  .lead-sheet__submit:not(:disabled):hover {
    border-color: var(--btn-bg-hover, #16294a);
    background: var(--btn-bg-hover, #16294a);
  }

  .lead-desktop-trigger:hover {
    background: var(--navy-3, #16294a);
  }
}

@keyframes lead-access-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .lead-sheet__form[aria-busy="true"] .lead-sheet__submit::before {
    animation: none;
  }
}

@media (forced-colors: active) {
  .lead-sheet,
  .lead-accessbar,
  .lead-desktop-trigger,
  .lead-sheet__path,
  .lead-sheet__submit {
    border: 1px solid CanvasText;
  }
}

@media print {
  .lead-accessbar,
  .lead-desktop-trigger,
  .lead-sheet {
    display: none !important;
  }
}
