.stc-quiz-shell {
    --stc-ink: #1f1a14;
    --stc-muted: #665b50;
    --stc-bone: #f7f1e6;
    --stc-clay: #9c4f2f;
    --stc-clay-dark: #6f3323;
    --stc-cedar: #244d3f;
    --stc-sky: #dbe9ea;
    --stc-gold: #c7963e;
    --stc-border: rgba(31, 26, 20, 0.18);
    --stc-shadow: 0 18px 50px rgba(31, 26, 20, 0.12);
    background:
        linear-gradient(135deg, rgba(156, 79, 47, 0.08), transparent 32%),
        linear-gradient(180deg, #fffaf0 0%, var(--stc-bone) 100%);
    border: 1px solid var(--stc-border);
    color: var(--stc-ink);
    font-family: Georgia, "Times New Roman", serif;
    margin: 0 auto;
    max-width: 1100px;
    padding: clamp(14px, 2.8vw, 28px);
}

.stc-quiz-shell * {
    box-sizing: border-box;
}

.stc-quiz-shell button,
.stc-quiz-shell input {
    font: inherit;
}

.stc-quiz-panel,
.stc-question-panel,
.stc-results-panel {
    background: rgba(255, 252, 244, 0.9);
    border: 1px solid var(--stc-border);
    border-radius: 8px;
    box-shadow: var(--stc-shadow);
}

.stc-quiz-panel {
    padding: clamp(18px, 3vw, 34px);
}

.stc-quiz-loading {
    color: var(--stc-muted);
}

.stc-quiz-kicker {
    color: var(--stc-clay-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.stc-quiz-shell h2,
.stc-quiz-shell h3 {
    color: var(--stc-ink);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 6px 0 10px;
}

.stc-quiz-shell h2 {
    font-size: clamp(1.55rem, 4.5vw, 2.6rem);
}

.stc-quiz-shell h3 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
}

.stc-quiz-lede {
    color: var(--stc-muted);
    font-size: clamp(0.98rem, 2vw, 1.12rem);
    line-height: 1.35;
    margin: 0 0 18px;
    max-width: 720px;
}

.stc-nickname-form {
    margin-top: 20px;
}

.stc-nickname-form label {
    color: var(--stc-cedar);
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stc-inline-form {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: 620px;
}

.stc-quiz-shell input {
    background: #fffdfa;
    border: 1px solid var(--stc-border);
    border-radius: 6px;
    min-height: 48px;
    padding: 0 14px;
    width: 100%;
}

.stc-quiz-shell button {
    align-items: center;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    justify-content: center;
    letter-spacing: 0;
    min-height: 44px;
    padding: 0 16px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.stc-quiz-shell button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.stc-answer-button:disabled {
    opacity: 1;
}

.stc-quiz-shell button:not(:disabled):hover {
    transform: translateY(-1px);
}

.stc-inline-form button,
.stc-primary {
    background: var(--stc-clay);
    color: #fffaf0;
}

.stc-secondary {
    background: #fffdfa;
    border: 1px solid var(--stc-border) !important;
    color: var(--stc-cedar);
}

.stc-link-button {
    background: transparent;
    color: var(--stc-clay-dark);
    min-height: 36px;
    padding: 0;
    text-decoration: underline;
}

.stc-quiz-topbar,
.stc-results-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.stc-category-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
}

.stc-category-card {
    align-items: flex-start !important;
    background: #fffdfa;
    border: 1px solid var(--stc-border) !important;
    color: var(--stc-ink);
    display: grid !important;
    gap: 6px;
    justify-content: stretch !important;
    min-height: 96px;
    padding: 14px !important;
    text-align: left;
}

.stc-category-card span {
    color: var(--stc-clay-dark);
    font-size: 1.02rem;
}

.stc-category-card small {
    color: var(--stc-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.45;
}

.stc-progress {
    background: rgba(36, 77, 63, 0.13);
    border-radius: 999px;
    height: 6px;
    margin: 2px 0 12px;
    overflow: hidden;
}

.stc-progress span {
    background: linear-gradient(90deg, var(--stc-cedar), var(--stc-gold));
    display: block;
    height: 100%;
}

.stc-question-panel {
    padding: clamp(16px, 3vw, 26px);
}

.stc-question-text {
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    line-height: 1.22;
    margin: 0 0 14px;
}

.stc-answer-list {
    display: grid;
    gap: 8px;
}

.stc-answer-button {
    background: #fffdfa;
    border: 1px solid var(--stc-border) !important;
    color: var(--stc-ink);
    display: grid !important;
    gap: 10px;
    grid-template-columns: 30px minmax(0, 1fr);
    justify-content: stretch !important;
    min-height: 48px;
    padding: 9px 12px !important;
    text-align: left;
    width: 100%;
}

.stc-answer-letter {
    align-items: center;
    background: var(--stc-sky);
    border-radius: 50%;
    color: var(--stc-cedar);
    display: inline-flex;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.stc-answer-button.is-correct {
    background: rgba(36, 77, 63, 0.1);
    border-color: rgba(36, 77, 63, 0.45) !important;
}

.stc-answer-button.is-incorrect {
    background: rgba(156, 79, 47, 0.1);
    border-color: rgba(156, 79, 47, 0.45) !important;
}

.stc-feedback {
    border-left: 5px solid var(--stc-cedar);
    margin-top: 12px;
    padding: 10px 12px;
}

.stc-feedback.is-incorrect {
    border-left-color: var(--stc-clay);
}

.stc-feedback p {
    color: var(--stc-muted);
    line-height: 1.4;
    margin: 6px 0 0;
}

.stc-source-note {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
}

.stc-source-note a {
    color: var(--stc-clay-dark);
    font-weight: 700;
}

.stc-next-button {
    margin-top: 12px;
}

.stc-summary h2 {
    color: var(--stc-cedar);
}

.stc-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stc-results-panel {
    margin-top: 14px;
    padding: clamp(14px, 2.6vw, 22px);
}

.stc-results-table-wrap {
    overflow-x: auto;
}

.stc-results-table {
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    min-width: 680px;
    width: 100%;
}

.stc-results-table th,
.stc-results-table td {
    border-bottom: 1px solid var(--stc-border);
    padding: 12px 10px;
    text-align: left;
}

.stc-results-table th {
    color: var(--stc-cedar);
    font-size: 0.78rem;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .stc-quiz-shell {
        border-left: 0;
        border-right: 0;
        padding: 16px;
    }

    .stc-inline-form,
    .stc-category-grid {
        grid-template-columns: 1fr;
    }

    .stc-quiz-topbar,
    .stc-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .stc-quiz-topbar button,
    .stc-results-heading button,
    .stc-inline-form button {
        width: 100%;
    }

    .stc-question-text {
        font-size: 1.08rem;
    }
}
