:root {
    --font-size-base: clamp(16px, 3vw, 24px);
    --font-size-large: clamp(24px, 5vw, 48px);

    --display-xxs: 0.266em;
    --body-xxs: 0.382em;

    --display-xs: 0.431em;
    --body-xs: 0.618em;

    --display-s: 0.697em;
    --body-s: 1em;

    --display-m: 1.128em;
    --body-m: 1.618em;

    --display-l: 1.825em;
    --body-l: 2.618em;

    --display-xl: 2.953em;
    --body-xl: 4.236em;

    --display-xxl: 4.778em;
    --body-xxl: 6.854em;

    --line-height: calc(var(--font-size-base) * 1.5);
}

.center-all {
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-text {
    width: 100%;
    text-align: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.mb-display-xxs {
    margin-bottom: var(--display-xxs);
}

.mb-display-xs {
    margin-bottom: var(--display-xs);
}

.mb-display-s {
    margin-bottom: var(--display-s);
}

.mb-display-m {
    margin-bottom: var(--display-m);
}

.mb-display-l {
    margin-bottom: var(--display-l);
}

.mb-display-xl {
    margin-bottom: var(--display-xl);
}

.mb-display-xxl {
    margin-bottom: var(--display-xxl);
}

.mb-body-xxs {
    margin-bottom: var(--body-xxs);
}

.mb-body-xs {
    margin-bottom: var(--body-xs);
}

.mb-body-s {
    margin-bottom: var(--body-s);
}

.mb-body-m {
    margin-bottom: var(--body-m);
}

.mb-body-l {
    margin-bottom: var(--body-l);
}

.mb-body-xl {
    margin-bottom: var(--body-xl);
}

.mb-body-xxl {
    margin-bottom: var(--body-xxl);
}

small {
    font-size: calc(0.5 * var(--font-size-large));
}

.grid-max {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(415px, 1fr));
    gap: var(--body-m);
}

.search-results-page {
    padding-top: var(--body-xl);
    width: 100%;
    max-width: 80ch;
    margin: 0 auto;
}

.search-results-list article {
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
}

.search-results-list .excerpt {
    color: #555;
}

.pagination {
    margin-top: 2rem;
    text-align: center;
}

.search-title {
    font-family: "TexGyreHeros", sans-serif;
}

.highlight {
    background: #ffe564;
    padding: 0 2px;
    border-radius: 2px;
}

.ellipsis {
    text-align: center;
    color: #888;
    font-style: italic;
    margin: 0.5rem 0;
}

.search-results-list img {
    width: 100%;
    height: auto;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;

    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    height: 100vh;
    width: 100vw;
}

.search-overlay-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    display: inline-flex;
    width: 90%;
    max-width: 60ch;
    padding: var(--body-m);
}

.searchform {
    width: 100%;
}

input.search-submit,
input.search-input {
    border: none;
    font-size: calc(var(--font-size-base) * 1.2);
    padding: 0.5rem;
    width: 100% !important;
    border-bottom: 1px solid #aaa;
    font-family: "TexGyreHeros", sans-serif;
}

input.search-input:focus {
    outline: none;
}

.search-submit {
    background: var(--color-red);
    color: #fff;
    border: none;
    padding: calc(var(--font-size-base) * 0.5) !important;
    font-size: var(--font-size-base);
    cursor: pointer;
}

.searchform h3 {
    font-family: "TexGyreHeros", sans-serif;
    font-weight: 400;
}
