:root {
  --bg: #151a24;
  --bg-deep: #151a24;
  --panel: #202a39;
  --panel-2: #263346;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f6fb;
  --muted: rgba(245, 246, 251, 0.58);
  --blue: #2563eb;
  --sidebar-border: #6f6b71;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(5, 122, 255, 0) 24.66%, rgba(5, 122, 255, 0.12) 100%),
    #151a24;
  background-attachment: scroll;
  color: var(--text);
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]) {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled { cursor: not-allowed; }

.sidebar {
  position: fixed;
  inset: 12px auto 12px 12px;
  z-index: 3;
  display: flex;
  width: 339px;
  height: calc(100vh - 24px);
  flex-direction: column;
  justify-content: space-between;
  padding: 82px 22px 17px;
  border: 0.8px solid var(--sidebar-border);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  box-shadow: none;
}

.side-nav {
  display: grid;
  gap: 5px;
  padding: 0 10px;
}

.menu-item,
.support-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14.575px 11px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: all 0.2s ease;
}

.menu-item {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.side-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  color: rgba(255, 255, 255, 0.68);
}

.side-icon svg {
  width: 26px;
  height: 26px;
}

.side-bottom {
  display: grid;
  gap: 30px;
}

.support-link {
  box-sizing: border-box;
  margin: 0 13px 20px;
  padding: 18px 9px;
  border-color: rgba(255, 255, 255, 0.1);
  border-style: solid;
  border-width: 1px 0;
  border-radius: 0;
}

.support-link:hover,
.support-link:focus-visible {
  background: transparent;
}

.student-card {
  display: flex;
  gap: 14px;
  align-items: center;
  width: calc(100% - 20px);
  margin: 0 10px;
  padding: 16px 14px;
  border-top: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  text-align: left;
  transition: background-color 0.2s ease;
}

.logout-form {
  margin: 0;
}

.logout-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.sidebar-logout-form {
  margin: -8px 0 0;
}

.sidebar-logout-form .support-link {
  width: calc(100% - 26px);
  min-height: 48px;
  margin-bottom: 0;
}

.student-card:hover,
.student-card:focus-visible,
.profile-open .student-card {
  background: rgba(255, 255, 255, 0.06);
}

.account-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #1d2d43;
  color: #d7e7ff;
  font-size: 20px;
  font-weight: 800;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-profile {
  display: none;
  gap: 18px;
  padding-top: 140px;
}

.profile-open .side-main,
.profile-open .side-bottom {
  display: none;
}

.profile-open .side-profile {
  display: grid;
}

.shell {
  width: calc(100% - 389px);
  margin-left: 370px;
  padding: 24px 19px 54px 0;
}

.module-view .lesson-stream {
  max-width: 1320px;
}

.gc-head h1 {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-hero {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1048 / 333;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #0d1725;
}

.mini-course-hero {
  overflow: hidden;
}

.mini-course-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.program-card {
  position: relative;
  display: flex;
  width: 174px;
  aspect-ratio: 0.69;
  align-items: flex-end;
  justify-content: center;
  padding: 34px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background-position: center;
  background-size: cover;
  text-transform: uppercase;
  transform: perspective(1000px) rotateX(0) rotateY(0) translateY(0) scale(1);
  animation: unfold3D 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.program-card img,
.module-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-card:nth-child(1) { animation-delay: 0.1s; }
.program-card:nth-child(2) { animation-delay: 0.2s; }

.program-card::after {
  position: absolute;
  top: 0;
  left: -150%;
  z-index: 10;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  content: "";
  pointer-events: none;
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.program-card:hover {
  z-index: 2;
  transform: perspective(1000px) translateY(-12px) rotateX(2deg) scale(1.025);
  box-shadow: 0 25px 50px rgba(37, 99, 235, 0.15), 0 10px 15px rgba(37, 99, 235, 0.1);
}

.program-card:hover::after {
  left: 150%;
}

.program-card span {
  display: none;
}

.course-layout {
  display: grid;
  grid-template-columns: 755px minmax(0, 1fr);
  gap: 19px;
  align-items: start;
}

.module-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 173.5px);
  gap: 19px;
  justify-content: flex-start;
  padding-bottom: 20px;
}

.module-cover {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 548 / 800;
  padding: 20px;
  overflow: hidden;
  border: 0.5px solid rgba(147, 147, 147, 0.35);
  border-radius: 14px;
  background-color: #151d27;
  background-position: center;
  background-size: cover;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  text-transform: uppercase;
  transform: perspective(1000px) rotateX(0) rotateY(0) translateY(0) scale(1);
  animation: unfold3D 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.module-cover:nth-child(1) { animation-delay: 0.1s; }
.module-cover:nth-child(2) { animation-delay: 0.2s; }
.module-cover:nth-child(3) { animation-delay: 0.3s; }
.module-cover:nth-child(4) { animation-delay: 0.4s; }
.module-cover:nth-child(5) { animation-delay: 0.5s; }
.module-cover:nth-child(6) { animation-delay: 0.6s; }
.module-cover:nth-child(7) { animation-delay: 0.7s; }
.module-cover:nth-child(8) { animation-delay: 0.8s; }
.module-cover:nth-child(9) { animation-delay: 0.9s; }
.module-cover:nth-child(n+10) { animation-delay: 1s; }

.module-cover::before {
  position: relative;
  z-index: 15;
  display: block;
  width: 90px;
  height: 28px;
  margin: 0 auto 20px;
  border: 0.1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(1px) saturate(180%);
  box-shadow:
    inset 0 0.1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -0.1px 0 rgba(255, 255, 255, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.08);
  color: #fff;
  content: attr(data-module);
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 28px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.module-cover::after {
  position: absolute;
  top: 0;
  left: -150%;
  z-index: 10;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  content: "";
  pointer-events: none;
  transform: skewX(-25deg);
  transition: all 0.7s ease;
}

.module-cover:hover {
  z-index: 2;
  transform: perspective(1000px) translateY(-12px) rotateX(2deg) scale(1.025);
  box-shadow: 0 25px 50px rgba(37, 99, 235, 0.15), 0 10px 15px rgba(37, 99, 235, 0.1);
}

.module-cover:hover::before {
  background-color: #2563eb;
  color: #fff;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.module-cover:hover::after {
  left: 150%;
}

.bonus-actions {
  display: grid;
  gap: 14px;
  padding-top: 28px;
}

.bonus-action-shell {
  position: relative;
}

.bonus-actions a,
.bonus-actions .bonus-action-disabled {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-radius: 16px;
  background: var(--blue);
  box-shadow: 0 15px 32px rgba(46, 109, 241, 0.18);
  font-size: 18px;
  font-weight: 800;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.bonus-actions .bonus-action-disabled {
  border: 1px solid rgba(126, 174, 255, 0.2);
  background: rgba(40, 117, 244, 0.08);
  color: #a9bad0;
}

.bonus-actions a:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.bonus-actions a:active {
  transform: scale(0.98);
}

@keyframes unfold3D {
  0% {
    opacity: 0;
    transform: perspective(1000px) rotateX(-30deg) rotateY(10deg) translateY(60px) scale(0.9);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) rotateY(0) translateY(0) scale(1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  }
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  margin: 10px 0 28px;
  color: var(--muted);
  font-size: 16px;
}

.crumbs span {
  color: rgba(255, 255, 255, 0.9);
}

.crumbs .crumb-separator {
  color: rgba(148, 163, 184, 0.7);
  user-select: none;
}

.stream-title {
  margin: 0 0 30px;
  font-size: 28px;
}

.lesson-stream {
  display: grid;
  gap: 18px;
}

.lesson-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr) 48px;
  gap: 28px;
  align-items: center;
  min-height: 128px;
  padding: 16px 36px 16px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background:
    linear-gradient(268.93deg, rgba(20, 103, 238, 0) 50%, rgba(20, 103, 238, 0.1) 100%),
    rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.lesson-row:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(268.93deg, rgba(20, 103, 238, 0) 50%, rgba(20, 103, 238, 0.3) 100%),
    rgba(255, 255, 255, 0.09);
}

.lesson-thumb {
  display: grid;
  width: 156px;
  height: 96px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(147, 147, 147, 0.35);
  border-radius: 10px;
  background:
    radial-gradient(circle at 80% 85%, rgba(73, 132, 186, 0.55), transparent 42%),
    linear-gradient(135deg, #101a24, #223a50);
  text-align: center;
  text-transform: uppercase;
  background-position: center;
  background-size: cover;
}

.lesson-thumb.has-image b {
  display: none;
}

.login-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(24px, 6vw, 72px) 24px;
}

.login-shell {
  display: grid;
  width: min(1380px, 100%);
  gap: clamp(28px, 5vw, 58px);
}

.login-brand h1 {
  margin: 0;
  color: #f7f8fb;
  font-size: clamp(42px, 5.7vw, 104px);
  font-weight: 430;
  letter-spacing: -.055em;
  line-height: .92;
  text-align: center;
  text-transform: uppercase;
}

.login-card {
  width: min(100%, 720px);
  padding: clamp(28px, 4vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
}

.login-card-main { justify-self: center; }

.login-card h1,
.login-card h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  font-weight: 450;
  letter-spacing: -.045em;
  line-height: 1;
}

.login-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-lead {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 17px;
  line-height: 1.5;
}

.login-card label {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
  font-weight: 700;
}

.login-card input {
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
}

.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1f5fb !important;
  caret-color: #f1f5fb;
  box-shadow: 0 0 0 1000px #252b35 inset !important;
  transition: background-color 9999s ease-out 0s;
}

.login-card input:focus-visible {
  border-color: #91b8ff;
  outline: 3px solid rgba(76, 141, 255, .25);
  outline-offset: 2px;
}

.login-card .button {
  width: 100%;
  min-height: 58px;
  margin-top: 26px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 17px;
}

.login-selected-email {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(7, 12, 20, .24);
}

.login-selected-email span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, .78);
}

.login-selected-email a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #b9d3ff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.login-recovery-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  color: #a9c9ff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-underline-offset: 3px;
}

.login-error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(252, 165, 165, .28);
  border-radius: 12px;
  background: rgba(127, 29, 29, .18);
  color: #fca5a5;
  font-size: 14px;
}

.login-note {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: 14px;
}

.lesson-thumb b {
  max-width: 190px;
  font-size: 24px;
  font-weight: 950;
  line-height: 0.98;
}

.lesson-info {
  display: grid;
  gap: 10px;
}

.lesson-info small,
.lesson-meta,
.lesson-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lesson-info strong {
  max-width: 90%;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.lesson-state {
  width: 38px;
  height: 38px;
  justify-self: end;
  background: no-repeat center / contain;
  opacity: 0.9;
}

.lesson-row.has-mission .lesson-state {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 7 7 9 11 5'/%3E%3Cline x1='14' y1='7' x2='19' y2='7'/%3E%3Cpolyline points='5 13 7 15 11 11'/%3E%3Cline x1='14' y1='13' x2='19' y2='13'/%3E%3Cpolyline points='5 19 7 21 11 17'/%3E%3Cline x1='14' y1='19' x2='19' y2='19'/%3E%3C/svg%3E");
}

.lesson-row.not-reached .lesson-state {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.lesson-row.reached .lesson-state {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3Cline x1='6' y1='8' x2='8' y2='8'/%3E%3Cline x1='6' y1='12' x2='8' y2='12'/%3E%3C/svg%3E");
}

.lesson {
  max-width: 1320px;
}

.lesson h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
}

.lesson-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
}

.lesson-meta span {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
}

.content-panel,
.homework-panel,
.table-card {
  border: 0;
  background: transparent;
}

.content-panel {
  padding: 0;
}

.content-panel h2 {
  display: none;
}

.content-panel p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.42;
}

