#mobileNav,
#mobileTopNav {
    display: none;
}

#mobileSearchForm {
    display: none;
}

.hidden {
    display: none !important;
}

@media screen and (max-width: 1000px) {

    html {
        font-family: arial, sans-serif;
        font-size: 17px;
        line-height: 1.55;
        scroll-snap-type: y proximity;
    }

    div#content,
    div#copyboard {
        font-size: 1rem;
        line-height: 1.55;
    }

    #dashboard:is(:has(.columnRow), :has(.projectRow)) > h1,
    #dashboard:is(:has(.columnRow), :has(.projectRow)) > main > h1:first-child {
        font-size: clamp(1.85rem, 5.5vw, 2.35rem);
        line-height: 1.2;
    }

    #dashboard h2,
    #dashboard:not(:has(.columnRow)):not(:has(.projectRow)) > h1 {
        font-size: clamp(1.85rem, 5.5vw, 2.35rem);
        line-height: 1.2;
    }

    #copyboard h1,
    #copyboard h2 {
        font-size: clamp(1.85rem, 5.5vw, 2.35rem);
        line-height: 1.2;
    }

    #dashboard h3 {
        font-size: clamp(1.35rem, 4.2vw, 1.55rem);
        line-height: 1.3;
    }

    #dashboard h4 {
        font-size: 1rem;
        line-height: 1.35;
    }

    #dashboard .projectRow,
    #dashboard .projectRow2,
    #dashboard .projectCopyRow,
    #dashboard .copyRow {
        font-size: 1.05rem;
        line-height: 1.6;
    }

    a.hover {
        text-decoration: none !important;
    }

    div#mainContainer div.ddFm {
        padding-bottom: 0;
    }

    body {
        #header {
            display: flex;
            flex-direction: row;

            #mobileTopNav {
                display: block;
                color: white;
                font-family: 'Times New Roman', Times, serif;
                text-align: center;
                align-content: center;
                line-height: 35px;

                .navTop {
                    font-size: 25px;
                }

                .navBottom {
                    font-size: 30px;
                }
            }
        }

        #topNav {
            display: none;
        }

        width: 100%;

        #mobileNav {
            display: grid;
            top: 0;
            left: 0;
            width: 100%;
            font-size: 16px;
            line-height: 18px;

            .backdrop {
                position: absolute;
                top: 0;
                background: black;
                height: 100%;
                width: 100%;
                z-index: 99;
                display: inline;
                opacity: 75%;
                transition: 400ms;

                #mobileCloseButton {
                    position: absolute;
                    top: 15px;
                    left: 15px;
                    background-color: #234A5b;
                    font-weight: bolder;
                    border: none;
                    height: 25px;
                    width: 25px;
                    border-radius: 15px;
                    color: white;
                }

                #mobileCloseButton:focus {
                    border: 1px solid white;
                    offset: 1px solid white;
                }
            }

            li {
                height: fit-content;
            }

            #hamburgerHolder {
                position: absolute;
                top: 15px;
                right: 15px;

                button {
                    background-image: url(/images/menu.svg);
                    background-size: 25px 25px;
                    background-position: 1px -1px;
                    background-color: #234A5b;
                    border: none;
                    height: 26px;
                    width: 27px;
                }

                button:focus {
                    border: 1px solid white;
                    offset: 1px solid white;
                }
            }

            #mobileSearchForm {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                margin: 0px 0 0 10px;
                justify-content: center;

                input[type="text"] {
                    width: 150px;
                    max-width: calc(100vw - 90px);
                    height: 28px;
                    padding: 0 6px;
                    box-sizing: border-box;
                }
            }

            #mobileNavBar {
                width: 250px;
                z-index: 99;
                display: grid;
                transition: 300ms;
                position: fixed;
                right: 0px;
                top: 0px;
                height: 100%;
                background-color: #E8E1DE;

                a {
                    color: #275490;
                }

                li {
                    border-bottom: 1px solid teal;
                    padding: 15px;
                }

                li:last-of-type {
                    border-bottom: none;
                }

                .selected {
                    a {
                        color: #000000;
                    }

                    background-color: white;
                }
            }

            #mobileNavBar.right {
                right: -500px;
            }

            #mobileQuickLinks {

                position: absolute;
                bottom: 50px;

                #mobileQuickLinksHolder {
                    display: grid;
                    grid-template-columns: 1fr 1fr;
                    grid-template-rows: 1fr 1fr;

                    li {
                        height: 25px;
                        border: 1px solid teal;
                        border-bottom: none;
                        border-left: none;
                    }

                    li:first-of-type,
                    li:nth-of-type(2) {
                        border-top: none;
                    }

                    a {
                        text-align: center;
                        align-content: center;

                    }


                }
            }
        }


        #dashboard {
            float: none;
            width: 100%;
            max-width: 1000px;
            margin-left: auto;
            margin-right: auto;
            box-sizing: border-box;
            padding-left: 10px;
            padding-right: 10px;
        }

        #dashboard .projectRow,
        #dashboard .projectRow2,
        #dashboard .columnRow {
            float: none;
            clear: both;
            width: 100%;
            max-width: 980px;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 20px;
            box-sizing: border-box;
        }

        #dashboard .projectRow2 {
            padding-top: 20px;
        }

        #dashboard .projectCopyRow {
            float: none;
            width: 100%;
            max-width: 100%;
            margin-left: auto;
            margin-right: auto;
        }


        #dashboard .copyRow {
            float: none;
            width: 100%;
            max-width: 100%;
            margin-left: auto;
            margin-right: auto;
        }

        #dashboard img {
            float: none;
            display: block;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 12px;
        }

        /* About/Privacy/etc pages use #copyboard + .row (not #dashboard). */
        #copyboard {
            float: none;
            width: 100%;
            max-width: 1000px;
            margin-left: auto;
            margin-right: auto;
            box-sizing: border-box;
            padding-left: 10px;
            padding-right: 10px;
        }

        #copyboard h1,
        #copyboard h2 {
            float: none;
        }

        #copyboard .row {
            float: none;
            width: 100%;
            max-width: 980px;
            margin-left: auto;
            margin-right: auto;
            box-sizing: border-box;
        }

        #copyboard p,
        #copyboard ol {
            padding-right: 0;
        }

        #copyboard #sidebar {
            float: left;
            margin-left: 10px
        }

        #mainContainer {
            display: grid;
            grid-template-rows: 1fr;

            #mainContent {
                width: 100%;
                max-width: 100% !important;

                h2,
                p,
                span {
                    width: fit-content !important;
                    max-width: 100% !important;
                }

                iframe {
                    width: 100% !important;
                }

                table {
                    p {
                        padding-bottom: 5px;
                        margin: 0;
                    }

                    thead {
                        display: none;
                    }

                    tr {
                        display: block;
                        height: fit-content !important;
                        border: none;
                        border-top: 1px solid #E0D9D2;
                        width: 100% !important;
                        padding: 0;
                        margin: 0;

                        td {
                            width: 100% !important;
                            display: block;
                            height: fit-content !important;
                            border: none;
                            padding: 5px 0 0;
                            margin: 0;
                            text-align: left !important;
                        }

                        td:first-of-type {
                            padding-top: 0;
                        }

                        td:first-of-type::before {
                            font-weight: bold;
                            content: 'Meeting ';
                            display: block;
                        }

                        td:nth-of-type(2n)::before {
                            font-weight: bold;
                            content: 'Date ';
                            display: block;
                        }

                        td:nth-of-type(3n)::before {
                            font-weight: bold;
                            content: 'Time ';
                            display: block;
                        }

                        td:last-of-type::before {
                            font-weight: bold;
                            content: 'Meeting Materials ';
                            display: block;
                        }

                        td:only-child {
                            padding: 5px 0 0 !important;

                            h6 {
                                display: none;
                            }

                        }

                        td:only-child::before {
                            content: ''
                        }
                    }

                    tr.materials {
                        border: none !important;
                    }
                }
            }

            #rightSidebar {
                display: block;
                padding: 10px 0;
                margin: 0 auto;
                width: 100%;
                max-width: 100% !important;
                height: fit-content;
                border: none;

                section {
                    margin: 0 10px 10px;

                    li {
                        padding-bottom: 3px;
                    }
                }

                h3,
                p {
                    width: fit-content;
                    max-width: 100% !important;
                }
            }
        }



        #mainNav {
            display: none;
        }
    }

    #footer {
        display: grid;
        grid-template-rows: 1fr;
        position: relative;

        #footerCopy {
            padding-top: 0;
            z-index: 2;
        }

        >p:last-of-type {
            position: absolute;
            top: 0;
            width: 100%;
            z-index: 1;
        }
    }
}

