.postsrc-tool-result[hidden],
.postsrc-quiz-result[hidden],
.postsrc-quiz-navigation [hidden],
.postsrc-quiz-explanation[hidden] {
    display: none !important;
}

.postsrc-tool-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-top: 8px;
    padding: 24px;
    border: 1px solid var(--postsrc-line);
    border-radius: 8px;
    background: var(--postsrc-bg);
}

.postsrc-tool-result-title {
    margin: 0;
    color: var(--postsrc-ink);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0;
}

.postsrc-tool-notice,
.postsrc-tool-payload,
.postsrc-tool-status {
    margin: 0;
    color: var(--postsrc-muted);
}

.postsrc-tool-payload code {
    overflow-wrap: anywhere;
    color: var(--postsrc-ink);
}

.postsrc-qr-output {
    display: grid;
    width: min(320px, 100%);
    min-height: 280px;
    margin-inline: auto;
    padding: 16px;
    place-items: center;
    border: 1px solid var(--postsrc-line);
    border-radius: 6px;
    background: #fff;
}

.postsrc-qr-output svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

.postsrc-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.postsrc-tool-button,
.postsrc-quiz-navigation button,
.postsrc-quiz-result button,
.postsrc-quiz-result a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--postsrc-line);
    border-radius: 6px;
    color: var(--postsrc-ink);
    background: var(--postsrc-surface);
    font: inherit;
    font-weight: 750;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
}

.postsrc-tool-button:hover,
.postsrc-quiz-navigation button:hover,
.postsrc-quiz-result button:hover,
.postsrc-quiz-result a:hover {
    border-color: var(--postsrc-amber);
    background: rgba(245, 158, 11, .12);
}

.postsrc-generated-document {
    display: block;
    width: 100%;
    min-height: 380px;
    padding: 18px;
    resize: vertical;
    border: 1px solid var(--postsrc-line);
    border-radius: 6px;
    color: var(--postsrc-ink);
    background: var(--postsrc-surface);
    font: 500 .95rem/1.65 var(--postsrc-body-font, system-ui, sans-serif);
    letter-spacing: 0;
}

.postsrc-tool-status {
    min-height: 1.5em;
    font-weight: 650;
}

.postsrc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 100px;
    color: var(--postsrc-muted);
    font-weight: 650;
}

.postsrc-breadcrumb a {
    color: var(--postsrc-muted);
    text-decoration: none;
}

.postsrc-breadcrumb a:hover {
    color: var(--postsrc-amber-dark);
    text-decoration: underline;
}

.postsrc-quiz-intro {
    max-width: 820px;
    margin: 52px auto 36px;
    text-align: center;
}

.postsrc-quiz-intro h1 {
    margin: 0 0 14px;
    color: var(--postsrc-ink);
    font-size: 2.5rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.postsrc-quiz-intro p {
    margin: 8px 0;
    color: var(--postsrc-muted);
    font-size: 1.1rem;
    line-height: 1.7;
}

.postsrc-quiz {
    width: min(860px, 100%);
    margin: 0 auto 80px;
    padding: 28px;
    border: 1px solid var(--postsrc-line);
    border-radius: 8px;
    background: var(--postsrc-surface);
    box-shadow: 0 12px 34px rgba(39, 39, 42, .08);
}

.postsrc-quiz-progress {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.postsrc-quiz-progress p {
    flex: 0 0 auto;
    margin: 0;
    color: var(--postsrc-muted);
    font-weight: 750;
}

.postsrc-quiz-progress progress {
    width: 100%;
    height: 10px;
    accent-color: var(--postsrc-amber);
}

.postsrc-quiz-status {
    min-height: 24px;
    margin-bottom: 4px;
    color: #b91c1c;
    font-weight: 700;
}

.dark .postsrc-quiz-status {
    color: #fca5a5;
}

.postsrc-quiz.quiz-enhanced .postsrc-quiz-question:not(.is-active) {
    display: none;
}

.postsrc-quiz-question {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

.postsrc-quiz-question legend {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--postsrc-ink);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: 0;
}

.postsrc-quiz-question legend span {
    color: var(--postsrc-amber-dark);
    font-size: .85rem;
    text-transform: uppercase;
}

.postsrc-quiz-question pre {
    margin: 0 0 20px;
    padding: 18px;
    overflow-x: auto;
    border-radius: 6px;
    color: #f4f4f5;
    background: #18181b;
    font-size: .95rem;
    line-height: 1.65;
}

.postsrc-quiz-options {
    display: grid;
    gap: 12px;
}

.postsrc-quiz-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 15px 16px;
    border: 1px solid var(--postsrc-line);
    border-radius: 6px;
    color: var(--postsrc-ink);
    background: var(--postsrc-bg);
    cursor: pointer;
}

.postsrc-quiz-option:hover {
    border-color: var(--postsrc-amber);
}

.postsrc-quiz-option input {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--postsrc-amber-dark);
}

.postsrc-quiz-question.is-correct .postsrc-quiz-option:has(input:checked) {
    border-color: #059669;
    background: rgba(5, 150, 105, .12);
}

.postsrc-quiz-question.is-incorrect .postsrc-quiz-option:has(input:checked) {
    border-color: #dc2626;
    background: rgba(220, 38, 38, .1);
}

.postsrc-quiz-question.is-incorrect .postsrc-quiz-option.is-answer {
    border-color: #059669;
    background: rgba(5, 150, 105, .12);
}

.postsrc-quiz-explanation {
    margin: 18px 0 0;
    padding: 14px 16px;
    border-left: 3px solid var(--postsrc-amber);
    color: var(--postsrc-muted);
    background: rgba(245, 158, 11, .08);
    line-height: 1.65;
}

.postsrc-quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}

.postsrc-quiz-navigation [data-quiz-next],
.postsrc-quiz-navigation [data-quiz-submit] {
    margin-left: auto;
    border-color: var(--postsrc-amber);
    color: #18181b;
    background: #fbbf24;
}

.postsrc-quiz-result {
    margin-top: 28px;
    padding: 24px;
    border-top: 1px solid var(--postsrc-line);
    text-align: center;
}

.postsrc-quiz-score {
    margin: 0 0 8px;
    color: var(--postsrc-ink);
    font-size: 2rem;
    font-weight: 850;
}

.postsrc-quiz-result > p:not(.postsrc-quiz-score) {
    margin: 0 0 20px;
    color: var(--postsrc-muted);
}

.postsrc-quiz-result button,
.postsrc-quiz-result a {
    margin: 4px;
}

@media (max-width: 640px) {
    [data-word-capitalizer] .grid-cols-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .postsrc-tool-result,
    .postsrc-quiz {
        padding: 20px;
    }

    .postsrc-tool-actions > *,
    .postsrc-quiz-result button,
    .postsrc-quiz-result a {
        width: 100%;
    }

    .postsrc-breadcrumb {
        padding-top: 86px;
    }

    .postsrc-quiz-intro {
        margin: 36px auto 26px;
        text-align: left;
    }

    .postsrc-quiz-intro h1 {
        font-size: 2rem;
    }

    .postsrc-quiz-progress {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .postsrc-quiz-question legend {
        font-size: 1.15rem;
    }
}
