
:root{--bg:#ffffff;--ink:#111827;--muted:#6b7280;--brand:#ef4444;--ok:#10b981;--warn:#f59e0b;--card:#f9fafb;}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;color:var(--ink);background:var(--bg);}
.container{max-width:980px;margin:0 auto;padding:24px}
.header{display:flex;align-items:center;gap:16px;margin-bottom:20px}
.header .title{font-weight:800;font-size:28px;line-height:1.1}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;background:var(--card);color:var(--muted);font-size:12px}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:20px;box-shadow:0 1px 2px rgba(0,0,0,.04);margin:16px 0}
h2{font-size:20px;margin:0 0 8px}
h3{font-size:16px;margin:12px 0 6px}
.controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:20px}
.button{border:0;background:var(--brand);color:#fff;padding:10px 14px;border-radius:12px;cursor:pointer;font-weight:600}
.button.secondary{background:#1118270d;color:#111827}
.progress{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.progress > div{height:100%;background:var(--brand);width:0%}
.grid{display:grid;gap:12px}
.grid.cols-2{grid-template-columns:1fr 1fr}
.grid.cols-3{grid-template-columns:repeat(3,1fr)}
.kv{display:grid;grid-template-columns:160px 1fr;gap:8px;align-items:start}
.item{padding:10px;border:1px dashed #e5e7eb;border-radius:12px;background:var(--card)}
.dropzone{min-height:56px;border:2px dashed #cbd5e1;border-radius:12px;padding:8px}
.choice{border:1px solid #e5e7eb;border-radius:12px;padding:12px;cursor:pointer}
.choice.correct{outline:2px solid var(--ok)}
.choice.incorrect{outline:2px solid #ef4444}
.hidden{display:none !important}
.note{color:var(--muted);font-size:13px}
.footer{margin-top:40px;color:var(--muted);font-size:12px;text-align:center}
.flashcard{border:1px solid #e5e7eb;border-radius:16px;padding:16px;cursor:pointer;background:linear-gradient(180deg,#fff,#f9fafb)}
.draggable{user-select:none}
ol.steps{padding-left:20px}
hr{border:0;border-top:1px solid #e5e7eb;margin:20px 0}

/* --- Branding from reference (auto-detected) --- */
:root{--brand:#ffc708;}
body{font-family:Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;}

/* Layout with TOC sidebar */
.shell{display:grid;grid-template-columns:260px 1fr;gap:24px}
.toc{position:sticky; top:12px; align-self:start; background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:16px}
.toc .brand{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.toc .brand img{height:28px}
.toc .progress-wrap{margin:8px 0 12px}
.toc .progressbar{height:8px;background:#e5e7eb;border-radius:999px;overflow:hidden}
.toc .progressbar > div{height:100%;background:var(--brand);width:0%}
.toc .pct{font-size:12px;color:var(--muted);text-align:right;margin-top:4px}
.toc ul{list-style:none;padding:0;margin:0}
.toc li{display:flex;align-items:center;gap:8px;padding:8px;border-radius:10px;cursor:pointer}
.toc li.active{background:#1118270a}
.toc li .dot{width:8px;height:8px;border-radius:999px;background:#cbd5e1}
.toc li.done .dot{background:#10b981}
.toc li .label{flex:1;font-size:14px}
.toc li .step{font-size:11px;color:var(--muted)}

/* Header tweak */
.header .title{font-weight:900;letter-spacing:.2px}

/* Buttons brand accent */
.button{background:var(--brand);}
