/* ==========================================================================
   TABLE OF CONTENTS
   1. Reset & Base
   2. Typography
   3. Utilities
   4. Layout (header, main, footer, section, grid wrappers)
   5. Navigation (mobile + desktop, dropdowns, subnav)
   6. Components (buttons, card, tooltip, modal, details/summary)
   7. Subpage context (#secondary)

   Mobile-first: each selector's base (unprefixed) rule is mobile styling.
   Its min-width overrides are written as separate @media blocks placed
   immediately after it, so everything about one component stays together
   without relying on CSS nesting.
   ========================================================================== */


/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */

html {
    font-family: 'DM Sans', Arial, Helvetica, sans-serif;
    scrollbar-color: #999 #ffffff; /* thumb color, then track color */
    scrollbar-width: thin; /* options: auto, thin */
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    background-color: #F3F4F7;
    color: #333333;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    overflow-x: hidden; /* guards against the vw-based full-bleed elements (.pullquote, .pullquote-insection) causing a sliver of horizontal scroll */
    display: flex;
    flex-direction: column;
}


/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

h1 {
    color: #333333;
}

h1.logo {
    width: 200px;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    h1.logo {
        position: sticky;
        width: 250px;
    }
}

@media (min-width: 1024px) {
    h1.logo {
        position: sticky;
        width: 350px;
    }
}

h2 {
    font-weight: 400;
    font-size: 22px;
    color: #333333;
}

