.learn-page .guide-layout { display:grid; grid-template-columns:minmax(160px,.83fr) minmax(0,2.85fr) minmax(245px,1.3fr); align-items:start; gap:.85rem; padding:1rem 1.4% 3rem; }
.guide-layout .box { padding:clamp(.85rem,1.3vw,1.25rem); border-color:#42395e; }
.guide-layout .box h2 { font-size:clamp(1.05rem,1.55vw,1.4rem); margin-bottom:.65rem; }
.guide-article,.guide-tools { display:grid; gap:.8rem; min-width:0; }
.guide-article { counter-reset:guide-section; }
.guide-section h2::before { counter-increment:guide-section; content:counter(guide-section); width:1.7em; height:1.7em; flex:none; display:grid; place-items:center; border-radius:50%; font-size:.78em; color:white; border:1px solid #b987f7; background:linear-gradient(#b67aff,#6939bd); }
.learn-page .guide-index { align-self:stretch; background:linear-gradient(#1c1b30 50%,transparent 88%),url('course-shrine.webp') bottom center/100% auto no-repeat #201d34; }
.guide-index nav { display:grid; gap:.3rem; }
.guide-index nav a { display:flex; gap:.6rem; align-items:center; padding:.68rem .5rem; font-size:.92rem; border-radius:8px; }
.guide-index nav .icon { color:#ceabff; width:1em; height:1em; }
.guide-index [aria-current],.reference-switch [aria-pressed="true"] { background:linear-gradient(100deg,#814bc9,#513183); color:white; }
.guide-illustrated,.declare-grid,.guide-examples { display:grid; grid-template-columns:1fr 1fr; gap:.8rem; align-items:center; }
.guide-illustrated { grid-template-columns:1fr minmax(90px,29%); }
.guide-illustrated img,.declare-grid img { display:block; width:100%; border-radius:8px; }
.guide-illustrated img { max-height:125px; object-fit:contain; }
.guide-section p { line-height:1.65; }
.condition-list { list-style:none; padding:.35rem .7rem; margin:.6rem 0; background:#27263e; border-radius:8px; }
.condition-list li { padding:.45rem 0; border-bottom:1px solid #ffffff12; }
.condition-list li::before { content:'✓'; font-weight:bold; color:#63e7ac; margin-right:.5rem; }
.guide-table { overflow-x:auto; margin-top:.7rem; }
.guide-table table { width:100%; border-collapse:collapse; font-size:.9rem; }
.guide-table th,.guide-table td { text-align:start; border:1px solid #49415c; padding:.32rem .5rem; }
.guide-table th { background:#34304e; }
.guide-tools .primary { display:block; text-align:center; }
.guide-crosslink { display:flex; align-items:center; gap:.65rem; padding:.55rem; background:#ffffff09; border-radius:8px; margin-top:.5rem; }
.guide-crosslink img { width:50px; height:39px; object-fit:cover; border-radius:5px; }
.guide-crosslink span { margin-inline-start:auto; color:#d4b2ff; }
.guide-quiz .quiz-grid { grid-template-columns:1fr; }
.guide-quiz .quiz-feedback { min-height:85px; }
.guide-examples { align-items:stretch; }
.guide-examples > div,.fu-cards > div,.formula b { border:1px solid #4a715f; background:#233735; padding:.7rem; border-radius:9px; }
.guide-examples > div:nth-child(2) { background:#392536; border-color:#714465; }
.guide-layout .learn-tiles { flex-wrap:wrap; gap:3px; }
.fu-cards,.formula,.reference-switch { display:flex; gap:.4rem; margin-top:.7rem; align-items:center; }
.fu-cards > div,.formula b { flex:1; text-align:center; background:#302940; border-color:#514262; }
.fu-cards small { display:block; }
.fu-cards .learn-tiles { justify-content:center; }
.reference-switch { flex-wrap:wrap; }
.reference-switch button { background:#27243a; color:inherit; padding:.35rem .55rem; border:1px solid #695184; border-radius:16px; }
@media(max-width:1040px) {
 .learn-page .guide-layout { grid-template-columns:minmax(0,2fr) minmax(235px,1fr); }
 .guide-index { grid-column:1/-1; }
 .guide-index nav { display:flex; flex-wrap:wrap; }
 .learn-page .guide-index { background:#211e34; }
}
@media(max-width:700px) {
 .learn-page .guide-layout { grid-template-columns:minmax(0,1fr); }
 .guide-index nav { flex-wrap:nowrap; overflow:auto; }
 .guide-index nav a { white-space:nowrap; }
 .declare-grid,.guide-examples { grid-template-columns:minmax(0,1fr); }
 .formula { flex-wrap:wrap; }
}
.guide-effects { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:.5rem; }
.guide-effects > div { border:1px solid #4a4066; background:#28243e; padding:.75rem; border-radius:8px; }

.learn-hero:has(+ .guide-layout) { --banner-gutter: 1.4%; }
