:root{--ink:#1e3153;--muted:#6f7f97;--accent:#3874ec;--deep:#2549b6;--teal:#00a69b;--border:#e0e8f5;--paper:#fff;--bg:#f5f8fe;--soft:#f0f6ff;--gold:#ffd26a;--shadow:0 14px 48px rgba(33,69,127,.09);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Noto Sans SC",sans-serif;color:var(--ink);background:var(--bg);line-height:1.55}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;position:relative;overflow-x:hidden}
button,select,textarea,input{font:inherit}
button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}
button:focus-visible,a:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #83adff;outline-offset:3px}
a{color:var(--deep)}a:hover{text-decoration-thickness:2px}
[hidden]{display:none!important}
.decor{position:fixed;border-radius:999px;filter:blur(6px);z-index:-1;pointer-events:none}
.decor-a{width:520px;height:520px;top:90px;right:-280px;background:radial-gradient(circle,rgba(199,218,255,.55),transparent 70%)}
.decor-b{width:520px;height:520px;top:650px;left:-310px;background:radial-gradient(circle,rgba(193,240,232,.46),transparent 68%)}
.topbar{position:sticky;z-index:15;top:0;border-bottom:1px solid rgba(223,232,245,.86);background:rgba(255,255,255,.90);backdrop-filter:blur(20px)}
.topbar-inner{max-width:1360px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 32px}
.brand{display:flex;align-items:center;gap:12px;border:0;background:none;color:inherit;text-align:left;white-space:nowrap}
.brand-mark{background:linear-gradient(145deg,#5d80f5,#31b3b0);color:#fff;border-radius:15px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:900;letter-spacing:-3px;box-shadow:0 7px 16px #466de034}
.brand-lines{display:flex;flex-direction:column;line-height:1.2;gap:5px}.brand-lines strong{font-size:18px;letter-spacing:-.4px}.brand-lines small{font-size:11px;color:var(--muted)}
.topnav{display:flex;gap:5px;padding:5px;background:#f2f6fd;border:1px solid #ebf0fa;border-radius:16px}
.nav-item{background:transparent;color:#60728e;border:0;padding:10px 14px;border-radius:11px;font-size:14px;font-weight:700;min-height:40px;white-space:nowrap}
.nav-item:hover{background:#e8effc;color:var(--deep)}.nav-item.active{background:white;color:var(--deep);box-shadow:0 2px 12px #27457817}
.top-chip,.soft-pill{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:999px;background:#eaf8f6;color:#198d83;font-size:12px;font-weight:800;white-space:nowrap}.soft-pill{background:#ecf2ff;color:#5272b4}
.shell{max-width:1340px;margin:0 auto;padding:34px 32px 74px;min-height:calc(100vh - 152px)}
.alert{padding:12px 18px;background:#fff1ee;color:#ad5034;border:1px solid #ffd4c8;border-radius:14px;margin-bottom:20px;font-size:14px;font-weight:600}
.eyebrow{display:inline-flex;gap:6px;align-items:center;letter-spacing:2px;font-size:11px;font-weight:900;color:#dceaff}.eyebrow-muted{color:#5f85c8}
h1,h2,h3,p{margin-top:0}h1{font-size:36px;letter-spacing:-1.1px;line-height:1.22}h2{font-size:24px;letter-spacing:-.6px;line-height:1.3}h3{font-size:16px}
p{line-height:1.7}
.muted{color:var(--muted)}.text-small{font-size:12px}
.btn{border:1px solid transparent;border-radius:12px;min-height:45px;padding:10px 17px;font-weight:800;font-size:14px;display:inline-flex;align-items:center;justify-content:center;gap:10px;text-align:center;transition:transform .14s,box-shadow .14s,background .14s}
.btn:not(:disabled):hover{transform:translateY(-2px)}
.btn-primary{background:linear-gradient(135deg,#4c81fb,#3265d6);box-shadow:0 8px 18px rgba(53,105,223,.25);color:#fff}
.btn-primary:not(:disabled):hover{box-shadow:0 10px 26px #436de344}
.btn-outline{background:#fff;color:#3667c8;border-color:#cfdcf2}
.btn-secondary{background:#eaf6f4;color:#087f78;border-color:#c7e7e1}
.btn-danger{background:#fff1ee;color:#b44936;border-color:#ffd0c3}
.btn-quiet{background:transparent;color:#536b98;border-color:transparent;box-shadow:none}
.btn-quiet:hover{background:#edf4ff}
.hero{min-height:342px;display:grid;grid-template-columns:1.05fr .95fr;border-radius:30px;padding:44px 50px;background:linear-gradient(118deg,#305fc9 0%,#597de9 56%,#48aaa9 120%);color:#fff;position:relative;overflow:hidden;isolation:isolate;box-shadow:0 24px 50px #3a63ae25}
.hero:before{content:"";position:absolute;right:-80px;top:-220px;width:630px;height:630px;border:1px solid #ffffff35;border-radius:50%;z-index:-1}
.hero:after{content:"";position:absolute;right:40px;bottom:-240px;width:490px;height:490px;border:1px solid #ffffff30;border-radius:50%;z-index:-1}
.hero-copy{max-width:600px;z-index:1;display:flex;flex-direction:column;align-items:flex-start}
.hero h1{font-size:43px;line-height:1.35;letter-spacing:-1.5px;margin:17px 0 15px;font-weight:850}
.hero h1 span{display:block;color:#d7fff3}
.hero p{font-size:15px;color:#eaf2ff;max-width:500px}
.hero-actions{display:flex;gap:12px;margin:15px 0 9px}.hero-actions .btn-primary{background:#fff;color:#2753bd;box-shadow:0 10px 24px #13377630}.hero-actions .btn-outline{background:#ffffff16;color:white;border-color:#ffffff66}.hero .hero-micro{font-size:12px;opacity:.85;margin:10px 0 0}
.hero-visual{display:flex;align-items:center;justify-content:center;position:relative;padding:15px}
.code-card{width:100%;max-width:430px;background:#1e3053;border:1px solid #d4e3ff33;border-radius:20px;padding:19px 20px 24px;box-shadow:0 28px 70px #0e286960;transform:rotate(2deg);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.window-dots{display:flex;gap:7px;margin-bottom:23px}.window-dots i{width:9px;height:9px;background:#ff9f93;border-radius:50%}.window-dots i:nth-child(2){background:#ffd376}.window-dots i:nth-child(3){background:#71cfb9}
.code-lines{font-size:14px;color:#f6f9ff;white-space:nowrap;margin:13px 0}.line-number{color:#8298bf;padding-right:8px}.fn{color:#a7baff}.str{color:#f4cf78}.comment{color:#87a8bf}.code-output{margin-top:19px;padding:12px 13px;border:1px solid #5b718f;background:#283e5d;border-radius:10px;color:#d0ffe9;font-size:13px}.good-dot{display:inline-block;height:7px;width:7px;border-radius:50%;background:#5ae3b5;margin-right:5px}
.hero-sticker{position:absolute;right:8px;bottom:9px;background:#fff;color:#476dc2;padding:10px 17px;border-radius:13px;font-size:12px;font-weight:800;box-shadow:0 9px 21px #1a49943b;transform:rotate(-5deg)}
.overview-strip{display:flex;align-items:center;gap:28px;padding:23px 30px;background:#fff;border:1px solid var(--border);border-radius:20px;margin-top:22px;box-shadow:0 8px 28px #3852a50a}
.overview-strip>div:not(.overview-note){display:flex;align-items:baseline;gap:8px;white-space:nowrap}.stat-number{font-size:27px;font-weight:900;color:#3b69d6}.stat-label{color:#7485a1;font-size:12px;font-weight:650}
.overview-note{border-left:1px solid #e8eef6;margin-left:auto;padding-left:22px;font-size:12px;color:#8793a8;line-height:1.6;max-width:300px}
.section-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:39px 0 20px}
.section-intro h1,.section-intro h2{margin:6px 0 5px}.section-intro p{margin:0;color:var(--muted);font-size:14px}
.page-title{margin-top:4px;margin-bottom:28px}.page-title h1{margin:9px 0}
.task-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.task-card{position:relative;text-align:left;border:1px solid #e1eaf8;background:#fff;border-radius:21px;padding:24px 20px 22px;box-shadow:var(--shadow);transition:transform .15s,border-color .15s;min-height:225px}
.task-card:hover{transform:translateY(-4px);border-color:#9ebafb}
.task-card .task-icon{display:inline-flex;height:48px;width:48px;align-items:center;justify-content:center;border-radius:15px;background:linear-gradient(135deg,#e6efff,#e8fbf7);font-size:24px;margin-bottom:18px}
.task-card .task-label{font-size:11px;letter-spacing:.3px;color:#7392be;font-weight:800}
.task-card h3{font-size:18px;margin:8px 0 7px}.task-card p{font-size:13px;color:#7888a3;margin:0 0 14px}
.card-footer{display:flex;justify-content:space-between;align-items:center;color:#5176c7;font-size:12px;font-weight:750;margin-top:auto}
.task-card .mark{display:inline-flex;padding:4px 8px;color:#168c7f;background:#ebf9f5;border-radius:7px;font-weight:800}
.gentle-note{display:flex;gap:13px;padding:20px 23px;margin-top:26px;border:1px solid #d6e9fb;background:#edf7ff;border-radius:17px;color:#44648c}
.note-symbol{width:27px;height:27px;display:flex;align-items:center;justify-content:center;border:1px solid #9cc7eb;border-radius:50%;font-weight:850;flex-shrink:0}
.gentle-note strong{display:block;margin:0 0 4px;font-size:14px}.gentle-note p{font-size:13px;margin:0;color:#6b85a4}
.map-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:22px}
.chapter-list{display:flex;flex-direction:column;gap:8px;max-height:70vh;overflow:auto;padding:5px}
.chapter-item{width:100%;display:flex;align-items:center;gap:13px;border:1px solid #e5ebf7;background:#fff;padding:13px 15px;border-radius:13px;text-align:left}
.chapter-item strong{display:block;font-size:14px}.chapter-item small{display:block;color:#7d8da8;font-size:11px;margin-top:3px}
.chapter-item .number{border-radius:10px;background:#f0f5fc;width:38px;height:38px;flex-shrink:0;text-align:center;line-height:38px;font-weight:850;color:#7191c0}
.chapter-item.active{background:#eaf1ff;border-color:#a7c1ff}.chapter-item.active .number{background:#4b79e0;color:white}
.chapter-arrow{margin-left:auto;color:#9aaccc}
.chapter-info,.mission-card,.code-workspace,.parent-panel,.summary-card{background:#fff;border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow)}
.chapter-info{padding:32px 34px}
.chapter-meta{color:#6d93c1;font-size:12px;font-weight:800;letter-spacing:1px}
.chapter-info h2{font-size:27px;margin:8px 0}.chapter-info>p{font-size:14px}
.info-card{display:flex;gap:12px;align-items:flex-start;padding:17px;background:#f3f8ff;border-radius:16px;margin:26px 0}
.icon-circle{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:28px;height:28px;background:#d1e4ff;color:#466dce;font-weight:900;flex-shrink:0}
.info-card strong{font-size:14px}.info-card p{font-size:12px;color:#7989a6;margin:4px 0 0}
.lesson-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:26px}
.lesson{background:#fbfcff;border:1px solid #e9eef8;border-radius:11px;padding:11px 13px;font-size:13px;display:flex;gap:8px;color:#506687}.lesson span{color:#99abc6;font-weight:900}
.chapter-actions{display:flex;gap:10px;flex-wrap:wrap}
.studio-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:2px 0 24px}.studio-head h1{margin:7px 0 8px}.studio-head p{font-size:14px;color:var(--muted);margin:0}
.studio-layout{display:grid;grid-template-columns:minmax(260px,345px) minmax(0,1fr);align-items:start;gap:20px}
.mission-card{padding:27px 24px;position:sticky;top:103px}
.field-label{display:block;color:#6981a5;font-size:12px;font-weight:800;margin-bottom:8px}
.task-select{display:block;width:100%;padding:12px 35px 12px 12px;background:#f7faff;border:1px solid #dce6f7;border-radius:11px;color:#244369;margin-bottom:21px}
.mission-tag{display:inline-block;background:#edf7f1;color:#2b9577;border-radius:7px;padding:5px 8px;font-size:11px;font-weight:850;margin-bottom:11px}
.mission-card h2{font-size:23px;margin:3px 0 9px}.mission-card>p{font-size:13px;color:#7385a4}.divider{height:1px;background:#e9eef6;margin:20px 0}
.direction-list{padding-left:19px;font-size:13px;color:#49617f}.direction-list li{padding-left:5px;margin-bottom:9px}
.mission-source{margin:18px 0 21px;color:#8b9eba;font-size:11px;line-height:1.6}
.hint-panel{background:#fff9e9;border:1px solid #f5e6ba;border-radius:13px;padding:13px 15px;margin:15px 0}
.hint-panel summary{font-size:13px;font-weight:800;color:#926921;cursor:pointer}.hint-panel #hint-content{font-size:12px;line-height:1.7;color:#725f39;margin-top:12px}.hint-btn{margin:6px 6px 6px 0;background:#fff;border:1px solid #e6d39b;border-radius:8px;padding:8px;font-size:12px;color:#8d651b;cursor:pointer}.hint-text{background:#fffdf6;border-radius:9px;padding:10px;margin-top:7px;white-space:pre-wrap}
.guide-box{padding:15px 16px;background:#f2f8ff;border-radius:13px;margin-top:17px}.guide-box strong{font-size:13px;color:#385ca0}.guide-box p{font-size:12px;color:#7590b5;margin:4px 0 0}
.code-workspace{overflow:hidden}.editor-toolbar{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;background:#f8faff;border-bottom:1px solid #e8eff8}.editor-name{display:flex;align-items:center;gap:8px;font-size:13px}
.file-symbol{background:#4775e9;color:#fff;border-radius:6px;padding:4px 6px;font-size:10px;font-weight:900}.save-status{font-size:11px;color:#6f9c8e}
.code-editor{display:block;width:100%;min-height:298px;resize:vertical;border:0;outline:0!important;padding:20px 24px;background:#202f4c;color:#ecf6ff;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:16px;line-height:1.75;tab-size:4;white-space:pre;overflow:auto;letter-spacing:.05px}
.code-editor:focus{box-shadow:inset 0 0 0 2px #89aefe}
.editor-tip{margin:0;padding:8px 18px;background:#eef3fa;color:#8193ae;font-size:11px}
.input-area{padding:17px 21px 8px;background:#fff}.input-area textarea{width:100%;border:1px solid #dfe8f5;border-radius:10px;padding:11px 13px;resize:vertical;min-height:59px;color:#405779;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px}
.run-toolbar{padding:9px 17px 17px;display:flex;gap:9px;align-items:center;flex-wrap:wrap}.run-toolbar .btn{font-size:12px;min-height:41px;padding:8px 12px}.toolbar-spacer{flex:1}
.output-card{margin:0 17px 17px;border:1px solid #dee8f5;border-radius:14px;overflow:hidden}
.output-header{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#f2f6fc;padding:10px 15px;font-size:12px}.output-header span{font-size:11px;color:#8092aa}
.output-card pre{padding:16px;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;min-height:85px;max-height:230px;overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.65;color:#324c73}
.practice-feedback{padding:13px 16px;border-top:1px solid #dde8f6;font-size:13px;background:#eaf8f4;color:#287866;font-weight:700}.practice-feedback.different{background:#fff8e9;color:#8a661e}.practice-feedback.failure{background:#fff1ec;color:#a55340}
.studio-bottom-note{font-size:11px;color:#8ea0b6;padding:0 23px 19px}
.works-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.work-card{border:1px solid #e0e9f5;background:#fff;border-radius:16px;padding:20px;display:flex;gap:15px;align-items:flex-start;justify-content:space-between}.work-card h3{margin:0 0 5px}.work-card p{font-size:12px;color:#8092ad;margin:0}.work-card button{white-space:nowrap}
.parent-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:25px 0}
.summary-card{padding:23px;display:flex;flex-direction:column;gap:5px}.summary-card small{color:#7890b0;font-size:12px}.summary-card strong{font-size:31px;color:#3d69d2}.summary-card span{color:#8c9db5;font-size:11px}
.parent-layout{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.parent-panel{padding:25px}.parent-panel h2{font-size:20px}.parent-panel>p{font-size:13px;color:#7385a0}
.history-list{display:flex;flex-direction:column;gap:10px;max-height:360px;overflow:auto}.history-row{display:flex;gap:9px;padding:11px 12px;background:#f6f9fe;border-radius:10px;justify-content:space-between}.history-row span{font-size:12px;color:#7186a5}.history-row strong{font-size:13px;color:#3c5778;font-weight:750}.history-row time{font-size:11px;color:#9caabf;white-space:nowrap}
.backup-actions{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0 16px}.upload-label{cursor:pointer}
.site-footer{border-top:1px solid #e1e9f3;background:#fff;display:flex;justify-content:space-between;padding:18px max(32px,calc((100% - 1270px)/2));font-size:12px;color:#9aacbf}
.toast{position:fixed;bottom:23px;right:23px;z-index:90;padding:13px 18px;border-radius:13px;background:#263f6a;color:#fff;font-size:13px;box-shadow:0 12px 38px #1e31534a}
.sr-only{position:absolute!important;height:1px;width:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1090px){.topbar-inner{padding:12px 18px}.top-chip{display:none}.shell{padding:25px 20px 60px}.task-grid{grid-template-columns:repeat(2,1fr)}.hero{padding:34px}.hero h1{font-size:36px}.map-layout{grid-template-columns:280px 1fr}.mission-card{position:static}}
@media(max-width:790px){.topbar-inner{flex-wrap:wrap;justify-content:center;gap:9px}.brand{margin-right:auto}.topnav{width:100%;overflow-x:auto;justify-content:space-between}.nav-item{padding:9px 8px;font-size:12px}.hero{grid-template-columns:1fr}.hero-visual{margin-top:24px}.hero h1{font-size:33px}.overview-strip{flex-wrap:wrap;gap:17px}.overview-note{width:100%;max-width:none;border-left:0;border-top:1px solid #e9eff7;padding:10px 0 0;margin-left:0}.map-layout,.studio-layout,.parent-layout{grid-template-columns:1fr}.chapter-list{max-height:230px;display:grid;grid-template-columns:repeat(2,1fr)}.studio-head{align-items:flex-start;flex-direction:column}.parent-summary{grid-template-columns:repeat(3,1fr)}.page-title{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.shell{padding:18px 12px 52px}.hero{padding:29px 22px;border-radius:21px}.hero h1{font-size:29px}.hero-actions{width:100%;flex-direction:column}.hero-actions .btn{width:100%}.hero-visual{padding:7px}.code-card{padding:16px}.hero-sticker{right:-4px;bottom:-5px}.task-grid{grid-template-columns:1fr}.task-card{min-height:180px}.section-intro{align-items:flex-start;flex-direction:column}.chapter-list{grid-template-columns:1fr;max-height:230px}.chapter-info{padding:22px}.lesson-list{grid-template-columns:1fr}.studio-head h1,.page-title h1{font-size:28px}.mission-card{padding:22px 19px}.code-editor{min-height:250px;font-size:14px;padding:18px}.run-toolbar{padding:12px}.run-toolbar .btn{flex-grow:1}.parent-summary{grid-template-columns:1fr}.site-footer{padding:16px 18px;flex-direction:column;gap:5px}.topnav{border-radius:12px}.topbar-inner{padding:10px 12px}.brand-lines strong{font-size:15px}.brand-mark{width:39px;height:39px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}

/* Python V2 · official directory extension (S2 catalog layer). */
.lesson-clickable{width:100%;cursor:pointer;text-align:left;display:flex;align-items:center;gap:12px;white-space:normal;border:1px solid #e3eaf3;border-radius:12px;padding:12px 14px;background:white;transition:border-color .15s,background .15s;color:inherit;font:inherit}
.lesson-clickable:hover,.lesson-clickable:focus-visible{border-color:#6286ba;background:#f3f7fe;outline-offset:2px}
.lesson-clickable .lesson-id{flex:0 0 48px;font-variant-numeric:tabular-nums;font-weight:700;color:#315c8c}
.lesson-clickable .lesson-name{flex:1;font-weight:600;min-width:0}
.lesson-clickable .lesson-state{font-size:.83em;color:#52657a;text-align:right}
.lesson-viewed{background:#f2f7ff}
.lesson-detail{margin-top:18px;padding:22px;border-radius:16px;border:1px solid #d4e1f0;background:#fbfdff;max-width:100%}
.lesson-detail h3{margin:7px 0 13px;font-size:1.2rem}
.lesson-detail p{line-height:1.65}
.lesson-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.lesson-actions .btn{white-space:normal}
@media(max-width:620px){.lesson-clickable{flex-wrap:wrap}.lesson-clickable .lesson-state{width:100%;text-align:left;padding-left:59px}}

/* Content lab link keeps the child home clear and optional. */
.gentle-note a{font-weight:700}