.inline-link {
  color: #7eb4ff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(126, 180, 255, 0.56);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: #b9d6ff;
  text-decoration-color: currentColor;
}

.lesson-images {
  display: grid;
  width: 100%;
  margin: 20px 0 24px;
  overflow: visible;
  place-items: start;
}

.lesson-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  border-radius: 12px;
  object-fit: contain;
  object-position: left top;
}

.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 18px 0 24px;
  border-radius: 12px;
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 40px 0;
}

.doc-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(46, 109, 241, 0.65);
  border-radius: 8px;
  background: rgba(46, 109, 241, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.doc-link:hover,
.attachment-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.attachments {
  display: grid;
  gap: 14px;
  margin: 38px 0 0;
}

.attachment-card {
  display: grid;
  grid-template-columns: 74px 140px minmax(0, 1fr);
  gap: 24px;
  min-height: 104px;
  align-items: center;
  padding: 20px 34px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.attachment-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.attachment-icon::before {
  width: 30px;
  height: 30px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23c9d0dc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8M8 17h8M8 9h2'/%3E%3C/svg%3E");
  content: "";
}

.attachment-size {
  color: rgba(255, 255, 255, 0.45);
  font-size: 20px;
  font-weight: 400;
}

.attachment-name {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homework-panel {
  margin-top: 36px;
  padding: 24px 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), rgba(46, 39, 93, 0.42));
}

.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 18px;
  border: 1px solid rgba(126, 174, 255, 0.32);
  border-radius: 12px;
  background: rgba(40, 117, 244, 0.16);
  color: #e8f1ff;
  font-weight: 750;
}

.design-page-head {
  max-width: 780px;
  margin-bottom: 30px;
}

.design-page-head > p,
.access-state-eyebrow {
  margin: 0 0 8px;
  color: #83afff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.design-page-head h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.design-page-head > span {
  color: var(--muted);
  line-height: 1.5;
}

.access-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
}

.access-state {
  position: relative;
  min-height: 260px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.access-state::after {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #608fe8;
  content: "";
}

.access-state.review::after,
.access-state.scheduled::after {
  background: #d99a35;
}

.access-state.revision::after,
.access-state.expired::after,
.access-state.suspended::after {
  background: #df6b6b;
}

.access-state.complete::after {
  background: #42b883;
}

.access-state-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background:
    radial-gradient(circle at center, rgba(126, 174, 255, 0.75) 0 4px, transparent 5px),
    rgba(76, 141, 255, 0.1);
}

.access-state h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.access-state > p:not(.access-state-eyebrow) {
  max-width: 520px;
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.access-state > a,
.access-state-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 16px;
  border-radius: 11px;
  background: #edf4ff;
  color: #101722;
  font-weight: 800;
}

.lesson-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 0 0 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.lesson-nav a {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.lesson-nav a:last-child {
  justify-items: end;
  text-align: right;
}

.lesson-nav strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
}

.lesson-nav-mobile-label {
  display: none;
}

.lesson-nav span {
  font-size: 14px;
}

.homework-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.homework-panel p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
  line-height: 1.35;
}

.homework-panel label {
  display: block;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
}

textarea,
input[type="file"] {
  width: 100%;
}

