:root {
    --site-blue: #0000ff;
    --desktop-sidebar-width: 287.5px;
    --desktop-gutter: 25px;
    --desktop-reading-width: 75ch;
    --button-highlight-green: #00853f;
    --button-highlight-ring: 0 0 0 3px #c6f9a6;
}

html.calendar-clock-refresh {
    min-height: var(--calendar-scroll-floor);
    overflow-anchor: none;
}

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

/* Confine the page's navigation layers below the modal backdrop. */
body:has(> .jqalerter-blocker) > :is(#page, #subMenusContainer) {
    isolation: isolate;
    z-index: auto;
}

/* Center on the form when it fits and keep OK reachable after scrolling a long draft. */
.contact-feedback {
    top: 0 !important;
    left: 0 !important;
    transform: translate(
        clamp(0px, calc(var(--contact-feedback-center) - 50%), calc(100vw - 100%)),
        clamp(0px, calc(var(--contact-feedback-middle) - 50%), calc(100vh - 100%))
    );
    max-width: calc(100vw - 2rem);
}

.contact-feedback .alert {
    white-space: pre-line;
}

.contact-validation-error .alert {
    color: var(--callout-red);
}

#contactConfirmationFallback:not([open]) {
    display: none;
}

#contactConfirmationFallback[open] {
    display: block;
    position: fixed;
    right: auto;
    bottom: auto;
    width: max-content;
    height: max-content;
    margin: 0;
    padding: 1px;
    border: 1px outset;
    background: #e0e0e0;
    z-index: 100;
    text-align: center;
}

#contactConfirmationFallback button {
    margin: 5px 0;
}

#contactConfirmationFallback::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

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

#contactForm .contact-actions {
    display: grid;
    justify-items: center;
    row-gap: 0.75rem;
}

/* Remove the inline baseline space even when Turnstile leaves a zero-size frame. */
#contactForm .contact-challenge {
    font-size: 0;
    line-height: 0;
}

.sidebar-share {
    display: flex;
    justify-content: center;
    margin-block: 1.5rem;
}

.col2:has(> .sidebar-share) #formCompletion {
    padding-bottom: 0;
}

.sidebar-share > .a2a_dd {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #a8ce93;
    border-radius: 0.5rem;
    background-color: #fff;
    color: #145b35;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}

.sidebar-share > .a2a_dd:hover {
    border-color: currentColor;
    background-color: #f2f9ee;
}

.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;
}

.green-action-surface {
    --green-action-edge: #064c2a;
    --green-action-depth: 0 2px 0 var(--green-action-edge);
    --green-action-pressed-depth: 0 1px 0 var(--green-action-edge);
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    max-width: 100%;
    vertical-align: baseline;
    text-align: center;
    white-space: nowrap;
    color: #fff;
    font: 700 1.5rem / 1.15 "Trebuchet MS", Arial, sans-serif;
}

.field-save-row .green-action-surface {
    /* Paint the lower edge inside the button so it ends at the input border. */
    --green-action-depth: inset 0 -2px 0 var(--green-action-edge);
    --green-action-pressed-depth: inset 0 -1px 0 var(--green-action-edge);
}

#TopButtonV, #BottomButtonV {
    --public-report-button-width: 216px;
}

.compact-report-progress {
    display: none;
}

:is(#TopButtonV, #BottomButtonV) > a:has(> .dob_arrow5) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

:is(#TopButtonV, #BottomButtonV) > a:has(> .dob_arrow5) > .mainButton1Container {
    grid-column: 2;
}

:is(#TopButtonV, #BottomButtonV) .mainButton1Image {
    display: block;
}

:is(#arrow_top, #arrow_bottom) {
    grid-column: 3;
    position: static;
    display: block;
    width: 100%;
    min-width: 0;
    height: 50px;
}

.green-action-button.mainButton1Container {
    width: var(--public-report-button-width);
}

.green-action-button .mainButton1Image {
    width: 100%;
}

/* Paired buttons follow the field's border box without changing the row layout. */
.green-action-surface::before {
    content: '';
    position: absolute;
    box-sizing: border-box;
    inset: 50% 0 auto;
    height: var(--green-action-height, max(100%, 44px));
    transform: translateY(-50%);
    border: 1px solid var(--green-action-edge);
    border-radius: 8px;
    background: linear-gradient(#147445, #086232);
    box-shadow: var(--green-action-depth);
}

.green-action-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding-inline: 0.5rem;
}

#SendButton .green-action-surface {
    display: block;
    height: 44px;
}

