.study-demo { --demo-accent: #67e8c5; background: linear-gradient(135deg, #142637, #121a2d); border-color: #34516a; scroll-margin-top: 105px; overflow: hidden; }
.demo-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.demo-eyebrow { color: var(--demo-accent); font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.demo-topic { border: 1px solid #34516a; border-radius: 30px; padding: 8px 14px; font-size: .8rem; white-space: nowrap; }
.demo-steps { display: grid; grid-template-columns: repeat(3,1fr); list-style: none; padding: 0; gap: 14px; margin: 25px 0 16px; }
.demo-steps li { color: #a7b5c8; font-size: .85rem; }
.demo-steps span { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 7px; border: 1px solid #53647c; border-radius: 50%; transition: background .25s; }
.demo-steps [aria-current] { color: #fff; font-weight: 700; }
.demo-steps [aria-current] span, .demo-steps .done span { background: var(--demo-accent); color: #102b32; border-color: transparent; }
.demo-progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 10px; overflow: hidden; accent-color: var(--demo-accent); margin-bottom: 28px; }
.demo-progress::-webkit-progress-bar { background: #2c3b50; }
.demo-progress::-webkit-progress-value { background: var(--demo-accent); transition: width .4s ease; }
.demo-stage:not([hidden]) { animation: demo-enter .35s ease both; }
.demo-stage h3 { font-size: clamp(20px,3vw,27px); margin: 8px 0 20px; }
.demo-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.study-demo button, .study-demo a.demo-primary { font: inherit; cursor: pointer; min-height: 48px; border-radius: 12px; padding: 12px 18px; }
.demo-options button, .demo-reveal, .demo-restart { background: #1e3046; color: #eef6ff; border: 1px solid #5a718b; transition: transform .2s, border-color .2s; }
.demo-options button:hover:not(:disabled), .demo-reveal:hover, .demo-restart:hover { transform: translateY(-2px); border-color: var(--demo-accent); }
.demo-options button:disabled { cursor: default; }
.demo-options .correct { border: 2px solid #67e8c5; }
.demo-options .incorrect { border: 2px dashed #ffb0b0; }
.demo-primary { display: inline-block; background: #67e8c5; color: #102b32 !important; border: 0; text-decoration: none; font-weight: 700 !important; }
.demo-feedback { font-weight: 700; }
.demo-feedback:empty { display: none; }
.demo-flashcard { padding: 24px; background: #1b2c42; border: 1px solid #526781; border-radius: 18px; text-align: center; }
.demo-flashcard > p:first-child { font-size: 1.2rem; font-weight: 700; }
.demo-card-answer { border-top: 1px solid #526781; padding-top: 20px; animation: demo-enter .35s ease; }
.demo-hint { font-size: .9rem; }
.demo-summary { display: flex; align-items: center; gap: 28px; }
.demo-ring { flex-shrink: 0; width: 130px; height: 130px; border: 9px solid #67e8c5; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.demo-ring strong { font-size: 2rem; color: #eef6ff; }
.demo-ring span { font-size: .8rem; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.study-demo :focus-visible { outline: 3px solid #facc15; outline-offset: 4px; }
.study-demo [hidden] { display: none !important; }
html[data-theme="light"] .study-demo { --demo-accent: #08786d; background: #f0fbf8 !important; color: #203441; }
html[data-theme="light"] .study-demo p, html[data-theme="light"] .study-demo h3, html[data-theme="light"] .demo-ring strong, html[data-theme="light"] .demo-steps li { color: #203441; }
html[data-theme="light"] .demo-flashcard { background: #fff; }
@keyframes demo-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width:600px) { .demo-heading, .demo-summary { flex-direction: column; } .demo-options { grid-template-columns: 1fr; } .demo-steps { gap: 8px; } .demo-steps span { display: grid; margin-bottom: 8px; } .demo-topic { white-space: normal; } .demo-actions > * { width: 100%; text-align: center; } }
@media(prefers-reduced-motion:reduce) { .study-demo *, .study-demo *::before { animation: none !important; transition: none !important; transform: none !important; } }
