.dw-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 7px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.dw-theme-toggle:hover {
    background: rgba(128, 128, 128, 0.15);
}

.dw-theme-toggle svg {
    display: block;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dw-theme-toggle:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 3px;
}

@media (min-width: 768px) {
    .dw-theme-toggle--mobile {
        display: none !important;
    }

    #gh-head .gh-head-actions .dw-theme-toggle--desktop {
        margin-right: 8px;
    }
}

@media (max-width: 767px) {
    #gh-head .gh-head-brand {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 36px 36px 30px;
        align-items: center;
        column-gap: 10px;
        grid-auto-flow: row;
    }

    #gh-head .gh-head-brand-wrapper {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    #gh-head .dw-theme-toggle--mobile {
        grid-column: 2;
        grid-row: 1;
    }

    #gh-head .gh-head-brand > .gh-search {
        grid-column: 3;
        grid-row: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin: 0;
    }

    #gh-head .gh-head-brand > .gh-burger {
        grid-column: 4;
        grid-row: 1;
        margin: 0;
        justify-self: center;
    }

    .dw-theme-toggle--desktop {
        display: none !important;
    }
}