@media (min-width: 768px) {
    h2 {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    h2 {
        font-size: 30px;
    }
}

h3 {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #376dc6;
}

@media (min-width: 768px) {
    h3 {
        font-weight: 600;
    }
}

p {
    line-height: 1.4;
}

ul li {
    line-height: 2;
}

a {
    color: #27559B;
    text-decoration: underline;
    cursor: pointer;
    background-image: linear-gradient(#dbe6f5, #dbe6f5); /* light highlight, solid fill via two matching stops */
    background-repeat: no-repeat;
    background-position: 100% 0; /* anchors the growth point on the right */
    background-size: 0% 100%; /* starts at zero width */
    transition: background-size 0.25s ease-out;
}

a:hover {
    text-decoration: none;
    background-size: 100% 100%; /* grows right to left to fill the link */
}

a:focus {
    //outline-style: dotted;
}

a, a * {
    cursor: pointer !important;
}

a.no-outline {
    text-decoration: none;
}

a.no-outline:focus, a.no-outline:hover {
    outline-style: none;
}

a:has(button), a:has(.button-inpage), a:has(.button-next) {
    background-image: none; /* opt out of the base link hover sweep; the button provides its own hover styling */
    transition: none;
}


/* ==========================================================================
   3. UTILITIES
   ========================================================================== */

.hidden {
    display: none;
}

.name-bold {
    font-weight: 600;
}

.card-title {
    color: #333333;
}

.note {
    font-size: 16px;
    font-style: italic;
    font-weight: 400;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

header {
    margin: 0;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
}

main {
    margin: 2px 2px 0 0;
    position: relative;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

footer {
    width: 100%;
    margin: 0;
    padding: 10px 20px;
    min-height: 200px;
    color: #ffffff;
    background-color: #404040;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    footer {
        min-height: 100px;
    }
}

footer a {
    color: #ffffff;
    text-decoration: none;
    border: 1px dashed transparent;
    background-image: none; /* opt out of the base link hover sweep */
}

footer a:hover {
    border: 1px dashed #ffffff;
}

.logo-row {
    position: sticky;
    top: 0;
    margin: 0 0 0 20px;
    padding-top: 10px;
    background-color: #F3F4F7;
    z-index: 2;
}

@media (min-width: 1024px) {
    .logo-row {
        top: 35px;
        margin: 5px 0 0 20px;
        padding-top: 5px;
        background-color: #F3F4F7;
    }
}

section {   /* creates sections on Home page */
    margin: 0;
    padding: 10px 0 20px 0;
    border-bottom: 1px solid #333333;
    border-left: 10px solid #b2c3d1;
    //border: 1px solid red;
}

section.intro {
    border-left: 10px solid transparent !important;
}

section:last-child {
    padding-bottom: 40px;
    border-bottom: 0;
}

section h2 { /* section headings on Home page */
    font-size: 30px;
    font-weight: 400;
    margin-left: 20px;
    color: #333333;
}

@media (min-width: 768px) {
    section h2 {
        font-size: 36px;
        margin-left: 40px;
    }
}

@media (min-width: 1024px) {
    section h2 {
        font-size: 40px;
        margin-left: 60px;
    }
}

section:first-child h2 {
    display: none;
}

section p.hero {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4;
    width: 90%;
    margin: 2px 0 30px 0;
}

@media (min-width: 768px) {
    section p.hero {
        font-size: 30px;
        line-height: 1.3;
    }
}

.section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@media (min-width: 768px) {
    .section-header {
        max-width: 92%;
    }
}

/* --- grid wrapper system (mobile-first) --- */

.wrapper-overall {
    margin-top: 40px;
    position: relative;
    flex: 1 0 auto;
    background-image: url('../assets/grid-watermark-blue-sm.png');
    background-repeat: no-repeat;
    background-position: top left;
    background-size: 100vw;
}

@media (min-width: 628px) {
    .wrapper-overall {
        margin: 60px 20px 0 0;
        background-image: url('../assets/grid-watermark-blue-med.png');
        background-size: 90vw;
        }
}

@media (min-width: 1024px) {
    .wrapper-overall {
        margin: 60px 20px 0 0;
        background-image: url('../assets/grid-watermark-blue-lg.png');
        background-size: 90vw;
        }
}

.wrapper-overall.nogrid {
    margin-top: 40px;
    position: relative;
    flex: 1 0 auto;
    background-image: none;
}

.wrapper-vertical {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 20px;
    margin: 20px 20px 0 20px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .wrapper-vertical {
        margin: 20px 100px;
    }
}

@media (min-width: 1024px) {
    .wrapper-vertical {
        margin: 20px 100px;
        max-width: 70%;
    }
}

.wrapper-vertical p {
    max-width: 95%;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .wrapper-vertical p {
        max-width: 85%;
    }
}

.wrapper-vertical .card {
    width: 90%;
}

.wrapper-vertical .content p {
    max-width: 100%;
    margin-bottom: 40px;
}

.wrapper-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 20px;
    margin: 20px 40px;
    justify-items: center;
}

@media (min-width: 768px) {
    .wrapper-card {
        grid-template-columns: 1fr 1fr 1fr;
        margin: 20px 80px;
    }
}

@media (min-width: 1024px) {
    .wrapper-card {
        grid-template-columns: 1fr 1fr 1fr;
        margin: 20px 150px;
    }
}

.wrapper-card.many {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .wrapper-card.many {
        grid-template-columns: repeat(auto-fit, minmax(200px, 200px));
    }
}

.wrapper-card a {
    text-decoration: none;
    cursor: pointer;
    background-image: none; /* opt out of the base link hover sweep */
}

.wrapper-card a:hover, .wrapper-card a:focus {
    outline-style: dotted;
}

/* wrapper-feature: single markup, mobile-first. Mobile stacks block1 > block2 >
   block3 vertically in document order. Desktop switches to a row with
   .feature-left (block1 + block3) as one column and .block2 as an
   independently-tall second column, so expanding block2 never pushes
   block1/block3 around. */
.wrapper-feature {
    display: flex;
    flex-direction: column;
    grid-gap: 20px;
    margin: 20px;
}

@media (min-width: 768px) {
    .wrapper-feature {
        margin: 20px 100px;
    }
}

@media (min-width: 1024px) {
    .wrapper-feature {
        flex-direction: row;
        align-items: flex-start;
        margin: 20px 100px;
    }
}

.wrapper-feature > div {
    align-self: stretch;
}

@media (min-width: 1024px) {
    .wrapper-feature .content p {
        margin: 5px 0;
        min-width: 450px;
    }

    .wrapper-feature .content p:first-child {
        margin-bottom: 15px;
    }
}

/* .feature-left groups block1 + block3 into one column on desktop. On mobile
   it's unwrapped via display:contents so its children flatten straight into
   the .wrapper-feature stack, in document order. */
.feature-left {
    display: contents;
}

@media (min-width: 1024px) {
    .feature-left {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
    }
}

.block1 {
    order: 1;
}

.block2 {
    order: 2;
    padding: 10px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15); /* shadow on expanding element area, mobile */
}

@media (min-width: 1024px) {
    .block2 {
        flex: 1;
        background-color: #f5f5f5;
        border-radius: 4px;
    }
}

.block3 {
    order: 3;
}

.hero-spacing {
    margin-top: 20px;
}

.feature {
    width: 50%;
}

@media (min-width: 1024px) {
    .feature {
        width: 100%;
    }

    .feature .container p {
        font-size: smaller;
    }
}

.feature .expand {
    text-align: left;
    padding: 0 0 0 10px;
}

@media (min-width: 1024px) {
    .feature .expand {
        text-align: right;
        padding: 0 10px 0 0;
    }
}

.wrapper-footer {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 5dvh;
}

@media (min-width: 768px) {
    .wrapper-footer {
        grid-template-columns: 1fr 1fr 1fr;
        justify-items: center;
    }
}

.wrapper-footer > div {
    padding: 10px 10px;
}

.wrapper-funders {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 40px;
    -webkit-box-align: center;
    align-items: center;
}

.wrapper-funders > div img {
    max-width: 200px;
    display: block;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .wrapper-funders {
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 20px;
        justify-items: stretch;
        max-width: 1000px;
    }
    .wrapper-funders > div img {
        max-width: 120px;
    }
}


/* ==========================================================================
   5. NAVIGATION
   ========================================================================== */

/* --- mobile hamburger trigger + off-canvas menu --- */

.navbar {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0.8rem 1.5rem;
    border-top: 2px solid #3c83f6;
    position: sticky;
    top: 0;
    z-index: 999;
}

@media (min-width: 1024px) {
    .navbar {
        padding: 0;
        background-color: #F3F4F7;
        border-top: 0;
    }
}

.menu-toggle {
    display: none; /* actual checkbox input, hidden completely */
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background-color: #eff6ff;
    padding: 10px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 100; /* stays on top of the slide-out menu */
}

@media (min-width: 1024px) {
    .hamburger {
        display: none; /* hidden on desktop */
    }
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger:active, .hamburger:focus, .hamburger:hover, .hamburger:focus-visible {
    background-color: transparent;
    -webkit-tap-highlight-color: transparent;
}

.neutral {
    display: none;
}

.nav-links {
    position: fixed;
    top: 5px;
    right: -100%; /* hidden off-screen right on mobile */
    width: 300px;
    height: fit-content;
    max-height: 100dvh; /* or calc(100dvh - navbar-height) */
    overflow-y: auto;
    background-color: #F3F4F7;
    display: flex;
    flex-direction: column;
    align-content: center;
    padding: 70px 0 0 0; /* top padding so panel doesn't crowd hamburger */
    transition: right 0.3s ease-in-out;
    margin: 0;
    list-style: none;
    text-transform: uppercase;
    border-top: 2px solid transparent;
    box-shadow: 4px 4px 10px 4px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1024px) {
    .nav-links {
        position: static; /* undo fixed off-screen position */
        display: flex;
        flex-direction: row;
        height: auto;
        max-height:unset; /* or calc(100dvh - navbar-height) */
        overflow-y:unset;
        width: fit-content;
        padding: 0 20px; /* padding on overall nav strip */
        border-top: 2px solid #4c7cca;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.25);
    }
}

.nav-links li {
    margin: 0 10px;
    width: 100%;
    text-align: left;
    padding: 12px 20px 12px 0; /* vertical link spacing on fly-in panel */
    border-bottom: 1px solid rgba(220, 218, 218, 0.5);
}

@media (min-width: 1024px) {
    .nav-links li {
        margin: 0 40px; /* margins between nav elements in strip */
        width: auto;
        padding: 2px 0 0 0;
        white-space: nowrap;
        text-align: center;
        border-bottom: 0 solid rgba(220, 218, 218, 0.5);
    }
}

.nav-links li:first-child {
    border-top: 1px solid rgba(220, 218, 218, 0.5);
}

@media (min-width: 1024px) {
    .nav-links li:first-child {
        display: none;
        border-top: 0 solid rgba(220, 218, 218, 0.5);
    }
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    background-image: none; /* opt out of the base link hover sweep */
}

@media (min-width: 1024px) {
    .nav-links a {
        font-size: 14px;
        border: 1px dashed transparent;
    }

    .nav-links a:hover {
        font-size: 14px;
        border: 1px dashed #333333;
    }
}

.nav-links li a {
    cursor: pointer;
}

/* --- CSS-only slide-out toggle mechanism --- */

.menu-toggle:checked ~ .nav-links {
    right: 0;
}

.menu-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0; /* hide middle bar */
}

.menu-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- dropdowns (homepage) --- */

.dropbtn {
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4076a5;
    font-family: 'DM Sans', Arial, Helvetica, sans-serif;
    padding: 0;
    background-color: transparent;
    text-transform: uppercase;
}

@media (min-width: 1024px) {
    .dropbtn {
        font-weight: 400;
        color: #333;
        border: 1px dashed transparent;
    }

    .dropdown {
        position: relative;
    }
}

.dropdown-content {
    margin-top: 10px; /* mobile: stacked under trigger */
}

@media (min-width: 1024px) {
    .dropdown-content {
        display: none;
        position: absolute;
        top: 0;
        right: -10px;
        text-align: right;
        padding: 25px 5px 0 0;
        margin-top: 0;
        margin-bottom: 0;
        border-right: 2px dashed #999;
        border-bottom: 2px dashed #999;
        background-color: transparent;
        min-width: 200px;
    }
}

.dropdown-content a {
    display: block; /* vertically stacks subpage links on mobile flyout */
    line-height: 2;
    margin-left: 5px;
    background-image: none; /* opt out of the base link hover sweep */
}

@media (min-width: 1024px) {
    .dropdown-content a {
        color: #333;
        text-decoration: none;
        display: inline; /* horizontally displays subpage links on desktop */
        line-height: normal;
        margin-left: 0;
        padding: 0 5px;
        border: 1px dashed transparent;
    }

    .dropdown-content a:hover {
        border: 1px dashed #333;
        font-weight: 400;
    }

    .dropdown:hover .dropbtn {
        border: 1px dashed #333333;
    }

    /* .show is toggled via JavaScript to reveal a dropdown */
    .show {
        display: block;
    }
}

/* --- static subnav (used on some subpages) --- */

.subnavbtn {
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: inherit;
    color: #333;
    font-family: 'DM Sans', Arial, Helvetica, sans-serif;
    padding: 0;
    background-color: transparent;
    text-transform: uppercase;
}

.subnav-content {
    margin-top: 10px;
}

.subnav-content a {
    display: block; /* vertically stacks subpage links on mobile flyout */
    line-height: 2;
    margin-left: 5px;
    background-image: none; /* opt out of the base link hover sweep */
}


/* ==========================================================================
   6. COMPONENTS
   ========================================================================== */

/* --- buttons --- */

.button-inpage {
    display: inline-block;
    cursor: pointer;
    margin: auto;
    justify-self: center;
    background-color: #376dc6;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    text-align: center;
    padding: 15px 40px;
    border-color: transparent;
    border-radius: 40px;
    width: 200px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
}

.button-inpage:active {
    background-color: #9d0e16;
    color: #ffffff;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.35);
}

a:hover .button-inpage,
a:focus-visible .button-inpage {
    background-color: #9d0e16;
    color: #ffffff;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.35);
}

.button-next {
    display: inline-block;
    cursor: pointer;
    margin: auto;
    justify-self: center;
    background-color: #376dc6;
    color: #ffffff;
    text-align: center;
    padding: 9px 0 5px 0;
    border-color: transparent;
    border-radius: 10px;
    width: 100px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
}

.button-next img {
    width: 30px;
    opacity: 70%;
}

.button-next:active {
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.35);
}

