.screen-reader-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Keep the existing contact dialog aligned with its form, independent of page width. */
.jqalert-container.contact-feedback {
    top: var(--contact-feedback-middle) !important;
    left: var(--contact-feedback-center) !important;
    transform: translate(-50%, -50%);
    max-width: calc(100vw - 2rem);
}

#contactForm #comment, #emailForm #email_body {
    box-sizing: content-box;
    max-width: calc(100% - 16px);
    min-height: 15lh;
    resize: vertical;
    -webkit-hyphens: none;
    hyphens: none;
}

.birthplace-editor {
    display: inline-block;
    box-sizing: content-box;
    width: 211px;
    min-height: 1lh;
    padding: 2px;
    border: 6px solid #00c957;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    font: 14pt Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    vertical-align: middle;
}

.birthplace-editor:focus {
    border-color: #ff7f00;
    outline: none;
}

/* Keep keyboard focus visible without changing the established pointer styling. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, [role='button']:focus-visible {
    outline: 3px solid #000080;
    outline-offset: 3px;
}

/* Keep skip-link focus on the content without framing the entire page. */
#main-content:focus {
    outline: none;
}

#paymentForm .payment-choice:has(input:focus-visible) {
    outline: 3px solid #000080;
    outline-offset: 3px;
}

.flowform input.styled[type='radio'] {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.flowform td:has(input.styled[type='radio']:focus-visible) {
    outline: 3px solid #000080;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 1rem;
    padding: 0.75rem 1rem;
    background: white;
    color: #000080;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* Preserve the magenta/green palette while making public text readable on white. */
.col1 a.textlink:link, .col1 a.textlink:visited, .col2 a.textlink:link,
.col2 a.textlink:visited {
    color: var(--link-magenta);
}

.col1 a.textlink:hover, .col2 a.textlink:hover {
    color: #800080;
}

.testimonialQuoteLeft, .testimonialQuoteRight {
    color: #3169B5;
}

#mainSliderPager, a:link#mainSliderPager, a:visited#mainSliderPager,
a:active#mainSliderPager {
    color: #606060;
}

a:hover#mainSliderPager, .mainSliderPagerActive {
    color: var(--callout-red);
}

/* Marketing links emit later theme rules, so the main-column scope keeps these shades. */
.col1 a:link.MainLinkColorStyle, .col1 a:visited.MainLinkColorStyle, .sample-report-title {
    color: var(--link-magenta);
}

#addBookmarkContainer, #addBookmarkContainer a {
    color: var(--callout-red);
}

.col1 a:hover.MainLinkColorStyle {
    color: #800080;
}

#addBookmarkContainer a:hover {
    color: #A40000;
}

.col1 h1.flow_title1 {
    color: var(--option-green);
}

:root {
    --link-magenta: #A000A0;
    --option-green: #007A35;
    --option-orange: #B85A00;
    --callout-red: #BD0000;
}

.flowform td.offer2, #paymentForm td.offer2 {
    color: var(--option-green);
}

.flowform td.offer2:hover, .flowform td.offer2_selected,
#paymentForm td.offer2_selected,
#paymentForm td.offer2:has(.payment-option-label:hover) {
    color: var(--option-orange);
}

#paymentForm td.offer2:not(:has(.payment-option-label:hover)) {
    color: var(--option-green);
}

/* The same nested menu that opens on hover must also open for keyboard focus. */
.cssm1:focus-within > ul,
.cssm1 ul li:focus-within > ul {
    display: block;
}

.cssm1:focus-within .cssm3 {
    display: none;
}

.cssm1 ul li:focus-within > ul {
    position: absolute;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Reserve widget geometry before initialization; script-free readers retain every slide. */
@media (scripting: enabled) {
    .mainSliderViewport {
        height: var(--slideshow-slide-height);
        overflow: hidden;
    }

    #mainSliderPager {
        min-height: 1lh;
    }

    #mainSliderPrev, #mainSliderNext {
        aspect-ratio: 1;
    }
}

