.ebb-header {
    position: relative;
    z-index: 1000;
}

/* Core's 24px gap between template parts lands later in the editor, so this needs the extra class. */
.ebb-header.wp-block-template-part,
.ebb-footer-part.wp-block-template-part {
    margin-block-start: 0;
}

@media (min-width: 768px) {
    .ebb-header {
        position: sticky;
        top: var(--wp-admin--admin-bar--height, 0px);
    }
}

/* Row and bar share one cell on mobile so the menu button sits in the logo row. */
.ebb-masthead {
    display: grid;
}

.ebb-masthead > * {
    grid-column: 1;
}

.ebb-masthead__row {
    grid-row: 1;
}

.ebb-masthead__bar {
    grid-row: 2;
}

/* Sized like .ebb-hero's copy so the hexagons run on unbroken below the header. */
.ebb-masthead .ebb-masthead__row {
    position: relative;
    isolation: isolate;
    background-color: var(--wp--preset--color--navy);
    padding-inline: 64px;
    background-size: max(100vw, 159.7vh) auto !important;
    background-position: 50% 0 !important;
}

.ebb-masthead__row::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--wp--preset--color--navy);
    opacity: 0;
    transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ebb-header.is-scrolled .ebb-masthead__row::before {
    opacity: 1;
}

/* Equal thirds, so the trial button wraps to two lines on narrower screens. */
.ebb-masthead__row > * {
    flex: 1 1 0;
}

.ebb-masthead__logo a {
    display: block;
}

.ebb-masthead__phone a {
    text-decoration: none;
}

@media (max-width: 1279px) {
    .ebb-masthead .ebb-masthead__phone {
        display: none;
    }
}

.ebb-masthead .ebb-masthead__bar {
    padding-inline: 0;
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .ebb-masthead .ebb-masthead__bar {
        padding-inline: 64px;
    }
}

@media (max-width: 1023px) {
    .ebb-masthead .ebb-masthead__row {
        padding-inline: 8px;
    }

    .ebb-masthead .ebb-masthead__search {
        display: none;
    }

    /* Holds the menu button's third, keeping the trial button centred. */
    .ebb-masthead__row::after {
        content: "";
        flex: 1 1 0;
    }

    .ebb-masthead .ebb-masthead__bar {
        grid-row: 1;
        justify-self: end;
        align-self: center;
        padding: 0 8px;
        background: none !important;
    }
}

@media (max-width: 767px) {
    .ebb-masthead .ebb-masthead__cta {
        display: none;
    }
}

.ebb-search .wp-block-search__input,
.ebb-search .wp-block-search__button {
    height: 36px;
    padding: 4px 16px;
    border-width: 2px;
    border-style: solid;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
}

.ebb-search .wp-block-search__button {
    margin-left: 4px;
    border-color: var(--wp--preset--color--bright-blue);
}

.ebb-search--dark .wp-block-search__input {
    border-color: var(--wp--preset--color--grayish);
    background-color: var(--wp--preset--color--teal);
    color: #fff;
}

.ebb-search--light .wp-block-search__input {
    border-color: #fff;
    background-color: #fff;
    color: #000;
}

.ebb-search .wp-block-search__input::placeholder {
    color: var(--wp--preset--color--grayish);
    opacity: 1;
}

.ebb-footer a {
    text-decoration: none;
}

.ebb-footer a:hover {
    text-decoration: underline;
}

.ebb-footer-nav {
    max-width: 672px;
}

.ebb-footer-nav .wp-block-navigation__container {
    row-gap: 0;
}

.ebb-footer-nav .wp-block-navigation-item:not(:last-child)::after {
    content: "·";
    padding-left: 8px;
    color: var(--wp--preset--color--grayish);
}

.ebb-legal a {
    text-decoration: none;
}

.ebb-legal mark {
    margin: 0 8px;
}

@media (max-width: 1023px) {
    .ebb-footer .ebb-footer__from {
        text-align: left;
    }
}

@media (max-width: 767px) {
    .ebb-footer-part .ebb-footer__copy,
    .ebb-footer-part .ebb-legal {
        text-align: left;
    }
}

/* Wraps on the box's own width, so the button drops below instead of squeezing. */
.ebb-newsletter__form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
}

.ebb-newsletter__fields {
    display: flex;
    flex: 1 1 240px;
    flex-direction: column;
    gap: 8px;
}

