/* PARA UI • stable, bounded layout. One source of truth for all three tabs. */
:root{
  --para-bg:#fafaf8;--para-paper:#fff;--para-ink:#22221f;
  --para-muted:#64645e;--para-line:#e7e7e1;
  --para-width:480px;--para-pad:16px;
}
*,*::before,*::after{box-sizing:border-box}
html{
  width:100%;min-width:0;height:100%;max-width:100%;
  overflow-x:hidden;overscroll-behavior-x:none;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
  background:var(--para-bg);
}
body{
  width:100%;min-width:0;height:100%;margin:0;overflow:hidden;
  overscroll-behavior:none;background:var(--para-bg);color:var(--para-ink);
}
body .shell{
  width:100%;max-width:var(--para-width);height:100vh;height:100dvh;
  min-height:0;margin:0 auto;padding:0;border:0;border-radius:0;
  display:flex;flex-direction:column;overflow:hidden;
  background:var(--para-bg);box-shadow:none;position:relative;
  touch-action:pan-y pinch-zoom;
}
.shell .content{
  width:100%;max-width:100%;min-width:0;min-height:0;
  flex:1 1 0;height:auto;margin:0;padding:0 var(--para-pad) 20px;
  overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
}
.shell .content::-webkit-scrollbar{display:none}
.shell .screen{min-width:0;width:100%;animation:none}
.shell .screen:not(.active){display:none}
.shell .screen .header{
  position:sticky;top:0;z-index:8;display:flex;align-items:center;
  justify-content:space-between;background:var(--para-bg);
  margin:0 0 12px;padding:14px 0 12px;min-height:55px;
}
.shell .logo{
  font:700 26px/1 "Benzin", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  letter-spacing:-.065em;color:var(--para-ink);
}
.shell .screen h1{
  font:700 25px/1.17 "Benzin",-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  letter-spacing:-.045em;color:var(--para-ink);margin:0;
  min-width:0;overflow-wrap:anywhere;
}
/* Schedule controls */
.shell .schedule-intro{
  width:100%;min-width:0;display:flex;align-items:center;gap:10px;
  margin:0 0 17px;
}
.shell #schedule .schedule-intro h1{flex:1 1 auto;min-width:0}
.shell .group-switch{
  flex:0 1 auto;min-width:0;max-width:40%;
  display:inline-flex;justify-content:center;align-items:center;gap:7px;
  min-height:39px;padding:7px 12px;border:1px solid var(--para-line);
  border-radius:999px;background:var(--para-paper);color:var(--para-ink);
  font-size:12px;font-weight:650;line-height:1.2;letter-spacing:0;text-transform:none;
}
.shell #studyline{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell .group-switch-arrow{flex:0 0 auto;font-size:13px;color:#666}
.shell .weekbar{
  width:100%;min-width:0;display:grid;grid-template-columns:38px minmax(0,1fr) 38px;
  align-items:center;gap:8px;margin:0 0 10px;
}
.shell .weekbar button{
  width:38px;height:38px;min-width:0;padding:0;display:grid;place-items:center;
  background:var(--para-paper);border:1px solid var(--para-line);
  border-radius:50%;font-size:22px;color:var(--para-ink);
}
.shell .weekbar .inline{
  min-width:0;font-size:12px;font-weight:650;text-align:center;line-height:1.35;
  white-space:normal;overflow-wrap:break-word;color:var(--para-ink);
}
.shell .week{
  width:100%;min-width:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  gap:1px;margin:0 0 17px;
}
.shell .day{
  min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;
  min-height:62px;padding:5px 0;border:0;border-radius:12px;
  background:transparent;color:var(--para-muted);
}
.shell .day .dname{font-size:10px;line-height:1.1}
.shell .day .date{
  width:32px;height:32px;display:grid;place-items:center;
  border-radius:11px;font-size:13px;line-height:1;font-weight:650;
}
.shell .day.active .date{background:var(--para-ink);color:#fff}
.shell .day .dot{width:3px;height:3px;min-height:0;border-radius:50%;background:#6b6b65}
.shell .day .dot.blank{background:transparent}
.shell .day-summary{margin:0 0 11px}
.shell .dayheading{font-size:14px;font-weight:650;color:var(--para-ink)}
.shell .lessons{width:100%;min-width:0;display:flex;flex-direction:column;gap:8px;margin:0}
.shell .lesson{
  width:100%;min-width:0;display:grid;grid-template-columns:43px minmax(0,1fr) 11px;
  align-items:start;gap:11px;min-height:75px;margin:0;padding:14px 12px;
  border:1px solid var(--para-line);border-radius:15px;background:var(--para-paper);
  box-shadow:none;color:var(--para-ink);text-align:left;overflow:hidden;
}
.shell .lesson > *{min-width:0}
.shell .lesson .time{font-size:12px;line-height:1.25;font-weight:700;white-space:nowrap}
.shell .lesson .end{font-size:10px;font-weight:500;margin-top:6px;color:#777771}
.shell .lesson .subject{
  display:block;font-size:13px;font-weight:650;line-height:1.35;
  letter-spacing:-.015em;overflow-wrap:anywhere;
}
.shell .lesson .metadata{display:block;font-size:11px;line-height:1.35;margin-top:6px;color:#575751}
.shell .lesson .extra{
  display:block;border-top:1px solid #ecece8;padding-top:9px;margin-top:10px;
  font-size:11px;line-height:1.5;overflow-wrap:anywhere;color:#484842;
}
.shell .lesson .chev{font-size:12px;color:#696963}
.shell .empty{
  background:var(--para-paper);border:1px solid var(--para-line);border-radius:15px;
  padding:25px 14px;text-align:center;color:#464640;font-size:13px;line-height:1.5;
}
/* Group and profile */
.shell .p4-page-head{margin:0 0 17px;padding:0}
.shell .p4-page-head h1{margin:0}
.shell .p4-page-head .group-number,
.shell .p4-page-head .profile-number{
  font:700 38px/1.12 "Benzin",-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  letter-spacing:-.045em;margin:11px 0 7px;overflow-wrap:anywhere;
}
.shell .p4-page-head .p4-overline{font-size:11px;line-height:1.4;margin:6px 0;color:var(--para-muted)}
.shell .p4-page-head .p4-intro{font-size:12px;line-height:1.5;margin:5px 0;color:#5b5b55}
.shell .p4-block{width:100%;margin-bottom:14px}
.shell .clean-row{
  width:100%;min-width:0;min-height:51px;display:flex;align-items:center;
  justify-content:space-between;gap:10px;margin:0 0 9px;padding:12px 15px;
  border:1px solid var(--para-line);border-radius:15px;background:var(--para-paper);
  font-size:13px;font-weight:650;text-align:left;line-height:1.4;color:var(--para-ink);
}
.shell .clean-row span:first-child{min-width:0;overflow-wrap:anywhere}
.shell .clean-row .action-symbol{flex:0 0 auto;font-size:17px}
.shell .p4-hint{font-size:11px;line-height:1.45;color:#64645d;padding:5px 3px 0}
.shell .p4-beta{
  width:100%;min-width:0;padding:16px;margin:14px 0 22px;
  border:1px solid var(--para-line);border-radius:17px;background:var(--para-paper);
}
.shell .p4-between{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.shell .beta-label{font-size:10px;font-weight:600;border-radius:999px;padding:6px 10px;margin:0;background:#f0f0ed}
.shell .p4-goal{font-size:11px;font-weight:600;white-space:nowrap}
.shell .p4-beta h2,.shell .p4-future h2{
  font-size:16px;line-height:1.3;font-weight:700;letter-spacing:-.025em;
}
.shell .p4-beta h2{margin:15px 0 9px}
.shell .p4-desc{font-size:12px;line-height:1.55;color:#464640;margin:0 0 15px}
.shell .p4-beta .progress{
  width:100%;height:6px;background:#ecece7;border-radius:999px;
  margin:0 0 10px;overflow:hidden;
}
.shell .p4-beta .fill{height:100%;border-radius:999px;background:#292925}
.shell .p4-counter{font-size:12px;color:#64645c}
.shell .p4-counter strong{font-size:13px;color:var(--para-ink)}
.shell .p4-footnote{font-size:11px;line-height:1.5;margin:11px 0 14px;color:#65655e}
.shell .p4-primary{
  width:100%;min-height:45px;display:flex;align-items:center;justify-content:space-between;
  border:0;border-radius:999px;background:#222220;color:#fff;padding:11px 16px;
  font-size:12px;font-weight:650;
}
.shell .p4-future{margin:0 0 15px}
.shell .p4-future h2{margin:0 0 12px}
.shell .p4-roadmap{
  width:100%;border:1px solid var(--para-line);border-radius:17px;
  padding:0 14px;background:var(--para-paper);
}
.shell .p4-feature{
  min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(68px,90px);
  align-items:center;gap:9px;min-height:51px;padding:11px 0;
  border-bottom:1px solid #eeeeea;
}
.shell .p4-feature:last-child{border-bottom:0}
.shell .p4-feature span{min-width:0;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.shell .p4-feature small{
  min-width:0;font-size:10px;line-height:1.35;text-align:right;
  white-space:normal;overflow-wrap:anywhere;color:#696962;
}
/* Profile accordions and controls */
.shell #profile .p4-page-head{margin-bottom:16px}
.shell #profile .p4-quick{margin-bottom:12px}
.shell .clean-details{
  width:100%;min-width:0;margin:9px 0;
  border:1px solid var(--para-line);border-radius:17px;background:var(--para-paper);
  overflow:hidden;scroll-margin-top:68px;
}
.shell .clean-details > summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:53px;padding:14px 15px;cursor:pointer;
  font-size:13px;font-weight:650;line-height:1.4;list-style:none;
  min-width:0;overflow-wrap:anywhere;
}
.shell .clean-details > summary::-webkit-details-marker{display:none}
.shell .clean-details > summary::after{content:"+";font-size:18px;flex:0 0 auto;font-weight:400;color:#777}
.shell .clean-details[open] > summary::after{content:"−"}
.shell .clean-details .details-inner{min-width:0;padding:0 15px 16px}
.shell .details-inner .field{width:100%;min-width:0;padding:9px 0 12px;border:0}
.shell .details-inner .field label{display:block;font-size:11px;line-height:1.4;margin:0 0 7px;color:#494943;font-weight:600}
.shell .details-inner .field input,.shell .details-inner .field select,
.shell .details-inner .course-stream select{
  display:block;width:100%;max-width:100%;min-width:0;min-height:46px;
  padding:10px 12px;border:1px solid var(--para-line);border-radius:12px;
  font-size:16px;color:var(--para-ink);background:#fafaf9;
  text-overflow:ellipsis;line-height:1.3;
}
.shell .details-inner .field select{padding-right:28px}
.shell .details-inner .group-results{width:100%;min-width:0;max-height:220px;overflow-y:auto;overflow-x:hidden;margin:9px 0}
.shell .details-inner .group-option{
  width:100%;min-width:0;display:flex;align-items:center;gap:12px;
  border:1px solid var(--para-line);border-radius:12px;background:#fafaf9;
  margin:0 0 7px;padding:11px;font-size:12px;overflow:hidden;
}
.shell .details-inner .group-option > span:first-child{min-width:0;flex:1;overflow-wrap:anywhere}
.shell .details-inner .group-option .availability{flex:0 0 70px;min-width:0;font-size:10px;white-space:normal;overflow-wrap:anywhere}
.shell .details-inner .source-note,.shell .p4-field-hint{
  font-size:11px;line-height:1.5;color:#62625b;overflow-wrap:anywhere;
}
.shell .details-inner .source-note{margin-top:16px;padding-top:13px;border-top:1px solid #eeeee9}
.shell .details-inner .source-note a{color:var(--para-ink);text-decoration:underline;text-underline-offset:3px}
.shell .details-inner .course-stream{min-width:0;padding:12px 0;border-bottom:1px solid #ededeb}
.shell .details-inner .course-stream:last-child{border-bottom:0}
.shell .details-inner .course-stream label{display:block;margin:0 0 8px;font-size:12px;font-weight:600;color:#33332f}
.shell .details-inner .save-button{
  min-height:44px;margin:7px 0 0;padding:11px 19px;border:0;border-radius:999px;
  background:#242421;color:white;font-size:13px;font-weight:650;
}
.shell .clean-message{min-height:0;margin:9px 0 0;font-size:11px;color:#41413c}
.shell .clean-message:empty{display:none}
.shell .details-inner .p4-toggle-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:48px;border:0;border-bottom:1px solid #ecece7;margin:0;padding:12px 0;
}
.shell .p4-toggle-row label{min-width:0;font-size:12px;font-weight:500;line-height:1.4}
.shell .p4-toggle-row .toggle{flex:0 0 39px}
.shell .p4-reset{
  border:1px solid var(--para-line);border-radius:999px;background:#fafaf9;
  padding:12px 18px;color:var(--para-ink);font-size:12px;
}
/* Tab bar is part of the fixed-width app, NOT a floating viewport overlay. */
body .shell .bottom{
  position:relative;left:auto;right:auto;bottom:auto;transform:none;
  width:100%;max-width:100%;min-width:0;
  height:calc(62px + env(safe-area-inset-bottom,0px));
  flex:0 0 calc(62px + env(safe-area-inset-bottom,0px));
  margin:0;padding:4px 10px max(4px,env(safe-area-inset-bottom,0px));
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;
  border:0;border-top:1px solid var(--para-line);border-radius:0;
  box-shadow:none;background:#fafaf8;backdrop-filter:none;
}
body .shell .nav{
  min-width:0;min-height:48px;max-width:none;
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;
  padding:4px 1px;margin:0;border:0;border-radius:13px;background:none;
  font-size:10px;font-weight:500;line-height:1.2;color:#66665f;white-space:nowrap;
}
body .shell .nav.active{background:#efefec;color:var(--para-ink);font-weight:650}
body .shell .nav svg{width:18px;height:18px;flex:0 0 auto}
.shell .modalback{z-index:150}
/* Overlay is also bounded. No lateral bounce or full-desktop stretch. */
#onboard:not(.hidden){width:100%;max-width:100%;overflow-x:hidden;touch-action:pan-y pinch-zoom}
#onboard .p2-frame{
  width:100%;max-width:var(--para-width);min-width:0;margin:0 auto;
  padding-left:var(--para-pad);padding-right:var(--para-pad);
}
#onboard .p2-body,#onboard .p2-body-inner,#onboard .p2-scroll-list{min-width:0;max-width:100%;overflow-x:hidden}
#onboard .p2-item,#onboard .p2-input{max-width:100%;min-width:0}
@media(max-width:360px){
  :root{--para-pad:13px}
  .shell .screen h1{font-size:23px}
  .shell .p4-page-head .group-number,.shell .p4-page-head .profile-number{font-size:34px}
  .shell .group-switch{max-width:37%;padding:7px 9px}
  .shell .weekbar{grid-template-columns:34px minmax(0,1fr) 34px}
  .shell .weekbar button{width:34px;height:34px}
  .shell .weekbar .inline{font-size:11px}
  .shell .lesson{grid-template-columns:40px minmax(0,1fr) 11px;gap:8px;padding:12px 10px}
}
@media(min-width:481px){
  body{background:#efefec}
  body .shell{box-shadow:0 0 0 1px #e7e7e1}
}
@media(prefers-reduced-motion:reduce){
  .shell .lesson,.shell .clean-row,.shell .nav{transition:none!important}
}

/* Approved, image-based PARA identity. Never synthesize the wordmark with fonts. */
.shell .header .para-logo{
  display:block;flex:0 0 auto;width:102px;height:auto;
  aspect-ratio:806 / 201;object-fit:contain;object-position:left center;
  max-width:45%;margin:0;
}
#onboard .p2-mini-logo{
  display:block;width:87px;height:auto;aspect-ratio:806 / 201;object-fit:contain;
}
#onboard .p2-big-logo{
  display:block;width:min(83vw,350px);max-width:100%;height:auto;
  aspect-ratio:806 / 201;object-fit:contain;
  animation:p2-logo .95s cubic-bezier(.18,.85,.25,1) both;
}
#onboard .p2-splash{align-items:center;justify-content:center}
@media(max-width:380px){
  .shell .header .para-logo{width:92px}
  #onboard .p2-big-logo{width:min(82vw,300px)}
}
@media(prefers-reduced-motion:reduce){
  #onboard .p2-big-logo{animation:none}
}


/* Interaction pass: restrained feedback, consistent focus and no layout-moving effects. */
:root{--para-ease:cubic-bezier(.2,.7,.2,1);--para-duration:170ms}
.shell .screen.active{animation:para-tab-in 190ms var(--para-ease) both}
@keyframes para-tab-in{from{opacity:.68}to{opacity:1}}
.shell :is(.nav,.day,.lesson,.group-switch,.clean-row,.p4-primary,.save-button,.p4-reset,.weekbar button),
#onboard :is(.p2-item,.p2-pill,.p2-course,.p2-primary,.p2-language-tab,.p2-back){
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  transition:background-color var(--para-duration) var(--para-ease),
             border-color var(--para-duration) var(--para-ease),
             color var(--para-duration) var(--para-ease),
             opacity var(--para-duration) var(--para-ease);
}
.shell :is(.nav,.day,.lesson,.group-switch,.clean-row,.p4-primary,.save-button,.p4-reset,.weekbar button):active:not(:disabled),
#onboard :is(.p2-item,.p2-pill,.p2-course,.p2-primary,.p2-language-tab,.p2-back):active:not(:disabled){
  opacity:.77;
  transform:none;
}
.shell :is(button,input,select,summary,a):focus-visible,
#onboard :is(button,input,select):focus-visible{
  outline:2px solid #252521;
  outline-offset:3px;
}
.shell .weekbar button:disabled{
  opacity:.3;
  cursor:default;
  pointer-events:none;
}
.shell .nav.active svg{stroke-width:2}
.shell .day[aria-pressed="true"] .dname{color:var(--para-ink);font-weight:650}
.shell .clean-details[open] > summary{color:var(--para-ink)}
.shell .p4-feature small{color:#52524e}
.shell .p4-desc,.shell .p4-field-hint{color:#4b4b46}
.shell .lesson[aria-expanded="true"]{border-color:#bfbfba}
.shell .lesson .extra{animation:para-details-in 160ms ease-out both}
@keyframes para-details-in{from{opacity:.4}to{opacity:1}}
@media(hover:hover){
 .shell .weekbar button:hover:not(:disabled),
 .shell .group-switch:hover,
 .shell .clean-row:hover,
 .shell .lesson:hover{border-color:#babbb5}
 .shell .nav:not(.active):hover{background:#f0f0ed;color:#34342f}
 .shell .day:not(.active):hover{background:#efefec}
 #onboard .p2-item:not(.is-selected):hover{border-color:#bcbcb6}
}
@media(prefers-reduced-motion:reduce){
 .shell .screen.active,.shell .lesson .extra{animation:none!important}
 .shell :is(.nav,.day,.lesson,.group-switch,.clean-row,.p4-primary,.save-button,.p4-reset,.weekbar button),
 #onboard :is(.p2-item,.p2-pill,.p2-course,.p2-primary,.p2-language-tab,.p2-back){transition:none!important}
}

/* Course selection: the RUZ teacher belongs to the option, not a separate screen. */
#onboard .p2-choice-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  align-items:stretch;
}
#onboard .p2-pill{
  display:flex;flex-direction:column;justify-content:center;align-items:flex-start;
  gap:6px;min-width:0;max-width:none;width:100%;min-height:78px;
  padding:12px 13px;border-radius:16px;text-align:left;
  overflow-wrap:break-word;
}
#onboard .p2-pill-label{
  display:block;font-size:14px;font-weight:650;line-height:1.25;color:inherit;
}
#onboard .p2-pill-teacher{
  display:block;font-size:12px;font-weight:500;line-height:1.4;
  color:#53534e;overflow-wrap:anywhere;
}
#onboard .p2-pill.selected .p2-pill-teacher{color:#f0f0ec}
.shell .header .para-logo,#onboard .p2-mini-logo,#onboard .p2-big-logo{
  aspect-ratio:796 / 190;image-rendering:auto;
}
@media(max-width:360px){
  #onboard .p2-choice-options{gap:8px}
  #onboard .p2-pill{padding:11px 10px;min-height:73px}
  #onboard .p2-pill-label{font-size:13px}
  #onboard .p2-pill-teacher{font-size:11px}
}


/* PARA wordmark is traced inside the SVG itself, not revealed with a horizontal wipe. */
#onboard .p2-splash .p2-big-logo{
  display:block;
  width:min(82vw,350px);
  max-width:100%;
  height:auto;
  aspect-ratio:796 / 190;
  object-fit:contain;
  image-rendering:auto;
  filter:none;
  animation:none;
  clip-path:none;
  opacity:1;
  transform:none;
  will-change:auto;
}
#onboard .p2-splash.p2-intro-leave{
  opacity:0;
  transition:opacity 230ms ease-out;
}
#onboard.p2-intro-out{
  opacity:0;
  transition:opacity 350ms ease-out;
}
body:has(#onboard.p2-intro-out) .shell{
  display:flex!important;
}
@media(prefers-reduced-motion:reduce){
  #onboard .p2-splash .p2-big-logo{
    animation:none!important;
    clip-path:none!important;
    opacity:1!important;
    transform:none!important;
    will-change:auto;
  }
  #onboard .p2-splash.p2-intro-leave,
  #onboard.p2-intro-out{transition:none!important}
}
