:root{--bg: #f7f7fb;--surface: #ffffff;--surface-2: #f1f2f7;--border: #e3e5ee;--text: #171a26;--muted: #5d6478;--accent: #4f46e5;--accent-soft: #eceafd;--accent-text: #ffffff;--easy: #12805c;--easy-soft: #e3f5ee;--medium: #b35c00;--medium-soft: #fdf0e1;--hard: #c42b3c;--hard-soft: #fde8ea;--done: #12805c;--code-bg: #f4f5fa;--shadow: 0 1px 2px rgba(20, 22, 40, .05), 0 4px 16px rgba(20, 22, 40, .05);--radius: 14px;--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;color-scheme:light}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--bg: #0e1017;--surface: #161922;--surface-2: #1d212d;--border: #2a2f3d;--text: #e8eaf2;--muted: #9aa1b5;--accent: #8b85ff;--accent-soft: #24223f;--accent-text: #0e1017;--easy: #4ccf9b;--easy-soft: #15302a;--medium: #f2a94b;--medium-soft: #33271a;--hard: #ff7a88;--hard-soft: #3a1c22;--done: #4ccf9b;--code-bg: #11131b;--shadow: 0 1px 2px rgba(0, 0, 0, .3);color-scheme:dark}}:root[data-theme=dark]{--bg: #0e1017;--surface: #161922;--surface-2: #1d212d;--border: #2a2f3d;--text: #e8eaf2;--muted: #9aa1b5;--accent: #8b85ff;--accent-soft: #24223f;--accent-text: #0e1017;--easy: #4ccf9b;--easy-soft: #15302a;--medium: #f2a94b;--medium-soft: #33271a;--hard: #ff7a88;--hard-soft: #3a1c22;--done: #4ccf9b;--code-bg: #11131b;--shadow: 0 1px 2px rgba(0, 0, 0, .3);color-scheme:dark}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button{font:inherit;color:inherit}h1,h2,h3{line-height:1.25;margin:0;letter-spacing:-.01em}svg{width:1em;height:1em}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}.container{max-width:1080px;margin:0 auto;padding:0 16px}main.container{padding-top:28px;padding-bottom:40px;outline:none}.topbar{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--bg) 85%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}.topbar-inner{max-width:1080px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;gap:16px}.brand{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text);font-size:16px}.brand:hover{text-decoration:none}.brand-mark{width:30px;height:30px;border-radius:8px;background:var(--accent);display:grid;place-items:center}.brand-mark svg{width:20px;height:20px;fill:none;stroke:var(--accent-text);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}.nav{display:flex;gap:4px;margin-left:8px}.nav a{color:var(--muted);padding:6px 10px;border-radius:8px;font-weight:500;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.nav a:hover{color:var(--text);background:var(--surface-2);text-decoration:none}.nav a.active{color:var(--text);background:var(--surface-2)}.badge{background:var(--accent);color:var(--accent-text);font-size:11px;font-weight:700;border-radius:999px;padding:1px 7px;line-height:1.5}.topbar-actions{margin-left:auto;display:flex;gap:4px;align-items:center}.icon-btn{width:36px;height:36px;border-radius:10px;border:1px solid transparent;background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--muted)}.icon-btn:hover{background:var(--surface-2);color:var(--text)}.icon-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.icon-btn svg .fill{fill:currentColor}.i-moon{display:none}:root[data-theme=dark] .i-sun{display:none}:root[data-theme=dark] .i-moon{display:block}@media (prefers-color-scheme: dark){:root:not([data-theme=light]) .i-sun{display:none}:root:not([data-theme=light]) .i-moon{display:block}}.menu-wrap{position:relative}.menu{position:absolute;right:0;top:42px;min-width:220px;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:6px;z-index:30}.menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:8px 10px;border-radius:8px;cursor:pointer}.menu button:hover{background:var(--surface-2)}.menu hr{border:0;border-top:1px solid var(--border);margin:6px 0}.menu .danger{color:var(--hard)}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.muted{color:var(--muted)}.eyebrow{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.btn{display:inline-flex;align-items:center;gap:8px;cursor:pointer;padding:9px 16px;border-radius:10px;font-weight:600;border:1px solid var(--border);background:var(--surface);color:var(--text)}.btn:hover{background:var(--surface-2);text-decoration:none}.btn-primary{background:var(--accent);color:var(--accent-text);border-color:var(--accent)}.btn-primary:hover{background:var(--accent);filter:brightness(1.08)}.btn-sm{padding:5px 10px;font-size:13px;border-radius:8px}.bar{height:8px;background:var(--surface-2);border-radius:999px;overflow:hidden}.bar>span{display:block;height:100%;background:var(--accent);border-radius:999px;transition:width .3s ease}.bar.done>span{background:var(--done)}.pill{display:inline-block;font-size:12px;font-weight:600;padding:2px 9px;border-radius:999px;white-space:nowrap}.pill.E{color:var(--easy);background:var(--easy-soft)}.pill.M{color:var(--medium);background:var(--medium-soft)}.pill.H{color:var(--hard);background:var(--hard-soft)}.tag{font-size:11px;font-weight:600;padding:1px 7px;border-radius:6px;border:1px solid var(--border);color:var(--muted);white-space:nowrap}.tag.premium{color:var(--medium);border-color:color-mix(in srgb,var(--medium) 40%,transparent)}.tag.due{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,transparent)}.tag.mastered{color:var(--done);border-color:color-mix(in srgb,var(--done) 45%,transparent)}.hero{display:grid;grid-template-columns:1fr auto;gap:28px;align-items:center;padding:28px;margin-bottom:20px}.hero h1{font-size:30px;margin:6px 0 10px}.hero p{margin:0 0 18px;color:var(--muted);max-width:560px}.hero-actions{display:flex;gap:10px;flex-wrap:wrap}.ring{position:relative;width:150px;height:150px}.ring svg{width:150px;height:150px;transform:rotate(-90deg)}.ring circle{fill:none;stroke-width:12}.ring .track{stroke:var(--surface-2)}.ring .value{stroke:var(--accent);stroke-linecap:round;transition:stroke-dashoffset .5s ease}.ring-label{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;text-align:center}.ring-label strong{font-size:30px;display:block;line-height:1}.ring-label span{font-size:12px;color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:28px}.stat{padding:14px 16px}.stat .label{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:6px}.stat .value{font-size:22px;font-weight:700;margin-top:2px}.stat .value small{font-size:13px;color:var(--muted);font-weight:500}.dot{width:8px;height:8px;border-radius:50%;display:inline-block}.dot.E{background:var(--easy)}.dot.M{background:var(--medium)}.dot.H{background:var(--hard)}.dot.A{background:var(--accent)}.search-row{display:flex;gap:10px;margin-bottom:24px}.search{flex:1;display:flex;align-items:center;gap:10px;padding:0 14px;background:var(--surface);border:1px solid var(--border);border-radius:12px}.search svg{width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:2;flex:none}.search input{flex:1;border:0;background:transparent;color:var(--text);font:inherit;padding:11px 0;outline:none;min-width:0}.phase{margin-bottom:32px}.phase-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:4px}.phase-head h2{font-size:20px}.phase-blurb{color:var(--muted);margin:0 0 14px}.topic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.topic-card{display:block;padding:16px 18px;color:var(--text);transition:border-color .15s ease,transform .15s ease}.topic-card:hover{border-color:var(--accent);text-decoration:none;transform:translateY(-1px)}.topic-card .row{display:flex;justify-content:space-between;align-items:center;gap:10px}.topic-card h3{font-size:16px}.topic-num{font-family:var(--mono);font-size:12px;color:var(--muted);margin-right:8px}.topic-card .meta{font-size:13px;color:var(--muted);margin:6px 0 12px}.topic-card .count{font-size:13px;font-weight:600;color:var(--muted);white-space:nowrap}.topic-card.complete .count{color:var(--done)}.check-icon{width:16px;height:16px;fill:none;stroke:var(--done);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}.crumbs{font-size:14px;color:var(--muted);margin-bottom:14px}.crumbs a{color:var(--muted)}.topic-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;flex-wrap:wrap;margin-bottom:20px}.topic-head h1{font-size:28px;margin:4px 0 8px}.topic-head .sub{color:var(--muted);display:flex;gap:14px;flex-wrap:wrap;font-size:14px}.topic-progress{min-width:240px}.topic-progress .row{display:flex;justify-content:space-between;font-size:14px;margin-bottom:6px}.learn{padding:22px 24px;margin-bottom:20px}.learn-head{display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none;width:100%;background:none;border:0;padding:0;text-align:left}.learn-head h2{font-size:18px}.chev{width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;transition:transform .2s ease}.learn.collapsed .chev{transform:rotate(-90deg)}.learn.collapsed .learn-body{display:none}.learn-body{margin-top:14px}.learn-body p{margin:0 0 14px}.note{background:var(--accent-soft);border-radius:10px;padding:10px 14px;margin-bottom:14px;font-size:14px}.chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px}.chip{background:var(--surface-2);border:1px solid var(--border);padding:3px 10px;border-radius:999px;font-size:13px}.learn-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.learn h3{font-size:14px;margin-bottom:8px}.learn ul{margin:0 0 14px;padding-left:18px}.learn li{margin-bottom:6px}pre.code{background:var(--code-bg);border:1px solid var(--border);border-radius:10px;padding:14px 16px;margin:0;overflow-x:auto;font:13px/1.6 var(--mono);-moz-tab-size:4;tab-size:4}.code .kw{color:var(--accent)}.code .cm{color:var(--muted);font-style:italic}.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}.toolbar h2{font-size:18px}.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:3px}.seg button{border:0;background:transparent;padding:5px 11px;border-radius:7px;cursor:pointer;font-size:13px;font-weight:500;color:var(--muted)}.seg button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.filters{display:flex;gap:8px;flex-wrap:wrap}.plist{overflow:hidden}.prob{border-bottom:1px solid var(--border)}.prob:last-child{border-bottom:0}.prob-row{display:grid;grid-template-columns:auto 38px 1fr auto auto;gap:12px;align-items:center;padding:12px 16px}.prob.flash .prob-row{animation:flash 1.6s ease}@keyframes flash{0%,40%{background:var(--accent-soft)}to{background:transparent}}.prob-num{font-family:var(--mono);font-size:13px;color:var(--muted);text-align:right}.prob-title{min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.prob-title a{color:var(--text);font-weight:500}.prob-title a:hover{color:var(--accent)}.prob-title a svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;margin-left:3px;vertical-align:-1px;opacity:.5}.prob.is-done .prob-title a{color:var(--muted)}.prob-actions{display:flex;gap:2px}.prob-actions .icon-btn{width:32px;height:32px}.prob-actions .icon-btn.on{color:var(--medium)}.prob-actions .icon-btn.on svg{fill:currentColor}.prob-actions .icon-btn.has-note{color:var(--accent)}.checkbox{width:24px;height:24px;border-radius:7px;border:2px solid var(--border);background:var(--surface);display:grid;place-items:center;cursor:pointer;padding:0;flex:none;transition:background .15s ease,border-color .15s ease}.checkbox:hover{border-color:var(--done)}.checkbox svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;opacity:0}.checkbox.on{background:var(--done);border-color:var(--done)}.checkbox.on svg{opacity:1}:root[data-theme=dark] .checkbox.on svg{stroke:#0e1017}@media (prefers-color-scheme: dark){:root:not([data-theme=light]) .checkbox.on svg{stroke:#0e1017}}.prob-notes{padding:0 16px 14px 90px}.prob-notes textarea{width:100%;min-height:90px;resize:vertical;font:13px/1.5 var(--mono);background:var(--code-bg);color:var(--text);border:1px solid var(--border);border-radius:10px;padding:10px 12px}.prob-notes .hint{font-size:12px;color:var(--muted);margin-top:4px}.empty{padding:28px;text-align:center;color:var(--muted)}.pager{display:flex;justify-content:space-between;gap:12px;margin-top:24px}.pager a{flex:1;padding:14px 18px;color:var(--text)}.pager a:hover{border-color:var(--accent);text-decoration:none}.pager .next{text-align:right}.pager small{display:block;color:var(--muted);font-size:12px}.page-head{margin-bottom:20px}.page-head h1{font-size:28px;margin:4px 0 6px}.page-head p{color:var(--muted);margin:0;max-width:680px}.section{margin-bottom:28px}.section>h2{font-size:18px;margin-bottom:10px;display:flex;align-items:center;gap:8px}.prob-topic{font-size:12px;color:var(--muted)}.guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.guide-card{padding:20px 22px}.guide-card h2{font-size:17px;margin-bottom:12px}.guide-card ul,.guide-card ol{margin:0;padding-left:20px}.guide-card li{margin-bottom:8px}table.sched{width:100%;border-collapse:collapse;font-size:14px}table.sched td{padding:8px 0;border-bottom:1px solid var(--border)}table.sched td:last-child{text-align:right;font-weight:600;white-space:nowrap}table.sched tr:last-child td{border-bottom:0;font-weight:700}.mix{display:flex;height:10px;border-radius:999px;overflow:hidden;margin:10px 0 8px}.mix span:nth-child(1){background:var(--easy)}.mix span:nth-child(2){background:var(--medium)}.mix span:nth-child(3){background:var(--hard)}.mix-legend{display:flex;gap:14px;flex-wrap:wrap;margin:0 0 10px}.no-margin{margin:0}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:var(--text);color:var(--bg);padding:10px 16px;border-radius:10px;font-size:14px;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;z-index:50;max-width:calc(100vw - 32px)}.toast.show{opacity:1;transform:translate(-50%)}.footer{padding-bottom:32px;color:var(--muted);font-size:13px;text-align:center}@media (max-width: 820px){.stats{grid-template-columns:repeat(2,1fr)}.learn-grid,.guide-grid{grid-template-columns:1fr}}@media (max-width: 640px){.topbar-inner{gap:8px}.brand>span:last-child{display:none}.nav{margin-left:0}.nav{gap:0}.nav a{padding:6px 7px;font-size:14px}.topbar-actions{gap:0}.topbar-actions .icon-btn{width:32px;height:32px}.hero{grid-template-columns:1fr;padding:20px}.hero .ring{justify-self:center}.hero h1{font-size:24px}.topic-grid{grid-template-columns:1fr}.learn{padding:18px}.prob-row{grid-template-columns:auto 1fr auto;gap:10px;padding:12px}.prob-num{display:none}.prob-row .pill{grid-column:2;justify-self:start;grid-row:2}.prob-actions{grid-row:1 / span 2;grid-column:3}.prob-notes{padding:0 12px 12px}.pager{flex-direction:column}.pager .next{text-align:left}}.account-btn{width:36px;height:36px;border-radius:50%;border:1px solid var(--border);padding:0;background:var(--surface-2);cursor:pointer;display:grid;place-items:center;overflow:hidden;margin-left:4px}.account-btn:hover{border-color:var(--accent)}.avatar{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}.avatar-fallback{display:grid;place-items:center;font-weight:700;font-size:14px;color:var(--accent);background:var(--accent-soft)}.topbar-actions>.menu-wrap>.btn-sm{margin-left:6px}.account-menu{min-width:260px}.account-info{display:flex;flex-direction:column;gap:2px;padding:8px 10px}.account-info strong{font-size:14px}.account-info .muted{font-size:13px;overflow-wrap:anywhere}.small{font-size:12px}.signin-panel{padding:10px;display:flex;flex-direction:column;gap:4px}.signin-panel p{margin:0 0 8px}.signin-buttons{display:flex;flex-direction:column;gap:8px}.menu .signin-buttons .btn{width:100%;justify-content:center;padding:9px 12px}.provider-icon{width:18px;height:18px;flex:none}.btn:disabled{opacity:.6;cursor:progress}.banner{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 18px;margin-bottom:20px;border-color:color-mix(in srgb,var(--accent) 35%,var(--border))}.banner-icon{width:22px;height:22px;fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round;flex:none}.banner-text{flex:1;min-width:220px;font-size:14px}.banner .signin-buttons{flex-direction:row;flex-wrap:wrap}.banner .signin-buttons .btn{padding:7px 12px;font-size:14px}@media (max-width: 640px){.topbar-actions>.menu-wrap>.btn-sm{padding:5px 9px;margin-left:2px}.account-btn{width:32px;height:32px}.banner .signin-buttons{width:100%}.banner .signin-buttons .btn{flex:1;justify-content:center}}.auth-dialog{width:min(420px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);box-shadow:0 24px 64px #00000059}.auth-dialog::backdrop{background:#0a0c148c;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.auth-body{position:relative;padding:28px 24px 24px;display:flex;flex-direction:column;gap:14px}.auth-body h2{font-size:20px;padding-right:32px}.auth-sub{margin:-8px 0 0;font-size:14px}.auth-close{position:absolute;top:14px;right:14px}.auth-dialog .signin-buttons .btn{width:100%;justify-content:center;padding:10px 12px}.auth-divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.05em}.auth-divider:before,.auth-divider:after{content:"";flex:1;border-top:1px solid var(--border)}.auth-form{display:flex;flex-direction:column;gap:12px}.auth-form p{margin:0}.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500}.auth-form input{font:inherit;font-weight:400;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:10px 12px;width:100%}.auth-form input:focus{outline:2px solid var(--accent);outline-offset:0;border-color:transparent}.auth-form .btn{justify-content:center;padding:10px 14px}.auth-form .hint{font-size:12px;font-weight:400;color:var(--muted)}.label-row{display:flex;justify-content:space-between;align-items:baseline}.link-btn{background:none;border:0;padding:0;color:var(--accent);cursor:pointer;font-size:13px;font-weight:500}.link-btn:hover{text-decoration:underline}.form-error{color:var(--hard);font-size:13px;background:var(--hard-soft);padding:8px 10px;border-radius:8px}.auth-switch{text-align:center;font-size:13px;color:var(--muted)}.status-page{max-width:460px;margin:40px auto;padding:28px;display:flex;flex-direction:column;gap:14px}.status-page h1{font-size:22px}.status-page p{margin:0}.status-page .btn{align-self:flex-start}.status-page .auth-form .btn{align-self:stretch}.banner-actions{display:flex;gap:8px}@media (max-width: 640px){.banner-actions{width:100%}.banner-actions .btn{flex:1;justify-content:center}.signin-btn{margin-left:2px;padding:5px 9px}}
