*{box-sizing:border-box} [hidden]{display:none!important}body{margin:0;background:#f1f5f9;color:#0f172a;font:16px/1.65 'DM Sans',system-ui,sans-serif}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}a{color:#4f46e5}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #6366f1;outline-offset:3px}header{background:#0f172a;display:flex;justify-content:space-between;align-items:center;padding:16px max(20px,calc((100vw - 1100px)/2));gap:20px;flex-wrap:wrap}header>a{display:flex;align-items:center;gap:10px;font-size:16px;color:white;text-decoration:none}header img{height:32px}header nav{display:flex;gap:10px;flex-wrap:wrap}header nav a{border:1px solid #526174;border-radius:8px;padding:7px 12px;color:#e2e8f0;text-decoration:none;font-size:13px}.topic-heading{background:#0f172a;color:white;padding:24px max(20px,calc((100vw - 1100px)/2))}.topic-heading p{font-size:11px;color:#a5b4fc;letter-spacing:.08em;margin:0}.topic-heading h1{font-size:24px;font-weight:500;margin:6px 0}.topic-heading span{font-size:14px;color:#cbd5e1}main{max-width:1100px;margin:auto;padding:24px 20px 50px}.lesson-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.lesson-tabs button{border:1px solid #cbd5e1;background:white;border-radius:20px;color:#475569;font-size:13px;padding:8px 14px}.lesson-tabs button[aria-current=step]{color:#4f46e5;border-color:#6366f1;background:#eef2ff}.lesson-screen{background:white;border:1px solid #e2e8f0;border-radius:16px;padding:32px;max-width:880px;margin:auto}.step-tag{font-size:12px;color:#6366f1;margin:0 0 8px}h2{font-size:28px;line-height:1.3;margin:0 0 16px;font-weight:600}.lesson-copy{font-size:17px;color:#475569;max-width:740px}.interactive{margin:24px 0;border:1px solid #c7d2fe;border-radius:12px;background:#f8faff;overflow:hidden}.interactive-top{display:flex;justify-content:space-between;padding:16px 20px;align-items:center;gap:15px}.interactive-top strong{font-size:14px}.interactive button,.lesson-nav button{border:1px solid #c7d2fe;border-radius:8px;color:#4f46e5;background:white;padding:8px 14px;font-size:13px}canvas{display:block;width:100%;height:280px;background:#eef2ff}#model-controls{padding:18px 20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}#model-controls label{font-size:14px;width:100%}input[type=range]{width:100%;accent-color:#6366f1}#model-controls button[aria-pressed=true]{background:#6366f1;color:white}.model-caption{font-size:12px;color:#475569;margin:0;padding:0 20px 18px}.explanation{background:#eef2ff;border-left:3px solid #6366f1;padding:18px 20px;border-radius:4px}.explanation p{margin:8px 0 0;color:#334155}details{margin:24px 0;color:#475569}summary{cursor:pointer;font-size:14px;color:#4f46e5}.lesson-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #e2e8f0;padding-top:22px;margin-top:24px}.lesson-nav button:last-child{background:#6366f1;color:white}.lesson-nav span{color:#64748b;font-size:12px}.lesson-nav button:disabled{opacity:.4;cursor:default}.footnote{max-width:880px;margin:16px auto;font-size:12px;color:#64748b}@media(max-width:600px){.lesson-screen{padding:22px 18px}h2{font-size:24px}.lesson-copy{font-size:16px}canvas{height:240px}.lesson-tabs button{font-size:12px;padding:7px 10px}.interactive-top{padding:14px}.lesson-nav span{font-size:11px}}

.definition-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.definition-cards section{border:1px solid #dbe1ef;border-radius:10px;padding:18px;background:#fafbff}.definition-cards h3{margin:0 0 8px;color:#4f46e5;font-size:17px}.definition-cards p{margin:0 0 10px;font-size:14px;color:#334155}.definition-cards .definition-example{font-size:12px;color:#64748b;margin:0}@media(max-width:650px){.definition-cards{grid-template-columns:1fr}}

.real-life-case{border:1px solid #c7d2fe;background:#f8faff;border-radius:12px;padding:18px 20px}.real-life-case summary{font-weight:600}.real-life-case h3{font-size:19px;line-height:1.4;color:#0f172a;margin:20px 0 10px}.real-life-case p{font-size:15px;line-height:1.75}.real-life-case .case-prompt{padding:12px 16px;background:#eef2ff;border-left:3px solid #6366f1;border-radius:4px}body:has([data-step="1"][aria-current="step"]) canvas{height:320px}@media(max-width:600px){body:has([data-step="1"][aria-current="step"]) canvas{height:280px}}

/* Shared CS lesson rhythm: quiet surfaces, one focal model and restrained controls. */
.lesson-screen{border-radius:16px;box-shadow:0 2px 12px #0f172a03;padding:36px;max-width:860px}.interactive{background:#fff;border-color:#e2e8f0;border-radius:14px}.interactive-top{padding:20px 24px}.interactive-top strong{font-size:13px;font-weight:500;color:#64748b}.interactive-top>button{color:#64748b;border-color:#e2e8f0;background:#f8fafc;padding:7px 12px}canvas{background:#fafbfc}.interactive button{transition:background .18s,border-color .18s,box-shadow .18s}.interactive button:hover{background:#eef2ff;border-color:#a5b4fc}#model-controls{padding:22px 24px;gap:10px;border-top:1px solid #f1f5f9}#model-controls>button{border-radius:9px;border-color:#e2e8f0;color:#475569}#model-controls>button[aria-pressed=true]{background:#eef2ff;color:#4f46e5;border-color:#a5b4fc;box-shadow:inset 0 0 0 1px #6366f10a}#model-controls label{color:#64748b;font-size:13px;line-height:1.8}.model-caption{color:#64748b;font-size:11px;padding:0 24px 22px;line-height:1.7}.model-legend{display:flex;justify-content:center;gap:22px;padding:12px 20px;font-size:11px;color:#64748b;flex-wrap:wrap}.model-legend span{display:flex;align-items:center;gap:7px}.model-legend i{width:7px;height:7px;border-radius:50%}.explanation{background:#f8fafc;border-left-color:#a5b4fc}.definition-cards section{background:#f8fafc;border-color:#e2e8f0}.definition-cards h3{font-size:15px;font-weight:500}.real-life-case{background:#fafbff;border-color:#e2e8f0}@media(max-width:600px){.lesson-screen{padding:24px 18px}.interactive-top{padding:16px}#model-controls{padding:18px 16px}.model-caption{padding-inline:16px}.model-legend{gap:14px}}

body:has([data-step="2"][aria-current="step"]) canvas{height:330px}@media(max-width:600px){body:has([data-step="2"][aria-current="step"]) canvas{height:470px}}

/* The same calm completion milestone used by the Computer Science lessons. */
.subtopic-complete{max-width:740px;margin:50px auto 24px;padding:40px 24px;text-align:center;scroll-margin-top:24px}.completion-check{display:grid;place-items:center;width:72px;height:72px;border-radius:50%;background:#dcfce7;color:#16a34a;font-size:38px;margin:0 auto 24px}.completion-label{font-size:11px;letter-spacing:.08em;color:#64748b}.subtopic-complete h2{font-family:Georgia,serif;font-weight:400;font-size:30px;margin:12px 0 26px}.completion-recap,.completion-next{font-size:16px;color:#64748b;line-height:1.85;max-width:620px;margin:0 auto 18px}.completion-primary{display:inline-block;text-decoration:none;background:#6366f1;color:white;border-radius:9px;padding:14px 26px;margin:14px 0 22px;font-weight:600}.completion-primary:hover{background:#4f46e5}.completion-secondary{display:flex;gap:22px;justify-content:center;align-items:center;flex-wrap:wrap}.completion-secondary button{background:transparent;border:0;color:#4f46e5;padding:8px;font-size:14px}.completion-secondary a{font-size:14px}.completion-note{color:#64748b;font-size:11px;margin-top:28px}.lesson-nav .complete-subtopic-button{background:#16a34a!important;border-color:#16a34a;color:white}.lesson-nav .complete-subtopic-button:hover{background:#15803d!important}@media(max-width:600px){.subtopic-complete{margin-top:16px;padding:28px 8px}.subtopic-complete h2{font-size:27px}.completion-recap,.completion-next{font-size:15px}.lesson-nav .complete-subtopic-button{max-width:170px}.completion-primary{width:100%}}
