/* Review-only Instructor styling. Activate with ?instructor_glass=1.
   Opaque defaults remain usable without backdrop-filter. */
body.instructor-glass-preview-active {
  background: light-dark(#f4f4f4, #1c1c1c);
}
#mt-studio.instructor-glass-preview {
  --ink: light-dark(#303030, #ebebeb);
  --paper: light-dark(#f4f4f4, #1e1e1e);
  --panel: light-dark(#fefefe, #282828);
  --wash: light-dark(#f0f0f0, #373737);
  --line: light-dark(#dedede, #515151);
  --quiet: light-dark(#606060, #c2c2c2);
  border-radius: 0; min-height: 100dvh;
}
#mt-studio.instructor-glass-preview > header {
  margin: 16px 20px 0; padding: 16px 22px; gap: 14px;
  border: 1px solid light-dark(#ffffff, #595959); border-radius: 28px;
  background: light-dark(#fbfbfb, #303030);
  box-shadow: 0 5px 20px rgb(30 30 30 / 5%), inset 0 1px 0 rgb(255 255 255 / 45%);
}
#mt-studio.instructor-glass-preview #mt-account {
  gap: 6px; padding: 5px; border-radius: 16px;
  background: light-dark(rgb(255 255 255 / 55%), rgb(29 29 29 / 45%));
  border: 1px solid light-dark(rgb(255 255 255 / 90%), #595959);
}
#mt-studio.instructor-glass-preview #mt-account-name {
  font-size: 12px; color: var(--quiet); padding-inline: 7px;
}
#mt-studio.instructor-glass-preview #mt-account button {
  min-height: 38px; padding: 7px 11px; font-size: 13px;
  border: 1px solid transparent; border-radius: 12px; background: transparent;
}
#mt-studio.instructor-glass-preview #mt-account button:hover {
  background: var(--panel); border-color: var(--line);
}
#mt-studio.instructor-glass-preview #mt-account .glass-preview-current,
#mt-studio.instructor-glass-preview #mt-account .glass-preview-current:hover {
  background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: 600;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 45%);
}
#mt-studio.instructor-glass-preview #mt-course-profile { padding-top: 30px; }
#mt-studio.instructor-glass-preview #mt-course-profile .setup-head { margin-bottom: 18px; }
#mt-studio.instructor-glass-preview #mt-course-profile h2 {
  font-size: 27px; line-height: 1.25; letter-spacing: -.3px;
}
#mt-studio.instructor-glass-preview #mt-course-profile :is(button, summary) {
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
#mt-studio.instructor-glass-preview #mt-course-profile button {
  border-radius: 12px; background: light-dark(#fbfbfb, #353535);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 40%);
}
#mt-studio.instructor-glass-preview #mt-course-profile button:hover { background: var(--wash); }
#mt-studio.instructor-glass-preview #mt-course-profile button:active {
  box-shadow: inset 0 1px 3px rgb(28 28 28 / 12%);
}
#mt-studio.instructor-glass-preview #mt-course-profile button.main {
  background: var(--accent); color: var(--on-accent); border-color: var(--accent);
}
#mt-studio.instructor-glass-preview #mt-course-profile button:disabled { opacity: .55; }
#mt-studio.instructor-glass-preview #mt-course-profile .course-list-refined { gap: 10px; }
#mt-studio.instructor-glass-preview #mt-course-profile .course-list-refined li {
  border: 1px solid light-dark(#ffffff, #4b4b4b); border-radius: 15px;
  box-shadow: 0 3px 12px rgb(30 30 30 / 4%); background: var(--panel);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-list-refined li:is(:hover, :focus-within) {
  border-color: light-dark(#b7b7b7, #adadad);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-row-title {
  background: light-dark(rgb(255 255 255 / 72%), rgb(42 42 42 / 88%));
  background-image: linear-gradient(rgb(255 255 255 / 48%), rgb(255 255 255 / 4%));
  border: 1px solid light-dark(#d4d4d4, #666666); border-radius: 10px;
  padding: 6px 10px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-row-title:hover {
  background: light-dark(#eeeeee, #3c3c3c); border-color: light-dark(#a8a8a8, #909090); color: var(--ink);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-row-status {
  border: 1px solid light-dark(#dce7df, #506958); background: light-dark(#e7efe9, #304238);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-row-delete {
  background: transparent; box-shadow: none; color: light-dark(#5c5c5c, #dedede);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-row-delete:hover {
  background: light-dark(#f0f0f0, #343434); border-color: light-dark(#d5d5d5, #777777);
}
#mt-studio.instructor-glass-preview #mt-course-profile :is(.course-roster-tools, .material-toolbar) {
  gap: 8px; padding: 10px; border: 1px solid light-dark(#ffffff, #595959);
  border-radius: 15px; background: light-dark(#fafafa, #323232);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 45%);
}
#mt-studio.instructor-glass-preview #mt-course-profile :is(.foundation-form, .course-roster-scroll, .course-material-table) {
  background: var(--panel);
}
#mt-studio.instructor-glass-preview #mt-course-profile .foundation-form {
  border: 1px solid var(--line); border-radius: 15px;
}
#mt-studio.instructor-glass-preview #mt-course-profile :is(input:not([type=checkbox]), select, textarea) {
  background: var(--panel); border-color: var(--line); border-radius: 10px;
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-roster-scroll {
  border: 1px solid var(--line); border-radius: 14px;
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-disclosure > summary {
  border-radius: 12px; padding: 12px; background: var(--wash);
  border: 1px solid var(--line);
}
#mt-studio.instructor-glass-preview :is(button, input, select, textarea, summary):focus-visible,
body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) :focus-visible {
  outline: 2px solid light-dark(#28624b, #a3d3b6); outline-offset: 3px;
}
body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) {
  font: 14px/1.5 system-ui, sans-serif;
  color: light-dark(#303030, #ebebeb); background: light-dark(#fdfdfd, #2f2f2f);
  border: 1px solid light-dark(#ffffff, #747474); border-radius: 20px;
  box-shadow: 0 18px 56px rgb(26 26 26 / 15%), inset 0 1px 0 rgb(255 255 255 / 55%);
}
body.instructor-glass-preview-active :is(.management-dialog, .material-dialog)::backdrop {
  background: rgb(29 29 29 / 25%);
}
body.instructor-glass-preview-active .management-dialog :is(input:not([type=checkbox]), select, textarea) {
  background: light-dark(#ffffff, #2b2b2b); border-color: light-dark(#d7d7d7, #878787);
  border-radius: 10px; color: inherit;
}
body.instructor-glass-preview-active .management-dialog .soft {
  color: light-dark(#606060, #c2c2c2);
}
body.instructor-glass-preview-active .management-dialog button {
  border-radius: 12px; background: light-dark(#fbfbfb, #383838);
  color: inherit; border-color: light-dark(#dadada, #909090);
}
body.instructor-glass-preview-active .management-dialog button.main {
  background: light-dark(#28624b, #a3d3b6); color: light-dark(#ffffff, #153025);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #mt-studio.instructor-glass-preview > header {
    background: light-dark(rgb(252 252 252 / 48%), rgb(41 41 41 / 76%));
    -webkit-backdrop-filter: blur(28px) saturate(100%); backdrop-filter: blur(28px) saturate(100%);
  }
  #mt-studio.instructor-glass-preview #mt-course-profile :is(.course-roster-tools, .material-toolbar) {
    background: light-dark(rgb(252 252 252 / 48%), rgb(41 41 41 / 80%));
    -webkit-backdrop-filter: blur(22px) saturate(100%); backdrop-filter: blur(22px) saturate(100%);
  }
  body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) {
    background: light-dark(rgb(252 252 252 / 86%), rgb(44 44 44 / 92%));
    -webkit-backdrop-filter: blur(28px) saturate(100%); backdrop-filter: blur(28px) saturate(100%);
  }
}
@media (max-width: 600px) {
  #mt-studio.instructor-glass-preview > header { margin: 8px 10px 0; padding: 12px; border-radius: 16px; }
  #mt-studio.instructor-glass-preview #mt-account { gap: 3px; padding: 4px; }
  #mt-studio.instructor-glass-preview #mt-account button { padding: 7px 9px; min-height: 40px; }
  #mt-studio.instructor-glass-preview > header,
  body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) {
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  #mt-studio.instructor-glass-preview #mt-course-profile :is(.course-roster-tools, .material-toolbar) {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--panel);
  }
}
@media (prefers-reduced-motion: reduce) {
  #mt-studio.instructor-glass-preview #mt-course-profile :is(button, summary) { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  #mt-studio.instructor-glass-preview > header,
  #mt-studio.instructor-glass-preview #mt-course-profile :is(.course-roster-tools, .material-toolbar),
  body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) {
    background: light-dark(#fbfbfb, #303030); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* Opt-in landing and authentication entry: stronger glass framing, readable text. */
#mt-studio.landing-glass-preview {
  background: light-dark(#f3f3f3, #222222);
  background-image: radial-gradient(ellipse at 5% 8%, light-dark(#e4e4e4, #343434), transparent 52%),
    radial-gradient(ellipse at 97% 35%, light-dark(#f1f1f1, #323232), transparent 48%),
    linear-gradient(120deg, transparent 40%, light-dark(rgb(255 255 255 / 34%), rgb(255 255 255 / 3%)) 40%, transparent 80%);
}
#mt-studio.landing-glass-preview #mt-welcome { padding-bottom: 6px; }
#mt-studio.landing-glass-preview #mt-welcome .intro { padding-top: 42px; padding-bottom: 24px; }
#mt-studio.landing-glass-preview #mt-welcome .eyebrow { color: var(--accent); letter-spacing: .17em; font-size: 10px; }
#mt-studio.landing-glass-preview #mt-welcome h1 { font-size: clamp(34px, 4vw, 50px); letter-spacing: -.035em; }
#mt-studio.landing-glass-preview #mt-welcome .intro > p { color: var(--quiet); }
#mt-studio.landing-glass-preview #mt-welcome .landing-math-examples {
  width: fit-content; max-width: calc(100% - 8px); margin: 24px auto 0; padding: 12px 24px;
  border: 1px solid light-dark(#ffffff, #646464); border-radius: 22px;
  background: light-dark(#fafafa, #343434); box-shadow: inset 0 1px 0 rgb(255 255 255 / 60%);
}
#mt-studio.landing-glass-preview #mt-welcome .landing-cta { max-width: 820px; }
#mt-studio.landing-glass-preview #mt-welcome .landing-card,
#mt-studio.landing-glass-preview .account-preview {
  border: 1px solid light-dark(#ffffff, #7a7a7a); border-radius: 28px;
  background: light-dark(#fbfbfb, #333333);
  box-shadow: 0 14px 42px rgb(32 32 32 / 9%), inset 0 1px 0 rgb(255 255 255 / 70%);
}
#mt-studio.landing-glass-preview #mt-welcome .landing-card { padding: 30px 36px; }
#mt-studio.landing-glass-preview #mt-welcome .landing-symbol {
  border: 1px solid light-dark(#c8dbce, #607c69); border-radius: 15px;
  background: var(--wash); color: var(--accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / 75%);
}
#mt-studio.landing-glass-preview #mt-welcome .landing-card h2 { font-size: 25px; }
#mt-studio.landing-glass-preview #mt-welcome .landing-card > p { color: var(--quiet); }
#mt-studio.landing-glass-preview :is(#mt-login, #mt-first-admin, .preview-form) label {
  font-size: 13px; font-weight: 500; color: var(--ink);
}
#mt-studio.landing-glass-preview :is(#mt-login, #mt-first-admin, .preview-form) input:not([type=radio]):not([type=checkbox]) {
  min-height: 46px; padding: 11px 14px; border: 1px solid light-dark(#d1d1d1, #8f8f8f);
  border-radius: 13px; background: light-dark(#ffffff, #2b2b2b); color: var(--ink);
  box-shadow: inset 0 1px 3px rgb(30 30 30 / 4%);
}
#mt-studio.landing-glass-preview button {
  border-radius: 14px; transition: background-color 130ms ease, box-shadow 130ms ease;
}
#mt-studio.landing-glass-preview #mt-welcome button.main,
#mt-studio.landing-glass-preview .preview-form button.main {
  border-radius: 16px; min-height: 46px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 5px 14px rgb(30 30 30 / 14%), inset 0 1px 0 rgb(255 255 255 / 20%);
}
#mt-studio.landing-glass-preview #mt-welcome button.main:hover {
  box-shadow: 0 7px 18px rgb(30 30 30 / 20%); background: light-dark(#204f3c, #b5e0c5);
}
#mt-studio.landing-glass-preview #mt-welcome button.main:active { box-shadow: inset 0 2px 4px rgb(0 0 0 / 15%); }
#mt-studio.landing-glass-preview :is(.login-create-account, .preview-login) a {
  display: inline-block; padding: 4px 8px; border-radius: 9px; font-weight: 600; color: var(--accent);
}
#mt-studio.landing-glass-preview :is(.login-create-account, .preview-login) a:hover { background: var(--wash); }
#mt-studio.landing-glass-preview #mt-welcome .landing-benefits {
  padding: 18px 12px; border: 1px solid light-dark(#ffffff, #646464); border-radius: 20px;
  background: light-dark(#f9f9f9, #333333); box-shadow: inset 0 1px 0 rgb(255 255 255 / 60%);
}
#mt-studio.landing-glass-preview :is(button, input, a):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
#mt-studio.landing-glass-preview .account-preview {
  width: min(440px, calc(100% - 32px)); margin: 30px auto; padding: 26px;
}
#mt-studio.landing-glass-preview .preview-password { min-width: 0; }
#mt-studio.landing-glass-preview .preview-password input { flex: 1; width: 0; }
#mt-studio.landing-glass-preview .preview-password button { background: var(--wash); border: 1px solid var(--line); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #mt-studio.landing-glass-preview #mt-welcome :is(.landing-card, .landing-math-examples, .landing-benefits),
  #mt-studio.landing-glass-preview .account-preview {
    background: light-dark(rgb(253 253 253 / 50%), rgb(41 41 41 / 86%));
    -webkit-backdrop-filter: blur(28px) saturate(100%); backdrop-filter: blur(28px) saturate(100%);
  }
}
@media (max-width: 600px) {
  #mt-studio.landing-glass-preview #mt-welcome .intro { padding-top: 30px; }
  #mt-studio.landing-glass-preview #mt-welcome .landing-card { padding: 25px 20px; border-radius: 23px; }
  #mt-studio.landing-glass-preview #mt-welcome .landing-math-examples { padding: 12px 16px; gap: 15px 24px; }
  #mt-studio.landing-glass-preview #mt-welcome :is(.landing-card, .landing-math-examples, .landing-benefits),
  #mt-studio.landing-glass-preview .account-preview { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  #mt-studio.landing-glass-preview .account-preview { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #mt-studio.landing-glass-preview button { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  #mt-studio.landing-glass-preview #mt-welcome :is(.landing-card, .landing-math-examples, .landing-benefits),
  #mt-studio.landing-glass-preview .account-preview {
    background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* Surface hierarchy: visible glass around controls, opaque academic content. */
#mt-studio.instructor-glass-preview {
  background-image: radial-gradient(ellipse at 0% 0%, light-dark(#e4e4e4, #333333), transparent 55%),
    radial-gradient(ellipse at 100% 45%, light-dark(#f1f1f1, #343434), transparent 55%);
}
#mt-studio.instructor-glass-preview > header {
  position: relative;
  box-shadow: 0 8px 24px rgb(30 30 30 / 6%), inset 0 1px 0 rgb(255 255 255 / 90%), inset 0 -1px 0 rgb(255 255 255 / 24%);
}
#mt-studio.instructor-glass-preview > header::before {
  content: ''; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / 34%), transparent 34%, transparent 76%, rgb(255 255 255 / 12%));
}
#mt-studio.instructor-glass-preview #mt-account {
  background: light-dark(rgb(255 255 255 / 28%), rgb(27 27 27 / 35%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 65%);
}
#mt-studio.instructor-glass-preview #mt-account button {
  border-radius: 999px;
}
#mt-studio.instructor-glass-preview #mt-account .glass-preview-current {
  background-image: linear-gradient(rgb(255 255 255 / 15%), transparent);
}
#mt-studio.landing-glass-preview #mt-welcome .intro {
  width: min(1080px, calc(100% - 64px)); margin: 28px auto 24px;
  padding: 30px 24px 26px; border-radius: 32px;
  border: 1px solid light-dark(rgb(255 255 255 / 85%), #6a6a6a);
  background: light-dark(#f5f5f5, #313131);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%), inset 0 -1px 0 rgb(255 255 255 / 25%);
}
#mt-studio.landing-glass-preview #mt-welcome .landing-card,
#mt-studio.landing-glass-preview .account-preview {
  border-radius: 32px;
  box-shadow: 0 12px 32px rgb(32 32 32 / 9%), inset 0 2px 0 rgb(255 255 255 / 90%), inset 1px 0 0 rgb(255 255 255 / 55%);
}
#mt-studio.landing-glass-preview #mt-welcome .auth-form {
  max-width: 410px; padding: 20px; border-radius: 22px;
  background: light-dark(rgb(255 255 255 / 80%), rgb(31 31 31 / 92%));
  border: 1px solid light-dark(rgb(255 255 255 / 95%), #6a6a6a);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 70%);
}
#mt-studio.landing-glass-preview #mt-welcome .landing-math-examples {
  border-radius: 999px; background: light-dark(rgb(255 255 255 / 76%), #363636);
}
#mt-studio.instructor-glass-preview #mt-course-profile :is(.course-roster-tools, .material-toolbar) {
  border-radius: 22px; box-shadow: inset 0 2px 0 rgb(255 255 255 / 80%), inset 0 -1px 0 rgb(255 255 255 / 25%);
}
#mt-studio.instructor-glass-preview #mt-course-profile button:not(.course-row-title):not(.course-row-delete):not(.main),
body.instructor-glass-preview-active .management-dialog button:not(.main) {
  background-image: linear-gradient(rgb(255 255 255 / 55%), rgb(255 255 255 / 8%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 85%), 0 2px 3px rgb(30 30 30 / 3%);
}
#mt-studio.landing-glass-preview #mt-welcome button.main,
#mt-studio.instructor-glass-preview #mt-course-profile button.main,
body.instructor-glass-preview-active .management-dialog button.main {
  background-image: linear-gradient(rgb(255 255 255 / 16%), transparent 65%);
}
#mt-studio.instructor-glass-preview #mt-course-profile .course-row-status {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 85%);
}
body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) {
  border-radius: 26px; box-shadow: 0 18px 48px rgb(26 26 26 / 15%), inset 0 2px 0 rgb(255 255 255 / 90%);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #mt-studio.landing-glass-preview #mt-welcome .intro {
    background: light-dark(rgb(252 252 252 / 30%), rgb(39 39 39 / 80%));
    -webkit-backdrop-filter: blur(26px) saturate(100%); backdrop-filter: blur(26px) saturate(100%);
  }
}
@media (max-width: 600px) {
  #mt-studio.instructor-glass-preview > header { margin: 10px; }
  #mt-studio.landing-glass-preview #mt-welcome .intro {
    width: calc(100% - 28px); margin: 20px auto; padding: 26px 16px 22px; border-radius: 26px;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  #mt-studio.landing-glass-preview #mt-welcome .landing-math-examples { border-radius: 22px; }
  #mt-studio.landing-glass-preview #mt-welcome .auth-form { padding: 16px; }
}
@media (prefers-reduced-transparency: reduce) {
  #mt-studio.instructor-glass-preview { background-image: none; }
  #mt-studio.instructor-glass-preview > header,
  #mt-studio.instructor-glass-preview #mt-account,
  #mt-studio.landing-glass-preview #mt-welcome :is(.intro, .auth-form, .landing-card, .landing-benefits, .landing-math-examples),
  #mt-studio.landing-glass-preview .account-preview,
  #mt-studio.instructor-glass-preview #mt-course-profile :is(.course-roster-tools, .material-toolbar),
  body.instructor-glass-preview-active :is(.management-dialog, .material-dialog) {
    background: light-dark(#f8f8f8, #303030); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  #mt-studio.instructor-glass-preview > header::before { display: none; }
}
