/* Reference platform v4: immersive astronomy learning workspace. */
body[data-workspace="study"]{background:#070d1d;color:#eef3ff}
body[data-workspace="study"] .app{display:grid;width:100%;max-width:none;margin:0;padding:0;grid-template-columns:238px minmax(0,1fr);grid-template-rows:64px minmax(0,1fr);grid-template-areas:"tabs top" "tabs view";min-height:100vh;background:radial-gradient(circle at 80% 0,#283f7855,transparent 34%),#070d1d}
body[data-workspace="study"] .navbar{grid-area:top;height:64px;min-height:64px;position:sticky;top:0;width:auto;margin:0;transform:none;padding:0 20px;background:#0a1430ee;border-bottom:1px solid #2d4168;z-index:30}
body[data-workspace="study"] .navTitle{}
body[data-workspace="study"] .view{grid-area:view;min-width:0;max-width:none;margin:0;padding:18px 22px 82px;background:transparent;overflow:auto}
body[data-workspace="study"] .study-intro,
body[data-workspace="study"] .product-workflow{display:none!important}
body[data-workspace="study"] .astronomy-classroom{max-width:1440px;margin:0 auto}
body[data-workspace="study"] .classroom-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:13px 15px;margin-bottom:12px;border:1px solid #304872;border-radius:10px;background:#101b36}
body[data-workspace="study"] .classroom-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
body[data-workspace="study"] .classroom-module-section,
body[data-workspace="study"] .classroom-progress-panel{border:1px solid #2f446e;border-radius:10px;background:#0f1a34;box-shadow:0 8px 24px #02081780}
body[data-workspace="study"] .classroom-module-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
body[data-workspace="study"] .classroom-existing-learning{margin-top:12px}
body[data-workspace="study"] .tabbar{grid-area:tabs;position:sticky;top:0;left:auto;right:auto;bottom:auto;width:100%;max-width:none;height:100vh;align-self:stretch;padding:76px 10px 14px;overflow:auto;border:0;border-right:1px solid #2d4168;background:#09132c}
body[data-workspace="study"] .tabbar button{width:100%;min-width:0;justify-content:flex-start;gap:10px;border-radius:8px}
body[data-workspace="study"] .tabbar button.active{background:#21365e}
@media(max-width:980px){body[data-workspace="study"] .app{grid-template-columns:76px minmax(0,1fr)}body[data-workspace="study"] .tabbar{padding-left:7px;padding-right:7px}body[data-workspace="study"] .tabbar button{font-size:0;justify-content:center}body[data-workspace="study"] .view{padding:14px}}

/* Mobile navigation is an app-shell control, not desktop sidebar content. */
@media(max-width:680px){
  body[data-workspace="study"] .app{
    display:flex;flex-direction:column;min-height:100vh;width:100%;max-width:none;
  }
  body[data-workspace="study"] .navbar{
    position:sticky;top:0;left:auto;right:auto;bottom:auto;width:100%;max-width:none;
    min-height:58px;height:58px;transform:none;flex:0 0 58px;
  }
  body[data-workspace="study"] .view{
    display:block;flex:1 1 auto;min-height:0;width:100%;max-width:none;
    padding:14px 12px calc(92px + env(safe-area-inset-bottom));overflow:auto;
  }
  body[data-workspace="study"] .tabbar{
    display:flex!important;position:fixed!important;inset:auto 0 0!important;
    left:0!important;right:0!important;bottom:0!important;top:auto!important;
    z-index:1000!important;width:100%!important;max-width:none!important;height:72px!important;
    min-height:72px;flex-direction:row!important;align-items:stretch;justify-content:space-around;
    gap:2px;margin:0!important;padding:5px 4px calc(5px + env(safe-area-inset-bottom))!important;
    overflow:visible;border:0;border-top:1px solid #34466f;border-radius:0;
    background:#09132cf5;box-shadow:0 -8px 24px #02081799;transform:none!important;
  }
  body[data-workspace="study"] .tabbar button{
    display:flex!important;position:relative;flex:1 1 0;flex-direction:column!important;
    align-items:center;justify-content:center;width:auto!important;min-width:0!important;
    min-height:58px;height:auto;margin:0!important;padding:4px 1px!important;
    gap:3px;border:0;border-radius:8px;background:transparent;color:#aebcdd;
    font-size:10px!important;line-height:1.2;text-align:center;white-space:nowrap;
  }
  body[data-workspace="study"] .tabbar button .ico{
    display:block!important;flex:0 0 auto;width:auto!important;margin:0!important;
    font-size:17px!important;line-height:1.1;
  }
  body[data-workspace="study"] .tabbar button.active{
    background:#20385d;color:#f4f6ff;box-shadow:inset 0 0 0 1px #506b9b;
  }
}


/* Desktop app-shell hardening: the navigation is a true left rail, never a
   centered/fixed mobile bar. Mobile keeps the compact bottom tab strip. */
@media (min-width:681px) {
  html body[data-workspace="study"] .app {
    display:grid!important;
    width:100%!important;max-width:none!important;min-height:100vh!important;
    margin:0!important;padding:0!important;
    grid-template-columns:238px minmax(0,1fr)!important;
    grid-template-rows:64px minmax(0,1fr)!important;
    grid-template-areas:"tabs top" "tabs view"!important;
    overflow:visible!important;
  }
  html body[data-workspace="study"] .navbar {
    grid-area:top!important;position:sticky!important;inset:0 0 auto auto!important;
    left:auto!important;right:auto!important;bottom:auto!important;top:0!important;
    width:100%!important;max-width:none!important;height:64px!important;min-height:64px!important;
    margin:0!important;transform:none!important;justify-self:stretch!important;align-self:stretch!important;
  }
  html body[data-workspace="study"] #tabbar {
    grid-area:tabs!important;position:sticky!important;inset:0 auto auto 0!important;
    left:auto!important;right:auto!important;top:0!important;bottom:auto!important;
    display:flex!important;flex-direction:column!important;align-self:stretch!important;justify-self:stretch!important;
    width:238px!important;max-width:238px!important;min-width:238px!important;height:100vh!important;min-height:100vh!important;
    margin:0!important;padding:14px 10px!important;overflow:auto!important;transform:none!important;
    border:0!important;border-right:1px solid #2d4168!important;border-radius:0!important;
    background:#09132c!important;box-shadow:none!important;z-index:30!important;
  }
  html body[data-workspace="study"] #tabbar button {
    display:flex!important;position:relative!important;flex:0 0 auto!important;flex-direction:row!important;
    align-items:center!important;justify-content:flex-start!important;width:100%!important;min-width:0!important;
    min-height:46px!important;height:auto!important;margin:2px 0!important;padding:9px 11px!important;
    font-size:12px!important;line-height:1.25!important;white-space:normal!important;
    border:1px solid transparent!important;border-radius:9px!important;transform:none!important;
  }
  html body[data-workspace="study"] #tabbar button .ico {
    display:inline-grid!important;place-items:center!important;width:23px!important;flex:0 0 23px!important;
    margin:0 8px 0 0!important;font-size:16px!important;line-height:1.1!important;
  }
  html body[data-workspace="study"] .view {
    grid-area:view!important;display:block!important;position:relative!important;
    width:100%!important;max-width:none!important;min-width:0!important;
    margin:0!important;padding:16px 22px 36px!important;overflow:auto!important;transform:none!important;
  }
}
@media (max-width:680px) {
  html body[data-workspace="study"] .app {
    display:flex!important;flex-direction:column!important;width:100%!important;max-width:none!important;
    min-height:100vh!important;margin:0!important;padding:0!important;
  }
  html body[data-workspace="study"] #tabbar {
    display:flex!important;position:fixed!important;inset:auto 0 0!important;
    left:0!important;right:0!important;top:auto!important;bottom:0!important;
    z-index:1000!important;width:100%!important;max-width:none!important;min-width:0!important;
    height:72px!important;min-height:72px!important;max-height:72px!important;
    flex-direction:row!important;align-items:stretch!important;justify-content:space-around!important;
    gap:2px!important;margin:0!important;padding:5px 4px calc(5px + env(safe-area-inset-bottom))!important;
    overflow:visible!important;transform:none!important;border:0!important;border-top:1px solid #34466f!important;
    border-radius:0!important;background:#09132cf5!important;
  }
  html body[data-workspace="study"] #tabbar button {
    display:flex!important;position:relative!important;flex:1 1 0!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;width:auto!important;min-width:0!important;
    min-height:58px!important;height:auto!important;margin:0!important;padding:4px 1px!important;
    gap:3px!important;font-size:10px!important;line-height:1.2!important;white-space:nowrap!important;
  }
  html body[data-workspace="study"] #tabbar button .ico {
    display:block!important;width:auto!important;flex:0 0 auto!important;margin:0!important;font-size:17px!important;
  }
  html body[data-workspace="study"] .view {
    display:block!important;flex:1 1 auto!important;width:100%!important;max-width:none!important;min-width:0!important;
    margin:0!important;padding:14px 12px calc(92px + env(safe-area-inset-bottom))!important;overflow:auto!important;
  }
}


/* Classroom reference shell v5: task space + always-visible study/evidence inspector. */
body[data-workspace="study"] .astronomy-classroom{
  display:grid!important;grid-template-columns:minmax(0,1fr) 292px;align-items:start;gap:14px;
  width:100%;max-width:1820px;margin:0 auto;padding:0 0 24px;
}
body[data-workspace="study"] .classroom-primary{
  display:flex;min-width:0;flex-direction:column;gap:14px;
}
body[data-workspace="study"] .classroom-inspector{
  position:sticky;top:14px;display:flex;min-width:0;max-height:calc(100vh - 96px);
  flex-direction:column;gap:10px;overflow:auto;padding:0 2px 12px 0;scrollbar-width:thin;
}
body[data-workspace="study"] .classroom-inspector-card{
  display:flex;min-width:0;flex-direction:column;gap:8px;padding:13px;
  border:1px solid #354b76;border-radius:10px;
  background:linear-gradient(150deg,#111f3d,#0b1730);box-shadow:0 8px 23px #02081755;
}
body[data-workspace="study"] .classroom-inspector-card h3{
  margin:0;color:#edf3ff;font-size:13px;font-weight:850;letter-spacing:-.02em;
}
body[data-workspace="study"] .classroom-inspector-card p{
  margin:0;color:#98acd0;font-size:9px;line-height:1.7;
}
body[data-workspace="study"] .classroom-inspector-level{
  padding:7px 9px;border:1px solid #455f95;border-radius:6px;background:#192c51;
  color:#b7cef5;font-size:9px;font-weight:850;
}
body[data-workspace="study"] .classroom-inspector-stat{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:7px 8px;border:1px solid #30466f;border-radius:6px;background:#0d1b37;
}
body[data-workspace="study"] .classroom-inspector-stat span{color:#8fa7d2;font-size:8px}
body[data-workspace="study"] .classroom-inspector-stat strong{
  color:#f1f5ff;font-size:15px;font-weight:850;font-variant-numeric:tabular-nums
}
body[data-workspace="study"] .classroom-inspector-status{
  padding:8px 9px;border:1px solid #5b563d;border-left:3px solid #d5b36d;border-radius:6px;
  background:#2a281f;color:#e7cf92;font-size:9px;line-height:1.5;font-weight:800;
}
body[data-workspace="study"] .classroom-inspector-action{
  display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;
  min-height:34px;padding:8px 9px;border:1px solid #405b8a;border-radius:6px;
  background:#172b50;color:#d5e2ff;text-align:left;text-decoration:none;
  font-size:9px;font-weight:800;cursor:pointer;
}
body[data-workspace="study"] .classroom-inspector-action:hover{border-color:#82a5e8;background:#203965}
body[data-workspace="study"] .classroom-inspector-action b{color:#88dfe8;font-size:10px}
body[data-workspace="study"] .classroom-inspector-card--note{border-color:#2c606b;background:linear-gradient(150deg,#102d40,#0b1c30)}
body[data-workspace="study"] .classroom-inspector-card--note .classroom-kicker{color:#76d4d7}
body[data-workspace="study"] .classroom-inspector :where(a,button):focus-visible{
  outline:3px solid #80e3ec!important;outline-offset:3px;
}
@media(max-width:1240px){
  body[data-workspace="study"] .astronomy-classroom{grid-template-columns:minmax(0,1fr) 260px}
}
@media(max-width:980px){
  body[data-workspace="study"] .astronomy-classroom{grid-template-columns:minmax(0,1fr)}
  body[data-workspace="study"] .classroom-inspector{
    position:static;max-height:none;overflow:visible;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0;
  }
}
@media(max-width:680px){
  body[data-workspace="study"] .classroom-inspector{grid-template-columns:1fr;gap:9px}
  body[data-workspace="study"] .classroom-inspector-card{padding:12px}
}