.tooltip-container-btn:hover .button-next,
.tooltip-container-btn:focus-visible .button-next {
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.35);
}

.tooltip-container-btn:hover .button-next img,
.tooltip-container-btn:focus-visible .button-next img {
    opacity: 100%;
}

.button-homepage {
    font-size: 22px; /* carried over from the old 768px rule as the mobile default */
}

@media (min-width: 1024px) {
    .button-homepage {
        font-size: 28px;
    }
}

/* --- jump to top --- */

.jump-to-top {
    text-align: right;
    margin: 24px 20px 0 0;
    padding-bottom: 20px;
}

.jump-to-top a {
    cursor: pointer;
    font-size: 14px;
}

.jump-to-top a:focus {
    outline-style: none;
}

.red-dot {
    width: 30px;
    height: 30px;
    background-color: #df001d;
    border-radius: 50%;
    margin-top: -40px;
    margin-right: 20px;
}

/* --- card --- */

.card {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); /* creates the "card" effect */
    transition: 0.3s;
    border-radius: 5px;
    height: fit-content;
    cursor: pointer;
}

.card.noclick {
    cursor: default;
}

.card.noclick.card-graph img {
    min-width: 100%;
    max-width: 100%;
    //border: 1px solid red;
}

.card .container {
    padding: 2px 16px;
}

