:root {
  --ink: #17203d;
  --muted: #69728d;
  --line: #e8eaf2;
  --surface: #fff;
  --canvas: #f5f7fc;
  --purple: #6c4df6;
  --purple-dark: #4d35c5;
  --orange: #ff9d4d;
  --green: #22a979;
  --red: #dc5362;
  --shadow: 0 18px 50px rgba(37, 44, 85, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.topbar { height: 78px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 15px; letter-spacing: .01em; }
.brand small, .brand b { display: block; }
.brand small { color: var(--muted); font-size: 11px; font-weight: 600; margin-top: 2px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 13px; color: #fff; font-weight: 800; background: linear-gradient(145deg, #8974ff, #4d35c5); box-shadow: 0 8px 18px rgba(108,77,246,.28); }
.user-menu { display: flex; align-items: center; gap: 20px; font-size: 13px; font-weight: 700; }
.user-menu form { margin: 0; }
.page-shell { max-width: 1280px; min-height: calc(100vh - 130px); margin: auto; padding: 44px 5vw 65px; }
.footer { color: #9097aa; text-align: center; font-size: 12px; padding: 0 5vw 26px; }
.eyebrow { color: var(--purple); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; line-height: 1.06; margin-bottom: 12px; }
h2 { letter-spacing: -.025em; }
h3 { margin-bottom: 6px; }
.muted { color: var(--muted); }
.alert { border-radius: 13px; padding: 13px 16px; margin-bottom: 25px; font-size: 14px; }
.alert-error { color: #87323d; background: #fff0f1; border: 1px solid #ffd3d7; }
.alert-info { color: #385185; background: #eef3ff; border: 1px solid #d9e3ff; }
.button { border: 0; border-radius: 10px; padding: 11px 16px; cursor: pointer; font-size: 13px; font-weight: 800; transition: transform .18s, box-shadow .18s, opacity .18s; }
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(35, 40, 80, .14); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { color: white; background: var(--purple); }
.button-secondary { color: var(--purple-dark); background: #eeebff; }
.button-danger { color: white; background: var(--red); }
.button-ghost { padding: 7px 10px; color: var(--muted); background: transparent; }
.button-wide { width: 100%; }
.auth-layout { min-height: 610px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 8vw; }
.auth-copy { position: relative; padding: 30px 0; }
.auth-copy:before { content: ""; position: absolute; width: 300px; height: 300px; left: -100px; top: -80px; z-index: -1; background: radial-gradient(circle, #e1dcff 0, transparent 67%); }
.auth-copy p { max-width: 490px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.feature-row { display: flex; flex-wrap: wrap; gap: 12px 23px; color: #4d5878; font-size: 13px; font-weight: 700; }
.card, .subject-card, .stat-card, .question-card, .palette, .score-card { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-card { padding: 36px; border-radius: 22px; }
.auth-card h2 { margin: 18px 0 6px; font-size: 27px; }
.card-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--ink); font-size: 25px; }
.stack { display: grid; gap: 16px; margin-top: 25px; }
label { color: #4b5573; font-size: 12px; font-weight: 800; }
label input:not([type="radio"]):not([type="checkbox"]) { display: block; width: 100%; margin-top: 7px; padding: 13px 14px; border: 1px solid #dfe2ed; border-radius: 10px; outline: none; color: var(--ink); background: #fafbfe; }
label input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px #ece9ff; }
.dashboard-heading, .section-heading, .exam-heading, .palette-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-heading { margin-bottom: 35px; }
.avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; color: var(--purple-dark); background: #e7e3ff; font-size: 20px; font-weight: 900; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; margin-bottom: 48px; }
.stat-card { display: flex; gap: 13px; align-items: center; padding: 18px; border-radius: 15px; box-shadow: none; }
.stat-card b, .stat-card span { display: block; }
.stat-card b { font-size: 18px; margin-bottom: 3px; }
.stat-card span:last-child { color: var(--muted); font-size: 12px; }
.stat-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-weight: 900; }
.purple { color: var(--purple); background: #eeeaff; }.orange { color: #db7c27; background: #fff0de; }.green { color: #12815b; background: #ddf7ed; }
.section-heading { margin-bottom: 17px; }.section-heading h2 { margin: 0; font-size: 21px; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 17px; }
.subject-card { overflow: hidden; border-radius: 16px; box-shadow: 0 8px 22px rgba(37,44,85,.05); }
.subject-art { height: 112px; padding: 22px; display: flex; align-items: end; color: #fff; font-size: 38px; font-weight: 900; letter-spacing: -.08em; background: linear-gradient(135deg, #806dff, #4c36be); }
.subject-card:nth-child(3n+2) .subject-art { background: linear-gradient(135deg, #ffa45d, #de6a4d); }
.subject-card:nth-child(3n) .subject-art { background: linear-gradient(135deg, #38c89b, #168b83); }
.subject-body { padding: 19px; }.subject-body p { font-size: 13px; margin-bottom: 18px; }
.center-card { max-width: 650px; margin: 12vh auto; padding: 40px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }.center-card code { font-size: 12px; }
.report-card { padding: 24px; border-radius: 18px; }.report-table { overflow-x: auto; }.report-row { min-width: 680px; display: grid; grid-template-columns: 1.15fr 1fr .75fr .95fr 1.3fr; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); font-size: 13px; }.report-head { color: var(--muted); border-top: 0; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }.status-good, .status-open { font-size: 11px; font-weight: 800; }.status-good { color: var(--green); }.status-open { color: #b5742a; }
.exam-shell { display: grid; grid-template-columns: minmax(0, 1fr) 295px; gap: 20px; }
.exam-heading { margin-bottom: 21px; }.exam-heading h1 { font-size: 28px; margin: 8px 0 4px; }.timer { min-width: 120px; padding: 13px 16px; border-radius: 13px; color: #a43f4c; background: #fff0f1; text-align: center; font-size: 23px; font-weight: 900; letter-spacing: .05em; }
.question-card { min-height: 500px; padding: clamp(23px, 4vw, 43px); border-radius: 20px; }.question-meta { display: flex; justify-content: space-between; color: var(--purple); font-size: 12px; font-weight: 900; }.save-status { color: var(--muted); font-weight: 700; }.question-card h2 { max-width: 850px; margin: 35px 0; font-size: clamp(20px, 2.3vw, 27px); line-height: 1.45; white-space: normal; }
.options { display: grid; gap: 11px; }.option { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 700; transition: background .15s, border .15s; }.option:has(input:checked) { color: var(--purple-dark); border-color: #aba0ff; background: #f3f1ff; }.option input { display: none; }.option-letter { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #77809a; background: #f0f1f6; font-size: 11px; }.option:has(input:checked) .option-letter { color: #fff; background: var(--purple); }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; }.review-toggle { display: flex; gap: 8px; align-items: center; cursor: pointer; }.review-toggle input { accent-color: var(--purple); }
.palette { align-self: start; padding: 21px; border-radius: 18px; }.palette-top h3 { margin: 7px 0 0; }.live-dot { color: #159365; font-size: 10px; font-weight: 900; }.live-dot:before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #20bb83; box-shadow: 0 0 0 4px #def7ed; }.legend { display: grid; gap: 9px; margin: 25px 0; color: var(--muted); font-size: 11px; font-weight: 700; }.legend span { display: flex; align-items: center; gap: 7px; }.dot { width: 10px; height: 10px; display: inline-block; border-radius: 3px; }.dot-answered, .palette-answered { background: #d8f4e9; color: #157653; }.dot-review, .palette-review { background: #fff0d5; color: #9b6523; }.dot-unanswered, .palette-unanswered { background: #f1f2f7; color: #737b90; }.question-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }.palette-item { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-size: 12px; font-weight: 900; }.palette-current { outline: 3px solid #aaa0ff; outline-offset: 2px; }.submit-form { margin-top: 27px; }
.result-hero { padding: 10px 0 25px; }.result-hero h1 { margin-top: 10px; }.score-card { max-width: 650px; display: flex; align-items: center; gap: 28px; margin-top: 35px; padding: 26px; border-radius: 20px; }.score-ring { width: 110px; height: 110px; display: grid; place-content: center; border-radius: 50%; color: var(--purple-dark); background: #eeebff; text-align: center; }.score-ring strong { font-size: 34px; line-height: 1; }.score-ring span { color: var(--muted); font-size: 12px; }.score-card h2 { margin: 8px 0; }.score-card p { margin: 0; font-size: 12px; }.result-actions { margin-top: 20px; }
@media (max-width: 800px) { .auth-layout, .exam-shell { grid-template-columns: 1fr; }.auth-copy { padding-top: 10px; }.palette { order: 2; }.stats-row { grid-template-columns: 1fr; gap: 10px; }.page-shell { padding-top: 28px; }.topbar { padding: 0 20px; }.page-shell { padding-left: 20px; padding-right: 20px; }.user-menu > span { display: none; }.exam-heading { align-items: flex-start; }.question-actions { align-items: stretch; flex-direction: column; }.question-actions .button { width: 100%; } }
@media (max-width: 480px) { .auth-card { padding: 25px 20px; }.dashboard-heading h1 { font-size: 32px; }.score-card { align-items: flex-start; flex-direction: column; }.brand-mark { width: 35px; height: 35px; }.question-card h2 { margin: 25px 0; } }
