/* Styles for /question (moved out of the page so browsers can cache them) */
        :root { --good: #047857; --good-bg: rgba(16, 185, 129, 0.12); --bad: #b91c1c; --bad-bg: rgba(220, 38, 38, 0.09); }
        @media (prefers-color-scheme: dark) {
            :root { --good: #34d399; --bad: #f87171; }
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        [hidden] { display: none !important; }
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--color-light); color: var(--color-text); line-height: 1.6; }
        a { color: var(--color-link); }
        .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: 42px; padding: 0 1.1rem; border: none; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
        .btn:disabled { opacity: 0.6; cursor: not-allowed; }
        .btn-primary { background: var(--color-primary); color: #fff; }
        .btn-primary:hover:not(:disabled) { background: var(--color-accent); }
        .btn-secondary { background: var(--color-light); color: var(--color-text); box-shadow: inset 0 0 0 1px var(--color-border); }
        .btn-danger { background: #dc2626; color: #fff; }
        .btn-sm { height: 32px; padding: 0 0.75rem; font-size: 0.85rem; }
        .page-hero { background: linear-gradient(135deg, #134a38 0%, #1a654c 55%, #1f6a50 100%); color: #fff; padding: 2.75rem 2rem 4.5rem; text-align: center; }
        .page-hero h1 { font-size: 2.1rem; font-weight: 800; }
        .page-hero p { font-size: 1.05rem; opacity: 0.95; }
        .container { max-width: 820px; margin: -2.5rem auto 3rem; padding: 0 1.5rem; position: relative; }
        .card { background: var(--color-white); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 1.5rem; margin-bottom: 1.25rem; }
        .q-card { box-shadow: var(--shadow-md); }
        .q-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--color-gray); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 3px double var(--color-border); }
        .q-meta .streak { background: #fff3d6; color: #3b2a00; padding: 0.2rem 0.6rem; border-radius: 3px 3px 8px 3px; transform: rotate(-1.5deg); box-shadow: 0 6px 10px -8px rgba(18, 26, 22, 0.45); }
        @media (prefers-color-scheme: dark) { .q-meta .streak { background: #f0c35e; color: #2a1d00; } }
        .pill { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--color-tint); color: var(--color-link); vertical-align: 0.12em; }
        .streak { font-weight: 700; color: var(--color-heading); }
        .q-text { font-size: 1.2rem; font-weight: 700; color: var(--color-heading); line-height: 1.45; margin-bottom: 1.1rem; white-space: pre-wrap; }
        .options { display: flex; flex-direction: column; gap: 0.6rem; }
        .option { position: relative; overflow: hidden; display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; padding: 0.85rem 1rem; border-radius: 10px;
            border: 2px solid var(--color-border); background: var(--color-white); font: inherit; font-size: 1rem; color: var(--color-text); cursor: pointer; }
        .option:hover:not(:disabled) { border-color: var(--color-primary); background: var(--color-tint); }
        .option:disabled { cursor: default; }
        .option .letter { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; color: var(--color-link); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
        .option .label { flex: 1; position: relative; z-index: 1; }
        .option .pct { font-weight: 700; font-size: 0.9rem; color: var(--color-gray); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
        .option .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--color-tint); z-index: 0; transition: width 0.5s ease; }
        .option.correct { border-color: var(--good); }
        .option.correct .letter { background: var(--good); color: #fff; }
        .option.correct .fill { background: var(--good-bg); }
        .option.wrong { border-color: var(--bad); }
        .option.wrong .letter { background: var(--bad); color: #fff; }
        .option.wrong .fill { background: var(--bad-bg); }
        /* One panel: the verdict leads straight into why */
        .verdict { margin-top: 1.1rem; padding: 0.9rem 1.05rem; border-radius: 10px; }
        .verdict strong { font-weight: 800; }
        .verdict p { margin-top: 0.3rem; color: var(--color-text); white-space: pre-wrap; line-height: 1.6; }
        .verdict.good { background: var(--good-bg); color: var(--good); }
        .verdict.bad { background: var(--bad-bg); color: var(--bad); }
        .explanation { margin-top: 1rem; }
        .explanation h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-gray); margin-bottom: 0.3rem; }
        .explanation p { white-space: pre-wrap; }
        .after { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.1rem; align-items: center; }
        .after .muted { font-size: 0.85rem; color: var(--color-gray); }
        .empty { text-align: center; padding: 2rem 1rem; color: var(--color-gray); }
        .empty .icon { font-size: 2.4rem; }
        .section-title { font-size: 1.1rem; color: var(--color-heading); font-weight: 800; margin: 1.25rem 0 0.6rem 0.1rem; }
        .archive { list-style: none; }
        .archive li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--color-border); }
        .archive li:last-child { border-bottom: none; }
        .archive a { color: var(--color-text); text-decoration: none; font-weight: 600; }
        .archive a:hover { color: var(--color-link); }
        .archive .date { font-size: 0.8rem; color: var(--color-gray); }
        .result { font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
        .result.good { color: var(--good); }
        .result.bad { color: var(--bad); }
        .result.none { color: var(--color-gray); font-weight: 500; }
        .tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; }
        .tabs button { border: none; background: var(--color-white); box-shadow: var(--shadow-sm); padding: 0.5rem 1rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; color: var(--color-gray); }
        .tabs button.active { background: var(--color-primary); color: #fff; }
        .field { margin-bottom: 0.9rem; }
        .field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--color-heading); }
        .input, .textarea { font: inherit; font-size: 0.95rem; color: var(--color-text); background: var(--color-white); border: 1px solid var(--color-border); border-radius: 8px; padding: 0 0.75rem; height: 40px; width: 100%; }
        .textarea { height: auto; padding: 0.6rem 0.75rem; resize: vertical; }
        .opt-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.45rem; }
        .opt-row input[type="radio"] { accent-color: var(--color-primary); width: 18px; height: 18px; flex-shrink: 0; }
        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
        .sched li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--color-border); list-style: none; align-items: center; }
        .toasts { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 0.5rem; }
        .toast { background: var(--color-dark); color: #fff; padding: 0.75rem 1.1rem; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 0.92rem; }
        .toast.error { background: #b91c1c; }
        @media (max-width: 600px) {
            .page-hero { padding: 2rem 1.25rem 4rem; }
            .page-hero h1 { font-size: 1.7rem; }
            .container { padding: 0 0.75rem; }
            .q-text { font-size: 1.08rem; }
            .grid-2 { grid-template-columns: 1fr; }
        }
    

        /* After answering: the next thing to do */
        .q-next:empty { display: none; }
        .q-next { margin-top: 1rem; }
        .q-next-card { display: grid; gap: 0.15rem; padding: 0.8rem 1rem; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-white); text-decoration: none; color: var(--color-text); transition: border-color 0.15s ease, transform 0.15s ease; }
        .q-next-card:hover { border-color: var(--color-primary); transform: translateY(-1px); }
        .q-next-card .label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-primary); }
        .q-next-card strong { color: var(--color-heading); }
        .q-next-card span:last-child { font-size: 0.86rem; color: var(--color-gray); }
