.theory-head{max-width:920px;margin-bottom:27px}
.theory-head h1{font-size:clamp(32px,4.1vw,51px);color:#f4e7c9;letter-spacing:-1px;margin:10px 0 15px}
.theory-head p{color:#c6c5b9;font-size:15px;line-height:1.8;margin:0 0 15px}
.theory-kicker{font:700 13px/1.6 var(--mono,monospace);letter-spacing:1.1px;color:#deb971}
.theory-stats{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;color:#cabd9d;margin:18px 0}
.theory-stats strong{font:700 25px var(--mono,monospace);color:#f0cf89}
.theory-stats span{font-size:14px;margin-right:16px}
.theory-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:15px 0 35px}
.theory-stage-tile{display:flex;flex-direction:column;gap:7px;border:1px solid #66604f;border-radius:10px;background:#282722;padding:23px;text-decoration:none}
.theory-stage-tile:hover,.theory-chapter-nav a:hover{border-color:#e1be77;background:#373127}
.theory-stage-tile>span{font:700 12px var(--mono,monospace);color:#cfac6c;letter-spacing:.7px}
.theory-stage-tile strong{font-size:21px;color:#f0e4cb}
.theory-stage-tile p{font-size:14px;line-height:1.65;color:#c7bfae;margin:0}
.theory-stage-tile small{font:13px var(--mono,monospace);color:#e2c894;margin-top:auto}
.theory-search-box{padding:25px;border:1px solid #646057;border-radius:11px;background:#262521}
.theory-search-box h2{font-size:22px;margin:0 0 15px;color:#f1e2c1}
.theory-search-box form label{display:block;color:#c9bdad;font-size:14px;margin-bottom:9px}
.theory-search-row{display:grid;grid-template-columns:minmax(0,1fr) 220px auto;gap:9px}
.theory-search-row input,.theory-search-row select{min-width:0;width:100%;background:#171916;color:#f2e7d4;border:1px solid #8b806b;border-radius:6px;padding:12px;font:14px var(--mono,monospace)}
.theory-search-row button,.theory-practice-button{background:#5e4a2d;color:#ffe5b3;border:1px solid #ab8957;border-radius:6px;padding:11px 15px;font-size:14px;font-weight:700;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.theory-practice-button{margin-top:10px}
.theory-search-row :is(input,select,button):focus-visible,.theory-stage-tile:focus-visible,.theory-topic-list a:focus-visible{outline:2px solid #f2d08c;outline-offset:2px}
.theory-results-count{color:#dcccab;font-size:14px;margin-top:18px}
.theory-search-results{display:grid;gap:8px;margin-top:10px}
.theory-search-result{display:grid;gap:5px;background:#1f201d;border:1px solid #56564b;border-radius:6px;padding:14px;text-decoration:none}
.theory-search-result small{font-size:13px;color:#bcaa87}
.theory-search-result strong{font-size:16px;color:#efe2c9}
.theory-search-result span{font-size:13px;line-height:1.6;color:#bbb8a9}
.theory-search-result:hover{border-color:#dab776}
.theory-pagination{display:flex;justify-content:space-between;align-items:center;margin-top:16px;font-size:14px;color:#d1bf9d;gap:12px}
.theory-pagination a,.theory-crumb a,.theory-article-foot a{color:#e7bc70;text-decoration:underline}
.theory-notice{margin:18px 0;color:#a9ab9f;font-size:14px;line-height:1.7}
.theory-crumb{font-size:14px;color:#c5b7a2;margin:0 0 18px;line-height:1.7}
.theory-chapter-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:24px 0}
.theory-chapter-nav a{display:block;border:1px solid #5b594e;background:#272722;border-radius:7px;padding:10px 12px;color:#e0d2b7;font-size:14px;line-height:1.5;text-decoration:none}
.theory-chapter{border:1px solid #5c584d;background:#242421;border-radius:10px;padding:24px;margin-bottom:20px;scroll-margin-top:18px}
.theory-chapter-head h2{font-size:26px;color:#eee1c9;margin:7px 0 10px}
.theory-chapter-head>p{font-size:15px;color:#c6baa5;line-height:1.7}
.theory-concept{border-left:3px solid #c6a265;background:#363125;padding:14px 16px;margin:18px 0 20px}
.theory-concept strong{font-size:14px;color:#f2d9a5}
.theory-concept p{font-size:14px;color:#e0d2b9;line-height:1.8;margin:6px 0 0}
.theory-groups{display:grid;gap:10px}
.theory-group{border:1px solid #5b584e;border-radius:8px;background:#1e201e}
.theory-group>summary{padding:15px;cursor:pointer;display:flex;gap:12px;align-items:center;justify-content:space-between;color:#f0e0c3}
.theory-group>summary strong{font-size:16px}
.theory-group>summary span{color:#cbb891;font:13px var(--mono,monospace);white-space:nowrap}
.theory-group-content{padding:4px 15px 17px;border-top:1px solid #45443d}
.theory-group-content>p{font-size:14px;color:#c7bda9;line-height:1.7}
.theory-topic-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.theory-topic-list a{display:grid;grid-template-columns:25px minmax(0,1fr);gap:9px;text-decoration:none;color:#eae0ca;border:1px solid #4a4940;border-radius:6px;padding:10px}
.theory-topic-list a:hover{background:#353127;border-color:#b69256}
.theory-topic-list a>span:first-child{font:13px var(--mono,monospace);color:#dfb96b}
.theory-topic-list strong{display:block;font-size:14px;line-height:1.45}
.theory-topic-list small{display:block;font-size:13px;color:#c0b6a5;line-height:1.6;margin-top:5px}
.theory-article{max-width:1050px;border:1px solid #5b574e;border-radius:12px;background:#292723;padding:30px}
.theory-article h1{font-size:clamp(29px,3.5vw,44px);color:#f4e3bd;line-height:1.2;margin:9px 0}
.theory-article-context{color:#d0b987;font-size:15px}
.theory-article-section{margin:26px 0 0;padding-top:19px;border-top:1px solid #4e4b41}
.theory-article-section h2{font-size:21px;color:#eacf94;margin:0 0 10px}
.theory-article-section h3{font-size:17px;color:#e9dfc7;margin-top:17px}
.theory-article-section p{font-size:15px;line-height:1.9;color:#d5cabb;margin:0 0 12px;white-space:pre-line}
.theory-glossary{margin:0;display:grid;gap:6px}
.theory-glossary div{display:grid;grid-template-columns:minmax(155px,1fr) minmax(0,2fr);gap:12px;background:#1e201c;border:1px solid #494a40;padding:10px;border-radius:6px}
.theory-glossary dt,.theory-glossary dd{font-size:14px;line-height:1.7;margin:0;overflow-wrap:anywhere}
.theory-glossary dt code{color:#e6ca92}
.theory-glossary dd{color:#c8bfaf}
.theory-article-foot{margin-top:24px;padding-top:18px;border-top:1px solid #565146;color:#baa98d;font-size:14px;line-height:1.7}
.theory-item-actions{display:flex;flex-wrap:wrap;gap:18px;margin-top:14px}
@media(max-width:850px){.theory-directory,.theory-chapter-nav,.theory-topic-list{grid-template-columns:1fr}.theory-search-row{grid-template-columns:1fr}.theory-article{padding:18px}}
@media(max-width:480px){.theory-glossary div{grid-template-columns:1fr}.theory-chapter{padding:15px}}
@media print{.theory-search-box,.theory-chapter-nav,.theory-practice-button{display:none!important}.theory-article,.theory-chapter{background:#fff;color:#111;border-color:#aaa}.theory-article-section p{color:#222}}