.card img {
    border-radius: 5px 5px 0 0;
    max-width: 250px;
}

@media (min-width: 768px) {
    .card img {
        border-radius: 5px 5px 0 0;
        max-width: 300px;
    }
}

.card.feature:hover, .card.feature:focus {
    outline-style: dotted;
}

/* --- tooltip --- */

.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip-container .tooltip-box {
    visibility: hidden;
    width: 160px;
    font-weight: 400;
    font-size: 14px;
    background-color: #fff;
    color: #336699;
    text-align: center;
    border-radius: 5px;
    padding: 6px;
    border: 1px solid #b2c3d1;

    /* centers it right above the trigger text */
    position: absolute;
    z-index: 1;
    bottom: 105%;
    left: 10%;
    transform: translateX(-50%);

    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip-container:hover .tooltip-box {
    visibility: visible;
    opacity: 1;
}

.tooltip-container-btn {
    position: relative;
    display: inline-block;
    cursor: pointer;
    background-image: none; /* opt out of the base link hover sweep */
}

.tooltip-container-btn .tooltip-box {
    visibility: hidden;
    width: 160px;
    font-weight: 400;
    font-size: 14px;
    background-color: #fff;
    color: #336699;
    text-align: center;
    border-radius: 5px;
    padding: 6px;
    border: 1px solid #b2c3d1;

    /* centers it right above the trigger text */
    position: absolute;
    z-index: 1;
    bottom: 105%;
    left: 10%;
    transform: translateX(-50%);

    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip-container-btn:hover .tooltip-box,
.tooltip-container-btn:focus-visible .tooltip-box {
    visibility: visible;
    opacity: 1;
}

/* --- expand / details-summary (used in expandable feature boxes) --- */

.expand {
    font-size: smaller;
    font-weight: 500;
    text-transform: uppercase;
}

.expand:hover {
    color: red;
}

@media (min-width: 768px) {
    summary {
        cursor: pointer;
        padding: 0 10px;
    }

    .featurebox {
        padding: 10px;
    }

    details p {
        line-height: 1.4;
    }

    details[open] .expanded-content {
        border-radius: 10px;
    }
}

/* --- modal --- */

.modal {
    display: none; /* hidden by default */
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(39, 39, 39, 0.902); /* fallback color */
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 100%;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    animation-name: animatetop;
    animation-duration: 0.4s;
    border-radius: 5px;
    margin-top: 50px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .modal-content {
        width: 80%;
    }
}

@media (min-width: 1024px) {
    .modal-content {
        width: 60%;
    }
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0;
    }
    to {
        top: 0;
        opacity: 1;
    }
}

.modal-header {
    padding: 2px 16px;
    color: #333;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.modal-header h2 {
    font-size: 24px;
    margin-left: 0;
}

.modal-body {
    padding: 2px 16px;
}

.modal-footer {
    padding: 2px 16px;
    color: #333;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.close {
    color: #333;
    float: right;
    font-size: 36px;
    font-weight: 400;
}

.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
    outline-style: dotted;
}