@media screen and (max-width: 500px) {
    body #header #mobileTopNav {
        line-height: 24px;

        .navTop {
            font-size: 18px;
        }

        .navBottom {
            font-size: 22px;
        }
    }

    /* Must not be nested under #mobileTopNav — that produced #mobileTopNav #copyboard (no match). */
    #copyboard .columnRow {
        width: 475px;
    }
}

@media screen and (max-width: 1000px) {
    /*
     * Avoid width: 100vw — it often exceeds the layout viewport when a vertical scrollbar
     * exists (and after back/forward restore), which looks like the page is "too wide".
     * Override style.css body { min-width: 1000px } so mobile breakpoints always shrink.
     */
    html {
        overflow-x: hidden;
        overflow-x: clip;
    }

    body {
        /* min-width: 0 !important; */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;

        #header {
            width: 100%;
            padding-top: max(8px, env(safe-area-inset-top, 0px));

            img {
                width: 200px;
                height: auto;
                max-height: 110px;
                object-fit: contain;
                object-position: left center;
            }

            div.contentWidth {
                background-image: none;
                background-color: #EEEBE4;
            }
        }

        #mobileNavBar {
            width: 150px;
        }

        .contentWidth {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
        }

        div#mainNav {
            display: none;
        }

        #loopedSlider {
            width: 980px;
        }

        #loopedSlider .container {
            width: 965px;
        }

        #callouts {
            display: grid;
            grid-template-columns: 1fr 1fr;
            margin-top: 10px;

            div {
                margin: auto !important;
            }
        }

        #footer #tertiary {
            display: grid;
            grid-template-columns: 1fr 1fr;
        }
    }
}

