:root{--background:#fafaf7;--foreground:#23204a;--ink:#23204a;--card:#fff;--primary:#ffc233;--primary-fg:#23204a;--secondary:#f3f1e9;--muted:#f1efe6;--muted-foreground:#5b5876;--accent:#fff1cc;--accent-link:#3b5bfd;--destructive:#e5484d;--border:#e7e5dc;--input:#e7e5dc;--ring:#3b5bfd;--radius:1rem;
--spine-board:#3b5bfd;--spine-class:#0fa3a3;--spine-subject:#7c5cff;--spine-topic:#ff6b5e;--spine-quiz:#2fb344;--spine-tool:#ffc233;--primary-soft:rgba(255,194,51,.18);--header-bg:rgba(250,250,247,.82)}
.dark{--background:#17152e;--foreground:#edebff;--ink:#edebff;--card:#201d40;--primary:#f5b62e;--primary-fg:#17152e;--secondary:#2a2650;--muted:#262247;--muted-foreground:#a9a4d0;--accent:#2e2a57;--accent-link:#7c90ff;--destructive:#ff6b6b;--border:#312d5e;--input:#322e60;--ring:#7c90ff;
--spine-board:#6e86ff;--spine-class:#3fc7c7;--spine-subject:#a48cff;--spine-topic:#ff8c82;--spine-quiz:#4fd06a;--spine-tool:#f5b62e;--primary-soft:rgba(245,182,46,.16);--header-bg:rgba(23,21,46,.82)}
*{border-color:var(--border)}
html{scroll-behavior:smooth}
body{background:var(--background);color:var(--foreground);font-family:'Geist',system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased;margin:0}
a{color:inherit;text-decoration:none}
.font-display{font-family:'Bricolage Grotesque','Geist',system-ui,sans-serif}
.font-mono{font-family:'Geist Mono',ui-monospace,Menlo,monospace}
.text-muted{color:var(--muted-foreground)}
.link{color:var(--accent-link);text-decoration:underline;text-underline-offset:3px}
:focus-visible{outline:2px solid var(--ring);outline-offset:2px;border-radius:.4rem}
.container-x{margin-inline:auto;padding-inline:16px;width:100%}
@media(min-width:640px){.container-x{padding-inline:24px}}
.w-5xl{max-width:64rem}.w-6xl{max-width:72rem}.w-3xl{max-width:48rem}.w-4xl{max-width:56rem}.w-md{max-width:28rem}
.page{padding-block:40px}
h1.page-title{font-family:'Bricolage Grotesque','Geist',sans-serif;font-weight:800;letter-spacing:-.02em;font-size:2.25rem;line-height:1.1;margin:0}
@media(min-width:640px){h1.page-title.hub{font-size:3rem}}
h2.section-title{font-family:'Bricolage Grotesque','Geist',sans-serif;font-weight:700;letter-spacing:-.01em;font-size:1.6rem;margin:0}
.eyebrow{font-family:'Geist Mono',ui-monospace,monospace;font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted-foreground)}
.highlight-sweep{background:linear-gradient(104deg,transparent .9%,var(--primary) 2.4%,var(--primary) 96%,transparent 98.5%);color:var(--primary-fg);padding:.02em .28em;border-radius:.2em .6em .3em .5em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.sweep-in{animation:sweep .55s ease-out both}
@keyframes sweep{from{background-size:0 100%;background-repeat:no-repeat}to{background-size:100% 100%}}
@media(prefers-reduced-motion:reduce){.sweep-in{animation:none}html{scroll-behavior:auto}}
.logo{font-family:'Bricolage Grotesque','Geist',sans-serif;font-weight:800;letter-spacing:-.03em;font-size:1.25rem;display:inline-flex;align-items:center}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius)}
.pad{padding:20px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;border-radius:999px;padding:.55rem 1.1rem;font-weight:600;font-size:.92rem;border:1px solid transparent;cursor:pointer;transition:transform .12s,background .12s;line-height:1.2}
.btn:hover{transform:translateY(-1px)}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
.btn-primary{background:var(--primary);color:var(--primary-fg)}
.btn-outline{background:transparent;border-color:var(--border);color:var(--foreground)}
.btn-outline:hover{background:var(--muted)}
.btn-ghost{background:transparent;color:var(--foreground)}
.btn-ghost:hover{background:var(--muted)}
.btn-lg{padding:.8rem 1.5rem;font-size:1rem}
.pill{display:inline-flex;align-items:center;gap:.3rem;border:1px solid var(--border);border-radius:999px;padding:.3rem .8rem;font-size:.85rem;background:var(--card)}
.pill:hover{background:var(--muted)}
.badge{display:inline-block;border-radius:999px;padding:.1rem .55rem;font-size:.7rem;font-weight:700;background:var(--accent);color:var(--foreground);font-family:'Geist Mono',monospace}
.badge-quiz{background:var(--spine-quiz);color:#fff}
.spine{--spine:var(--spine-board);display:block;position:relative;background:var(--card);border:1px solid var(--border);border-left:4px solid var(--spine);border-radius:var(--radius);padding:16px 18px;transition:transform .15s,box-shadow .15s}
.spine:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(35,32,74,.10)}
.spine .arrow{position:absolute;right:14px;top:50%;transform:translateY(-50%);opacity:0;transition:opacity .15s}
.spine:hover .arrow{opacity:.7}
.spine-class{--spine:var(--spine-class)}.spine-subject{--spine:var(--spine-subject)}.spine-topic{--spine:var(--spine-topic)}.spine-quiz{--spine:var(--spine-quiz)}.spine-tool{--spine:var(--spine-tool)}
.spine-title{font-family:'Bricolage Grotesque','Geist',sans-serif;font-weight:700;font-size:1.1rem;margin-top:2px}
.site-header{position:sticky;top:0;z-index:40;height:64px;background:var(--header-bg);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}
.menu{position:relative}
.menu-panel{display:none;position:absolute;left:0;top:calc(100% + 8px);background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:0 16px 40px rgba(35,32,74,.16);z-index:50}
.menu.open .menu-panel{display:block}
.menu-link{display:block;padding:.35rem .5rem;border-radius:.5rem;font-size:.92rem}
.menu-link:hover{background:var(--muted)}
.drawer{display:none;position:fixed;inset:64px 0 0 0;background:var(--background);z-index:45;overflow:auto;padding:20px 16px}
.drawer.open{display:block}
.site-footer{background:var(--muted);border-top:1px solid var(--border)}
.breadcrumbs{font-size:.85rem;color:var(--muted-foreground)}
.breadcrumbs a:hover{color:var(--foreground);text-decoration:underline}
.faq details{border:1px solid var(--border);border-radius:.8rem;padding:.9rem 1.1rem;background:var(--card);margin-bottom:.6rem}
.faq summary{cursor:pointer;font-weight:600;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq details p{color:var(--muted-foreground);margin:.6rem 0 0}
.ad-unit{margin-block:40px;border:1px dashed var(--border);border-radius:var(--radius);min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px}
.rich{white-space:pre-line;line-height:1.7}
.stat-num{font-family:'Geist Mono',monospace;font-size:2.4rem;font-weight:700;letter-spacing:-.02em}
.field{width:100%;border:1px solid var(--input);background:var(--card);color:var(--foreground);border-radius:.7rem;padding:.65rem .85rem;font:inherit}
.field:focus{outline:2px solid var(--ring);outline-offset:1px}
label.lbl{display:block;font-size:.85rem;font-weight:600;margin-bottom:.3rem}
.alert-err{background:rgba(229,72,77,.1);border:1px solid var(--destructive);color:var(--destructive);border-radius:.7rem;padding:.7rem .9rem;font-size:.9rem}
.alert-ok{background:rgba(47,179,68,.12);border:1px solid var(--spine-quiz);color:var(--foreground);border-radius:.7rem;padding:.7rem .9rem;font-size:.9rem}
.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius);background:var(--card)}
table.t{width:100%;border-collapse:collapse;font-size:.92rem}
table.t th,table.t td{padding:.8rem 1rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--border)}
table.t tr:last-child td{border-bottom:0}
.q-card{display:flex;gap:14px}
.q-num{font-family:'Geist Mono',monospace;font-weight:700;color:var(--spine-quiz)}
.opt{border:1px solid var(--border);border-radius:.6rem;padding:.5rem .7rem;font-size:.92rem;background:var(--background)}
.progress{height:8px;border-radius:999px;background:var(--muted);overflow:hidden}
.progress>span{display:block;height:100%;background:var(--primary)}
.bubble{border-radius:1rem;padding:.8rem 1rem;max-width:85%;line-height:1.6}
.bubble-user{margin-left:auto;background:var(--primary-soft);border:1px solid var(--primary)}
.bubble-bot{background:var(--card);border:1px solid var(--border);border-left:4px solid var(--spine-subject)}
.md>*:first-child{margin-top:0}.md>*:last-child{margin-bottom:0}
.md table{border-collapse:collapse;display:block;overflow-x:auto}.md th,.md td{border:1px solid var(--border);padding:.35rem .6rem}
.md pre{background:var(--muted);padding:.7rem;border-radius:.6rem;overflow-x:auto}.md code{font-family:'Geist Mono',monospace;font-size:.88em}
.md ul,.md ol{padding-left:1.3rem}.md blockquote{border-left:3px solid var(--border);margin-left:0;padding-left:.8rem;color:var(--muted-foreground)}
.dash{display:flex;min-height:100vh}
.sidebar{width:240px;flex-shrink:0;background:var(--card);border-right:1px solid var(--border);padding:16px;display:flex;flex-direction:column;gap:6px}
.sidebar.collapsed{display:none}
.nav-item{display:flex;align-items:center;gap:.6rem;padding:.55rem .7rem;border-radius:.7rem;font-size:.92rem;font-weight:500}
.nav-item:hover{background:var(--muted)}.nav-item.active{background:var(--accent);font-weight:700}
.topbar{position:sticky;top:0;z-index:30;background:var(--header-bg);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);padding:10px 16px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.toasts{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:100;display:flex;flex-direction:column;gap:8px}
.toast{background:var(--card);border:1px solid var(--border);border-radius:.8rem;padding:.6rem .9rem;box-shadow:0 8px 24px rgba(0,0,0,.15);font-size:.9rem}
.toast.err{border-color:var(--destructive)}
.spinner{width:16px;height:16px;border:2px solid var(--border);border-top-color:var(--ring);border-radius:50%;display:inline-block;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.fan{position:relative;height:260px}
.fan>div{position:absolute;width:250px}
.pre-line{white-space:pre-line}
.grid-auto{display:grid;gap:14px;grid-template-columns:1fr}
@media(min-width:640px){.grid-auto{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.grid-auto.cols-3{grid-template-columns:repeat(3,1fr)}}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
