.plan-page,.topic-page{max-width:1140px;margin:auto;padding:35px 32px 65px}.plan-heading{display:flex;align-items:center;justify-content:space-between;gap:30px}.plan-heading h1{font-size:58px;margin:10px 0 16px}.plan-heading p{color:var(--muted)}.plan-heading img{width:220px;height:145px;object-fit:cover;border:1px solid var(--line);border-radius:6px}.plan-controls{display:flex;gap:28px;align-items:end;padding:22px;background:var(--mint);border:1px solid var(--line);border-radius:6px;margin:22px 0 12px}.search-label{flex:1;font-size:12px;font-weight:700}.search-label input{display:block;margin-top:8px}.plan-help{font-size:13px;color:var(--muted)}.plan-group{font-size:21px;margin:32px 0 15px}.plan-topic{display:grid;grid-template-columns:46px minmax(0,1fr) 25px;gap:18px;align-items:center;padding:22px;background:var(--white);border:1px solid var(--line);border-radius:5px;text-decoration:none;margin:12px 0;scroll-margin-top:110px}.plan-topic:hover{border-color:var(--green);box-shadow:3px 3px 0 var(--mint)}.plan-topic.current{border-left:5px solid var(--blue);background:#f2f5ff}.plan-number{font:700 20px var(--mono);color:var(--green)}.plan-topic h3{font-size:18px;line-height:1.5;margin:0 0 10px;font-weight:650}.plan-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px;color:var(--muted)}.date-badge,.our-badge{padding:3px 7px;border-radius:3px;font-size:11px;font-weight:700;background:#e0e9ff;color:#254ebe}.our-badge{background:var(--mint);color:var(--green)}.topic-page .topic-heading{margin:35px 0}.topic-page .topic-heading h1{font-size:34px;max-width:none}.hub-block{margin:35px 0;border-top:1px solid var(--line);padding-top:28px}.hub-block h2{font-size:29px}.textbook-hub{border:1px solid var(--line);border-radius:7px;background:var(--mint);padding:30px;display:flex;gap:25px;align-items:start}.textbook-hub h2{margin:8px 0 12px}.textbook-hub p{color:var(--muted);font-size:15px}.book-mark{font:700 60px/1 var(--mono);padding:20px;border:2px solid var(--green);border-radius:5px;background:var(--white)}.book-page{max-width:1040px;margin:auto;padding:32px 35px 65px}.book-topic-title{font-size:31px;line-height:1.3;letter-spacing:-.8px;margin:18px 0 24px}.reading-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:24px 0}.book-body{font-size:18px;line-height:1.7;overflow-wrap:anywhere}.book-body p{margin:1em 0}.book-body h2{font-size:28px;line-height:1.35;margin:35px 0 20px;color:var(--green);letter-spacing:-.6px}.book-body h3{font-size:23px;line-height:1.4;margin:27px 0 15px}.book-body h4{font-size:20px;line-height:1.4;margin:24px 0 12px}.book-body ul,.book-body ol{padding-left:1.7em;margin:18px 0}.book-body li{padding:6px 0}.book-body figure{margin:26px auto;text-align:center;padding:18px;border:1px solid var(--line);border-radius:5px;background:#fff;max-width:100%}.book-body figure img{width:auto;max-width:100%;max-height:680px;height:auto;margin:auto}.book-body figcaption{font-size:13px;line-height:1.5;color:var(--muted);margin-top:12px}.book-body img{max-width:100%;height:auto}.book-body blockquote{margin:24px 0;padding:14px 22px;border-left:4px solid var(--gold);background:var(--white)}.book-body pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:20px;border:1px solid var(--line);border-radius:5px;background:#f1f3e8;font:16px/1.6 var(--mono)}.book-body code{font: .92em/1.5 var(--mono);background:#f1f3e8;padding:2px 4px}.book-body .table-scroll{overflow-x:auto;margin:24px 0;border:1px solid var(--line);border-radius:4px}.book-body table{width:100%;border-collapse:collapse;font-size:16px;background:var(--white)}.book-body td,.book-body th{border:1px solid var(--line);padding:12px 15px;text-align:left;vertical-align:top;min-width:85px}.book-body th{background:var(--mint)}.book-source{margin:35px 0;padding:18px 22px;background:var(--soft);border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.book-section{border-top:1px solid var(--line);margin-top:35px;padding-top:8px}.book-section:first-child{border:0;margin-top:0}.book-page-note{font:12px var(--mono);color:var(--muted);border-bottom:1px solid var(--line);padding:8px 0;margin:30px 0 15px}.book-exercise{padding:22px;border:1px solid var(--line);background:var(--white);border-radius:6px;margin:25px 0}.book-exercise h3:first-child{margin-top:0}.exercise-done{display:flex;gap:12px;align-items:center;border-top:1px solid var(--line);margin-top:22px;padding-top:18px;font-size:14px;cursor:pointer}.exercise-done input{accent-color:var(--green);width:20px;height:20px}.source-files{padding:20px;background:var(--mint);border:1px solid var(--line);border-radius:5px}.source-files a{display:inline-flex;margin:6px 14px 6px 0;font-size:15px}.book-body .book-caption{font-size:14px;color:var(--muted);text-align:center}.book-body a{color:var(--green)}
#theory-dialog{width:min(1060px,94vw);max-height:92vh;padding:0;border:2px solid var(--green);border-radius:8px;background:var(--paper);color:var(--ink)}#theory-dialog::backdrop{background:rgba(20,41,35,.58)}.dialog-top{display:flex;gap:20px;align-items:start;justify-content:space-between;padding:20px 28px;border-bottom:1px solid var(--line);background:var(--mint)}.dialog-top h2{font-size:20px;line-height:1.4;margin:8px 0 0;letter-spacing:-.3px}.dialog-top button{flex:0 0 auto}.dialog-scroll{padding:10px 35px 35px;max-height:calc(92vh - 150px);overflow-y:auto;overscroll-behavior:contain}body:has(dialog[open]){overflow:hidden}
@media(max-width:760px){.plan-page,.topic-page,.book-page{padding:25px 20px 45px}.plan-heading h1{font-size:44px}.plan-heading img{width:105px;height:125px}.plan-heading p{font-size:15px}.plan-controls{display:block;padding:16px}.plan-topic{grid-template-columns:27px minmax(0,1fr) 15px;gap:10px;padding:16px 12px}.plan-topic h3{font-size:16px}.plan-number{font-size:15px}.plan-group{font-size:20px}.topic-page .topic-heading h1,.book-topic-title{font-size:26px}.topic-page .topic-heading{grid-template-columns:1fr}.topic-page .topic-heading img{display:none}.textbook-hub{gap:16px;padding:22px}.book-mark{font-size:34px;padding:12px}.hub-block h2{font-size:26px}.book-body{font-size:17px;line-height:1.65}.book-body h2{font-size:25px}.book-body h3{font-size:21px}.book-body figure{padding:10px}.book-exercise{padding:17px}.book-body td,.book-body th{padding:8px 10px;font-size:14px}.dialog-top{padding:16px;gap:12px}.dialog-top h2{font-size:16px}.dialog-top .eyebrow{font-size:10px}.dialog-top button{padding:8px 10px;font-size:12px}.dialog-scroll{padding:8px 18px 25px;max-height:calc(92vh - 175px)}.reading-actions .button{font-size:13px}.book-page .crumbs{font-size:11px}}
.book-icon{display:inline-block;width:auto;max-width:60px;max-height:40px;vertical-align:middle}.figure-zoom{display:block;width:100%;border:0;background:transparent;cursor:zoom-in;padding:0}.figure-zoom:focus-visible{outline:3px solid var(--blue);outline-offset:6px}.book-body .formula{border:0;background:transparent;padding:0;text-align:left}.book-body .formula img{max-height:120px}.progress-local{font-size:13px;color:var(--muted)}.source-files{margin:20px 0 32px}.source-files h3{margin-top:0}#image-dialog{padding:0;width:min(1300px,96vw);max-height:94vh;background:var(--paper);border:2px solid var(--green);border-radius:6px;color:var(--ink)}#image-dialog::backdrop{background:rgba(20,41,35,.7)}.image-scroll{max-height:calc(94vh - 90px);overflow:auto;padding:16px;background:white}.image-scroll img{display:block;margin:auto;max-width:100%;height:auto}#theory-dialog[open]{display:flex;flex-direction:column;height:92vh}.dialog-top{flex:0 0 auto}.dialog-top h2{max-height:5.6em;overflow:auto}.dialog-scroll{flex:1;min-height:0;max-height:none}
@media print{.reading-actions,.exercise-done,.dialog-top,.plan-controls,dialog{display:none!important}.book-page{max-width:none;padding:0}.book-body{font-size:11pt;line-height:1.5}.book-body h2{font-size:17pt}.book-body h3{font-size:14pt}.book-body figure{break-inside:avoid;max-height:180mm}.book-exercise{break-inside:auto}.book-topic-title{font-size:18pt}.book-source{font-size:9pt}.book-body .table-scroll{overflow:visible}}

.book-body .table-illustration{display:block;width:auto;max-width:min(200px,100%);max-height:180px;margin:auto;object-fit:contain}

/* Curated readings: clear diagrams, examples and actual application captures. */
.book-body .g11-note{padding:18px 22px;background:#eef4e6;border-left:4px solid var(--green);border-radius:4px;margin:24px 0}
.book-body .g11-note p:first-child{margin-top:0}.book-body .g11-note p:last-child{margin-bottom:0}
.book-body .g11-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}
.book-body .g11-grid>div,.book-body .g11-demo{padding:20px;border:1px solid var(--line);border-radius:6px;background:#fff}
.book-body .g11-label{font-size:14px;letter-spacing:.04em;font-weight:700;color:var(--green)}
.book-body figure svg{display:block;width:100%;height:auto;max-height:600px;margin:auto;font-family:Arial,sans-serif}
.book-body svg text{font-family:Arial,sans-serif}.book-body .g11-steps li{padding:9px 0}
.book-body .g11-demo{margin:24px 0;overflow:auto}.book-body .g11-demo p{margin:.65em 0}
.book-body .g11-screenshot img{max-height:750px}.book-body .g11-screenshot figcaption{text-align:left;font-size:14px}
.reading-contents{border:1px solid var(--line);border-radius:6px;background:var(--mint);padding:15px 22px;margin:0 0 30px;font-size:16px}
.reading-contents summary{cursor:pointer;font-weight:700;color:var(--green)}.reading-contents ol{margin:12px 0 0}
.book-body h2[id]{scroll-margin-top:110px}.book-source a{display:inline-block;margin:4px 3px}
@media(max-width:650px){.book-body .g11-grid{grid-template-columns:1fr}.book-body .g11-note,.book-body .g11-demo{padding:15px}.reading-contents{padding:12px 15px}.book-body figure svg{min-width:0;max-height:none}}
@media print{.reading-contents{display:none}.book-body .g11-grid{display:block}.book-body .g11-demo,.book-body .g11-note{break-inside:avoid}.book-body figure svg{max-height:150mm}}

/* On narrow screens the zoom dialog keeps diagram text at readable size. */
@media(max-width:760px){#image-dialog .image-scroll img{max-width:none}}

/* Class selection comes first; games follow, newest first. */
.home-layout{display:block;padding-top:35px}
.home-layout .section-heading{margin-bottom:24px;align-items:start}
.home-layout h1{font-size:36px;line-height:1.2;letter-spacing:-1px;margin:10px 0 0}
.home-layout h2{font-size:30px;margin:10px 0 0}.home-layout .grades{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.home-layout .grade-card{min-height:190px}.home-layout .grade-card h3{font-size:17px}
.home-layout .game-section{margin:42px 0 0;padding:32px 0 0;border-top:1px solid var(--line);scroll-margin-top:110px}.home-layout .games{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.home-layout .game-cover{display:block}.home-layout .game-copy{padding:18px}.home-layout .game-copy h3 a{text-decoration:none}.home-layout .game-copy p{font-size:14px;line-height:1.5}.home-layout .game-copy .eyebrow{font-size:11px;letter-spacing:.3px}
.resource-label{font-size:14px;color:var(--muted)}.online-test{padding:24px;background:var(--mint);border:1px solid var(--line);border-radius:6px}.online-test h3{margin-top:0}
@media(max-width:1100px){.home-layout .games{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.home-layout{padding-top:25px}.home-layout h1{font-size:30px}.home-layout .grades{grid-template-columns:repeat(2,minmax(0,1fr))}.home-layout .grade-card{min-height:180px}.home-layout .grade-card h3{font-size:15px}.home-layout .grade-card-info{width:78%}.home-layout .games{grid-template-columns:1fr}}
@media(max-width:380px){.home-layout .grades{grid-template-columns:1fr}.home-layout .grade-card{min-height:165px}}
