.jsm-search,
.jsm-search * {
    box-sizing: border-box;
}

.jsm-search {
    width: 100%;
    max-width: 1100px;
    margin: 1.5rem auto 3rem;
    color: inherit;
    font: inherit;
}

.jsm-search a {
    color: inherit;
}

.jsm-search__header {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
}

.jsm-search__header h2 {
    margin: 0 0 .65rem;
    color: inherit;
    font-family: inherit;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: normal;
}

.jsm-search__header p {
    max-width: 780px;
    margin: .4rem 0 0;
    color: inherit;
    font: inherit;
    line-height: 1.65;
    opacity: .86;
}

.jsm-search__author-link {
    font-size: .95rem;
}

.jsm-search__author-link a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .15em;
}

.jsm-search__form {
    margin: 0 0 1.75rem;
    padding: 1.25rem;
    border: 1px solid rgba(127, 127, 127, .28);
    border-radius: 10px;
    background: var(--wp--preset--color--base, #fff);
    color: inherit;
    box-shadow: none;
}

.jsm-search__query-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
}

.jsm-search__query-row input[type="search"] {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: .7rem .85rem;
    border: 1px solid rgba(127, 127, 127, .4);
    border-radius: 5px;
    background: var(--wp--preset--color--base, #fff);
    color: inherit;
    font: inherit;
}

.jsm-search__query-row input[type="search"]:focus,
.jsm-search__filters input:focus,
.jsm-search__filters select:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.jsm-search__query-row button {
    min-height: 46px;
    padding: .7rem 1.25rem;
    border: 1px solid currentColor;
    border-radius: 5px;
    background: var(
        --wp--preset--color--contrast,
        #111
    );
    color: var(
        --wp--preset--color--base,
        #fff
    );
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.jsm-search__filters {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.5fr)
        repeat(2, minmax(105px, .65fr))
        minmax(150px, .9fr)
        minmax(135px, .8fr);
    gap: .75rem;
    margin-top: 1rem;
}

.jsm-search__filters label {
    display: grid;
    gap: .35rem;
}

.jsm-search__filters label > span {
    color: inherit;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    opacity: .78;
}

.jsm-search__filters input,
.jsm-search__filters select {
    width: 100%;
    min-height: 40px;
    padding: .55rem .65rem;
    border: 1px solid rgba(127, 127, 127, .4);
    border-radius: 5px;
    background: var(--wp--preset--color--base, #fff);
    color: inherit;
    font: inherit;
    font-size: .9rem;
}

.jsm-search__syntax {
    margin: 1rem 0 0;
    color: inherit;
    font-size: .85rem;
    line-height: 1.6;
    opacity: .72;
}

.jsm-search__syntax code {
    padding: .1rem .3rem;
    border-radius: 3px;
    background: rgba(127, 127, 127, .12);
    color: inherit;
}

.jsm-search__summary {
    margin: 0 0 1rem;
    color: inherit;
    font-size: .95rem;
}

.jsm-search__results {
    display: grid;
    gap: 1rem;
}

.jsm-search-result {
    padding: 1.15rem 1.25rem;
    border: 1px solid rgba(127, 127, 127, .25);
    border-radius: 8px;
    background: var(--wp--preset--color--base, #fff);
    color: inherit;
    box-shadow: none;
}

.jsm-search-result:hover {
    border-color: rgba(127, 127, 127, .5);
    box-shadow: none;
}

.jsm-search-result__type {
    margin: 0 0 .4rem;
    color: inherit;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .64;
}

.jsm-search-result h3 {
    margin: 0 0 .3rem;
    color: inherit;
    font-family: inherit;
    font-size: 1.2rem;
    line-height: 1.35;
    letter-spacing: normal;
}

.jsm-search-result h3 a {
    color: inherit;
    text-decoration: none;
}

.jsm-search-result h3 a:hover {
    text-decoration: underline;
    text-underline-offset: .15em;
}

.jsm-search-result__author {
    margin: .25rem 0;
    color: inherit;
    font-size: .95rem;
    font-weight: 600;
    opacity: .85;
}

.jsm-search-result__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .8rem;
    margin-top: .55rem;
    color: inherit;
    font-size: .85rem;
    opacity: .72;
}

.jsm-search-result__meta span + span::before {
    margin-right: .8rem;
    content: "•";
    opacity: .5;
}

.jsm-search-result__issue {
    margin-top: .5rem;
    color: inherit;
    font-size: .85rem;
    opacity: .72;
}

.jsm-search-result__excerpt {
    max-width: 880px;
    margin: .75rem 0 0;
    color: inherit;
    font-size: .95rem;
    line-height: 1.65;
    opacity: .86;
}

.jsm-search-result__open {
    display: inline-block;
    margin-top: .85rem;
    padding: .45rem .75rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.jsm-search-result__open:hover {
    background: rgba(127, 127, 127, .1);
}

.jsm-search__empty {
    padding: 2rem 1.25rem;
    border: 1px dashed rgba(127, 127, 127, .4);
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: center;
}

.jsm-search__empty h3 {
    margin: 0;
    color: inherit;
    font-size: 1.2rem;
}

.jsm-search__empty p {
    margin: .5rem 0 0;
    color: inherit;
    opacity: .75;
}

.jsm-search__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 1.5rem;
}

.jsm-search__pagination a {
    display: inline-grid;
    place-items: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: .25rem;
    border: 1px solid rgba(127, 127, 127, .35);
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}

.jsm-search__pagination a:hover,
.jsm-search__pagination a.is-current {
    border-color: currentColor;
    background: var(
        --wp--preset--color--contrast,
        #111
    );
    color: var(
        --wp--preset--color--base,
        #fff
    );
}

@media (max-width: 900px) {
    .jsm-search__filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .jsm-search {
        margin-top: 1rem;
    }

    .jsm-search__form {
        padding: 1rem;
    }

    .jsm-search__query-row,
    .jsm-search__filters {
        grid-template-columns: 1fr;
    }

    .jsm-search__query-row button {
        width: 100%;
    }

    .jsm-search-result {
        padding: 1rem;
    }

    .jsm-search-result__meta {
        display: grid;
        gap: .2rem;
    }

    .jsm-search-result__meta span + span::before {
        display: none;
    }
}

/*
 * Search field and button spacing refinement.
 */
.jsm-search__query-row {
    column-gap: 1rem;
    align-items: center;
}

.jsm-search__query-row button {
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: .45rem .85rem;
    font-size: .9rem;
    line-height: 1.2;
    white-space: nowrap;
    justify-self: start;
}

@media (max-width: 620px) {
    .jsm-search__query-row {
        row-gap: .75rem;
    }

    .jsm-search__query-row button {
        width: auto;
        min-height: 38px;
        justify-self: start;
    }
}

/* JSM SEARCH FORM REDESIGN START */

/*
 * Public Search the Archive form.
 * This block intentionally overrides earlier experimental rules.
 */

.jsm-search {
    width: 100%;
    max-width: 1180px;
    margin: 1.5rem auto 3rem;
}

.jsm-search__form {
    width: 100%;
    margin: 0 0 1.75rem;
    padding: 2rem;
    border: 1px solid rgba(20, 20, 20, .14);
    border-radius: 14px;
    background: #fff;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .025),
        0 8px 24px rgba(0, 0, 0, .035);
}

/*
 * Search field and button.
 */
.jsm-search__query-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    margin: 0;
}

.jsm-search__query-row input[type="search"] {
    width: 100%;
    min-width: 0;
    height: 56px;
    min-height: 56px;
    margin: 0;
    padding: 0 1rem;
    border: 1px solid rgba(20, 20, 20, .24);
    border-radius: 7px;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 1rem;
    line-height: 1.2;
    box-shadow: none;
}

.jsm-search__query-row input[type="search"]:hover {
    border-color: rgba(20, 20, 20, .36);
}

.jsm-search__query-row input[type="search"]:focus {
    border-color: #171717;
    outline: 2px solid rgba(20, 20, 20, .12);
    outline-offset: 2px;
    box-shadow: none;
}

.jsm-search__query-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 104px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0 .95rem;
    border: 1px solid #171717;
    border-radius: 6px;
    background: #171717;
    color: #fff;
    font: inherit;
    font-size: .94rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
}

