body {
    max-width: 80ch;
}

textarea {
    box-sizing: border-box;
    display: block;
    font: inherit;
    font-size: smaller;
    min-height: 16rem;
    max-width: 100%;
    padding: 0.75rem;
    width: 100%;
}

.check-button {
    background: linear-gradient(135deg, #005eb8, #0a74d6);
    border: 1px solid #004a93;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 94, 184, 0.25);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    margin-top: 0.8rem;
    padding: 0.55rem 1.1rem;
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.check-button:hover {
    box-shadow: 0 4px 10px rgba(0, 94, 184, 0.35);
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.check-button:active {
    transform: translateY(0);
}

.check-button:focus-visible {
    outline: 3px solid #98c5f0;
    outline-offset: 2px;
}

.demo-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.5rem;
}

.panel {
    border: 1px solid #DEE0E2;
    border-radius: 6px;
    padding: 0.5rem;
}

.panel label {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.panel h3 {
    color: #005eb8;
    margin: 0 0 0.5rem 0;
}

.results-panel h3 {
    color: #005eb8;
    margin: 0 0 0.5rem 0;
}

.results-output {
    background-color: #f7f9fb;
    border: 1px solid #DEE0E2;
    border-radius: 2px;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.6em;
    line-height: 1.45;
    min-height: 16rem;
    overflow: auto;
    overflow-wrap: anywhere;
    padding: 0.10rem;
    width: 49ch;
    max-width: 100%;
    white-space: pre-wrap;
}

.misspelled {
    background: #fff1c2;
    border-bottom: 2px solid #d97706;
    padding: 0 2px;
    cursor: pointer;
}

.suggestion-select {
    display: none;
    font-size: 0.9rem;
}

.suggestion-select.open {
    display: inline-block;
}

.word-editor {
    display: inline;
}

.word-editor .misspelled.hidden {
    display: none;
}

.k { color:#f97316; } /* keys */
.s { color:#10b981; }   /* strings */
.n { color:#60a5fa; }   /* numbers */
.b { color:#f472b6; }   /* boolean */
.u { color:#94a3b8; }   /* null / undefined / punctuation */

@media (max-width: 800px) {
    .demo-grid {
        grid-template-columns: 1fr;
    }
}

hr {
    border: 0;
    border-top: 1px solid #DEE0E2;
    display: block;
    height: 1px;
    margin: 1em 0;
    padding: 0;
}

#inline-demo {
    display: none;
}