/* Keep the desktop layout intact; smaller screens use the available document width. */
@media (max-width: 1250px) {
    #page {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    #header, #footer {
        width: 100%;
    }

    #header .banner, #header .subbanner {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 900px) {
    #header {
        height: auto !important;
    }

    #header .subbanner {
        top: 0;
        width: 81%;
        display: block;
        margin: 0 auto;
    }

    .colmask, .threecol .colmid, .threecol .colleft {
        float: none;
        position: static;
        left: auto;
        right: auto;
        width: 100%;
        background: white;
    }

    .threecol .colleft {
        display: flex;
        flex-direction: column;
    }

    .threecol .col1, .threecol .col2, .threecol .col3 {
        float: none;
        position: relative;
        left: auto;
        right: auto;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 1rem;
    }

    .threecol .col1 {
        order: 1;
    }

    .threecol .col2 {
        order: 2;
        background: #C6F988;
    }

    .threecol .col3 {
        order: 3;
    }

    .site-navigation {
        left: auto !important;
        top: auto !important;
        width: 100%;
    }

    #nav {
        position: static;
        left: auto;
        margin: 0;
        width: 100% !important;
        display: flex;
        flex-wrap: wrap;
        box-sizing: border-box;
    }

    #nav > li {
        float: none;
    }

    .mainSliderContainer {
        float: none;
        width: min(300px, 100%);
        margin: 0 auto 1.5rem;
    }

    .mainSliderContainer .bx-wrapper, .mainSliderContainer .bx-window {
        max-width: 100% !important;
    }

    .report_frame, .checkout_frame, .flowform {
        max-width: 100%;
        box-sizing: border-box;
    }

    .report-downloads {
        box-sizing: border-box;
        padding-inline: 0;
    }

    .report-downloads > .maintextlarge {
        width: 100% !important;
    }

    .report-downloads > table {
        border-spacing: 0;
    }

    .col1 img, .col2 img {
        max-width: 100%;
    }

    .col1 input, .col1 select, .col1 textarea {
        max-width: 100%;
        box-sizing: border-box;
    }

    .col1 textarea {
        width: 100%;
    }

    .flowform #StripeReportButton {
        --mobile-action-arrow-width: 3rem;
        --mobile-action-gap: 0.75rem;
        --mobile-action-button-width: calc(100% - var(--mobile-action-arrow-width) - var(--mobile-action-gap));
        display: flex;
        width: calc(100% - var(--mobile-action-gap));
        gap: var(--mobile-action-gap);
    }

    .flowform #paymentForm #StripeReportButton .nextButton1Image {
        flex: 1;
        min-width: 0;
        width: var(--mobile-action-button-width);
    }

    .flowform #paymentForm #StripeReportButton .nextButton1Label {
        width: var(--mobile-action-button-width);
        white-space: normal;
    }

    .flowform #StripeReportButton > span {
        display: block;
        flex: 0 0 var(--mobile-action-arrow-width);
        width: var(--mobile-action-arrow-width);
    }

    /* A bounded base box avoids scroll overflow when the arrow is visually scaled down. */
    .flowform #paymentForm #StripeReportButton .dob_arrow3 {
        width: 100%;
    }

    .formhelptext {
        width: 90%;
    }

    #arrow_top, #arrow_bottom {
        position: static;
        display: block;
        width: 100%;
        height: 35px;
        margin-top: 0.5rem;
    }

    .col1 h1 {
        font-size: clamp(1.4rem, 5vw, 2rem);
        line-height: 1.25;
    }

    .cssm1:not(.weekselect):not(.monthselect) {
        position: relative;
        left: auto;
        top: auto;
        float: none;
        max-width: 100%;
    }

    #transitsMenu .cssm1 ul {
        width: 100%;
        left: auto;
        top: auto;
    }

    #transitsMenu .cssm1 li > ul {
        position: static !important;
        margin: 0;
    }

    #transitsMenu .cssm1 .nobr {
        white-space: normal;
    }

    #transitsMenu .cssm1 .hh {
        min-height: 25px;
        height: auto;
    }
}

#locationForm .location-save-cell {
    min-width: 300px;
}

@media (600px < width <= 900px) {
    /* The arrow scales to the frame edge, so a short base avoids tablet overflow. */
    #locationForm .location-save-cell {
        min-width: 0;
    }

    .field-save-row #NextButton img[src$="/red_arrow_right.png"] {
        width: 1em;
    }
}

@media (width > 600px) {
    .field-save-row > td {
        vertical-align: middle;
    }

    /* Use the field's own height without extra descender space or a blank line. */
    .field-save-row > td:has(> input, .birthplace-editor) {
        line-height: 0;
    }

    .field-save-row > td > input {
        vertical-align: middle;
    }

    #dobForm .field-save-row .dob_datepicker {
        /* The legacy inline offset still applies in the stacked layout. */
        position: static !important;
    }

    .field-save-row > td > br {
        display: none;
    }

    .field-save-row #NextButton {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .field-save-row #NextButton > span {
        flex: none;
    }

    /* Clear the shared helper's inline arrow positioning only in these rows. */
    .field-save-row #NextButton > .nextButtonWithArrowImg {
        position: static !important;
    }

    .field-save-row #NextButton > span:last-child {
        inset: auto !important;
    }

    .field-save-row #NextButton img {
        position: static;
        display: block;
    }

    .field-save-row #NextButton > .nextButtonWithArrowLabel {
        inset-block: 0;
        display: flex;
        align-items: center;
    }

    .field-save-row #NextButton .nextButton1Label {
        position: static;
        margin-inline-start: 17px;
    }

    /* Let the birthplace editors determine row height even beside the taller arrow. */
    #locationForm #NextButton {
        margin-block: -1lh;
    }

    /* Match the duration label's center while keeping the button and arrow together. */
    #caldurationForm #NextButton {
        top: 7px;
    }
}

@media (max-width: 600px) {
    .flowform table, .flowform tbody, .flowform tr, .flowform td {
        display: block;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .flowform table {
        border-spacing: 0;
        margin-inline: 0.5rem;
    }

    .flowform td {
        padding-bottom: 0.75rem;
    }

    .flowform #paymentForm {
        margin: 0 0.5rem;
    }

    .flowform #paymentForm .payment-action-cell {
        padding: 0 0 0.75rem;
    }

    .flowform #paymentForm .payment-option-header {
        padding-right: 0;
    }

    .flowform #paymentForm td.offer2, .flowform #paymentForm td.offer2_selected {
        font-size: clamp(1rem, 4.5vw, 1.6rem);
    }

    .flowform #paymentForm .payment-action-slot {
        width: 100%;
        max-width: 100%;
    }

    .flowform #paymentForm .payment-fields {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .flowform #paymentForm .payment-fields-clip {
        min-width: 0;
    }

    .flowform #stripe-payment-element iframe {
        max-width: 100%;
    }

    .flowform #paymentForm #StripeReportButton .nextButton1Label {
        font-size: 1rem;
        white-space: normal;
    }
}

@media (max-width: 360px) {
    #caldurationForm td:is(.offer2, .offer2_selected) {
        font-size: 1rem;
        height: auto;
    }

    #caldurationForm .offerpricecontainer {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        column-gap: 0.5em;
        padding-inline-start: 10px;
    }

    #caldurationForm .offer2textpos, #caldurationForm .price2textpos {
        position: relative;
        left: auto;
    }
}
