.sample-explorer {
    margin: 1.5em 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.sample-explorer summary {
    padding: 0.8em 1em;
    font-weight: bold;
    cursor: pointer;
}

.sample-explorer summary:hover {
    background: #f0f0f0;
}

.sample-explorer summary:focus-visible,
.sample-explorer select:focus-visible,
.sample-explorer-scroll:focus-visible {
    outline: 2px solid #316aa5;
    outline-offset: -3px;
}

.sample-explorer-body {
    padding: 0 1em 1em;
    border-top: 1px solid #ddd;
}

.sample-explorer-note,
.sample-explorer-legend,
.sample-explorer-score,
.sample-explorer-meta {
    font-size: 0.85em;
    color: #555;
}

.sample-explorer label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3em;
}

.sample-explorer select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 0.6em;
    border: 1px solid #aaa;
    border-radius: 4px;
    font: inherit;
    color: #333;
    background: white;
}

.sample-explorer-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em 0.8em;
    margin: 1em 0;
    align-items: center;
}

.sample-explorer-legend span,
.sample-explorer-classification {
    padding: 0.1em 0.4em;
    border-radius: 3px;
}

.sample-explorer .classification-ai {
    background: #fbe0cc;
    color: #683408;
}

.sample-explorer .classification-human {
    background: #dceef7;
    color: #184d68;
}

.sample-explorer h3 {
    font-size: 1em;
    margin: 1.2em 0 0.35em;
    line-height: 1.5;
}

.sample-explorer-classification {
    display: inline-block;
    font-size: 0.85em;
    font-weight: normal;
}

.sample-explorer-score {
    margin: 0 0 0.6em;
}

.sample-explorer-text {
    margin: 0;
    line-height: 1.8;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.sample-explorer-scroll {
    max-height: 26em;
    overflow-y: auto;
    padding-right: 0.5em;
}

.sample-explorer-meta {
    border-top: 1px solid #ddd;
    padding-top: 0.8em;
    margin: 1em 0 0;
}
