/* The logo replaces the theme's page-title header on solver pages;
   the site menu/search bar and extra top padding go too. */
body.rws-page .entry-header,
body.rws-page #site-header {
    display: none;
}

body.rws-page .page-container {
    padding-top: 0;
}

body.rws-page .post-inner {
    padding-top: 0;
}

body.rws-page #site-content {
    padding-top: 0;
    margin-top: 0;
}

body.rws-page .entry-content,
body.rws-page .entry-content > *:first-child,
body.rws-page .rws-solver {
    margin-top: 0;
    padding-top: 0;
}

body.rws-page {
    overflow-x: hidden;
}

body.rws-page .entry-content p:empty {
    display: none;
}

/* Full-bleed blue band matching the logo's background, flush to the top */
.rws-logo-bar {
    width: 100vw;
    margin: 0 calc(50% - 50vw);
    display: flex;
    justify-content: center;
    background: rgb(7, 89, 224);
}

.rws-solver .rws-logo {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.rws-solver {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: min(32px, 1.8vh);
    padding: 0 0 40px;
}

.rws-grid-wrap {
    margin-top: min(20px, 1.5vh);
}

.rws-grid-wrap {
    position: relative;
}

.rws-grid {
    display: flex;
    flex-direction: column;
    gap: min(8px, 0.7vh);
}

.rws-solver button.rws-help-btn {
    position: absolute;
    top: 0;
    right: -40px;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 2px solid #565758;
    border-radius: 50%;
    background: transparent;
    color: #d7dadc;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.12s ease, color 0.12s ease;
}

.rws-solver button.rws-help-btn:hover {
    border-color: #8a8a8e;
    color: #ffffff;
}

.rws-solver button.rws-reset-btn {
    position: absolute;
    top: 0;
    left: -40px;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 2px solid #565758;
    border-radius: 50%;
    background: transparent;
    color: #d7dadc;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.12s ease, color 0.12s ease;
}

.rws-solver button.rws-reset-btn:hover {
    border-color: #d05050;
    color: #ffffff;
}

.rws-solver button.rws-addrow-btn {
    margin-left: 10px;
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    background: #3e93f5;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.rws-solver button.rws-addrow-btn:hover {
    background: #5da4f7;
}

.rws-help-panel {
    position: absolute;
    top: 36px;
    right: -40px;
    z-index: 10;
    width: 250px;
    padding: 14px 16px;
    border: 1px solid #3a3a3c;
    border-radius: 8px;
    background: #121216;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    color: #d7dadc;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.rws-help-panel ul {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: disc;
}

.rws-help-panel li {
    margin: 0 0 6px;
}

.rws-help-panel li:last-child {
    margin-bottom: 0;
}

.rws-row {
    display: flex;
    gap: min(8px, 0.7vh);
}

/* High-specificity override of Twenty Twenty's input[type="text"] rules
   (padding: 1.5rem 1.8rem, width: 100%, font-size: 1.6rem, etc.) */
.rws-solver input[type="text"].rws-tile {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: inline-block;
    width: min(72px, 7.5vh);
    height: min(72px, 7.5vh);
    max-width: none;
    padding: 0;
    margin: 0;
    border: 2px solid #3a3a3c;
    border-radius: 6px;
    box-shadow: none;
    background: #121216;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: min(40px, 4.2vh);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    caret-color: transparent;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
}

.rws-solver input[type="text"].rws-tile:focus {
    outline: none;
    border-color: #8a8a8e;
}

.rws-solver input[type="text"].rws-tile.rws-filled {
    border-color: #565758;
}

.rws-solver input[type="text"].rws-tile.rws-yellow {
    background: #b59f3b;
    border-color: #b59f3b;
}

.rws-solver input[type="text"].rws-tile.rws-green {
    background: #538d4e;
    border-color: #538d4e;
}

.rws-solver .rws-suggest-btn {
    padding: min(16px, 1vh) 56px;
    border: none;
    border-radius: 8px;
    background: #3e93f5;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.08s ease;
}

.rws-solver .rws-suggest-btn:hover,
.rws-solver .rws-suggest-btn:focus {
    background: #5da4f7;
    text-decoration: none;
}

.rws-solver .rws-suggest-btn.rws-solved,
.rws-solver .rws-suggest-btn.rws-solved:hover {
    background: #3a3a3c;
    color: #7b7d80;
    cursor: default;
}

.rws-solver .rws-suggest-btn:active {
    transform: scale(0.97);
}

.rws-keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.rws-kb-row {
    display: flex;
    gap: 6px;
}

.rws-solver button.rws-key {
    box-sizing: border-box;
    width: 44px;
    height: min(58px, 5.5vh);
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 4px;
    background: #818384;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.rws-solver button.rws-key:hover {
    background: #939597;
}

/* Auto-blocked: letter eliminated by the grid (gray guess) */
.rws-solver button.rws-key.rws-key-auto,
.rws-solver button.rws-key.rws-key-auto:hover {
    background: #3a3a3c;
    color: #7b7d80;
}

/* User-blocked: clicked by the user — a shade darker than auto */
.rws-solver button.rws-key.rws-key-user,
.rws-solver button.rws-key.rws-key-user:hover {
    background: #232326;
    color: #5c5e62;
}

.rws-message {
    min-height: 1.4em;
    color: #d7dadc;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    letter-spacing: 0.04em;
}

@media (max-width: 480px) {
    .rws-grid,
    .rws-row {
        gap: 6px;
    }

    .rws-solver input[type="text"].rws-tile {
        width: min(58px, 7.5vh);
        height: min(58px, 7.5vh);
        font-size: min(32px, 4.2vh);
    }

    .rws-kb-row {
        gap: 4px;
    }

    .rws-solver button.rws-key {
        width: 32px;
        height: 48px;
        font-size: 15px;
    }

    .rws-solver button.rws-help-btn {
        right: -34px;
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .rws-help-panel {
        right: -34px;
        width: 230px;
    }

}

@media (max-width: 800px) {
    .rws-solver button.rws-reset-btn {
        left: 0;
        top: -34px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .rws-solver button.rws-help-btn {
        right: 0;
        top: -34px;
        width: 24px;
        height: 24px;
    }

    .rws-help-panel {
        right: 0;
    }

    .rws-grid-wrap {
        margin-top: 40px;
    }
}