/* ==========================================================================
   7. SUBPAGE CONTEXT (#secondary)
   All styles here apply only within pages/sections using the #secondary
   wrapper (subpages, as opposed to the homepage).
   ========================================================================== */

#secondary .navbar { /* subpages mobile nav bar */
    background: #F3F4F7;
}

@media (min-width: 1024px) {
    #secondary .navbar {
        background-color: #F3F4F7;
        padding-bottom: 28px;
        border-bottom: 1px solid #333333;
    }
}

#secondary .wrapper-overall {
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    flex: 1 0 auto; /* fills main's full height so the border always reaches the footer */
    border-left: 10px solid #b2c3d1;
}

@media (min-width: 1024px) {
    #secondary .wrapper-overall {
        margin-top: 10px;
        padding-bottom: 20px;
    }
}

#secondary .wrapper-feature {
    margin-bottom: 0;
}

#secondary .section-header {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: start;
}

#secondary .section-header.dropdown-page {
    margin-top: 50px;
}

#secondary .section-header .toggle {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    #secondary .section-header .toggle {
        margin-bottom: 40px;
    }
}

#secondary .section-header .toggle ul {
    margin: 0 0 0 20px;
    padding-left: 20px;
}

#secondary .section-header .toggle li {
    display: inline;
    margin-right: 20px;
}

