:root{--ink:#333;--muted:#777;--accent:#0076c0;--line:#ddd;--paper:#fff;--red:#b94a48;--white:#fff}
*{box-sizing:border-box}body{margin:0;background:#fff;color:#333;font:14px/1.6 Arial,'Malgun Gothic','Segoe UI',sans-serif}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:1px solid #ccc;border-radius:0;padding:7px 13px;background:#fff;color:#555;font-weight:400;line-height:1.5}button:hover{background:#f5f5f5;border-color:#aaa}button:disabled{opacity:.55;cursor:not-allowed}button.primary{color:#fff;background:var(--accent);border-color:var(--accent)}button.primary:hover{background:#0064a3}button.small{font-size:12px;padding:4px 9px}button.danger{color:var(--red)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible{outline:2px solid #0076c0;outline-offset:3px}input,select,textarea{border:1px solid #ccc;border-radius:0;background:#fff;padding:7px 10px;color:#333;max-width:100%}input:focus,select:focus,textarea:focus{outline:0;border-color:#66afe9;box-shadow:0 0 3px #66afe955}label{display:block;font-weight:400}label input:not([type=checkbox]):not([type=radio]),label select{display:block;width:100%;margin:6px 0 18px}h1,h2,h3,p{margin-top:0}h1{font-size:27px;font-weight:400;line-height:1.4;margin-bottom:20px;word-break:keep-all}h2{font-size:21px;font-weight:400;line-height:1.5}h3{font-size:17px;font-weight:400;line-height:1.5}small{font-size:12px}.muted,small{color:#777}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.between{justify-content:space-between}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border-top:1px solid #ddd;border-bottom:1px solid #ddd;margin:24px 0}.grid3>.card{border:0;border-right:1px solid #eee;padding:20px;margin:0}.grid3>.card:last-child{border-right:0}.card{border:1px solid #ddd;background:#fff;border-radius:0;margin-bottom:24px;padding:22px}.card p:last-child{margin-bottom:0}.stat{font-size:29px;font-weight:400;line-height:1.5}.stat small{font-size:14px;margin-left:4px}.pill{display:inline-block;border:1px solid #ddd;background:#f9f9f9;color:#666;padding:3px 8px;font-size:12px;border-radius:0;white-space:nowrap}.pill.red{color:var(--red);background:#fff5f5;border-color:#edc7c7}.eyebrow{display:none}
.site-layout{display:flex;min-height:100vh;flex-direction:column}.site-header{border-bottom:1px solid #eee;background:#fff}.header-container{max-width:1170px;padding:0 15px;margin:0 auto}.utility-nav{min-height:29px;display:flex;justify-content:flex-end;align-items:center;gap:12px;font-size:11px;color:#888}.text-button{border:0;padding:0;background:none;color:#777;font-size:12px}.text-button:hover{color:var(--accent);background:none;text-decoration:underline}.main-header{display:flex;align-items:center;justify-content:space-between;min-height:75px;gap:35px}.site-logo{border:0;background:none!important;padding:0 0 15px;text-align:left;line-height:1;white-space:nowrap;color:#444}.wordmark{font-size:25px;font-weight:400;letter-spacing:2px;display:block}.wordmark-light{font-weight:300}.logo-angle{color:var(--accent);font-size:36px;line-height:0;vertical-align:-1px;margin-left:3px}.site-logo small{display:block;text-align:center;font-size:8px;letter-spacing:4px;margin-top:9px;color:#999}.main-nav{display:flex;align-self:stretch;align-items:stretch;gap:4px}.main-nav button{border:0;border-bottom:2px solid transparent;padding:19px 18px 21px;font-size:15px;background:none;color:#555;white-space:nowrap}.main-nav button:hover{color:var(--accent);background:#fafafa}.main-nav button.selected{color:var(--accent);border-bottom-color:var(--accent)}.site-content{width:100%;max-width:1170px;padding:36px 15px 48px;margin:0 auto;flex:1;min-width:0}.page-title{display:flex;align-items:baseline;justify-content:space-between;gap:15px;border-bottom:1px solid #eee;padding-bottom:15px;margin-bottom:24px}.page-title h1{margin:0;font-size:26px}.page-description{font-size:13px;color:#888;margin-bottom:22px}.page-title .page-description{margin:0}.site-footer{border-top:1px solid #eee;padding:27px 15px 30px;width:100%;max-width:1170px;margin:0 auto;display:flex;gap:24px;justify-content:space-between;color:#777;font-size:12px}.site-footer strong{font-size:15px;color:#555;font-weight:400}.site-footer p{margin:4px 0}.footer-note{font-size:11px;color:#999;line-height:1.9}.footer-links{display:flex;align-items:flex-start;gap:20px}.footer-links .text-button{font-size:12px}
.list-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 20px}.section-tabs{display:flex;gap:2px;align-items:center;flex-wrap:wrap}.tab-button{border:0;background:none;padding:8px 14px;font-size:13px;white-space:nowrap;color:#666}.tab-button:hover{background:#f5f5f5;color:#0076c0}.tab-button.active{background:var(--accent);color:#fff}.search-tools{display:flex;gap:12px;align-items:center}.search-tools select{font-size:12px;height:34px;width:92px;color:#666}.search-box{display:flex;align-items:stretch;height:34px}.search-box input{width:154px;padding:6px 9px;font-size:13px;min-width:0;border-right:0}.search-submit{width:35px;padding:6px 9px;display:grid;place-items:center}.table-wrap{overflow-x:auto;width:100%}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:10px 12px;border-bottom:1px solid #ddd;text-align:left;vertical-align:middle}th{background:#fafafa;color:#444;font-weight:600;white-space:nowrap}.judge-table{border:1px solid #ddd}.judge-table th{background:#fff;border-bottom:2px solid #ddd;font-size:13px;font-weight:600}.judge-table th,.judge-table td{border-right:1px solid #e8e8e8;padding:9px 12px;line-height:1.5}.judge-table tbody tr:nth-child(odd){background:#f9f9f9}.judge-table tbody tr:hover{background:#f1f6f9}.judge-table tbody tr:last-child td{border-bottom:0}.table-link{color:var(--accent);border:0;padding:0;background:none!important;text-align:left;font-size:inherit;line-height:inherit}.table-link:hover{text-decoration:underline}.table-link:disabled{color:#888;text-decoration:none}.number-col{width:105px;color:#666}.type-col{width:92px}.chapter-col{width:68px}.points-col{width:68px;text-align:right}.type-label{color:#777;font-size:12px}.table-bottom{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:20px}.result-count{color:#888;font-size:12px}.pagination{display:flex}.pagination button{padding:6px 12px;color:var(--accent);border:1px solid #ddd;margin-left:-1px;background:#fff;font-size:13px}.pagination button.active{background:var(--accent);border-color:var(--accent);color:white}.pagination button:hover:not(.active){background:#f5f5f5}.empty-state{text-align:center;padding:36px!important;color:#888}.bottom-information{display:grid;grid-template-columns:1.4fr 1fr;gap:50px;border-top:1px solid #eee;margin-top:38px;padding-top:23px}.bottom-information h2{font-size:17px;padding-bottom:8px;border-bottom:1px solid #eee;margin:0 0 13px}.bottom-information p,.bottom-information li{font-size:12px;color:#777;margin-bottom:7px}.bottom-information ul{margin:0;padding-left:18px}.bottom-information .table-link{font-size:12px}.notice-strip{border:1px solid #e3e3e3;border-left:3px solid var(--accent);background:#fafafa;padding:10px 14px;margin:0 0 20px;display:flex;justify-content:space-between;gap:15px;font-size:13px}.table-note{color:#888;font-size:12px;margin:18px 0}.learning-table td{padding-top:16px;padding-bottom:16px}.lesson-description{color:#888;font-size:12px}.status-complete{color:#248448;border-color:#b3d9bd}
.problem-breadcrumb{display:flex;align-items:center;gap:13px;font-size:13px;color:#999;margin-bottom:25px;padding-bottom:15px;border-bottom:1px solid #eee}.problem-heading h1{font-size:28px;font-weight:400;margin:0 0 22px;padding-bottom:15px;border-bottom:1px solid #eee}.problem-meta{margin:0 0 30px}.problem-meta th{font-weight:400;font-size:13px;background:#fff;color:#777;border-bottom:1px solid #ddd;padding:9px 10px}.problem-meta td{border:0;padding:10px;font-size:13px}.section-heading{font-size:21px;font-weight:400;border-bottom:1px solid #eee;padding-bottom:8px;margin:26px 0 18px}.section-heading:after{content:'';display:block;width:38px;height:2px;background:var(--accent);position:relative;top:10px}.prose{white-space:pre-wrap;font-size:14px;line-height:1.9;overflow-wrap:anywhere}.example-pair{gap:30px}.example-pair pre{margin:0}.card#workarea{border:0;padding:0}.editor{margin:18px 0 14px}.editor-top{display:flex;justify-content:space-between;border:1px solid #ddd;border-bottom:0;background:#f7f7f7;color:#888;padding:8px 12px;font:12px/1.5 Consolas,monospace}.code-editor{width:100%;min-height:255px;resize:vertical;background:#fff;color:#222;border:1px solid #ccc;padding:14px 16px;font:14px/1.8 Consolas,'Courier New',monospace;tab-size:4;white-space:pre;overflow:auto;display:block}.io{display:block;width:100%;min-height:65px;font:13px/1.7 Consolas,monospace;margin-top:6px}.output,pre{white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #ddd;border-radius:0;background:#f7f7f7;padding:12px 14px;font:13px/1.7 Consolas,monospace;color:#333}.output{min-height:65px;max-height:360px;overflow:auto}.plot{max-width:100%;background:#fff;border:1px solid #ddd}.options{display:grid;gap:0;margin:15px 0 25px;border-top:1px solid #ddd}.option{display:flex;align-items:flex-start;gap:12px;padding:13px 10px;border-bottom:1px solid #ddd;font-weight:400;cursor:pointer}.option:has(input:checked){background:#eef6fb}.option input{margin-top:5px;accent-color:var(--accent)}.option code{white-space:pre-wrap}.site-content>section.card[data-run-area]{border:0;border-bottom:1px solid #eee;padding:0 0 25px;margin:30px 0}.site-content>section.card[data-run-area] h2{padding-bottom:10px;border-bottom:1px solid #eee}.banner{padding:13px 16px;border:1px solid #e5d8b1;background:#fffcef;color:#806522;margin:18px 0;font-size:13px}.banner.info{background:#f3f8fc;border-color:#d4e4ef;color:#416985}.banner.error{background:#fcf2f2;border-color:#e7c8c8;color:#a94442}.banner.success{background:#f2faf3;border-color:#c6dfcc;color:#3c763d}.entry-wrap{max-width:850px;margin:20px auto 60px;display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:start}.entry-caption{padding-top:12px}.entry-caption h1{font-size:25px;font-weight:400}.entry-caption .muted{font-size:13px;line-height:1.9}.entry-form{padding:24px;border:1px solid #ddd}.entry-form h2{font-size:21px;padding-bottom:13px;border-bottom:1px solid #eee;margin-bottom:22px}.entry-form button{width:100%}.entry-steps{display:flex;align-items:center;gap:20px;margin:22px 0 26px;font-size:12px;color:#999;flex-wrap:wrap}.entry-steps span{display:flex;align-items:center;gap:7px}.entry-steps b{background:#eee;color:#888;width:23px;height:23px;display:grid;place-items:center;font-weight:400}.entry-steps .current,.entry-steps .done{color:var(--accent)}.entry-steps .current b,.entry-steps .done b{background:var(--accent);color:#fff}.login-note{font-size:11px;color:#999;line-height:1.8;margin:20px 0 0}.check{display:flex;gap:10px;align-items:center;font-weight:400;margin:14px 0}.check input{accent-color:var(--accent)}
.exam-layout{display:grid;grid-template-columns:minmax(0,1fr) 225px;gap:30px}.exam-aside{position:sticky;top:20px;align-self:start}.exam-aside .card{padding:18px;border:1px solid #ddd}.exam-aside small{font-size:11px}.timer{font:400 29px/1.5 Consolas,monospace;margin:8px 0;color:var(--accent)}.qmap{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin:15px 0}.qmap button{padding:6px 0;font-size:12px}.qmap button.answered{background:#e7f3fb;border-color:#90bddb;color:#0076c0}.qmap button.current{outline:1px solid var(--accent);outline-offset:0}.saved{font-size:12px;color:var(--accent)}.footnote{font-size:11px;color:#999;margin-top:20px;line-height:1.9}.divider{border:0;border-top:1px solid #eee;margin:23px 0}.chapter{display:grid;grid-template-columns:45px 1fr auto;gap:15px;align-items:center;padding:15px 0;border-bottom:1px solid #eee}.chapter-num{color:#888;font-size:13px}.chapter h3{margin:0 0 4px}.chapter p{font-size:12px;color:#888;margin:0}.progress{height:5px;background:#eee;margin:12px 0}.progress i{height:100%;display:block;background:var(--accent)}.filters{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.topline{font-size:12px;color:#888;margin-bottom:20px;display:flex;justify-content:space-between;gap:10px}.bank-json{width:100%;height:420px;font:12px/1.7 Consolas,monospace}.testcase{background:#fafafa}td pre{max-width:600px;max-height:230px;overflow:auto}dialog{max-width:650px;width:95%;max-height:90vh;overflow:auto;border:1px solid #bbb;border-radius:0;padding:26px;color:#333;box-shadow:0 5px 25px #0002}dialog::backdrop{background:#0005}details summary{cursor:pointer}details.card{padding:15px 18px}.loading{padding:80px 25px;text-align:center;color:#888}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#333;color:#fff;padding:11px 20px;border:0;box-shadow:0 2px 8px #0002;z-index:20;display:none;max-width:90%;font-size:13px}.hidden{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1000px){.main-header{gap:20px}.wordmark{font-size:22px;letter-spacing:1.5px}.main-nav button{padding-left:13px;padding-right:13px}.site-content{padding-top:28px}.exam-layout{grid-template-columns:minmax(0,1fr) 195px;gap:22px}.exam-aside .card{padding:14px}}
@media(max-width:760px){.main-header{display:block;min-height:0}.site-logo{padding-bottom:15px}.main-nav{display:flex;gap:3px;margin:0 -3px;flex-wrap:wrap}.main-nav button{font-size:13px;padding:11px 12px}.site-content{padding:25px 15px 35px}.page-title{margin-bottom:20px}.page-title .page-description{display:none}.list-toolbar{flex-wrap:wrap;gap:15px}.search-tools{margin-left:auto}.number-col{width:90px}.bottom-information{gap:25px}.lesson-description{display:none}.entry-wrap{gap:30px}.site-footer{gap:20px}.footer-links{gap:15px;flex-wrap:wrap;justify-content:flex-end}.problem-heading h1{font-size:24px}.example-pair{gap:18px}.exam-layout{display:flex;flex-direction:column-reverse}.exam-aside{position:static;width:100%}.exam-aside .card{padding:14px}.qmap{grid-template-columns:repeat(9,1fr)}.timer{font-size:26px}.grid3>.card{padding:15px}.grid3 .stat{font-size:24px}.grid3 h3{font-size:14px}}
@media(max-width:500px){body{font-size:13px}.header-container{padding:0 14px}.utility-nav{font-size:10px;min-height:27px}.utility-nav .text-button{font-size:10px}.site-logo{padding:3px 0 16px}.wordmark{font-size:23px}.main-nav{gap:0;justify-content:space-between}.main-nav button{font-size:11px;padding:10px 4px}.site-content{padding:22px 14px 30px}.page-title h1{font-size:24px}.section-tabs{gap:0}.tab-button{font-size:12px;padding:7px 10px}.list-toolbar{gap:14px;margin-bottom:16px}.search-tools{width:100%;margin:0;gap:10px}.search-tools select{width:82px}.search-box{flex:1}.search-box input{width:100%}.judge-table th,.judge-table td{padding:9px 8px;font-size:12px}.problem-table .number-col{width:67px;white-space:nowrap;font-size:11px}.problem-table .type-col{width:53px;white-space:nowrap;font-size:11px}.problem-table .chapter-col,.problem-table .points-col{display:none}.type-label{font-size:11px}.table-bottom{gap:12px}.result-count{font-size:11px}.pagination button{font-size:12px;padding:5px 10px}.bottom-information{grid-template-columns:1fr;gap:22px;margin-top:30px}.bottom-information h2{font-size:16px}.site-footer{flex-direction:column;padding-left:14px;padding-right:14px}.footer-links{justify-content:flex-start}.entry-wrap{grid-template-columns:1fr;gap:22px;margin:0}.entry-form{padding:20px}.entry-caption h1{font-size:23px}.entry-steps{gap:12px}.grid2{grid-template-columns:1fr;gap:18px}.example-pair{gap:0}.grid3{grid-template-columns:1fr}.grid3>.card{border-right:0;border-bottom:1px solid #eee;padding:13px 15px}.grid3>.card:last-child{border:0}.card{padding:18px}.problem-heading h1{font-size:23px}.problem-meta th,.problem-meta td{padding:8px 6px;font-size:11px}.section-heading{font-size:19px}.prose{font-size:13px}.code-editor{font-size:13px;min-height:220px;padding:10px}.editor-top{font-size:10px}.table-note{font-size:11px}.learning-table .number-col{width:42px}.learning-table td:last-child{width:50px}.learning-table .small{font-size:11px;padding:3px 7px}}

.sample-intro{margin-bottom:20px}.sample-toolbar,.sample-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:20px 0}.sample-pagination{justify-content:flex-start}.sample-pagination .sample-solved:not(.active){background:#edf7f0;color:#287443;border-color:#bfddc8}.sample-pagination .sample-solved:after{content:" ✓";font-size:10px}.sample-bottom>span{color:var(--muted)}#sample-result:not(:empty){margin-top:18px}@media(max-width:600px){.sample-toolbar{gap:10px}.sample-intro{font-size:13px}.sample-pagination button{min-width:34px;padding:7px 9px}}

/* Python editor: one shared input for learning, practice, and CBT answers. */
.editor{min-width:0}.code-editor.editor-source{display:none!important}.python-editor-host{border:1px solid #d7dfe7;border-top:0;min-width:0;overflow:hidden}.python-editor-tools{display:flex;align-items:center;gap:3px;padding:5px 8px;border:1px solid #ddd;border-top:0;background:#fafbfc}.python-editor-tools button{font:14px/1.3 Consolas,monospace;min-width:30px;padding:3px 6px;border:1px solid transparent;background:transparent;color:#596b7d}.python-editor-tools button:hover{background:#edf3f9;border-color:#d2dfea}.python-language{margin-left:auto;color:#657789;font-size:11px}.python-editor-status{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;border:1px solid #ddd;border-top:0;padding:5px 10px;font-size:11px;color:#718096;background:#fafbfc}.python-editor-help{font-size:11px;color:#7b8793;padding:7px 0}.python-editor-help summary{cursor:pointer}.python-editor-help p{margin:6px 0;line-height:1.8}.python-editor-host .cm-editor{min-width:0}.python-editor-host .cm-scroller{scrollbar-width:thin}.python-editor-host .cm-search input{width:auto;max-width:150px;font-size:12px}.python-editor-host .cm-search button{font-size:12px}.python-editor-host .cm-search label{display:inline-flex;gap:3px;align-items:center}.python-editor-host .cm-search label input{margin:0}.python-editor-host .cm-tooltip-autocomplete ul li{font-size:13px}@media(max-width:500px){.editor-top{gap:8px;flex-wrap:wrap;padding:7px 9px}.python-editor-host .cm-editor{font-size:13px}.python-editor-status{font-size:10px;padding:5px 8px}.python-editor-tools button{min-width:28px}.python-editor-host .cm-scroller{min-height:240px}.python-editor-help{font-size:10px}}