.green-action-button:hover .green-action-surface::before,
a:hover > .green-action-button .green-action-surface::before {
    background: linear-gradient(var(--button-highlight-green), #00743a);
    box-shadow: var(--button-highlight-ring), var(--green-action-depth);
}

.green-action-button:active .green-action-surface::before,
a:active > .green-action-button .green-action-surface::before {
    background: var(--green-action-edge);
    box-shadow: var(--green-action-pressed-depth);
}

.green-action-button[aria-disabled='true'] .green-action-surface::before {
    background: #52685a;
    border-color: #415448;
    box-shadow: none;
    cursor: wait;
}

.green-action-button:focus-visible,
a:focus-visible:has(> .green-action-button) {
    outline: none;
}

.green-action-button:focus-visible .green-action-surface::before,
a:focus-visible > .green-action-button .green-action-surface::before {
    outline: 3px solid #201080;
    outline-offset: 3px;
}

@media (forced-colors: active) {
    .green-action-button:focus-visible .green-action-surface::before,
    a:focus-visible > .green-action-button .green-action-surface::before {
        outline-color: Highlight;
    }
}

/* Keep the outline inside each row so adjacent links and submenus cannot cover it. */
#nav a:focus-visible, #subMenusContainer a:focus-visible,
#transitsMenu .cssm1 a:focus-visible {
    outline-offset: -3px;
}

#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;
}

/* 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;
}

.testimonialQuoteLeft {
    /* The opening mark needs its own line metrics when a quote fills the slide. */
    line-height: normal;
}

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

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

#mainSliderControls a:is(.bx-prev, .bx-next) {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: #16643f;
    color: #fff;
}

#mainSliderControls a:is(.bx-prev, .bx-next)::before {
    content: '';
    width: 64%;
    aspect-ratio: 1;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

#mainSliderControls a.bx-prev::before {
    transform: rotate(180deg);
}

#mainSliderControls a:is(.bx-prev, .bx-next):is(:hover, :focus-visible) {
    background-color: var(--button-highlight-green);
    box-shadow: var(--button-highlight-ring);
}

html:has(.public-reading) {
    /* Keep the reading margins aligned across pages of different lengths. */
    scrollbar-gutter: stable;
}

.public-reading {
    max-inline-size: 70rem;
    margin-inline: auto;
}

.public-reading {
    container: public-reading / inline-size;
}

.public-reading-flow {
    --reading-paragraph-gap: 1.25em;
    display: flow-root;
}

.transit-article {
    margin-block-start: 1.75rem;
}

.transit-article-heading {
    display: grid;
    justify-items: center;
    align-items: center;
    gap: 0.75rem;
    margin-block-end: 2rem;
}

.transit-article-heading h1 {
    margin: 0;
    line-height: 1.2;
    text-wrap: balance;
}

.transit-article-glyphs {
    /* Use the same local coordinates for the glyphs and their tooltip artwork. */
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transit-article-glyphs > div {
    position: static;
}

@container public-reading (inline-size >= 55rem) {
    .transit-article-heading {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .transit-article-heading h1 {
        grid-column: 2;
    }

    .transit-article-glyphs {
        justify-self: end;
    }
}

.transit-article-stats {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25em 1.5em;
    margin: 0;
    font-weight: bold;
    text-align: start;
}

.transit-article-stats dd {
    margin: 0;
}

.public-reading-flow > p {
    margin-block: var(--reading-paragraph-gap);
}

.public-reading-flow > .mainSliderContainer + p {
    margin-block-start: 0;
}

.transit-article-ratings {
    /* Keep the full-width ratings table within the space beside the floated card. */
    display: flow-root;
}

.public-reading-flow .mainSliderContainer {
    --slideshow-inline-padding: 1rem;
    --slideshow-border-width: 1px;
    box-sizing: border-box;
    position: relative;
    float: right;
    inline-size: calc(var(--slideshow-slide-width) + 2 * (var(--slideshow-inline-padding) + var(--slideshow-border-width)));
    max-inline-size: 100%;
    margin: 0 0 0.75rem 2rem;
    padding: 0.75rem var(--slideshow-inline-padding);
    border: var(--slideshow-border-width) solid #d9ebd7;
    border-radius: 0.75rem;
    background: #f7fbf4;
}

.mainSliderViewport {
    container-type: inline-size;
}

#mainSlider > .mainSliderSlide {
    display: grid;
    align-items: center;
    justify-items: start;
    inline-size: 100cqi !important;
    min-block-size: var(--slideshow-slide-height);
}

.mainSliderSlide > .greenBorder {
    inline-size: 100cqi;
}

.mainSliderContainer .bx-wrapper, .mainSliderContainer .bx-window {
    inline-size: 100% !important;
}

.public-reading-flow #mainSliderControls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-block-start: 0.5rem;
}

