:root{--ink:#17212c;--muted:#5a6674;--line:#d9e3ed;--brand:#285da8;--brand-dark:#19467f;--soft:#eef4fb;--finance:#127b6c;--math:#b35b24;--tech:#285da8;--paper:#fff;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#f6f8fb;font-size:16px}*{box-sizing:border-box}body{margin:0}a{color:var(--brand);text-underline-offset:3px}button,input,textarea,select{font:inherit}button,a.button{cursor:pointer}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--brand);background:var(--brand);color:white;border-radius:7px;padding:10px 17px;font-weight:600;text-decoration:none;line-height:1.4}button:hover,.button:hover{filter:brightness(.95)}button:disabled{opacity:.55;cursor:wait}.secondary{background:white;color:var(--brand);border-color:var(--line)}.quiet{background:transparent;color:var(--muted);border-color:var(--line)}:focus-visible{outline:3px solid #8bb5e9;outline-offset:3px}input,textarea,select{border:1px solid #b8c8d9;border-radius:6px;padding:10px;background:white;color:var(--ink)}textarea{resize:vertical;width:100%}input[type=radio]{accent-color:var(--brand)}label{display:block}label>span{display:block;font-weight:600;margin-bottom:7px}.sidebar{position:fixed;inset:0 auto 0 0;width:244px;background:white;border-right:1px solid var(--line);padding:36px 24px;display:flex;flex-direction:column;overflow:auto}.identity{text-decoration:none;color:var(--ink)}.course-code{display:block;font-size:12px;font-weight:800;letter-spacing:.18em;color:var(--brand);margin-bottom:12px}.identity strong{font-size:26px;letter-spacing:-.04em;line-height:1.15}.identity>span:last-child{display:block;font-size:11px;margin-top:15px;color:var(--muted)}.nav-label{font-size:10px;font-weight:750;letter-spacing:.18em;color:#7a8695;margin:38px 10px 12px}nav{display:grid;gap:4px}nav a{font-size:13px;text-decoration:none;color:var(--muted);border-radius:6px;padding:12px 10px;display:flex;justify-content:space-between;align-items:center}nav a.active{background:var(--soft);color:var(--brand);font-weight:650}nav a:hover{background:#f4f7fa}.count{font-size:10px;border:1px solid var(--line);border-radius:4px;padding:1px 5px}.sidebar-bottom{margin-top:auto;padding-top:60px;font-size:12px;color:var(--muted);line-height:1.7}.sidebar-bottom .track{display:block;margin:7px 0}.track{font-size:10px;letter-spacing:.12em;font-weight:750}.finance{color:var(--finance)}.math{color:var(--math)}.tech{color:var(--tech)}.main-shell{margin-left:244px}.topbar{height:77px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 46px;gap:16px}.brand{display:flex;align-items:center;gap:13px;font-size:13px;color:var(--muted)}.brand img{width:39px;height:39px;object-fit:contain}#account{display:flex;gap:12px;align-items:center;font-size:12px}.topbar .button,.topbar button{padding:7px 13px;font-size:12px}main{max-width:1350px;margin:auto;padding:44px 46px 72px;min-height:calc(100vh - 140px)}.eyebrow{font-size:11px;letter-spacing:.17em;font-weight:750;color:var(--brand);text-transform:uppercase;margin:0 0 15px}h1{font-size:clamp(32px,3.2vw,48px);letter-spacing:-.045em;line-height:1.13;margin:0 0 18px;font-weight:650}h2{font-size:23px;letter-spacing:-.025em;margin:0 0 15px}h3{font-size:17px;line-height:1.4;margin:0 0 12px}.lead{font-size:17px;color:var(--muted);line-height:1.75;max-width:710px}.hero{display:grid;grid-template-columns:1.5fr 1fr;gap:35px;align-items:center;padding-bottom:32px;border-bottom:1px solid var(--line)}.hero-graphic{min-width:0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:20px}.hero-graphic svg{width:100%;display:block}.chart-caption{font-size:11px;color:var(--muted);margin:8px 0 0}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:24px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:white;border:1px solid var(--line);border-radius:9px;margin:28px 0}.metric{padding:21px 23px;border-right:1px solid var(--line)}.metric:last-child{border:0}.metric strong{display:block;font-size:25px;font-weight:600;letter-spacing:-.035em}.metric span{display:block;font-size:12px;color:var(--muted);margin-top:5px}.section-heading{display:flex;align-items:end;justify-content:space-between;margin:35px 0 17px;gap:20px}.section-heading h2{margin:0}.section-heading>span{font-size:12px;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.card{background:white;border:1px solid var(--line);border-radius:9px;padding:24px;min-width:0}.card p{font-size:14px;line-height:1.7;color:var(--muted)}.card .card-no{font-size:11px;color:var(--muted);letter-spacing:.15em;margin-bottom:22px}.card a{font-size:13px;font-weight:650}.badge{display:inline-flex;font-size:10px;font-weight:700;letter-spacing:.05em;border-radius:4px;background:#edf3f9;color:var(--brand);padding:4px 7px}.badge.available{background:#e8f4ee;color:#22745a}.badge.planned{background:#f2f3f5;color:#6b7280}.split{display:grid;grid-template-columns:1.6fr 1fr;gap:22px}.prose{line-height:1.8;font-size:15px}.prose h2{margin-top:32px;padding-top:20px;border-top:1px solid var(--line)}.prose h2:first-child{margin-top:0;padding-top:0;border-top:0}.prose li{margin-bottom:7px}.prose table,table{border-collapse:collapse;width:100%;font-size:13px;line-height:1.6}th,td{padding:14px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}th{font-size:11px;letter-spacing:.04em;color:var(--muted);background:#f4f7fa}td strong{display:block}.table-wrap{overflow:auto;background:white;border:1px solid var(--line);border-radius:9px}#schedule-table{min-width:1000px}#schedule-table td:first-child{width:58px;color:var(--brand);font-weight:700}#schedule-table td:nth-child(3){min-width:190px}#schedule-table td:nth-child(n+4){font-size:12px}.notice-panel{background:var(--soft);border-left:3px solid var(--brand);border-radius:0 6px 6px 0;padding:16px 20px;line-height:1.6;font-size:13px;margin:22px 0}.form-card{max-width:480px;background:white;border:1px solid var(--line);border-radius:10px;padding:32px;margin:25px auto}.form-card label{margin:20px 0}.form-card input{width:100%}.error{color:#a82e3d}.muted{color:var(--muted);font-size:13px;line-height:1.6}.chapter-top{display:flex;justify-content:space-between;gap:20px;align-items:center}.tabs{display:flex;gap:10px;margin:24px 0;flex-wrap:wrap}.question{border-top:1px solid var(--line);padding:22px 0}.question label{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.5;padding:9px 0}.question input{margin-top:4px}.feedback{font-size:13px;line-height:1.7;background:#eef5f1;padding:13px;border-radius:6px;margin-top:12px}.workspace{display:grid;grid-template-columns:1.2fr 1fr;gap:20px;margin-top:24px}.editor-shell{background:#fff;border:1px solid var(--line);border-radius:9px;overflow:hidden}.editor-bar{display:flex;justify-content:space-between;gap:10px;padding:12px 16px;background:#eef3f9;font-size:12px;align-items:center}.code-editor{border:0;border-radius:0;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:14px;line-height:1.75;min-height:320px;tab-size:4;padding:22px;background:#fcfdff;white-space:pre;overflow:auto}.output{font-family:ui-monospace,Consolas,monospace;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;min-height:110px}.plot img{max-width:100%;background:white}.runner-frame{display:none}details{font-size:14px;line-height:1.7;margin:12px 0}summary{cursor:pointer;font-weight:600}.source-code{white-space:pre-wrap;overflow-wrap:anywhere;max-height:650px;overflow:auto;font-size:12px;line-height:1.7}.filter-bar{display:flex;gap:12px;align-items:center;margin:22px 0;flex-wrap:wrap}.filter-bar input{min-width:220px;flex:1}.footer,footer{border-top:1px solid var(--line);padding:20px 46px;color:var(--muted);font-size:11px;display:flex;justify-content:space-between}#notice{position:fixed;bottom:25px;left:calc(50% + 122px);transform:translateX(-50%);background:#17212c;color:white;max-width:600px;padding:13px 22px;border-radius:7px;font-size:13px;box-shadow:0 5px 25px #17212c22;display:none;z-index:99}#notice.show{display:block}.row-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.row-form label{flex:1}.row-form input{width:100%}.readonly-note{font-size:12px;color:var(--muted)}.compact{font-size:12px}.resource-group{margin:25px 0}.resource-group a{font-weight:600}.resource-group p{margin:6px 0}.progress-row{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:15px 0;font-size:14px}#tutor-response{white-space:pre-wrap;font-size:14px;line-height:1.8}
@media(min-width:1600px){main{padding-top:60px}.hero{gap:60px}}
@media(max-width:1100px){.sidebar{width:210px;padding:30px 18px}.main-shell{margin-left:210px}.topbar{padding:0 28px}main{padding:32px 28px 55px}.hero{grid-template-columns:1.4fr 1fr;gap:20px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace{grid-template-columns:1fr}.metric{padding:18px 15px}#notice{left:calc(50% + 105px)}}
@media(max-width:760px){.sidebar{position:static;width:auto;padding:20px;border-right:0;border-bottom:1px solid var(--line)}.identity{display:flex;align-items:center;gap:15px}.identity strong{font-size:20px}.identity strong br{display:none}.identity>span:last-child,.sidebar-bottom,.nav-label{display:none}.course-code{margin:0}.sidebar nav{display:flex;flex-wrap:wrap;gap:0;margin-top:14px}.sidebar nav a{padding:8px 10px;font-size:12px}.count{margin-left:7px}.main-shell{margin:0}.topbar{height:65px;padding:0 20px}.brand span{display:none}main{padding:30px 20px 50px}.hero{grid-template-columns:1fr}.hero-graphic{max-width:500px}.metrics{grid-template-columns:repeat(2,1fr)}.metric:nth-child(2){border-right:0}.metric:nth-child(-n+2){border-bottom:1px solid var(--line)}.grid,.split{grid-template-columns:1fr}h1{font-size:35px}.lead{font-size:15px}.card{padding:20px}.chapter-top{align-items:start;flex-direction:column}.section-heading{align-items:start;flex-direction:column;gap:6px}footer{padding:18px 20px;gap:15px}#notice{left:50%;width:90%}.workspace{grid-template-columns:1fr}.form-card{padding:24px}.code-editor{font-size:13px}.topbar #account{font-size:11px}}

/* CM261 university/college lockup and the original CM327 course-page figure. */
.brand a{display:flex;align-items:center;flex-shrink:0}.brand .college-logo{width:auto;height:38px;max-width:190px;object-fit:contain}.hero-graphic{margin:0;padding:12px}.hero-graphic img{display:block;width:100%;height:auto;object-fit:contain}.prose blockquote{margin:0 0 24px;padding:4px 0 4px 20px;border-left:3px solid var(--line);font-style:italic}.prose blockquote p{color:var(--ink)}.prose a{overflow-wrap:anywhere}.prose{overflow-wrap:anywhere}.prose table{display:block;overflow-x:auto}
@media(max-width:760px){.topbar{height:auto;min-height:77px;flex-wrap:wrap;padding:14px 20px}.brand .university-logo{width:34px;height:34px}.brand .college-logo{height:32px;max-width:180px}.topbar #account{flex-wrap:wrap}.hero-graphic{max-width:420px}}

/* Match HackMD's citation-then-thumbnail list and original thumbnail widths. */
.prose img{display:block;width:100px;max-width:100%;height:auto;margin:8px 0 18px;object-fit:contain}.prose img[title="120"]{width:120px}.prose img[title="300"]{width:300px}.prose td img{min-width:100px;margin:4px 0}.prose h3{margin-top:28px}.prose h4{margin-top:24px}.sidebar-bottom .track{letter-spacing:normal;font-size:12px}

.course-subtitle{font-size:22px;color:var(--muted);margin:0 0 20px}
.prose table th:nth-child(3),.prose table td:nth-child(3){white-space:nowrap}.prose table th:first-child,.prose table td:first-child{min-width:140px}.prose table th:last-child,.prose table td:last-child{min-width:260px}

#schedule-table .schedule-date{min-width:100px;white-space:nowrap;color:var(--muted)}
