/* Outpatient referral form; shared pages and other program forms are untouched. */
.referralFormPage { background: #f4f6f3; color: #203852; font-size: 16px; line-height: 1.6; }
.referralFormPage * { box-sizing: border-box; }
.referralFormPage [hidden] { display: none !important; }
.referralFormPage p, .referralFormPage label, .referralFormPage legend,
.referralFormPage h1, .referralFormPage h2, .referralFormPage h3,
.referralFormPage a, .referralFormPage button, .referralFormPage dd { overflow-wrap: anywhere; }
.referralFormPage p { font-size: 16px; line-height: 1.7; margin: 0 0 16px; }
.referralFormPage a { color: #24595c; text-decoration: underline; text-underline-offset: 3px; }
.referralFormPage h2 { border: 0; color: #203852; font-size: 30px; font-weight: 700; line-height: 1.25; margin: 0 0 14px; padding: 0; text-transform: none; }
.referralFormPage h3 { color: #203852; font-size: 21px; font-weight: 700; line-height: 1.4; margin: 0 0 12px; }
.rfShell { max-width: 980px; }
.rfHero { background: #203852; color: #fff; padding: 36px 0; }
.rfHero h1 { color: #fff; font-size: 46px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.15; margin: 0 0 16px; }
.rfHero a, .rfHero a:visited { color: #fff; }
.rfHero a:hover { color: #eac678; }
.rfBackLink { display: inline-block; font-size: 14px; margin-bottom: 24px; }
.referralFormPage .rfKicker { color: #24595c; font-size: 14px; font-weight: 700; letter-spacing: 1.3px; line-height: 1.5; margin: 0 0 10px; text-transform: uppercase; }
.rfHero .rfKicker { color: #cfe0dc; }
.rfHero > div > p:not(.rfKicker) { font-size: 20px; }
.rfHelp { align-items: baseline; border-left: 3px solid #d6a84b; display: flex; flex-wrap: wrap; font-size: 14px; gap: 6px 14px; margin-top: 24px; padding-left: 16px; }
.rfBody { padding-top: 28px; padding-bottom: 48px; }
.rfIntro { max-width: 800px; }
.rfProgress { margin: 26px 0 20px; }
.rfProgress ol { display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); list-style: none; margin: 0 0 12px; padding: 0; }
.rfProgress button { align-items: center; background: #fff; border: 1px solid #c7d5ce; border-radius: 5px; color: #203852; display: flex; flex-direction: column; font-family: inherit; font-size: 14px; gap: 6px; height: 100%; line-height: 1.4; min-height: 78px; padding: 10px 8px; width: 100%; }
.rfProgress button span { align-items: center; background: #e4ece8; border-radius: 50%; display: inline-flex; height: 24px; justify-content: center; width: 24px; }
.rfProgress button[aria-current="step"] { background: #24595c; border-color: #24595c; color: #fff; font-weight: 700; }
.rfProgress button[aria-current="step"] span { background: #fff; color: #24595c; }
.rfProgress button:hover { border-color: #203852; }
.rfProgress p { color: #52636a; font-size: 14px; margin: 0; }
#rf-form { background: #fff; border: 1px solid #d7e1dc; border-radius: 8px; padding: 36px; }
.rfStep + .rfStep { margin-top: 36px; }
.rfProgress:not([hidden]) + noscript + #rf-form .rfStep { margin-top: 0; }
.rfStepHeading { border-bottom: 1px solid #e0e7e3; margin-bottom: 26px; padding-bottom: 10px; }
.rfStepHeading > p:last-child { color: #52636a; }
.rfGrid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rfGrid > * { min-width: 0; }
.rfWide { grid-column: 1 / -1; }
.rfField > label { display: block; font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.rfRequired { color: #52636a; font-size: 14px; font-weight: 400; }
.referralFormPage .rfHint { color: #52636a; font-size: 14px; line-height: 1.55; margin: 0 0 10px; }
.rfControl { background: #fff; border: 1px solid #81949e; border-radius: 4px; box-shadow: none; color: #203852; display: block; font-family: inherit; font-size: 16px; line-height: 1.5; min-height: 48px; padding: 11px 12px; width: 100%; }
select.rfControl { padding-right: 28px; }
textarea.rfControl { min-height: 110px; resize: vertical; }
input[type="file"].rfControl { font-size: 14px; padding: 12px 8px; }
.rfControl:focus { border-color: #24595c; }
.rfChoiceField { border: 0; margin: 0; min-width: 0; padding: 0; }
.rfChoiceField legend { border: 0; color: #203852; font-size: 16px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; width: 100%; }
.rfChoices { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rfChoice { align-items: flex-start; background: #fafbf9; border: 1px solid #c7d5ce; border-radius: 5px; cursor: pointer; display: flex; font-size: 16px; font-weight: 400; gap: 12px; line-height: 1.5; margin: 0; min-height: 48px; padding: 13px; }
.rfChoice:hover { background: #edf2ef; border-color: #2f6f73; }
.rfChoice:has(input:checked) { background: #e4ece8; border-color: #24595c; }
.rfChoice input { accent-color: #24595c; flex: 0 0 20px; height: 20px; margin: 2px 0 0; position: static; width: 20px; }
.rfChoice span { min-width: 0; }
.rfReasonGroup { border: 1px solid #c7d5ce; border-radius: 5px; margin-top: 12px; padding: 16px; }
.rfReasonGroup summary { cursor: pointer; font-size: 16px; font-weight: 700; min-height: 32px; }
.rfReasonGroup[open] summary { margin-bottom: 14px; }
.rfReasonCount { color: #24595c; font-size: 14px; font-weight: 400; }
.rfActions { align-items: center; border-top: 1px solid #e0e7e3; display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; margin-top: 32px; padding-top: 24px; }
.rfButton { border: 2px solid transparent; border-radius: 5px; cursor: pointer; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.5; max-width: 100%; min-height: 48px; padding: 12px 24px; white-space: normal; }
.rfPrimary { background: #2f6f73; color: #fff; }
.rfPrimary:hover { background: #24595c; }
.rfSecondary { background: #fff; border-color: #2f6f73; color: #24595c; margin-right: auto; }
.rfSecondary:hover { background: #edf2ef; }
.rfButton:disabled { cursor: wait; opacity: 0.7; }
.referralFormPage .rfPrivacyNote { color: #52636a; font-size: 14px; margin: 20px 0 0; }
.referralFormPage a:focus-visible, .referralFormPage button:focus-visible,
.referralFormPage input:focus-visible, .referralFormPage select:focus-visible,
.referralFormPage textarea:focus-visible, .referralFormPage summary:focus-visible { outline: 3px solid #d6a84b; outline-offset: 3px; }
.rfStep h2:focus, .rfErrors:focus { outline: 3px solid #d6a84b; outline-offset: 5px; }
.rfErrors { background: #fff4f1; border: 2px solid #a23728; border-radius: 5px; color: #84291e; margin: 0 0 26px; padding: 20px; }
.rfErrors p { font-weight: 700; }
.rfErrors ul { margin: 0; padding-left: 20px; }
.rfErrors button { background: none; border: 0; color: #84291e; font: inherit; padding: 6px 0; text-align: left; text-decoration: underline; }
.rfControl[aria-invalid="true"] { border: 2px solid #a23728; }
.rfReview { border-top: 1px solid #d7e1dc; margin-top: 4px; padding-top: 24px; }
.rfReview details { border: 1px solid #d7e1dc; border-radius: 5px; margin-top: 16px; padding: 18px; }
.rfReview summary { cursor: pointer; font-size: 17px; font-weight: 700; }
.rfEdit { background: #fff; border: 0; color: #24595c; font: inherit; margin: 8px 0 12px; min-height: 44px; padding: 6px 0; text-decoration: underline; }
.rfReview dl { margin: 0; }
.rfReview dl > div { border-top: 1px solid #e4eae6; display: grid; gap: 6px 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); padding: 10px 0; }
.rfReview dt { font-size: 14px; font-weight: 400; }
.rfReview dd { font-size: 16px; margin: 0; white-space: pre-wrap; }
.rfNextSteps, .rfNotice { background: #edf2ef; border-left: 4px solid #2f6f73; padding: 22px; }
.rfNextSteps ul { padding-left: 22px; }
.rfNextSteps li { margin-bottom: 8px; }
@media (max-width: 767px) {
    .rfProgress ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rfProgress button { flex-direction: row; gap: 8px; min-height: 56px; text-align: left; }
    .rfProgress button span { flex: 0 0 24px; }
    #rf-form { padding: 26px; }
    .rfGrid { gap: 22px; grid-template-columns: minmax(0, 1fr); }
    .rfChoices { grid-template-columns: minmax(0, 1fr); }
    .rfHero h1 { font-size: 38px; }
}
@media (max-width: 479px) {
    .rfProgress ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #rf-form { padding: 22px 16px; }
    .referralFormPage h2 { font-size: 26px; }
    .rfReview details { padding: 14px; }
    .rfReview dl > div { grid-template-columns: minmax(0, 1fr); }
    .rfButton { padding: 12px 16px; }
    .rfNextSteps { padding: 18px; }
}