.public-reading-flow .mainSliderControlCont {
    float: none;
    width: auto;
}

.public-reading-flow #mainSliderNext {
    position: static;
}

@container public-reading (inline-size < 51rem) {
    .public-reading-flow {
        display: flex;
        flex-direction: column;
    }

    /* Let the preceding paragraph supply the gap inside the flex stack. */
    .public-reading-flow > p + p {
        margin-block-start: 0;
    }

    .public-reading-flow .mainSliderContainer {
        inline-size: 100%;
        margin: 0 auto 0.75rem;
        padding-block: 0.5rem;
    }

    #mainSlider > .mainSliderSlide {
        min-block-size: 0;
        align-items: start;
    }

    .mainSliderSlide > .greenBorder > div:first-child {
        line-height: 1.4 !important;
    }

    .mainSliderSlide > .greenBorder > br,
    .mainSliderSlide > .greenBorder > div:last-child br {
        display: none;
    }

    .mainSliderSlide > .greenBorder > div:last-child {
        margin-block-start: 0.25rem;
    }

    .mainSliderSlide > .greenBorder > div:last-child b::after {
        content: " · ";
    }

    .mainSliderSlide .testimonialQuoteLeft {
        font-size: 1.5em;
        vertical-align: middle;
        margin-inline-end: 0.15em;
    }

    .public-reading-flow #mainSliderControls {
        margin-block-start: 0.25rem;
    }

    @media (scripting: enabled) {
        .bx-window > #mainSlider {
            display: flex;
            align-items: flex-start;
        }

        .bx-window > #mainSlider > .mainSliderSlide {
            flex: none;
        }
    }

    /* Reorder the stack only where keyboard and reading order can follow it. */
    @supports (reading-flow: flex-visual) {
        .public-reading-flow {
            reading-flow: flex-visual;
        }

        .public-reading-flow .mainSliderContainer {
            order: 1;
            margin-block-end: 0;
        }

        .public-reading-flow > :is(.sample-report-intro, .information-page-body) {
            order: 2;
        }

        .public-reading-flow > .transit-article-ratings {
            margin-block-end: var(--reading-paragraph-gap);
        }

        .public-reading-flow > p + .sample-report-intro,
        .public-reading-flow > .information-page-body > nav:first-child > ul:first-child {
            margin-block-start: var(--reading-paragraph-gap);
        }
    }
}

