/* Seção de estudo ativo — segue a linguagem neobrutalista de base_style.css */
.study { font-family: 'IBM Plex Mono', monospace; }
.study-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
#study .study-score { font-size: 14px; margin: 0; }

.study-controls { display: grid; gap: 10px; margin: 12px 0 20px; font-size: 13px; }
.study-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.study-filters { display: grid; gap: 8px; }

.study-chip, .study-think, .study-option, .study-grade {
    font-family: monospace;
    border: 2px solid #000;
    background: #fff;
    box-shadow: 3px 3px 0 #000;
    padding: 2px 10px;
    cursor: pointer;
}
.study .study-chip, .study .study-think, .study .study-option, .study .study-grade {
    /* main.css estiliza todo <button> (cor com !important, altura fixa, sem quebra de linha) */
    color: #000 !important;
    height: auto;
    line-height: 1.4;
    padding: 4px 10px;
    font-size: 12px;
    letter-spacing: normal;
    text-transform: none;
}
.study .study-option { white-space: normal; text-align: left; padding: 6px 12px; font-size: 14px; }
.study .study-chip { text-transform: lowercase; }
.study-header h2 { margin: 0; }
.study-chip[aria-pressed="true"] { background: yellow; font-weight: bold; }
.study-chip:hover, .study-think:hover, .study-option:not(:disabled):hover, .study-grade:not(:disabled):hover {
    transform: translate(-1px, -1px);
}
.study .neobrutalist-button { font-size: 13px; padding: 4px 12px; box-shadow: 4px 4px 0 #000; border-width: 3px; }

.study-pool { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.study-q { border: 3px solid #000; box-shadow: 6px 6px 0 #000; background: #fff; padding: 14px 16px; }
/* Faixa de resultado como sombra interna: não ocupa espaço, então o conteúdo não se desloca */
.study-q.is-correct { box-shadow: 6px 6px 0 #000, inset 7px 0 0 #1a7f37; }
.study-q.is-partial { box-shadow: 6px 6px 0 #000, inset 7px 0 0 #b08800; }
.study-q.is-wrong { box-shadow: 6px 6px 0 #000, inset 7px 0 0 #cf222e; }

.study-q-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 11px; text-transform: uppercase; margin-bottom: 8px; }
.study-q-type { font-weight: bold; }
.study-q-tags, .study-q-box { color: #555; }
.study-badge-externo { background: #000; color: yellow; padding: 1px 6px; font-weight: bold; letter-spacing: 1px; }
.study-q-source { font-size: 12px; color: #444; margin: 6px 0; }

.study-scratch { width: 100%; font-family: inherit; font-size: 13px; border: 2px dashed #888; padding: 6px; margin: 6px 0; resize: vertical; }
.study-reveal summary { cursor: pointer; font-weight: bold; margin: 6px 0; }
.study-answer { background: #fef9c3; border: 2px solid #000; padding: 8px 10px; margin: 6px 0; }
.study-explanation { font-size: 13px; margin: 6px 0; }
.study-grades, .study-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.study-options { flex-direction: column; align-items: stretch; }
.study-option { text-align: left; }
.study-option p, .study-answer p:last-child, .study-q-prompt p:last-child { margin-bottom: 0; }
.study-grade:disabled, .study-option:disabled { cursor: default; opacity: .6; }
.study-grade.is-chosen, .study-option.is-right, .study-option.is-wrong-choice { opacity: 1; font-weight: bold; }
.study-option.is-right { background: #d1f7d6; }
.study-option.is-wrong-choice { background: #ffd7d5; }
.study-verdict { font-weight: bold; margin: 8px 0 4px; }

#study .study-account { font-size: 11px; line-height: 1.4; color: #666; margin: 2px 0 8px; }
#study .study-account a { color: inherit; text-decoration: underline; }
.study-visit { font-size: 11px; font-weight: bold; white-space: nowrap; }
.study-filters-toggle > summary { cursor: pointer; font-weight: bold; display: inline-block; border: 2px solid #000; box-shadow: 3px 3px 0 #000; background: #fff; padding: 2px 10px; }
.study-filters-toggle[open] > summary { background: yellow; }
.study-filters-toggle .study-filters { margin-top: 10px; }
.study-filters .study-reset { justify-self: start; margin-top: 4px; }
.study-next-row { display: flex; justify-content: flex-end; gap: 10px; margin: 0 0 12px; }
.study-next-row-bottom { margin: 14px 0 0; }
/* Botões de navegação discretos: baixos, borda e sombra finas */
#study .study-next-row .neobrutalist-button {
    font-size: 11px; height: auto; line-height: 1.4; padding: 3px 10px; letter-spacing: .5px;
    border-width: 2px; box-shadow: 3px 3px 0 #000;
}
.study-next-row[hidden] { display: none; }
#study .study-next-btn:disabled, #study #study-undo:disabled { opacity: .35; cursor: default; transform: none; }
#study .study-undo { background: #fff; }
/* Altura mínima do cartão: a página não encolhe e estica a cada pergunta */
.study-q { min-height: 260px; }
.study-visit, .study-q-box { font-variant-numeric: tabular-nums; }
.study-empty { font-style: italic; }
.study-all { margin-top: 20px; font-size: 13px; }
.study-all summary { cursor: pointer; font-weight: bold; }
.study-all h3 { font-size: 14px; text-transform: uppercase; margin-top: 12px; }
.study .study-chips-toggle {
    color: #000 !important; height: auto; line-height: 1.4; padding: 2px 8px; font-size: 11px;
    background: transparent; box-shadow: none; border: 1px dashed #000; text-transform: lowercase; letter-spacing: normal;
}
#study .study-filters-hint { font-size: 11px; color: #666; margin: 0; }
.study [data-filter]:not([data-filter="status"]) .study-chip[aria-pressed="false"] { text-decoration: line-through; opacity: .55; }
#study .study-reset { height: auto; line-height: 1.4; padding: 4px 12px; font-size: 12px; }

/* Distribuição por caixa: escala ordinal de um tom (validada), caixa 1 clara → caixa 5 escura; novas em cinza neutro. */
#study .study-score { width: 280px; max-width: 100%; margin: 0; font-size: 11px; }
@media (max-width: 480px) { #study .study-score { width: 100%; } }
.study-boxbar { display: flex; gap: 2px; height: 22px; background: #fff; border: 2px solid #000; box-shadow: 3px 3px 0 #000; padding: 2px; }
.study-boxbar > span { position: relative; display: flex; align-items: center; justify-content: center; min-width: 3px; height: 100%; cursor: default; }
.study-seglabel { white-space: nowrap; overflow: hidden; padding: 0 3px; line-height: 1; font-weight: 700; }
.study [data-box="1"] .study-seglabel, .study [data-box="2"] .study-seglabel, .study [data-box="new"] .study-seglabel { color: #000; }
.study [data-box="3"] .study-seglabel, .study [data-box="4"] .study-seglabel, .study [data-box="5"] .study-seglabel { color: #fff; }
.study-boxbar > span.tip-left:hover::after, .study-boxbar > span.tip-left:focus::after { left: auto; right: 0; }
.study-boxbar > span:hover, .study-boxbar > span:focus { outline: 2px solid #000; outline-offset: 1px; z-index: 1; }
.study-boxbar > span:hover::after, .study-boxbar > span:focus::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 0; white-space: nowrap; z-index: 2;
    background: #000; color: #fff; padding: 3px 7px; font-size: 11px; font-weight: 700; pointer-events: none;
}
.study [data-box="1"] { background: #86b6ef; }
.study [data-box="2"] { background: #5598e7; }
.study [data-box="3"] { background: #2a78d6; }
.study [data-box="4"] { background: #1c5cab; }
.study [data-box="5"] { background: #0d366b; }
.study [data-box="new"] { background: #dcdad4; }
.study-progress { display: grid; gap: 6px; justify-items: end; }
@media (max-width: 480px) { .study-progress { width: 100%; justify-items: start; } }

#study .study-keys { font-size: 11px; color: #666; margin: 14px 0 0; }
#study .study-keys kbd {
    display: inline-block; font-family: monospace; font-size: 10px; line-height: 1.3; color: #000;
    background: #fff; border: 1px solid #000; border-bottom-width: 2px; border-radius: 3px; padding: 0 4px;
}
