body {
    font-family: Arial, sans-serif;
    background: #f7f9fc;
    color: #222;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 24px;
}

h1, h2, h3 {
    margin-top: 0;
    color: #1f2d3d;
}

nav a,
a {
    color: #2563eb;
    text-decoration: none;
}

nav a {
    margin-right: 14px;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

form {
    max-width: 100%;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

input,
select,
textarea,
button {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 15px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
}

textarea {
    font-family: Arial, sans-serif;
}

button {
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #1d4ed8;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

table th,
table td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

table th {
    background: #f1f5f9;
}

ul {
    padding-left: 20px;
}

.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.card-soft {
    background: #f8fbff;
    border: 1px solid #cfe0ff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.alert-success {
    padding: 12px;
    margin-bottom: 16px;
    background: #eafaf0;
    border: 1px solid #b7ebc6;
    border-radius: 10px;
}

.alert-error {
    padding: 12px;
    margin-bottom: 16px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
}

.muted {
    color: #667085;
    font-size: 14px;
}

.progress-wrap {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 10px 0 4px;
}

.progress-bar {
    height: 12px;
    background: #2563eb;
}
.choice {
    display: block;
    padding: 14px 16px;
    border: 2px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.15s ease;
}

.choice:hover {
    background: #f8fbff;
    border-color: #bfd4ff;
}

.choice input[type="radio"] {
    display: none;
}

.choice.selected {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}
/* .choice {
    display: block;
    padding: 12px 14px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 10px;
    font-weight: normal;
}

.choice input {
    display: inline-block;
    width: auto;
    margin: 0 10px 0 0;
    padding: 0;
    vertical-align: middle;
}

.choice:hover {
    background: #f8fbff;
    border-color: #bfd4ff;
} */

.actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.actions-row button,
.actions-row a.btn-link {
    width: auto;
    min-width: 120px;
}

.btn-secondary {
    background: #64748b;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-light {
    background: #fff;
    color: #1f2937;
    border: 1px solid #cfd8e3;
}

.btn-light:hover {
    background: #f8fafc;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.stat-box .label {
    font-size: 13px;
    color: #667085;
    margin-bottom: 8px;
}

.stat-box .value {
    font-size: 24px;
    font-weight: bold;
    color: #1f2d3d;
}

@media (max-width: 640px) {
    body {
        padding: 14px;
    }

    table {
        font-size: 14px;
    }

    .actions-row {
        flex-direction: column;
    }

    .actions-row button,
    .actions-row a.btn-link {
        width: 100%;
    }
}

.solution-card {
    padding: 22px;
}

.solution-title {
    margin-bottom: 18px;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.solution-section {
    margin-bottom: 16px;
}

.solution-label {
    font-weight: 700;
    font-size: 17px;
    margin-bottom: 8px;
    color: #0f172a;
}

.solution-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.solution-line {
    font-size: 18px;
    line-height: 1.5;
    color: #111827;
}

.solution-box {
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: "Courier New", monospace;
}

.solution-answer {
    background: #eff6ff;
    border: 2px solid #2563eb;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 20px;
    font-weight: 700;
    color: #1d4ed8;
    font-family: "Courier New", monospace;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
    color: #111827;
}

.worked-solution-card {
    padding: 18px;
}

.worked-solution-title {
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.worked-block {
    margin-bottom: 14px;
}

.worked-heading {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.worked-intro,
.worked-paragraph,
.worked-given-list li {
    font-size: 14px;
    line-height: 1.65;
    color: #111827;
}

.worked-given-list {
    margin: 0;
    padding-left: 20px;
}

.worked-equations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}

.worked-equation {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    text-align: center;
    color: #111827;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.worked-given-list sub,
.worked-equation sub,
.worked-final-answer sub {
    font-size: 65%;
    vertical-align: sub;
    line-height: 0;
}

.worked-final-block {
    margin-top: 6px;
}

.worked-final-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
}

.worked-final-answer {
    display: inline-block;
    padding: 8px 12px;
    border: 2px solid #2563eb;
    border-radius: 10px;
    background: #eff6ff;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #1d4ed8;
    max-width: 100%;
    word-break: break-word;
}

@media (min-width: 768px) {
    .worked-solution-card {
        padding: 20px;
    }

    .worked-solution-title {
        font-size: 22px;
    }

    .worked-heading {
        font-size: 17px;
    }

    .worked-intro,
    .worked-paragraph,
    .worked-given-list li {
        font-size: 15px;
    }

    .worked-equation {
        font-size: 18px;
    }

    .worked-final-answer {
        font-size: 20px;
    }
}
.worked-line sub,
.worked-given-list sub,
.worked-final-answer sub {
    font-size: 65%;
    vertical-align: sub;
    line-height: 0;
}

.jump-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.jump-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.jump-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.jump-btn.current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.jump-btn.answered {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #166534;
}

.jump-btn.current.answered {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.jump-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    padding: 0;
    font: inherit;
}