/* The journal uses the site's notebook colours and type at a working scale. */
@media screen {
  #orbital-design.orbital-page.sketch-site:is([data-mode=classroom],[data-mode=teacher]) {
    --journal-edge: #ded5e1;
    --journal-muted: #71637a;
    --journal-ink: #392a43;
    --journal-accent: #704a88;
    --journal-paper: #fffefb;
    --journal-pad: clamp(14px, 3vw, 38px);

    & .site-top {
      display: grid; grid-template-columns: auto minmax(0,1fr) auto;
      grid-template-areas: "brand tools account"; align-items: center;
      max-width: none; min-height: 0; gap: 18px;
      padding: 10px max(var(--journal-pad), calc((100% - 1230px)/2));
      background: var(--journal-paper); border-bottom: 1px solid var(--journal-edge);
    }
    & .site-top .site-brand {grid-area: brand; width: auto; margin: 0; gap: 8px; font-size: 17px; white-space: nowrap;}
    & .site-brand img {width: 31px; height: 31px;}
    & .site-brand small {font-size: 10px; letter-spacing: .08em;}
    & .site-top .header-actions {grid-area: account; width: auto; display: flex; align-items: center; gap: 6px; margin: 0;}
    & .site-top #classroom-mode[aria-pressed=true] {display: none;}
    & .site-top .header-actions .button {min-height: 36px; padding: 6px 10px; margin: 0; white-space: nowrap; font-size: 12px;}
    & .profile-symbol {width: 20px; height: 20px;}
    & .site-top .main-menu.primary-tools {
      grid-area: tools; position: static; display: flex; flex-flow: row wrap;
      align-items: center; justify-content: center!important; width: auto!important;
      min-width: 0; gap: 2px 9px!important; margin: 0; padding: 0; border: 0; box-shadow: none;
    }
    & .site-top .primary-tools :is(#practice-mode,#exam-mode,#training-mode,#lab-mode) {
      flex: none; width: auto; min-height: 36px; margin: 0; padding: 5px 6px;
      border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: #54445f;
    }
    & .site-top .primary-tools :is(button,a)::before, & .primary-tool-arrow {display: none;}
    & .site-top .primary-tools .primary-tool-copy strong {
      white-space: nowrap; font-size: 13px; font-weight: 750; line-height: 1.35;
      text-decoration: underline; text-decoration-color: var(--tab-wash); text-decoration-thickness: 3px; text-underline-offset: 4px;
    }
    & .site-top .primary-tools :is(button,a):hover {background: #f4eff6; transform: none;}
  }
  #orbital-design.orbital-page.sketch-site[data-mode=classroom] {
    & .layout {display: block; box-sizing: border-box; max-width: 1230px; width: 100%; margin: 0 auto;}
    & #main {box-sizing: border-box; width: 100%; max-width: none; min-width: 0; margin: 0; padding: 20px var(--journal-pad) 24px;}
    & #main > .page-heading {min-height: 0; margin: 0 0 10px; padding: 0; background: none;}
    & #main > .page-heading h1 {font-size: clamp(22px,2.3vw,30px); line-height: 1.2; margin: 0;}
    & .page-heading :is(.cabinet-subtitle,img), & .page-heading::after {display: none;}
    & #classroom-view {display: block; width: 100%; max-width: none; margin: 0; padding: 0;}
    & #classroom-root {width: 100%; max-width: none; margin: 0; padding: 0; min-width: 0; color: var(--journal-ink);}
  }
  #orbital-design.orbital-page.sketch-site:is([data-mode=classroom],[data-mode=teacher]) {
    & .teacher-cabinet-nav:not([hidden]) {
      width: 100%; max-width: none; display: flex; align-items: center; flex-wrap: wrap;
      gap: 4px; margin: 0 0 17px; padding: 0 0 8px; border-bottom: 1px solid var(--journal-edge); box-sizing: border-box;
    }
    & .teacher-cabinet-nav .button, & #classroom-mock-exams {
      display: inline-flex; align-items: center; justify-content: center; gap: 7px;
      flex: none; min-width: 0; min-height: 35px; padding: 5px 12px!important; margin: 0;
      color: #605267!important; background: transparent!important; box-shadow: none; border: 0!important;
      font: 700 14px/1.3 Nunito,sans-serif; text-decoration: none;
    }
    & .teacher-cabinet-nav .button[aria-pressed=true] {color: #5b396f!important; background: #ecdff2!important; box-shadow: inset 0 0 0 1px #ddcce6;}
    & .teacher-cabinet-nav :is(.button,a):hover {background: #f2edf4!important;}
    & #classroom-notifications {margin-inline-start: auto; position: relative;}
    & #classroom-notifications .teacher-notification-count:not([hidden]) {position: static; font-size: 11px; min-width: 19px;}
    & .teacher-bell {position: relative; display: inline-block; width: 13px; height: 13px; margin-bottom: 2px; border: 1.6px solid; border-radius: 8px 8px 3px 3px;}
    & .teacher-bell::after {content: ''; position: absolute; bottom: -4px; left: 4px; width: 4px; border-bottom: 2px solid;}
  }
  #orbital-design.orbital-page.sketch-site[data-mode=classroom] {
    & #classroom-root :is(.classroom-message,.presentations-status):empty {display: none;}
    & #classroom-root .lesson-home {padding: 0; color: inherit;}
    & #classroom-root .teacher-section-head {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px;
    }
    & #classroom-root .teacher-section-head h2 {margin: 0; color: var(--journal-ink); font-size: clamp(20px,2vw,24px); line-height: 1.25; text-wrap: initial;}
    & .teacher-section-actions, & .teacher-roster-actions, & .lesson-register-actions, & .teacher-roster-filters {
      display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    }
    & #classroom-root :is(.teacher-section-actions,.teacher-register,.teacher-profile-head,.teacher-lesson-form,.teacher-quick-invite) .button {
      width: auto; min-width: 0; min-height: 35px; padding: 6px 11px; margin: 0; box-shadow: none; font: 700 13px/1.35 Nunito,sans-serif;
    }
    & #classroom-root input[type=search], & #classroom-root .teacher-register-tools select {
      width: auto; max-width: 100%; min-width: 0; min-height: 36px; padding: 6px 10px!important; margin: 0;
      background: #fff; color: var(--journal-ink); border: 1px solid #cec1d4;
      border-radius: 8px; font: 600 13px/1.4 Nunito,sans-serif!important; box-sizing: border-box;
    }
    & #classroom-root input[type=search] {width: min(225px,100%)!important;}
    & #classroom-root .teacher-register {border: 1px solid var(--journal-edge); border-radius: 12px; background: var(--journal-paper); box-shadow: 0 2px 0 #e9e2e9;}
    & #classroom-root .teacher-register-tools {
      display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px;
      padding: 9px 14px; background: #f6f1f7; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--journal-edge);
    }
    & #classroom-root .teacher-section-actions, & #classroom-root .teacher-roster-filters {flex-wrap: nowrap;}
    & #classroom-root .teacher-section-actions input[type=search] {width: 195px!important;}
    & #classroom-root .teacher-profile-head .classroom-help {margin: 2px 0 0;}
    & .teacher-filter, & .teacher-back, & .teacher-review-link, & .lesson-title-link {
      appearance: none; margin: 0; padding: 0; border: 0; background: none; color: var(--journal-accent); cursor: pointer; font: inherit; text-align: left;
    }
    & #classroom-root .teacher-filter {width: auto; flex: none; min-height: 32px; padding: 4px 9px; border-radius: 7px; font-size: 13px; font-weight: 700;}
    & .teacher-filter[aria-pressed=true] {background: #fff; box-shadow: inset 0 0 0 1px #d9ccdf;}
    & .teacher-back {min-height: 32px; padding: 3px 0; margin-bottom: 5px; font-size: 13px; font-weight: 700;}
    & :is(.teacher-back,.teacher-review-link,.lesson-title-link):hover {text-decoration: underline; text-underline-offset: 3px;}
    & #classroom-root .teacher-roster {display: grid; grid-template-columns: 1fr; gap: 0; margin: 0;}
    & #classroom-root .teacher-roster .classroom-student {
      display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) auto; align-items: center;
      gap: 9px 18px; border: 0; border-radius: 0; box-shadow: none; padding: 11px 14px; margin: 0;
      background: transparent; overflow: visible;
    }
    & #classroom-root .teacher-roster .classroom-student + .classroom-student,
    & .lesson-register-row + .lesson-register-row, & .teacher-job-row + .teacher-job-row {border-top: 1px solid #ece5ec;}
    & #classroom-root .teacher-roster .classroom-student-open {display: flex; align-items: center; gap: 10px; min-height: 42px; width: 100%; padding: 0; border-radius: 6px; background: none;}
    & #classroom-root .classroom-avatar {
      display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px;
      color: #705284; background: #eee4f3; border: 1px solid #e3d5e9; border-radius: 11px; font: 800 15px/1 Nunito,sans-serif;
    }
    & #classroom-root .classroom-student:nth-of-type(3n+2) .classroom-avatar {background: #e9efe4; color: #526a4b; border-color: #d8e3d1;}
    & #classroom-root .classroom-student:nth-of-type(3n) .classroom-avatar {background: #f5e6eb; color: #875565; border-color: #edd5de;}
    & #classroom-root .classroom-student-text {display: grid; gap: 2px; min-width: 0;}
    & #classroom-root .classroom-student-text strong, & #classroom-root .teacher-job-row h3, & #classroom-root .lesson-register-row h3 {
      margin: 0; padding: 0; color: var(--journal-ink); font: 800 16px/1.35 Nunito,sans-serif; text-wrap: initial; overflow-wrap: anywhere;
    }
    & #classroom-root .classroom-student-text span, & #classroom-root .teacher-register .classroom-help, & #classroom-root .teacher-identity .classroom-help {
      margin: 2px 0 0; color: var(--journal-muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere;
    }
    & .teacher-roster-work, & .teacher-job-status {display: grid; justify-items: start; min-width: 0; gap: 3px; overflow-wrap: anywhere;}
    & .teacher-roster-work strong {font-size: 14px; line-height: 1.35;}
    & .teacher-roster-status {font-size: 12px; color: var(--journal-muted);}
    & .teacher-review-link {color: #85522a; background: #fbedd5; padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 750;}
    & .teacher-student-menu {position: relative; margin: 0;}
    & .teacher-student-menu > summary {display: grid; place-items: center; list-style: none; cursor: pointer; font-size: 17px!important;}
    & .teacher-student-menu > summary::-webkit-details-marker {display: none;}
    & .teacher-student-menu > div {position: absolute; z-index: 3; right: 0; display: grid; gap: 4px; width: max-content; max-width: 205px; padding: 7px; background: #fff; border: 1px solid var(--journal-edge); border-radius: 8px; box-shadow: 0 6px 20px #39244622;}
    & .classroom-remove-confirmation {grid-column: 1/-1;}
    & #classroom-root .teacher-quick-invite, & .teacher-lesson-form {padding: 12px 15px; margin: 0 0 12px; background: #f6f1f7; border: 1px solid var(--journal-edge); border-radius: 10px;}
    & #classroom-root .teacher-quick-invite:not([open]), & .teacher-quick-invite > summary {display: none;}
    & .teacher-quick-invite h3 {margin: 0 0 7px;font-size: 16px;}
    & .teacher-quick-invite form, & .teacher-lesson-form {display: flex; flex-wrap: wrap; align-items: end; gap: 9px;}
    & .teacher-quick-invite form .classroom-field, & .teacher-lesson-form .classroom-field {flex: 1 1 170px; margin: 0; min-width: 0;}
    & .teacher-lesson-form .classroom-field {max-width: 440px;}
    & .teacher-quick-invite .classroom-invite:empty {display:none;}
    & #classroom-root .classroom-empty {margin: 0; padding: 16px; color: var(--journal-muted); font-size: 14px; text-align: left;}
    & .teacher-identity {display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: anywhere;}
    & .teacher-profile-nav .pupil-filters {margin: 0!important; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--journal-edge);}
    & .teacher-profile-nav .pupil-filters .button {flex: none; min-height: 34px; margin: 0; padding: 5px 12px!important; font-size: 13px;}
    & .teacher-profile-panel {min-width: 0;}
    & .teacher-profile-panel > :not(.teacher-register-tools,.teacher-register-list,.classroom-empty) {margin-inline: 14px;}
    & .teacher-profile-panel .teacher-register-tools {border-radius: 0; background: #faf7fa;}
    & .teacher-job-row {display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 9px 16px; align-items: center; padding: 12px 14px; overflow-wrap: anywhere;}
    & .teacher-job-status small {font-size: 12px; color: var(--journal-muted);}
    & .teacher-job-status progress {width: 95px; height: 5px; margin: 0;}
    & .lesson-register-row {display: grid; grid-template-columns: 33px minmax(0,1fr) auto auto auto; align-items: center; gap: 9px 15px; padding: 12px 15px;}
    & .lesson-book-icon {position: relative; justify-self: center; width: 24px; height: 29px; border: 1.5px solid #af90c1; border-radius: 3px 6px 6px 3px; background: linear-gradient(90deg,#ccb3da 4px,#efe4f4 4px); box-shadow: 0 2px 0 #e1d3e7;}
    & .lesson-book-icon::after {content: ''; position: absolute; left: 8px; right: 4px; top: 8px; height: 4px; border-block: 1px solid #b79ac8;}
    & .lesson-title-link {font: inherit; color: inherit;}
    & .lesson-register-row time, & .lesson-material-count {color: var(--journal-muted); font-size: 12px; white-space: nowrap;}
    & .lesson-material-count {color: #694e79; background: #f2ebf5; border-radius: 5px; padding: 3px 7px;}
    & .lesson-register-actions {flex-wrap: nowrap;}
    & .teacher-create-dialog {box-sizing: border-box; width: min(450px,calc(100% - 28px)); max-width: 100%; padding: 19px; color: var(--journal-ink); background: var(--journal-paper); border: 1px solid #d4c5db; border-radius: 14px;}
    & .teacher-create-dialog .classroom-heading {margin: 0 0 12px;}
    & .teacher-create-options {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;}
    & .teacher-create-options > :is(button,a) {margin: 0; white-space: normal;}
    & .teacher-create-options > p {grid-column: 1/-1;}
    & #classroom-root [hidden], & .teacher-cabinet-nav [hidden] {display: none!important;}
  }
}
@media screen and (max-width:1040px) {
  #orbital-design.orbital-page.sketch-site:is([data-mode=classroom],[data-mode=teacher]) .site-top {grid-template-columns: 1fr auto; grid-template-areas: "brand account" "tools tools"; gap: 3px 8px;}
  #orbital-design.orbital-page.sketch-site:is([data-mode=classroom],[data-mode=teacher]) .site-top .main-menu.primary-tools {justify-content: flex-start!important;}
}
@media screen and (max-width:680px) {
  #orbital-design.orbital-page.sketch-site:is([data-mode=classroom],[data-mode=teacher]) {
    & .site-top {padding: 8px var(--journal-pad);}
    & .site-top .site-brand {font-size: 15px;}
    & .site-top .main-menu.primary-tools {gap: 2px 7px!important;}
    & .site-top .primary-tools :is(#practice-mode,#exam-mode,#training-mode,#lab-mode) {min-height: 32px; padding: 3px 1px;}
    & .site-top .primary-tools .primary-tool-copy strong {font-size: 12px;}
  }
  #orbital-design.orbital-page.sketch-site[data-mode=classroom] {
    & #main {padding-top: 13px;}
    & .teacher-cabinet-nav:not([hidden]) {gap: 1px; margin-bottom: 12px;}
    & .teacher-cabinet-nav .button, & #classroom-mock-exams {padding: 4px 8px!important; font-size: 13px;}
    & .teacher-notification-label {display: none;}
    & #classroom-root .teacher-section-head {gap: 8px;}
    & #classroom-root .teacher-register-tools {padding: 8px 10px;}
    & #classroom-root .teacher-roster .classroom-student {grid-template-columns: minmax(0,1fr) auto; padding: 9px 10px; gap: 5px;}
    & .teacher-roster-work {grid-row: 2; grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px;}
    & .teacher-roster-actions {grid-row: 1; grid-column: 2;}
    & .teacher-job-row {grid-template-columns: minmax(0,1fr) auto; gap: 5px; padding: 10px;}
    & .teacher-job-row > .teacher-job-status {grid-column: 1; grid-row: 2;}
    & .teacher-job-row > button {grid-column: 2; grid-row: 1/3;}
    & .lesson-register-row {grid-template-columns: 24px minmax(0,1fr) auto; gap: 5px 9px; padding: 10px;}
    & .lesson-book-icon {width: 20px; height: 25px;}
    & .lesson-register-copy {grid-column: 2/-1;}
    & .lesson-material-count {grid-column: 2; grid-row: 2; justify-self: start;}
    & .lesson-register-row time {grid-column: 2; grid-row: 3; white-space: normal;}
    & .lesson-register-actions {grid-column: 3; grid-row: 2/4;}
  }
}
@media screen and (max-width:430px) {
  #orbital-design.orbital-page.sketch-site:is([data-mode=classroom],[data-mode=teacher]) {
    & .site-top .main-menu.primary-tools {display: grid; grid-template-columns: auto auto; justify-content: start!important; gap: 0 14px!important;}
    & .site-top .primary-tools :is(#practice-mode,#exam-mode,#training-mode,#lab-mode) {justify-content: start; text-align: left;}
  }
  #orbital-design.orbital-page.sketch-site[data-mode=classroom] {
    & #classroom-root .teacher-register-tools input[type=search] {width: 100%!important;}
    & #classroom-root .teacher-section-actions {max-width: 100%; flex-wrap: wrap; gap: 5px;}
    & #classroom-root .teacher-section-actions input[type=search] {width: min(160px,100%)!important;}
    & #classroom-root .teacher-roster .classroom-student {grid-template-columns: minmax(0,1fr) auto;}
    & #classroom-root .classroom-student-text strong {font-size: 15px;}
  }
}