/* Marketing links emit later theme rules, so the main-column scope keeps these shades. */
.sample-event {
    box-sizing: border-box;
    width: min(940px, 94%);
    margin: -0.25rem auto 1rem;
    overflow-wrap: anywhere;
    color: #202a25;
    text-align: left;
}
.sample-event > summary {
    display: table;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0.62rem 1rem;
    border-radius: 0.6rem;
    list-style: none;
    color: #145b35;
    background: #f0f7eb;
    font-weight: 700;
    cursor: pointer;
}
.sample-event > summary::before {
    content: "▸";
    display: inline-block;
    width: 1.2em;
}
.sample-event > summary::-webkit-details-marker { display: none; }
.sample-event[open] > summary::before { content: "▾"; }
.sample-event > summary:hover { background: #e0f5d4; }
.sample-event > summary:focus-visible { outline: 3px solid #201080; outline-offset: 3px; }
.sample-event-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
    gap: 1.35rem;
    align-items: center;
    margin: 0.65rem 0 0;
    padding: 1.25rem;
    border: 1px solid #c7dec1;
    border-radius: 0.8rem;
    background: #f8fbf6;
    box-shadow: 0 2px 5px #15301a0d;
}
.sample-event-card h3 {
    margin: 0 0 0.5rem;
    color: #153a28;
    font-size: 1.55rem;
}
.sample-event-card p { margin: 0.6rem 0; text-align: justify; }
.sample-event-card .sample-peak { color: #145b35; }
.sample-event-card .sample-interpretation {
    box-sizing: border-box;
    margin: 0.85rem 0 0.6rem;
    padding: 0.25rem 0 0.25rem 0.8rem;
    border-left: 3px solid #b1d8a3;
    text-align: justify;
    font-style: italic;
}
.sample-event-card .import-card {
    box-sizing: border-box;
    padding: 1rem;
    border-radius: 0.65rem;
    border: 1px solid #dbd5f0;
    background: #fff;
    color: #211839;
}
.sample-event-card .import-card h4 { margin: 0 0 0.65rem; color: #53398b; font-size: 1rem; }
.sample-event-card .import-event {
    display: block;
    padding: 0.65rem 0.85rem;
    border-inline-start: 4px solid #6a4baa;
    border-radius: 0.3rem;
    background: #f1edfb;
}
.sample-event-card .import-event > div { margin-top: 0.28rem; }
.sample-event-card .import-timezone {
    margin-bottom: 0;
    color: #53398b;
    font-size: 0.75em;
    line-height: 1.35;
    text-align: start;
}
.sample-event-card .import-timezone > span {
    display: inline-block;
    max-inline-size: 100%;
    hyphens: none;
}
@media(max-width: 720px) {
    .sample-event-card { grid-template-columns: minmax(0, 1fr); }
}

.col1 a:link.MainLinkColorStyle, .col1 a:visited.MainLinkColorStyle, .sample-report-title {
    color: var(--link-magenta);
}

.sample-report-section {
    --sample-action-gap: 1.25rem;
}

.public-reading-flow > .sample-report-intro {
    margin-block-end: 0;
}

#TopButtonV {
    padding-block: var(--sample-action-gap);
}

.sample-report-title {
    margin-block-start: 0;
}

#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);
    line-height: 1.25;
}

: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;
    }

    #mainSlider {
        /* The carousel already jumps to the new quote when reduced motion is enabled. */
        transition-property: none;
    }
}

@media (scripting: enabled) {
    .mainSliderViewport {
        overflow: hidden;
    }

    /* Reserve space for the tallest wrapped quote while the asynchronous slider loads. */
    .mainSliderViewport > #mainSlider {
        display: grid;
    }

    .mainSliderViewport > #mainSlider > .mainSliderSlide {
        grid-area: 1 / 1;
    }

    .mainSliderViewport > #mainSlider > .mainSliderSlide:not([data-initial-testimonial]) {
        visibility: hidden;
    }

    #mainSliderPager {
        min-height: 1lh;
    }

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

@media (width < 1250px) {
    #page {
        width: 100%;
        min-width: 480px;
        max-width: 100%;
    }

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

    .site-header {
        container-type: inline-size;
    }

    #header {
        /* Each length uses the same scale as the desktop artwork, including the backdrop. */
        --banner-unit: calc(min(92cqw, var(--banner-design-width) * 1px) / var(--banner-design-width));
        position: relative;
        float: none;
        height: calc(var(--banner-design-height) * var(--banner-unit)) !important;
        background-position: center top;
        background-repeat: no-repeat;
        background-size: calc(1261 * var(--banner-unit)) auto;
    }

    #header > :is(.banner, .subbanner) {
        display: block;
        width: calc(var(--banner-design-width) * var(--banner-unit));
        height: auto;
        margin-inline: auto;
    }

    #header > .subbanner {
        /* Match the desktop subtitle's anchor, including its overlap with the wordmark. */
        position: absolute;
        top: calc(139 * var(--banner-unit));
        inset-inline: 0;
    }

    #header > br {
        display: none;
    }
}

@media (min-width: 1250px) {
    #page {
        width: 100%;
        min-width: 1250px;
        max-width: none;
    }
}

.site-navigation {
    container: top-navigation / inline-size;
}

.site-navigation + br {
    display: none;
}

#nav {
    display: flex;
    flex-wrap: wrap;
    width: 100% !important;
    box-sizing: border-box;
}

#nav > li {
    flex: 1 1 auto;
    float: none;
}

#nav > li > .mainMenuHead {
    float: none;
    text-align: center;
}

