:root{font-family:system-ui,sans-serif;color:var(--tg-theme-text-color, #172436);background:var(--tg-theme-bg-color, #f2f5fa)}body{margin:0}main{max-width:40rem;margin:0 auto;padding:2rem 1rem}.brand{color:var(--tg-theme-link-color, #215da8);font-weight:700}h1{font-size:clamp(1.6rem,6vw,2.3rem)}ul{padding:0;list-style:none;display:grid;gap:.6rem}li{padding:1rem;border-radius:.75rem;background:var(--tg-theme-secondary-bg-color, white);overflow-wrap:anywhere}button{padding:.7rem 1rem;min-height:44px;border:0;border-radius:.6rem;background:var(--tg-theme-button-color, #215da8);color:var(--tg-theme-button-text-color, white);font:inherit}body:has(.demo){background:#edf2fb;color:#14213d}.demo{max-width:44rem;padding:clamp(1rem,4vw,2rem)}.demo-header,.identity,.demo-files li{display:flex;align-items:center;gap:.8rem}.demo-header{justify-content:space-between;margin-bottom:1rem}.identity{font-weight:800}.identity span{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.9rem;background:#343ed1;color:#fff}.demo-label,.file-type{background:#e5e9ff;color:#3038a3;padding:.45rem .65rem;border-radius:.6rem;font-size:.8rem;font-weight:750}.demo-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:.3rem;padding:.3rem;background:#fff;border-radius:1rem;margin-bottom:1rem}.demo-nav button,.demo-options button{background:transparent;color:#253353;cursor:pointer}.demo-nav button[aria-pressed=true],.demo-options button[aria-pressed=true]{background:#e4e8ff;color:#232ba3;font-weight:700}.demo-hero,.demo-panel{border-radius:1.4rem;padding:clamp(1.15rem,5vw,2.4rem)}.demo-hero{color:#fff;background:radial-gradient(ellipse at 100% 0%,#655be5,transparent 65%),linear-gradient(125deg,#15214c,#3032a4);box-shadow:0 14px 32px #25287928}.demo-hero h1{margin:.25rem 0;max-width:12ch;font-size:clamp(2rem,7vw,3.3rem);line-height:1.06;letter-spacing:-.045em}.demo-hero p{color:#e4e7ff}.demo-hero button{background:#f6f7ff;color:#242b96;font-weight:750}.demo h2{margin-top:1.5rem;font-size:1.2rem}.demo-files li,.demo-panel{background:#fff;border:1px solid #dce4f3}.demo-files li>div{flex:1;min-width:0}.demo small{display:block;margin-top:.3rem;color:#4c5b78}.demo-files button{background:#eef0ff;color:#3038a3;min-width:44px}.demo-options{display:grid;gap:.6rem;margin-bottom:1rem}.demo-options button{text-align:left;border:1px solid #ccd6eb}.demo progress{width:100%;accent-color:#343ed1}.demo-primary{background:#343ed1;color:#fff}.demo button:disabled{background:#e1e5ee;color:#52617a}.demo button:focus-visible{outline:3px solid #5275ec;outline-offset:3px}.demo-score{font-size:3rem;font-weight:800;color:#343ed1;margin:0}.demo-options button.option-correct:disabled{background:#d5f5e2;border-color:#20844c;color:#125432}.demo-options button.option-incorrect:disabled{background:#ffe0e2;border-color:#bb3752;color:#8c2038}.demo{--quiz-blue: #2563eb;--quiz-violet: #7c3aed;--quiz-gold: #fbbf24;--quiz-ink: #0f172a;--quiz-muted: #475569;--quiz-border: #d9e4f8;max-width:52rem;color:var(--quiz-ink);line-height:1.5;padding-bottom:max(2rem,env(safe-area-inset-bottom))}body:has(.demo){background:#eff6ff}.demo-header{margin-bottom:1.5rem}.identity span{background:var(--quiz-blue)}.demo-label{background:#fff;border:1px solid var(--quiz-border)}.demo-nav{gap:.5rem;border:1px solid var(--quiz-border)}.demo-nav button{min-height:48px;padding-inline:.35rem}.demo-hero{display:grid;grid-template-columns:minmax(0,1fr) clamp(5rem,25vw,14rem);align-items:center;gap:1rem;background:radial-gradient(ellipse at 100% 0%,#6134cb,transparent 65%),linear-gradient(130deg,#111f52,#2047ba)}.demo-hero h1{font-size:clamp(2rem,7vw,4.35rem);line-height:1;text-wrap:balance}.demo-hero p{max-width:30ch}.demo-hero button{background:var(--quiz-gold);color:var(--quiz-ink);cursor:pointer}.quiz-art{position:relative;aspect-ratio:1;min-width:0}.quiz-art-sheet{position:absolute;top:6%;right:14%;bottom:12%;left:14%;padding:18% 14%;display:grid;align-content:center;gap:12%;border-radius:15%;background:#eef4ff;transform:rotate(12deg);box-shadow:-.6rem .55rem #a295fb,0 1rem 2rem #0f172a55}.quiz-art-sheet i{display:block;min-height:4px;border-radius:1rem;background:#a7bdfa}.quiz-art-sheet i:first-child{width:60%;background:var(--quiz-blue)}.quiz-art-sheet i:last-child{width:72%}.quiz-art-check{display:grid;place-items:center;position:absolute;right:0;bottom:8%;width:36%;aspect-ratio:1;border-radius:50%;background:var(--quiz-gold);color:var(--quiz-ink);font-weight:900;font-size:clamp(.9rem,4vw,2rem)}.demo-panel{box-shadow:0 12px 36px #1e3a8a10}.demo-panel label{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin:.75rem 0;min-height:48px}.demo-panel select{font:inherit;min-height:48px;border:1px solid #859ac2;border-radius:.65rem;padding:0 .6rem;background:#fff;color:var(--quiz-ink)}.demo-panel input{width:1.25rem;height:1.25rem;accent-color:var(--quiz-blue)}.quiz-meta{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:space-between;align-items:center}.demo-timer{border-radius:2rem;padding:.45rem .85rem;background:#ffefbc;color:#643707;font-weight:800;font-variant-numeric:tabular-nums}.demo-timer[data-urgent=true]{color:#8c2038;background:#ffe0e2}.demo-options button{display:flex;align-items:center;gap:.85rem;min-height:56px}.option-letter{display:grid;place-items:center;width:2rem;height:2rem;flex:0 0 2rem;background:#eaf0fd;color:#263b77;font-weight:800;border-radius:.5rem}.demo button:enabled{cursor:pointer;touch-action:manipulation;transition:box-shadow .16s ease}.demo button:enabled:active{box-shadow:inset 0 0 0 2px currentColor}.demo-primary{background:var(--quiz-blue);min-height:48px}@media(max-width:420px){.demo-hero{grid-template-columns:minmax(0,1fr) 3.75rem;gap:.4rem}}@media(prefers-reduced-motion:reduce){.demo button{transition:none}}.demo-hero{position:relative;overflow:hidden;isolation:isolate;min-height:15rem}.demo-hero:before{content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;pointer-events:none;background-image:radial-gradient(circle,#fff5 1px,transparent 1.5px);background-size:20px 20px;-webkit-mask-image:linear-gradient(90deg,transparent 24%,#000);mask-image:linear-gradient(90deg,transparent 24%,#000)}.demo-hero:after{content:"";position:absolute;z-index:-1;right:-3rem;top:-5rem;width:15rem;aspect-ratio:1;border-radius:50%;border:1px solid #fff5;box-shadow:0 0 0 1.5rem #fff1,0 0 0 3rem #fff1}.quiz-art-sheet{gap:.55rem;align-content:center}.demo-files{gap:.85rem}.demo-files li{border-left:4px solid var(--quiz-blue)}.demo-files li:nth-child(2){border-left-color:var(--quiz-violet)}.demo-files li:nth-child(3){border-left-color:#d5870a}.file-type{width:3rem;text-align:center;background:#e9efff}.demo-files li:nth-child(2) .file-type{background:#f0e7ff;color:#6023a9}.demo-files li:nth-child(3) .file-type{background:#fff1cf;color:#704107}.feedback-slot{min-height:2.5rem}.quiz-feedback{margin:0;padding:.5rem .8rem;border-radius:.65rem;font-weight:750;background:#ffe0e2;color:#8c2038}.quiz-feedback[data-correct=true]{background:#d5f5e2;color:#125432}.result-summary{display:flex;align-items:center;flex-wrap:wrap;gap:1rem;border-radius:1.2rem;padding:1.25rem;background:linear-gradient(120deg,#14245c,#5030ab);color:#fff}.result-summary p{margin:.25rem 0}.result-ring{display:grid;place-items:center;width:6rem;aspect-ratio:1;border-radius:50%}.result-ring .demo-score{display:grid;place-items:center;width:5rem;aspect-ratio:1;border-radius:50%;background:#202963;color:#fff;font-size:2rem}@keyframes quiz-enter{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes artwork-enter{0%{opacity:0;transform:translate(14px,10px) rotate(-9deg) scale(.88)}to{opacity:1;transform:none}}@keyframes score-reveal{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:no-preference){.hero-copy,.demo-panel{animation:quiz-enter .34s cubic-bezier(.2,.75,.25,1) both}.question-stage{animation-duration:.23s}.quiz-art{animation:artwork-enter .68s cubic-bezier(.2,.8,.2,1) both}.quiz-feedback{animation:quiz-enter .16s ease-out both}.result-ring{animation:score-reveal .46s cubic-bezier(.2,.8,.25,1.2) both}}.studio-grid{display:grid;gap:16px;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}.studio-intro{position:relative;overflow:hidden;isolation:isolate;padding:32px;min-height:240px;border-radius:20px;background:radial-gradient(ellipse at right top,#6274f232,transparent 68%),#17254e;color:#fafafc}.studio-intro h1{max-width:12ch;font-size:clamp(2rem,6vw,3.65rem);line-height:1.05;letter-spacing:-.03em;margin:0 0 16px}.studio-intro p{max-width:32ch;color:#dbe4fa;margin:0}.studio-intro .quiz-art{position:absolute;width:112px;right:-16px;bottom:0;z-index:-1;opacity:.48}.demo .studio-upload{display:flex;flex-direction:column;justify-content:center;padding:24px;box-shadow:none;background:#f4f5f8}.studio-upload h2{margin:0;font-size:1.45rem;letter-spacing:-.02em}.studio-upload p{color:#475569;margin:8px 0}.demo-panel .file-picker{position:relative;display:grid;place-items:center;min-height:72px;margin:16px 0;background:#214fc3;color:#fafafc;border-radius:8px;font-weight:750;cursor:pointer}.file-picker input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;width:100%;height:100%;cursor:pointer}.file-picker:focus-within{outline:3px solid #214fc3;outline-offset:4px}.file-picker:hover{background:#183fa5}.studio-steps{grid-column:1/-1;padding:0;margin:0;list-style:none;display:grid;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}.studio-steps li{display:grid;gap:8px;background:#f7f8fc;border:1px solid #18274912;padding:16px;border-radius:12px}.studio-steps span{color:#475569}.demo-panel fieldset{min-width:0;margin:0 0 16px;padding:16px;border:1px solid #bbcbe8;border-radius:12px}.demo-panel textarea,.demo-panel input:not([type]){box-sizing:border-box;width:100%;font:inherit;padding:8px;min-height:44px;border:1px solid #859ac2;border-radius:8px;background:#fafafc;color:#0f172a}.demo-timer,.demo-score{font-family:JetBrains Mono,ui-monospace,monospace}.parse-loading{display:grid;gap:8px}.parse-loading i{height:8px;border-radius:8px;background:linear-gradient(90deg,#d9e4f8 25%,#edf2ff,#d9e4f8 75%);background-size:200% 100%}.parse-loading i:last-child{width:65%}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(max-width:640px){.studio-grid,.studio-steps{grid-template-columns:1fr}.studio-intro{min-height:auto;padding:24px}}@keyframes parse-shimmer{to{background-position:-200% 0}}@media(prefers-reduced-motion:no-preference){.parse-loading i{animation:parse-shimmer 1.6s linear 3}.studio-intro{animation:quiz-enter .34s cubic-bezier(.16,1,.3,1) both}}
