/* Treatment-goal handouts — screen + print */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.rt-handout-page {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--intro-text, #1f2724);
  background-color: #eef1ea;
  background-image:
    radial-gradient(ellipse 90% 55% at 12% 0%, rgba(45, 151, 171, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 88% 8%, rgba(210, 137, 54, 0.07) 0%, transparent 50%),
    linear-gradient(180deg, #f4f6f0 0%, #e8ebe3 100%);
}

body.rt-handout-page .skip-link {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 500;
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: rgba(255, 246, 230, 0.9);
  background: rgba(0, 40, 50, 0.78);
  border-radius: 2px;
  border: 1px solid rgba(45, 151, 171, 0.45);
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}

body.rt-handout-page .skip-link:focus {
  transform: translateY(0);
  outline: 2px solid rgba(45, 151, 171, 0.95);
  outline-offset: 3px;
}

.handout-screen-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

.handout-screen-bar a {
  font-size: var(--rt-type-sans-meta);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--teal-deep, #154d4c);
  border-bottom: 1px solid color-mix(in srgb, var(--teal-deep, #154d4c) 45%, transparent);
}

.handout-screen-bar a:hover,
.handout-screen-bar a:focus-visible {
  color: var(--teal-vivid, #1b9baf);
  border-bottom-color: var(--teal-vivid, #1b9baf);
}

.handout-print-btn {
  appearance: none;
  font-family: "DM Sans", sans-serif;
  font-size: var(--rt-type-sans-meta);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5efe8;
  background: var(--teal-deep, #154d4c);
  border: 1.5px solid var(--teal-deep, #154d4c);
  border-radius: 3px;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.handout-print-btn:hover,
.handout-print-btn:focus-visible {
  background: var(--teal-vivid, #1b9baf);
  border-color: var(--teal-vivid, #1b9baf);
}

.handout-print-btn:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 3px;
}

.handout-sheet {
  max-width: 52rem;
  margin: 1rem auto 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3.5vw, 2.25rem) clamp(1.75rem, 4vw, 2.75rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 28%),
    #f7f5ef;
  border: 1px solid rgba(38, 28, 22, 0.1);
  box-shadow: 0 18px 40px rgba(38, 28, 22, 0.08);
}

.handout-brand {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-paper-accessible, #8d5d29);
  margin: 0 0 0.35rem;
}

.handout-meta {
  font-size: var(--rt-type-sans-meta);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 55%, transparent);
  margin: 0 0 1.35rem;
}

.handout-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--intro-text, #1f2724);
  margin: 0 0 0.65rem;
}

.handout-title em {
  font-style: italic;
  color: var(--teal-deep, #154d4c);
}

.handout-invite {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 78%, transparent);
  margin: 0 0 1.5rem;
  max-width: 40rem;
}

.handout-how {
  margin: 0 0 1.75rem;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid rgba(38, 28, 22, 0.12);
}

.handout-how p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 82%, transparent);
  max-width: 42rem;
}

.handout-how em {
  font-style: italic;
  color: var(--teal-deep, #154d4c);
}

.handout-section {
  margin: 0 0 1.65rem;
}

.handout-section-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-paper-accessible, #8d5d29);
  margin: 0 0 0.55rem;
}

.handout-section-prompt {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 78%, transparent);
  max-width: 42rem;
}

.handout-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.handout-checks li {
  margin: 0;
}

.handout-check {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0.7rem;
  align-items: start;
  cursor: pointer;
}

.handout-check input {
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem 0 0;
  border: 1.5px solid color-mix(in srgb, var(--teal-deep, #154d4c) 70%, transparent);
  border-radius: 2px;
  background: #fff;
  flex-shrink: 0;
  cursor: pointer;
}

.handout-check input:checked {
  background: var(--teal-deep, #154d4c);
  box-shadow: inset 0 0 0 2px #fff;
}

.handout-check input:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 2px;
}

.handout-check span {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--intro-text, #1f2724);
}

.handout-write {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0;
}

.handout-write-prompt {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--intro-text, #1f2724);
}

.handout-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 4.5rem;
}

.handout-lines textarea {
  width: 100%;
  min-height: 4.75rem;
  resize: vertical;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--intro-text, #1f2724);
  background:
    repeating-linear-gradient(
      transparent,
      transparent calc(1.7em - 1px),
      rgba(38, 28, 22, 0.18) calc(1.7em - 1px),
      rgba(38, 28, 22, 0.18) 1.7em
    );
  background-origin: content-box;
  border: none;
  border-radius: 0;
  padding: 0 0 0.15rem;
  outline: none;
}

.handout-lines textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--teal-vivid, #1b9baf) 55%, transparent);
  outline-offset: 4px;
}

.handout-lines--short textarea {
  min-height: 2.6rem;
}

.handout-priority {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: center;
  margin-top: 0.35rem;
}

.handout-own-goal {
  margin-top: 0.85rem;
}

.handout-own-goal + .handout-priority {
  margin-top: 0.85rem;
}

.handout-priority-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 60%, transparent);
}

.handout-priority input[type="text"] {
  width: 100%;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9375rem;
  color: var(--intro-text, #1f2724);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(38, 28, 22, 0.28);
  padding: 0.35rem 0;
  outline: none;
}

.handout-priority input[type="text"]:focus-visible {
  border-bottom-color: var(--teal-vivid, #1b9baf);
}

.handout-footer {
  /* Reset site.css `footer` filled band — divider line only */
  margin-top: 1.75rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(38, 28, 22, 0.12);
  background: transparent;
  background-image: none;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 0.35rem 1.25rem;
  justify-content: space-between;
  align-items: baseline;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 62%, transparent);
  text-align: left;
  letter-spacing: 0.02em;
}

.handout-footer p {
  margin: 0;
  font-size: var(--rt-type-sans-meta);
  line-height: 1.45;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 58%, transparent);
}

.handout-footer a {
  color: var(--teal-deep, #154d4c);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--teal-deep, #154d4c) 40%, transparent);
}

.handout-footer a:hover,
.handout-footer a:focus-visible {
  color: var(--teal-vivid, #1b9baf);
  border-bottom-color: var(--teal-vivid, #1b9baf);
}

.handout-footer a:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 3px;
}

.handout-footer .handout-send-btn {
  appearance: none;
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  color: var(--teal-deep, #154d4c);
  background: none;
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--teal-deep, #154d4c) 40%, transparent);
  border-radius: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: none;
}

.handout-footer .handout-send-btn:hover,
.handout-footer .handout-send-btn:focus-visible {
  color: var(--teal-vivid, #1b9baf);
  border-bottom-color: var(--teal-vivid, #1b9baf);
}

.handout-footer .handout-send-btn:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 3px;
}

/* Send-to-therapist modal */
body.handout-send-open {
  overflow: hidden;
}

.handout-send-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.handout-send-modal[hidden] {
  display: none !important;
}

.handout-send-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 26, 0.52);
}

.handout-send-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  max-height: min(92vh, 36rem);
  overflow: auto;
  padding: 1.5rem 1.35rem 1.35rem;
  background: #f7f4ef;
  color: var(--intro-text, #1f2724);
  border: 1px solid rgba(21, 77, 76, 0.16);
  border-radius: 3px;
  box-shadow: 0 18px 48px rgba(15, 28, 26, 0.22);
}

.handout-send-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  color: rgba(31, 39, 36, 0.55);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.handout-send-modal__close:hover,
.handout-send-modal__close:focus-visible {
  color: var(--teal-deep, #154d4c);
}

.handout-send-modal__close:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 2px;
}

.handout-send-modal__title {
  margin: 0 1.75rem 0.5rem 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--teal-deep, #154d4c);
}

.handout-send-modal__lead {
  margin: 0 0 1.15rem;
  font-size: var(--rt-type-sans-body, 0.875rem);
  line-height: 1.55;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 88%, transparent);
}

.handout-send-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.handout-send-form__group label {
  font-size: var(--rt-type-sans-meta, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 72%, transparent);
}

.handout-send-form__group input {
  font-family: "DM Sans", sans-serif;
  font-size: var(--rt-type-sans-body, 0.875rem);
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(21, 77, 76, 0.22);
  border-radius: 2px;
  background: #fff;
  color: var(--intro-text, #1f2724);
}

.handout-send-form__group input:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 2px;
  border-color: var(--teal-vivid, #1b9baf);
}

.handout-send-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.handout-send-status {
  margin: 0 0 0.85rem;
  font-size: var(--rt-type-sans-body, 0.875rem);
  line-height: 1.45;
}

.handout-send-status.is-error {
  color: #8a2f2f;
}

.handout-send-status.is-success {
  color: var(--teal-deep, #154d4c);
}

.handout-send-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.handout-send-cancel,
.handout-send-submit {
  appearance: none;
  font-family: "DM Sans", sans-serif;
  font-size: var(--rt-type-sans-meta, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: 2px;
  cursor: pointer;
}

.handout-send-cancel {
  color: var(--teal-deep, #154d4c);
  background: transparent;
  border: 1px solid rgba(21, 77, 76, 0.28);
}

.handout-send-cancel:hover,
.handout-send-cancel:focus-visible {
  border-color: var(--teal-deep, #154d4c);
}

.handout-send-submit {
  color: #f5efe8;
  background: var(--teal-deep, #154d4c);
  border: 1.5px solid var(--teal-deep, #154d4c);
}

.handout-send-submit:hover:not(:disabled),
.handout-send-submit:focus-visible:not(:disabled) {
  background: var(--teal-vivid, #1b9baf);
  border-color: var(--teal-vivid, #1b9baf);
}

.handout-send-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.handout-send-cancel:focus-visible,
.handout-send-submit:focus-visible {
  outline: 2px solid var(--teal-vivid, #1b9baf);
  outline-offset: 3px;
}

/* Hub index */
body.rt-handout-hub .handout-hub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(38, 28, 22, 0.12);
}

body.rt-handout-hub .handout-hub-list li {
  border-bottom: 1px solid rgba(38, 28, 22, 0.12);
}

body.rt-handout-hub .handout-hub-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 1rem 0.15rem;
  text-decoration: none;
  color: var(--intro-text, #1f2724);
  transition: color 0.15s ease;
}

body.rt-handout-hub .handout-hub-list a:hover,
body.rt-handout-hub .handout-hub-list a:focus-visible {
  color: var(--teal-deep, #154d4c);
}

body.rt-handout-hub .handout-hub-list .hub-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 500;
}

body.rt-handout-hub .handout-hub-list .hub-meta {
  font-size: var(--rt-type-sans-meta);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--intro-text, #1f2724) 55%, transparent);
}

@media print {
  @page {
    size: letter;
    margin: 0.55in 0.6in;
  }

  body.rt-handout-page {
    background: #fff !important;
  }

  .handout-screen-bar,
  .skip-link,
  .handout-send-modal,
  .handout-send-btn,
  footer,
  nav,
  .userway_buttons_wrapper,
  #userwayAccessibilityIcon,
  .uwaw-widget {
    display: none !important;
  }

  .handout-sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: #fff;
  }

  .handout-check input {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .handout-lines textarea {
    background:
      repeating-linear-gradient(
        transparent,
        transparent calc(1.7em - 1px),
        rgba(38, 28, 22, 0.22) calc(1.7em - 1px),
        rgba(38, 28, 22, 0.22) 1.7em
      );
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .handout-section {
    break-inside: avoid;
  }
}
