:root { color-scheme: dark; --bg:#121617; --panel:#1b2021; --panel2:#202729; --line:#323a3b; --text:#e8edeb; --muted:#a2aeaa; --accent:#a6e7c7; --green:#a6e7c7; --amber:#e7c38e; --red:#eea39e; font-family:Inter,"Segoe UI",sans-serif; }
.auth-layout { display:grid; grid-template-columns:1fr 1fr; gap:70px; align-items:center; padding:25px 0; }
.auth-panel { max-width:460px; width:100%; }
.auth-benefits { padding-left:20px; margin-top:30px; color:var(--muted); }
.auth-benefits li { margin:14px 0; }
.auth-submit { width:100%; margin-top:24px; }
.auth-switch { width:100%; margin:14px 0; font-size:13px; }
#auth-error { margin-top:14px; }
@media(max-width:760px) { .auth-layout { grid-template-columns:1fr; gap:28px; padding:0; } .auth-layout h1 { font-size:30px; } .auth-panel { max-width:none; } .auth-benefits { display:none; } }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-size:15px; line-height:1.6; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; border:1px solid var(--line); background:var(--panel2); color:var(--text); border-radius:7px; padding:10px 17px; font-weight:600; transition:background .12s,border-color .12s; }
button:hover { background:#2b3534; border-color:#60736b; }
button:disabled { opacity:.5; cursor:wait; }
button.primary { background:var(--accent); color:#15281f; border-color:var(--accent); }
button.primary:hover { background:#c2f4dc; }
button.reveal { background:#edaa69; color:#2e1c0d; border-color:#edaa69; }
button.reveal:hover { background:#ffc18a; border-color:#ffc18a; }
button.quiet { background:transparent; border-color:transparent; color:var(--muted); }
button.small { padding:6px 11px; font-size:13px; }
button.danger { color:var(--red); }
button:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
input,textarea,select { width:100%; border:1px solid #46514e; border-radius:7px; padding:12px 14px; background:#131819; color:var(--text); }
input:focus,textarea:focus,select:focus { outline:2px solid #87c8a9; outline-offset:2px; }
textarea { resize:vertical; line-height:1.7; min-height:100px; }
textarea::placeholder,input::placeholder { color:#7f8b87; }
label { display:block; margin:18px 0 7px; font-size:13px; font-weight:600; }
h1,h2,h3,p { margin:0; }
h1 { font-size:36px; letter-spacing:-1.1px; line-height:1.2; font-weight:620; }
h2 { font-size:24px; letter-spacing:-.5px; line-height:1.4; font-weight:600; }
h3 { font-size:17px; font-weight:600; }
a { color:var(--accent); }
.site-header { min-height:88px; border-bottom:1px solid var(--line); padding:18px max(32px,calc((100vw - 1180px)/2)); display:flex; align-items:center; flex-wrap:wrap; gap:16px 24px; }
.brand { border:0; padding:0; background:none; font-size:25px; letter-spacing:-1px; font-weight:700; display:flex; align-items:center; }
.brand:hover { background:none; }
.brand-mark { display:inline-grid; place-items:center; width:31px; height:33px; margin-right:11px; border-radius:7px; background:var(--accent); color:#14251d; font-family:Georgia,serif; font-size:29px; line-height:1; }
.brand-dot { color:var(--accent); }
.header-caption { font-size:13px; color:var(--muted); flex:1; }
.header-nav { display:flex; align-items:center; gap:4px; margin-left:auto; }
.header-nav button { white-space:nowrap; }
#account-controls:empty { display:none; }
#account-controls button { overflow-wrap:anywhere; max-width:100%; }
main { max-width:1120px; margin:0 auto; padding:54px 24px 80px; min-height:calc(100vh - 88px); }
.connection { max-width:1072px; margin:20px auto -20px; border:1px solid #675333; border-radius:6px; padding:10px 16px; color:var(--amber); font-size:13px; background:#27231c; }
.eyebrow { text-transform:uppercase; letter-spacing:2px; font-size:11px; font-weight:650; color:var(--accent); margin-bottom:12px; }
.muted { color:var(--muted); }
.subtitle { margin-top:12px; color:var(--muted); max-width:700px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:25px; margin-bottom:32px; }
.row { display:flex; align-items:center; gap:12px; }
.between { justify-content:space-between; }
.wrap { flex-wrap:wrap; }
.actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:27px; }
.deck-card { display:flex; flex-direction:column; gap:18px; min-height:267px; }
.deck-card h2 { max-width:350px; }
.deck-actions { margin-top:auto; display:grid; gap:12px; }
.deck-card .actions { justify-content:flex-start; }
.deck-card .deck-delete { margin-left:auto; align-self:flex-end; flex-shrink:0; width:36px; height:36px; padding:8px; display:grid; place-items:center; }
.deck-delete svg { width:19px; height:19px; }
.deck-delete:hover { background:#442b29; border-color:#955e58; }
#deck-list > .empty { grid-column:1 / -1; }
.learning-summary-actions { margin:26px 0; }
.deck-icon { display:grid; place-items:center; width:37px; height:37px; background:#2c4037; border-radius:8px; font-family:Consolas,monospace; color:var(--accent); font-size:16px; }
.tag { font-size:11px; text-transform:uppercase; letter-spacing:.9px; border:1px solid var(--line); border-radius:4px; padding:3px 8px; color:var(--muted); }
.library-note { margin-top:28px; padding:24px 0; display:flex; gap:17px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.library-note strong { color:var(--text); font-weight:500; }
.back { padding:0; margin-bottom:25px; font-size:13px; }
.stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:9px; overflow:hidden; margin:24px 0; }
.stat { background:var(--panel); padding:20px 24px; }
.stat .value { font-size:29px; line-height:1.3; font-variant-numeric:tabular-nums; letter-spacing:-.7px; }
.stat .label { color:var(--muted); font-size:12px; margin-top:5px; }
.tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); margin:30px 0 25px; }
.tabs button { border:0; border-radius:0; background:transparent; padding:12px 0; color:var(--muted); }
.tabs button.active { color:var(--accent); box-shadow:0 2px 0 var(--accent); }
.section-heading { margin-bottom:20px; display:flex; align-items:center; justify-content:space-between; gap:15px; }
.stack { display:grid; gap:14px; }
.study-actions { background:var(--panel); border:1px solid var(--line); border-radius:9px; display:flex; gap:22px; align-items:center; justify-content:space-between; padding:24px; }
.study-actions p { color:var(--muted); font-size:13px; margin-top:5px; }
.practice-settings { margin:22px 0; padding:22px 24px; }
.settings-page { max-width:820px; }
.settings-fields { display:grid; grid-template-columns:minmax(150px,1fr) minmax(250px,2fr); gap:24px; }
.settings-fields input { max-width:110px; }
.threshold-input { justify-content:flex-start; }
.checkbox-label { display:flex; align-items:center; gap:10px; margin:20px 0 12px; }
.checkbox-label input { width:17px; height:17px; margin:0; accent-color:var(--accent); }
.scores-table { min-width:630px; }
.scores-table td:first-child { width:48%; }
.scores-table button.link { background:none; border:0; padding:0; text-align:left; font-weight:400; }
.scores-table .needs-revision { background:#e7c38e06; }
.score-note { display:block; font-size:11px; color:var(--muted); }
.run-settings { margin-bottom:20px; }
.threshold { width:74px; padding:8px; }
.inline-label { margin:0; color:var(--muted); font-weight:400; white-space:nowrap; }
.split { display:grid; grid-template-columns:1.3fr 1fr; gap:24px; margin-top:26px; }
.empty { padding:32px 20px; text-align:center; color:var(--muted); border:1px dashed var(--line); border-radius:8px; }
.list-row { padding:14px 0; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:18px; }
.list-row:last-child { border-bottom:0; }
.list-row button.link { text-align:left; padding:0; background:none; border:0; font-weight:400; }
.score { font-variant-numeric:tabular-nums; font-family:Consolas,"SFMono-Regular",monospace; color:var(--accent); }
.score.partial,.partial { color:var(--amber); }
.score.incorrect,.incorrect { color:var(--red); }
.correct { color:var(--green); }
.question-card { border:1px solid var(--line); border-radius:8px; padding:21px 23px; background:var(--panel); }
.question-card summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:15px; }
.question-card summary::after { content:'+'; color:var(--muted); margin-left:auto; }
.question-card[open] summary::after { content:'−'; }
.question-number { color:var(--muted); font:12px Consolas,monospace; }
.question-content { padding:20px 0 0 32px; }
.field-title { font-size:11px; text-transform:uppercase; letter-spacing:1.2px; color:var(--muted); margin-bottom:7px; }
.answer-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.question-content ul { margin:4px 0 18px; padding-left:20px; color:var(--muted); }
.question-content .actions { margin-top:20px; }
.history-table { width:100%; border-collapse:collapse; font-size:14px; }
.history-table th { text-align:left; color:var(--muted); font-weight:400; font-size:12px; padding:12px 8px; border-bottom:1px solid var(--line); }
.history-table td { padding:14px 8px; border-bottom:1px solid var(--line); }
.table-scroll { overflow-x:auto; }
.quiz { max-width:800px; margin:auto; }
.quiz-top { margin-bottom:23px; }
.progress-track { height:3px; border-radius:3px; background:var(--line); margin:19px 0 40px; }
.progress-fill { height:3px; background:var(--accent); border-radius:3px; }
.quiz h1 { font-size:30px; line-height:1.4; letter-spacing:-.5px; margin-bottom:30px; }
.quiz textarea { min-height:200px; padding:20px; font-size:17px; background:var(--panel); }
.quiz label { margin-top:0; color:var(--muted); font-weight:400; }
.quiz-bottom { margin-top:20px; display:flex; align-items:center; justify-content:space-between; gap:15px; }
.quiz-bottom > button { margin-left:auto; }
.answer-actions { display:flex; flex-wrap:nowrap; gap:10px; flex-shrink:0; }
.answer-actions button { white-space:nowrap; }
.key-hint { color:var(--muted); font-size:12px; }
kbd { font-family:inherit; font-size:11px; border:1px solid #4e5954; border-radius:4px; padding:2px 6px; margin:0 3px; }
.result-banner { display:flex; gap:20px; align-items:center; margin-bottom:25px; padding-bottom:24px; border-bottom:1px solid var(--line); }
.result-score { font-size:52px; line-height:1; letter-spacing:-2px; }
.verdict { text-transform:uppercase; letter-spacing:1.8px; font-size:12px; }
.result-block { margin:24px 0; }
.canonical { border-left:3px solid var(--accent); padding:15px 20px; background:#23322b; border-radius:0 6px 6px 0; }
.canonical :is(.answer-text, .answer-markdown) { font-size:18px; color:#def5e8; }
.notes { margin:8px 0 0; padding-left:19px; color:var(--muted); }
.error { background:#362522; border:1px solid #7b4941; color:#ffc0b1; padding:13px 16px; border-radius:6px; margin:16px 0; overflow-wrap:anywhere; }
.notice { background:#24342d; border:1px solid #44634f; color:#b5e1c8; padding:15px 20px; border-radius:6px; margin:20px 0; }
.chart { width:100%; height:135px; display:block; margin:16px 0; }
.report-hero { text-align:center; margin:10px 0 26px; }
.report-hero .large-score { font-size:86px; letter-spacing:-4px; line-height:1.2; font-weight:550; color:var(--accent); }
.report-hero .large-score small { font-size:36px; letter-spacing:-1px; }
.report-counts { display:flex; justify-content:center; gap:28px; margin:16px 0 28px; }
.report-counts span { font-size:13px; }
.answer-history { margin-top:15px; }
.answer-history summary { cursor:pointer; color:var(--muted); font-size:13px; }
.discussion { margin-top:24px; }
.discussion .form-help { margin:7px 0 20px; }
.discussion textarea { min-height:96px; font-size:15px; padding:13px 15px; margin-bottom:14px; }
.discussion .row > button { margin-left:auto; }
.discussion label { margin-top:20px; }
.chat-message { margin:14px 0; padding:15px 18px; border-radius:7px; background:#141a18; }
.chat-message.learner { margin-left:28px; background:#27332d; }
.chat-message.tutor { margin-right:28px; border-left:2px solid var(--accent); }
.markdown { min-width:0; overflow-wrap:anywhere; line-height:1.75; }
.markdown > * { margin:0 0 14px; }
.markdown > :last-child { margin-bottom:0; }
.markdown :is(h1,h2,h3,h4,h5,h6) { font-size:17px; line-height:1.4; letter-spacing:0; font-weight:650; margin:20px 0 10px; }
.markdown > :first-child { margin-top:0; }
.markdown :is(ul,ol) { padding-left:25px; }
.markdown li { padding-left:3px; margin:7px 0; }
.markdown li > p + p { margin-top:8px; }
.markdown li > :is(ul,ol) { margin:6px 0; }
.markdown strong { font-weight:700; color:#f0f7f3; }
.markdown code { font-family:Consolas,"Cascadia Code",monospace; font-size:.92em; background:#242e2a; color:#d3efdf; border-radius:4px; padding:2px 5px; }
.markdown pre { max-width:100%; overflow-x:auto; padding:15px 18px; background:#0e1312; border:1px solid var(--line); border-radius:7px; line-height:1.6; tab-size:4; }
.markdown pre code { display:block; padding:0; background:none; border-radius:0; white-space:pre; overflow-wrap:normal; }
.markdown blockquote { margin-left:0; padding-left:16px; border-left:3px solid var(--line); color:var(--muted); }
.markdown table { display:block; max-width:100%; overflow-x:auto; border-collapse:collapse; }
.markdown :is(th,td) { padding:8px 12px; border:1px solid var(--line); text-align:left; }
.markdown hr { border:0; border-top:1px solid var(--line); }
.question-heading { margin-bottom:30px; }
.question-heading .question-markdown > :is(p,h1,h2,h3,h4,h5,h6):first-child { font-size:30px; line-height:1.4; font-weight:620; letter-spacing:-.5px; }
.question-markdown pre { font-size:15px; font-weight:400; letter-spacing:0; }
.question-content > .question-markdown { margin-bottom:24px; }
dialog .discussion { border:0; background:none; margin:0; padding:0; }
dialog .discussion .row { margin-top:14px; }
dialog { width:min(650px,calc(100vw - 32px)); max-height:90vh; overflow-y:auto; border:1px solid #4c5a54; border-radius:12px; background:var(--panel); color:var(--text); padding:29px; }
dialog::backdrop { background:#000a; backdrop-filter:blur(3px); }
dialog .actions { justify-content:flex-end; margin-top:24px; }
dialog .subtitle { font-size:13px; }
dialog textarea { min-height:85px; }
dialog .close { float:right; margin:-10px -12px 0 8px; }
dialog.generation-dialog { width:min(1080px,calc(100vw - 32px)); }
.generation-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:28px; margin-top:24px; }
.generation-fields label:first-child { margin-top:0; }
.generation-fields #topic { min-height:180px; }
.generation-fields #count { max-width:120px; }
.generation-fields .form-help { margin-top:13px; }
.preview-panel { padding:22px; border:1px solid var(--line); border-radius:9px; background:#141a18; min-width:0; }
#question-preview { margin-top:20px; max-height:50vh; overflow-y:auto; overflow-wrap:anywhere; }
.preview-placeholder { color:var(--muted); padding:30px 0; }
.preview-question { margin-bottom:20px; }
.preview-question .question-markdown > p { font-size:18px; font-weight:600; line-height:1.5; }
.preview-panel .canonical { padding:13px 16px; }
.preview-panel .canonical :is(.answer-text, .answer-markdown) { font-size:15px; }
.preview-points { margin-top:20px; }
.preview-points ul { margin:5px 0; padding-left:20px; color:var(--muted); }
.preview-panel .form-help { margin-top:20px; }
.form-help { color:var(--muted); font-size:12px; margin:6px 0; }
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#35483e; color:#e9fff1; border:1px solid #668d76; padding:12px 24px; border-radius:8px; max-width:90vw; box-shadow:0 10px 40px #0006; z-index:10; }
[hidden] { display:none!important; }
@media(max-width:1000px) { .header-caption { display:none; } }
@media(max-width:760px) {
  .site-header { min-height:72px; padding:16px; gap:4px 12px; }
  .header-nav { gap:0; }
  .header-nav button { padding:8px; font-size:13px; }
  #account-controls { flex-basis:100%; gap:0; padding-top:8px; }
}
@media(max-width:750px) { main { padding:35px 20px 55px; } h1 { font-size:28px; } .grid,.split { grid-template-columns:1fr; } .stats { grid-template-columns:repeat(2,1fr); } .page-heading,.study-actions { align-items:flex-start; flex-direction:column; } .connection { margin:15px 20px -10px; } .quiz h1 { font-size:26px; } .quiz-bottom { align-items:flex-end; } .quiz-bottom .key-hint { max-width:190px; } .tabs { gap:22px; } .question-content { padding-left:0; } }
@media(prefers-reduced-motion:reduce) { * { transition:none!important; } }
@media(max-width:750px), (hover:none) and (pointer:coarse) {
  .key-hint { display:none; }
  .answer-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .answer-actions button { min-width:0; min-height:44px; padding:10px 6px; font-size:13px; }
}
@media(max-width:750px) { .settings-fields { grid-template-columns:1fr; gap:0; } .study-actions .actions { width:100%; } .tabs { gap:18px; } }
@media(max-width:750px) { .generation-layout { grid-template-columns:1fr; gap:20px; } .generation-fields #topic { min-height:120px; } #question-preview { max-height:none; } }
@media(max-width:750px) { .question-heading .question-markdown > :is(p,h1,h2,h3,h4,h5,h6):first-child { font-size:26px; } }