@media (width > 900px) {
    #page {
        --desktop-content-width: 100%;
        --desktop-content-baseline: calc(1250px - var(--desktop-sidebar-width) - 2 * var(--desktop-gutter));
    }

    .site-header {
        background: #000;
    }

    #header {
        float: none;
        margin-inline: auto;
    }

    .threecol .colmid, .threecol .colleft {
        float: none;
        right: auto;
    }

    .threecol .colleft {
        display: grid;
        grid-template-columns: var(--desktop-sidebar-width) minmax(0, 1fr);
    }

    .threecol .colleft > br {
        display: none;
    }

    .threecol .col1, .threecol .col2, .threecol .col3 {
        float: none;
        left: auto;
        width: auto;
        min-width: 0;
        box-sizing: border-box;
        padding-inline: var(--desktop-gutter);
    }

    .threecol .col1, .threecol .col3 {
        grid-column: 2;
        background: white;
    }

    .threecol .col1:not(:has(> .site-navigation)), .threecol .col2 {
        padding-top: var(--desktop-gutter);
    }

    .threecol .col2 {
        grid-area: 1 / 1 / span 2;
    }

    #transitsMenu {
        position: relative;
    }

    #transitsMenu > .cssm1 {
        /* Keep the menu tile on its original line when switching to a flow layout. */
        --sidebar-menu-top: calc(1lh - var(--desktop-gutter) + var(--menu-base-top));
        top: var(--sidebar-menu-top);
    }

    .site-navigation {
        inset: auto !important;
        margin-inline: calc(-1 * var(--desktop-gutter));
    }

    #nav {
        position: relative;
        inset: auto;
    }

    .col1 :is(.report_frame, .checkout_frame, .flowform, .report-summary, .report-downloads) {
        box-sizing: border-box;
        width: var(--desktop-content-width);
    }

    #page .flowform > form {
        /* Keep the controls grouped as the outline widens. */
        max-inline-size: calc(var(--desktop-content-baseline) - 2 * var(--report-frame-border-width));
        margin-inline: auto;
    }

    .report-summary > table {
        max-inline-size: var(--desktop-content-baseline);
        margin-inline: auto;
    }

    .col1 .formhelptext,
    .col1 .report-downloads > .maintextlarge,
    .event_page .calPage .maintextlarge {
        max-inline-size: var(--desktop-reading-width);
    }

    .event_page .calPage .maintextlarge {
        margin-inline: auto;
    }

    #transitsMenu:has(+ .sidebar-share) {
        display: flow-root;
    }

    #transitsMenu:has(+ .sidebar-share) > .cssm1 {
        position: relative;
        float: none;
        top: auto;
        width: max-content;
        margin-block-start: var(--sidebar-menu-top, var(--menu-base-top));
    }

    #transitsMenu:has(+ .sidebar-share) .cssm1 > ul {
        position: absolute;
        top: 0;
    }

    #transitsMenu:has(+ .sidebar-share) .cssm1:is(:hover, :focus-within) > .cssm3 {
        display: block;
        visibility: hidden;
    }
}

