/* WeTeachMath v1.5.4 horizontal journey + two-column workspace.
   Purpose: give the mathematical teaching canvas maximum width while keeping every stage visible. */

/* Desktop shell: journey moves above the workspace instead of consuming a left rail. */
.lesson-layout{grid-template-columns:minmax(0,1fr);gap:0;padding:12px 18px 14px}
.learning-column{grid-template-rows:24px 52px minmax(0,1fr);gap:7px;width:100%;max-width:1560px;margin:0 auto}
.lesson-breadcrumbs{padding-inline:5px;align-items:center}
.journey-strip{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:5px 7px;border:1px solid var(--line);border-radius:15px;background:#fff;box-shadow:0 3px 12px rgba(18,42,73,.035);overflow:hidden}
.journey-strip-heading{padding-inline:6px;text-transform:uppercase;letter-spacing:.1em;font-size:8px;font-weight:900;color:#708099;white-space:nowrap}
.journey-nav-horizontal{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;min-width:0}
.journey-nav-horizontal .journey-item{min-width:0;height:40px;border-radius:11px;padding:5px 8px;display:grid;grid-template-columns:26px minmax(0,1fr) 22px;gap:6px;align-items:center}
.journey-nav-horizontal .journey-item.active{box-shadow:inset 0 -3px 0 var(--purple);background:linear-gradient(180deg,#fff,#f7f3ff)}
.journey-nav-horizontal .journey-icon{width:25px;height:25px;border-radius:8px;font-size:10px}
.journey-nav-horizontal .journey-copy strong{font-size:11px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.journey-nav-horizontal .journey-copy small{display:none}
.journey-nav-horizontal .journey-count{width:21px;height:21px;font-size:9px}
.support-launch-horizontal{margin:0!important;min-width:44px;height:40px;padding:5px 8px;border-radius:11px;gap:7px;background:#fbfcff}
.support-launch-horizontal .support-icon{width:27px;height:27px;border-radius:8px;font-size:10px}
.support-horizontal-copy{display:none}

/* With the rail gone, the lesson scene receives the entire page width. */
.teaching-workspace{width:100%;min-width:0}
.scene-main{padding-inline:14px}
.phase3-stage-layout,.scene-grid,.practice-panel{grid-template-columns:minmax(320px,.72fr) minmax(0,1.28fr);gap:14px}
.phase3-visual-card,.visual-panel{min-width:0}

/* Examples: two columns only. Left is the concise overview + exact visual, right is large full working. */
.phase5-worked-grid{height:100%;min-height:0;display:grid;grid-template-columns:minmax(320px,.78fr) minmax(560px,1.55fr);gap:14px}
.worked-overview-column{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(220px,1fr);gap:10px;overflow:auto;scrollbar-width:thin}
.worked-overview-column .worked-method-card{overflow:auto;scrollbar-width:thin;padding:12px;gap:8px}
.worked-overview-column .worked-visual-card{min-height:220px;padding:7px}
.worked-overview-column .worked-static-stack{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.worked-overview-column .worked-static-step{grid-template-columns:25px minmax(0,1fr);gap:6px;padding:6px 7px}
.worked-overview-column .worked-static-step strong{font-size:10px}.worked-overview-column .worked-static-step p{font-size:9px;line-height:1.34}
.worked-overview-column .phase3-stage-note{font-size:9.5px;padding:7px 8px}
.worked-notebook-large{min-width:0;min-height:0}
.worked-notebook-large .notebook-top{padding:8px 12px}
.worked-notebook-large .notebook-top span{font-size:9px}.worked-notebook-large .notebook-top small{font-size:9px}
.worked-notebook-large .notebook-paper{padding:19px 22px 18px 44px;background-image:linear-gradient(90deg,transparent 0,transparent 32px,rgba(233,104,118,.34) 32px,rgba(233,104,118,.34) 33px,transparent 33px),repeating-linear-gradient(180deg,transparent 0,transparent 28px,rgba(80,145,210,.16) 28px,rgba(80,145,210,.16) 29px)}
.worked-notebook-large .notebook-question{font-size:14px;line-height:1.55;margin-bottom:14px}
.worked-notebook-large .notebook-line{grid-template-columns:27px minmax(0,1fr);gap:10px;margin:11px 0 14px}
.worked-notebook-large .notebook-step-number{width:23px;height:23px;font-size:10px}
.worked-notebook-large .notebook-line strong{font-size:13px;line-height:1.4}
.worked-notebook-large .notebook-line p{font-size:13px;line-height:1.6;margin-top:4px}
.worked-notebook-large .notebook-answer{padding:11px 13px;margin-top:14px}.worked-notebook-large .notebook-answer span{font-size:8px}.worked-notebook-large .notebook-answer strong{font-size:19px}

/* Solve With Me uses the same readable two-column hierarchy: guided side + visual, full method large. */
.phase5-solve-grid{height:100%;min-height:0;display:grid;grid-template-columns:minmax(340px,.86fr) minmax(560px,1.5fr);gap:14px}
.solve-guided-column{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(220px,1fr);gap:10px;overflow:auto;scrollbar-width:thin}
.solve-guided-column .solve-card{overflow:auto;scrollbar-width:thin}
.solve-guided-column .solve-visual-card{min-height:220px}
.solve-full-notebook{min-width:0;min-height:0}
.solve-full-notebook .notebook-question{font-size:14px;line-height:1.5}
.solve-full-notebook .notebook-line strong,.solve-full-notebook .notebook-line p{font-size:12.5px;line-height:1.55}
.solve-full-notebook .notebook-answer strong{font-size:18px}

/* Compact laptop: preserve readable full solution, allow overview to scroll rather than shrink handwriting. */
@media (min-width:1101px) and (max-width:1365px){
  .lesson-layout{padding:8px 10px 9px}
  .learning-column{grid-template-rows:20px 46px minmax(0,1fr);gap:5px}
  .journey-strip{padding:3px 5px;gap:6px;border-radius:12px}.journey-strip-heading{display:none}
  .journey-nav-horizontal .journey-item{height:36px;padding:4px 6px;grid-template-columns:23px minmax(0,1fr) 19px;gap:4px}
  .journey-nav-horizontal .journey-icon{width:22px;height:22px}.journey-nav-horizontal .journey-copy strong{font-size:10px}.journey-nav-horizontal .journey-count{width:19px;height:19px;font-size:8px}
  .support-launch-horizontal{height:36px;padding:4px 6px}.support-launch-horizontal .support-icon{width:24px;height:24px}
  .scene-header{padding-top:9px;padding-bottom:5px}.scene-main{padding-inline:9px}
  .phase3-stage-layout,.scene-grid,.practice-panel{grid-template-columns:minmax(270px,.72fr) minmax(0,1.28fr);gap:9px}
  .phase5-worked-grid{grid-template-columns:minmax(285px,.78fr) minmax(0,1.5fr);gap:9px}
  .phase5-solve-grid{grid-template-columns:minmax(300px,.82fr) minmax(0,1.48fr);gap:9px}
  .worked-overview-column,.solve-guided-column{gap:7px;grid-template-rows:auto minmax(190px,1fr)}
  .worked-overview-column .worked-method-card{padding:8px;gap:5px}.worked-overview-column .worked-static-stack{gap:4px}.worked-overview-column .worked-static-step{padding:4px 5px}.worked-overview-column .worked-static-step p{font-size:8.7px}
  .worked-notebook-large .notebook-paper{padding:14px 15px 14px 38px}.worked-notebook-large .notebook-question{font-size:13px}.worked-notebook-large .notebook-line{margin:8px 0 10px}.worked-notebook-large .notebook-line strong,.worked-notebook-large .notebook-line p{font-size:12px;line-height:1.5}.worked-notebook-large .notebook-answer strong{font-size:17px}
  .solve-full-notebook .notebook-question{font-size:13px}.solve-full-notebook .notebook-line strong,.solve-full-notebook .notebook-line p{font-size:11.5px}
}

@media (min-width:1101px) and (max-height:680px){
  .learning-column{grid-template-rows:18px 42px minmax(0,1fr);gap:4px}
  .journey-nav-horizontal .journey-item,.support-launch-horizontal{height:32px}
  .journey-nav-horizontal .journey-icon{width:20px;height:20px}.journey-nav-horizontal .journey-copy strong{font-size:9.5px}
  .worked-overview-column{grid-template-rows:minmax(145px,auto) minmax(180px,1fr)}
  .worked-overview-column .worked-method-card{padding:7px;gap:4px}
  .worked-overview-column .worked-method-card h3{font-size:14px;line-height:1.24}
  .worked-overview-column .worked-bank-toolbar{grid-template-columns:28px minmax(0,1fr) 28px auto;gap:4px;padding:4px}
  .worked-overview-column .worked-bank-toolbar .bank-random{grid-column:auto;width:auto;padding:5px 7px;font-size:8px}
  .worked-overview-column .worked-bank-toolbar>span{font-size:8px}.worked-overview-column .worked-bank-toolbar>span strong{font-size:8.5px}
  .worked-overview-column .worked-static-step{min-height:31px;align-items:center}
  .worked-overview-column .worked-static-step p{display:none}
  .worked-overview-column .phase3-stage-note{display:none}
  .worked-overview-column .worked-visual-card{min-height:180px}
  .worked-notebook-large .notebook-line p{font-size:11.7px}
}

/* Tablet and mobile: horizontal journey remains horizontal-scroll, teaching content stacks safely. */
@media (max-width:1100px){
  .lesson-layout{display:block;padding:8px}
  .learning-column{display:grid;grid-template-rows:auto auto auto;gap:7px;max-width:none}
  .lesson-breadcrumbs{margin:0;min-height:22px}
  .journey-strip{display:flex;overflow-x:auto;gap:6px;padding:6px;scrollbar-width:thin;position:relative;top:auto}
  .journey-strip-heading{display:none}
  .journey-nav-horizontal{display:flex;min-width:max-content;gap:5px}
  .journey-nav-horizontal .journey-item{width:auto;min-width:118px;height:38px;grid-template-columns:24px auto 20px}
  .journey-nav-horizontal .journey-copy strong{font-size:10px}
  .support-launch-horizontal{flex:0 0 auto;height:38px}
  .phase5-worked-grid,.phase5-solve-grid{height:auto;grid-template-columns:1fr}
  .worked-overview-column,.solve-guided-column{display:grid;grid-template-rows:auto auto;overflow:visible}
  .worked-overview-column .worked-visual-card,.solve-guided-column .solve-visual-card{min-height:380px}
  .worked-notebook-large,.solve-full-notebook{min-height:440px}
  .worked-notebook-large .notebook-question,.solve-full-notebook .notebook-question{font-size:13px}
  .worked-notebook-large .notebook-line strong,.worked-notebook-large .notebook-line p,.solve-full-notebook .notebook-line strong,.solve-full-notebook .notebook-line p{font-size:12px}
}

@media (max-width:640px){
  .journey-nav-horizontal .journey-item{min-width:108px}.journey-nav-horizontal .journey-count{display:none}
  .worked-overview-column .worked-static-stack{grid-template-columns:1fr}
  .worked-notebook-large .notebook-paper{padding-left:36px;padding-right:12px}
  .worked-notebook-large .notebook-question{font-size:12.5px}.worked-notebook-large .notebook-line strong,.worked-notebook-large .notebook-line p{font-size:11.5px}
}

/* Final mobile guard: the desktop two-column declaration is in this file, so restate stacking here
   after it to prevent a narrow second column on phones/tablets. */
@media (max-width:1100px){
  .phase3-stage-layout,.scene-grid,.practice-panel{grid-template-columns:1fr!important}
}