#secondary h1 {
    font-size: 28px;
    font-weight: 400;
    margin-top: 40px;
    margin-left: 20px;
}

@media (min-width: 768px) {
    #secondary h1 {
        font-size: 36px;
        margin-top: 40px;
        margin-left: 40px;
    }
}

@media (min-width: 1024px) {
    #secondary h1 {
        font-size: 40px;
        margin-top: 100px;
        margin-left: 40px;
    }
}

#secondary .red-dot {
    width: 20px;
    height: 20px;
    background-color: #df001d;
    border-radius: 50%;
    margin-top: -15px;
}

@media (min-width: 768px) {
    #secondary .red-dot {
        margin: -20px 0 0 5px;
    }
}

@media (min-width: 1024px) {
    #secondary .red-dot {
        width: 25px;
        height: 25px;
        margin: 30px 0 0 5px;
    }
}

#secondary .pullquote { /* pullquote, mobile-first */
    display: grid;
    grid-template-columns: 1fr;
    background-color: #48638d; /* darker */
    font-family: 'Lora', serif;
    color: #ffffff;
    font-size: 18px;
    font-style: italic;
    font-weight: 400;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 30%;
    /* Bleeds the box's right edge to the actual viewport edge at any width:
       100% = this element's containing block width; 100vw = full viewport
       width; +2px compensates for the only ancestor that adds right-side
       space (main's margin-right: 2px). Margin-only, so the element stays
       in normal flow and its vertical position is unaffected. */
    margin-right: calc(-100vw + 100% + 2px);
    padding: 0 10px 0 20px;
}

@media (min-width: 768px) {
    #secondary .pullquote {
        font-size: 22px;
        margin-top: 20px;
        margin-bottom: 20px;
        margin-left: 40%;
    }
}

@media (min-width: 1024px) {
    #secondary .pullquote {
        font-size: 26px;
        margin-left: 50%;
        margin-top: 60px;
        margin-bottom: 60px;
    }
}

@media (min-width: 1250px) {
    #secondary .pullquote {
        font-size: 28px;
    }
}

#secondary .pullquote p {
    width: 100%;
    justify-self: stretch;
    margin-left: 10px;
}

#secondary .pullquote p .lg-quote {
    font-size: 30px;
    margin: 0;
    padding: 0;
}