@media (max-width: 900px) {
    .col1 {
        --compact-page-title-gap: 1.375rem;
    }

    /* Let the title set the gaps instead of the legacy blank lines. */
    .page-menu-separator:has(~ h1, ~ center > h1, + .compact-report-progress:not(:empty)),
    .col1 > h1 + br,
    .col1 center:has(> h1) + br,
    .col1 :is(center, .flowform) > h1 + br {
        display: none;
    }

    .col1 > h1,
    .col1 :is(center, .flowform) > h1 {
        margin-block: var(--compact-page-title-gap);
    }

    .col1 > h1 + p {
        margin-block-start: 0;
    }

    .compact-report-progress {
        display: block;
        background: #fff;
    }

    .compact-report-progress:not(:empty) {
        padding-block-start: var(--compact-column-padding);
    }

    .compact-report-progress #formCompletion {
        padding-block-end: 0;
        background: #fff;
    }

    .transit-article {
        --compact-transit-title-gap: 1.125rem;
        margin-block-start: var(--compact-transit-title-gap);
    }

    .transit-article-heading {
        margin-block-end: var(--compact-transit-title-gap);
    }

    .flowform > h1 + br + img {
        display: block;
    }

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

    .threecol .colleft {
        --compact-column-padding: 1rem;
        display: flex;
        flex-direction: column;
    }

    .threecol .colleft:has(> .col1 > :is(.site-navigation, .compact-report-progress:not(:empty))) > br {
        display: none;
    }

    .threecol .col1, .threecol .col2, .threecol .col3 {
        float: none;
        position: relative;
        left: auto;
        right: auto;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: var(--compact-column-padding);
    }

    .threecol .col1 {
        order: 1;
    }

    .threecol .col1:has(> :is(.site-navigation, .compact-report-progress:not(:empty))) {
        padding-block-start: 0;
    }

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

    .threecol .col3 {
        order: 3;
    }

    .threecol .col3:empty {
        display: none;
    }

    .site-navigation {
        inset: auto !important;
        margin-inline: calc(-1 * var(--compact-column-padding));
    }

    #nav {
        position: static;
        left: auto;
        margin: 0;
    }

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

    .report-summary {
        --desktop-content-width: 100%;
        box-sizing: border-box;
    }

    .report-summary td {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .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:last-child {
        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%;
    }

    .flowform #paymentForm #PaymentNextButton .dob_arrow3 {
        width: 1em;
    }

    .formhelptext {
        width: 90%;
    }

    .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%;
    }

    /* The top Transits link serves the stacked layout, where flyouts overlap. */
    #transitsMenu, .sidebar-menu-spacer {
        display: none;
    }
}

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

@media (600px < width < 1250px) {
    /* A short arrow base leaves room for fields beside the sidebar on tablets. */
    #locationForm .location-save-cell {
        min-width: 0;
    }

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

@media (900px < width < 1250px) {
    .flowform #paymentForm :is(.payment-action-cell, .payment-action-slot) {
        width: auto;
        min-width: 0;
    }
}

@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 .green-action-surface {
        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;
    }
}

@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;
    }

    .flowform #StripeReportButton.green-action-button {
        /* The scaled arrow needs little layout space beside the single-line label. */
        --mobile-action-arrow-width: 0.25rem;
        gap: 0.375rem;
        width: 100%;
    }

    #StripeReportButton .green-action-surface {
        font-size: 1.125rem;
    }

    #StripeReportButton .green-action-label {
        padding-inline: 0.25rem;
    }
}

@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;
    }
}

.flowform:has(> #caldurationForm) {
    /* The sidebar can narrow the frame even as the viewport grows. */
    container: duration / inline-size;
}

#caldurationForm {
    --duration-action-width: 150px;
    --duration-price-expansion: calc(max(0, var(--duration-price-characters) - 6) * 0.75rem);
}

#caldurationForm :is(#NextButton, .nextButton1Image, .nextButtonWithArrowLabel, .nextButton1Label) {
    width: var(--duration-action-width);
}

#caldurationForm :is(.nextButtonWithArrowLabel, .nextButton1Label) {
    left: 0;
    text-align: center;
}

/* The arrow is stretched to the frame edge without taking up that width in the table. */
#caldurationForm .dob_arrow3 {
    width: 1em;
}

.duration-price-amount, .payment-price-amount {
    font-family: Consolas, "Liberation Mono", "Courier New", monospace;
}

#caldurationForm .duration-price-amount {
    justify-self: end;
    text-align: right;
}

#caldurationForm .duration-savings {
    justify-self: start;
    padding: 0.3em 0.65em;
    border-radius: 1em;
    background: #e6f4eb;
    color: #145b35;
    font-size: clamp(0.75rem, 2.6vw, 0.9rem);
    line-height: 1.15;
}

#caldurationForm .duration-savings-best {
    background: #167243;
    color: #fff;
}

@container duration (inline-size >= 640px) {
    #caldurationForm > table {
        /* Longer prices use the leading table space to preserve the action column. */
        margin-inline: max(0px, calc(min(6%, 54px) - var(--duration-price-expansion))) auto;
    }

    /* Reserve the height of the action and its inline artwork in every row. */
    #caldurationForm > table > tbody > tr {
        height: 59px;
    }

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

    /* Keep the action in one column as it moves from row to row. */
    #caldurationForm:has(.duration-price-amount:not(:empty)) td:is(.offer2, .offer2_selected) {
        --duration-option-width: calc(375px + var(--duration-price-expansion));
        width: var(--duration-option-width);
        min-width: var(--duration-option-width);
    }

    #caldurationForm:has(.duration-price-amount:not(:empty)) .price2textpos {
        display: grid;
        grid-template-columns: calc(4.25em + var(--duration-price-expansion)) max-content;
        align-items: center;
    }

    #caldurationForm .duration-price-amount {
        margin-inline-end: 0.5rem;
    }
}

