:root {
    --bg: #0f172a;
    /* slate-900 */
    --card: #111827;
    /* gray-900 */
    --muted: #94a3b8;
    /* slate-400 */
    --text: #e5e7eb;
    /* gray-200 */
    --brand: #6366f1;
    /* indigo-500 */
    --brand-2: #22c55e;
    /* green-500 */
    --danger: #ef4444;
    /* red-500 */
    --ok: #10b981;
    /* emerald-500 */
    --border: #1f2937;
    /* gray-800 */
    --chip: #0b1225;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 800px at 80% -10%, #1e293b 0%, #0b1020 40%, #070a14 100%), var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 100dvh;
}

.container {
    width: 100%;
    max-width: 920px
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    backdrop-filter: blur(6px);
}

.row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center
}

.between {
    justify-content: space-between
}

.muted {
    color: var(--muted)
}

.title {
    font-size: clamp(20px, 4.8vw, 26px);
    font-weight: 700;
    margin: 0 0 8px
}

.subtitle {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: clamp(14px, 3.8vw, 16px)
}

.small {
    font-size: 13px
}

.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    color: #cbd5e1
}

.hr {
    height: 1px;
    background: linear-gradient(90deg, transparent, #1f2937, transparent);
    margin: 16px 0
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center
}

@media (max-width:640px) {
    .grid2 {
        grid-template-columns: 1fr
    }
}

/* Progress */
.progress {
    height: 10px;
    background: #0b1020;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin: 10px 0 14px
}

.progress>div {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--brand), #8b5cf6);
    transition: width .35s ease
}

/* Question */
.q {
    margin-top: 18px
}

.q h2 {
    margin: 0 0 12px;
    font-size: 18px
}

ol.answers {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px
}

.ans {
    border: 1px solid var(--border);
    background: var(--chip);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: .2s transform, .2s border-color, .2s background;
    min-height: 44px
}

@media (hover:hover) {
    .ans:hover {
        transform: translateY(-1px);
        border-color: #334155
    }
}

@media (hover:none) {
    .ans:hover {
        transform: none
    }
}

.ans input {
    margin-top: 3px;
    transform: scale(1.2);
    accent-color: var(--brand)
}

.ans[aria-checked="true"] {
    outline: 2px solid var(--brand)
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap
}

button {
    appearance: none;
    border: 1px solid var(--border);
    background: #0b1020;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    flex: 1 1 160px
}

button.primary {
    background: linear-gradient(180deg, var(--brand), #4f46e5);
    border: none
}

button.ghost {
    background: transparent
}

button:disabled {
    opacity: .5;
    cursor: not-allowed
}

@media (max-width:480px) {
    .controls button {
        flex-basis: 100%
    }
}

/* Review */
.review-item {
    border: 1px solid var(--border);
    background: var(--chip);
    border-radius: 14px;
    padding: 14px;
    margin-top: 12px
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border)
}

.badge.ok {
    background: rgba(16, 185, 129, .12);
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, .25)
}

.badge.err {
    background: rgba(239, 68, 68, .12);
    color: #fecaca;
    border-color: rgba(239, 68, 68, .25)
}

/* Acessibilidade */
:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 3px;
    border-radius: 8px
}