#secondary .pullquote-insection {
    /* Bleeds the box's right edge to the actual viewport edge at any width:
       100% = this element's containing block width; 100vw = full viewport
       width; +2px compensates for the only ancestor that adds right-side
       space (main's margin-right: 2px). Margin-only, so the element stays
       in normal flow and its vertical position is unaffected. */
    margin-right: calc(-100vw + 100% + 2px);

    /* .pullquote's margin-left is a %, which resolves against each element's
       own containing block. Because this element sits nested inside
       .wrapper-vertical (narrower, and capped to max-width:70% at 1024px+),
       the inherited % computes a different pixel value than the standalone
       .pullquote gets from wrapper-overall. These calc() values replace that
       inherited % with the exact vw-based equivalent, so the left edge
       always lands at the same absolute position as the standalone version. */
    margin-left: calc(30vw - 23.6px);
}

@media (min-width: 768px) {
    #secondary .pullquote-insection {
        margin-left: calc(40vw - 104.8px);
    }
}

@media (min-width: 1024px) {
    #secondary .pullquote-insection {
        margin-left: calc(50vw - 116px);
    }
}

#secondary .logo-row {
    position: sticky;
    top: 2px;
    margin: 0 0 0 20px;
    padding: 2px 0 0 0;
    width: fit-content;
    z-index: 2000;
}

@media (min-width: 1024px) {
    #secondary .logo-row {
        position: fixed;
        top: 0;
        padding-top: 3px;
        background-color: transparent;
        z-index: 1000;
    }
}

#secondary .logo {
    width: 200px;
    margin: 0;
    margin-left: -20px;
    padding: 0;
}

@media (min-width: 768px) {
    #secondary .logo {
        margin-left: 0;
    }
}

@media (min-width: 1024px) {
    #secondary .logo {
        width: 150px;
    }
}

@media (min-width: 1024px) {
    #secondary a.selected {
        position: relative;
    }

    #secondary a.selected::after {
        content: "";
        display: inline-block;
        width: 10px;
        height: 10px;
        background-color: #df001d;
        border-radius: 50%;
        position: absolute;
        top: 70%;
        left: 40%; /* adjust horizontal placement of red dot selector */
        transform: translateY(90%);
    }

    /* desktop-only nav additions (dropdown + subnav), no mobile equivalent */
    #secondary .nav-links {
        background-color: #F3F4F7;
    }

    #secondary .nav-links li:first-child {
        display: block;
        margin-top: 1px;
    }

    #secondary .dropdown {
        position: relative;
    }

    #secondary .dropbtn {
        border: none;
        cursor: pointer;
        font-size: 14px;
        font-weight: 400;
        color: #333;
        background-color: transparent;
        text-transform: uppercase;
        border: 1px dashed transparent;
    }

    #secondary .dropdown:hover .dropbtn {
        border: 1px dashed #333333;
    }

    #secondary .link-bkgd {
        background-color: #F3F4F7;
        padding-bottom: 0;
    }

    #secondary .dropdown-content {
        padding: 25px 5px 0 0; /* style difference from homepage nav */
        border-bottom: 2px dashed transparent; /* style difference from homepage nav */
    }

    #secondary .show {
        display: block;
    }

    #secondary .subnav {
        position: relative;
    }

    #secondary .subnavbtn {
        border: none;
        cursor: pointer;
        font-size: 14px;
        font-weight: 400;
        background-color: transparent;
        text-transform: uppercase;
        border: 1px dashed transparent;
        color: #333;
        font-family: 'DM Sans', Arial, Helvetica, sans-serif;
        z-index: 10;
    }

    #secondary .subnav-content {
        display: block;
        position: absolute;
        top: 0;
        right: -10px;
        text-align: right;
        padding: 0 5px 14px 0;
        margin-top: 65px;
        border-right: 2px dashed #999;
        border-bottom: 2px dashed #999;
        background-color: #F3F4F7;
        min-width: 200px;
    }

    #secondary .subnav-content a {
        color: #333;
        text-decoration: none;
        display: inline; /* horizontally displays subpage links on desktop */
        padding: 0 5px;
        border: 1px dashed transparent;
    }

    #secondary .subnav-content a:hover {
        border: 1px dashed #333;
        font-weight: 400;
    }

    #secondary .subnav:hover .dropbtn {
        border: 1px dashed transparent;
    }
}
