/* V3.3.1: organized study workspace, scoped to homework only. */
.study-page .study-view-switcher{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;
 margin:0 0 10px;padding:7px;border:1px solid var(--study-border,#dee5f1);
 border-radius:17px;background:var(--study-card,#fff);
 box-shadow:0 5px 22px rgba(35,71,123,.06);
}
.study-page .study-view-choice{
 display:flex;align-items:center;text-align:left;gap:10px;
 width:100%;min-width:0;min-height:65px;padding:10px 12px;
 border:1px solid transparent;border-radius:12px;background:transparent;
 color:var(--study-text,#223553);cursor:pointer;font-family:inherit;
}
.study-page .study-view-choice.active{
 border-color:#b7cefe;background:#edf3ff;color:#1b4a9b;
 box-shadow:0 3px 13px rgba(53,104,185,.08);
}
.study-page .study-view-choice:hover:not(.active){background:rgba(113,147,206,.09)}
.study-page .study-view-choice:focus-visible,
.study-page .study-nav-link:focus-visible,
.study-page .study-nav-shortcut:focus-visible{
 outline:3px solid #84aaff;outline-offset:2px;
}
.study-page .study-choice-icon{
 display:grid;place-items:center;flex:0 0 35px;width:35px;height:35px;
 font-size:22px;border-radius:10px;background:rgba(97,136,219,.13);
}
.study-page .study-view-choice span:last-child{display:grid;gap:3px;min-width:0}
.study-page .study-view-choice strong{font-size:13px;line-height:1.25}
.study-page .study-view-choice small{font-size:10px;line-height:1.3;color:var(--study-muted,#6b7c94);white-space:normal}
.study-page .study-view-helper{color:var(--study-muted,#6c7992);font-size:12px;margin:0 0 20px;padding-left:8px;min-height:18px}
.study-page .study-nav-heading{
 display:block;margin:14px 10px 8px;color:var(--study-muted,#7584a0);
 font-size:10px;font-weight:850;letter-spacing:.12em
}
.study-page .study-nav-heading-secondary{margin-top:27px}
.study-page .study-nav-shortcut{
 display:block;padding:9px 12px;margin:2px 0;color:var(--study-muted,#6b7c96);
 font-size:12px;text-decoration:none;border-radius:9px
}
.study-page .study-nav-shortcut:hover{background:rgba(75,112,189,.08);color:var(--study-text,#23344d)}
.study-page [data-study-panel][hidden]{display:none !important}
.study-page .study-dashboard-grid[data-study-overview]{grid-template-columns:minmax(0,1fr) 300px}
.study-page[data-current-panel="planning"] .study-dashboard-grid,
.study-page[data-current-panel="classes"] .study-dashboard-grid,
.study-page[data-current-panel="tools"] .study-dashboard-grid{
 grid-template-columns:minmax(0,1fr)
}
.study-page[data-current-panel="planning"] .study-right-column,
.study-page[data-current-panel="classes"] .study-right-column,
.study-page[data-current-panel="tools"] .study-main-column{display:none}
.study-page[data-current-panel="planning"] .study-main-column,
.study-page[data-current-panel="classes"] .study-main-column,
.study-page[data-current-panel="tools"] .study-right-column{
 width:100%;max-width:1000px;margin:0 auto
}
.study-page[data-current-panel="tools"] .study-right-column{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.study-page[data-current-panel="tools"] #studyFocus{grid-column:1 / -1}
.study-page #dashboard h1{scroll-margin-top:95px}
.study-page [data-study-panel]{scroll-margin-top:95px}
[data-theme=dark] .study-page .study-view-switcher{background:#17243c;border-color:#354a6c}
[data-theme=dark] .study-page .study-view-choice{color:#e6edfb}
[data-theme=dark] .study-page .study-view-choice.active{background:#263e68;border-color:#4b70b7;color:#e6f0ff}
[data-theme=dark] .study-page .study-choice-icon{background:#2f4c7b}
@media(max-width:1120px){
 .study-page .study-view-switcher{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:670px){
 .study-page .study-view-switcher{gap:5px;padding:5px;margin-bottom:10px}
 .study-page .study-view-choice{padding:8px;min-height:56px;gap:8px}
 .study-page .study-view-choice strong{font-size:12px}
 .study-page .study-choice-icon{width:30px;height:30px;flex-basis:30px;font-size:18px}
 .study-page .study-view-choice small{font-size:9px}
 .study-page .study-view-helper{padding-left:4px;font-size:11px}
 .study-page[data-current-panel="tools"] .study-right-column{grid-template-columns:minmax(0,1fr)}
 .study-page[data-current-panel="tools"] #studyFocus{grid-column:1}
}
@media(prefers-reduced-motion:reduce){.study-page .study-view-choice{scroll-behavior:auto}}

/* V4: keep existing study navigation simple on narrow screens. */
@media (max-width: 640px) {
  .study-page .study-view-switcher { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; padding: 6px; }
  .study-page input[type='date'], .study-page select { max-width: 100%; min-width: 0; }
  .study-page button { touch-action: manipulation; }
  .ticket-delete { margin-top: 9px; min-height: 42px; }
}