.ebb-newsletter__fields input {
    box-sizing: border-box;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #6b7280;
    border-radius: 4px;
    font: inherit;
    font-size: 16px;
}

.ebb-newsletter__form .wp-element-button {
    flex: none;
    padding: 4px 16px;
    border: 0;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
}

.ebb-hero.wp-block-group {
    position: relative;
    padding: 32px 32px 90px;
    background: var(--wp--preset--color--navy) url(../images/hero-bg.webp) 50% -147px / max(100vw, 159.7vh) auto no-repeat;
}

.ebb-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 50px;
    background: url(../images/chevron-light.svg) 0 0 / 100% 100% no-repeat;
}

@media (max-width: 1023px) {
    .ebb-hero {
        background-position: 50% -103px;
    }
}

@media (max-width: 767px) {
    .ebb-hero {
        background-position: 50% -83px;
    }
}

.ebb-breadcrumbs a {
    text-decoration: none;
}

.ebb-breadcrumbs [aria-current] {
    text-decoration: underline;
}

@media (max-width: 1023px) {
    .ebb-breadcrumbs.wp-block-group {
        display: none;
    }
}

.ebb-published__on::before {
    content: "Published on: ";
}

.ebb-published__updated {
    font-weight: 500;
}

.ebb-published__updated::before {
    content: "(Last updated: ";
}

.ebb-published__updated::after {
    content: ")";
}

.ebb-archive__main .wp-block-post-template {
    margin-bottom: 64px;
}

.ebb-archive__main .ebb-pagination {
    margin-bottom: 40px;
}

.ebb-card {
    height: 100%;
}

.ebb-card .wp-block-post-title a,
.ebb-card__terms a {
    text-decoration: none;
}

.ebb-card .wp-block-post-title a:hover,
.ebb-card__terms a:hover {
    text-decoration: underline;
}

.ebb-card .wp-block-post-featured-image img {
    object-fit: cover;
}

/* 27px tall to read as a button, but only its 24px line counts toward the card height. */
.ebb-card__button.wp-element-button,
.ebb-video-button .wp-element-button {
    margin-block: -1.5px;
    padding: 4px 16px;
    border: 0;
    border-radius: 4px;
    font-size: 16px;
    line-height: 19px;
    text-decoration: none;
    cursor: pointer;
}

.ebb-archive--term .ebb-video-button .wp-element-button {
    margin-block: 0;
    line-height: 24px;
}

.ebb-post-type-label {
    margin: -12px 0 16px;
    color: var(--wp--preset--color--grayish);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
}

.ebb-search-term__query {
    font-style: italic;
    font-weight: 700;
}

.ebb-pagination {
    box-sizing: border-box;
    min-height: 70px;
    gap: 16px;
    padding-block: 16px;
    font-size: 18px;
    font-weight: 500;
}

.ebb-pagination .wp-block-query-pagination-numbers {
    display: flex;
    gap: 16px;
}

.ebb-pagination a {
    color: var(--wp--preset--color--bright-blue);
    text-decoration: none;
}

.ebb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
    font-size: 14px;
}

.ebb-pagination .page-numbers.current {
    background: var(--wp--preset--color--bright-blue);
    color: #fff;
}

.ebb-sidebar.wp-block-group {
    flex: 0 0 288px;
    box-sizing: border-box;
}

.ebb-term-groups__box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ebb-term-groups__box + .ebb-term-groups__box {
    margin-top: 24px;
}

.ebb-term-groups__title {
    margin: 0 0 4px;
    padding: 8px 8px 8px 16px;
    background: var(--wp--preset--color--navy);
    color: #fff;
    font-size: 16px;
    line-height: 24px;
}

.ebb-term-groups__box a {
    display: flex;
    gap: 16px;
    padding: 4px 8px;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-decoration: none;
}