@container duration (inline-size < 640px) {
    /* One action below the choices avoids inserting a gap in the stacked list. */
    #caldurationForm:has(.duration-price-amount) {
        position: relative;
        padding-block-end: 3.75rem;
    }

    #caldurationForm #NextButton {
        position: absolute;
        inset-block-end: 0;
        inset-inline-start: 0.5rem;
    }

    #caldurationForm:has(.duration-price-amount) :is(table, tbody, tr, td) {
        display: block;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    #caldurationForm:has(.duration-price-amount) table {
        border-spacing: 0;
        margin-inline: 0.5rem;
    }

    #caldurationForm:has(.duration-price-amount) td {
        padding-bottom: 0.75rem;
    }

    #caldurationForm:has(.duration-price-amount:not(:empty)) td:is(.offer2, .offer2_selected) {
        font-size: clamp(1rem, 4.1vw, 1.4rem);
        height: auto;
    }

    #caldurationForm:has(.duration-price-amount:not(:empty)) .offerpricecontainer {
        display: grid;
        --duration-price-width: max(3.7em, calc(var(--duration-price-characters) * 0.6em));
        grid-template-columns: minmax(0, 1fr) var(--duration-price-width);
        align-items: center;
        gap: 0.4rem;
        padding: 0.3rem 0 0 0.5rem;
    }

    #caldurationForm:has(.duration-price-amount:not(:empty)) .offer2textpos {
        position: static;
        white-space: normal;
    }

    #caldurationForm:has(.duration-price-amount:not(:empty)) .price2textpos {
        display: contents;
    }

    @media (width > 375px) {
        #caldurationForm:has(.duration-price-amount:not(:empty)):has(.duration-savings) .offerpricecontainer {
            grid-template-columns: minmax(0, 1fr) var(--duration-price-width) 4.75rem;
        }
    }
}

@media (max-width: 375px) {
    /* Reserve a second line for badges so the labels and prices have room. */
    #caldurationForm:has(.duration-savings) .offerpricecontainer {
        grid-template-rows: auto 1.4rem;
    }

    #caldurationForm .duration-savings {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
}

#nav > li > .mainMenuHead[aria-current="page"] {
    display: block;
    padding: 10px 20px;
    color: #fff;
    background-color: #c000c0;
}

@container top-navigation (inline-size < 42rem) {
    #nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #nav > li {
        display: grid;
    }

    #nav > li:nth-child(3n) {
        border-inline-end: 1px solid #a4d766;
    }

    #nav > li > .mainMenuHead:is(a, [aria-current="page"]) {
        display: grid;
        align-content: center;
        min-inline-size: 0;
        padding-inline: 0.5rem;
        overflow-wrap: anywhere;
    }

    #nav > li > .mainMenuHead:is(.mainMenuParentBtn, .mainMenuParentBtnFocused) {
        padding-inline-end: 1rem;
        background-position: right 2px center;
    }
}

.planettable {
    box-sizing: border-box;
    inline-size: calc(var(--desktop-sidebar-width) - 2 * var(--desktop-gutter));
    margin-inline: auto;
}

.planettable-clock {
    box-sizing: border-box;
    width: 100%;
    padding: 0.1rem 0.65rem 0.85rem;
    text-align: center;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

#planetTableDate, #planetTableTimezone {
    display: block;
}

#planetTableDate {
    font-weight: bold;
}

#planetTableTimezone, .planettable-clock-separator {
    color: #28593b;
}

#planetTableTimezone {
    font-size: 0.75em;
}

.planettable-format {
    box-sizing: border-box;
    min-inline-size: 0;
    max-inline-size: 100%;
    margin: 0.5rem 0 0;
    padding: 0 0.4rem 0;
    border: 0;
    text-align: center;
}

.planettable-format legend {
    margin-inline: auto;
    padding: 0;
    color: var(--site-blue);
    font-weight: bold;
}

.planettable-format > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.8rem;
}

.planettable-format label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.planettable-format input {
    margin: 0;
    accent-color: #00752f;
}
