.toggle-markscheme-btn[hidden],
.task-score-box[hidden],
.task-markscheme-panel[hidden],
.retry-task-btn[hidden] {
    display: none !important;
}

.workbook-task {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}

.workbook-part-card {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #f8fbff;
}

.part-server-result {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.task-submit-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

.task-result-note {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.task-score-box {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-weight: 700;
    color: #1e3a8a;
}

.task-markscheme-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
}

.markscheme-part {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.markscheme-part:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.markscheme-point {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.markscheme-point strong {
    color: #1e3a8a;
}

.wb-btn {
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
}

.wb-btn:hover {
    background: #1d4ed8;
}

.wb-btn-light {
    background: #e2e8f0;
    color: #0f172a;
}

.wb-btn-light:hover {
    background: #cbd5e1;
}

/* CHOICE / TRUE-FALSE / MULTI-SELECT */

.choice-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.choice-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: 0.15s ease;
}

.choice-row:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.choice-row.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.choice-row.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.choice-row input[type="radio"],
.choice-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

/* GAP TASKS */

.gap-render {
    margin-top: 10px;
    line-height: 2.2;
    font-size: 18px;
}

.gap-input {
    min-width: 110px;
    max-width: 220px;
    padding: 8px 10px;
    margin: 0 6px;
    border: 1px solid #94a3b8;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
    color: #0f172a;
}

.gap-input.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.gap-input.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.gap-input:disabled.correct {
    opacity: 1 !important;
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

/* MATCHING */

.matching-help {
    margin: 10px 0 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.matching-board {
    position: relative;
    margin-top: 12px;
}

.matching-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.matching-columns {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.matching-column {
    display: grid;
    gap: 10px;
}

.matching-col-title {
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.match-item {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: left;
    border: 1px solid #38bdf8;
    background: #eaf6ff;
    color: #0f172a;
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.15s ease;
}

.match-item:hover {
    border-color: #0ea5e9;
    background: #dff2ff;
}

.match-item.active {
    border-color: #2563eb !important;
    background: #dbeafe !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.match-item.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.match-item.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.match-item:disabled.correct {
    opacity: 1 !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #16a34a !important;
    cursor: default;
}

.match-item:disabled.wrong {
    opacity: 1 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-color: #dc2626 !important;
    cursor: default;
}

.match-path {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2.5;
}

.match-path.correct {
    stroke: #16a34a !important;
}

.match-path.wrong {
    stroke: #dc2626 !important;
}

.matching-summary {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.pair-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    border-radius: 10px;
}

.pair-row.correct {
    border: 1px solid #16a34a !important;
    background: #f0fdf4 !important;
}

.pair-row.wrong {
    border: 1px solid #dc2626 !important;
    background: #fef2f2 !important;
}

.remove-pair-btn {
    border: none;
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 700;
}

.remove-pair-btn:hover {
    background: #cbd5e1;
}

/* ORDERING */

.ordering-help {
    margin: 10px 0 14px;
    color: #475569;
    font-size: 14px;
}

.ordering-list {
    display: grid;
    gap: 10px;
}

.ordering-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #ffffff;
}

.ordering-item.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.ordering-item.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.ordering-item.locked {
    box-shadow: inset 0 0 0 1px #16a34a;
}

.ordering-item-text {
    flex: 1;
}

.ordering-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* GROUPING */

.grouping-help {
    margin: 10px 0 14px;
    color: #475569;
    font-size: 14px;
}

.grouping-board {
    display: grid;
    gap: 16px;
}

.grouping-bank,
.group-column {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    padding: 12px;
}

.grouping-title,
.group-column-title {
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.grouping-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.group-column-items {
    min-height: 40px;
    display: grid;
    gap: 8px;
}

.group-item {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fbff;
    cursor: pointer;
}

.group-item.active {
    border-color: #2563eb !important;
    background: #dbeafe !important;
}

.group-item.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.group-item.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.group-item.locked {
    cursor: default;
}

/* NUMERIC */

.numeric-part {
    margin-top: 10px;
}

.numeric-answer.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.numeric-answer.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

/* TRACE TABLE */

.trace-table-help {
    margin: 10px 0 14px;
    color: #475569;
    font-size: 14px;
}

.trace-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}

.trace-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.trace-table th,
.trace-table td {
    border: 1px solid #dbe4f0;
    padding: 8px;
    text-align: center;
    min-width: 90px;
}

.trace-table th {
    background: #eff6ff;
    color: #1e3a8a;
    font-weight: 700;
}

.trace-cell-input {
    width: 100%;
    min-width: 70px;
    padding: 8px 10px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
}

.trace-cell-fixed {
    font-weight: 600;
    color: #334155;
}

.trace-cell-input.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.trace-cell-input.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.trace-cell-input:disabled.correct {
    opacity: 1 !important;
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

/* TEXT ANSWERS */

.text-answer {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
    box-sizing: border-box;
    background: #ffffff;
    color: #111827;
}

.text-answer:focus,
.gap-input:focus,
.numeric-answer:focus,
.trace-cell-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* GENERIC */

.missing-config {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.text-answer.correct {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.text-answer.wrong {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.rubric-row {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.rubric-row.matched {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.rubric-row.not-matched {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}