.jsm-search__query-row button:hover {
    border-color: #333;
    background: #333;
    color: #fff;
}

.jsm-search__query-row button:focus-visible {
    outline: 2px solid #171717;
    outline-offset: 3px;
}

/*
 * Filter row.
 */
.jsm-search__filters {
    display: grid;
    grid-template-columns:
        minmax(230px, 1.65fr)
        minmax(110px, .72fr)
        minmax(110px, .72fr)
        minmax(180px, 1fr)
        minmax(160px, .9fr);
    align-items: end;
    gap: 1rem;
    width: 100%;
    margin: 1.75rem 0 0;
}

.jsm-search__filters label {
    display: grid;
    grid-template-rows: auto 46px;
    gap: .5rem;
    min-width: 0;
    margin: 0;
}

.jsm-search__filters label > span {
    display: block;
    margin: 0;
    color: #303030;
    font: inherit;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
    opacity: 1;
}

.jsm-search__filters input,
.jsm-search__filters select {
    width: 100%;
    height: 46px;
    min-height: 46px;
    margin: 0;
    padding: 0 .8rem;
    border: 1px solid rgba(20, 20, 20, .22);
    border-radius: 6px;
    background-color: #fff;
    color: #222;
    font: inherit;
    font-size: .96rem;
    line-height: 1.2;
    box-shadow: none;
}