@media screen and (max-width: 550px) {
    /*
     * Sub-nav follows main copy in the DOM but floated beside it on desktop.
     * Stack it first on narrow viewports so section links appear above the heading (e.g. "Who we are").
     */
    #content {
        display: flex;
        flex-direction: column;
    }

    #content > main {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #content > .subNav,
    #content > .subNavContainer {
        order: -1;
        margin-left: auto;
        margin-right: auto;
    }

    #content > .contentWidth {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    #content > .contentWidth > main,
    #content > .contentWidth > #copyboard {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #content > .contentWidth > .subNav,
    #content > .contentWidth > .subNavContainer {
        order: -1;
    }

    #content .contentWidth #my-content,
    #content .contentWidth #my_content {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #content .contentWidth #my-content .subNav,
    #content .contentWidth #my-content .subNavContainer,
    #content .contentWidth #my_content .subNav,
    #content .contentWidth #my_content .subNavContainer {
        order: -1;
        margin-left: auto;
        margin-right: auto;
    }

    #content .contentWidth .subNav,
    #content .contentWidth .subNavContainer {
        float: none;
        max-width: 100%;
        margin-top: 10px;
        margin-bottom: 1rem;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    body {
        #callouts {
            grid-template-columns: 1fr;
        }

        #callouts .column h2,
        #dashboard h3 {
            text-align: center;
        }

        #dashboard .projectCopyRow,
        #dashboard .projectRow2 {
            margin-right: 12px;
        }

        .copyRow {
            width: 460px;
        }

        #copyboard {
            h1,
            h2 {
                font-size: 30px;
            }
        }

        .row img {
            width: 500px;
        }

        #loopedSlider {
            width: 535px;
        }

        #loopedSlider .container img {
            width:585px;
        }

        #loopedSlider .play-pause-container a.play-pause {
            color: #ffffff;
        }

        #copyboard .columnRow {
            width: 515px;
        }

     
    } 
}