.ebb-term-groups__box a::before {
    content: "";
    flex: none;
    align-self: flex-start;
    height: 0;
    margin-top: 5px;
    border-left: 7px solid var(--wp--preset--color--bright-blue);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.ebb-term-groups__box a:hover {
    background: var(--wp--preset--color--bright-blue);
    color: #fff;
}

.ebb-term-groups__box a:hover::before {
    border-left-color: #fff;
}

@media (max-width: 1023px) {
    .ebb-archive__row.wp-block-group {
        flex-wrap: wrap;
    }

    .ebb-archive__row > * {
        flex-basis: 100% !important;
    }

    .ebb-archive__main .wp-block-post-template {
        grid-template-columns: 1fr;
    }
}

.ebb-video-dialog {
    width: min(90vw, 960px);
    padding: 0;
    border: 0;
    background: #000;
}

.ebb-video-dialog::backdrop {
    background: rgb(0 0 0 / 75%);
}

.ebb-video-dialog__frame iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.ebb-video-dialog__close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 40px;
    height: 40px;
    border: 0;
    background: rgb(0 0 0 / 60%);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.ebb-hero__tile a {
    display: block;
    padding: 0 8px 7px;
    border-radius: 8px;
    background: #fff;
}

.ebb-hero__tile a:hover {
    background: var(--wp--preset--color--gray);
}

@media (max-width: 639px) {
    .ebb-hero--home h1 {
        font-size: 24px;
        line-height: 32px;
    }

    .ebb-hero--home h2 {
        font-size: 20px;
        line-height: 28px;
    }

    .ebb-hero__tiles.wp-block-group {
        flex-direction: column;
        gap: 24px;
    }

    .ebb-hero__tile img {
        width: 192px !important;
        height: auto !important;
    }
}

.ebb-image-dialog {
    max-width: 100vw;
    max-height: 100vh;
    padding: 0;
    border: 0;
    background: none;
}

.ebb-image-dialog::backdrop {
    background: rgb(0 0 0 / 70%);
}

.ebb-image-dialog img {
    display: block;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
}

.ebb-image-dialog__close {
    position: fixed;
    top: 0;
    right: 0;
    margin: 24px;
    padding: 0 8px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.ebb-feed .wp-block-post-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ebb-feed .wp-block-post-terms a {
    font-weight: 500;
}

.ebb-feed .wp-block-post-excerpt__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 0;
    font-size: 1.125rem;
    font-weight: 100;
    line-height: 1.625;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ebb-feed .wp-block-post-excerpt__more-text {
    margin: 0;
}

.ebb-feed .wp-block-post-excerpt__more-text a {
    color: var(--wp--preset--color--bright-blue);
    font-weight: 700;
}

/* Outranks WordPress's zeroed margin on a container's last block. */
:root .wpcf7 {
    margin-bottom: 4rem;
}

.wpcf7 .wpcf7-form-control-wrap {
    display: block;
}

.wpcf7 :is(input:not([type="checkbox"], [type="radio"], [type="submit"]), select, textarea) {
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    font: inherit;
    line-height: 26px;
}

.wpcf7 :is(input:not([type="checkbox"], [type="radio"], [type="submit"]), textarea) {
    display: block;
    width: 100%;
}

.wpcf7 select.wpcf7-select {
    padding-right: 40px;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 8px center / 24px no-repeat;
    appearance: none;
}

.wpcf7 input[type="checkbox"] {
    position: relative;
    top: -2px;
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 4px;
    background: #fff center / 100% no-repeat;
    vertical-align: middle;
    appearance: none;
}

.wpcf7 input[type="checkbox"]:checked {
    border-color: transparent;
    background-color: #2563eb;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.wpcf7 input[type="checkbox"]:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.wpcf7 .wpcf7-checkbox {
    display: flex;
    flex-direction: column;
    line-height: 26px;
}

.wpcf7 .wpcf7-list-item {
    margin: 0;
}

.wpcf7 hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--wp--preset--color--light-gray);
}

.ebb-form__row,
.ebb-form__field {
    margin-bottom: 32px;
}

.ebb-form__row--flush {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .ebb-form__row {
        display: flex;
        gap: 16px;
    }

    .ebb-form__row > * {
        flex: 1;
    }
}

.ebb-form__req {
    color: var(--wp--preset--color--bright-blue);
}

.wpcf7 .ebb-form__heading {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 28px;
}

.ebb-form__hint {
    font-size: 14px;
    line-height: 20px;
}

.ebb-form__box {
    padding: 16px;
    background-color: var(--wp--preset--color--gray);
}

.ebb-form__box-title {
    font-weight: 700;
}

.ebb-form__box--grid .wpcf7-checkbox {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    column-gap: 16px;
    max-width: 320px;
}

.ebb-form__card {
    box-sizing: border-box;
    max-width: 512px;
    padding: 24px;
    background-color: #fff;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
}

.ebb-form__stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.wpcf7 .wp-element-button {
    vertical-align: top;
    line-height: 26px;
    cursor: pointer;
}