textarea {
  display: block;
  min-height: 52px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

.button {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #151515;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
}

.page-head,
.hero,
.grid,
.course-card,
.module,
.lesson-list,
.nested,
.stats,
.progress,
.eyebrow,
.status,
.flag {
  all: unset;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

@media (max-width: 767px) {
  .sidebar {
    position: static;
    width: auto;
    margin: 10px;
    padding: 24px;
  }

  .shell {
    width: 100%;
    margin-left: 0;
    padding: 20px;
  }

  .course-layout {
    grid-template-columns: 1fr;
  }

  .program-grid,
  .module-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .program-card {
    width: auto;
  }

  .lesson-row {
    grid-template-columns: 1fr;
  }
}

/* Student shell refresh: compact desktop navigation and a real mobile layout. */

:root {
  --bg: #0d121b;
  --bg-deep: #090d14;
  --panel: #151d29;
  --panel-2: #1b2635;
  --panel-hover: #202d3e;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f6f8fb;
  --muted: #9aa8bb;
  --blue: #4c8dff;
  --blue-strong: #2875f4;
  --focus: #9cc2ff;
  color-scheme: dark;
}

html {
  scroll-behavior: auto;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% -8%, rgba(42, 111, 228, 0.15), transparent 34rem),
    linear-gradient(180deg, #0d121b 0%, #0b111a 100%);
  background-attachment: scroll;
}

a,
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
select,
input,
textarea {
  touch-action: manipulation;
}

a:focus-visible {
  outline: 0;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

button:focus-visible {
  outline: 0;
  border-color: var(--focus);
  box-shadow: none;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 0;
  border-color: var(--focus);
}

button,
[role="button"],
.custom-select-trigger,
.custom-select-option,
.menu-item,
.program-card,
.module-cover,
.lesson-row,
.button-link,
.doc-link,
.attachment-card,
.homework-file,
.homework-file-download,
.learning-order-row,
.learning-user-row,
.notification-card,
.product-admin-card,
.sidebar,
.admin-mode-bar,
.lesson-nav,
.answer-filter-form,
.homework-preview-dialog header,
.homework-preview-dialog footer {
  user-select: none;
  -webkit-user-select: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  transform: translateY(-140%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-profile-menu {
  display: none;
}

.sidebar {
  inset: 16px auto 16px 16px;
  width: 264px;
  height: calc(100vh - 32px);
  padding: 22px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(20, 28, 40, 0.9);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.side-nav {
  gap: 4px;
  padding: 40px 0 0;
}

.menu-item,
.support-link {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #dce4ef;
  font-size: 15px;
  font-weight: 650;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.menu-item[aria-current="page"] {
  background: rgba(76, 141, 255, 0.14);
  color: #dbe9ff;
}

.menu-item[aria-current="page"] .side-icon {
  color: #7eaeff;
}

.side-bottom {
  gap: 8px;
}

.support-link {
  margin: 0;
  border: 0;
}

.student-card {
  width: 100%;
  min-height: 62px;
  margin: 0;
  padding: 8px 10px;
}

.student-card .account-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 16px;
}

.utility-page,
.profile-page {
  max-width: 1040px;
}

.utility-head,
.profile-hero {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-bottom: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(21, 29, 41, 0.86);
}

.utility-head h1,
.profile-hero h1 {
  margin: 2px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
}

.utility-head p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
}

.utility-icon {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  border-radius: 18px;
  background: rgba(76, 141, 255, 0.14);
  color: #9cc2ff;
}

.utility-icon .side-icon,
.utility-icon svg {
  width: 34px;
  height: 34px;
}

.empty-state,
.profile-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.empty-state h2,
.profile-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.empty-state p,
.profile-card p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.profile-hero-avatar {
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #1d2d43;
  color: #d7e7ff;
  font-size: 34px;
  font-weight: 800;
}

.profile-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(76, 141, 255, 0.14);
  color: #b9d4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.profile-card dl {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.profile-card dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.profile-card dt {
  color: var(--muted);
}

.profile-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.shell {
  width: auto;
  max-width: 1540px;
  margin-left: 296px;
  padding: 34px 32px 72px 0;
}

.gc-head h1 {
  margin-bottom: 22px;
  color: var(--text);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
}

.brand-hero {
  max-width: 1220px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: min(980px, calc(100vw - 592px));
}

.program-card {
  width: auto;
  aspect-ratio: 548 / 800;
  border-color: var(--line);
  border-radius: 16px;
  animation-duration: 0.42s;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.program-card:hover,
.program-card:active,
.program-card.is-pressed,
.module-cover:hover,
.module-cover:active,
.module-cover.is-pressed {
  border-color: var(--line-strong);
  transform: translateY(-6px) scale(1.015);
  box-shadow: none;
}

.program-card:active::after,
.program-card.is-pressed::after,
.module-cover:active::after,
.module-cover.is-pressed::after {
  left: 150%;
}

.course-layout {
  grid-template-columns: minmax(0, 980px) minmax(240px, 1fr);
  gap: 24px;
}

.module-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.module-cover {
  border: 1px solid var(--line);
  border-radius: 16px;
  animation-duration: 0.42s;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.module-cover:hover::before,
.module-cover:active::before,
.module-cover.is-pressed::before {
  background: rgba(76, 141, 255, 0.9);
  transform: none;
  box-shadow: none;
}

.bonus-actions {
  padding-top: 0;
}

.bonus-actions a,
.bonus-actions .bonus-action-disabled {
  min-height: 64px;
  padding: 0 20px;
  border: 1px solid rgba(126, 174, 255, 0.28);
  border-radius: 14px;
  background: rgba(40, 117, 244, 0.14);
  box-shadow: none;
  font-size: 16px;
}

.bonus-actions a:hover {
  background: rgba(40, 117, 244, 0.23);
  box-shadow: none;
}

.crumbs {
  gap: 10px 20px;
  margin: 2px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.stream-title {
  margin-bottom: 22px;
  font-size: clamp(24px, 2.5vw, 32px);
}

.lesson-stream {
  gap: 12px;
}

.lesson-row {
  grid-template-columns: 156px minmax(0, 1fr) 36px;
  gap: 20px;
  min-height: 128px;
  padding: 16px 18px 16px 14px;
  border: 1px solid rgba(172, 198, 234, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(268.93deg, rgba(20, 103, 238, 0) 50%, rgba(20, 103, 238, 0.1) 100%),
    rgba(39, 49, 66, 0.88);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.lesson-row:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(268.93deg, rgba(20, 103, 238, 0.02) 45%, rgba(20, 103, 238, 0.18) 100%),
    rgba(42, 54, 73, 0.94);
  transform: translateY(-1px);
}

.lesson-row.without-thumbnail {
  grid-template-columns: minmax(0, 1fr) 36px;
  padding-left: 26px;
}

.lesson-thumb {
  width: 156px;
  aspect-ratio: 13 / 8;
  height: auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.lesson-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-info {
  gap: 9px;
}

.lesson-info small {
  color: rgba(226, 233, 244, 0.62);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.lesson-info strong {
  max-width: 100%;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.lesson-state {
  width: 30px;
  height: 30px;
}

.lesson {
  max-width: 1120px;
}

.lesson h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.12;
}

.content-panel p {
  max-width: 860px;
  color: #e9eef6;
  font-weight: 400;
  line-height: 1.55;
}

.video-frame {
  border: 1px solid var(--line);
  border-radius: 16px;
}

.doc-link {
  min-height: 44px;
}

.attachment-card {
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.homework-panel {
  border-color: var(--line);
  background: var(--panel);
}

/* Contextual catalog editor. It is opt-in, so the student layout stays untouched. */

.catalog-card-shell,
.catalog-row-shell {
  position: relative;
  min-width: 0;
}

.catalog-card-shell > .program-card,
.catalog-card-shell > .module-cover,
.catalog-row-shell > .lesson-row {
  width: 100%;
}

.admin-mode-bar {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 45;
  display: flex;
  min-height: 0;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgba(21, 29, 41, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.impersonation-bar {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 8px 6px 14px;
  border-radius: 16px;
  background: #172538;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.3);
  color: #dfe9f5;
  font-size: 13px;
  transform: translateX(-50%);
}

.impersonation-bar form { margin: 0; }
.impersonation-bar button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #edf4ff;
  color: #101722;
  font: 800 12px/1 inherit;
  cursor: pointer;
}

.learning-user-admin-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  margin-left: auto;
}

.learning-user-admin-actions form { margin: 0; }

.admin-mode-toggle,
.admin-table-edit,
.admin-add-button,
.admin-icon-button {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.admin-mode-toggle {
  display: inline-flex;
  min-height: 48px;
  gap: 9px;
  align-items: center;
  padding: 0 17px;
  border-radius: 14px;
  background: rgba(76, 141, 255, 0.16);
  color: #dbe9ff;
  font-size: 12px;
  font-weight: 800;
}

.admin-mode-toggle[aria-pressed="true"] { background: #edf4ff; color: #101722; }
.admin-mode-toggle:disabled { cursor: not-allowed; opacity: 0.42; }

.admin-mode-toggle .side-icon,
.admin-mode-toggle .side-icon svg,
.admin-table-edit .side-icon,
.admin-table-edit .side-icon svg {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.admin-inline-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  display: none;
  grid-auto-flow: column;
  grid-template-columns: none;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(11, 17, 26, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.admin-editing .admin-inline-controls { display: grid; }
.admin-mini-form { display: contents; }

.admin-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-icon-button:hover,
.admin-icon-button:focus-visible { background: rgba(126, 174, 255, 0.18); }

.admin-mode-toggle:focus-visible,
.admin-table-edit:focus-visible {
  background: rgba(126, 174, 255, 0.24);
}

.admin-drag-handle {
  cursor: grab;
  touch-action: none;
}

.admin-drag-handle:active { cursor: grabbing; }

.admin-icon-button .side-icon,
.admin-icon-button .side-icon svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.admin-page-controls,
.admin-title-row { position: relative; }
.admin-page-controls { min-height: 0; }

.admin-page-controls .admin-inline-controls,
.admin-title-row .admin-inline-controls {
  position: static;
  width: max-content;
  margin: 0 0 16px;
  grid-template-columns: none;
}

.admin-title-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-add-button {
  display: none;
  min-height: 44px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  margin: 18px 0;
  padding: 0 16px;
  border: 1px dashed rgba(126, 174, 255, 0.42);
  border-radius: 12px;
  background: rgba(76, 141, 255, 0.08);
  color: #cfe1ff;
  font-weight: 750;
}

.admin-editing .admin-add-button { display: inline-flex; }

.admin-add-button .side-icon,
.admin-add-button .side-icon svg {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.admin-editing [data-catalog-status="draft"]::after,
.admin-editing [data-catalog-status="archived"]::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 18;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(12, 18, 28, 0.92);
  color: #cfe1ff;
  content: "Черновик";
  font-size: 10px;
  font-weight: 850;
}

.admin-editing [data-catalog-status="archived"]::after { color: #ffc8c8; content: "В архиве"; }

.admin-capable .program-grid > [data-catalog-status="archived"] { display: none; }

.admin-capable.admin-editing .program-grid > [data-catalog-status="archived"] {
  display: block;
  opacity: 0.76;
}

.archived-course-title {
  position: absolute;
  right: 14px;
  bottom: 44px;
  left: 14px;
  z-index: 17;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 200, 0.24);
  border-radius: 10px;
  background: rgba(11, 17, 26, 0.9);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-previewing [data-catalog-status="draft"],
.admin-previewing .admin-add-button,
.admin-previewing .admin-inline-controls,
.admin-previewing .admin-block-insert {
  display: none !important;
}

.admin-reorder-form { display: none; }

[data-sort-container] { position: relative; }

[data-sort-item].admin-drop-before::before,
[data-sort-container].admin-drop-at-end::after {
  z-index: 36;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #7eaeff;
  box-shadow: 0 0 0 3px rgba(126, 174, 255, 0.16);
  content: "";
  pointer-events: none;
}

[data-sort-item].admin-drop-before::before {
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
}

[data-sort-container].admin-drop-at-end::after {
  margin-top: 6px;
  grid-column: 1 / -1;
}

.admin-sort-dragging {
  opacity: 0.3;
}

body.admin-sorting {
  cursor: grabbing;
  user-select: none;
}

.catalog-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #111925;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.56);
}

.catalog-dialog::backdrop {
  background: rgba(2, 6, 12, 0.72);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.catalog-editor-form {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.catalog-dialog-head,
.catalog-dialog-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.catalog-dialog-head h2 { margin: 4px 0 0; font-size: 22px; }

.catalog-dialog-head .eyebrow {
  display: block;
  color: #8eb7ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-dialog-actions { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.catalog-dialog-actions .secondary { background: transparent; }
.catalog-dialog-actions .button,
.catalog-dialog-actions .button-link { min-height: 44px; }
.catalog-dialog-actions button:disabled { cursor: wait; opacity: 0.64; }

.catalog-form-grid {
  display: grid;
  gap: 16px;
  padding: 20px;
  overflow: auto;
}

.catalog-form-grid > label,
.catalog-form-grid fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #d7e0ec;
  font-size: 13px;
  font-weight: 750;
}

.catalog-form-grid [hidden] { display: none; }

.catalog-form-grid input,
.catalog-form-grid textarea,
.catalog-form-grid select {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #0b111a;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 450;
}

.catalog-form-grid textarea { min-height: 112px; resize: vertical; }

.catalog-form-grid fieldset {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.catalog-form-grid legend { padding: 0 6px; }
.check-field { display: flex; min-height: 40px; gap: 10px; align-items: center; }
.check-field input { width: 20px; min-height: 20px; margin: 0; }

.revision-card h2 { margin: 4px 0 0; font-size: 22px; }

.content-block-list {
  display: flow-root;
}

.content-block-shell {
  position: relative;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

.content-block-value {
  display: flow-root;
}

.admin-editing .content-block-shell {
  border-radius: 12px;
  outline: 1px solid transparent;
  outline-offset: 5px;
}

.admin-editing .content-block-shell:hover,
.admin-editing .content-block-shell:focus-within {
  outline-color: rgba(126, 174, 255, 0.46);
}

.content-block-shell > .admin-inline-controls {
  top: 4px;
  right: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.admin-editing .content-block-shell:hover > .admin-inline-controls,
.admin-editing .content-block-shell:focus-within > .admin-inline-controls,
.admin-sorting .content-block-shell > .admin-inline-controls {
  opacity: 1;
  pointer-events: auto;
}

.admin-block-insert {
  position: relative;
  display: none;
  width: 100%;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.admin-editing .admin-block-insert { display: block; }

.admin-block-insert::before {
  position: absolute;
  top: 9px;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(126, 174, 255, 0);
  content: "";
  transition: background-color 0.14s ease;
}

.admin-block-insert > span:first-child {
  position: absolute;
  top: 1px;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(126, 174, 255, 0);
  border-radius: 50%;
  background: #0b111a;
  color: #cfe1ff;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.14s ease, border-color 0.14s ease;
}

.admin-block-insert > span:first-child::before {
  content: "+";
  font-size: 14px;
  line-height: 1;
}

.admin-block-insert:hover::before,
.admin-block-insert:focus-visible::before { background: rgba(126, 174, 255, 0.62); }

.admin-block-insert:hover > span:first-child,
.admin-block-insert:focus-visible > span:first-child {
  border-color: rgba(126, 174, 255, 0.62);
  opacity: 1;
}

.content-action {
  display: flex;
  margin: 20px 0;
  justify-content: flex-start;
}

.content-action-center { justify-content: center; }
.content-action-right { justify-content: flex-end; }
.content-action-stretch .button-link { width: 100%; justify-content: center; }
.admin-empty { color: var(--muted); }
.table-card { overflow-x: auto; }
.admin-table-link { color: #cfe1ff; font-weight: 800; }

.admin-table-edit {
  display: inline-flex;
  min-height: 40px;
  gap: 7px;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(76, 141, 255, 0.12);
  color: #dbe9ff;
  font-weight: 750;
}

.admin-table-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-table-actions .admin-mini-form { margin: 0; }

.catalog-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(66, 184, 131, 0.12);
  color: #8ee0b7;
  font-size: 11px;
  font-weight: 850;
}

.catalog-status-draft { background: rgba(217, 154, 53, 0.12); color: #efc57d; }
.catalog-status-archived { background: rgba(223, 107, 107, 0.12); color: #f6aaaa; }

.revision-card {
  max-width: 920px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.revision-card ol { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }

.revision-card li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.revision-card li span,
.revision-card li small { color: var(--muted); }

.revision-card li span { display: grid; gap: 3px; }

.revision-restore {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: #dbe9ff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.save-notice {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 80;
  padding: 13px 16px;
  border: 1px solid rgba(142, 224, 183, 0.32);
  border-radius: 12px;
  background: #14251f;
  color: #b9efd1;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
  font-weight: 800;
}

@media (max-width: 1220px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .bonus-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) and (max-width: 1220px) {
  .program-grid {
    max-width: min(980px, calc(100vw - 328px));
  }
}

@media (max-width: 959px) {
  body {
    background-attachment: scroll;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .sidebar {
    display: none;
  }

  .mobile-menu-toggle {
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    z-index: 42;
    display: grid;
    width: 56px;
    height: 56px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: #111925;
    color: #f1f5fb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    cursor: pointer;
  }

  .mobile-menu-toggle[aria-expanded="true"] {
    border-color: rgba(126, 174, 255, 0.54);
    background: #182538;
  }

  .mobile-menu-toggle .side-icon,
  .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(3, 8, 15, 0.62);
    opacity: 0;
    transition: opacity 220ms ease;
  }

  .mobile-menu-backdrop.is-open {
    opacity: 1;
  }

  .mobile-menu-backdrop[hidden] {
    display: none;
  }

  .mobile-profile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 41;
    display: grid;
    width: min(360px, calc(100vw - 34px));
    height: 100dvh;
    gap: 10px;
    padding: max(18px, env(safe-area-inset-top, 0px)) 16px calc(88px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-right: 1px solid var(--line-strong);
    border-radius: 0 22px 22px 0;
    background: #151d29;
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.36);
    transform: translate3d(calc(-100% - 18px), 0, 0);
    visibility: hidden;
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 240ms;
  }

  .mobile-profile-menu.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition-delay: 0s;
  }

  .mobile-profile-menu[hidden] {
    display: none;
  }

  .mobile-menu-account {
    display: flex;
    min-width: 0;
    gap: 12px;
    align-items: center;
    padding: 4px 6px 10px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-menu-account .mobile-account-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    font-size: 18px;
  }

  .mobile-menu-account .mobile-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-menu-account strong {
    min-width: 0;
    overflow: hidden;
    color: #f1f5fb;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-navigation,
  .mobile-menu-utility {
    display: grid;
    gap: 4px;
  }

  .mobile-menu-utility {
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }

  .mobile-profile-menu .menu-item {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
    font-size: 14px;
  }

  .mobile-profile-menu .menu-item:hover,
  .mobile-profile-menu .menu-item:focus-visible,
  .mobile-profile-menu .menu-item[aria-current="page"] {
    background: rgba(255, 255, 255, 0.07);
    color: #f1f5fb;
  }

  .shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .gc-head h1 {
    margin-bottom: 18px;
    font-size: clamp(28px, 7vw, 36px);
  }

  .brand-hero {
    margin-bottom: 18px;
    border-radius: 14px;
  }

  .program-grid,
  .module-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .program-grid {
    max-width: none;
  }

  .module-cover::before {
    width: auto;
    min-width: 72px;
    height: 26px;
    margin-bottom: 0;
    padding: 0 10px;
    line-height: 26px;
  }

  .lesson-row {
    grid-template-columns: 104px minmax(0, 1fr) 28px;
    gap: 12px;
    min-height: 90px;
    padding: 12px;
  }

  .lesson-thumb {
    width: 104px;
  }

  .lesson-row.without-thumbnail {
    grid-template-columns: minmax(0, 1fr) 28px;
    padding-left: 16px;
  }

  .lesson-info strong {
    max-width: 100%;
    font-size: 14px;
  }

  .lesson-state {
    width: 24px;
    height: 24px;
  }

  .lesson-meta {
    margin-bottom: 24px;
  }

  .resource-list {
    justify-content: flex-start;
    margin: 24px 0;
  }

  .attachment-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    min-height: 76px;
    padding: 12px;
  }

  .attachment-icon {
    width: 44px;
    height: 44px;
  }

  .attachment-size {
    display: none;
  }

  .attachment-name {
    font-size: 16px;
  }

  .homework-panel {
    padding: 20px 16px;
  }

  .access-state-grid {
    grid-template-columns: 1fr;
  }

  .utility-head,
  .profile-hero {
    align-items: flex-start;
    padding: 20px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .admin-mode-bar {
    top: 8px;
    right: 10px;
    left: auto;
  }

  .admin-mode-toggle span:last-child {
    display: none;
  }

  .admin-mode-toggle {
    width: 44px;
    padding: 0;
    justify-content: center;
    min-height: 44px;
  }

  .admin-inline-controls {
    grid-template-columns: none;
  }

  .admin-icon-button {
    width: 44px;
    height: 44px;
  }

  .admin-page-controls .admin-inline-controls,
  .admin-title-row .admin-inline-controls {
    grid-template-columns: none;
  }

  .catalog-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .catalog-dialog-head,
  .catalog-dialog-actions,
  .catalog-form-grid {
    padding: 16px;
  }

  .admin-editing .content-block-shell > .admin-inline-controls {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-editing .admin-block-insert::before {
    background: rgba(126, 174, 255, 0.28);
  }

  .admin-editing .admin-block-insert > span:first-child {
    border-color: rgba(126, 174, 255, 0.45);
    opacity: 1;
  }

  .revision-card li {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .revision-card li form {
    grid-column: 2;
  }

  .revision-restore,
  .admin-table-edit {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .program-grid,
  .module-card-grid {
    gap: 10px;
  }

  .lesson-row {
    grid-template-columns: 88px minmax(0, 1fr) 22px;
    gap: 10px;
  }

  .lesson-thumb {
    width: 88px;
  }

  .lesson-row.without-thumbnail {
    grid-template-columns: minmax(0, 1fr) 22px;
  }

  .lesson-info small {
    font-size: 10px;
    line-height: 1.2;
  }

  .lesson-info strong {
    font-size: 13px;
  }

  .lesson-nav {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lesson-nav a:last-child {
    justify-items: start;
    text-align: left;
  }

  .bonus-actions {
    grid-template-columns: 1fr;
  }

  .access-state {
    min-height: 0;
    padding: 22px 18px;
  }

  .utility-head {
    gap: 14px;
  }

  .utility-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 14px;
  }

  .utility-icon .side-icon,
  .utility-icon svg {
    width: 26px;
    height: 26px;
  }

  .profile-hero-avatar {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    font-size: 26px;
  }

  .profile-card dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Homework is part of the lesson, with the same readable rhythm as source content. */
.homework-panel {
  display: grid;
  gap: 22px;
  max-width: 920px;
  margin-top: 44px;
  padding: 26px;
  border-radius: 18px;
  background: #111925;
}

.homework-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.homework-heading h2,
.homework-discussion h3 {
  margin: 0;
  color: #f2f6fc;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.3;
}

.homework-task {
  color: #e8edf5;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.58;
}

.homework-form,
.homework-comment-form,
.answer-review-comment {
  display: grid;
  gap: 16px;
}

.homework-field,
.homework-comment-form label,
.answer-review-comment label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #dfe6f1;
  font-size: 14px;
  font-weight: 600;
}

.homework-field textarea,
.homework-comment-form textarea,
.answer-review-comment textarea {
  min-height: 112px;
  margin: 0;
  border-color: #34435a;
  border-radius: 12px;
  background: #0b111a;
  color: #f1f5fa;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  resize: vertical;
}

.homework-field textarea:focus-visible,
.homework-comment-form textarea:focus-visible,
.answer-review-comment textarea:focus-visible {
  border-color: #7eaeff;
  outline: 0;
  box-shadow: none;
}

.homework-field input[type="file"] {
  padding: 12px;
  border: 1px dashed #3c4b61;
  border-radius: 12px;
  background: #0b111a;
  color: #aeb9ca;
  font: inherit;
}

.homework-upload {
  display: grid;
  gap: 8px;
}

.homework-upload-hint {
  color: #8f9db0;
  font-size: 12px;
  font-weight: 400;
}

.homework-upload-list {
  display: grid;
  gap: 8px;
}

.homework-upload-list:empty {
  display: none;
}

.homework-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 10px 8px 12px;
  border: 1px solid #34435a;
  border-radius: 10px;
  background: #151f2e;
}

.homework-upload-name {
  min-width: 0;
  overflow: hidden;
  color: #dfe8f5;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homework-upload-status {
  color: #9eacc0;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.homework-upload-item.is-complete .homework-upload-status {
  color: #9eebca;
}

.homework-upload-item.has-error .homework-upload-status {
  color: #ffb0ba;
}

.homework-upload-remove {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aeb9ca;
  cursor: pointer;
  font: 400 24px/1 system-ui, sans-serif;
}

.homework-upload-remove:hover,
.homework-upload-remove:focus-visible {
  background: #233147;
  box-shadow: none;
  color: #fff;
}

.homework-upload-progress {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #263348;
}

.homework-upload-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #7eaeff;
  transition: width 120ms linear;
}

.homework-upload-item.is-complete .homework-upload-progress > span {
  background: #50c998;
}

.homework-form[aria-busy="true"] .homework-actions button {
  cursor: wait;
  opacity: 0.62;
}

.homework-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  color: #dfe6f1;
  font-weight: 500;
}

.homework-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 1px 0 0;
}

.required-mark {
  color: #ff8d8d;
}

.homework-actions,
.answer-review-actions,
.admin-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.homework-actions .button,
.homework-comment-form .button,
.answer-review-comment .button {
  min-height: 44px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.button-secondary {
  border: 1px solid #34435a;
  background: #182333;
  color: #e6edf7;
}

.button:focus-visible {
  background: #dbe8f7;
}

.button-secondary:focus-visible {
  background: #20314a;
}

.homework-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #42516a;
  border-radius: 999px;
  background: #1a2637;
  color: #cbd6e6;
  font-size: 12px;
  font-weight: 650;
}

.homework-status-accepted { border-color: #2c7258; background: #12352a; color: #9eebca; }
.homework-status-revision { border-color: #826b2f; background: #382f16; color: #ffe19a; }
.homework-status-rejected { border-color: #80404a; background: #371c22; color: #ffb0ba; }
.homework-status-submitted { border-color: #4269a1; background: #172b48; color: #b7d4ff; }

.homework-files {
  display: grid;
  gap: 8px;
}

.homework-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  min-width: 0;
}

.homework-file {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
  min-height: 42px;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #34435a;
  border-radius: 10px;
  background: #151f2e;
  color: #aecaee;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.homework-file:hover,
.homework-file:focus-visible {
  border-color: #5274a3;
  background: #1a283b;
  box-shadow: none;
}

.homework-file-download {
  display: grid;
  width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid #34435a;
  border-radius: 10px;
  background: #151f2e;
  color: #aecaee;
}

.homework-file-download:hover,
.homework-file-download:focus-visible {
  border-color: #5274a3;
  background: #1a283b;
  color: #edf5ff;
}

.homework-file-download .side-icon {
  width: 22px;
  height: 22px;
}

.homework-file > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.homework-file-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #243248 no-repeat center / 18px 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23b8c7db' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E");
}

.homework-file-preview {
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 8px;
}

.homework-file-preview img {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  background: #0a111b;
  object-fit: contain;
}

.homework-preview-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  height: min(820px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #0d1521;
  color: #eef3fa;
  box-shadow: 0 24px 80px rgb(0 0 0 / 55%);
}

.homework-preview-dialog::backdrop {
  background: rgb(3 7 13 / 72%);
}

.homework-preview-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.homework-preview-dialog header,
.homework-preview-dialog footer {
  display: grid;
  min-height: 72px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #29364a;
}

.homework-preview-dialog header { grid-template-columns: minmax(0, 1fr) 52px; }

.homework-preview-dialog footer {
  grid-template-columns: minmax(0, 1fr) auto;
  border-top: 1px solid #29364a;
  border-bottom: 0;
}

.homework-preview-counter {
  margin-right: auto;
  color: #9aaabd;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.homework-preview-dialog h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 650;
}

.homework-preview-dialog header button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #34435a;
  border-radius: 11px;
  background: #172233;
  color: #e6edf7;
  cursor: pointer;
  justify-self: center;
  line-height: 0;
}

.homework-preview-dialog header button:focus-visible {
  outline: 0;
  border-color: #6484ad;
  background: #20314a;
  box-shadow: none;
}

.homework-preview-dialog header button .side-icon {
  width: 22px;
  height: 22px;
}

.homework-preview-dialog header button .side-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.homework-preview-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: auto;
  background: #080d14;
}

.homework-preview-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  background: #080d14;
}

.homework-preview-nav {
  z-index: 2;
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 64px;
  align-self: center;
  place-items: center;
  margin: 8px;
  border: 1px solid #3b4b63;
  border-radius: 14px;
  background: #172233;
  color: #edf5ff;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.homework-preview-nav:hover,
.homework-preview-nav:focus-visible {
  border-color: #6c8fbd;
  background: #20314a;
}

.homework-preview-nav:focus-visible {
  outline: 0;
  box-shadow: none;
}

.homework-preview-nav:active {
  transform: scale(.96);
}

.homework-preview-nav[hidden] {
  display: none;
}

.homework-preview-nav .side-icon {
  width: 26px;
  height: 26px;
}

.homework-preview-body [hidden] {
  display: none !important;
}

.homework-preview-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.homework-preview-body iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}

@media (max-width: 640px) {
  .homework-preview-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    border-radius: 14px;
  }

  .homework-preview-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .homework-preview-body {
    grid-column: 1;
    grid-row: 1;
  }

  .homework-preview-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    min-width: 44px;
    height: 56px;
    margin: 0 8px;
    transform: translateY(-50%);
    background: rgb(23 34 51 / 94%);
  }

  .homework-preview-nav:active {
    transform: translateY(-50%) scale(.96);
  }

  .homework-preview-previous { left: 0; }
  .homework-preview-next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .homework-preview-nav { transition: none; }
}

.notification-list {
  display: grid;
  gap: 10px;
}

.menu-item-label {
  min-width: 0;
}

.menu-unread {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: #82b6ff;
  color: #08111e;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.learning-users-head {
  margin-bottom: 22px;
}

.learning-user-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #26364b;
  border-radius: 18px;
  background: #111a27;
}

.learning-user-search label {
  flex: 1;
}

.learning-user-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #344760;
  border-radius: 13px;
  outline: 0;
  background: #09111c;
  color: #edf5ff;
  font: inherit;
}

.learning-user-search input:focus-visible {
  border-color: #82b6ff;
  box-shadow: none;
}

.learning-user-search > a {
  min-height: 44px;
  padding: 12px 14px;
  color: #afc2d8;
  text-decoration: none;
}

.learning-user-summary {
  margin: 16px 2px 10px;
  color: #8fa1b7;
  font-size: 14px;
}

.learning-user-list {
  display: grid;
  gap: 8px;
}

.learning-order-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px) minmax(170px, 220px) auto auto;
  align-items: end;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #111a27;
}

.learning-order-filters > label {
  display: grid;
  gap: 7px;
  color: #afc2d8;
  font-size: 13px;
  font-weight: 700;
}

.learning-order-filters input,
.learning-order-filters select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  outline: 0;
  background: #09111c;
  color: #edf5ff;
  font: inherit;
}

.learning-order-filters > a {
  min-height: 44px;
  padding: 12px 10px;
  color: #afc2d8;
  text-decoration: none;
}

.learning-order-list { display: grid; gap: 8px; }

.learning-order-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(200px, 1fr) minmax(130px, .65fr) minmax(140px, .7fr) 20px;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #111a27;
  color: #edf5ff;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.learning-order-row:hover,
.learning-order-row:focus-visible {
  outline: 0;
  background: #152235;
  transform: translateY(-1px);
}

.learning-order-row > span { display: grid; min-width: 0; gap: 5px; }
.learning-order-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learning-order-row small {
  overflow: hidden;
  color: #8fa1b7;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-order-detail,
.learning-order-attribution {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.learning-order-detail { margin-top: 18px; }
.learning-order-detail > div,
.learning-order-attribution > div {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border-radius: 15px;
  background: #111a27;
}

.learning-order-detail small,
.learning-order-attribution small { color: #8fa1b7; }
.learning-order-attribution strong { overflow-wrap: anywhere; }
.learning-order-section { margin-top: 20px; padding: 20px; border-radius: 18px; background: #111a27; }
.learning-order-section header h2 { margin: 0 0 14px; }
.learning-order-user { display: grid; gap: 4px; color: #edf5ff; text-decoration: none; }
.learning-order-user span { color: #9fb2c9; }

.learning-user-row {
  display: grid;
  min-height: 88px;
  grid-template-columns: 50px minmax(220px, 1fr) auto minmax(170px, auto) 24px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #243449;
  border-radius: 16px;
  background: #111a27;
  color: #edf5ff;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.learning-user-row:hover,
.learning-user-row:focus-visible {
  border-color: #4f6f99;
  outline: 0;
  background: #152235;
  transform: translateY(-1px);
}

.learning-user-avatar {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid #405777;
  border-radius: 16px;
  background: #1a2a40;
  color: #cfe3ff;
  font-size: 20px;
  font-weight: 750;
}

.learning-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.learning-user-identity,
.learning-user-activity,
.learning-record > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.learning-user-identity strong,
.learning-user-identity small,
.learning-user-activity b,
.learning-record strong,
.learning-record small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-user-identity small,
.learning-user-activity small,
.learning-user-metrics small,
.learning-record small {
  color: #8fa1b7;
  font-size: 12px;
}

.learning-user-metrics {
  display: flex;
  gap: 18px;
}

.learning-user-metrics > span {
  display: grid;
  min-width: 54px;
  gap: 2px;
  text-align: center;
}

.learning-user-metrics b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.learning-user-activity {
  text-align: right;
}

.learning-user-activity b {
  font-size: 13px;
}

.learning-user-open {
  color: #82b6ff;
  font-size: 28px;
  line-height: 1;
}

.learning-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  color: #8fa1b7;
  text-align: center;
}

.learning-pagination a {
  min-height: 44px;
  padding: 12px;
  border: 1px solid #344760;
  border-radius: 12px;
  color: #d7e8fb;
  text-decoration: none;
}

.learning-pagination a:first-child { justify-self: start; }
.learning-pagination a:last-child { justify-self: end; }

.simple-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: #8fa1b7;
  font-size: 14px;
}

.simple-breadcrumbs a { color: #b9d7ff; }

.learning-user-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid #2a3a50;
  border-radius: 20px;
  background: #111a27;
}

.learning-user-profile h1,
.learning-user-profile p {
  margin: 0;
}

.learning-user-profile h1 {
  margin-bottom: 6px;
  font-size: clamp(26px, 3vw, 40px);
}

.learning-user-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 28px;
}

.learning-status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #405777;
  border-radius: 999px;
  background: #16253a;
  color: #cfe3ff;
  font-size: 12px;
  line-height: 1;
}

.learning-status-active,
.learning-status-paid,
.learning-status-completed {
  border-color: #326b5b;
  background: #102c27;
  color: #93e3c9;
}

.learning-status-expired,
.learning-status-cancelled,
.learning-status-blocked {
  border-color: #71434b;
  background: #321a20;
  color: #f1afb9;
}

.learning-user-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 20px;
}

.learning-user-facts > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #243449;
  border-radius: 14px;
  background: #0f1723;
}

.learning-user-facts small { color: #8fa1b7; }

.learning-user-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.learning-user-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid #26364b;
  border-radius: 18px;
  background: #111a27;
}

.learning-user-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.learning-user-section h2 { margin: 0; font-size: 20px; }
.learning-user-section > header > span { color: #8fa1b7; font-variant-numeric: tabular-nums; }

.learning-email-section {
  grid-column: 1 / -1;
}

.learning-email-section > header > div {
  display: grid;
  gap: 4px;
}

.learning-email-section > header p {
  margin: 0;
  color: #8fa1b7;
  font-size: 13px;
}

.learning-email-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.learning-email-filter label {
  width: min(280px, 100%);
}

.learning-email-filter select,
.learning-email-filter .custom-select-trigger {
  min-height: 44px;
}

.learning-email-filter > a,
.learning-email-pagination a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #9fc1ff;
  text-decoration: none;
}

.learning-email-list {
  display: grid;
  gap: 10px;
}

.learning-email-item {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid #26364b;
  border-radius: 15px;
  background: #0d1622;
}

.learning-email-item > header,
.learning-email-item > footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.learning-email-item > header > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.learning-email-item strong,
.learning-email-item small,
.learning-email-item footer span {
  overflow-wrap: anywhere;
}

.learning-email-item small,
.learning-email-item footer {
  color: #8fa1b7;
  font-size: 13px;
}

.learning-email-item > p {
  margin: 0;
  color: #c9d5e4;
  line-height: 1.5;
}

.learning-email-item > footer {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.learning-email-error { color: #f1afb9; }

.email-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #405777;
  border-radius: 999px;
  background: #16253a;
  color: #cfe3ff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.email-status-delivered,
.email-status-opened,
.email-status-clicked {
  border-color: #326b5b;
  background: #102c27;
  color: #93e3c9;
}

.email-status-failed,
.email-status-bounced,
.email-status-suppressed,
.email-status-complained {
  border-color: #71434b;
  background: #321a20;
  color: #f1afb9;
}

.email-status-delayed {
  border-color: #725f2f;
  background: #2d2615;
  color: #f1d890;
}

.learning-email-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  color: #8fa1b7;
}

.learning-record-list,
.learning-homework-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.learning-record,
.learning-homework-link {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #26364b;
  border-radius: 13px;
  background: #0d1622;
}

.learning-record > span:last-child { justify-items: end; }
.learning-record-empty { padding: 18px 2px; color: #8fa1b7; }

.learning-homework-link {
  color: #edf5ff;
  text-decoration: none;
}

.learning-homework-link > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.learning-homework-link small { color: #8fa1b7; }

@media (max-width: 1100px) {
  .learning-user-row { grid-template-columns: 50px minmax(0, 1fr) auto 24px; }
  .learning-user-activity { display: none; }
  .learning-order-filters { grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 200px)); }
  .learning-order-filters > button,
  .learning-order-filters > a { grid-row: 2; }
  .learning-order-row { grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) minmax(120px, .7fr) 20px; }
  .learning-order-row > span:nth-child(3) { display: none; }
}

@media (max-width: 760px) {
  .impersonation-bar {
    top: 8px;
    width: calc(100vw - 16px);
    justify-content: space-between;
    padding-left: 12px;
  }

  .impersonation-bar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .learning-user-admin-actions {
    width: 100%;
    justify-items: start;
    margin-left: 0;
  }
  .learning-order-filters { grid-template-columns: 1fr; padding: 10px; }
  .learning-order-filters > button,
  .learning-order-filters > a { grid-row: auto; }
  .learning-order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .learning-order-row > span:nth-child(2),
  .learning-order-row > span:nth-child(3) { display: none; }
  .learning-order-row > span:nth-child(4) { justify-items: end; }
  .learning-order-row .learning-user-open { display: none; }
  .learning-order-detail,
  .learning-order-attribution { grid-template-columns: 1fr; }
  .learning-user-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px; }
  .learning-user-search > a { grid-column: 1 / -1; padding: 8px 4px; }
  .learning-user-row { grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 10px; padding: 12px; }
  .learning-user-avatar { width: 44px; height: 44px; border-radius: 14px; }
  .learning-user-metrics { grid-column: 2 / -1; justify-content: flex-start; gap: 14px; }
  .learning-user-open { grid-column: 3; grid-row: 1; }
  .learning-user-profile { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .learning-user-profile > .learning-status { grid-column: 1 / -1; }
  .learning-user-avatar-large { width: 58px; height: 58px; border-radius: 18px; }
  .learning-user-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-user-sections { grid-template-columns: minmax(0, 1fr); }
  .learning-record { align-items: flex-start; }
  .learning-email-filter { align-items: stretch; flex-wrap: wrap; }
  .learning-email-filter label { width: 100%; }
  .learning-email-item > header { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .learning-user-row { transition: none; }
}

.notification-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid #29374b;
  border-radius: 15px;
  background: #101823;
  color: #dce5f1;
  text-decoration: none;
}

.notification-card:hover,
.notification-card:focus-visible {
  border-color: #5274a3;
  background: #152238;
}

.notification-card-unread {
  border-color: #4775ad;
  background: #13233a;
}

.notification-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #1d3150;
  color: #9ec6ff;
}

.notification-card-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.notification-card-copy strong {
  overflow-wrap: anywhere;
  color: #f2f6fb;
  font-size: 16px;
  font-weight: 650;
}

.notification-card-copy span,
.notification-card-copy small {
  overflow-wrap: anywhere;
  color: #aab7c8;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.notification-card-copy small {
  color: #7f8da0;
  font-size: 12px;
}

.homework-discussion {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #29364a;
}

.homework-message {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #2b394d;
  border-radius: 14px;
  background: #0c131e;
}

.homework-message-curator,
.homework-message-admin { margin-left: min(8%, 54px); border-color: #345f89; background: #11243a; }
.homework-message-student { margin-right: min(8%, 54px); }
.homework-message header { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.homework-message header strong { color: #eef3fa; font-size: 14px; }
.homework-message header span { color: #8f9daf; font-size: 11px; }
.homework-message p { margin: 0; overflow-wrap: anywhere; color: #dce4ef; font-size: 15px; font-weight: 400; line-height: 1.5; }

.answer-filters {
  min-width: 0;
  margin-bottom: 24px;
}

.answer-filter-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) minmax(180px, 1fr) minmax(220px, 1.25fr) minmax(150px, 0.75fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #29374b;
  border-radius: 16px;
  background: #101823;
}

.answer-filter-form label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #96a5b8;
  font-size: 12px;
  font-weight: 650;
}

.answer-filter-form select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid #34465f;
  border-radius: 11px;
  background-color: #0b121c;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8b5c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  color: #eef3fa;
  font: inherit;
  font-size: 14px;
}

.answer-filter-form select:focus-visible {
  outline: none;
  border-color: #607b9f;
  box-shadow: none;
}

.answer-filter-form select:disabled {
  color: #6f7d90;
  cursor: not-allowed;
}

.answer-filter-form .button {
  min-height: 44px;
  padding-inline: 18px;
}

.answer-filters a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid #303f55;
  border-radius: 999px;
  background: #131d2a;
  color: #b8c3d3;
  font-size: 13px;
}

.answer-filter-summary {
  margin: -10px 0 16px;
  color: #8f9caf;
  font-size: 13px;
}

.answers-load-more {
  width: min(320px, 100%);
  margin: 8px auto 0;
  text-align: center;
}

.answers-load-more[aria-busy="true"] {
  cursor: wait;
  opacity: 0.68;
  pointer-events: none;
}

.answer-filters a[aria-current="page"] { border-color: #628dcc; background: #1d3556; color: #edf5ff; }
.answers-feed { display: grid; min-width: 0; gap: 18px; }
.answer-card { display: grid; min-width: 0; max-width: 100%; gap: 20px; padding: 22px; border: 1px solid #29374b; border-radius: 18px; background: #101823; }
.answer-card > *,
.homework-discussion,
.homework-message,
.homework-message > *,
.answer-review-comment,
.answer-review-comment label,
.answer-review-actions {
  min-width: 0;
  max-width: 100%;
}
.answer-card-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; }
.answer-card-head > div,
.answer-values,
.answer-values > div { min-width: 0; }
.answer-card-head p { margin: 0 0 5px; color: #8392a6; font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.answer-card-head h2 { margin: 0 0 5px; font-size: 20px; }
.answer-card-head a { color: #8dbbff; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.answer-values { display: grid; gap: 12px; margin: 0; }
.answer-values > div { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: #0b121c; }
.answer-values dt { color: #8f9caf; font-size: 12px; font-weight: 650; }
.answer-values dd { margin: 0; overflow-wrap: anywhere; color: #e2e8f1; font-size: 15px; font-weight: 400; line-height: 1.5; }
.answer-review-actions button { min-height: 40px; padding: 0 14px; border: 1px solid #405069; border-radius: 10px; background: #182333; color: #dce4ef; cursor: pointer; font: inherit; font-size: 13px; font-weight: 650; }
.answer-review-actions .accept { border-color: #39785f; background: #16412f; color: #a6eccb; }

@media (max-width: 520px) {
  .homework-panel,
  .answer-card { padding: 18px 14px; }
  .homework-actions { display: grid; }
  .homework-actions .button { width: 100%; }
  .answer-card-head { display: grid; }
  .homework-message-curator,
  .homework-message-admin { margin-left: 18px; }
  .homework-message-student { margin-right: 18px; }
}

@media (max-width: 959px) {
  .answer-filter-form {
    grid-template-columns: 1fr;
  }

  .answer-filter-form .button,
  .answer-filter-form a {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* GetCourse lesson parity: compact type, source order and stable editor geometry. */

@media (min-width: 960px) {
  .shell {
    padding-top: 16px;
  }
}

.lesson h1 {
  max-width: 920px;
  font-size: clamp(28px, 2.35vw, 32px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lesson-meta {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.content-panel p {
  max-width: 75ch;
  margin: 0 0 20px;
  color: #e9eef6;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.58;
}

.video-frame {
  margin: 20px 0 24px;
  border: 0;
  border-radius: 14px;
}

.content-action {
  margin: 12px 0;
}

.content-action .button-link {
  min-width: min(100%, 320px);
  max-width: min(100%, 560px);
  min-height: 52px;
  justify-content: center;
  padding: 0 28px;
  border: 1px solid rgba(126, 174, 255, 0.42);
  border-radius: 13px;
  background: linear-gradient(180deg, #247ff4 0%, #1267d9 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.content-action .button-link:hover,
.content-action .button-link:focus-visible {
  border-color: rgba(178, 207, 255, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.content-action-stretch .button-link {
  max-width: none;
}

.attachments {
  gap: 10px;
  margin: 16px 0 0;
}

.attachment-card {
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  gap: 14px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.attachment-card:hover,
.attachment-card:focus-visible {
  border-color: rgba(126, 174, 255, 0.46);
  background: rgba(126, 174, 255, 0.09);
}

.attachment-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.attachment-icon::before {
  width: 25px;
  height: 25px;
}

.attachment-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attachment-size {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.attachment-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.attachment-open {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #aebbd0;
  transform: rotate(180deg);
}

.attachment-open .side-icon,
.attachment-open svg {
  width: 20px;
  height: 20px;
}

.lesson-nav {
  position: fixed;
  right: 32px;
  bottom: 16px;
  left: 296px;
  z-index: 25;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  max-width: 1540px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.lesson-nav a {
  display: flex;
  min-width: 0;
  min-height: 64px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  isolation: isolate;
  background: #111925;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  opacity: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  color: #d8e0ec;
  pointer-events: auto;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.lesson-nav a:hover,
.lesson-nav a:focus-visible {
  border-color: rgba(126, 174, 255, 0.42);
  background: #182538;
}

.lesson-nav-next {
  justify-content: flex-end;
  text-align: right;
}

.lesson-nav-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.lesson-nav strong {
  color: #f1f5fb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.lesson-nav-copy > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 10px;
  background: rgba(126, 174, 255, 0.08);
  color: #aecaee;
}

.lesson-nav-icon .side-icon,
.lesson-nav-icon svg {
  width: 18px;
  height: 18px;
}

.lesson-nav-next .lesson-nav-icon {
  transform: rotate(180deg);
}

.lesson {
  padding-bottom: 96px;
}

.admin-sort-dragging {
  z-index: 34;
  opacity: 0.72;
  outline: 2px solid rgba(126, 174, 255, 0.82);
  outline-offset: 3px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body.admin-sorting [data-sort-item] {
  transition: none !important;
}

@media (max-width: 959px) {
  .lesson {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .lesson-nav {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 76px;
  }

  .content-panel p {
    max-width: none;
    font-size: 16px;
    line-height: 1.56;
  }

  .content-action .button-link {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .lesson h1 {
    font-size: 27px;
  }

  .lesson-nav {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 76px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .lesson-nav > span:empty {
    display: block;
  }

  .lesson-nav a {
    min-height: 54px;
    gap: 7px;
    padding: 8px 10px;
    background: #111925;
  }

  .lesson-nav-next {
    text-align: right;
  }

  .lesson-nav-next .lesson-nav-copy {
    order: 1;
  }

  .lesson-nav-next .lesson-nav-icon {
    order: 2;
  }

  .lesson-nav-copy > span {
    display: none;
  }

  .lesson-nav-desktop-label {
    display: none;
  }

  .lesson-nav-mobile-label {
    display: inline;
  }

  .attachment-card {
    grid-template-columns: 46px minmax(0, 1fr) 44px;
    padding: 10px 12px;
  }

  .attachment-size {
    display: block;
  }

  .attachment-name {
    font-size: 15px;
  }
}

/* Native users, products, offers and course access. */
.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select > .custom-select-native {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select-trigger {
  position: relative;
  width: 100%;
  min-height: 46px;
  padding: 10px 42px 10px 13px;
  overflow: hidden;
  border: 1px solid #364960;
  border-radius: 12px;
  background: #09111c;
  color: #edf5ff;
  cursor: pointer;
  font: inherit;
  font-weight: 450;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-trigger::after {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #9fb1c7;
  border-bottom: 2px solid #9fb1c7;
  content: "";
  transform: translateY(-70%) rotate(45deg);
  transition: transform 160ms ease;
}

.custom-select.is-open .custom-select-trigger {
  border-color: #82b6ff;
  box-shadow: none;
}

.custom-select-trigger:focus-visible {
  border-color: #82b6ff;
  box-shadow: none;
}

.custom-select.is-open .custom-select-trigger::after {
  transform: translateY(-30%) rotate(225deg);
}

.custom-select-trigger:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.custom-select-trigger[aria-invalid="true"] {
  border-color: #a65762;
}

.custom-select-list {
  position: fixed;
  z-index: 2200;
  display: grid;
  gap: 3px;
  padding: 6px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #425771;
  border-radius: 13px;
  background: #101a28;
  box-shadow: 0 20px 54px rgb(0 0 0 / 48%);
}

.custom-select-list[hidden] { display: none; }

.custom-select-option {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #dce7f5;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: 0;
  background: #1b2b40;
  box-shadow: none;
}

.custom-select-option[aria-selected="true"] {
  background: #203a5d;
  color: #fff;
  font-weight: 700;
}

.custom-select-option:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.date-time-control {
  position: relative;
  display: block;
  min-width: 0;
}

.date-time-control > input {
  width: 100%;
}

.date-time-placeholder {
  position: absolute;
  top: 50%;
  right: 48px;
  left: 13px;
  overflow: hidden;
  color: #8fa1b6;
  font-size: 14px;
  font-weight: 450;
  line-height: 1;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.date-time-control:not(.is-empty) .date-time-placeholder,
.date-time-control.is-editing .date-time-placeholder {
  display: none;
}

.date-time-control.is-empty:not(.is-editing) > input,
.date-time-control.is-empty:not(.is-editing) > input::-webkit-datetime-edit {
  color: transparent;
}

.catalog-form-grid label > small,
.management-form-grid label > small,
.offer-form label > small,
.user-access-control label > small {
  color: #8fa1b6;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.4;
}

.catalog-scheduled :is(.program-card, .module-cover) {
  cursor: default;
  filter: saturate(.72);
}

.catalog-scheduled :is(.program-card, .module-cover):hover {
  transform: none;
}

.catalog-schedule-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  padding: 9px 10px;
  border: 1px solid rgb(239 205 116 / 42%);
  border-radius: 10px;
  background: rgb(31 28 18 / 94%);
  color: #f3d990;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.admin-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-section-head > div,
.compact-page-head {
  min-width: 0;
}

.compact-page-head {
  max-width: 880px;
  margin-bottom: 20px;
}

.has-active-access b { color: #86ddc0; }
.no-active-access b { color: #8799af; }

.management-form,
.user-access-control,
.password-management,
.offers-admin-section {
  border: 1px solid #293a50;
  border-radius: 18px;
  background: #111a27;
}

.management-form {
  display: grid;
  gap: 22px;
  padding: 22px;
}

.management-form-grid,
.offer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.management-form label,
.offer-form label,
.user-access-control label,
.password-management label {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: #dbe5f2;
  font-size: 14px;
  font-weight: 650;
}

.management-form label > small,
.offer-form label > small,
.user-access-control form > small {
  color: #8fa1b7;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.45;
}

.management-form input,
.management-form select,
.management-form textarea,
.offer-form input,
.offer-form select,
.offer-form textarea,
.user-access-control input,
.user-access-control select,
.password-management input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #364960;
  border-radius: 12px;
  outline: 0;
  background: #09111c;
  color: #edf5ff;
  font: inherit;
  font-weight: 450;
}

.management-form textarea,
.offer-form textarea {
  min-height: 88px;
  resize: vertical;
}

.management-form :is(input, select, textarea):focus-visible,
.offer-form :is(input, select, textarea):focus-visible,
.user-access-control :is(input, select):focus-visible,
.password-management input:focus-visible {
  border-color: #82b6ff;
  box-shadow: none;
}

.form-span-2 { grid-column: 1 / -1; }

.management-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.management-form-actions > a {
  min-height: 44px;
  padding: 12px;
  color: #aebed2;
  text-decoration: none;
}

.management-form button:disabled,
.user-access-control button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.product-course-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.product-course-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: #f0f5fb;
  font-size: 17px;
  font-weight: 700;
}

.product-course-option {
  display: grid !important;
  min-height: 72px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px !important;
  padding: 13px;
  border: 1px solid #2d4058;
  border-radius: 13px;
  background: #0c1521;
  cursor: pointer;
}

.product-course-option:has(input:checked) {
  border-color: #557aa8;
  background: #13243a;
}

.product-course-option input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #82b6ff;
}

.product-course-option > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.product-course-option strong,
.product-course-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-course-option small { color: #8fa1b7; font-size: 12px; font-weight: 450; }

.product-admin-list,
.offers-admin-list {
  display: grid;
  gap: 10px;
}

.product-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 20px;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 16px 18px;
  border: 1px solid #293a50;
  border-radius: 16px;
  background: #111a27;
  color: #edf5ff;
  text-decoration: none;
}

.product-admin-card:hover,
.product-admin-card:focus-visible {
  border-color: #55779f;
  outline: 0;
  background: #152235;
}

.product-admin-card > span:first-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.product-admin-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.product-admin-card small { color: #8fa1b7; font-size: 12px; }

.product-admin-counts {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 8px;
}

.product-admin-counts b { text-align: right; font-variant-numeric: tabular-nums; }

.source-lock-note {
  padding: 13px 14px;
  border: 1px solid #40526a;
  border-radius: 12px;
  background: #172232;
  color: #b8c7d9;
  font-size: 14px;
  line-height: 1.5;
}

.offers-admin-section {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
}

.offers-admin-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.offers-admin-section h2,
.offers-admin-section p { margin: 0; }
.offers-admin-section > header > span { color: #8fa1b7; font-variant-numeric: tabular-nums; }

.offer-admin-card {
  overflow: hidden;
  border: 1px solid #2c3e55;
  border-radius: 14px;
  background: #0d1622;
}

.offer-admin-card > summary {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.offer-admin-card > summary::-webkit-details-marker { display: none; }
.offer-admin-card > summary > span { display: grid; min-width: 0; gap: 4px; }
.offer-admin-card > summary small { color: #8fa1b7; font-size: 12px; }
.offer-admin-card[open] > summary { border-bottom: 1px solid #2c3e55; }
.offer-admin-new > summary { color: #cfe3ff; font-weight: 700; }
.offer-form { padding: 16px; }
.offer-form > button { justify-self: start; }
.offer-admin-editor { display: grid; }
.offer-admin-editor > [hidden],
.offer-form > [hidden] { display: none; }

.offer-delete-form,
.management-delete {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.management-delete {
  margin-top: 12px;
  padding: 0;
}

.danger-button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #75444c;
  border-radius: 11px;
  background: #2b181e;
  color: #f0b2bb;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: #a75b67;
  background: #3a1c24;
}

input[type="datetime-local"] { color-scheme: dark; }

.user-access-control {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(420px, 1.25fr);
  gap: 22px;
  margin-bottom: 14px;
  padding: 20px;
}

.user-access-control h2,
.user-access-control p { margin: 0; }
.user-access-control > div { display: grid; align-content: start; gap: 7px; }
.user-access-control > div > p:last-child { color: #9babc0; line-height: 1.5; }

.user-access-control form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.user-access-control form > label:first-of-type,
.user-access-control form > small { grid-column: 1 / -1; }
.user-access-control form > button { align-self: end; }

.password-management {
  margin-bottom: 14px;
}

.password-management > summary {
  padding: 15px 18px;
  color: #cfe3ff;
  cursor: pointer;
  font-weight: 650;
}

.password-management > form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 18px 18px;
}

.access-overview { grid-column: 1 / -1; }
.access-record-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.access-record {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid #293a50;
  border-radius: 13px;
  background: #0d1622;
}

.access-record-course,
.access-record-actions { display: grid; min-width: 0; gap: 4px; }
.access-record-course small { overflow-wrap: anywhere; white-space: normal; }
.access-record-actions { justify-items: end; }

.access-revoke {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #70424a;
  border-radius: 10px;
  background: #2c1920;
  color: #efb1ba;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.learning-status-scheduled { border-color: #6a5d32; background: #2f2917; color: #f2d690; }
.learning-status-revoked,
.learning-status-unmapped,
.learning-status-inactive { border-color: #67434b; background: #2d1c22; color: #eab1ba; }

.widgets-admin-section {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #27374a;
  border-radius: 22px;
  background: #101923;
}

.widgets-admin-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.widgets-admin-section h2,
.widgets-admin-section p { margin: 0; }
.widgets-admin-section > header > span { color: #8fa1b7; font-variant-numeric: tabular-nums; }
.widgets-admin-list { display: grid; gap: 12px; }

.widget-admin-card {
  overflow: visible;
  border: 1px solid #2c3c50;
  border-radius: 17px;
  background: #0d151f;
}

.widget-admin-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.widget-admin-card > summary::-webkit-details-marker { display: none; }
.widget-admin-card > summary > span { display: grid; gap: 4px; min-width: 0; }
.widget-admin-card > summary strong,
.widget-admin-card > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-admin-card > summary small { color: #8fa1b7; }
.widget-admin-new > summary { color: #9fc1ff; font-weight: 760; }
.widget-admin-editor { padding: 0 16px 16px; }

.widget-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 16px 16px;
}

.widget-admin-editor .widget-admin-form { padding: 0; }
.widget-admin-form > label { display: grid; gap: 7px; }
.widget-admin-form > label > span,
.widget-fields legend { color: #b9c6d5; font-size: 13px; font-weight: 720; }
.widget-admin-form input:not([type="checkbox"]),
.widget-admin-form textarea {
  width: 100%;
  border: 1px solid #33465c;
  border-radius: 12px;
  background: #0a121c;
  color: #edf3fa;
  padding: 12px 13px;
  font: inherit;
}
.widget-admin-form input:focus-visible,
.widget-admin-form textarea:focus-visible { border-color: #6f86a1; outline: none; box-shadow: none; }
.widget-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin: 0; padding: 15px; border: 1px solid #2b3b4f; border-radius: 13px; }
.widget-fields > label:not(.widget-toggle) { display: grid; gap: 7px; color: #aebdce; }
.widget-fields > label > span { color: #b9c6d5; font-size: 13px; font-weight: 720; }
.widget-toggle,
.widget-check-grid label { display: inline-flex; align-items: center; gap: 8px; color: #aebdce; font-size: 13px; }
.widget-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px 14px; }
.widget-fields input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; accent-color: #83a9ff; }
.widget-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.widget-form-actions a,
.copy-link-button { min-height: 42px; display: inline-flex; align-items: center; border: 1px solid #33465c; border-radius: 11px; background: #111c29; color: #b9cce3; padding: 0 13px; text-decoration: none; font: 700 14px inherit; cursor: pointer; }
.copy-link-button[data-copied="true"] { color: #baff78; border-color: #486535; }
.widget-delete-form { padding: 0 16px 16px; }

/* Owner QA refinements: profile, homework, answers and widget library */
.login-stack {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.login-stack .login-card { width: 100%; }
.login-notice-card { text-align: center; }
.login-notice-card .button-link { justify-content: center; }

.student-card,
.mobile-menu-account {
  color: inherit;
  text-decoration: none;
}

.profile-hero > div > p:last-child {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.profile-hero > div { min-width: 0; }

.profile-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
}

.profile-telegram-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
}

.profile-telegram-card h2,
.profile-telegram-card p { margin: 0; }
.profile-telegram-card form { grid-column: 2; grid-row: 1 / span 2; }

.profile-linked-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-linked-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #36765e;
  border-radius: 999px;
  background: #143428;
  color: #a7e9cd;
  font-size: 13px;
  font-weight: 750;
}

.profile-unlink-button {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #4a3540;
  border-radius: 50%;
  background: #1c151d;
  color: #e7a0ab;
}

.profile-unlink-button:hover,
.profile-unlink-button:focus-visible {
  border-color: #8c5360;
  background: #2a1920;
}

.profile-unlink-button .side-icon,
.profile-unlink-button .side-icon svg { width: 18px; height: 18px; }

.profile-form,
.profile-form fieldset {
  display: grid;
  gap: 16px;
}

.profile-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-form fieldset:disabled { opacity: .52; }
.profile-form label,
.profile-form-field { display: grid; gap: 8px; color: #c7d3e2; font-size: 13px; font-weight: 700; }
.profile-form .button { min-height: 48px; cursor: pointer; }
.profile-form .button:disabled,
.profile-form fieldset:disabled .button { cursor: not-allowed; }
.profile-form input:not([type="file"]) {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #34435a;
  border-radius: 12px;
  background: #0b111a;
  color: #f1f5fa;
  font: inherit;
}
.profile-form input:-webkit-autofill,
.profile-form input:-webkit-autofill:hover,
.profile-form input:-webkit-autofill:focus,
.management-form input:-webkit-autofill,
.management-form input:-webkit-autofill:hover,
.management-form input:-webkit-autofill:focus,
.widget-admin-form input:-webkit-autofill,
.widget-admin-form input:-webkit-autofill:hover,
.widget-admin-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1f5fb !important;
  caret-color: #f1f5fb;
  box-shadow: 0 0 0 1000px #0b111a inset !important;
  transition: background-color 9999s ease-out 0s;
}
.profile-form input[type="date"] { color-scheme: dark; }
.profile-form input:not([type="file"]):focus-visible {
  border-color: #7da9ee;
  outline: 3px solid rgba(76, 141, 255, .2);
  outline-offset: 2px;
}
.date-picker { position: relative; min-width: 0; }
.date-picker-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  overflow: hidden;
  border: 1px solid #34435a;
  border-radius: 12px;
  background: #0b111a;
}
.profile-form .date-picker-control input:not([type="file"]) {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.profile-form .date-picker-control input:not([type="file"]):focus-visible { outline: 0; }
.date-picker-control:focus-within {
  border-color: #7da9ee;
  outline: 3px solid rgba(76, 141, 255, .2);
  outline-offset: 2px;
}
.date-picker-control > button {
  display: grid;
  width: 48px;
  min-height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid #29394d;
  background: #111b28;
  color: #b9cce3;
}
.date-picker-control .side-icon,
.date-picker-control .side-icon svg { width: 21px; height: 21px; }
.date-picker-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(340px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid #34465d;
  border-radius: 18px;
  background: #111a27;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .52);
  color: #edf3fa;
}
.date-picker-popover[hidden] { display: none; }
.date-picker-popover header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}
.date-picker-popover button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  font: 750 14px/1 inherit;
}
.date-picker-popover button:hover { background: #1a293b; }
.date-picker-popover button:focus-visible { border-color: #83a9ff; }
.date-picker-popover header > button:first-child,
.date-picker-popover header > button:last-child { display: grid; padding: 0; place-items: center; background: #172437; }
.date-picker-popover header .side-icon,
.date-picker-popover header .side-icon svg { width: 19px; height: 19px; }
.date-picker-heading { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-picker-weekdays,
.date-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.date-picker-weekdays { margin: 14px 0 6px; color: #778ba4; font-size: 11px; font-weight: 800; text-align: center; text-transform: uppercase; }
.date-picker-weekdays span { display: grid; min-height: 24px; place-items: center; }
.date-picker-grid button,
.date-picker-grid span { display: grid; min-width: 0; min-height: 44px; padding: 0; place-items: center; }
.date-picker-grid button[data-selected="true"] { background: #edf4ff; color: #111923; }
.date-picker-grid button[data-today="true"]:not([data-selected="true"]) { border-color: #5e82b5; color: #b9d3ff; }
.date-picker-grid[data-mode="month"],
.date-picker-grid[data-mode="year"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.date-picker-grid[data-mode="month"] button,
.date-picker-grid[data-mode="year"] button { min-height: 48px; background: #152235; }
.date-picker-popover footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #26364a; }
.date-picker-popover footer button { color: #a9c9ff; }
.profile-personal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.profile-field-wide { grid-column: 1 / -1; }
.profile-hero-copy { display: grid; min-width: 0; gap: 4px; }
.profile-hero-copy h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.profile-hero-copy .profile-hero-email { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.profile-avatar-shell {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
}
.profile-avatar-picker {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
}
.profile-avatar-picker.is-disabled { cursor: not-allowed; }
.profile-avatar-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.profile-avatar-preview,
.profile-avatar-preview-media {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}
.profile-avatar-preview-media {
  border: 1px solid var(--line-strong);
  background: #1d2d43;
  color: #d7e7ff;
  font-size: 34px;
  font-weight: 800;
}
.profile-avatar-preview-media img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 6px;
  background: #07101de6;
  color: #f4f7fb;
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease;
  pointer-events: none;
}
.profile-avatar-edit-overlay .side-icon,
.profile-avatar-edit-overlay svg { width: 13px; height: 13px; }
.profile-avatar-picker:hover .profile-avatar-edit-overlay,
.profile-avatar-picker:focus-within .profile-avatar-edit-overlay {
  opacity: 1;
  transform: translateY(0);
}
.profile-avatar-picker:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.profile-avatar-state {
  display: block;
  margin-top: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #8f9db0;
  font-size: 13px;
  font-weight: 500;
}
.profile-avatar-state.has-error { color: #f1aab4; }
.profile-avatar-clear,
.profile-avatar-delete {
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #cbd8e8;
  cursor: pointer;
  font: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.profile-avatar-clear::before,
.profile-avatar-delete::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid #607794;
  border-radius: 50%;
  background: #152235;
  box-shadow: 0 6px 16px #0007;
}
.profile-avatar-delete { color: #ffd1d6; }
.profile-avatar-delete::before { border-color: #8f4e5b; background: #351b23; }
.profile-avatar-shell:hover .profile-avatar-corner,
.profile-avatar-corner:focus-visible,
.profile-avatar-shell:focus-within .profile-avatar-corner {
  opacity: 1;
  pointer-events: auto;
}
.profile-avatar-clear:hover::before,
.profile-avatar-clear:focus-visible::before { border-color: #91b6e6; background: #203451; }
.profile-avatar-delete:hover::before,
.profile-avatar-delete:focus-visible::before { border-color: #d97a8a; background: #4a222d; }
.profile-avatar-clear .side-icon,
.profile-avatar-delete .side-icon,
.profile-avatar-clear svg,
.profile-avatar-delete svg { position: relative; z-index: 1; width: 15px; height: 15px; }
.profile-avatar-clear[hidden],
.profile-avatar-delete[hidden],
.profile-avatar-progress[hidden] { display: none; }
.profile-avatar-clear:disabled,
.profile-avatar-delete:disabled { cursor: wait; opacity: .55; }
.profile-avatar-progress {
  display: grid;
  width: min(100%, 360px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}
.profile-avatar-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #0a111b;
}
.profile-avatar-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #75a9ff;
  transition: width 180ms ease-out;
}
.profile-avatar-progress output { min-width: 72px; color: #a9bad0; font-size: 12px; text-align: right; }
.profile-avatar-progress.has-error .profile-avatar-progress-track > span { background: #df6b6b; }

@media (prefers-reduced-motion: reduce) {
  .profile-avatar-progress-track > span,
  .profile-avatar-edit-overlay,
  .profile-avatar-clear,
  .profile-avatar-delete { transition: none; }
}

@media (hover: none) {
  .profile-avatar-edit-overlay {
    opacity: 1;
    transform: translateY(0);
  }
  .profile-avatar-corner {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 520px) {
  .profile-hero {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 18px;
  }
  .profile-hero-copy h1 { margin-block: 0 4px; font-size: clamp(26px, 9vw, 34px); }
  .profile-hero-copy .eyebrow { font-size: 12px; }
  .profile-avatar-shell { width: 72px; height: 72px; flex-basis: 72px; }
  .profile-avatar-preview-media { font-size: 26px; }
  .profile-avatar-edit-overlay { gap: 0; padding-inline: 4px; font-size: 9px; }
  .profile-avatar-edit-overlay .side-icon { display: none; }
}

.homework-check { position: relative; min-height: 44px; gap: 12px; align-items: center; cursor: pointer; }
.homework-check input {
  appearance: none;
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-content: center;
  margin: 0;
  border: 1px solid #586a82;
  border-radius: 8px;
  background: #0b111a;
  cursor: pointer;
}
.homework-check input::before {
  width: 11px;
  height: 6px;
  border: solid #07111e;
  border-width: 0 0 3px 3px;
  content: "";
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg);
}
.homework-check input:checked { border-color: #75a9ff; background: #75a9ff; }
.homework-check input:checked::before { opacity: 1; }
.homework-check input:focus-visible { outline: 2px solid #b8d4ff; outline-offset: 3px; }

.homework-upload { position: relative; display: inline-grid; width: fit-content; }
.homework-upload-input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
}
.homework-upload-button {
  display: inline-flex;
  width: fit-content;
  min-height: 46px;
  gap: 9px;
  align-items: center;
  padding: 0 16px;
  border: 1px dashed #52657f;
  border-radius: 12px;
  background: #101a28;
  color: #dce8f7;
  font-weight: 700;
}
.homework-upload-button .side-icon { width: 20px; height: 20px; }
.homework-upload-input:hover + .homework-upload-button { border-color: #78a7e7; background: #16243a; }
.homework-upload-input:focus-visible + .homework-upload-button { border-color: var(--focus); outline: 2px solid #b8d4ff; outline-offset: 2px; }

.homework-file-item { grid-template-columns: minmax(0, 1fr) auto; }
.homework-file-download {
  width: auto;
  min-width: 108px;
  grid-auto-flow: column;
  gap: 8px;
  padding: 0 14px;
  text-decoration: none;
}
.homework-file-download > span { font-size: 13px; font-weight: 700; }

.homework-preview-dialog { width: min(900px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 32px)); }
.homework-preview-dialog header button { border-radius: 50%; }
.homework-preview-dialog footer .button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0;
  padding-inline: 18px;
  line-height: 1;
}

.confirmation-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #35445b;
  border-radius: 18px;
  background: #111a27;
  color: #eef3fa;
  box-shadow: 0 24px 80px rgb(0 0 0 / 58%);
}

.confirmation-dialog::backdrop { background: rgb(3 7 13 / 76%); }

.confirmation-dialog form { display: grid; }

.confirmation-dialog header {
  padding: 22px 24px 12px;
}

.confirmation-dialog h2 {
  margin: 0;
  font-size: 21px;
}

.confirmation-dialog p {
  margin: 0;
  padding: 8px 24px 24px;
  color: #c7d2e1;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.confirmation-dialog footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid #2a394d;
  background: #0d1521;
}

.confirmation-dialog footer .button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.confirmation-dialog footer .danger-button {
  border: 1px solid #8a4751;
  background: #3a1d24;
  color: #ffd9dd;
}

@media (max-width: 520px) {
  .confirmation-dialog footer { display: grid; grid-template-columns: 1fr; }
  .confirmation-dialog footer .button { width: 100%; }
}

.homework-message header { align-items: center; justify-content: flex-start; }
.homework-author-avatar,
.answer-student-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #3a4a60;
  border-radius: 50%;
  background: #243248;
  color: #dce8f7;
  font-size: 14px;
  font-weight: 800;
}
.homework-author-avatar img,
.answer-student-avatar img { width: 100%; height: 100%; object-fit: cover; }
.homework-author-copy { display: grid; min-width: 0; gap: 2px; }
.homework-message header .homework-author-copy > span { font-size: 11px; }
.homework-message-delete { margin-left: auto; }
.homework-message-delete button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #e79ba4;
  cursor: pointer;
}
.homework-message-delete button:hover,
.homework-message-delete button:focus-visible { border-color: #75424a; background: #2b1a20; }
.homework-message-deleted { color: #8492a4 !important; font-style: italic; }

.answer-student { display: flex; min-width: 0; gap: 12px; align-items: center; }
.answer-student-avatar { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; }
.answer-student > span:last-child { min-width: 0; }
.answers-load-more {
  position: static;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin: 18px auto 0;
  line-height: 1.2;
}

.lesson-student-answers { display: grid; gap: 18px; max-width: 920px; margin-top: 28px; }
.lesson-student-answers > header { display: flex; align-items: end; justify-content: space-between; }
.lesson-student-answers h2 { margin: 4px 0 0; font-size: 26px; }
.lesson-student-answers > header > span { color: #9aaabd; font-variant-numeric: tabular-nums; }

.widgets-library-section { margin-bottom: 18px; }
.widget-embed-code { display: grid; gap: 9px; }
.widget-embed-code > span { color: #b9c6d5; font-size: 13px; font-weight: 720; }
.widget-embed-code code {
  display: block;
  max-height: 130px;
  padding: 13px;
  overflow: auto;
  border: 1px solid #2d3f55;
  border-radius: 11px;
  background: #09111c;
  color: #b9ccea;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.widget-embed-code > div { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-personal-fields { grid-template-columns: minmax(0, 1fr); }
  .profile-field-wide { grid-column: auto; }
  .profile-telegram-card { grid-template-columns: 1fr; }
  .profile-telegram-card form { grid-column: 1; grid-row: auto; justify-self: start; }
  .homework-file-download { min-width: 48px; padding: 0 12px; }
  .homework-file-download > span { display: none; }
  .answer-card-head { align-items: flex-start; }
  .date-picker-popover {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px));
    overflow: auto;
  }
}

@media (max-width: 720px) {
  .widgets-admin-section { padding: 14px; }
  .widgets-admin-section > header { align-items: center; }
  .widget-admin-form { grid-template-columns: minmax(0, 1fr); }
  .widget-admin-form .form-span-2,
  .widget-fields,
  .widget-form-actions { grid-column: 1; }
  .widget-fields { grid-template-columns: minmax(0, 1fr); }
  .widget-form-actions { justify-content: stretch; }
  .widget-form-actions > * { flex: 1 1 auto; justify-content: center; }
}
.student-access-sections { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 900px) {
  .product-course-picker { grid-template-columns: minmax(0, 1fr); }
  .user-access-control { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .login-page { padding: 24px 16px; }
  .login-shell { gap: 28px; }
  .login-brand h1 { font-size: clamp(32px, 11vw, 44px); overflow-wrap: normal; word-break: normal; }
  .login-card { padding: 26px 20px; border-radius: 22px; }
  .login-card h1,
  .login-card h2 { font-size: 42px; }
  input,
  textarea,
  select { font-size: 16px !important; }
  .admin-section-head { align-items: stretch; flex-direction: column; }
  .admin-section-head .button-link { width: 100%; justify-content: center; }
  .management-form { padding: 15px; }
  .management-form-grid,
  .offer-form,
  .user-access-control form { grid-template-columns: minmax(0, 1fr); }
  .form-span-2,
  .user-access-control form > label:first-of-type,
  .user-access-control form > small { grid-column: auto; }
  .management-form-actions { justify-content: stretch; }
  .management-form-actions > * { flex: 1; justify-content: center; text-align: center; }
  .product-admin-card { grid-template-columns: minmax(0, 1fr) 20px; gap: 10px; }
  .product-admin-card .product-admin-counts,
  .product-admin-card .learning-status { grid-column: 1; }
  .product-admin-card > span:last-child { grid-column: 2; grid-row: 1; }
  .product-admin-counts { justify-self: start; }
  .offers-admin-section { padding: 14px; }
  .offer-form { padding: 13px; }
  .user-access-control { padding: 15px; }
  .password-management > form { grid-template-columns: minmax(0, 1fr); }
  .access-record { align-items: flex-start; flex-direction: column; }
  .access-record-actions { width: 100%; grid-template-columns: auto auto; align-items: center; justify-items: start; justify-content: space-between; }
}

/* Shared interaction contract for mouse, keyboard and busy/disabled states */
:where(
  a[href],
  button:not(:disabled),
  input[type="button"]:not(:disabled),
  input[type="submit"]:not(:disabled),
  input[type="reset"]:not(:disabled),
  input[type="checkbox"]:not(:disabled),
  input[type="radio"]:not(:disabled),
  input[type="file"]:not(:disabled),
  select:not(:disabled),
  summary,
  [role="button"]:not([aria-disabled="true"]),
  label:has(input[type="checkbox"]:not(:disabled)),
  label:has(input[type="radio"]:not(:disabled)),
  label:has(input[type="file"]:not(:disabled))
) {
  cursor: pointer;
}

:where(
  button:disabled,
  input:disabled,
  select:disabled,
  [aria-disabled="true"]
) {
  cursor: not-allowed;
}

:where(
  button[aria-busy="true"],
  input[aria-busy="true"],
  [role="button"][aria-busy="true"]
) {
  cursor: wait;
}