@media screen and (max-width: 500px) {
    body {
        #footer #tertiary {
            grid-template-columns: 1fr;
        }

        .row img {
            width: 450px;
        }

        #copyboard {
            h1,
            h2 {
                font-size: 19px;
            }
        }

        #loopedSlider {
            width: 390px;
            height: 357px;
        }

        #loopedSlider .container img {
            width: 465px;
        }

        #loopedSlider .play-pause-container a.play-pause {
            background-color: #275490;
            border-radius: 50%;
        }

        #content .contentWidth #my-content .subNav,
        #content .contentWidth #my_content .subNav {
            margin-left: auto;
            margin-right: auto;
        }
    }
}

@media screen and (max-width: 425px) {
    #content #loopedSlider {
        height: 360px;
        width: 380px;
    }
}

@media screen and (max-width: 400px) {
    #content #loopedSlider {
        height: 360px;
        width: 375px;
    }

    #content .container {
        margin-left: 0px;
    }
}


@media screen and (max-width: 320px) {
    #content > .subNav,
    #content > .subNavContainer,
    #content > .contentWidth > .subNav,
    #content > .contentWidth > .subNavContainer,
    #content .contentWidth #my-content .subNav,
    #content .contentWidth #my-content .subNavContainer,
    #content .contentWidth #my_content .subNav,
    #content .contentWidth #my_content .subNavContainer,
    #content .contentWidth .subNav,
    #content .contentWidth .subNavContainer {
        float: none !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    #content .subNav .topMenu,
    #content .subNav .titleMenu,
    #content .subNav .bottomMenu,
    #content .subNav ul {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Legacy menu art is 220px wide; scale it to the container at 320. */
    #content .subNav .topMenu,
    #content .subNav .titleMenu,
    #content .subNav .bottomMenu {
        background-size: 100% 100%;
        background-repeat: no-repeat;
    }

    #content .subNav ul {
        padding: 10px !important;
    }

    /* Prevent clipping of item titles below the sub-nav on very narrow devices. */
    #dashboard .columnRow,
    #dashboard .projectRow,
    #dashboard .projectRow2,
    #dashboard .copyRow,
    #dashboard .projectCopyRow,
    #copyboard .copyRow {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    #copyboard .columnRow {
        width: 100% !important;
        max-width: 100% !important;
    }


    body #mobileNav #mobileSearchForm input[type="text"]{
        margin-top: 0px;
    }

    #content .container {
        margin-left: 0px;
    }

    #content #loopedSlider {
        height: 360px;
        width: 300px;
    }

}

/* Flat mobile overrides for legacy pages like advice/tips (guaranteed CSS parsing). */
@media screen and (max-width: 1000px) {
    body {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    .contentWidth {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding-left: 10px;
        padding-right: 10px;
    }

    #copyboard,
    #dashboard {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    #copyboard .row,
    #dashboard .columnRow,
    #dashboard .projectRow,
    #dashboard .projectRow2,
    #copyboard .copyRow,
    #dashboard .copyRow,
    #dashboard .projectCopyRow {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    #copyboard p,
    #copyboard ol {
        padding-right: 0 !important;
    }

    /* Center the 220px sub-nav shell when the main column is full-width (float removed). */
    #content > .subNavContainer,
    #content > .contentWidth > .subNavContainer,
    #content .contentWidth #my-content .subNavContainer,
    #content .contentWidth #my_content .subNavContainer,
    #content .contentWidth .subNavContainer {
        float: none !important;
        display: flex !important;
        flex-direction: row;
        justify-content: center !important;
        align-items: flex-start;
        width: 100% !important;
        max-width: 100% !important;
        clear: both !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    #content > .subNav,
    #content > .contentWidth > .subNav,
    #content .contentWidth #my-content .subNav,
    #content .contentWidth #my_content .subNav,
    #content .contentWidth .subNav {
        float: none !important;
        display: block !important;
        clear: both !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box;
    }

    #sideBar {
        float: none !important;
        width: 100% !important;
        margin-left: 10px !important;
      }
}
