:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #e4e7ec;
    --brand: #173b67;
    --brand-hover: #102d50;
    --ok: #166534;
    --ok-bg: #f0fdf4;
    --bad: #b42318;
    --bad-bg: #fef3f2;
    --warn: #92400e;
    --warn-bg: #fffbeb;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--brand); }

.page-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 60px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
}

.question-id {
    color: var(--muted);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: .92rem;
    margin-bottom: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 3px 10px rgba(16, 24, 40, .04);
    margin-bottom: 18px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    color: var(--muted);
    font-size: .9rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .82rem;
    font-weight: 700;
}

.status-valid { background: var(--ok-bg); color: var(--ok); }
.status-annulled { background: var(--bad-bg); color: var(--bad); }
.status-outdated { background: var(--warn-bg); color: var(--warn); }

h1 { margin: 18px 0 10px; font-size: 1.4rem; }
h2 { margin-top: 26px; font-size: 1.15rem; }
h3 { margin: 0 0 5px; font-size: 1rem; }

.statement { font-size: 1.06rem; }

.options {
    border: 0;
    padding: 0;
    margin: 24px 0 18px;
    display: grid;
    gap: 10px;
}

.option {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.option:hover { border-color: #98a2b3; }
.option input { margin-top: 5px; }
.option-key { font-weight: 800; }
.option-correct { border-color: #86efac; background: var(--ok-bg); }
.option-wrong { border-color: #fda29b; background: var(--bad-bg); }

.primary-button {
    border: 0;
    border-radius: 10px;
    padding: 12px 20px;
    background: var(--brand);
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.primary-button:hover { background: var(--brand-hover); }

.alert {
    margin-top: 18px;
    border-radius: 10px;
    padding: 12px 14px;
}

.alert-error { background: var(--bad-bg); color: var(--bad); }

.result-heading {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.result-correct { color: var(--ok); }
.result-wrong { color: var(--bad); }

.explanations { display: grid; gap: 10px; }
.explanation-item {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.details-grid div {
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

dt { color: var(--muted); font-size: .82rem; }
dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }

.source-link { margin-bottom: 0; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    .page-shell { width: min(100% - 20px, 1040px); padding-top: 16px; }
    .card { padding: 18px; border-radius: 12px; }
    .details-grid { grid-template-columns: 1fr; gap: 10px; }
    .option { padding: 13px 12px; }
}