.jsm-search__filters select {
    padding-right: 2.25rem;
    cursor: pointer;
}

.jsm-search__filters input:hover,
.jsm-search__filters select:hover {
    border-color: rgba(20, 20, 20, .35);
}

.jsm-search__filters input:focus,
.jsm-search__filters select:focus {
    border-color: #171717;
    outline: 2px solid rgba(20, 20, 20, .12);
    outline-offset: 2px;
    box-shadow: none;
}

/*
 * Advanced examples.
 */
.jsm-search__syntax {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem .45rem;
    margin: 1.5rem 0 0;
    color: #585858;
    font: inherit;
    font-size: .88rem;
    line-height: 1.65;
    opacity: 1;
}

.jsm-search__syntax code {
    display: inline-block;
    margin: 0;
    padding: .16rem .4rem;
    border: 0;
    border-radius: 4px;
    background: #f1f1f1;
    color: #565656;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: .86rem;
    line-height: 1.4;
    white-space: nowrap;
}

/*
 * Medium screens.
 */
@media (max-width: 980px) {
    .jsm-search__form {
        padding: 1.5rem;
    }

    .jsm-search__filters {
        grid-template-columns:
            minmax(220px, 1.4fr)
            repeat(2, minmax(110px, .7fr));
    }

    .jsm-search__filters label:nth-child(4),
    .jsm-search__filters label:nth-child(5) {
        grid-column: span 1;
    }
}

/*
 * Tablets and phones.
 */
@media (max-width: 700px) {
    .jsm-search {
        margin-top: 1rem;
    }

    .jsm-search__form {
        padding: 1.15rem;
        border-radius: 10px;
    }

    .jsm-search__query-row {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .jsm-search__query-row input[type="search"] {
        height: 50px;
        min-height: 50px;
    }

    .jsm-search__query-row button {
        min-width: 96px;
        height: 40px;
        min-height: 40px;
        justify-self: start;
    }

    .jsm-search__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .9rem;
        margin-top: 1.25rem;
    }

    .jsm-search__filters label:first-child {
        grid-column: 1 / -1;
    }

    .jsm-search__syntax {
        margin-top: 1.25rem;
    }
}

/*
 * Narrow phones.
 */
@media (max-width: 460px) {
    .jsm-search__filters {
        grid-template-columns: 1fr;
    }

    .jsm-search__filters label,
    .jsm-search__filters label:first-child {
        grid-column: auto;
    }

    .jsm-search__query-row button {
        width: 100%;
    }
}

/* JSM SEARCH FORM REDESIGN END */

/* JSM SEARCH INPUT SIZING START */

/*
 * The input previously used content-box sizing. Its horizontal
 * padding and borders were added outside width: 100%, causing it
 * to overflow its grid column and sit beneath the Search button.
 */
.jsm-search,
.jsm-search *,
.jsm-search *::before,
.jsm-search *::after {
    box-sizing: border-box;
}

.jsm-search .jsm-search__query-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.jsm-search .jsm-search__query-row input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

.jsm-search .jsm-search__query-row button[type="submit"] {
    position: static;
    width: auto;
    min-width: 104px;
    margin: 0;
    justify-self: start;
}

@media (max-width: 700px) {
    .jsm-search .jsm-search__query-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* JSM SEARCH INPUT SIZING END */

