:root {
    --ink: #162033;
    --muted: #667287;
    --line: #dce3ee;
    --blue: #2467d4;
    --green: #209875;
    --gold: #e9a93a;
    --red: #c84646;
    --nav: #121c2d;
    --soft: #f3f6fa;
    --card: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); font: 15px/1.5 Inter, Segoe UI, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.top { align-items: center; background: var(--nav); color: #eef4fb; display: flex; gap: 18px; justify-content: space-between; min-height: 64px; padding: 12px 26px; position: sticky; top: 0; z-index: 20; }
.brand { align-items: center; display: flex; font-weight: 900; gap: 10px; }
.brand span { align-items: center; background: var(--gold); border-radius: 8px; color: #172033; display: inline-flex; height: 38px; justify-content: center; width: 38px; }
.top nav { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.top nav a { border-radius: 7px; color: #c8d2df; padding: 8px 10px; }
.top nav a.active, .top nav a:hover, .top nav a.pill { background: rgba(255,255,255,.12); color: #fff; }
.page { margin: 0 auto; max-width: 1180px; padding: 26px; }
.hero { background: #101b2e; border-radius: 8px; color: #fff; margin-bottom: 20px; padding: 34px; }
.hero h1 { font-size: 34px; line-height: 1.1; margin: 0 0 8px; }
.hero p { color: #cbd5e1; max-width: 720px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .card, .stat { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 30px rgba(22,32,51,.07); padding: 18px; }
.card.selectable { cursor: pointer; }
.card.selectable:hover { border-color: var(--blue); }
.panel h2, .card h3 { margin: 0 0 8px; }
.panel h1 { margin: 0 0 8px; }
.block-gap { margin-top: 18px; }
.muted { color: var(--muted); }
.stat span { color: var(--muted); display: block; }
.stat strong { display: block; font-size: 30px; line-height: 1.1; }
.btn { align-items: center; background: var(--blue); border: 1px solid var(--blue); border-radius: 7px; color: #fff; cursor: pointer; display: inline-flex; font-weight: 800; justify-content: center; min-height: 40px; padding: 9px 14px; }
.btn.secondary { background: #fff; border-color: #cbd5e1; color: var(--ink); }
.btn.green { background: var(--green); border-color: var(--green); }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.review { background: #7c3aed; border-color: #7c3aed; }
.btn.disabled { opacity: .48; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-weight: 800; margin-bottom: 5px; }
.field input, .field select { border: 1px solid #cbd5e1; border-radius: 6px; min-height: 42px; padding: 9px 10px; width: 100%; }
.auth-wrap { display: grid; margin: 26px auto 0; max-width: 520px; }
.feature-list { display: grid; gap: 12px; margin-top: 14px; }
.feature-list div { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.feature-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.feature-list strong { display: block; }
.feature-list span { color: var(--muted); display: block; }
.notice { background: #fff8e7; border: 1px solid #f0d596; border-radius: 8px; color: #745000; padding: 12px; }
.split-title { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 16px; }
.actions.tight { margin-top: 0; }
.summary-table th { width: 150px; }
.chapter-list { display: grid; gap: 9px; margin-top: 10px; }
.chapter-list label { align-items: center; background: #f8fafc; border: 1px solid #d8e0ea; border-radius: 7px; display: flex; gap: 9px; padding: 9px; }
.chapter-list label span { flex: 1; }
.chapter-list label em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.chapter-panel { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 18px; }
.subject-box { min-width: 0; }
.alert { border-radius: 8px; font-weight: 800; margin-bottom: 16px; padding: 11px 14px; }
.alert.success { background: #e6f5ef; color: #12614f; }
.alert.error { background: #fae8e8; color: #963535; }
.alert.info { background: #eaf1ff; color: #234d92; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
th { color: #4a586d; font-size: 13px; }
.badge { border-radius: 999px; display: inline-flex; font-size: 12px; font-weight: 900; padding: 4px 9px; }
.badge.paid, .badge.submitted { background: #e6f5ef; color: #12614f; }
.badge.created, .badge.ready, .badge.in_progress { background: #eaf1ff; color: #234d92; }
.badge.manual_pending { background: #fff3d9; color: #8a5a04; }
.badge.correct { background: #e6f5ef; color: #12614f; }
.badge.wrong, .badge.failed { background: #fae8e8; color: #963535; }
.badge.unattempted { background: #eef2f7; color: #4a586d; }
.exam-topbar { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; justify-content: space-between; margin-bottom: 16px; padding: 16px 18px; }
.exam-topbar h1 { margin: 0 0 4px; }
.test-shell { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 16px; }
.question-card { min-height: 430px; }
.question-meta { color: var(--muted); font-size: 13px; font-weight: 900; letter-spacing: .02em; margin-bottom: 8px; text-transform: uppercase; }
.question-text { font-size: 17px; margin: 14px 0; white-space: normal; }
.option { border: 1px solid #d8e0ea; border-radius: 7px; display: block; margin: 9px 0; padding: 10px; }
.option input { margin-right: 8px; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.palette button { border: 1px solid #ccd5e1; border-radius: 6px; cursor: pointer; height: 34px; }
.palette button.answered { background: var(--green); border-color: var(--green); color: #fff; }
.palette button.marked { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.palette button.current { box-shadow: 0 0 0 3px rgba(36,103,212,.18); }
.legend { display: grid; gap: 8px; margin-bottom: 12px; }
.dot { border-radius: 999px; display: inline-block; height: 11px; margin-right: 6px; width: 11px; }
.dot.answered { background: var(--green); }
.dot.marked { background: #7c3aed; }
.timer { color: var(--red); font-size: 22px; font-weight: 900; }
.solution { border-left: 4px solid var(--blue); margin: 12px 0; padding-left: 12px; }
.solution-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.solution-item h3 { font-size: 18px; margin: 6px 0 10px; }
.result-hero { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 30px rgba(22,32,51,.07); padding: 18px; }
.solution-options { display: grid; gap: 9px; margin: 12px 0; }
.solution-option { align-items: flex-start; border: 1px solid #d8e0ea; border-radius: 7px; display: flex; gap: 10px; padding: 10px; }
.solution-option span { align-items: center; background: #edf2f7; border-radius: 999px; display: inline-flex; flex: 0 0 auto; font-weight: 900; height: 28px; justify-content: center; width: 28px; }
.solution-option p { margin: 2px 0 0; }
.solution-option.correct-choice { background: #e8f7ef; border-color: #8bd4b3; }
.solution-option.correct-choice span { background: #209875; color: #fff; }
.solution-option.selected-choice:not(.correct-choice) { background: #fff0f0; border-color: #e4a0a0; }
.solution-option.selected-choice:not(.correct-choice) span { background: #c84646; color: #fff; }
.solution-strip { align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 7px; display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 12px 0; padding: 10px; }
.inline-form { display: flex; gap: 10px; margin: 16px 0; }
.inline-form input { border: 1px solid #cbd5e1; border-radius: 6px; flex: 1; min-height: 42px; padding: 9px 10px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.instruction-hero { align-items: center; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 8px; box-shadow: 0 14px 30px rgba(22,32,51,.07); display: flex; justify-content: space-between; padding: 22px; }
.instruction-hero span { color: var(--blue); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.instruction-hero h1 { margin: 4px 0 6px; }
.instruction-hero p { color: var(--muted); margin: 0; }
.instruction-clock { align-items: center; background: #101b2e; border-radius: 8px; color: #fff; display: flex; flex-direction: column; min-width: 118px; padding: 14px; }
.instruction-clock strong { font-size: 30px; line-height: 1; }
.instruction-clock span { color: #cbd5e1; }
.instruction-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }
.instruction-list { margin: 0; padding-left: 20px; }
.instruction-list li { margin: 10px 0; }
.agree-line { align-items: flex-start; background: #f8fafc; border: 1px solid var(--line); border-radius: 7px; display: flex; gap: 10px; margin-top: 16px; padding: 12px; }
.agree-line input { margin-top: 4px; }
.jee-body { background: #eef2f7; color: #162033; min-height: 100vh; }
.jee-header { align-items: center; background: #ffffff; border-bottom: 1px solid #cbd5e1; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto auto; min-height: 68px; padding: 10px 18px; position: sticky; top: 0; z-index: 40; }
.jee-header strong { display: block; font-size: 18px; }
.jee-kicker { color: #2467d4; display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.jee-candidate { border-left: 1px solid #d8e0ea; padding-left: 16px; }
.jee-candidate span, .jee-candidate small { display: block; }
.jee-candidate span { font-weight: 900; }
.jee-candidate small { color: var(--muted); }
.jee-timer { align-items: center; background: #101b2e; border-radius: 7px; color: #fff; display: flex; gap: 10px; min-height: 44px; padding: 8px 12px; }
.jee-timer span { color: #cbd5e1; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.jee-timer strong { color: #fff; font-size: 20px; min-width: 88px; text-align: right; }
.jee-shell { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 330px; margin: 0 auto; max-width: 1440px; min-height: calc(100vh - 68px); padding: 14px; }
.jee-main, .jee-side { background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 12px 28px rgba(22,32,51,.07); min-width: 0; }
.jee-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.jee-side { align-self: start; overflow: hidden; position: sticky; top: 82px; }
.jee-section-tabs { background: #f8fafc; border-bottom: 1px solid #d8e0ea; display: flex; gap: 8px; overflow-x: auto; padding: 10px; }
.jee-section-tabs button { background: #fff; border: 1px solid #cbd5e1; border-radius: 7px; color: #344154; cursor: pointer; font-weight: 900; min-height: 38px; padding: 8px 12px; white-space: nowrap; }
.jee-section-tabs button span { color: var(--muted); margin-left: 5px; }
.jee-section-tabs button.active { background: #2467d4; border-color: #2467d4; color: #fff; }
.jee-section-tabs button.active span { color: #dbeafe; }
.jee-question-head { align-items: center; border-bottom: 1px solid #d8e0ea; display: flex; gap: 14px; justify-content: space-between; padding: 14px 16px; }
.jee-question-head span { color: var(--muted); font-size: 13px; font-weight: 900; text-transform: uppercase; }
.jee-question-head h1 { font-size: 22px; margin: 2px 0 0; }
.jee-marks { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.jee-marks span { background: #f8fafc; border: 1px solid #d8e0ea; border-radius: 999px; color: #344154; padding: 5px 9px; text-transform: none; }
.jee-question-card { min-height: 420px; overflow-y: auto; padding: 18px 20px; }
.jee-options { display: grid; gap: 10px; margin-top: 18px; }
.jee-option { align-items: flex-start; border: 1px solid #d8e0ea; border-radius: 7px; cursor: pointer; display: grid; gap: 10px; grid-template-columns: auto auto minmax(0, 1fr); padding: 12px; }
.jee-option:hover { border-color: #2467d4; }
.jee-option input { margin-top: 7px; }
.jee-option span { align-items: center; background: #edf2f7; border-radius: 999px; display: inline-flex; font-weight: 900; height: 28px; justify-content: center; width: 28px; }
.jee-option p { margin: 2px 0 0; }
.jee-actions { background: #f8fafc; border-top: 1px solid #d8e0ea; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 12px; }
.jee-profile { align-items: center; background: #101b2e; color: #fff; display: flex; gap: 12px; padding: 14px; }
.jee-profile span { color: #cbd5e1; display: block; font-size: 13px; }
.jee-avatar { align-items: center; background: #e9a93a; border-radius: 999px; color: #101b2e; display: inline-flex; flex: 0 0 auto; font-weight: 900; height: 44px; justify-content: center; width: 44px; }
.jee-legend { display: grid; gap: 9px; padding: 14px; }
.jee-legend div { align-items: center; display: flex; gap: 8px; }
.jee-legend span { font-weight: 900; min-width: 22px; }
.qdot { border-radius: 6px 6px 12px 12px; display: inline-block; height: 24px; width: 24px; }
.qdot.not-visited, .jee-palette button.not-visited { background: #eef2f7; border: 1px solid #cbd5e1; color: #344154; }
.qdot.not-answered, .jee-palette button.not-answered { background: #c84646; border-color: #c84646; color: #fff; }
.qdot.answered, .jee-palette button.answered { background: #209875; border-color: #209875; color: #fff; }
.qdot.marked, .jee-palette button.marked { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.qdot.answered-marked, .jee-palette button.answered-marked { background: linear-gradient(135deg, #209875 0 50%, #7c3aed 50% 100%); border-color: #5f54b8; color: #fff; }
.jee-palette-head { align-items: center; background: #f8fafc; border-bottom: 1px solid #d8e0ea; border-top: 1px solid #d8e0ea; display: flex; justify-content: space-between; padding: 10px 14px; }
.jee-palette-head span { color: var(--muted); font-size: 13px; font-weight: 800; }
.jee-palette { display: grid; gap: 8px; grid-template-columns: repeat(5, 1fr); max-height: 360px; overflow-y: auto; padding: 14px; }
.jee-palette button { border: 1px solid #cbd5e1; border-radius: 7px 7px 16px 16px; cursor: pointer; font-weight: 900; height: 38px; }
.jee-palette button.current { box-shadow: 0 0 0 3px rgba(36,103,212,.22); outline: 2px solid #2467d4; }
.jee-modal { align-items: center; background: rgba(15,23,42,.58); display: none; inset: 0; justify-content: center; padding: 18px; position: fixed; z-index: 80; }
.jee-modal.open { display: flex; }
.jee-modal-box { background: #fff; border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.28); max-width: 560px; padding: 22px; width: 100%; }
.jee-modal-box h2 { margin: 0 0 8px; }
.jee-submit-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); margin: 16px 0; }
.jee-submit-grid div { background: #f8fafc; border: 1px solid #d8e0ea; border-radius: 7px; padding: 12px; text-align: center; }
.jee-submit-grid span { display: block; font-size: 28px; font-weight: 900; }
.jee-submit-grid strong { color: var(--muted); display: block; font-size: 12px; }
@media (max-width: 880px) {
    .top { align-items: flex-start; flex-direction: column; }
    .grid.two, .grid.three, .grid.four, .test-shell, .instruction-layout { grid-template-columns: 1fr; }
    .page { padding: 18px; }
    .split-title, .exam-topbar { align-items: flex-start; flex-direction: column; }
    .inline-form { flex-direction: column; }
    .instruction-hero, .jee-question-head { align-items: flex-start; flex-direction: column; }
    .jee-header { grid-template-columns: 1fr; position: static; }
    .jee-candidate { border-left: 0; border-top: 1px solid #d8e0ea; padding-left: 0; padding-top: 10px; }
    .jee-shell { grid-template-columns: 1fr; min-height: auto; }
    .jee-side { position: static; }
    .jee-actions { justify-content: stretch; }
    .jee-actions .btn { flex: 1 1 180px; }
    .jee-submit-grid { grid-template-columns: repeat(2, 1fr); }
}
